OpenM++ runtime library (libopenm)
openm::IMsgExec Class Referenceabstract

public interface for message passing More...

Inheritance diagram for openm::IMsgExec:

Public Member Functions

virtual ~IMsgExec (void)=0 throw ()
 cleanup message passing resources. More...
 
bool isRoot (void) const
 if root process then true (root process rank == 0)
 
virtual int worldSize (void) const =0
 return total number of processes in world communicator. More...
 
virtual int rank (void) const =0
 return current process rank. More...
 
virtual int groupRank (void) const =0
 return rank in modeling group. More...
 
virtual void createGroups (int i_groupSize, int i_groupCount)=0
 create groups for parallel run of modeling task. More...
 
virtual void bcast (int i_groupOne, const type_info &i_type, size_t i_size, void *io_valueArr)=0
 broadcast value array from root to all other processes. More...
 
virtual void bcastPacked (int i_groupOne, IRowBaseVec &io_rowVec, const IPackedAdapter &i_adapter)=0
 broadcast vector of db rows from root to all other processes. More...
 
virtual void startSend (int i_sendTo, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *i_valueArr)=0
 start non-blocking send of value array to i_sendTo process. More...
 
virtual void startSendPacked (int i_sendTo, const IRowBaseVec &i_rowVec, const IPackedAdapter &i_adapter)=0
 pack and start non-blocking send of vector of db rows to i_sendTo process. More...
 
virtual void startRecv (int i_recvFrom, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *io_valueArr)=0
 initiate non-blocking recveive of value array into io_valueArr. More...
 
virtual void startRecvPacked (int i_recvFrom, IRowBaseVec &io_resultRowVec, const IPackedAdapter &i_adapter)=0
 initiate non-blocking recveive of vector of db rows into io_rowVec. More...
 
virtual bool tryReceive (int i_recvFrom, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *io_valueArr) const =0
 try to non-blocking receive value array, return true if completed. More...
 
virtual bool tryReceive (int i_recvFrom, IRowBaseVec &io_resultRowVec, const IPackedAdapter &i_adapter) const =0
 try to non-blocking receive and unpack vector of db rows, return true if completed. More...
 
virtual void waitSendAll (void)=0
 wait for all non-blocking send to be completed. More...
 
virtual void waitRecvAll (void)=0
 wait for all non-blocking receive to be completed. More...
 

Static Public Member Functions

static IMsgExeccreate (int argc, char **argv)
 create new message passing interface. More...
 

Static Public Attributes

static const int rootRank = 0
 root process rank, always zero
 

Detailed Description

public interface for message passing

Constructor & Destructor Documentation

◆ ~IMsgExec()

IMsgExec::~IMsgExec ( void  )
throw (
)
pure virtual

cleanup message passing resources.

Member Function Documentation

◆ bcast()

virtual void openm::IMsgExec::bcast ( int  i_groupOne,
const type_info &  i_type,
size_t  i_size,
void *  io_valueArr 
)
pure virtual

broadcast value array from root to all other processes.

Parameters
[in]i_groupOneif zero then worldwide else one-based group number
[in]i_typevalue type
[in]i_sizesize of array
[in,out]io_valueArrvalue array to send or output buffer to receive

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ bcastPacked()

virtual void openm::IMsgExec::bcastPacked ( int  i_groupOne,
IRowBaseVec io_rowVec,
const IPackedAdapter i_adapter 
)
pure virtual

broadcast vector of db rows from root to all other processes.

Parameters
[in]i_groupOneif zero then worldwide else one-based group number
[in,out]io_rowVecvector of db rows to send or vector to push back received db rows
[in]i_adapteradapter to pack and unpack db rows

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ create()

IMsgExec * IMsgExec::create ( int  argc,
char **  argv 
)
static

create new message passing interface.

Parameters
[in]argcmain argc to pass to MPI_Init
[in]argvmain argv to pass to MPI_Init

◆ createGroups()

virtual void openm::IMsgExec::createGroups ( int  i_groupSize,
int  i_groupCount 
)
pure virtual

create groups for parallel run of modeling task.

Parameters
[in]i_groupSizenumber of processes in each group
[in]i_groupCountnumber of groups

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ groupRank()

virtual int openm::IMsgExec::groupRank ( void  ) const
pure virtual

return rank in modeling group.

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ rank()

virtual int openm::IMsgExec::rank ( void  ) const
pure virtual

return current process rank.

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ startRecv()

virtual void openm::IMsgExec::startRecv ( int  i_recvFrom,
MsgTag  i_msgTag,
const type_info &  i_type,
size_t  i_size,
void *  io_valueArr 
)
pure virtual

initiate non-blocking recveive of value array into io_valueArr.

Parameters
[in]i_recvFromsender proccess rank
[in]i_msgTagtag to identify message content (parameter or output data)
[in]i_typevalue type
[in]i_sizesize of array
[in,out]io_valueArrallocated buffer to recieve value array

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ startRecvPacked()

virtual void openm::IMsgExec::startRecvPacked ( int  i_recvFrom,
IRowBaseVec io_resultRowVec,
const IPackedAdapter i_adapter 
)
pure virtual

initiate non-blocking recveive of vector of db rows into io_rowVec.

Parameters
[in]i_recvFromsender proccess rank
[in,out]io_resultRowVecvector to push back received db rows
[in]i_adapteradapter to unpack db rows

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ startSend()

virtual void openm::IMsgExec::startSend ( int  i_sendTo,
MsgTag  i_msgTag,
const type_info &  i_type,
size_t  i_size,
void *  i_valueArr 
)
pure virtual

start non-blocking send of value array to i_sendTo process.

Parameters
[in]i_sendToreceiver proccess rank
[in]i_msgTagtag to identify message content (parameter or output data)
[in]i_typevalue type
[in]i_sizesize of array
[in]i_valueArrvalue array to send

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ startSendPacked()

virtual void openm::IMsgExec::startSendPacked ( int  i_sendTo,
const IRowBaseVec i_rowVec,
const IPackedAdapter i_adapter 
)
pure virtual

pack and start non-blocking send of vector of db rows to i_sendTo process.

Parameters
[in]i_sendToreceiver proccess rank
[in]i_rowVecvector of db rows to send
[in]i_adapteradapter to pack db rows

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ tryReceive() [1/2]

virtual bool openm::IMsgExec::tryReceive ( int  i_recvFrom,
MsgTag  i_msgTag,
const type_info &  i_type,
size_t  i_size,
void *  io_valueArr 
) const
pure virtual

try to non-blocking receive value array, return true if completed.

Parameters
[in]i_recvFromsender proccess rank
[in]i_msgTagtag to identify message content (parameter or output data)
[in]i_typevalue type
[in]i_sizesize of array
[in,out]io_valueArrallocated buffer to recieve value array

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ tryReceive() [2/2]

virtual bool openm::IMsgExec::tryReceive ( int  i_recvFrom,
IRowBaseVec io_resultRowVec,
const IPackedAdapter i_adapter 
) const
pure virtual

try to non-blocking receive and unpack vector of db rows, return true if completed.

Parameters
[in]i_recvFromsender proccess rank
[in,out]io_resultRowVecvector to push back received db rows
[in]i_adapteradapter to unpack db rows

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ waitRecvAll()

virtual void openm::IMsgExec::waitRecvAll ( void  )
pure virtual

wait for all non-blocking receive to be completed.

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ waitSendAll()

virtual void openm::IMsgExec::waitSendAll ( void  )
pure virtual

wait for all non-blocking send to be completed.

Implemented in openm::MsgEmptyExec, and openm::MpiExec.

◆ worldSize()

virtual int openm::IMsgExec::worldSize ( void  ) const
pure virtual

return total number of processes in world communicator.

Implemented in openm::MsgEmptyExec, and openm::MpiExec.


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