moab
|
Multi-CPU information for parallel MOAB. More...
#include <ProcConfig.hpp>
Public Member Functions | |
ProcConfig (MPI_Comm proc_comm) | |
Constructor. | |
~ProcConfig () | |
unsigned | proc_rank () const |
Get the current processor number. | |
unsigned | proc_size () const |
Get the number of processors. | |
gs_data::crystal_data * | crystal_router (bool construct_if_missing=true) |
get a crystal router for this parallel job | |
MPI_Comm | proc_comm () const |
get/set the communicator for this proc config | |
void | proc_comm (MPI_Comm this_comm) |
void | proc_rank (unsigned r) |
set rank/size; USED FOR TESTING ONLY! | |
void | proc_size (unsigned s) |
Private Attributes | |
MPI_Comm | procComm |
MPI communicator set for this instance. | |
unsigned | procRank |
rank of this processor | |
unsigned | procSize |
number of processors | |
gs_data::crystal_data * | crystalData |
crystal router for this parallel job |
Multi-CPU information for parallel MOAB.
Definition at line 32 of file ProcConfig.hpp.
moab::ProcConfig::ProcConfig | ( | MPI_Comm | proc_comm | ) |
Constructor.
Definition at line 23 of file ProcConfig.cpp.
Definition at line 50 of file ProcConfig.cpp.
{ if (crystalData) { #ifdef USE_MPI crystalData->reset(); #endif delete crystalData; crystalData = 0; } }
gs_data::crystal_data * moab::ProcConfig::crystal_router | ( | bool | construct_if_missing = true | ) |
get a crystal router for this parallel job
Definition at line 39 of file ProcConfig.cpp.
{ #ifdef USE_MPI if (!crystalData && construct_if_missing) { crystalData = new gs_data::crystal_data(procComm); } #endif return crystalData; }
MPI_Comm moab::ProcConfig::proc_comm | ( | ) | const [inline] |
get/set the communicator for this proc config
Definition at line 51 of file ProcConfig.hpp.
{return procComm;}
void moab::ProcConfig::proc_comm | ( | MPI_Comm | this_comm | ) | [inline] |
Definition at line 52 of file ProcConfig.hpp.
{procComm = this_comm;}
unsigned moab::ProcConfig::proc_rank | ( | ) | const [inline] |
Get the current processor number.
Definition at line 40 of file ProcConfig.hpp.
{ return procRank; }
void moab::ProcConfig::proc_rank | ( | unsigned | r | ) | [inline] |
unsigned moab::ProcConfig::proc_size | ( | ) | const [inline] |
Get the number of processors.
Definition at line 44 of file ProcConfig.hpp.
{ return procSize; }
void moab::ProcConfig::proc_size | ( | unsigned | s | ) | [inline] |
Definition at line 56 of file ProcConfig.hpp.
{procSize = s;}
crystal router for this parallel job
Definition at line 70 of file ProcConfig.hpp.
MPI_Comm moab::ProcConfig::procComm [private] |
MPI communicator set for this instance.
Definition at line 61 of file ProcConfig.hpp.
unsigned moab::ProcConfig::procRank [private] |
rank of this processor
Definition at line 64 of file ProcConfig.hpp.
unsigned moab::ProcConfig::procSize [private] |
number of processors
Definition at line 67 of file ProcConfig.hpp.