|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <Communicate.h>
Classes | |
| struct | MessageData |
Public Types | |
| enum | CommErrors { COMM_NOERROR , COMM_ERROR , COMM_NOSEND , COMM_NORECEIVE } |
| enum | CommTags { COMM_HOSTS_TAG = 32000 , COMM_DIE_TAG , COMM_SEND_TAG } |
| enum | CommCodes { COMM_ANY_NODE = (-1) , COMM_ANY_TAG = (-1) } |
Public Member Functions | |
| Communicate (int argc=0, char **argv=NULL, int procs=(-1)) | |
| virtual | ~Communicate (void) |
| virtual const char * | name () const |
| int | getNodes () const |
| int | getContexts (const int n) const |
| int | getProcesses (const int n, const int c) const |
| int | myNode () const |
| int | getError () const |
| int | getReceived () const |
| bool | send (Message *, int node, int tag, bool delmsg=true) |
| Message * | receive (int &node, int &tag) |
| Message * | receive_block (int &node, int &tag) |
| virtual bool | raw_send (void *, int, int, int) |
| virtual MPI_Request | raw_isend (void *, int, int, int) |
| virtual int | raw_receive (char *, int, int &, int &) |
| virtual MPI_Request | raw_ireceive (char *, int, int, int) |
| virtual int | raw_probe_receive (char *&, int &, int &) |
| virtual int | broadcast_all (Message *, int) |
| virtual int | broadcast_others (Message *, int, bool delmsg=true) |
| void | barrier (void) |
| virtual void | cleanupMessage (void *) |
| int | next_tag (int t, int s=1000) |
| int | current_tag (int t, int s=1000) |
| int | reset_tag (int t, int s=1000) |
Protected Types | |
| typedef long | MsgNum_t |
| typedef std::map< MsgNum_t, CommSendInfo > | SentCache_t |
Protected Member Functions | |
| bool | add_msg (Message *, int, int) |
| Message * | find_msg (int &, int &) |
| virtual bool | mysend (Message *, int node, int utag, int etag) |
| virtual Message * | myreceive (int &node, int &tag, int etag) |
| virtual void | mybarrier (void) |
| virtual bool | resend (void *buf, int size, int node, int etag) |
| int | find_msg_length (Message &) |
| void | fill_msg_buffer (void *, Message &, int, int, int) |
| Message * | unpack_message (int &node, int &tag, void *pos) |
| void | add_to_send_cache (void *pos, MsgNum_t mnum, int size, int node) |
| void | request_retransmission (int node, MsgNum_t mnum) |
| void | perform_resend (MsgNum_t mnum) |
| void | unpack_retransmission_request (int nitems, void *pos) |
| void | send_ok_message (int node, MsgNum_t mnum) |
| void | clear_ok_messages (int nitems, void *pos) |
| void | remove_single_ok_message (MsgNum_t mnum) |
| void | process_resend_requests () |
Static Protected Member Functions | |
| static void * | makebuffer (int size) |
| static void | freebuffer (void *buf) |
| static unsigned int | wordround (int size) |
| static void | addwordround (void *&pos, int size) |
| static void | pack (void *packdata, void *&pos, int size) |
| static void | unpack (void *&pos, void *packdata, int size) |
Protected Attributes | |
| std::vector< MessageData > | recMsgList |
| int | TotalNodes |
| int | myHost |
| int | ErrorStatus |
| std::vector< int > | Contexts |
| std::vector< std::vector< int > > | Processes |
| MsgNum_t | nextMsgNum |
| SentCache_t | sentMsgCache |
| std::vector< MsgNum_t > | resendList |
| std::vector< MsgNum_t > | sentOKList |
| std::vector< std::pair< int, MsgNum_t > > | informOKList |
| std::vector< std::pair< int, MsgNum_t > > | requestList |
Private Member Functions | |
| TagInfo & | create_base_tag (int t, int s=1000) |
Private Attributes | |
| std::map< int, TagInfo, TagCompare > | TagList |
Definition at line 112 of file Communicate.h.
|
protected |
Definition at line 269 of file Communicate.h.
|
protected |
Definition at line 275 of file Communicate.h.
| Enumerator | |
|---|---|
| COMM_ANY_NODE | |
| COMM_ANY_TAG | |
Definition at line 125 of file Communicate.h.
| Enumerator | |
|---|---|
| COMM_NOERROR | |
| COMM_ERROR | |
| COMM_NOSEND | |
| COMM_NORECEIVE | |
Definition at line 117 of file Communicate.h.
| Enumerator | |
|---|---|
| COMM_HOSTS_TAG | |
| COMM_DIE_TAG | |
| COMM_SEND_TAG | |
Definition at line 120 of file Communicate.h.
| Communicate::Communicate | ( | int | argc = 0, |
| char ** | argv = NULL, | ||
| int | procs = (-1) ) |
Definition at line 69 of file Communicate.cpp.
References COMM_NOERROR, Contexts, ErrorStatus, myHost, nextMsgNum, Processes, and TotalNodes.
Referenced by CommMPI::CommMPI().
|
virtual |
Definition at line 84 of file Communicate.cpp.
References sentMsgCache.
|
protected |
Definition at line 97 of file Communicate.cpp.
References recMsgList.
Referenced by broadcast_all(), CommMPI::mysend(), receive(), receive_block(), and send().
|
protected |
Definition at line 688 of file Communicate.cpp.
References endl(), ERRORMSG, and sentMsgCache.
Referenced by fill_msg_buffer().
|
inlinestaticprotected |
Definition at line 358 of file Communicate.h.
References wordround().
Referenced by clear_ok_messages(), pack(), unpack(), unpack_message(), and unpack_retransmission_request().
| void Communicate::barrier | ( | void | ) |
Definition at line 439 of file Communicate.cpp.
References mybarrier().
|
virtual |
Definition at line 384 of file Communicate.cpp.
References add_msg(), COMM_SEND_TAG, getNodes(), myNode(), and mysend().
|
virtual |
Definition at line 413 of file Communicate.cpp.
References COMM_SEND_TAG, getNodes(), myNode(), and mysend().
Referenced by reduce(), and reduce_masked().
|
virtual |
Reimplemented in CommMPI.
Definition at line 451 of file Communicate.cpp.
|
protected |
Definition at line 801 of file Communicate.cpp.
References addwordround(), endl(), INFORM_ALL_NODES, PInsist, and sentOKList.
Referenced by unpack_message().
|
inlineprivateinherited |
Definition at line 92 of file TagMaker.h.
References TagMaker::TagInfo::base, TagMaker::TagInfo::cycleSize, DEF_CYCLE_SIZE, and TagList.
Referenced by current_tag(), next_tag(), and reset_tag().
|
inlineinherited |
Definition at line 48 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, and DEF_CYCLE_SIZE.
|
protected |
Definition at line 483 of file Communicate.cpp.
References add_to_send_cache(), ADDIPPLSTAT, crc(), Message::MsgItem::data(), IPPL_MSG_OK_TAG, IPPL_RETRANSMIT_TAG, Message::item(), myNode(), nextMsgNum, Message::MsgItem::numBytes(), Message::MsgItem::numElems(), pack(), IpplInfo::retransmit(), Message::size(), and IpplInfo::useChecksums().
Referenced by CommMPI::pack_message().
|
protected |
Definition at line 110 of file Communicate.cpp.
References COMM_ANY_NODE, COMM_ANY_TAG, and recMsgList.
Referenced by receive(), and receive_block().
|
protected |
Definition at line 456 of file Communicate.cpp.
References Message::item(), Message::MsgItem::numBytes(), Message::size(), IpplInfo::useChecksums(), and wordround().
Referenced by CommMPI::pack_message().
|
inlinestaticprotected |
Definition at line 343 of file Communicate.h.
Referenced by CommMPI::cleanupMessage(), and CommMPI::mysend().
|
inline |
Definition at line 147 of file Communicate.h.
References Contexts.
|
inline |
Definition at line 159 of file Communicate.h.
References ErrorStatus.
|
inline |
Definition at line 143 of file Communicate.h.
References TotalNodes.
Referenced by broadcast_all(), broadcast_others(), reduce(), reduce_masked(), scatter(), and send().
|
inline |
Definition at line 151 of file Communicate.h.
|
inline |
Definition at line 163 of file Communicate.h.
References recMsgList.
|
inlinestaticprotected |
Definition at line 339 of file Communicate.h.
Referenced by CommMPI::myreceive(), CommMPI::mysend(), and CommMPI::pack_message().
|
protectedvirtual |
|
inline |
Definition at line 155 of file Communicate.h.
References myHost.
Referenced by broadcast_all(), broadcast_others(), fill_msg_buffer(), perform_resend(), receive(), receive_block(), reduce(), reduce_masked(), CommMPI::resend(), scatter(), send(), and CommMPI::~CommMPI().
|
protectedvirtual |
Reimplemented in CommMPI.
Definition at line 148 of file Communicate.cpp.
Referenced by receive(), and receive_block().
|
protectedvirtual |
Reimplemented in CommMPI.
Definition at line 138 of file Communicate.cpp.
Referenced by broadcast_all(), broadcast_others(), and send().
|
inlinevirtual |
Reimplemented in CommMPI.
Definition at line 137 of file Communicate.h.
|
inlineinherited |
Definition at line 39 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, TagMaker::TagInfo::cycleSize, and DEF_CYCLE_SIZE.
Referenced by reduce(), reduce_masked(), and scatter().
|
inlinestaticprotected |
Definition at line 364 of file Communicate.h.
References addwordround().
Referenced by fill_msg_buffer().
|
protected |
Definition at line 764 of file Communicate.cpp.
References COMM_SEND_TAG, endl(), ERRORMSG, myNode(), PInsist, resend(), and sentMsgCache.
Referenced by process_resend_requests().
|
protected |
Definition at line 865 of file Communicate.cpp.
References endl(), INFORM_ALL_NODES, informOKList, perform_resend(), remove_single_ok_message(), request_retransmission(), requestList, resendList, send_ok_message(), and sentOKList.
Referenced by receive(), and receive_block().
|
inlinevirtual |
Reimplemented in CommMPI.
Definition at line 204 of file Communicate.h.
|
inlinevirtual |
Reimplemented in CommMPI.
Definition at line 196 of file Communicate.h.
|
inlinevirtual |
Reimplemented in CommMPI.
Definition at line 208 of file Communicate.h.
|
inlinevirtual |
Reimplemented in CommMPI.
Definition at line 200 of file Communicate.h.
|
inlinevirtual |
Reimplemented in CommMPI.
Definition at line 192 of file Communicate.h.
| Message * Communicate::receive | ( | int & | node, |
| int & | tag ) |
Definition at line 240 of file Communicate.cpp.
References add_msg(), COMM_ANY_NODE, COMM_ANY_TAG, COMM_NOERROR, COMM_NORECEIVE, COMM_SEND_TAG, ErrorStatus, find_msg(), myNode(), myreceive(), and process_resend_requests().
| Message * Communicate::receive_block | ( | int & | node, |
| int & | tag ) |
Definition at line 300 of file Communicate.cpp.
References add_msg(), COMM_ANY_NODE, COMM_ANY_TAG, COMM_NOERROR, COMM_NORECEIVE, COMM_SEND_TAG, ErrorStatus, find_msg(), myNode(), myreceive(), PInsist, process_resend_requests(), and IpplInfo::retransmit().
Referenced by reduce(), reduce_masked(), and scatter().
|
protected |
Definition at line 839 of file Communicate.cpp.
References endl(), ERRORMSG, INFORM_ALL_NODES, and sentMsgCache.
Referenced by process_resend_requests().
|
protected |
Definition at line 720 of file Communicate.cpp.
References endl(), INFORM_ALL_NODES, IPPL_RETRANSMIT_TAG, Message::put(), and send().
Referenced by process_resend_requests().
|
protectedvirtual |
Reimplemented in CommMPI.
Definition at line 170 of file Communicate.cpp.
Referenced by perform_resend().
|
inlineinherited |
Definition at line 56 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, and DEF_CYCLE_SIZE.
| bool Communicate::send | ( | Message * | msg, |
| int | node, | ||
| int | tag, | ||
| bool | delmsg = true ) |
Definition at line 181 of file Communicate.cpp.
References add_msg(), COMM_ERROR, COMM_NOERROR, COMM_NOSEND, COMM_SEND_TAG, endl(), ERRORMSG, ErrorStatus, getNodes(), myNode(), and mysend().
Referenced by reduce(), reduce_masked(), request_retransmission(), scatter(), and send_ok_message().
|
protected |
Definition at line 785 of file Communicate.cpp.
References endl(), INFORM_ALL_NODES, IPPL_MSG_OK_TAG, Message::put(), and send().
Referenced by process_resend_requests().
|
inlinestaticprotected |
Definition at line 371 of file Communicate.h.
References addwordround().
|
protected |
Definition at line 555 of file Communicate.cpp.
References ADDIPPLSTAT, addwordround(), clear_ok_messages(), crc(), endl(), ERRORMSG, informOKList, IPPL_ABORT_TAG, IPPL_EXIT_TAG, IPPL_MSG_OK_TAG, IPPL_RETRANSMIT_TAG, IpplInfo::myNode(), PInsist, Message::putmsg(), requestList, IpplInfo::retransmit(), Message::setCopy(), Message::setDelete(), unpack_retransmission_request(), and IpplInfo::useChecksums().
Referenced by CommMPI::myreceive(), and CommMPI::mysend().
|
protected |
Definition at line 738 of file Communicate.cpp.
References addwordround(), endl(), INFORM_ALL_NODES, PInsist, and resendList.
Referenced by unpack_message().
|
inlinestaticprotected |
Definition at line 350 of file Communicate.h.
Referenced by addwordround(), and find_msg_length().
|
protected |
Definition at line 264 of file Communicate.h.
Referenced by CommMPI::CommMPI(), Communicate(), and getContexts().
|
protected |
Definition at line 263 of file Communicate.h.
Referenced by Communicate(), getError(), receive(), receive_block(), and send().
|
protected |
Definition at line 285 of file Communicate.h.
Referenced by process_resend_requests(), and unpack_message().
|
protected |
Definition at line 262 of file Communicate.h.
Referenced by CommMPI::CommMPI(), Communicate(), and myNode().
|
protected |
Definition at line 270 of file Communicate.h.
Referenced by Communicate(), and fill_msg_buffer().
|
protected |
Definition at line 265 of file Communicate.h.
Referenced by CommMPI::CommMPI(), Communicate(), and getProcesses().
|
protected |
Definition at line 258 of file Communicate.h.
Referenced by add_msg(), find_msg(), and getReceived().
|
protected |
Definition at line 288 of file Communicate.h.
Referenced by process_resend_requests(), and unpack_message().
|
protected |
Definition at line 279 of file Communicate.h.
Referenced by process_resend_requests(), and unpack_retransmission_request().
|
protected |
Definition at line 276 of file Communicate.h.
Referenced by add_to_send_cache(), perform_resend(), remove_single_ok_message(), and ~Communicate().
|
protected |
Definition at line 282 of file Communicate.h.
Referenced by clear_ok_messages(), and process_resend_requests().
|
privateinherited |
Definition at line 87 of file TagMaker.h.
Referenced by create_base_tag().
|
protected |
Definition at line 261 of file Communicate.h.
Referenced by CommMPI::CommMPI(), Communicate(), getNodes(), CommMPI::myreceive(), and CommMPI::~CommMPI().