SeapodymCourier class for managing memory exposure and data fetching between MPI processes.
More...
#include <SeapodymCourier.h>
|
| SeapodymCourier (MPI_Comm comm=MPI_COMM_WORLD) |
| Constructor.
|
|
| ~SeapodymCourier () |
| Destructor.
|
|
double * | getDataPtr () const |
| Get the pointer to the exposed data.
|
|
void | expose (double *data, int data_size) |
| Expose the memory to other processes.
|
|
void | fetch (int target_worker) |
| Fetch data from a remote process and store it in the local data array.
|
|
void | accumulate (const std::set< int > &source_workers, int target_worker) |
| Accumulate/sum the data from multiple source workers into a target worker's local data array.
|
|
void | free () |
| Free the MPI window and reset the data pointer.
|
|
| SeapodymCourier (const SeapodymCourier &)=delete |
|
SeapodymCourier & | operator= (const SeapodymCourier &)=delete |
|
| SeapodymCourier (SeapodymCourier &&other) noexcept |
|
SeapodymCourier & | operator= (SeapodymCourier &&other) noexcept |
|
SeapodymCourier class for managing memory exposure and data fetching between MPI processes.
This class allows workers to expose their memory to other processes and fetch data from them. It uses MPI windows for memory exposure and communication.
◆ SeapodymCourier()
SeapodymCourier::SeapodymCourier |
( |
MPI_Comm | comm = MPI_COMM_WORLD | ) |
|
Constructor.
- Parameters
-
comm | MPI communicator to use for communication |
◆ accumulate()
void SeapodymCourier::accumulate |
( |
const std::set< int > & | source_workers, |
|
|
int | target_worker ) |
Accumulate/sum the data from multiple source workers into a target worker's local data array.
- Parameters
-
source_workers | Set of ranks of source processes from which to fetch data |
target_worker | Rank of the target process from which to fetch data |
◆ expose()
void SeapodymCourier::expose |
( |
double * | data, |
|
|
int | data_size ) |
Expose the memory to other processes.
- Parameters
-
data | Pointer to the data to be exposed |
data_size | Number of elements in the data array |
◆ fetch()
void SeapodymCourier::fetch |
( |
int | target_worker | ) |
|
Fetch data from a remote process and store it in the local data array.
- Parameters
-
target_worker | Rank of the target process from which to fetch data |
◆ getDataPtr()
double * SeapodymCourier::getDataPtr |
( |
| ) |
const |
|
inline |
Get the pointer to the exposed data.
- Returns
- Pointer to the exposed data
The documentation for this class was generated from the following files: