|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <cstddef>#include <cstring>#include <iomanip>#include <limits>#include <string>#include "Util/MPIHelper.h"
Go to the source code of this file.
Functions | |
| void | serialize (Param_t params, std::ostringstream &os) |
| serializes params to a text stream, replaces boost::serialization | |
| void | serialize (reqVarContainer_t reqvars, std::ostringstream &os) |
| void | deserialize (const char *buffer, std::size_t buf_size, Param_t ¶ms) |
| void | deserialize (const char *buffer, std::size_t buf_size, reqVarContainer_t &reqvars) |
| void | MPI_Bcast_params (Param_t ¶ms, std::size_t root, MPI_Comm comm) |
| broadcast params to all entities in comm | |
| void | MPI_Send_params (Param_t params, std::size_t pid, MPI_Comm comm) |
| std::pair< std::size_t *, char * > | MPI_ISend_params (Param_t params, std::size_t pid, MPI_Comm comm, MPI_Request *req) |
| void | MPI_Recv_params (Param_t ¶ms, std::size_t pid, MPI_Comm comm) |
| void | MPI_Send_reqvars (reqVarContainer_t reqvars, std::size_t pid, MPI_Comm comm) |
| void | MPI_Recv_reqvars (reqVarContainer_t &reqvars, std::size_t pid, MPI_Comm comm) |
| void deserialize | ( | const char * | buffer, |
| std::size_t | buf_size, | ||
| Param_t & | params | ||
| ) |
deserializes params from an explicitly sized buffer (not null-terminated), replaces boost::serialization
Definition at line 68 of file MPIHelper.cpp.
Referenced by MPI_Bcast_params(), MPI_Recv_params(), MPI_Recv_reqvars(), and MPI_Recv_serialized().
| void deserialize | ( | const char * | buffer, |
| std::size_t | buf_size, | ||
| reqVarContainer_t & | reqvars | ||
| ) |
Definition at line 84 of file MPIHelper.cpp.
| void MPI_Bcast_params | ( | Param_t & | params, |
| std::size_t | root, | ||
| MPI_Comm | comm | ||
| ) |
broadcast params to all entities in comm
Definition at line 100 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().

| std::pair< std::size_t *, char * > MPI_ISend_params | ( | Param_t | params, |
| std::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 144 of file MPIHelper.cpp.
References MPI_EXCHANGE_SERIALIZED_DATA_TAG, and serialize().

| void MPI_Recv_params | ( | Param_t & | params, |
| std::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 166 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, |
| std::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 201 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_Send_params | ( | Param_t | params, |
| std::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 126 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, |
| std::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 183 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 serialize | ( | Param_t | params, |
| std::ostringstream & | os | ||
| ) |
serializes params to a text stream, replaces boost::serialization
Definition at line 46 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 | reqvars, |
| std::ostringstream & | os | ||
| ) |
Definition at line 57 of file MPIHelper.cpp.