diff options
author | Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> | 2021-08-19 21:45:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 21:45:43 (GMT) |
commit | de60f08b0df0abdcac1c6959b393a6862dadd4ce (patch) | |
tree | f135868bd774f408130baae721fbe2ffd65e9a04 | |
parent | 3600d33f10db1d520f360930c40bf99e282af101 (diff) | |
download | hdf5-de60f08b0df0abdcac1c6959b393a6862dadd4ce.zip hdf5-de60f08b0df0abdcac1c6959b393a6862dadd4ce.tar.gz hdf5-de60f08b0df0abdcac1c6959b393a6862dadd4ce.tar.bz2 |
CMake: (fix) ph5example test (#935)
Ensure that the used number of processes times an integer number
is equal to SPACE1_DIM1 and SPACE_DIM2. These variables are
equal to 24 and are defined in ph5example.c. If this is not the
case the ph5example test will fail.
-rw-r--r-- | examples/CMakeTests.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index b422078..70142c8 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -98,11 +98,14 @@ endif () ### Windows pops up a modal permission dialog on this test if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND NOT WIN32) + # Ensure that 24 is a multiple of the number of processes. + # The number 24 corresponds to SPACE1_DIM1 and SPACE1_DIM2 defined in ph5example.c + math(EXPR NUMPROCS "24 / ((24 + ${MPIEXEC_MAX_NUMPROCS} - 1) / ${MPIEXEC_MAX_NUMPROCS})") if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5example> ${MPIEXEC_POSTFLAGS}) + add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5example> ${MPIEXEC_POSTFLAGS}) else () add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5example>;${MPIEXEC_POSTFLAGS}" + -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5example>;${MPIEXEC_POSTFLAGS}" -D "TEST_ARGS:STRING=" -D "TEST_EXPECT=0" -D "TEST_OUTPUT=ph5example.out" |