OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <Poller.h>
Public Member Functions | |
Poller (MPI_Comm comm, double delay=0.1) | |
virtual | ~Poller () |
Protected Member Functions | |
virtual bool | onMessage (MPI_Status status, size_t recv_value)=0 |
virtual void | onStop ()=0 |
enable implementation to react to STOP tag More... | |
virtual void | setupPoll ()=0 |
executed before starting polling loop More... | |
virtual void | prePoll ()=0 |
executed before checking for new request More... | |
virtual void | postPoll ()=0 |
executed after handling (if any) new request More... | |
virtual void | run () |
Protected Attributes | |
MPI_Comm | comm_m |
communicator the poller listens to requests More... | |
bool | is_running_ |
double | last_polled_ |
time of last MPI_Test More... | |
double | poll_delay_ |
delay in seconds between polls More... | |
|
inline |
Definition at line 39 of file Poller.h.
References last_polled_.
|
protectedpure virtual |
User specific behavior on receiving a message.
Implemented in SampleWorker< Sim_t >, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, Worker< Sim_t >, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, Optimizer, Sampler, and FixedPisaNsga2< CrossoverOperator, MutationOperator >.
Referenced by run().
|
protectedpure virtual |
enable implementation to react to STOP tag
Implemented in Optimizer, Sampler, Worker< Sim_t >, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, and FixedPisaNsga2< CrossoverOperator, MutationOperator >.
Referenced by run().
|
protectedpure virtual |
executed after handling (if any) new request
Implemented in Optimizer, Sampler, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, Worker< Sim_t >, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, and FixedPisaNsga2< CrossoverOperator, MutationOperator >.
Referenced by run().
|
protectedpure virtual |
executed before checking for new request
Implemented in Optimizer, Sampler, Worker< Sim_t >, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, and FixedPisaNsga2< CrossoverOperator, MutationOperator >.
Referenced by run().
|
inlineprotectedvirtual |
The poll loop stops when receiving a 'MPI_STOP_TAG' otherwise passes message to user.
Reimplemented in Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >.
Definition at line 79 of file Poller.h.
References comm_m, is_running_, last_polled_, MPI_STOP_TAG, onMessage(), onStop(), poll_delay_, postPoll(), prePoll(), and setupPoll().
Referenced by Sampler::initialize(), SampleWorker< Sim_t >::onMessage(), SampleWorker< Sim_t >::runSlave(), SampleWorker< Sim_t >::SampleWorker(), and Worker< Sim_t >::Worker().
|
protectedpure virtual |
executed before starting polling loop
Implemented in Optimizer, Sampler, Worker< Sim_t >, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >, and FixedPisaNsga2< CrossoverOperator, MutationOperator >.
Referenced by run().
|
protected |
communicator the poller listens to requests
Definition at line 52 of file Poller.h.
Referenced by Worker< Sim_t >::onMessage(), SampleWorker< Sim_t >::onMessage(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::parseInputFile(), run(), and Worker< Sim_t >::setupPoll().
|
protected |
Definition at line 54 of file Poller.h.
Referenced by run(), Worker< Sim_t >::runCoWorker(), and SampleWorker< Sim_t >::runSlave().
|
protected |
|
protected |