Skip to content

Commit

Permalink
Attempt to fix issue with openmpi-5 and --help command to detect over…
Browse files Browse the repository at this point in the history
…subscribe command line option support.
  • Loading branch information
Algiane committed Dec 6, 2023
1 parent 64ed253 commit d978f6c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,11 @@ MESSAGE( STATUS "Compilation with mpi" )
SET( LIBRARIES ${MPI_C_LIBRARIES} ${LIBRARIES} )
SET( LIBRARIES ${MPI_CXX_LIBRARIES} ${LIBRARIES} )

EXECUTE_PROCESS ( COMMAND ${MPIEXEC} --help mapping
EXECUTE_PROCESS ( COMMAND ${MPIEXEC} --oversubscribe sleep 1
RESULT_VARIABLE CMD_ERROR
OUTPUT_VARIABLE CMD_OUTPUT )

STRING(REGEX REPLACE "\"" " " CMD_OUT "${CMD_OUTPUT}")

IF ( "${CMD_OUT}" MATCHES "oversubscribe" )
IF ( "${CMD_ERROR}" MATCHES "0" )
SET ( MPI_ARGS "-oversubscribe" )
ENDIF()

Expand Down

0 comments on commit d978f6c

Please sign in to comment.