PSCF v1.1
|
Identifies whether this processor may do file I/O. More...
#include <MpiFileIo.h>
Public Member Functions | |
MpiFileIo () | |
Constructor. More... | |
MpiFileIo (const MpiFileIo &other) | |
Copy constructor. More... | |
bool | isIoProcessor () const |
Can this processor do file I/O ? More... | |
void | setIoCommunicator (MPI::Intracomm &communicator) |
Set the communicator. More... | |
void | clearCommunicator () |
Clear (nullify) the communicator. More... | |
bool | hasIoCommunicator () const |
Does this object have an associated MPI communicator? More... | |
MPI::Intracomm & | ioCommunicator () const |
Get the MPI communicator by reference. More... | |
Identifies whether this processor may do file I/O.
The return value of isIoProcessor() indicates whether this processor can read and write to file. If the the class is compiled with UTIL_MPI not defined, then isIoProcessor() always returns true. If the class is compiled with UTIL_MPI defined, then this method returns true if either: (1) A communicator has been set and this processor has rank 0 within that communicator, or (2) No communicator has been set.
When compiled with UTIL_MPI defined, an MpiFileIo object has a pointer to an MPI communiciator, and provides methods to set and unset (nullify) the associated communicator.
Definition at line 33 of file MpiFileIo.h.
Util::MpiFileIo::MpiFileIo | ( | ) |
Constructor.
Definition at line 18 of file MpiFileIo.cpp.
Util::MpiFileIo::MpiFileIo | ( | const MpiFileIo & | other | ) |
Copy constructor.
Definition at line 28 of file MpiFileIo.cpp.
|
inline |
Can this processor do file I/O ?
Definition at line 92 of file MpiFileIo.h.
Referenced by Util::ParamComposite::load(), Util::Parameter::load(), Util::ParamComposite::loadOptional(), Util::Begin::readParam(), Util::Blank::readParam(), Util::End::readParam(), and Util::Parameter::readParam().
void Util::MpiFileIo::setIoCommunicator | ( | MPI::Intracomm & | communicator | ) |
Set the communicator.
Definition at line 36 of file MpiFileIo.cpp.
Referenced by Util::ParamComposite::setParent().
void Util::MpiFileIo::clearCommunicator | ( | ) |
Clear (nullify) the communicator.
Definition at line 46 of file MpiFileIo.cpp.
|
inline |
Does this object have an associated MPI communicator?
Definition at line 99 of file MpiFileIo.h.
Referenced by Util::Parameter::load(), Util::Factory< Data >::loadObject(), Util::ParamComposite::loadOptional(), Util::Factory< Data >::readObject(), Util::Begin::readParam(), Util::Parameter::readParam(), and Util::ParamComposite::setParent().
|
inline |
Get the MPI communicator by reference.
Definition at line 105 of file MpiFileIo.h.
Referenced by Util::Parameter::load(), Util::Factory< Data >::loadObject(), Util::ParamComposite::loadOptional(), Util::Factory< Data >::readObject(), Util::Begin::readParam(), Util::Parameter::readParam(), and Util::ParamComposite::setParent().