Skip to content

Commit

Permalink
Add option to change number of ranks for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ckendrick committed Jan 4, 2024
1 parent cf993eb commit e842f59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

set(FCOMPARE_EXE ${CMAKE_BINARY_DIR}/Submodules/AMReX/Tools/Plotfile/amrex_fcompare CACHE INTERNAL "Path to fcompare executable for regression tests")
set(ERF_TEST_NRANKS 4 CACHE STRING "Number of MPI ranks to use for each test")
include(${CMAKE_CURRENT_SOURCE_DIR}/CTestList.cmake)
2 changes: 1 addition & 1 deletion Tests/CTestList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ macro(setup_test)
file(COPY ${TEST_FILES} DESTINATION "${CURRENT_TEST_BINARY_DIR}/")

if(ERF_ENABLE_MPI)
set(NP 4)
set(NP ${ERF_TEST_NRANKS})
set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NP} ${MPIEXEC_PREFLAGS}")
set(MPI_FCOMP_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 1 ${MPIEXEC_PREFLAGS}")
else()
Expand Down

0 comments on commit e842f59

Please sign in to comment.