This library provides a small C++ wrapper for MPI libraries (like OpenMPI or MPICH).
- GCC 10.2.0 or higher; clang isn't supported until it implements the concepts library
- OpenMPI or MPICH supporting the MPI v3.1 standard
- CMake (minimum required 3.14.4)
- {fmt} formatting library
- doxygen (for documentation only, version 1.8.11 required)
This library supports the normal CMake
toolchain.
git clone [email protected]:arkantos493/MPICXX.git
cd MPICXX
mkdir build && cd build
cmake [options] ..
make -j
option | default value | description |
---|---|---|
CMAKE_BUILD_TYPE |
Release |
specifies the build type on single-configuration generators |
CMAKE_INSTALL_PREFIX |
/usr/local/include |
install directory used by make install |
MPICXX_ENABLE_TESTS |
Off |
use the googletest framework (automatically installed if this option is set to On ) to enable the make test target |
MPICXX_ENABLE_DEATH_TESTS |
Off |
enables gtest's death tests (currently not supported for MPI during its internal usage of fork() ); only used if MPICXX_ENABLE_TESTS is set to On |
MPICXX_GENERATE_DOCUMENTATION |
Off |
enables the documentation target make doc ; requires doxygen |
MPICXX_GENERATE_TEST_DOCUMENTATION |
Off |
additionally document test cases; only used if MPICXX_GENERATE_DOCUMENTATION is set to On |
MPICXX_ASSERTION_LEVEL |
0 |
sets the assertion level; emits a warning if used in Release mode;
|
MPICXX_ENABLE_STACK_TRACE |
On |
enable stack traces for the source location implementation |
DMPICXX_MAX_NUMBER_OF_ATFINALIZE_CALLBACKS |
32 |
sets the maximum number of atfinalize callback functions |
This library supports ctest
together with CMake
:
cmake -DMPICXX_ENABLE_TESTS=On ..
make -j
ctest
This library integrates doxygen within CMake
:
cmake -DMPICXX_GENERATE_DOCUMENTATION=On ..
make doc
To additionally generate documentation for the test cases:
cmake -DMPICXX_GENERATE_DOCUMENTATION=On -DMPICXX_GENERATE_TEST_DOCUMENTATION=On ..
make doc
This library supports the make install
target:
cmake -DCMAKE_BUILD_TYPE=Release ..
make install
For a debug build one should enable assertions:
cmake -DCMAKE_BUILD_TYPE=Debug -DMPICXX_ASSERTION_LEVEL=2 ..
make install
To then use this library simple add the following lines to your CMakeLists.txt
file:
# find the library
find_package(mpicxx CONFIG REQUIRED)
find_package(fmt REQUIRED)
# link it against your target
target_link_libraries(target PUBLIC mpicxx::mpicxx)
For usage examples see the doxygen documentation or the wiki.
This project is licensed under the MIT License - see the LICENSE.md file for details.