Accelerated Computation Engine
Public Member Functions | Protected Member Functions | List of all members
Ace::Analytic::MPIMaster Class Reference

#include <ace_analytic_mpimaster.h>

Inheritance diagram for Ace::Analytic::MPIMaster:
Ace::Analytic::AbstractMPI Ace::Analytic::AbstractInput Ace::Analytic::AbstractManager

Public Member Functions

virtual bool isFinished () const override final
 
 MPIMaster (quint16 type)
 
virtual ~MPIMaster () override final
 
- Public Member Functions inherited from Ace::Analytic::AbstractManager
quint16 analyticType () const
 
int size () const
 
EAbstractAnalytic::Input::Type type (int index) const
 
QVariant data (int index, EAbstractAnalytic::Input::Role role) const
 
QList< QString > commandLineArguments () const
 
void set (int index, const QVariant &value)
 
- Public Member Functions inherited from Ace::Analytic::AbstractInput
virtual void saveResult (std::unique_ptr< EAbstractAnalytic::Block > &&result)
 
 AbstractInput ()=default
 
 ~AbstractInput ()
 

Protected Member Functions

virtual int index () const override final
 
virtual void writeResult (std::unique_ptr< EAbstractAnalytic::Block > &&result) override final
 
- Protected Member Functions inherited from Ace::Analytic::AbstractMPI
virtual void mpiStart (Type type, int platform, int device)
 
 AbstractMPI (quint16 type)
 
- Protected Member Functions inherited from Ace::Analytic::AbstractManager
virtual QFile * addOutputFile (const QString &path)
 
virtual Ace::DataObjectaddOutputData (const QString &path, quint16 type, const EMetadata &system)
 
 AbstractManager (quint16 type)
 
std::unique_ptr< EAbstractAnalytic::BlockmakeWork (int index)
 
void writeResult (std::unique_ptr< EAbstractAnalytic::Block > &&result, int expectedIndex)
 
EAbstractAnalyticanalytic ()
 
const EAbstractAnalyticanalytic () const
 

Additional Inherited Members

- Public Types inherited from Ace::Analytic::AbstractMPI
enum  Type { Serial, OpenCL }
 
- Public Slots inherited from Ace::Analytic::AbstractManager
void initialize ()
 
void terminationRequested ()
 
void finish ()
 
- Signals inherited from Ace::Analytic::AbstractManager
void progressed (int percentComplete)
 
void done ()
 
void finished ()
 
- Static Public Member Functions inherited from Ace::Analytic::AbstractManager
static std::unique_ptr< Ace::Analytic::AbstractManagermakeManager (quint16 type, int index, int size)
 
- Protected Types inherited from Ace::Analytic::AbstractMPI
enum  Code { Terminate = -1, ReadyAsSerial = -2, ReadyAsOpenCL = -3 }
 
- Protected Slots inherited from Ace::Analytic::AbstractMPI
virtual void start () override final
 
- Protected Slots inherited from Ace::Analytic::AbstractManager
virtual void start ()
 

Detailed Description

This is the MPI master manager. This manager is used for an MPI run with the node that has world rank 0. The main function of this class is to create new work blocks and assign their execution to other slave nodes within the MPI run, along with getting results back and saving them to the manager's underlying analytic with the indexes being in order. Because this manager does not process blocks itself it has no abstract run object of its own. Also this manager does not start giving out work blocks to slave nodes until they signal they are ready to process them.

Constructor & Destructor Documentation

◆ MPIMaster()

MPIMaster::MPIMaster ( quint16  type)
explicit

Constructs a new MPI master manager with the given analytic type.

Parameters
typeThe analytic type this manager will use.

◆ ~MPIMaster()

MPIMaster::~MPIMaster ( )
finaloverridevirtual

Properly shuts down the MPI system.

Member Function Documentation

◆ index()

int MPIMaster::index ( ) const
finaloverrideprotectedvirtual

Implements the interface that returns the next expected result block index to maintain order of result blocks.

Returns
The next expected result block index to maintain order.

Reimplemented from Ace::Analytic::AbstractInput.

◆ isFinished()

bool MPIMaster::isFinished ( ) const
finaloverridevirtual

Implements the interface that tests if this abstract input is finished and received all result blocks for its analytic.

Returns
True if this abstract input is finished or false otherwise.

Implements Ace::Analytic::AbstractInput.

◆ writeResult()

void MPIMaster::writeResult ( std::unique_ptr< EAbstractAnalytic::Block > &&  result)
finaloverrideprotectedvirtual

Implements the interface that is called to save the given result block to the underlying analytic and it can be assumed that the index order is maintained from least to greatest.

Parameters
resultThe result block that is processed by this manager's analytic.

Reimplemented from Ace::Analytic::AbstractInput.


The documentation for this class was generated from the following files: