pomerol  2.1
Data Structures | Typedefs | Enumerations | Functions
MPI tools

Data Structures

struct  pMPI::MPIWorker
 Abstraction of an MPI worker process. More...
 
struct  pMPI::MPIMaster
 Abstraction of an MPI master process. More...
 
struct  pMPI::ComputeWrap< PartType >
 Wrapper around a computable object that calls the compute() method of the wrapped object and carries information about the complexity of a call to that method. More...
 
struct  pMPI::PrepareWrap< PartType >
 Wrapper around a computable object that calls the prepare() method of the wrapped object and carries information about the complexity of a call to that method. More...
 
struct  pMPI::mpi_skel< WrapType >
 This structure carries a list of wrappers and uses the mpi_dispatcher mechanism to distribute the wrappers over MPI ranks and to call run() for all of them in parallel. More...
 

Typedefs

using pMPI::JobId = int
 ID of a job. More...
 
using pMPI::WorkerId = int
 ID of a worker process. More...
 

Enumerations

enum  pMPI::WorkerTag : int { pMPI::Pending, pMPI::Work, pMPI::Finish }
 MPI message tags used in communications between the master and its workers. More...
 

Functions

int pMPI::size (MPI_Comm const &Comm)
 
int pMPI::rank (MPI_Comm const &Comm)
 
std::map< pMPI::JobId, pMPI::WorkerIdpMPI::mpi_skel< WrapType >::run (MPI_Comm const &Comm, bool VerboseOutput=true)
 

Detailed Description

Typedef Documentation

◆ JobId

using pMPI::JobId = typedef int

ID of a job.

Definition at line 39 of file mpi_dispatcher.hpp.

◆ WorkerId

using pMPI::WorkerId = typedef int

ID of a worker process.

Definition at line 41 of file mpi_dispatcher.hpp.

Enumeration Type Documentation

◆ WorkerTag

enum pMPI::WorkerTag : int

MPI message tags used in communications between the master and its workers.

Enumerator
Pending 

A worker is waiting for a new job.

Work 

Request a worker to do a job.

Finish 

Order a worker to shut down.

Definition at line 32 of file mpi_dispatcher.hpp.

Function Documentation

◆ rank()

int pMPI::rank ( MPI_Comm const &  Comm)
inline

Return the rank of the calling process in a given MPI communicator.

Parameters
[in]CommMPI communicator.

Definition at line 36 of file misc.hpp.

◆ run()

template<typename WrapType >
std::map< pMPI::JobId, pMPI::WorkerId > pMPI::mpi_skel< WrapType >::run ( MPI_Comm const &  Comm,
bool  VerboseOutput = true 
)

Distribute the stored wrappers over MPI ranks according to their complexity and call run() for each of the wrappers.

Parameters
[in]CommMPI communicator.
[in]VerboseOutputPrint extra information about the parallelization process.
Returns
A mapping from job IDs to worker IDs assigned to perform the jobs.

Definition at line 85 of file mpi_skel.hpp.

◆ size()

int pMPI::size ( MPI_Comm const &  Comm)
inline

Return size of an MPI communicator.

Parameters
[in]CommMPI communicator.

Definition at line 28 of file misc.hpp.