130 static size_t packedSize(
const type_info & i_type,
size_t i_size);
133 static unique_ptr<uint8_t[]>
packArray(
const type_info & i_type,
size_t i_size,
void * i_valueArr);
162 virtual int rank(
void)
const = 0;
184 virtual void bcastValue(
int i_groupOne,
const type_info & i_type,
void * io_value) = 0;
201 virtual void bcastSend(
int i_groupOne,
const type_info & i_type,
size_t i_size,
void * io_valueArr) = 0;
211 virtual void bcastReceive(
int i_groupOne,
const type_info & i_type,
size_t i_size,
void * io_valueArr) = 0;
239 virtual void startSend(
int i_sendTo,
MsgTag i_msgTag,
const type_info & i_type,
size_t i_size,
void * i_valueArr) = 0;
259 virtual bool tryReceive(
int i_recvFrom,
MsgTag i_msgTag,
const type_info & i_type,
size_t i_size,
void * io_valueArr)
const = 0;
public interface for message passing
Definition: msg.h:138
virtual void bcastReceivePacked(int i_groupOne, IRowBaseVec &io_rowVec, const IPackedAdapter &i_adapter)=0
receive broadcasted vector of db rows from root.
virtual int groupRank(void) const =0
return rank in modeling group.
virtual void createGroups(int i_groupSize, int i_groupCount)=0
create groups for parallel run of modeling task.
void bcastInt(int i_groupOne, void *io_value)
broadcast integer value from root to all other processes.
Definition: msg.h:192
virtual ~IMsgExec(void) noexcept=0
cleanup message passing resources.
Definition: msgCommon.cpp:14
bool isRoot(void) const
if root process then true (root process rank == 0)
Definition: msg.h:156
virtual void waitSendAll(void)=0
wait for non-blocking send to be completed
virtual void bcastValue(int i_groupOne, const type_info &i_type, void *io_value)=0
broadcast value from root to all other processes.
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.
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.
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.
virtual void setCleanExit(bool i_isClean=false)=0
set clean exit flag for normal shutdown of message passing interface.
virtual int worldSize(void) const =0
return total number of processes in world communicator.
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.
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.
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.
static const int rootRank
root process rank, always zero
Definition: msg.h:153
virtual int rank(void) const =0
return current process rank.
static IMsgExec * create(int argc, char **argv, IFinalState *i_final)
create new message passing interface.
Definition: msgCommon.cpp:29
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.
openM++ exceptions
Definition: omError.h:19
OpenM++ data library: public interface for db common structures.
openM++ namespace
Definition: log.h:32
const char msgUnknownErrorMessage[]
messaging library default error message: "unknown messaging error"
Definition: msgCommon.cpp:11
MsgTag
tag to identify message content
Definition: msg.h:29
@ microdataSize
microdata row count for each entity
@ tableAcc
table_acc db rows
@ tableExpr
table_expr db rows
@ langWord
lang_word db rows
@ tableDic
table_dic db rows
@ modelDic
model_dic db rows
@ entityAttr
entity_attr db rows
@ runOption
run_option db rows
@ typeDic
type_dic db rows
@ langLst
lang_lst db rows
@ outSubValueBase
input parameter
@ statusUpdate
modeling job status
@ typeEnumLst
type_enum_lst db rows
@ tableDims
table_dims db rows
@ initial
initial message at process start
@ entityDic
entity_dic db rows
@ microdata
microdata entity rows
@ codeValue
generic (code,value) db rows
@ parameterDic
parameter_dic db rows
@ parameterDims
parameter_dims db rows
@ unused
reserved and should not be used
OpenmException< 4000, msgUnknownErrorMessage > MsgException
messaging library exception
Definition: msg.h:25
std::vector< IRowBaseUptr > IRowBaseVec
db rows: vector of unique pointers to db row
Definition: omHelper.h:239
OpenM++ common helper utilities.
OpenM++: public interface for log and trace support.
OpenM++ modeling library: model run state public interface.
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
static IPackedAdapter * create(MsgTag i_msgTag)
pack adapter factory: create new adapter for metadata table db rows.
Definition: msgCommon.cpp:125
static unique_ptr< uint8_t[]> packArray(const type_info &i_type, size_t i_size, void *i_valueArr)
return new allocated and packed copy of source array.
Definition: msgCommon.cpp:43
virtual const vector< uint8_t > pack(const IRowBaseVec &i_rowVec) const =0
pack vector of db rows into byte vector.
virtual MsgTag tag(void) const noexcept=0
return message tag
static size_t packedSize(const type_info &i_type, size_t i_size)
return byte size to pack source array.
Definition: msgCommon.cpp:36
virtual void unpackTo(int i_packSize, void *i_packedData, IRowBaseVec &io_rowVec) const =0
unpack from byte[] into vector of rows.