Lunchbox
1.10.0
|
MPI functionality wrapper. More...
#include <mpi.h>
Public Member Functions | |
LUNCHBOX_API | MPI (int &argc, char **&argv) |
Construct an MPI handler with command line arguments. More... | |
LUNCHBOX_API | MPI () |
Construct a new MPI handler. More... | |
LUNCHBOX_API | ~MPI () |
Destruct this handler instance. More... | |
LUNCHBOX_API bool | supportsThreads () const |
LUNCHBOX_API int | getRank () const |
LUNCHBOX_API int | getSize () const |
LUNCHBOX_API 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. Initialized 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_API lunchbox::MPI::MPI | ( | ) |
LUNCHBOX_API lunchbox::MPI::~MPI | ( | ) |
Destruct this handler instance.
Calls MPI_Finalize if it is the last copy of an instance which has initialized MPI.
LUNCHBOX_API int lunchbox::MPI::getRank | ( | ) | const |
LUNCHBOX_API int lunchbox::MPI::getSize | ( | ) | const |