Fixing minor bug in CMake with TEST_MAX_PROCS

This commit is contained in:
Mark Berrill
2021-11-03 12:27:11 -04:00
parent e3cb19f022
commit b9d46f2865
3 changed files with 4 additions and 3 deletions

View File

@@ -14,7 +14,6 @@ MESSAGE("====================")
SET( PROJ LBPM ) # Set the project name for CMake
SET( LBPM_LIB lbpm-wia ) # Set the final library name
SET( LBPM_INC ) # Set an optional subfolder for includes (e.g. include/name/...)
SET( TEST_MAX_PROCS 16 )
# Initialize the project

View File

@@ -263,7 +263,7 @@ ENDMACRO ()
# Macro to configure LBPM specific options
MACRO ( CONFIGURE_LBPM )
# Set the maximum number of processors for the tests
IF ( NOT TEST_MAX_PROCS )
IF ( NOT DEFINED TEST_MAX_PROCS )
SET( TEST_MAX_PROCS 32 )
ENDIF()
# Add the correct paths to rpath in case we build shared libraries

View File

@@ -102,8 +102,10 @@ ADD_LBPM_TEST( TestColorSquareTube ../example/Bubble/input.db)
#ADD_LBPM_TEST_1_2_4( TestColorSquareTube ../example/Bubble/input.db)
SET_TESTS_PROPERTIES( hello_world PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0")
IF ( USE_MPI )
IF ( USE_MPI AND TEST_MAX_PROCS GREATER 1 )
SET_TESTS_PROPERTIES( hello_world_2procs PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0")
ENDIF()
IF ( USE_MPI AND TEST_MAX_PROCS GREATER 3 )
SET_TESTS_PROPERTIES( hello_world_4procs PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0")
ENDIF()