Loading...
Searching...
No Matches
Dune::FakeMPIHelper Class Reference

A fake mpi helper. More...

`#include <dune/common/parallel/mpihelper.hh>`

## Public Types

typedef No_Comm | MPICommunicator
| The type of the mpi communicator.

## Public Member Functions

int | rank () const
| return rank of process, i.e. zero
int | size () const
| return rank of process, i.e. one

## Static Public Member Functions

static DUNE_EXPORT MPICommunicator | getCommunicator ()
| get the default communicator
static MPICommunicator | getLocalCommunicator ()
| get a local communicator
static Communication< MPICommunicator > | getCommunication ()
static DUNE_EXPORT FakeMPIHelper & | instance (int argc, char **argv)
| Get the singleton instance of the helper.
static DUNE_EXPORT FakeMPIHelper & | instance ()

## Static Public Attributes

static constexpr bool | isFake = true
| Are we fake (i.e. pretend to have MPI support but are compiled without.).

## Detailed Description

A fake mpi helper.

This helper can be used if no MPI is available or one wants to run sequentially even if MPI is available and used.

## Member Typedef Documentation

## MPICommunicator

typedef No_Comm Dune::FakeMPIHelper::MPICommunicator

The type of the mpi communicator.

## Member Function Documentation

## getCommunication()

Communication< MPICommunicator > Dune::FakeMPIHelper::getCommunication | ( |  | ) |

inline static

## getCommunicator()

DUNE_EXPORT MPICommunicator Dune::FakeMPIHelper::getCommunicator | ( |  | ) |

inline static

get the default communicator

Return a communicator to exchange data with all processes

Returns
  a fake communicator

## getLocalCommunicator()

MPICommunicator Dune::FakeMPIHelper::getLocalCommunicator | ( |  | ) |

inline static

get a local communicator

Returns a communicator to communicate with the local process only

Returns
  a fake communicator

## instance() [1/2]

DUNE_EXPORT FakeMPIHelper & Dune::FakeMPIHelper::instance | ( |  | ) |

inline static

## instance() [2/2]

DUNE_EXPORT FakeMPIHelper & Dune::FakeMPIHelper::instance | ( | int | argc,
|  | char ** | argv )

inline static

Get the singleton instance of the helper.

This method has to be called with the same arguments that the main method of the program was called:

int main(int argc, char** argv){
MPIHelper::instance(argc, argv);
// program code comes here
...
}
main
int main(int argc, char **argv)
Definition mpi_collective_benchmark.cc:297
Dune::MPIHelper::instance
static DUNE_EXPORT MPIHelper & instance(int &argc, char **&argv)
Get the singleton instance of the helper.
Definition mpihelper.hh:228

Parameters

  argc | The number of arguments provided to main.
  argv | The arguments provided to main.

## rank()

int Dune::FakeMPIHelper::rank | ( |  | ) | const

inline

return rank of process, i.e. zero

## size()

int Dune::FakeMPIHelper::size | ( |  | ) | const

inline

return rank of process, i.e. one

## Member Data Documentation

## isFake

bool Dune::FakeMPIHelper::isFake = true

static constexpr

Are we fake (i.e. pretend to have MPI support but are compiled without.).

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

- mpihelper.hh