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

#include <ace_analytic_abstractmpi.h>

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

Public Types

enum  Type { Serial, OpenCL }
 

Protected Types

enum  Code { Terminate = -1, ReadyAsSerial = -2, ReadyAsOpenCL = -3 }
 

Protected Slots

virtual void start () override final
 
- Protected Slots inherited from Ace::Analytic::AbstractManager
virtual void start ()
 

Protected Member Functions

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 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 ()
 
- 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)
 
- Static Public Member Functions inherited from Ace::Analytic::AbstractManager
static std::unique_ptr< Ace::Analytic::AbstractManagermakeManager (quint16 type, int index, int size)
 

Detailed Description

This represents the common resources required for both master and slave MPI managers. The primary purpose of this class is to have each local rank 0 node assign the different resources of the system to all nodes which share them in the same local rank. The one interface this abstract class has is called for starting the MPI run of a slave node, assigning them a specific resource to use. The master node with local rank 0 skips itself in assigning resources since it does not execute blocks like a slave node. This class also defines special codes passed between master and slave nodes.

Member Enumeration Documentation

◆ Code

Defines special codes passed between the master and slave nodes.

Enumerator
Terminate 

Defines the terminate code which is sent to a slave node to signal it is done and should exit.

◆ Type

Defines the resource types that slave nodes can be assigned to execute as.

Enumerator
Serial 

Defines the serial resource which causes a slave node to run in plain serial mode with no OpenCL device.

Defines the OpenCL resource which causes the slave node to run in accelerated OpenCL mode with a given platform and device index.

Constructor & Destructor Documentation

◆ AbstractMPI()

AbstractMPI::AbstractMPI ( quint16  type)
explicitprotected

Constructs a new abstract MPI object with the given analytic type.

Parameters
typeAnalytic type that is used for this manager's analytic run.

Member Function Documentation

◆ mpiStart()

void AbstractMPI::mpiStart ( Type  type,
int  platform,
int  device 
)
protectedvirtual

This interface is called to start this MPI manager as a slave node with the given resource type and optional platform and device index. The platform and device index is only used if the given resource type is OpenCL. The default implementation throws an exception because if this is called it should be implemented.

Parameters
typeThe resource type this MPI slave node runs as.
platformThe optional platform index for the resource type if it is OpenCL.
deviceThe optional device index for the resource type if it is OpenCL.

Reimplemented in Ace::Analytic::MPISlave.

◆ start

void AbstractMPI::start ( )
finaloverrideprotectedvirtualslot

Implements the interface that is called once to begin the analytic run for this manager after all argument input has been set. This implementation assigns the resources of the local system only if this MPI node is local rank 0.


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