OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Go to the source code of this file.
Macros | |
#define | MPI_WORKER_STATUSUPDATE_TAG 0x11 |
notify pilot about worker status More... | |
#define | MPI_WORKER_FINISHED_TAG 0x12 |
notify pilot that work has been finished and results are ready to collect More... | |
#define | MPI_WORKER_FINISHED_ACK_TAG 0x13 |
pilot notifies worker that he is ready to collect the results More... | |
#define | MPI_COWORKER_NEW_JOB_TAG 0x14 |
notifies coworkers about new jobs More... | |
#define | MPI_OPT_NEW_JOB_TAG 0x21 |
optimizer sends new job to pilot More... | |
#define | MPI_OPT_JOB_FINISHED_TAG 0x22 |
pilot tells optimizer that results are ready to collect More... | |
#define | MPI_OPT_CONVERGED_TAG 0x23 |
optimizer notifies pilot that optimization has converged (EXIT) More... | |
#define | MPI_WORK_JOBID_TAG 0x41 |
unique id of the job More... | |
#define | MPI_WORK_SIZE_TAG 0x42 |
tags messages containing the size of results (requested vars) More... | |
#define | MPI_WORK_SIZE_PARAMS 0x43 |
tags messages containing the size of the parameter list (for simulation) More... | |
#define | MPI_EXCHANGE_SOL_STATE_TAG 0x51 |
#define | MPI_EXCHANGE_SOL_STATE_DATA_TAG 0x52 |
#define | MPI_EXCHANGE_SOL_STATE_RES_SIZE_TAG 0x53 |
#define | MPI_EXCHANGE_SOL_STATE_RES_TAG 0x54 |
#define | MPI_STOP_TAG 0x91 |
global stop tag to exit poll loop ( More... | |
#define | MPI_EXCHANGE_SERIALIZED_DATA_TAG 0x99 |
tag for exchanging serialized data More... | |
Enumerations | |
enum | MPITag_t { WORKER_FINISHED_TAG = 0x12, OPT_NEW_JOB_TAG = 0x21, OPT_CONVERGED_TAG = 0x23, WORKER_STATUSUPDATE_TAG = 0x11, REQUEST_FINISHED = 0x22, EXCHANGE_SOL_STATE_TAG = 0x51, EXCHANGE_SOL_STATE_RES_SIZE_TAG = 0x53 } |
enum | State_t { IDLE = 0, RUNNING = 1 } |
Worker state is either idle or running. More... | |
Functions | |
void | serialize (Param_t params, std::ostringstream &os) |
serializes params using Boost archive More... | |
void | serialize (reqVarContainer_t params, std::ostringstream &os) |
void | deserialize (char *buffer, Param_t ¶ms) |
deserializes params using Boost archive More... | |
void | deserialize (char *buffer, reqVarContainer_t ¶ms) |
void | MPI_Bcast_params (Param_t ¶ms, size_t root, MPI_Comm comm) |
broadcast params to all entities in comm More... | |
void | MPI_Bcast_reqvars (reqVarContainer_t reqvars, size_t root, MPI_Comm comm) |
broadcast requested variables to all entities in comm More... | |
template<class Data_t > | |
void | MPI_Send_serialized (Data_t data, size_t pid, MPI_Comm comm) |
template<class Data_t > | |
void | MPI_Recv_serialized (Data_t &data, size_t pid, MPI_Comm comm) |
void | MPI_Send_params (Param_t params, size_t pid, MPI_Comm comm) |
std::pair< size_t *, char * > | MPI_ISend_params (Param_t params, size_t pid, MPI_Comm comm, MPI_Request *req) |
void | MPI_Recv_params (Param_t ¶ms, size_t pid, MPI_Comm comm) |
void | MPI_Send_reqvars (reqVarContainer_t reqvars, size_t pid, MPI_Comm comm) |
void | MPI_Recv_reqvars (reqVarContainer_t &reqvars, size_t pid, MPI_Comm comm) |
#define MPI_COWORKER_NEW_JOB_TAG 0x14 |
notifies coworkers about new jobs
Definition at line 20 of file MPIHelper.h.
Referenced by SampleWorker< Sim_t >::onMessage(), Worker< Sim_t >::onMessage(), Worker< Sim_t >::runCoWorker(), and SampleWorker< Sim_t >::runSlave().
#define MPI_EXCHANGE_SERIALIZED_DATA_TAG 0x99 |
tag for exchanging serialized data
Definition at line 47 of file MPIHelper.h.
Referenced by MPI_ISend_params(), MPI_Recv_params(), MPI_Recv_reqvars(), MPI_Recv_serialized(), MPI_Send_params(), MPI_Send_reqvars(), and MPI_Send_serialized().
#define MPI_EXCHANGE_SOL_STATE_DATA_TAG 0x52 |
Definition at line 39 of file MPIHelper.h.
Referenced by Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
#define MPI_EXCHANGE_SOL_STATE_RES_SIZE_TAG 0x53 |
Definition at line 40 of file MPIHelper.h.
Referenced by Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
#define MPI_EXCHANGE_SOL_STATE_RES_TAG 0x54 |
Definition at line 41 of file MPIHelper.h.
Referenced by Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
#define MPI_EXCHANGE_SOL_STATE_TAG 0x51 |
Definition at line 38 of file MPIHelper.h.
#define MPI_OPT_CONVERGED_TAG 0x23 |
optimizer notifies pilot that optimization has converged (EXIT)
Definition at line 28 of file MPIHelper.h.
Referenced by Sampler::runStateMachine().
#define MPI_OPT_JOB_FINISHED_TAG 0x22 |
pilot tells optimizer that results are ready to collect
Definition at line 26 of file MPIHelper.h.
Referenced by SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
#define MPI_OPT_NEW_JOB_TAG 0x21 |
optimizer sends new job to pilot
Definition at line 24 of file MPIHelper.h.
#define MPI_STOP_TAG 0x91 |
global stop tag to exit poll loop (
Definition at line 44 of file MPIHelper.h.
Referenced by Worker< Sim_t >::onStop(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::postPoll(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::postPoll(), Poller::run(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::run(), Worker< Sim_t >::runCoWorker(), SampleWorker< Sim_t >::runSlave(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::stop().
#define MPI_WORK_JOBID_TAG 0x41 |
unique id of the job
Definition at line 32 of file MPIHelper.h.
Referenced by SampleWorker< Sim_t >::onMessage(), Worker< Sim_t >::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker().
#define MPI_WORK_SIZE_PARAMS 0x43 |
tags messages containing the size of the parameter list (for simulation)
Definition at line 36 of file MPIHelper.h.
#define MPI_WORK_SIZE_TAG 0x42 |
tags messages containing the size of results (requested vars)
Definition at line 34 of file MPIHelper.h.
#define MPI_WORKER_FINISHED_ACK_TAG 0x13 |
pilot notifies worker that he is ready to collect the results
Definition at line 17 of file MPIHelper.h.
Referenced by SampleWorker< Sim_t >::onMessage(), Worker< Sim_t >::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
#define MPI_WORKER_FINISHED_TAG 0x12 |
notify pilot that work has been finished and results are ready to collect
Definition at line 15 of file MPIHelper.h.
Referenced by SampleWorker< Sim_t >::onMessage(), and Worker< Sim_t >::onMessage().
#define MPI_WORKER_STATUSUPDATE_TAG 0x11 |
notify pilot about worker status
Definition at line 13 of file MPIHelper.h.
Referenced by Worker< Sim_t >::setupPoll().
enum MPITag_t |
Enumerator | |
---|---|
WORKER_FINISHED_TAG | |
OPT_NEW_JOB_TAG | |
OPT_CONVERGED_TAG | |
WORKER_STATUSUPDATE_TAG | |
REQUEST_FINISHED | |
EXCHANGE_SOL_STATE_TAG | |
EXCHANGE_SOL_STATE_RES_SIZE_TAG |
Definition at line 51 of file MPIHelper.h.
enum State_t |
Worker state is either idle or running.
Enumerator | |
---|---|
IDLE | |
RUNNING |
Definition at line 62 of file MPIHelper.h.
void deserialize | ( | char * | buffer, |
Param_t & | params | ||
) |
deserializes params using Boost archive
Definition at line 23 of file MPIHelper.cpp.
Referenced by MPI_Bcast_params(), MPI_Recv_params(), MPI_Recv_reqvars(), and MPI_Recv_serialized().
void deserialize | ( | char * | buffer, |
reqVarContainer_t & | params | ||
) |
Definition at line 31 of file MPIHelper.cpp.
void MPI_Bcast_params | ( | Param_t & | params, |
size_t | root, | ||
MPI_Comm | comm | ||
) |
broadcast params to all entities in comm
Definition at line 39 of file MPIHelper.cpp.
References deserialize(), and serialize().
Referenced by SampleWorker< Sim_t >::onMessage(), Worker< Sim_t >::onMessage(), Worker< Sim_t >::runCoWorker(), and SampleWorker< Sim_t >::runSlave().
void MPI_Bcast_reqvars | ( | reqVarContainer_t | reqvars, |
size_t | root, | ||
MPI_Comm | comm | ||
) |
broadcast requested variables to all entities in comm
std::pair<size_t*, char*> MPI_ISend_params | ( | Param_t | params, |
size_t | pid, | ||
MPI_Comm | comm, | ||
MPI_Request * | req | ||
) |
Serializes a parameter list and asynchronously sends (MPI) to another processor. The memory associated with returned buffers must be freed by the consumer.
params | parameter list to serialize |
pid | processor ID to send data to |
comm | MPI communicator group used for sending the data |
req | MPI request assigned with the ISend |
Definition at line 84 of file MPIHelper.cpp.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().
void MPI_Recv_params | ( | Param_t & | params, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Receives and unpacks a parameter list from another (MPI) processor.
params | parameter list to store data |
pid | processor ID to receive data from |
comm | MPI communicator group used for receiving the data |
Definition at line 107 of file MPIHelper.cpp.
References deserialize(), and MPI_EXCHANGE_SERIALIZED_DATA_TAG.
Referenced by SampleWorker< Sim_t >::onMessage(), Worker< Sim_t >::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
void MPI_Recv_reqvars | ( | reqVarContainer_t & | reqvars, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Receives and unpacks a required variable list from another (MPI) processor.
reqvars | variable list to store data |
pid | processor ID to receive data from |
comm | MPI communicator group used for receiving the data |
Definition at line 144 of file MPIHelper.cpp.
References deserialize(), and MPI_EXCHANGE_SERIALIZED_DATA_TAG.
Referenced by Sampler::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
void MPI_Recv_serialized | ( | Data_t & | data, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Definition at line 100 of file MPIHelper.h.
References deserialize(), and MPI_EXCHANGE_SERIALIZED_DATA_TAG.
void MPI_Send_params | ( | Param_t | params, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Serializes a parameter list and sends (MPI) to another processor.
params | parameter list to serialize |
pid | processor ID to send data to |
comm | MPI communicator group used for sending the data |
Definition at line 66 of file MPIHelper.cpp.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().
Referenced by Sampler::dispatch_forward_solves(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker().
void MPI_Send_reqvars | ( | reqVarContainer_t | reqvars, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Serializes requested variable list and sends (MPI) to another processor.
reqvars | variable list list to serialize |
pid | processor ID to send data to |
comm | MPI communicator group used for sending the data |
Definition at line 125 of file MPIHelper.cpp.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().
Referenced by SampleWorker< Sim_t >::onMessage(), Worker< Sim_t >::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage().
void MPI_Send_serialized | ( | Data_t | data, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Definition at line 81 of file MPIHelper.h.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().
void serialize | ( | Param_t | params, |
std::ostringstream & | os | ||
) |
serializes params using Boost archive
Definition at line 11 of file MPIHelper.cpp.
Referenced by AmrMultiGridLevel< MatrixType, VectorType >::buildMap(), AmrMultiGrid::buildRestrictionMatrix_m(), MPI_Bcast_params(), MPI_ISend_params(), MPI_Send_params(), MPI_Send_reqvars(), and MPI_Send_serialized().
void serialize | ( | reqVarContainer_t | params, |
std::ostringstream & | os | ||
) |
Definition at line 17 of file MPIHelper.cpp.