libgrape-lite
A C++ library for parallel graph processing
|
Default message manager. More...
#include <default_message_manager.h>
Public Member Functions | |
void | Init (MPI_Comm comm) override |
Inherit. | |
void | Start () override |
Inherit. | |
void | StartARound () override |
Inherit. | |
void | FinishARound () override |
Inherit. | |
bool | ToTerminate () override |
Inherit. | |
void | Finalize () override |
Inherit. | |
size_t | GetMsgSize () const override |
Inherit. | |
void | ForceContinue () override |
Inherit. | |
void | ForceTerminate (const std::string &terminate_info) override |
Inherit. | |
const TerminateInfo & | GetTerminateInfo () const override |
Inherit. | |
template<typename MESSAGE_T > | |
void | SendToFragment (fid_t dst_fid, const MESSAGE_T &msg) |
Send message to a fragment. | |
template<typename GRAPH_T , typename MESSAGE_T > | |
void | SyncStateOnOuterVertex (const GRAPH_T &frag, const typename GRAPH_T::vertex_t &v, const MESSAGE_T &msg) |
Communication by synchronizing the status on outer vertices, for edge-cut fragments. | |
template<typename GRAPH_T , typename MESSAGE_T > | |
void | SendMsgThroughIEdges (const GRAPH_T &frag, const typename GRAPH_T::vertex_t &v, const MESSAGE_T &msg) |
Communication via a crossing edge a<-c. It sends message from a to c. | |
template<typename GRAPH_T , typename MESSAGE_T > | |
void | SendMsgThroughOEdges (const GRAPH_T &frag, const typename GRAPH_T::vertex_t &v, const MESSAGE_T &msg) |
Communication via a crossing edge a->b. It sends message from a to b. | |
template<typename GRAPH_T , typename MESSAGE_T > | |
void | SendMsgThroughEdges (const GRAPH_T &frag, const typename GRAPH_T::vertex_t &v, const MESSAGE_T &msg) |
Communication via crossing edges a->b and a<-c. It sends message from a to b and c. | |
template<typename MESSAGE_T > | |
bool | GetMessage (MESSAGE_T &msg) |
Get a message from message buffer. | |
template<typename GRAPH_T , typename MESSAGE_T > | |
bool | GetMessage (const GRAPH_T &frag, typename GRAPH_T::vertex_t &v, MESSAGE_T &msg) |
Get a message and its target vertex from message buffer. | |
Protected Member Functions | |
fid_t | fid () const |
fid_t | fnum () const |
Protected Attributes | |
std::vector< InArchive > | to_send_ |
Private Member Functions | |
bool | syncLengths () |
Private Attributes | |
std::vector< OutArchive > | to_recv_ |
fid_t | cur_ |
std::vector< size_t > | lengths_out_ |
std::vector< size_t > | lengths_in_ |
std::vector< MPI_Request > | reqs_ |
MPI_Comm | comm_ |
fid_t | fid_ |
fid_t | fnum_ |
CommSpec | comm_spec_ |
size_t | sent_size_ |
bool | to_terminate_ |
bool | force_continue_ |
bool | force_terminate_ |
TerminateInfo | terminate_info_ |
Default message manager.
The send and recv methods are not thread-safe.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inline |
Get a message and its target vertex from message buffer.
GRAPH_T | |
MESSAGE_T |
frag | |
v | |
msg |
|
inline |
Get a message from message buffer.
MESSAGE_T |
msg |
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inline |
Communication via crossing edges a->b and a<-c. It sends message from a to b and c.
GRAPH_T | |
MESSAGE_T |
frag | |
v | a |
msg |
|
inline |
Communication via a crossing edge a<-c. It sends message from a to c.
GRAPH_T | |
MESSAGE_T |
frag | |
v | a |
msg |
|
inline |
Communication via a crossing edge a->b. It sends message from a to b.
GRAPH_T | |
MESSAGE_T |
frag | |
v | a |
msg |
|
inline |
Send message to a fragment.
MESSAGE_T | Message type. |
dst_fid | Destination fragment id. |
msg |
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.
|
inline |
Communication by synchronizing the status on outer vertices, for edge-cut fragments.
Assume a fragment F_1, a crossing edge a->b' in F_1 and a is an inner vertex in F_1. This function invoked on F_1 send status on b' to b on F_2, where b is an inner vertex.
GRAPH_T | |
MESSAGE_T |
frag | |
v | a |
msg |
|
inlineoverridevirtual |
Inherit.
Implements grape::MessageManagerBase.