IOBaton ensures that during I/O operations, only one rank will interact with a particular file at one time.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/sidre/spio/IOBaton.hpp>
IOBaton ensures that during I/O operations, only one rank will interact with a particular file at one time.
Each rank is placed into a set of ranks, with the number of sets being equal to the number of I/O files, and then the ranks use the wait and pass methods to pass control of I/O operations from one rank to the next within the set.
◆ IOBaton()
axom::sidre::IOBaton::IOBaton |
( |
MPI_Comm |
com, |
|
|
int |
num_files, |
|
|
int |
num_groups |
|
) |
| |
Constructor.
- Parameters
-
com | MPI communicator |
num_files | Number of files involved in an I/O operation |
num_groups | Number of groups stored in the files (usually equivalent to the number of MPI ranks providing data). |
◆ ~IOBaton()
axom::sidre::IOBaton::~IOBaton |
( |
| ) |
|
◆ wait()
int axom::sidre::IOBaton::wait |
( |
| ) |
|
Wait for previous rank to pass control to the local rank.
- Returns
- An integer id for the set of which this rank is a member.
◆ pass()
int axom::sidre::IOBaton::pass |
( |
| ) |
|
Pass control to the next rank.
- Returns
- 0 if sucessful, -1 if not.
◆ setSize()
int axom::sidre::IOBaton::setSize |
( |
| ) |
const |
|
inline |
Size of local rank's set.
- Returns
- Number of ranks in the set.
◆ isFirstInGroup()
bool axom::sidre::IOBaton::isFirstInGroup |
( |
| ) |
const |
|
inline |
Tells if the local rank is the first (lowest) in its set.
◆ isLastInGroup()
bool axom::sidre::IOBaton::isLastInGroup |
( |
| ) |
const |
|
inline |
Tells if the local rank is the last (highest) in its set.
◆ getNumFiles()
int axom::sidre::IOBaton::getNumFiles |
( |
| ) |
const |
|
inline |
Get the number of files involved in the I/O operation.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/sidre/spio/IOBaton.hpp