39 Poller(MPI_Comm comm,
double delay = 0.1)
65 virtual bool onMessage(MPI_Status status,
size_t recv_value) = 0;
82 size_t recv_value = 0;
87 MPI_Irecv(&recv_value, 1, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, MPI_ANY_TAG,
95 double tnow = MPI_Wtime();
103 if(req != MPI_REQUEST_NULL) {
104 MPI_Test(&req, &flag, &status);
112 MPI_Irecv(&recv_value, 1, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE,
113 MPI_ANY_TAG,
comm_m, &req);
#define MPI_STOP_TAG
global stop tag to exit poll loop (
Poller(MPI_Comm comm, double delay=0.1)
double poll_delay_
delay in seconds between polls
double last_polled_
time of last MPI_Test
virtual void prePoll()=0
executed before checking for new request
virtual bool onMessage(MPI_Status status, size_t recv_value)=0
virtual void setupPoll()=0
executed before starting polling loop
virtual void postPoll()=0
executed after handling (if any) new request
virtual void onStop()=0
enable implementation to react to STOP tag
MPI_Comm comm_m
communicator the poller listens to requests