summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff.c11
-rw-r--r--tools/src/h5diff/ph5diff_main.c3
-rw-r--r--tools/test/h5dump/CMakeVFDTests.cmake45
-rw-r--r--tools/test/h5dump/h5dumpgentest.c2
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5bin0 -> 211 bytes
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile.config2
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_1_of_2bin0 -> 22497827 bytes
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_2_of_2bin0 -> 22495773 bytes
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5bin0 -> 96 bytes
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile.config2
-rw-r--r--tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile_1_of_1bin0 -> 889 bytes
11 files changed, 57 insertions, 8 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 15f2a14..bdbda6e 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -116,7 +116,7 @@ print_incoming_data(void)
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD, &Status);
- printf("%s", data);
+ parallel_print("%s", data);
}
} while (incomingMessage);
}
@@ -1247,7 +1247,8 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
/*Set up args to pass to worker task. */
if (strlen(obj1_fullpath) > 255 || strlen(obj2_fullpath) > 255) {
- printf("The parallel diff only supports object names up to 255 characters\n");
+ fprintf(stderr,
+ "The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -1392,7 +1393,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
MPI_COMM_WORLD);
} /* end else-if */
else {
- printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
+ fprintf(stderr, "ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
MPI_Finalize();
} /* end else */
@@ -1477,10 +1478,10 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD, &Status);
- printf("%s", data);
+ parallel_print("%s", data);
} /* end else-if */
else {
- printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
+ fprintf(stderr, "ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end else */
} /* end while */
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index f90bd48..98e0c1d 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -85,8 +85,9 @@ main(int argc, char *argv[])
MPI_Barrier(MPI_COMM_WORLD);
- print_info(&opts);
print_manager_output();
+
+ print_info(&opts);
}
/* All other tasks become workers and wait for assignments. */
else {
diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake
index 0118725..433eced 100644
--- a/tools/test/h5dump/CMakeVFDTests.cmake
+++ b/tools/test/h5dump/CMakeVFDTests.cmake
@@ -24,7 +24,42 @@ set (HDF5_VFD_H5DUMP_FILES
packedbits
)
+set (HDF5_SF_VFD_H5DUMP_FILES
+ test_subfiling_stripe_sizes.h5
+)
+
+set (HDF5_SF2_VFD_H5DUMP_FILES
+ test_subfiling_precreate_rank_0.h5
+)
+
foreach (vfdtest ${VFD_LIST})
+ if (vfdtest STREQUAL "subfiling")
+ foreach (h5_tfile ${HDF5_SF_VFD_H5DUMP_FILES})
+ file(COPY "${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" DESTINATION "${PROJECT_BINARY_DIR}/${vfdtest}")
+ execute_process(
+ COMMAND ls -i ${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}
+ OUTPUT_VARIABLE OUTPUT_VALUE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ string(REGEX MATCH "^ *([0-9]+) *" INODE_VALUE "${OUTPUT_VALUE}")
+ string(STRIP ${INODE_VALUE} INODE_STR)
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile_1_of_1" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}_1_of_1" "HDF5_SF_VFD_H5DUMP_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile.config" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}.config" "HDF5_SF_VFD_H5DUMP_files")
+ endforeach ()
+ foreach (h5_tfile ${HDF5_SF2_VFD_H5DUMP_FILES})
+ file(COPY "${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" DESTINATION "${PROJECT_BINARY_DIR}/${vfdtest}")
+ execute_process(
+ COMMAND ls -i ${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}
+ OUTPUT_VARIABLE OUTPUT_VALUE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ string(REGEX MATCH "^ *([0-9]+) *" INODE_VALUE "${OUTPUT_VALUE}")
+ string(STRIP ${INODE_VALUE} INODE_STR)
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile_1_of_2" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}_1_of_2" "HDF5_SF2_VFD_H5DUMP_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile_2_of_2" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}_2_of_2" "HDF5_SF2_VFD_H5DUMP_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile.config" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}.config" "HDF5_SF2_VFD_H5DUMP_files")
+ endforeach ()
+ endif ()
foreach (h5_tfile ${HDF5_VFD_H5DUMP_FILES})
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tfile}.ddl" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.ddl" "HDF5_VFD_H5DUMP_files")
@@ -32,6 +67,8 @@ foreach (vfdtest ${VFD_LIST})
endforeach ()
add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_VFD_H5DUMP tests" DEPENDS ${HDF5_VFD_H5DUMP_files_list})
+add_custom_target(HDF5_SF_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_SF_VFD_H5DUMP tests" DEPENDS ${HDF5_SF_VFD_H5DUMP_files_list})
+add_custom_target(HDF5_SF2_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_SF2_VFD_H5DUMP tests" DEPENDS ${HDF5_SF2_VFD_H5DUMP_files_list})
##############################################################################
##############################################################################
@@ -69,6 +106,12 @@ endmacro ()
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
- # test for signed/unsigned datasets
+ if (vfd STREQUAL "subfiling")
+ ADD_VFD_H5DUMP_TEST (${vfd} filedriver_subfiling 0 --enable-error-stack=2 --filedriver=subfiling test_subfiling_stripe_sizes.h5)
+ ADD_VFD_H5DUMP_TEST (${vfd} vfd_name_subfiling 0 --enable-error-stack=2 --vfd-name=subfiling test_subfiling_stripe_sizes.h5)
+ ADD_VFD_H5DUMP_TEST (${vfd} vfd_value_subfiling 0 --enable-error-stack=2 --vfd-value=12 test_subfiling_stripe_sizes.h5)
+ ADD_VFD_H5DUMP_TEST (${vfd} vfd_value_subfiling_2 0 --enable-error-stack=2 --vfd-value=12 -d DSET -s 0 -S 100 -c 10 test_subfiling_precreate_rank_0.h5)
+ endif ()
+ # test for signed/unsigned datasets
ADD_VFD_H5DUMP_TEST (${vfd} packedbits 0 --enable-error-stack packedbits.h5)
endforeach ()
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index aed3eda..e12690c 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -3884,7 +3884,7 @@ gent_multi(void)
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ snprintf(sv[mt], 1024, "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
/*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
diff --git a/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5 b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5
new file mode 100644
index 0000000..92abb78
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5
Binary files differ
diff --git a/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile.config b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile.config
new file mode 100644
index 0000000..fb73927
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile.config
@@ -0,0 +1,2 @@
+stripe_size=22495773
+subfile_count=2
diff --git a/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_1_of_2 b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_1_of_2
new file mode 100644
index 0000000..0f7d317
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_1_of_2
Binary files differ
diff --git a/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_2_of_2 b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_2_of_2
new file mode 100644
index 0000000..fc78f6a
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_precreate_rank_0.h5.subfile_2_of_2
Binary files differ
diff --git a/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5 b/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5
new file mode 100644
index 0000000..d040215
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5
Binary files differ
diff --git a/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile.config b/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile.config
new file mode 100644
index 0000000..8b8b597
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile.config
@@ -0,0 +1,2 @@
+stripe_size=12149997
+subfile_count=1
diff --git a/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile_1_of_1 b/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile_1_of_1
new file mode 100644
index 0000000..ba79d7c
--- /dev/null
+++ b/tools/test/h5dump/testfiles/test_subfiling_stripe_sizes.h5.subfile_1_of_1
Binary files differ