diff options
author | 2022-01-27 15:35:22 -0800 | |
---|---|---|
committer | 2022-01-27 15:35:22 -0800 | |
commit | 72c9c98548d4a6b78810a88746612ad135300038 (patch) | |
tree | 7de6aa9229fe7da8177deb2a42392eacb3be4b18 /Source/Utils/MPIInitHelpers.H | |
parent | d839c70c7342c3b336ddc535a1b4ff909d30a23b (diff) | |
download | WarpX-72c9c98548d4a6b78810a88746612ad135300038.tar.gz WarpX-72c9c98548d4a6b78810a88746612ad135300038.tar.zst WarpX-72c9c98548d4a6b78810a88746612ad135300038.zip |
Fix: Move MPI Thread Level Check (#2786)
* Fix: Move MPI Thread Level Check
Move the MPI thread level check (requested vs. provided) into `InitData()`.
This is needed, since we will access the warning
logger, which itself needs to be accessed via a WarpX instance.
This is also cleaner than just moving this behind the constructor
in `main.cpp`, as we have less functions to call around the
`WarpX` object usage.
* Fix MPI=OFF
Diffstat (limited to 'Source/Utils/MPIInitHelpers.H')
-rw-r--r-- | Source/Utils/MPIInitHelpers.H | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Utils/MPIInitHelpers.H b/Source/Utils/MPIInitHelpers.H index 7147ee0e1..d0c2f8e1d 100644 --- a/Source/Utils/MPIInitHelpers.H +++ b/Source/Utils/MPIInitHelpers.H @@ -11,6 +11,13 @@ namespace utils { + /** Return the required MPI threading + * + * @return the MPI_THREAD_* level required for MPI_Init_thread + */ + int + warpx_mpi_thread_required (); + /** Initialize MPI * * @return pair(required, provided) of MPI thread level from MPI_Init_thread @@ -21,11 +28,9 @@ namespace utils /** Check if the requested MPI thread level is valid * * Prints warnings and notes otherwise. - * - * @param mpi_thread_levels pair(required, provided) of MPI thread level from MPI_Init_thread */ void - warpx_check_mpi_thread_level (std::pair< int, int > const mpi_thread_levels); + warpx_check_mpi_thread_level (); } // namespace utils |