25 MsgTag tag(
void)
const noexcept override {
return msgTag; }
30 lock_guard<recursive_mutex> lck(
msgMutex);
31 vector<uint8_t> packedData;
76 int ,
const type_info & ,
void *
81 int ,
const type_info & ,
size_t ,
void *
86 int ,
const type_info & ,
size_t ,
void *
100 void startSend(
int i_sendTo,
MsgTag i_msgTag,
const type_info & i_type,
size_t i_size,
void * i_valueArr)
override
112 bool tryReceive(
int i_recvFrom,
MsgTag i_msgTag,
const type_info & i_type,
size_t i_size,
void * io_valueArr)
const override
129 msgTag((int)i_msgTag),
130 selfRank(i_selfRank),
153 int i_selfRank,
int i_sendTo,
MsgTag i_msgTag,
const type_info & i_type,
size_t i_size,
void * i_valueArr
168 const type_info & valueType;
211 int i_selfRank,
int i_recvFrom,
MsgTag i_msgTag,
const type_info & i_type,
size_t i_size,
void * io_valueArr
213 msgTag((int)i_msgTag),
214 selfRank(i_selfRank),
215 recvFromRank(i_recvFrom),
218 resultValueArr(io_valueArr)
231 const type_info & valueType;
233 void * resultValueArr;
248 selfRank(i_selfRank),
249 recvFromRank(i_recvFrom),
250 resultRowVec(io_resultRowVec),
public interface for message passing
Definition: msg.h:138
public interface to receive value array
Definition: msgCommon.h:90
public interface to receive packed data
Definition: msgCommon.h:112
public interface to send value array
Definition: msgCommon.h:37
public interface to send packed data.
Definition: msgCommon.h:59
message passing main class.
Definition: msgEmpty.h:51
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.
Definition: msgEmpty.h:108
int worldSize(void) const override
return total number of processes in world communicator: always = 1.
Definition: msgEmpty.h:60
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.
Definition: msgEmpty.h:104
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.
Definition: msgEmpty.h:112
int groupRank(void) const noexcept override
return rank in modeling group: always = 0.
Definition: msgEmpty.h:66
int rank(void) const override
return current process rank: always = 0.
Definition: msgEmpty.h:63
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.
Definition: msgEmpty.h:100
void bcastReceivePacked(int, IRowBaseVec &, const IPackedAdapter &) override
receive broadcasted vector of db rows from root (does nothing).
Definition: msgEmpty.h:95
~MsgEmptyExec(void) noexcept
cleanup message passing resources (empty destructor).
Definition: msgEmpty.h:57
MsgEmptyExec(int &, char **&, IFinalState *i_final)
create new message passing interface (empty constructor)
Definition: msgEmpty.h:54
void createGroups(int, int) override
create groups for parallel run of modeling task (does nothing).
Definition: msgEmpty.h:72
void setCleanExit(bool) override
set clean exit flag for normal shutdown of message passing interface.
Definition: msgEmpty.h:69
void waitSendAll(void) override
wait for non-blocking send to be completed.
Definition: msgEmpty.h:116
void bcastReceive(int, const type_info &, size_t, void *) override
receive broadcasted value array from root process (does nothing).
Definition: msgEmpty.h:85
void bcastValue(int, const type_info &, void *) override
broadcast value from root to all other processes (does nothing).
Definition: msgEmpty.h:75
void bcastSend(int, const type_info &, size_t, void *) override
send broadcast value array from root to all other processes (does nothing).
Definition: msgEmpty.h:80
void bcastSendPacked(int, IRowBaseVec &, const IPackedAdapter &) override
send broadcast vector of db rows from root to all other processes (does nothing).
Definition: msgEmpty.h:90
non-blocking receive of value array (empty implementation)
Definition: msgEmpty.h:207
~MsgEmptyRecvArray(void) noexcept
cleanup message receiver resources (does nothing).
Definition: msgEmpty.h:222
bool tryReceive(void)
try to non-blocking receive value array, return true if completed (always true).
Definition: msgEmpty.h:225
MsgEmptyRecvArray(int i_selfRank, int i_recvFrom, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *io_valueArr)
create sender and initiate non-blocking receive of value array (does nothing).
Definition: msgEmpty.h:210
non-blocking receive of packed data (empty implementation)
Definition: msgEmpty.h:242
bool tryReceive(void)
try to non-blocking receive and unpack the data, return true if completed (always true).
Definition: msgEmpty.h:258
~MsgEmptyRecvPacked(void) noexcept
cleanup message receiver resources (does nothing).
Definition: msgEmpty.h:255
MsgEmptyRecvPacked(int i_selfRank, int i_recvFrom, IRowBaseVec &io_resultRowVec, const IPackedAdapter &i_adapter)
create sender and initiate non-blocking receive of packed data (does nothing).
Definition: msgEmpty.h:245
non-blocking send of value array (empty implementation)
Definition: msgEmpty.h:149
~MsgEmptySendArray(void) noexcept
cleanup message sender resources (does nothing).
Definition: msgEmpty.h:162
bool isCompleted(void)
return true if send completed (always true).
Definition: msgEmpty.h:165
MsgEmptySendArray(int i_selfRank, int i_sendTo, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *i_valueArr)
create sender and initiate non-blocking send of value array (does nothing).
Definition: msgEmpty.h:152
base class for non-blocking send (empty implementation)
Definition: msgEmpty.h:125
MsgEmptySendBase(int i_selfRank, int i_sendTo, MsgTag i_msgTag)
create sender and initiate non-blocking send (does nothing).
Definition: msgEmpty.h:128
virtual ~MsgEmptySendBase(void) noexcept
cleanup message sender resources (does nothing).
Definition: msgEmpty.h:135
non-blocking send of packed data (empty implementation)
Definition: msgEmpty.h:179
bool isCompleted(void)
return true if send completed (always true).
Definition: msgEmpty.h:194
~MsgEmptySendPacked(void) noexcept
cleanup message sender resources (does nothing).
Definition: msgEmpty.h:191
MsgEmptySendPacked(int i_selfRank, int i_sendTo, const IRowBaseVec &i_rowVec, const IPackedAdapter &i_adapter)
create sender and initiate non-blocking send of packed data (does nothing).
Definition: msgEmpty.h:182
message passing base class
Definition: msgExecBase.h:22
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.
Definition: msgExecBase.cpp:74
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.
Definition: msgExecBase.cpp:46
int rank(void) const
return current process rank.
Definition: msgExecBase.cpp:24
int groupRank(void) const
return rank in modeling group.
Definition: msgExecBase.cpp:31
void waitSendAll(void)
wait for non-blocking send to be completed.
Definition: msgExecBase.cpp:148
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.
Definition: msgExecBase.cpp:102
int worldSize(void) const
return total number of processes in MPI world communicator.
Definition: msgExecBase.cpp:17
OpenM++: message passing library base class.
openM++ namespace
Definition: log.h:32
MsgTag
tag to identify message content
Definition: msg.h:29
recursive_mutex msgMutex
mutex to lock messaging operations
Definition: msgExecBase.cpp:14
std::vector< IRowBaseUptr > IRowBaseVec
db rows: vector of unique pointers to db row
Definition: omHelper.h:239
pack and unpack adapter for metadata table db rows (empty implementation).
Definition: msgEmpty.h:19
const vector< uint8_t > pack(const IRowBaseVec &) const override
pack vector of db rows into byte vector: return empty vector.
Definition: msgEmpty.h:28
void unpackTo(int, void *, IRowBaseVec &) const override
unpack from byte[] into vector of rows (does nothing).
Definition: msgEmpty.h:36
MsgTag tag(void) const noexcept override
return message tag
Definition: msgEmpty.h:25
EmptyPackedAdapter(MsgTag i_tag)
create pack and unpack adapter for metadata table db rows
Definition: msgEmpty.h:22
final model run state public interface: thread safe
Definition: omHelper.h:246
public interface to pack and unpack rows of metadata db-table
Definition: msg.h:99