Dakota  Version 6.16
Explore and Predict with Confidence
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
MPIManager Class Reference

Class MPIManager to manage Dakota's MPI world, which may be a subset of MPI_COMM_WORLD. More...

Public Member Functions

 MPIManager ()
 Default constructor; Dakota will not call MPI_Init.
 
 MPIManager (int &argc, char **&argv)
 Command-line constructor; parses MPI arguments during call to MPI_Init.
 
 MPIManager (MPI_Comm dakota_mpi_comm)
 Construct on specified MPI_Comm.
 
 ~MPIManager ()
 destructor: calls finalize if Dakota owns MPI
 
MPI_Comm dakota_mpi_comm () const
 get the MPI_Comm on which Dakota is running
 
int world_rank () const
 get the rank of this process in Dakota's MPI_Comm
 
int world_size () const
 get the size of the MPI_Comm on which Dakota is running
 
bool mpirun_flag () const
 true when Dakota is running in MPI mode
 

Static Public Member Functions

static bool detect_parallel_launch (int &argc, char **&argv)
 detect parallel launch of Dakota using mpirun/mpiexec/poe/etc. based on command line arguments and environment variables
 

Private Attributes

MPI_Comm dakotaMPIComm
 MPI_Comm on which DAKOTA is running.
 
int dakotaWorldRank
 rank in MPI_Comm in which DAKOTA is running
 
int dakotaWorldSize
 size of MPI_Comm in which DAKOTA is running
 
bool mpirunFlag
 flag for a parallel mpirun/yod launch
 
bool ownMPIFlag
 flag for ownership of MPI_Init/MPI_Finalize
 

Detailed Description

Class MPIManager to manage Dakota's MPI world, which may be a subset of MPI_COMM_WORLD.


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