Skip to content

Commit

Permalink
Merge pull request #2425 from paulromano/cmake-mpi-message
Browse files Browse the repository at this point in the history
Improve error message when parallel HDF5 is found but MPI not enabled
  • Loading branch information
gridley authored Mar 16, 2023
2 parents e24aa7b + a23a6c5 commit 691f44f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 691f44f

Please sign in to comment.