OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
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 40 of file MPIHelper.h.
#define MPI_EXCHANGE_SERIALIZED_DATA_TAG 0x99 |
tag for exchanging serialized data
Definition at line 67 of file MPIHelper.h.
#define MPI_EXCHANGE_SOL_STATE_DATA_TAG 0x52 |
Definition at line 59 of file MPIHelper.h.
#define MPI_EXCHANGE_SOL_STATE_RES_SIZE_TAG 0x53 |
Definition at line 60 of file MPIHelper.h.
#define MPI_EXCHANGE_SOL_STATE_RES_TAG 0x54 |
Definition at line 61 of file MPIHelper.h.
#define MPI_EXCHANGE_SOL_STATE_TAG 0x51 |
Definition at line 58 of file MPIHelper.h.
#define MPI_OPT_CONVERGED_TAG 0x23 |
optimizer notifies pilot that optimization has converged (EXIT)
Definition at line 48 of file MPIHelper.h.
#define MPI_OPT_JOB_FINISHED_TAG 0x22 |
pilot tells optimizer that results are ready to collect
Definition at line 46 of file MPIHelper.h.
#define MPI_OPT_NEW_JOB_TAG 0x21 |
optimizer sends new job to pilot
Definition at line 44 of file MPIHelper.h.
#define MPI_STOP_TAG 0x91 |
#define MPI_WORK_JOBID_TAG 0x41 |
unique id of the job
Definition at line 52 of file MPIHelper.h.
#define MPI_WORK_SIZE_PARAMS 0x43 |
tags messages containing the size of the parameter list (for simulation)
Definition at line 56 of file MPIHelper.h.
#define MPI_WORK_SIZE_TAG 0x42 |
tags messages containing the size of results (requested vars)
Definition at line 54 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 37 of file MPIHelper.h.
#define MPI_WORKER_FINISHED_TAG 0x12 |
notify pilot that work has been finished and results are ready to collect
Definition at line 35 of file MPIHelper.h.
#define MPI_WORKER_STATUSUPDATE_TAG 0x11 |
notify pilot about worker status
Definition at line 33 of file MPIHelper.h.
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 71 of file MPIHelper.h.
enum State_t |
Worker state is either idle or running.
Enumerator | |
---|---|
IDLE | |
RUNNING |
Definition at line 82 of file MPIHelper.h.
void deserialize | ( | char * | buffer, |
Param_t & | params | ||
) |
deserializes params using Boost archive
Definition at line 44 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 52 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 60 of file MPIHelper.cpp.
References deserialize(), and serialize().
Referenced by Worker< Sim_t >::onMessage(), SampleWorker< 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 105 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 128 of file MPIHelper.cpp.
References deserialize(), and MPI_EXCHANGE_SERIALIZED_DATA_TAG.
Referenced by Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), Worker< Sim_t >::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and SampleWorker< Sim_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 165 of file MPIHelper.cpp.
References deserialize(), and MPI_EXCHANGE_SERIALIZED_DATA_TAG.
Referenced by Sampler::onMessage(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and SamplePilot< 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 120 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 87 of file MPIHelper.cpp.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().
Referenced by Sampler::dispatch_forward_solves(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker(), and SamplePilot< 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 146 of file MPIHelper.cpp.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().
Referenced by Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), Worker< Sim_t >::onMessage(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and SampleWorker< Sim_t >::onMessage().
void MPI_Send_serialized | ( | Data_t | data, |
size_t | pid, | ||
MPI_Comm | comm | ||
) |
Definition at line 101 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 32 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 38 of file MPIHelper.cpp.