LAMA
|
Singleton class to manage MPI Communicator. More...
#include <MPICommunicatorManager.hpp>
Public Member Functions | |
virtual CommunicatorPtr | getCommunicator (int &argc, char **&argv) |
Method that returns a communicator. | |
virtual | ~MPICommunicatorManager () |
Protected Attributes | |
std::string | mCommunicatorType |
type of communicator managed | |
Private Member Functions | |
LAMA_LOG_DECL_STATIC_LOGGER (logger) | |
MPICommunicatorManager () | |
Static Private Member Functions | |
static bool | init () |
create an instance that is added to communicator factory | |
Private Attributes | |
boost::shared_ptr< const MPICommunicator > | mCommInstance |
MPI communicator manager keeps a shared pointer to avoid multiple calls of MPI_Init and MPI_Finalize. | |
Static Private Attributes | |
static bool | __init = MPICommunicatorManager::init() |
used to force call of init() |
Singleton class to manage MPI Communicator.
Regarding MPI there is the restriction that after an MPI_FINALIZE another call of MPI_INIT is not allowed.
lama::MPICommunicatorManager::~MPICommunicatorManager | ( | ) | [virtual] |
References mCommInstance.
lama::MPICommunicatorManager::MPICommunicatorManager | ( | ) | [private] |
CommunicatorPtr lama::MPICommunicatorManager::getCommunicator | ( | int & | argc, |
char **& | argv | ||
) | [virtual] |
Method that returns a communicator.
[in,out] | argc | number of arguments |
[in,out] | argv | array of command line arguments |
Implements lama::CommunicatorManager.
References mCommInstance.
bool lama::MPICommunicatorManager::init | ( | ) | [static, private] |
create an instance that is added to communicator factory
References COMMUNICATOR_TYPE.
lama::MPICommunicatorManager::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |
Reimplemented from lama::CommunicatorManager.
bool lama::MPICommunicatorManager::__init = MPICommunicatorManager::init() [static, private] |
used to force call of init()
boost::shared_ptr<const MPICommunicator> lama::MPICommunicatorManager::mCommInstance [private] |
MPI communicator manager keeps a shared pointer to avoid multiple calls of MPI_Init and MPI_Finalize.
Referenced by getCommunicator(), and ~MPICommunicatorManager().
std::string lama::CommunicatorManager::mCommunicatorType [protected, inherited] |
type of communicator managed
Referenced by lama::CommunicatorManager::~CommunicatorManager().