|
Lunchbox
1.13.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
|
MPI functionality wrapper. More...
#include <mpi.h>
Collaboration diagram for lunchbox::MPI:Public Member Functions | |
| MPI (int argc, char **argv) | |
| Construct an MPI handler with command line arguments. More... | |
| MPI () | |
| Construct a new MPI handler. More... | |
| ~MPI () | |
| Destruct this handler instance. More... | |
| bool | supportsThreads () const |
| int | getRank () const |
| int | getSize () const |
| lunchbox::MPI::MPI | ( | int | argc, |
| char ** | argv | ||
| ) |
Construct an MPI handler with command line arguments.
Calls MPI_Init_thread requesting MPI_THREAD_MULTIPLE, unless MPI is already initialized. Will initialize the thread support to false depending on the obtained thread support. Will signal not to support threads if MPI was initialized externally.
NOTE: Be aware that MPI_THREAD_MULTIPLE is only lightly tested and likely still has some bugs. Please, refer the below links: https://www.open-mpi.org/faq/?category=supported-systems#thread-support https://www.open-mpi.org/doc/v1.4/man3/MPI_Init_thread.3.php
| lunchbox::MPI::MPI | ( | ) |
| lunchbox::MPI::~MPI | ( | ) |
Destruct this handler instance.
Calls MPI_Finalize if it is the last copy of an instance which has initialized MPI.
| int lunchbox::MPI::getRank | ( | ) | const |
| int lunchbox::MPI::getSize | ( | ) | const |