Merge pull request #2425 from paulromano/cmake-mpi-message

Improve error message when parallel HDF5 is found but MPI not enabled
This commit is contained in:
Gavin Ridley 2023-03-16 16:34:39 -04:00 committed by GitHub
commit 691f44f410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,9 +156,9 @@ endif()
find_package(HDF5 REQUIRED COMPONENTS C HL)
if(HDF5_IS_PARALLEL)
if(NOT OPENMC_USE_MPI)
message(FATAL_ERROR "Parallel HDF5 was detected, but the detected compiler,\
${CMAKE_CXX_COMPILER}, does not support MPI. An MPI-capable compiler must \
be used with parallel HDF5.")
message(FATAL_ERROR "Parallel HDF5 was detected, but MPI was not enabled.\
To use parallel HDF5, OpenMC needs to be built with MPI support by passing\
-DOPENMC_USE_MPI=ON when calling cmake.")
endif()
message(STATUS "Using parallel HDF5")
endif()