Skip to content

Commit

Permalink
remove configure_mpiexec from cmake (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxThevenet authored Mar 16, 2021
1 parent e940aca commit 56e3ae2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ if(BUILD_TESTING)

else()

configure_mpiexec(1) # one rank in MPI_TEST_EXE
add_test(NAME blowout_wake.2Rank
COMMAND ${HiPACE_SOURCE_DIR}/tests/blowout_wake.2Rank.sh
$<TARGET_FILE:HiPACE> ${HiPACE_SOURCE_DIR}
Expand Down Expand Up @@ -293,14 +292,6 @@ if(BUILD_TESTING)
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
)

# This test is temporarily removed, due to bugs in the parallelization
# configure_mpiexec(2) # two ranks in MPI_TEST_EXE
# add_test(NAME blowout_wake.2Rank
# COMMAND ${HiPACE_SOURCE_DIR}/tests/blowout_wake.2Rank.sh
# $<TARGET_FILE:HiPACE> ${HiPACE_SOURCE_DIR}
# WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
#)

endif()
endif()

Expand Down
25 changes: 0 additions & 25 deletions cmake/HiPACEFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,31 +167,6 @@ function(set_hipace_binary_name)
endfunction()


# Set an MPI_TEST_EXE variable for test runs which runs num_ranks
# ranks. On some systems, you might need to use the a specific
# mpiexec wrapper, e.g. on Summit (ORNL) pass the hint
# -DMPIEXEC_EXECUTABLE=$(which jsrun) to run ctest.
#
function(configure_mpiexec num_ranks)
# OpenMPI root guard: https://github.com/open-mpi/ompi/issues/4451
if("$ENV{USER}" STREQUAL "root")
# calling even --help as root will abort and warn on stderr
execute_process(COMMAND ${MPIEXEC_EXECUTABLE} --help
ERROR_VARIABLE MPIEXEC_HELP_TEXT
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${MPIEXEC_HELP_TEXT} MATCHES "^.*allow-run-as-root.*$")
set(MPI_ALLOW_ROOT --allow-run-as-root)
endif()
endif()
set(MPI_TEST_EXE
${MPIEXEC_EXECUTABLE}
${MPI_ALLOW_ROOT}
${MPIEXEC_NUMPROC_FLAG} ${num_ranks}
PARENT_SCOPE
)
endfunction()


# Prints a summary of HiPACE options at the end of the CMake configuration
#
function(hipace_print_summary)
Expand Down

0 comments on commit 56e3ae2

Please sign in to comment.