PSCF v1.1
Public Member Functions | List of all members
Util::MpiFileIo Class Reference

Identifies whether this processor may do file I/O. More...

#include <MpiFileIo.h>

Inheritance diagram for Util::MpiFileIo:
Util::ParamComponent Util::Begin Util::Blank Util::End Util::ParamComposite Util::Parameter Pscf::MixtureTmpl< Polymer, Solvent > Pscf::MixtureTmpl< Polymer< D >, Solvent< D > > Pscf::PolymerTmpl< Block< D > > Pscf::SweepTmpl< DArray< System::WField > > Pscf::SweepTmpl< BasisFieldState< D > > Pscf::Fd1d::Domain Pscf::Fd1d::Iterator Pscf::Fd1d::System Pscf::Homogeneous::Mixture Pscf::Homogeneous::Molecule Pscf::Interaction Pscf::MixtureTmpl< TP, TS > Pscf::PolymerTmpl< Block > Pscf::Pspc::Domain< D > Pscf::Pspc::Iterator< D > Pscf::Pspc::Mask< D > Pscf::Pspc::System< D > Pscf::Pspc::WFieldContainer< D > Pscf::Pspg::Domain< D > Pscf::Pspg::Iterator< D > Pscf::Pspg::System< D > Pscf::Pspg::WFieldContainer< D > Pscf::SolventDescriptor Pscf::SweepTmpl< State > Util::AutoCorr< Data, Product > Util::AutoCorrArray< Data, Product > Util::AutoCorrelation< Data, Product > Util::Average Util::Distribution Util::FileMaster Util::IntDistribution Util::Manager< Data > Util::MeanSqDispArray< Data > Util::Random Util::SymmTensorAverage Util::TensorAverage Util::ArrayParam< Type > Util::MatrixParam< Type > Util::ScalarParam< Type >

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MpiFileIo() [1/2]

Util::MpiFileIo::MpiFileIo ( )

Constructor.

Definition at line 18 of file MpiFileIo.cpp.

◆ MpiFileIo() [2/2]

Util::MpiFileIo::MpiFileIo ( const MpiFileIo other)

Copy constructor.

Definition at line 28 of file MpiFileIo.cpp.

Member Function Documentation

◆ isIoProcessor()

bool Util::MpiFileIo::isIoProcessor ( ) const
inline

◆ setIoCommunicator()

void Util::MpiFileIo::setIoCommunicator ( MPI::Intracomm &  communicator)

Set the communicator.

Definition at line 36 of file MpiFileIo.cpp.

Referenced by Util::ParamComposite::setParent().

◆ clearCommunicator()

void Util::MpiFileIo::clearCommunicator ( )

Clear (nullify) the communicator.

Definition at line 46 of file MpiFileIo.cpp.

◆ hasIoCommunicator()

bool Util::MpiFileIo::hasIoCommunicator ( ) const
inline

◆ ioCommunicator()

MPI::Intracomm & Util::MpiFileIo::ioCommunicator ( ) const
inline

The documentation for this class was generated from the following files: