OpenM++ runtime library (libopenm)
|
public interface for message passing More...
#include <msg.h>
Public Member Functions | |
virtual | ~IMsgExec (void) noexcept=0 |
cleanup message passing resources. | |
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 | setCleanExit (bool i_isClean=false)=0 |
set clean exit flag for normal shutdown of message passing interface. More... | |
virtual void | createGroups (int i_groupSize, int i_groupCount)=0 |
create groups for parallel run of modeling task. More... | |
virtual void | bcastValue (int i_groupOne, const type_info &i_type, void *io_value)=0 |
broadcast value from root to all other processes. More... | |
void | bcastInt (int i_groupOne, void *io_value) |
broadcast integer value from root to all other processes. More... | |
virtual void | bcastSend (int i_groupOne, const type_info &i_type, size_t i_size, void *io_valueArr)=0 |
send broadcast value array from root to all other processes. More... | |
virtual void | bcastReceive (int i_groupOne, const type_info &i_type, size_t i_size, void *io_valueArr)=0 |
receive broadcasted value array from root process. More... | |
virtual void | bcastSendPacked (int i_groupOne, IRowBaseVec &io_rowVec, const IPackedAdapter &i_adapter)=0 |
send broadcast vector of db rows from root to all other processes. More... | |
virtual void | bcastReceivePacked (int i_groupOne, IRowBaseVec &io_rowVec, const IPackedAdapter &i_adapter)=0 |
receive broadcasted vector of db rows from root. 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 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 non-blocking send to be completed More... | |
Static Public Member Functions | |
static IMsgExec * | create (int argc, char **argv, IFinalState *i_final) |
create new message passing interface. More... | |
Static Public Attributes | |
static const int | rootRank = 0 |
root process rank, always zero | |
public interface for message passing
|
inline |
broadcast integer value from root to all other processes.
[in] | i_groupOne | if zero then worldwide else one-based group number |
[in,out] | io_value | integer value to send or output value to receive |
|
pure virtual |
receive broadcasted value array from root process.
[in] | i_groupOne | if zero then worldwide else one-based group number |
[in] | i_type | value type |
[in] | i_size | size of array |
[in,out] | io_valueArr | value array to send or output buffer to receive |
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
receive broadcasted vector of db rows from root.
[in] | i_groupOne | if zero then worldwide else one-based group number |
[in,out] | io_rowVec | vector of db rows to send or vector to push back received db rows |
[in] | i_adapter | adapter to pack and unpack db rows |
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
send broadcast value array from root to all other processes.
[in] | i_groupOne | if zero then worldwide else one-based group number |
[in] | i_type | value type |
[in] | i_size | size of array |
[in,out] | io_valueArr | value array to send or output buffer to receive |
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
send broadcast vector of db rows from root to all other processes.
[in] | i_groupOne | if zero then worldwide else one-based group number |
[in,out] | io_rowVec | vector of db rows to send or vector to push back received db rows |
[in] | i_adapter | adapter to pack and unpack db rows |
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
broadcast value from root to all other processes.
[in] | i_groupOne | if zero then worldwide else one-based group number |
[in] | i_type | value type |
[in,out] | io_value | value to send or output value to receive |
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
static |
create new message passing interface.
[in] | argc | main argc to pass to MPI_Init |
[in] | argv | main argv to pass to MPI_Init |
[in] | i_final | final model run state interface |
|
pure virtual |
create groups for parallel run of modeling task.
[in] | i_groupSize | number of processes in each group |
[in] | i_groupCount | number of groups |
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
return rank in modeling group.
Implemented in openm::MsgEmptyExec, and openm::MpiExec.
|
pure virtual |
return current process rank.
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
set clean exit flag for normal shutdown of message passing interface.
Implemented in openm::MpiExec, and openm::MsgEmptyExec.
|
pure virtual |
start non-blocking send of value array to i_sendTo process.
[in] | i_sendTo | receiver proccess rank |
[in] | i_msgTag | tag to identify message content (parameter or output data) |
[in] | i_type | value type |
[in] | i_size | size of array |
[in] | i_valueArr | value array to send |
Implemented in openm::MsgEmptyExec, and openm::MpiExec.
|
pure virtual |
pack and start non-blocking send of vector of db rows to i_sendTo process.
[in] | i_sendTo | receiver proccess rank |
[in] | i_rowVec | vector of db rows to send |
[in] | i_adapter | adapter to pack db rows |
Implemented in openm::MsgEmptyExec, and openm::MpiExec.
|
pure virtual |
try to non-blocking receive and unpack vector of db rows, return true if completed.
[in] | i_recvFrom | sender proccess rank |
[in,out] | io_resultRowVec | vector to push back received db rows |
[in] | i_adapter | adapter to unpack db rows |
Implemented in openm::MsgEmptyExec, and openm::MpiExec.
|
pure virtual |
try to non-blocking receive value array, return true if completed.
[in] | i_recvFrom | sender proccess rank |
[in] | i_msgTag | tag to identify message content (parameter or output data) |
[in] | i_type | value type |
[in] | i_size | size of array |
[in,out] | io_valueArr | allocated buffer to recieve value array |
Implemented in openm::MsgEmptyExec, and openm::MpiExec.
|
pure virtual |
wait for non-blocking send to be completed
Implemented in openm::MsgEmptyExec, and openm::MpiExec.
|
pure virtual |
return total number of processes in world communicator.
Implemented in openm::MpiExec, and openm::MsgEmptyExec.