Skip to content
Snippets Groups Projects
Commit dc1a373a authored by Lars Bilke's avatar Lars Bilke
Browse files

[T] Fix mpirun in tests on frontend1.

parent c48bc084
No related branches found
No related tags found
No related merge requests found
......@@ -98,13 +98,16 @@ add_custom_target(tests-cleanup ${CMAKE_COMMAND} -E remove -f testrunner.xml)
set_target_properties(tests-cleanup PROPERTIES FOLDER Testing)
if(OGS_USE_PETSC)
if("${HOSTNAME}" STREQUAL "frontend1")
set(MPIRUN_ARGS --mca btl_openib_allow_ib 1)
endif()
set(TEST_FILTER_MPI --gtest_filter=-MPITest*)
add_custom_target(tests
mpirun -np 1 $<TARGET_FILE:testrunner> ${TESTRUNNER_ADDITIONAL_ARGUMENTS} ${TEST_FILTER_MPI}
mpirun ${MPIRUN_ARGS} -np 1 $<TARGET_FILE:testrunner> ${TESTRUNNER_ADDITIONAL_ARGUMENTS} ${TEST_FILTER_MPI}
DEPENDS testrunner tests-cleanup
)
add_custom_target(tests_mpi
mpirun -np 3 $<TARGET_FILE:testrunner> --gtest_filter=MPITest*
mpirun ${MPIRUN_ARGS} -np 3 $<TARGET_FILE:testrunner> --gtest_filter=MPITest*
DEPENDS testrunner
)
set_target_properties(tests_mpi PROPERTIES FOLDER Testing)
......
......@@ -104,6 +104,9 @@ function (AddTest)
endif()
elseif(AddTest_WRAPPER STREQUAL "mpirun")
if(MPIRUN_TOOL_PATH)
if("${HOSTNAME}" STREQUAL "frontend1")
set(AddTest_WRAPPER_ARGS ${AddTest_WRAPPER_ARGS} --mca btl_openib_allow_ib 1)
endif()
set(WRAPPER_COMMAND ${MPIRUN_TOOL_PATH})
else()
message(STATUS "ERROR: mpirun was not found but is required for ${AddTest_NAME}!")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment