diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2023-08-22 16:03:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 16:03:04 (GMT) |
commit | f61522ec4d080c6a62285bd530b4851e03771014 (patch) | |
tree | 39e09b752933d5d4b6747563c0159146965e626d /tools | |
parent | a7c095d5befd0ab290aaa42a3195c4a386ebfa1d (diff) | |
download | hdf5-f61522ec4d080c6a62285bd530b4851e03771014.zip hdf5-f61522ec4d080c6a62285bd530b4851e03771014.tar.gz hdf5-f61522ec4d080c6a62285bd530b4851e03771014.tar.bz2 |
Fix ph5diff tests for MPIEXEC_MAX_NUMPROCS=1 (#3407)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/src/h5diff/ph5diff_main.c | 10 | ||||
-rw-r--r-- | tools/test/h5diff/CMakeTests.cmake | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index efac3cb..c5f97df 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -63,7 +63,7 @@ main(int argc, char *argv[]) MPI_Comm_size(MPI_COMM_WORLD, &g_nTasks); if (g_nTasks == 1) { - printf("Only 1 task available...doing serial diff\n"); + fprintf(stderr, "Only 1 task available...doing serial diff\n"); g_Parallel = 0; @@ -279,11 +279,13 @@ h5diff_exit(int status) phdiff_dismiss_workers(); MPI_Barrier(MPI_COMM_WORLD); } - MPI_Finalize(); - status = EXIT_SUCCESS; /* Reset exit status, since some mpiexec commands generate output on failure - status */ } + MPI_Finalize(); + + status = + EXIT_SUCCESS; /* Reset exit status, since some mpiexec commands generate output on failure status */ + h5tools_close(); /* Always exit(0), since MPI implementations do weird stuff when they diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 73d435f..b23f885 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -432,11 +432,13 @@ add_test ( NAME MPI_TEST_H5DIFF-${resultfile} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5diff${tgt_file_ext}>;${MPIEXEC_POSTFLAGS}" - -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE}" + -D "TEST_ARGS:STRING=${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5diff${tgt_file_ext}>;${MPIEXEC_POSTFLAGS};${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles" -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=0" + #-D "TEST_EXPECT=${resultcode}" + -D "TEST_EXPECT=0" # ph5diff currently always exits with a zero status code due to + # output from some MPI implementations from a non-zero exit code -D "TEST_REFERENCE=${resultfile}.txt" -D "TEST_APPEND=EXIT CODE:" -D "TEST_REF_APPEND=EXIT CODE: [0-9]" |