Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
MPI environment setup. More...
#include <MPImanager.h>
Public Member Functions | |
MPIenv (int &argc, char **&argv, MPImanager *&_p) | |
bool | isMaster () const |
unsigned int | workerCount () const |
unsigned int | workerRank () const |
std::string | hostName () const |
Static Public Member Functions | |
static void | abort (int i) |
static void | finish (MPImanager *p) |
Private Attributes | |
unsigned int | size |
unsigned int | rank |
std::string | host |
MPI environment setup.
Provides basic node information: rank (0 is master, 1...size-1 are workers), hostname. Constructor creates the MPImanagers (Master or worker). This can be instantiated also in a single cpu situation, will return trivial values. The abort() function should always be used instead of exit().
MPIenv::MPIenv | ( | int & | argc, |
char **& | argv, | ||
MPImanager *& | _p | ||
) |
|
static |
|
static |
Referenced by SimRunner::run().
|
inline |
References rank.
Referenced by BinaryDataSaver::finish(), FileServices::init(), SimRunner::init_random_seed(), FileParser::read(), SimRunner::Replicate_LOOP(), SimRunner::run(), ParamManager::set_parameters(), and FileHandler::update().
|
inline |
|
inline |
References rank.
Referenced by BinaryDataSaver::finish(), FileServices::getFirstReplicateFileName(), and RAND::init().
|
private |
Referenced by hostName(), and MPIenv().
|
private |
Referenced by isMaster(), MPIenv(), and workerRank().
|
private |
Referenced by MPIenv(), and workerCount().