Skip to content

Commit

Permalink
Merge pull request dftbplus#1345 from bhourahine/NO_OMP_MPI_testers
Browse files Browse the repository at this point in the history
Only set OMP env for MPI test on enabled build
  • Loading branch information
vanderhe authored Nov 10, 2023
2 parents 1442fdf + 65dcc59 commit 29fe352
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ option(TEST_WITH_VALGRIND "Whether valgrind should be invoked when testing binar
# Command line used to launch the test code.
# The escaped variables (\${VARIABLE}) will be substituted by the corresponding CMake variables.
if(WITH_MPI)
set(TEST_RUNNER_TEMPLATE "env OMP_NUM_THREADS=\${TEST_OMP_THREADS} mpiexec -n \${TEST_MPI_PROCS}"
CACHE STRING "How to run the tests")
if(WITH_OMP)
set(TEST_RUNNER_TEMPLATE "env OMP_NUM_THREADS=\${TEST_OMP_THREADS} mpiexec -n \${TEST_MPI_PROCS}"
CACHE STRING "How to run the tests")
else()
set(TEST_RUNNER_TEMPLATE "mpiexec -n \${TEST_MPI_PROCS}" CACHE STRING "How to run the tests")
endif()
elseif(TEST_WITH_VALGRIND)
set(VALGRIND_OPTIONS
"--exit-on-first-error=yes --error-exitcode=1 --leak-check=full --show-leak-kinds=definite,possible --errors-for-leak-kinds=definite,possible"
Expand Down

0 comments on commit 29fe352

Please sign in to comment.