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

[T] Added num processor info to MPI tests.

parent b5c1c3ae
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,9 @@ function (AddTest)
set(AddTest_WRAPPER_ARGS ${AddTest_WRAPPER_ARGS} --mca btl_openib_allow_ib 1)
endif()
set(WRAPPER_COMMAND ${MPIRUN_TOOL_PATH})
if("${AddTest_WRAPPER_ARGS}" MATCHES "-np;([0-9]*)")
set(MPI_PROCESSORS ${CMAKE_MATCH_1})
endif()
else()
message(STATUS "ERROR: mpirun was not found but is required for ${AddTest_NAME}!")
return()
......@@ -266,6 +269,9 @@ Use six arguments version of AddTest with absolute and relative tolerances")
endif()
set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT "PYTHONPATH=${PYTHONPATH}")
endif()
if(DEFINED MPI_PROCESSORS)
set_tests_properties(${TEST_NAME} PROPERTIES PROCESSORS ${MPI_PROCESSORS})
endif()
if(TARGET ${AddTest_EXECUTABLE})
add_dependencies(ctest ${AddTest_EXECUTABLE})
......
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