Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove configure_mpiexec from cmake #421

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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