28 #ifndef GALOIS_RUNTIME_NETWORKTHREAD_H
29 #define GALOIS_RUNTIME_NETWORKTHREAD_H
61 if (rc != MPI_SUCCESS) {
62 MPI_Abort(MPI_COMM_WORLD, rc);
103 std::atomic<size_t>& recvs)
109 virtual void enqueue(message m) = 0;
124 std::tuple<std::unique_ptr<NetworkIO>, uint32_t, uint32_t>
126 std::atomic<size_t>& sends, std::atomic<size_t>& recvs);
virtual message dequeue()=0
Checks to see if a message is here for this host to receive.
Message structure for sending data across the network.
Definition: NetworkIO.h:80
bool empty() const
Definition: PODResizeableArray.h:127
uint32_t tag
tag on message indicating distinct communication phases
Definition: NetworkIO.h:82
Class that tracks memory usage (mainly of send and receive buffers).
Definition: MemUsage.h:38
virtual void enqueue(message m)=0
Queues a message for sending out. Takes ownership of data buffer.
message()
Default constructor initializes host and tag to large numbers.
Definition: NetworkIO.h:86
MemUsageTracker & memUsageTracker
memory usage tracker
Definition: NetworkIO.h:67
vTy data
data portion of message
Definition: NetworkIO.h:83
Class for the network IO layer which is responsible for doing sends/receives of data.
Definition: NetworkIO.h:52
bool valid() const
A message is valid if there is data to be sent.
Definition: NetworkIO.h:95
virtual ~NetworkIO()
Default destructor does nothing.
Definition: Network.cpp:43
Contains MemUsageTracker, a class that tracks memory usage throughout runtime of a program of send/re...
NetworkIO(MemUsageTracker &tracker, std::atomic< size_t > &sends, std::atomic< size_t > &recvs)
The default constructor takes a memory usage tracker and saves it.
Definition: NetworkIO.h:102
message(uint32_t h, uint32_t t, vTy &&d)
Definition: NetworkIO.h:90
std::atomic< size_t > & inflightRecvs
Definition: NetworkIO.h:71
std::atomic< size_t > & inflightSends
Number of inflight sends and receives.
Definition: NetworkIO.h:70
static void handleError(int rc)
Wrapper for dealing with MPI error codes.
Definition: NetworkIO.h:60
uint32_t host
destination of this message
Definition: NetworkIO.h:81
std::tuple< std::unique_ptr< NetworkIO >, uint32_t, uint32_t > makeNetworkIOMPI(galois::runtime::MemUsageTracker &tracker, std::atomic< size_t > &sends, std::atomic< size_t > &recvs)
Creates/returns a network IO layer that uses MPI to do communication.
Definition: NetworkIOMPI.cpp:239
virtual void progress()=0
Make progress. Other functions don't have to make progress.