LAMA
lama::MPICommunicatorManager Class Reference

Singleton class to manage MPI Communicator. More...

#include <MPICommunicatorManager.hpp>

Inheritance diagram for lama::MPICommunicatorManager:

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()

Detailed Description

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.


Constructor & Destructor Documentation


Member Function Documentation

CommunicatorPtr lama::MPICommunicatorManager::getCommunicator ( int &  argc,
char **&  argv 
) [virtual]

Method that returns a communicator.

Parameters:
[in,out]argcnumber of arguments
[in,out]argvarray 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.


Field Documentation

used to force call of init()

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


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