|
OpenM++ runtime library (libopenm)
|
message passing library main class for MPI-based implementation More...
#include <msgMpiExec.h>


Public Member Functions | |
| MpiExec (int &argc, char **&argv, IFinalState *i_final) | |
| create message passing interface by MPI_Init. | |
| ~MpiExec (void) noexcept | |
| cleanup message passing resources by MPI_Finalize. | |
| int | worldSize (void) const noexcept override |
| return total number of processes in MPI world communicator. | |
| int | rank (void) const noexcept override |
| return current process MPI rank. | |
| int | groupRank (void) const noexcept override |
| return rank in modeling group. | |
| void | setCleanExit (bool i_isClean=false) override |
| set clean exit flag for normal shutdown messaging else abort MPI. | |
| void | createGroups (int i_groupSize, int i_groupCount) override |
| create groups for parallel run of modeling task. | |
| void | bcastValue (int i_groupOne, const type_info &i_type, void *io_value) override |
| broadcast value from root to all other processes. | |
| void | bcastSend (int i_groupOne, const type_info &i_type, size_t i_size, void *io_valueArr) override |
| send broadcast value array from root to all other processes. | |
| void | bcastReceive (int i_groupOne, const type_info &i_type, size_t i_size, void *io_valueArr) override |
| receive broadcasted value array from root process. | |
| void | bcastSendPacked (int i_groupOne, IRowBaseVec &io_rowVec, const IPackedAdapter &i_adapter) override |
| send broadcast vector of db rows from root to all other processes. | |
| void | bcastReceivePacked (int i_groupOne, IRowBaseVec &io_rowVec, const IPackedAdapter &i_adapter) override |
| receive broadcasted vector of db rows from root. | |
| void | startSend (int i_sendTo, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *i_valueArr) override |
| start non-blocking send of value array to i_sendTo process. | |
| void | startSendPacked (int i_sendTo, const IRowBaseVec &i_rowVec, const IPackedAdapter &i_adapter) override |
| pack and start non-blocking send of vector of db rows to i_sendTo process. | |
| bool | tryReceive (int i_recvFrom, IRowBaseVec &io_resultRowVec, const IPackedAdapter &i_adapter) const override |
| try to non-blocking receive and unpack vector of db rows, return true if completed. | |
| bool | tryReceive (int i_recvFrom, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *io_valueArr) const override |
| try to non-blocking receive value array, return true if completed. | |
| void | waitSendAll (void) override |
| wait for non-blocking send to be completed. | |
Public Member Functions inherited from openm::IMsgExec | |
| virtual | ~IMsgExec (void) noexcept=0 |
| cleanup message passing resources. | |
| bool | isRoot (void) const |
| if root process then true (root process rank == 0) | |
| void | bcastInt (int i_groupOne, void *io_value) |
| broadcast integer value from root to all other processes. | |
Public Member Functions inherited from openm::MsgExecBase | |
| virtual | ~MsgExecBase (void) noexcept |
| cleanup message passing resources. | |
| int | worldSize (void) const |
| return total number of processes in MPI world communicator. | |
| int | rank (void) const |
| return current process rank. | |
| int | groupRank (void) const |
| return rank in modeling group. | |
| void | startSend (int i_sendTo, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *i_valueArr) |
| start non-blocking send of value array to i_sendTo process. | |
| void | startSendPacked (int i_sendTo, const IRowBaseVec &i_rowVec, const IPackedAdapter &i_adapter) |
| pack and start non-blocking send of vector of db rows to i_sendTo process. | |
| bool | tryReceive (int i_recvFrom, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *io_valueArr) const |
| try to non-blocking receive value array, return return true if completed. | |
| bool | tryReceive (int i_recvFrom, IRowBaseVec &io_resultRowVec, const IPackedAdapter &i_adapter) const |
| try to non-blocking receive and unpack vector of db rows, return return true if completed. | |
| void | waitSendAll (void) |
| wait for non-blocking send to be completed. | |
Additional Inherited Members | |
Static Public Member Functions inherited from openm::IMsgExec | |
| static IMsgExec * | create (int argc, char **argv, IFinalState *i_final) |
| create new message passing interface. | |
Static Public Attributes inherited from openm::IMsgExec | |
| static const int | rootRank = 0 |
| root process rank, always zero | |
Protected Member Functions inherited from openm::MsgExecBase | |
| MsgExecBase (IFinalState *i_final) | |
Protected Attributes inherited from openm::MsgExecBase | |
| int | worldCommSize |
| int | worldRank |
| int | group_rank |
| IFinalState * | theFinal = nullptr |
| list< unique_ptr< IMsgSend > > | sendLst |
message passing library main class for MPI-based implementation
| MpiExec::MpiExec | ( | int & | argc, |
| char **& | argv, | ||
| IFinalState * | i_final | ||
| ) |
create message passing interface by MPI_Init.
| [in,out] | argc | main argc to pass to MPI_Init |
| [in,out] | argv | main argv to pass to MPI_Init |
| [in] | IFinalState | final model run state interface |
|
overridevirtual |
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 (row count) |
| [in,out] | io_valueArr | value array to send or output buffer to receive |
Implements openm::IMsgExec.
|
overridevirtual |
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 |
Implements openm::IMsgExec.
|
overridevirtual |
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 (row count) |
| [in,out] | io_valueArr | value array to send or output buffer to receive |
Implements openm::IMsgExec.
|
overridevirtual |
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 |
Implements openm::IMsgExec.
|
overridevirtual |
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 |
Implements openm::IMsgExec.
|
overridevirtual |
create groups for parallel run of modeling task.
Implements openm::IMsgExec.
|
inlineoverridevirtualnoexcept |
return rank in modeling group.
Implements openm::IMsgExec.
|
inlineoverridevirtualnoexcept |
return current process MPI rank.
Implements openm::IMsgExec.
|
overridevirtual |
set clean exit flag for normal shutdown messaging else abort MPI.
Implements openm::IMsgExec.
|
inlineoverridevirtual |
start non-blocking send of value array to i_sendTo process.
Implements openm::IMsgExec.
|
inlineoverridevirtual |
pack and start non-blocking send of vector of db rows to i_sendTo process.
Implements openm::IMsgExec.
|
inlineoverridevirtual |
try to non-blocking receive and unpack vector of db rows, return true if completed.
Implements openm::IMsgExec.
|
inlineoverridevirtual |
try to non-blocking receive value array, return true if completed.
Implements openm::IMsgExec.
|
inlineoverridevirtual |
wait for non-blocking send to be completed.
Implements openm::IMsgExec.
|
inlineoverridevirtualnoexcept |
return total number of processes in MPI world communicator.
Implements openm::IMsgExec.