![]() |
fpmas 1.6
|
#include <ghost_mode.h>
Public Member Functions | |
GhostMode (api::graph::DistributedGraph< T > &graph, api::communication::MpiCommunicator &comm) | |
Mutex< T > * | buildMutex (api::graph::DistributedNode< T > *node) override |
GhostDataSync< T > & | getDataSync () override |
GhostSyncLinker< T > & | getSyncLinker () override |
virtual Mutex< T > * | buildMutex (api::graph::DistributedNode< T > *node)=0 |
virtual SyncLinker< T > & | getSyncLinker ()=0 |
virtual DataSync< T > & | getDataSync ()=0 |
Ghost SyncMode implementation.
The concept of GhostMode is that local data is updated only at each api::graph::DistributedGraph::synchronize() call by the GhostDataSync instance. Let's call a "time step" the period between two graph synchronizations. It is not guaranteed that DISTANT node data accessed within a time step is synchronized with the process that owns the node.
More importantly, **write operations on DISTANT nodes are not reported** to the hosts processes.
In consequence, the corresponding api::synchro::Mutex implementation is trivial, since (for now) we consider a single-threaded environment, so no concurrency needs to be managed since the local process necessarily access sequentially the local nodes' data.
However, link, unlink and node removal operations are allowed, and are committed "at the end of each time step" by the GhostSyncLinker instance, i.e. at each graph synchronization.
|
inline |
GhostMode constructor.
graph | reference to the associated DistributedGraph |
comm | MPI communicator |
|
inlineoverridevirtual |
Builds a new SingleThreadMutex from the specified node data.
node | node to which the built mutex will be associated |
Implements fpmas::api::synchro::SyncMode< T >.
|
inlineoverridevirtual |
Returns a reference to the internal GhostDataSync instance.
Implements fpmas::api::synchro::SyncMode< T >.
|
inlineoverridevirtual |
Returns a reference to the internal GhostSyncLinker instance.
Implements fpmas::api::synchro::SyncMode< T >.