summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-11-04 05:25:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-11-04 05:25:36 (GMT)
commitdeb75622ca18958ea729c7184c4bc5ea0e029280 (patch)
treeba23ac80c0fd9a4cde379ade2e9365deb0b40da6
parentdf7cf2a9d3409ce6dfbd28d80af35fa2512320ae (diff)
parent20ad15a1a8e9008103fe7d30401408eaa2aff6e5 (diff)
downloadhdf5-deb75622ca18958ea729c7184c4bc5ea0e029280.zip
hdf5-deb75622ca18958ea729c7184c4bc5ea0e029280.tar.gz
hdf5-deb75622ca18958ea729c7184c4bc5ea0e029280.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into stackable_vol
-rw-r--r--MANIFEST10
-rw-r--r--bin/batch/knl_H5detect.sl.in.cmake20
-rw-r--r--bin/batch/knl_ctestSP.sl28
-rw-r--r--bin/batch/sbatch_ctestSP.sl28
-rw-r--r--config/toolchain/crayle.cmake20
-rw-r--r--examples/h5_vol_external_log_native.c151
-rw-r--r--hl/src/CMakeLists.txt9
-rw-r--r--release_docs/RELEASE.txt52
-rw-r--r--src/CMakeLists.txt145
-rw-r--r--src/H5B2private.h3
-rw-r--r--src/H5B2public.h52
-rw-r--r--src/H5Bprivate.h1
-rw-r--r--src/H5Bpublic.h39
-rw-r--r--src/H5Dchunk.c4
-rw-r--r--src/H5FSprivate.h3
-rw-r--r--src/H5FSpublic.h52
-rw-r--r--src/H5Fpkg.h2
-rw-r--r--src/H5HFprivate.h3
-rw-r--r--src/H5HFpublic.h52
-rw-r--r--src/H5HGprivate.h3
-rw-r--r--src/H5HGpublic.h31
-rw-r--r--src/H5HLprivate.h3
-rw-r--r--src/H5HLpublic.h37
-rw-r--r--src/Makefile.am2
-rw-r--r--test/use.h2
-rw-r--r--test/use_append_chunk.c115
-rw-r--r--test/use_append_mchunks.c110
-rw-r--r--test/use_common.c142
-rw-r--r--tools/lib/CMakeLists.txt12
29 files changed, 529 insertions, 602 deletions
diff --git a/MANIFEST b/MANIFEST
index 6b22c76..f2c36a3 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -92,6 +92,9 @@
./bin/timekeeper _DO_NOT_DISTRIBUTE_
./bin/trace
./bin/yodconfigure
+./bin/batch/knl_ctestSP.sl
+./bin/batch/knl_H5detect.sl.in.cmake
+./bin/batch/sbatch_ctestSP.sl
./bin/pkgscrpts/h5rmflags _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeHDF5BinaryTarfiles.pl _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeInternalREADME.pl _DO_NOT_DISTRIBUTE_
@@ -496,7 +499,6 @@
./src/H5Bmodule.h
./src/H5Bpkg.h
./src/H5Bprivate.h
-./src/H5Bpublic.h
./src/H5B2.c
./src/H5B2cache.c
./src/H5B2dbg.c
@@ -507,7 +509,6 @@
./src/H5B2module.h
./src/H5B2pkg.h
./src/H5B2private.h
-./src/H5B2public.h
./src/H5B2stat.c
./src/H5B2test.c
./src/H5C.c
@@ -652,7 +653,6 @@
./src/H5FSmodule.h
./src/H5FSpkg.h
./src/H5FSprivate.h
-./src/H5FSpublic.h
./src/H5FSsection.c
./src/H5FSstat.c
./src/H5FStest.c
@@ -692,7 +692,6 @@
./src/H5HFmodule.h
./src/H5HFpkg.h
./src/H5HFprivate.h
-./src/H5HFpublic.h
./src/H5HFsection.c
./src/H5HFspace.c
./src/H5HFstat.c
@@ -704,7 +703,6 @@
./src/H5HGmodule.h
./src/H5HGpkg.h
./src/H5HGprivate.h
-./src/H5HGpublic.h
./src/H5HGquery.c
./src/H5HL.c
./src/H5HLcache.c
@@ -715,7 +713,6 @@
./src/H5HLpkg.h
./src/H5HLprfx.c
./src/H5HLprivate.h
-./src/H5HLpublic.h
./src/H5HP.c
./src/H5HPprivate.h
./src/H5I.c
@@ -3162,6 +3159,7 @@
./java/lib/ext/slf4j-simple-1.7.25.jar
# CMake-specific Files
+./config/toolchain/crayle.cmake
./config/toolchain/GCC.cmake
./config/toolchain/intel.cmake
diff --git a/bin/batch/knl_H5detect.sl.in.cmake b/bin/batch/knl_H5detect.sl.in.cmake
new file mode 100644
index 0000000..39a3ef3
--- /dev/null
+++ b/bin/batch/knl_H5detect.sl.in.cmake
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad
+#SBATCH --nodes=1
+#SBATCH -t 00:10:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+#SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=knl_h5detect
+
+
+# Inputs: Build directory, output file name, executable file name (username/email if available).
+PROGNAME=H5detect
+OUTPUT=H5Tinit.c
+
+CMD="@HDF5_BINARY_DIR@/bin/${PROGNAME} @HDF5_GENERATED_SOURCE_DIR@/${OUTPUT}"
+echo "Run $CMD"
+srun -n 1 $CMD
+echo "Done running $CMD"
+
diff --git a/bin/batch/knl_ctestSP.sl b/bin/batch/knl_ctestSP.sl
new file mode 100644
index 0000000..56da347
--- /dev/null
+++ b/bin/batch/knl_ctestSP.sl
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,flat
+#SBATCH --nodes=1
+#SBATCH -t 01:00:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+module load cmake
+module load craype-hugepages4M
+
+cd build
+CMD="ctest . -E TEST_PAR|H5DIFF|PERFORM -C Release -j 32 -T test"
+
+echo "Run $CMD. Test output will be in build/ctestS.out"
+$CMD >& ctestS.out
+echo "Done running $CMD"
+
+
+#run parallel tests except t_cache_image test
+CMD="ctest . -R TEST_PAR|PH5DIFF|PERFORM -E t_cache_image -C Release -T test"
+
+echo "Run $CMD. Test output will be in build/ctestP.out"
+$CMD >& ctestP.out
+echo "Done running $CMD"
+
diff --git a/bin/batch/sbatch_ctestSP.sl b/bin/batch/sbatch_ctestSP.sl
new file mode 100644
index 0000000..56da347
--- /dev/null
+++ b/bin/batch/sbatch_ctestSP.sl
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,flat
+#SBATCH --nodes=1
+#SBATCH -t 01:00:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+module load cmake
+module load craype-hugepages4M
+
+cd build
+CMD="ctest . -E TEST_PAR|H5DIFF|PERFORM -C Release -j 32 -T test"
+
+echo "Run $CMD. Test output will be in build/ctestS.out"
+$CMD >& ctestS.out
+echo "Done running $CMD"
+
+
+#run parallel tests except t_cache_image test
+CMD="ctest . -R TEST_PAR|PH5DIFF|PERFORM -E t_cache_image -C Release -T test"
+
+echo "Run $CMD. Test output will be in build/ctestP.out"
+$CMD >& ctestP.out
+echo "Done running $CMD"
+
diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake
new file mode 100644
index 0000000..a83147b
--- /dev/null
+++ b/config/toolchain/crayle.cmake
@@ -0,0 +1,20 @@
+# Uncomment the following to use cross-compiling
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_COMPILER_VENDOR "CrayLinuxEnvironment")
+
+set(CMAKE_C_COMPILER cc)
+set(CMAKE_Fortran_COMPILER ftn)
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
+
+# option to use pre-generated H5Tinit.c file
+set(HDF5_USE_PREGEN OFF)
+# directory where H5Tinit.c file will be found
+#set(HDF5_USE_PREGEN_DIR "/lscratch1/lknox/HDF5_1_10_4/CMake-hdf5-1.10.4")
+
+# option to generate H5Tinit.c by running H5detect on knl compute node during build
+set(HDF5_BATCH_H5DETECT ON)
+set(HDF5_BATCH_CMD "sbatch")
+set(HDF5_BATCH_H5DETECT_SCRIPT "knl_H5detect.sl")
+set(MPIEXEC_EXECUTABLE "srun")
diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c
index d84aa9e..a6ed2b5 100644
--- a/examples/h5_vol_external_log_native.c
+++ b/examples/h5_vol_external_log_native.c
@@ -58,63 +58,63 @@ static const H5VL_class_t H5VL_log_g = {
NULL, /* free_wrap_ctx */
NULL, /* wrap_object */
{ /* attribute_cls */
- NULL, //H5VL_log_attr_create, /* create */
- NULL, //H5VL_log_attr_open, /* open */
- NULL, //H5VL_log_attr_read, /* read */
- NULL, //H5VL_log_attr_write, /* write */
- NULL, //H5VL_log_attr_get, /* get */
- NULL, //H5VL_log_attr_specific, /* specific */
- NULL, //H5VL_log_attr_optional, /* optional */
- NULL //H5VL_log_attr_close /* close */
+ NULL, /* H5VL_log_attr_create, */ /* create */
+ NULL, /* H5VL_log_attr_open, */ /* open */
+ NULL, /* H5VL_log_attr_read, */ /* read */
+ NULL, /* H5VL_log_attr_write, */ /* write */
+ NULL, /* H5VL_log_attr_get, */ /* get */
+ NULL, /* H5VL_log_attr_specific, */ /* specific */
+ NULL, /* H5VL_log_attr_optional, */ /* optional */
+ NULL /* H5VL_log_attr_close */ /* close */
},
{ /* dataset_cls */
H5VL_log_dataset_create, /* create */
H5VL_log_dataset_open, /* open */
H5VL_log_dataset_read, /* read */
H5VL_log_dataset_write, /* write */
- NULL, //H5VL_log_dataset_get, /* get */
- NULL, //H5VL_log_dataset_specific, /* specific */
- NULL, //H5VL_log_dataset_optional, /* optional */
+ NULL, /* H5VL_log_dataset_get, */ /* get */
+ NULL, /* H5VL_log_dataset_specific, */ /* specific */
+ NULL, /* H5VL_log_dataset_optional, */ /* optional */
H5VL_log_dataset_close /* close */
},
{ /* datatype_cls */
H5VL_log_datatype_commit, /* commit */
H5VL_log_datatype_open, /* open */
H5VL_log_datatype_get, /* get_size */
- NULL, //H5VL_log_datatype_specific, /* specific */
- NULL, //H5VL_log_datatype_optional, /* optional */
+ NULL, /* H5VL_log_datatype_specific, */ /* specific */
+ NULL, /* H5VL_log_datatype_optional, */ /* optional */
H5VL_log_datatype_close /* close */
},
{ /* file_cls */
- H5VL_log_file_create, /* create */
- H5VL_log_file_open, /* open */
- H5VL_log_file_get, /* get */
- NULL, //H5VL_log_file_specific, /* specific */
- NULL, //H5VL_log_file_optional, /* optional */
- H5VL_log_file_close /* close */
+ H5VL_log_file_create, /* create */
+ H5VL_log_file_open, /* open */
+ H5VL_log_file_get, /* get */
+ NULL, /* H5VL_log_file_specific, */ /* specific */
+ NULL, /* H5VL_log_file_optional, */ /* optional */
+ H5VL_log_file_close /* close */
},
{ /* group_cls */
- H5VL_log_group_create, /* create */
- NULL, //H5VL_log_group_open, /* open */
- NULL, //H5VL_log_group_get, /* get */
- NULL, //H5VL_log_group_specific, /* specific */
- NULL, //H5VL_log_group_optional, /* optional */
- H5VL_log_group_close /* close */
+ H5VL_log_group_create, /* create */
+ NULL, /* H5VL_log_group_open, */ /* open */
+ NULL, /* H5VL_log_group_get, */ /* get */
+ NULL, /* H5VL_log_group_specific, */ /* specific */
+ NULL, /* H5VL_log_group_optional, */ /* optional */
+ H5VL_log_group_close /* close */
},
{ /* link_cls */
- NULL, //H5VL_log_link_create, /* create */
- NULL, //H5VL_log_link_copy, /* copy */
- NULL, //H5VL_log_link_move, /* move */
- NULL, //H5VL_log_link_get, /* get */
- NULL, //H5VL_log_link_specific, /* specific */
- NULL, //H5VL_log_link_optional, /* optional */
+ NULL, /* H5VL_log_link_create, */ /* create */
+ NULL, /* H5VL_log_link_copy, */ /* copy */
+ NULL, /* H5VL_log_link_move, */ /* move */
+ NULL, /* H5VL_log_link_get, */ /* get */
+ NULL, /* H5VL_log_link_specific, */ /* specific */
+ NULL /* H5VL_log_link_optional, */ /* optional */
},
{ /* object_cls */
- H5VL_log_object_open, /* open */
- NULL, //H5VL_log_object_copy, /* copy */
- NULL, //H5VL_log_object_get, /* get */
- H5VL_log_object_specific, /* specific */
- NULL, //H5VL_log_object_optional, /* optional */
+ H5VL_log_object_open, /* open */
+ NULL, /* H5VL_log_object_copy, */ /* copy */
+ NULL, /* H5VL_log_object_get, */ /* get */
+ H5VL_log_object_specific, /* specific */
+ NULL /* H5VL_log_object_optional, */ /* optional */
},
{ /* request_cls */
NULL, /* wait */
@@ -131,15 +131,14 @@ typedef struct H5VL_log_t {
} H5VL_log_t;
static herr_t
-visit_cb(hid_t oid, const char *name,
- const H5O_info_t *oinfo, void *udata)
+visit_cb(hid_t oid, const char *name, const H5O_info_t *oinfo, void *udata)
{
ssize_t len;
char n[25];
if(H5Iget_type(oid) == H5I_GROUP) {
len = H5VLget_plugin_name(oid, n, 50);
- printf ("Visiting GROUP VOL name = %s %zd\n", n, len);
+ printf("Visiting GROUP VOL name = %s %zd\n", n, len);
}
if(H5Iget_type(oid) == H5I_DATASET)
printf("visiting dataset\n");
@@ -147,9 +146,11 @@ visit_cb(hid_t oid, const char *name,
printf("visiting datatype\n");
return 1;
-} /* end h5_verify_cached_stabs_cb() */
+}
-int main(int argc, char **argv) {
+int
+main(int argc, char **argv)
+{
const char file_name[]="large_dataset.h5";
const char group_name[]="/Group";
const char dataset_name[]="Data";
@@ -191,33 +192,33 @@ int main(int argc, char **argv) {
file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
len = H5VLget_plugin_name(file_id, name, 25);
- printf ("FILE VOL name = %s %zd\n", name, len);
+ printf("FILE VOL name = %s %zd\n", name, len);
group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
len = H5VLget_plugin_name(group_id, name, 50);
- printf ("GROUP VOL name = %s %zd\n", name, len);
+ printf("GROUP VOL name = %s %zd\n", name, len);
int_id = H5Tcopy(H5T_NATIVE_INT);
H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
len = H5VLget_plugin_name(int_id, name, 50);
- printf ("DT COMMIT name = %s %zd\n", name, len);
+ printf("DT COMMIT name = %s %zd\n", name, len);
H5Tclose(int_id);
int_id = H5Topen2(file_id, "int", H5P_DEFAULT);
len = H5VLget_plugin_name(int_id, name, 50);
- printf ("DT OPEN name = %s %zd\n", name, len);
+ printf("DT OPEN name = %s %zd\n", name, len);
H5Tclose(int_id);
int_id = H5Oopen(file_id,"int",H5P_DEFAULT);
len = H5VLget_plugin_name(int_id, name, 50);
- printf ("DT OOPEN name = %s %zd\n", name, len);
+ printf("DT OOPEN name = %s %zd\n", name, len);
len = H5Fget_name(file_id, name, 50);
- printf("name = %zd %s\n", len, name);
+ printf("name = %lu %s\n", (unsigned long)len, name);
- data = malloc (sizeof(int)*nelem);
- for(i=0;i<nelem;++i)
- data[i]=i;
+ data = malloc(sizeof(int)*nelem);
+ for(i = 0; i < nelem; ++i)
+ data[i] = i;
dims [0] = 60;
dataspaceId = H5Screate_simple(1, dims, NULL);
@@ -228,14 +229,14 @@ int main(int argc, char **argv) {
H5Sclose(dataspaceId);
len = H5VLget_plugin_name(datasetId, name, 50);
- printf ("DSET name = %s %zd\n", name, len);
+ printf("DSET name = %s %zd\n", name, len);
H5Dwrite(datasetId, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
H5Dclose(datasetId);
H5Ovisit2(file_id, H5_INDEX_NAME, H5_ITER_NATIVE, visit_cb, NULL, H5O_INFO_ALL);
- free (data);
+ free(data);
H5Oclose(int_id);
H5Sclose (space);
H5Gclose(group_id);
@@ -246,19 +247,22 @@ int main(int argc, char **argv) {
H5VLclose(native_plugin_id);
H5VLunregister_plugin(vol_id);
assert(H5VLis_plugin_registered("log") == 0);
- return 0;
+
+ return EXIT_SUCCESS;
}
-static herr_t H5VL_log_init(hid_t vipl_id)
+static herr_t
+H5VL_log_init(hid_t vipl_id)
{
printf("------- LOG INIT\n");
- return 0;
+ return 1;
}
-static herr_t H5VL_log_term(void)
+static herr_t
+H5VL_log_term(void)
{
printf("------- LOG TERM\n");
- return 0;
+ return 1;
}
static void *
@@ -301,6 +305,7 @@ H5VL_log_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id, void **re
printf("------- LOG H5Fget %d\n", get_type);
return 1;
}
+
static herr_t
H5VL_log_file_close(void *file, hid_t dxpl_id, void **req)
{
@@ -355,6 +360,7 @@ H5VL_log_datatype_commit(void *obj, H5VL_loc_params_t loc_params, const char *na
printf("------- LOG H5Tcommit\n");
return dt;
}
+
static void *
H5VL_log_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req)
{
@@ -461,6 +467,7 @@ H5VL_log_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id,
printf("------- LOG H5Dread\n");
return 1;
}
+
static herr_t
H5VL_log_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id,
hid_t file_space_id, hid_t plist_id, const void *buf, void **req)
@@ -473,6 +480,7 @@ H5VL_log_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id,
printf("------- LOG H5Dwrite\n");
return 1;
}
+
static herr_t
H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req)
{
@@ -485,32 +493,3 @@ H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req)
return 1;
}
-#if 0
-static void *H5VL_log_attr_create(void *obj, H5VL_loc_params_t loc_params, const char *attr_name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req){
-static herr_t H5VL_log_attr_close(void *attr, hid_t dxpl_id, void **req){
-
-/* Datatype callbacks */
-
-
-/* Dataset callbacks */
-static void *H5VL_log_dataset_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req){
-static herr_t H5VL_log_dataset_close(void *dset, hid_t dxpl_id, void **req){
-
-/* File callbacks */
-
-
-static void *H5VL_log_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req){
-
-
-/* Group callbacks */
-
-static void *H5VL_log_group_open(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req){
-static herr_t H5VL_log_group_get(void *obj, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments){
-
-
-/* Link callbacks */
-
-/* Object callbacks */
-
-
-#endif
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index e339f11..bf0f6ff 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -21,7 +21,6 @@ set (HL_HEADERS
${HDF5_HL_SRC_SOURCE_DIR}/H5DOpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5DSpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5IMpublic.h
- ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h
${HDF5_HL_SRC_SOURCE_DIR}/H5LTpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5PTpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5TBpublic.h
@@ -29,7 +28,11 @@ set (HL_HEADERS
${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h
)
-add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
+set (HL_PRIVATE_HEADERS
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h
+)
+
+add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS} ${HL_PRIVATE_HEADERS})
target_include_directories(${HDF5_HL_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
@@ -42,7 +45,7 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF
set (install_targets ${HDF5_HL_LIB_TARGET})
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS})
+ add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS} ${HL_PRIVATE_HEADERS})
target_include_directories(${HDF5_HL_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 4ae69f0..73bb149 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -110,6 +110,38 @@ New Features
(ADB - 2018/07/16)
+
+ - Incorrectly installed private header files were removed from
+ CMake installs.
+
+ The CMake build files incorrectly flagged the following header files
+ as public and installed them. They are private and will no longer be
+ installed.
+
+ HDF5 library private package files (H5Xpkg.h)
+ H5Edefin.h
+ H5Einit.h
+ H5Eterm.h
+ H5LTparse.h
+ h5diff.h
+ h5tools_dump.h
+ h5tools.h
+ h5tools_ref.h
+ h5tools_str.h
+ h5tools_utils.h
+ h5trav.h
+
+ (DER - 2018/10/26, HDFFV-10614, 10609)
+
+ - Autotools installs now install H5FDwindows.h
+
+ This is simply to align the installed header files between the
+ autotools and CMake. H5FDwindows.h has no functionality on
+ non-Windows systems.
+
+ (DER - 2018/10/26, HDFFV-10614)
+
+
Library:
--------
- Allow pre-generated H5Tinit.c and H5make_libsettings.c to be used.
@@ -120,7 +152,25 @@ New Features
(ADB - 2018/09/18, HDFFV-10332)
- Parallel Library:
+ - Several empty public header files where removed from the distribution
+
+ The following files were empty placeholders. They are for internal
+ packages that are unlikely to ever have public functionality and have
+ thus been removed.
+
+ H5Bpublic.h
+ H5B2public.h
+ H5FSpublic.h
+ H5HFpublic.h
+ H5HGpublic.h
+ H5HLpublic.h
+
+ They were only installed in CMake builds.
+
+ (DER - 2018/10/26, HDFFV-10614)
+
+
+ Parallel Library:
-----------------
-
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a98fdb6..987ae1b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,7 +32,6 @@ set (H5A_SOURCES
)
set (H5A_HDRS
- ${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Apublic.h
)
IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SOURCES}" )
@@ -46,7 +45,6 @@ set (H5AC_SOURCES
)
set (H5AC_HDRS
- ${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACpublic.h
)
IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SOURCES}" )
@@ -57,8 +55,6 @@ set (H5B_SOURCES
${HDF5_SRC_DIR}/H5Bdbg.c
)
set (H5B_HDRS
- ${HDF5_SRC_DIR}/H5Bpkg.h
- ${HDF5_SRC_DIR}/H5Bpublic.h
)
IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SOURCES}" )
@@ -75,8 +71,6 @@ set (H5B2_SOURCES
${HDF5_SRC_DIR}/H5B2test.c
)
set (H5B2_HDRS
- ${HDF5_SRC_DIR}/H5B2pkg.h
- ${HDF5_SRC_DIR}/H5B2public.h
)
IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SOURCES}" )
@@ -94,7 +88,6 @@ set (H5C_SOURCES
${HDF5_SRC_DIR}/H5Ctest.c
)
set (H5C_HDRS
- ${HDF5_SRC_DIR}/H5Cpkg.h
${HDF5_SRC_DIR}/H5Cpublic.h
)
IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SOURCES}" )
@@ -143,7 +136,6 @@ set (H5D_SOURCES
)
set (H5D_HDRS
- ${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dpublic.h
)
IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SOURCES}" )
@@ -155,12 +147,8 @@ set (H5E_SOURCES
)
set (H5E_HDRS
- #${HDF5_SRC_DIR}/H5Edefin.h
- #${HDF5_SRC_DIR}/H5Einit.h
- ${HDF5_SRC_DIR}/H5Epkg.h
- #${HDF5_SRC_DIR}/H5Epubgen.h
+ ${HDF5_SRC_DIR}/H5Epubgen.h
${HDF5_SRC_DIR}/H5Epublic.h
- #${HDF5_SRC_DIR}/H5Eterm.h
)
IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SOURCES}" )
@@ -179,7 +167,6 @@ set (H5EA_SOURCES
${HDF5_SRC_DIR}/H5EAtest.c
)
set (H5EA_HDRS
- ${HDF5_SRC_DIR}/H5EApkg.h
)
IDE_GENERATED_PROPERTIES ("H5EA" "${H5EA_HDRS}" "${H5EA_SOURCES}" )
@@ -213,7 +200,6 @@ set (H5F_SOURCES
)
set (H5F_HDRS
- ${HDF5_SRC_DIR}/H5Fpkg.h
${HDF5_SRC_DIR}/H5Fpublic.h
)
IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SOURCES}" )
@@ -231,7 +217,6 @@ set (H5FA_SOURCES
${HDF5_SRC_DIR}/H5FAtest.c
)
set (H5FA_HDRS
- ${HDF5_SRC_DIR}/H5FApkg.h
)
IDE_GENERATED_PROPERTIES ("H5FA" "${H5FA_HDRS}" "${H5FA_SOURCES}" )
@@ -261,7 +246,6 @@ set (H5FD_HDRS
${HDF5_SRC_DIR}/H5FDmpi.h
${HDF5_SRC_DIR}/H5FDmpio.h
${HDF5_SRC_DIR}/H5FDmulti.h
- ${HDF5_SRC_DIR}/H5FDpkg.h
${HDF5_SRC_DIR}/H5FDpublic.h
${HDF5_SRC_DIR}/H5FDsec2.h
${HDF5_SRC_DIR}/H5FDstdio.h
@@ -297,8 +281,6 @@ set (H5FS_SOURCES
)
set (H5FS_HDRS
- ${HDF5_SRC_DIR}/H5FSpkg.h
- ${HDF5_SRC_DIR}/H5FSpublic.h
)
IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SOURCES}" )
@@ -324,7 +306,6 @@ set (H5G_SOURCES
)
set (H5G_HDRS
- ${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gpublic.h
)
IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SOURCES}" )
@@ -349,8 +330,6 @@ set (H5HF_SOURCES
)
set (H5HF_HDRS
- ${HDF5_SRC_DIR}/H5HFpkg.h
- ${HDF5_SRC_DIR}/H5HFpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SOURCES}" )
@@ -362,8 +341,6 @@ set (H5HG_SOURCES
)
set (H5HG_HDRS
- ${HDF5_SRC_DIR}/H5HGpkg.h
- ${HDF5_SRC_DIR}/H5HGpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SOURCES}" )
@@ -377,8 +354,6 @@ set (H5HL_SOURCES
)
set (H5HL_HDRS
- ${HDF5_SRC_DIR}/H5HLpkg.h
- ${HDF5_SRC_DIR}/H5HLpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SOURCES}" )
@@ -396,7 +371,6 @@ set (H5I_SOURCES
${HDF5_SRC_DIR}/H5Itest.c
)
set (H5I_HDRS
- ${HDF5_SRC_DIR}/H5Ipkg.h
${HDF5_SRC_DIR}/H5Ipublic.h
)
IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SOURCES}" )
@@ -407,7 +381,6 @@ set (H5L_SOURCES
${HDF5_SRC_DIR}/H5Lexternal.c
)
set (H5L_HDRS
- ${HDF5_SRC_DIR}/H5Lpkg.h
${HDF5_SRC_DIR}/H5Lpublic.h
)
IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SOURCES}" )
@@ -440,7 +413,6 @@ set (H5MP_SOURCES
)
set (H5MP_HDRS
- ${HDF5_SRC_DIR}/H5MPpkg.h
)
IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" )
@@ -485,9 +457,7 @@ set (H5O_SOURCES
)
set (H5O_HDRS
- ${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Opublic.h
- ${HDF5_SRC_DIR}/H5Oshared.h
)
IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SOURCES}" )
@@ -513,7 +483,6 @@ set (H5P_SOURCES
)
set (H5P_HDRS
- ${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Ppublic.h
)
IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SOURCES}" )
@@ -523,7 +492,6 @@ set (H5PB_SOURCES
)
set (H5PB_HDRS
- ${HDF5_SRC_DIR}/H5PBpkg.h
)
IDE_GENERATED_PROPERTIES ("H5PB" "${H5PB_HDRS}" "${H5PB_SOURCES}" )
@@ -536,7 +504,6 @@ set (H5PL_SOURCES
set (H5PL_HDRS
${HDF5_SRC_DIR}/H5PLextern.h
- ${HDF5_SRC_DIR}/H5PLpkg.h
${HDF5_SRC_DIR}/H5PLpublic.h
)
IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SOURCES}" )
@@ -548,7 +515,6 @@ set (H5R_SOURCES
${HDF5_SRC_DIR}/H5Rint.c
)
set (H5R_HDRS
- ${HDF5_SRC_DIR}/H5Rpkg.h
${HDF5_SRC_DIR}/H5Rpublic.h
)
IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SOURCES}" )
@@ -575,7 +541,6 @@ set (H5S_SOURCES
)
set (H5S_HDRS
- ${HDF5_SRC_DIR}/H5Spkg.h
${HDF5_SRC_DIR}/H5Spublic.h
)
IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SOURCES}" )
@@ -598,7 +563,6 @@ set (H5SM_SOURCES
)
set (H5SM_HDRS
- ${HDF5_SRC_DIR}/H5SMpkg.h
)
IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SOURCES}" )
@@ -638,7 +602,6 @@ set (H5T_SOURCES
)
set (H5T_HDRS
- ${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tpublic.h
)
IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SOURCES}" )
@@ -667,7 +630,6 @@ set (H5VL_SOURCES
${HDF5_SRC_DIR}/H5VLnative.c
)
set (H5VL_HDRS
- ${HDF5_SRC_DIR}/H5VLpkg.h
${HDF5_SRC_DIR}/H5VLnative.h
${HDF5_SRC_DIR}/H5VLpublic.h
)
@@ -706,7 +668,6 @@ endif ()
set (H5Z_HDRS
- ${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zpublic.h
)
IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SOURCES}" )
@@ -796,51 +757,127 @@ set (H5_PUBLIC_HEADERS
set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h
+
+ ${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Aprivate.h
+
+ ${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACprivate.h
- ${HDF5_SRC_DIR}/H5B2private.h
+
+ ${HDF5_SRC_DIR}/H5Bpkg.h
${HDF5_SRC_DIR}/H5Bprivate.h
+
+ ${HDF5_SRC_DIR}/H5B2pkg.h
+ ${HDF5_SRC_DIR}/H5B2private.h
+
+ ${HDF5_SRC_DIR}/H5Cpkg.h
${HDF5_SRC_DIR}/H5Cprivate.h
+
${HDF5_SRC_DIR}/H5CSprivate.h
+
${HDF5_SRC_DIR}/H5CXprivate.h
+
+ ${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dprivate.h
+
+ ${HDF5_SRC_DIR}/H5Edefin.h
+ ${HDF5_SRC_DIR}/H5Einit.h
+ ${HDF5_SRC_DIR}/H5Epkg.h
${HDF5_SRC_DIR}/H5Eprivate.h
+ ${HDF5_SRC_DIR}/H5Eterm.h
+
+ ${HDF5_SRC_DIR}/H5EApkg.h
${HDF5_SRC_DIR}/H5EAprivate.h
+
+ ${HDF5_SRC_DIR}/H5Fpkg.h
+ ${HDF5_SRC_DIR}/H5Fprivate.h
+
+ ${HDF5_SRC_DIR}/H5FApkg.h
${HDF5_SRC_DIR}/H5FAprivate.h
+
+ ${HDF5_SRC_DIR}/H5FDpkg.h
${HDF5_SRC_DIR}/H5FDprivate.h
- ${HDF5_SRC_DIR}/H5Fprivate.h
+
${HDF5_SRC_DIR}/H5FLprivate.h
+
${HDF5_SRC_DIR}/H5FOprivate.h
- ${HDF5_SRC_DIR}/H5MFprivate.h
- ${HDF5_SRC_DIR}/H5MMprivate.h
- ${HDF5_SRC_DIR}/H5Cprivate.h
+
+ ${HDF5_SRC_DIR}/H5FSpkg.h
${HDF5_SRC_DIR}/H5FSprivate.h
+
+ ${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gprivate.h
+
+ ${HDF5_SRC_DIR}/H5HFpkg.h
${HDF5_SRC_DIR}/H5HFprivate.h
+
+ ${HDF5_SRC_DIR}/H5HGpkg.h
${HDF5_SRC_DIR}/H5HGprivate.h
+
+ ${HDF5_SRC_DIR}/H5HLpkg.h
${HDF5_SRC_DIR}/H5HLprivate.h
+
${HDF5_SRC_DIR}/H5HPprivate.h
+
+ ${HDF5_SRC_DIR}/H5Ipkg.h
${HDF5_SRC_DIR}/H5Iprivate.h
+
+ ${HDF5_SRC_DIR}/H5Lpkg.h
${HDF5_SRC_DIR}/H5Lprivate.h
+
+ ${HDF5_SRC_DIR}/H5MFprivate.h
+
+ ${HDF5_SRC_DIR}/H5MMprivate.h
+
+ ${HDF5_SRC_DIR}/H5MPpkg.h
${HDF5_SRC_DIR}/H5MPprivate.h
+
+ ${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Oprivate.h
+ ${HDF5_SRC_DIR}/H5Oshared.h
+
+ ${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Pprivate.h
+
${HDF5_SRC_DIR}/H5PBprivate.h
+ ${HDF5_SRC_DIR}/H5PBpkg.h
+
+ ${HDF5_SRC_DIR}/H5PLpkg.h
${HDF5_SRC_DIR}/H5PLprivate.h
- ${HDF5_SRC_DIR}/H5UCprivate.h
+
+ ${HDF5_SRC_DIR}/H5Rpkg.h
${HDF5_SRC_DIR}/H5Rprivate.h
+
${HDF5_SRC_DIR}/H5RSprivate.h
+
+ ${HDF5_SRC_DIR}/H5Spkg.h
+ ${HDF5_SRC_DIR}/H5Sprivate.h
+
${HDF5_SRC_DIR}/H5SLprivate.h
+
+ ${HDF5_SRC_DIR}/H5SMpkg.h
${HDF5_SRC_DIR}/H5SMprivate.h
- ${HDF5_SRC_DIR}/H5Sprivate.h
+
${HDF5_SRC_DIR}/H5STprivate.h
+
+ ${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tprivate.h
+
${HDF5_SRC_DIR}/H5TSprivate.h
+
+ ${HDF5_SRC_DIR}/H5UCprivate.h
+
+ ${HDF5_SRC_DIR}/H5VLpkg.h
${HDF5_SRC_DIR}/H5VLnative_private.h
${HDF5_SRC_DIR}/H5VLprivate.h
+
${HDF5_SRC_DIR}/H5VMprivate.h
+
${HDF5_SRC_DIR}/H5WBprivate.h
+
+ ${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zprivate.h
+
${HDF5_SRC_DIR}/H5win32defs.h
)
@@ -853,6 +890,12 @@ set (H5_GENERATED_HEADERS
${HDF5_SRC_DIR}/H5overflow.h
)
+set (H5_PUBLIC_GENERATED_HEADERS
+ ${HDF5_SRC_DIR}/H5Epubgen.h
+ ${HDF5_SRC_DIR}/H5version.h
+ ${HDF5_SRC_DIR}/H5overflow.h
+)
+
option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON)
if (HDF5_GENERATE_HEADERS)
set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE)
@@ -901,13 +944,13 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
if (HDF5_BATCH_H5DETECT)
configure_file (
- ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_DETECT_BATCH_SCRIPT}.in
- ${HDF5_BINARY_DIR}/${HDF5_DETECT_BATCH_SCRIPT} ESCAPE_QUOTES @ONLY
+ ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_BATCH_H5DETECT_SCRIPT}.in.cmake
+ ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY
)
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
COMMAND ${HDF5_BATCH_CMD}
- ARGS ${HDF5_BATCH_H5DETECT_SCRIPT}
+ ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
@@ -1055,7 +1098,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
install (
FILES
${H5_PUBLIC_HEADERS}
- ${H5_GENERATED_HEADERS}
+ ${H5_PUBLIC_GENERATED_HEADERS}
${HDF5_BINARY_DIR}/H5pubconf.h
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 83a5272..0b64381 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -25,9 +25,6 @@
#ifndef _H5B2private_H
#define _H5B2private_H
-/* Include package's public header */
-#include "H5B2public.h"
-
/* Private headers needed by this file */
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Fprivate.h" /* File access */
diff --git a/src/H5B2public.h b/src/H5B2public.h
deleted file mode 100644
index 6e0b964..0000000
--- a/src/H5B2public.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created: H5B2public.h
- * Jan 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
- *
- * Purpose: Public declarations for the v2 B-tree package.
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef _H5B2public_H
-#define _H5B2public_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/**********************************/
-/* Public API Function Prototypes */
-/**********************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _H5B2public_H */
-
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index e203b87..5aa3628 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -27,7 +27,6 @@
#ifndef _H5Bprivate_H
#define _H5Bprivate_H
-#include "H5Bpublic.h" /*API prototypes */
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
diff --git a/src/H5Bpublic.h b/src/H5Bpublic.h
deleted file mode 100644
index 1764f61..0000000
--- a/src/H5Bpublic.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created: H5Bproto.h
- * Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
- *
- * Purpose: Public declarations for the H5B package.
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5Bpublic_H
-#define _H5Bpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 30a9a3b..22dc05a 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -2784,8 +2784,8 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__chunk_hash_val
*
- * Purpose: To calculate an index based on the dataset's scaled coordinates and
- * sizes of the faster dimensions.
+ * Purpose: To calculate an index based on the dataset's scaled
+ * coordinates and sizes of the faster dimensions.
*
* Return: Hash value index
*
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index de1b4c1..31fc63c 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -25,9 +25,6 @@
#ifndef _H5FSprivate_H
#define _H5FSprivate_H
-/* Include package's public header */
-#include "H5FSpublic.h"
-
/* Private headers needed by this file */
#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
diff --git a/src/H5FSpublic.h b/src/H5FSpublic.h
deleted file mode 100644
index 3090d0d..0000000
--- a/src/H5FSpublic.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created: H5FSpublic.h
- * May 2 2006
- * Quincey Koziol <koziol@hdfgroup.org>
- *
- * Purpose: Public declarations for the file free space package.
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef _H5FSpublic_H
-#define _H5FSpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/**********************************/
-/* Public API Function Prototypes */
-/**********************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _H5FSpublic_H */
-
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 7f67226..ea5d5e8 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -30,12 +30,12 @@
#include "H5Fprivate.h"
/* Other public headers needed by this file */
-#include "H5Bpublic.h" /* B-tree header (for H5B_NUM_BTREE_ID) */
#include "H5VLpublic.h" /* Virtual Object Layer */
/* Other private headers needed by this file */
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Bprivate.h" /* B-trees */
#include "H5FLprivate.h" /* Free Lists */
#include "H5FOprivate.h" /* File objects */
#include "H5FSprivate.h" /* File free space */
diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h
index 587a8fc..4eec1c1 100644
--- a/src/H5HFprivate.h
+++ b/src/H5HFprivate.h
@@ -25,9 +25,6 @@
#ifndef _H5HFprivate_H
#define _H5HFprivate_H
-/* Include package's public header */
-#include "H5HFpublic.h"
-
/* Private headers needed by this file */
#include "H5Fprivate.h" /* File access */
#include "H5Oprivate.h" /* Object headers */
diff --git a/src/H5HFpublic.h b/src/H5HFpublic.h
deleted file mode 100644
index 82cfc21..0000000
--- a/src/H5HFpublic.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created: H5HFpublic.h
- * Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
- *
- * Purpose: Public declarations for the fractal heap package.
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef _H5HFpublic_H
-#define _H5HFpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/**********************************/
-/* Public API Function Prototypes */
-/**********************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _H5HFpublic_H */
-
diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h
index a7d7a80..1c609e2 100644
--- a/src/H5HGprivate.h
+++ b/src/H5HGprivate.h
@@ -18,9 +18,6 @@
#ifndef _H5HGprivate_H
#define _H5HGprivate_H
-/* Include package's public header */
-#include "H5HGpublic.h"
-
/* Private headers needed by this file. */
#include "H5Fprivate.h" /* File access */
diff --git a/src/H5HGpublic.h b/src/H5HGpublic.h
deleted file mode 100644
index fcec593..0000000
--- a/src/H5HGpublic.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, March 27, 1998
- */
-#ifndef _H5HGpublic_H
-#define _H5HGpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index 4001ef1..7a53b25 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -24,9 +24,6 @@
#ifndef _H5HLprivate_H
#define _H5HLprivate_H
-/* Include package's public header */
-#include "H5HLpublic.h"
-
/* Private headers needed by this file. */
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
diff --git a/src/H5HLpublic.h b/src/H5HLpublic.h
deleted file mode 100644
index 143bb78..0000000
--- a/src/H5HLpublic.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created: H5HLpublic.h
- * Jul 16 1997
- * Robb Matzke <matzke@llnl.gov>
- *
- * Purpose: Public declarations for the H5HL (local heap) package.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5HLpublic_H
-#define _H5HLpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 6dc24c2..d91cca8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -136,7 +136,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5Epubgen.h H5Epublic.h H5ESpublic.h H5Fpublic.h \
H5FDpublic.h H5FDcore.h H5FDdirect.h \
H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h \
- H5FDmulti.h H5FDsec2.h H5FDstdio.h \
+ H5FDmulti.h H5FDsec2.h H5FDstdio.h H5FDwindows.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
H5MMpublic.h H5Opublic.h H5Ppublic.h \
H5PLextern.h H5PLpublic.h \
diff --git a/test/use.h b/test/use.h
index 0885cc5..54d9b26 100644
--- a/test/use.h
+++ b/test/use.h
@@ -58,6 +58,6 @@ int setup_parameters(int argc, char * const argv[]);
void show_parameters(void);
void usage(const char *prog);
int create_uc_file(void);
-int write_uc_file(hbool_t tosend);
+int write_uc_file(hbool_t tosend, hid_t fid);
int read_uc_file(hbool_t towait);
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 005eb51..4e8c672 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -124,10 +124,13 @@ main(int argc, char *argv[])
int ret_value = 0;
int child_ret_value;
hbool_t send_wait = FALSE;
+ hid_t fapl = -1; /* File access property list */
+ hid_t fid = -1; /* File ID */
+ char *name; /* Test file name */
/* initialization */
if (setup_parameters(argc, argv) < 0){
- Hgoto_error(1);
+ Hgoto_error(1);
}
/* Determine the need to send/wait message file*/
@@ -145,20 +148,20 @@ main(int argc, char *argv[])
/* Create file */
/* ============*/
if (UC_opts.launch != UC_READER){
- printf("Creating skeleton data file for test...\n");
- if (create_uc_file() < 0){
- fprintf(stderr, "***encounter error\n");
- Hgoto_error(1);
- }else
- printf("File created.\n");
+ HDprintf("Creating skeleton data file for test...\n");
+ if (create_uc_file() < 0){
+ HDfprintf(stderr, "***encounter error\n");
+ Hgoto_error(1);
+ }else
+ HDprintf("File created.\n");
}
if (UC_opts.launch==UC_READWRITE){
- /* fork process */
- if((childpid = HDfork()) < 0) {
- HDperror("fork");
- Hgoto_error(1);
- };
+ /* fork process */
+ if((childpid = HDfork()) < 0) {
+ HDperror("fork");
+ Hgoto_error(1);
+ };
};
mypid = HDgetpid();
@@ -166,53 +169,83 @@ main(int argc, char *argv[])
/* launch reader */
/* ============= */
if (UC_opts.launch != UC_WRITER){
- /* child process launch the reader */
- if(0 == childpid) {
- printf("%d: launch reader process\n", mypid);
- if (read_uc_file(send_wait) < 0){
- fprintf(stderr, "read_uc_file encountered error\n");
- exit(1);
- }
- exit(0);
- }
+ /* child process launch the reader */
+ if(0 == childpid) {
+ HDprintf("%d: launch reader process\n", mypid);
+ if (read_uc_file(send_wait) < 0){
+ HDfprintf(stderr, "read_uc_file encountered error\n");
+ HDexit(1);
+ }
+ HDexit(0);
+ }
}
/* ============= */
/* launch writer */
/* ============= */
/* this process continues to launch the writer */
- printf("%d: continue as the writer process\n", mypid);
- if (write_uc_file(send_wait) < 0){
- fprintf(stderr, "write_uc_file encountered error\n");
- Hgoto_error(1);
+ HDprintf("%d: continue as the writer process\n", mypid);
+
+ name = UC_opts.filename;
+
+ /* Set file access proeprty list */
+ if((fapl = h5_fileaccess()) < 0)
+ Hgoto_error(1);
+
+ if(UC_opts.use_swmr)
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ Hgoto_error(1);
+
+ /* Open the file */
+ if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) {
+ HDfprintf(stderr, "H5Fopen failed\n");
+ Hgoto_error(1);
+ }
+
+ if(write_uc_file(send_wait, fid) < 0) {
+ HDfprintf(stderr, "write_uc_file encountered error\n");
+ Hgoto_error(1);
}
/* ================================================ */
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (UC_opts.launch == UC_READWRITE){
- if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0){
- HDperror("waitpid");
- Hgoto_error(1);
- }
- if (WIFEXITED(child_status)){
- if ((child_ret_value=WEXITSTATUS(child_status)) != 0){
- printf("%d: child process exited with non-zero code (%d)\n",
- mypid, child_ret_value);
- Hgoto_error(2);
- }
- } else {
- printf("%d: child process terminated abnormally\n", mypid);
- Hgoto_error(2);
- }
+ if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0){
+ HDperror("waitpid");
+ Hgoto_error(1);
+ }
+
+ /* Close the file */
+ if(H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "Failed to close file id\n");
+ Hgoto_error(1);
+ }
+
+ /* Close the property list */
+ if(H5Pclose(fapl) < 0) {
+ HDfprintf(stderr, "Failed to close the property list\n");
+ Hgoto_error(1);
+ }
+
+ if (WIFEXITED(child_status)){
+ if ((child_ret_value=WEXITSTATUS(child_status)) != 0){
+ HDprintf("%d: child process exited with non-zero code (%d)\n",
+ mypid, child_ret_value);
+ Hgoto_error(2);
+ }
+ } else {
+ HDprintf("%d: child process terminated abnormally\n", mypid);
+ Hgoto_error(2);
+ }
}
done:
/* Print result and exit */
if (ret_value != 0){
- printf("Error(s) encountered\n");
+ HDprintf("Error(s) encountered\n");
}else{
- printf("All passed\n");
+ HDprintf("All passed\n");
}
return(ret_value);
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 9ee37cb..0414628 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -117,10 +117,13 @@ main(int argc, char *argv[])
int ret_value = 0;
int child_ret_value;
hbool_t send_wait = 0;
+ hid_t fapl = -1; /* File access property list */
+ hid_t fid = -1; /* File ID */
+ char *name; /* Test file name */
/* initialization */
if (setup_parameters(argc, argv) < 0){
- Hgoto_error(1);
+ Hgoto_error(1);
}
/* Determine the need to send/wait message file*/
@@ -138,20 +141,20 @@ main(int argc, char *argv[])
/* Create file */
/* ============*/
if (UC_opts.launch != UC_READER){
- printf("Creating skeleton data file for test...\n");
+ HDprintf("Creating skeleton data file for test...\n");
if (create_uc_file() < 0){
- fprintf(stderr, "***encounter error\n");
+ HDfprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}else
- printf("File created.\n");
+ HDprintf("File created.\n");
}
if (UC_opts.launch==UC_READWRITE){
- /* fork process */
- if((childpid = fork()) < 0) {
- perror("fork");
- Hgoto_error(1);
- };
+ /* fork process */
+ if((childpid = fork()) < 0) {
+ perror("fork");
+ Hgoto_error(1);
+ };
};
mypid = getpid();
@@ -159,53 +162,84 @@ main(int argc, char *argv[])
/* launch reader */
/* ============= */
if (UC_opts.launch != UC_WRITER){
- /* child process launch the reader */
- if(0 == childpid) {
- printf("%d: launch reader process\n", mypid);
- if (read_uc_file(send_wait) < 0){
- fprintf(stderr, "read_uc_file encountered error\n");
- exit(1);
- }
- exit(0);
- }
+ /* child process launch the reader */
+ if(0 == childpid) {
+ HDprintf("%d: launch reader process\n", mypid);
+ if (read_uc_file(send_wait) < 0){
+ HDfprintf(stderr, "read_uc_file encountered error\n");
+ HDexit(1);
+ }
+ HDexit(0);
+ }
}
/* ============= */
/* launch writer */
/* ============= */
/* this process continues to launch the writer */
- printf("%d: continue as the writer process\n", mypid);
- if (write_uc_file(send_wait) < 0){
- fprintf(stderr, "write_uc_file encountered error\n");
- Hgoto_error(1);
+ HDprintf("%d: continue as the writer process\n", mypid);
+
+ name = UC_opts.filename;
+
+ /* Set the file access property list */
+ if((fapl = h5_fileaccess()) < 0)
+ Hgoto_error(1);
+
+ if(UC_opts.use_swmr)
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ Hgoto_error(1);
+
+ /* Open the file */
+ if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) {
+ HDfprintf(stderr, "H5Fopen failed\n");
+ Hgoto_error(1);
+ }
+
+ if(write_uc_file(send_wait, fid) < 0) {
+ HDfprintf(stderr, "write_uc_file encountered error\n");
+ Hgoto_error(1);
}
+
/* ================================================ */
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (UC_opts.launch == UC_READWRITE){
- if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0){
- perror("waitpid");
- Hgoto_error(1);
- }
- if (WIFEXITED(child_status)){
- if ((child_ret_value=WEXITSTATUS(child_status)) != 0){
- printf("%d: child process exited with non-zero code (%d)\n",
- mypid, child_ret_value);
- Hgoto_error(2);
- }
- } else {
- printf("%d: child process terminated abnormally\n", mypid);
- Hgoto_error(2);
- }
+ if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0){
+ perror("waitpid");
+ Hgoto_error(1);
+ }
+
+ /* Close the file */
+ if(H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "Failed to close file id\n");
+ Hgoto_error(1);
+ }
+
+ /* Close the property list */
+ if(H5Pclose(fapl) < 0) {
+ HDfprintf(stderr, "Failed to close the property list\n");
+ Hgoto_error(1);
+ }
+
+ if (WIFEXITED(child_status)){
+ if ((child_ret_value=WEXITSTATUS(child_status)) != 0){
+ HDprintf("%d: child process exited with non-zero code (%d)\n",
+ mypid, child_ret_value);
+ Hgoto_error(1);
+ }
+ } else {
+ HDprintf("%d: child process terminated abnormally\n", mypid);
+ Hgoto_error(2);
+ }
}
done:
/* Print result and exit */
if (ret_value != 0){
- printf("Error(s) encountered\n");
+ HDprintf("Error(s) encountered\n");
}else{
- printf("All passed\n");
+ HDprintf("All passed\n");
}
return(ret_value);
diff --git a/test/use_common.c b/test/use_common.c
index 5aa6692..3ecb2e1 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -252,13 +252,10 @@ int create_uc_file(void)
*
* Return: 0 succeed; -1 fail.
*/
-int write_uc_file(hbool_t tosend)
+int write_uc_file(hbool_t tosend, hid_t fid)
{
- hid_t fid; /* File ID for new HDF5 file */
hid_t dsid; /* dataset ID */
- hid_t fapl; /* File access property list */
hid_t dcpl; /* Dataset creation property list */
- char *name;
UC_CTYPE *buffer, *bufptr; /* data buffer */
hsize_t cz=UC_opts.chunksize; /* Chunk size */
hid_t f_sid; /* dataset file space id */
@@ -270,19 +267,6 @@ int write_uc_file(hbool_t tosend)
hsize_t start[3] = {0,0,0}, count[3]; /* Hyperslab selection values */
hsize_t i, j, k;
- name = UC_opts.filename;
-
- /* Open the file */
- if((fapl = h5_fileaccess()) < 0)
- return -1;
- if(UC_opts.use_swmr)
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- return -1;
- if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0){
- fprintf(stderr, "H5Fopen failed\n");
- return -1;
- }
-
if(tosend)
/* Send a message that H5Fopen is complete--releasing the file lock */
h5_send_message(WRITER_MESSAGE, NULL, NULL);
@@ -427,14 +411,6 @@ int write_uc_file(hbool_t tosend)
fprintf(stderr, "Failed to close file space\n");
return -1;
}
- if (H5Pclose(fapl) < 0){
- fprintf(stderr, "Failed to property list\n");
- return -1;
- }
- if (H5Fclose(fid) < 0){
- fprintf(stderr, "Failed to close file id\n");
- return -1;
- }
return 0;
}
@@ -471,7 +447,7 @@ int read_uc_file(hbool_t towait)
/* Before reading, wait for the message that H5Fopen is complete--file lock is released */
if(towait && h5_wait_message(WRITER_MESSAGE) < 0) {
- fprintf(stderr, "Cannot find writer message file...failed\n");
+ HDfprintf(stderr, "Cannot find writer message file...failed\n");
return -1;
}
@@ -481,19 +457,19 @@ int read_uc_file(hbool_t towait)
if((fapl = h5_fileaccess()) < 0)
return -1;
if((fid = H5Fopen(name, H5F_ACC_RDONLY | (UC_opts.use_swmr ? H5F_ACC_SWMR_READ : 0), fapl)) < 0){
- fprintf(stderr, "H5Fopen failed\n");
+ HDfprintf(stderr, "H5Fopen failed\n");
return -1;
}
if (H5Pclose(fapl) < 0){
- fprintf(stderr, "Failed to property list\n");
+ HDfprintf(stderr, "Failed to property list\n");
return -1;
}
/* Open the dataset of the program name */
if((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0){
- fprintf(stderr, "H5Dopen2 failed\n");
- return -1;
+ HDfprintf(stderr, "H5Dopen2 failed\n");
+ return -1;
}
/* allocate space for data buffer 1 X dims[1] X dims[2] of UC_CTYPE */
@@ -501,8 +477,8 @@ int read_uc_file(hbool_t towait)
memdims[1] = UC_opts.dims[1];
memdims[2] = UC_opts.dims[2];
if ((buffer=(UC_CTYPE*)HDmalloc((size_t)memdims[1]*(size_t)memdims[2]*sizeof(UC_CTYPE)))==NULL) {
- fprintf(stderr, "malloc: failed\n");
- return -1;
+ HDfprintf(stderr, "malloc: failed\n");
+ return -1;
};
/*
@@ -512,31 +488,31 @@ int read_uc_file(hbool_t towait)
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
rank = H5Sget_simple_extent_ndims(f_sid);
if (rank != UC_RANK){
- fprintf(stderr, "rank(%d) of dataset does not match\n", rank);
- return -1;
+ HDfprintf(stderr, "rank(%d) of dataset does not match\n", rank);
+ return -1;
}
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0){
- fprintf(stderr, "H5Sget_simple_extent_dims got error\n");
- return -1;
+ HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
+ return -1;
}
- printf("dataset rank %d, dimensions %llu x %llu x %llu\n",
- rank, (unsigned long long)(dims[0]), (unsigned long long)(dims[1]),
- (unsigned long long)(dims[2]));
+ HDprintf("dataset rank %d, dimensions %llu x %llu x %llu\n",
+ rank, (unsigned long long)(dims[0]), (unsigned long long)(dims[1]),
+ (unsigned long long)(dims[2]));
/* verify that file space dims are as expected and are consistent with memory space dims */
if (dims[1] != memdims[1] || dims[2] != memdims[2]){
- fprintf(stderr, "dataset dimension is not as expected. Got dims=(%llu,%llu,%llu)\n",
- (unsigned long long)dims[0], (unsigned long long)dims[1],
+ HDfprintf(stderr, "dataset dimension is not as expected. Got dims=(%llu,%llu,%llu)\n",
+ (unsigned long long)dims[0], (unsigned long long)dims[1],
(unsigned long long)dims[2]);
- fprintf(stderr, "But memdims=(%llu,%llu,%llu)\n",
- (unsigned long long)memdims[0], (unsigned long long)memdims[1],
+ HDfprintf(stderr, "But memdims=(%llu,%llu,%llu)\n",
+ (unsigned long long)memdims[0], (unsigned long long)memdims[1],
(unsigned long long)memdims[2]);
- return -1;
+ return -1;
}
/* setup mem-space for buffer */
if ((m_sid=H5Screate_simple(rank, memdims, NULL))<0){
- fprintf(stderr, "H5Screate_simple for memory failed\n");
- return -1;
+ HDfprintf(stderr, "H5Screate_simple for memory failed\n");
+ return -1;
};
/* Read 1 plane at a time whenever the dataset grows larger
@@ -550,22 +526,22 @@ int read_uc_file(hbool_t towait)
/* print progress message according to if new planes are availalbe */
if (nplane_old < dims[0]) {
if (nonewplane){
- /* end the previous message */
- printf("\n");
- nonewplane=0;
+ /* end the previous message */
+ HDprintf("\n");
+ nonewplane=0;
}
- printf("reading planes %llu to %llu\n", (unsigned long long)nplane_old,
+ HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplane_old,
(unsigned long long)dims[0]);
}else{
if (nonewplane){
- printf(".");
+ HDprintf(".");
if (nonewplane>=30){
- fprintf(stderr, "waited too long for new plane, quit.\n");
+ HDfprintf(stderr, "waited too long for new plane, quit.\n");
return -1;
}
}else{
- /* print mesg only the first time; dots still no new plane */
- printf("no new planes to read ");
+ /* print mesg only the first time; dots still no new plane */
+ HDprintf("no new planes to read ");
}
nonewplane++;
/* pause for a second */
@@ -575,41 +551,41 @@ int read_uc_file(hbool_t towait)
/* read planes between last old nplanes and current extent */
/* Get the dataset's dataspace */
if((f_sid = H5Dget_space(dsid)) < 0){
- fprintf(stderr, "H5Dget_space failed\n");
- return -1;
+ HDfprintf(stderr, "H5Dget_space failed\n");
+ return -1;
}
start[0]=nplane;
/* Choose the next plane to read */
if(H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0){
- fprintf(stderr, "H5Sselect_hyperslab failed\n");
- return -1;
+ HDfprintf(stderr, "H5Sselect_hyperslab failed\n");
+ return -1;
}
/* Read the plane from the dataset */
if(H5Dread(dsid, UC_DATATYPE, m_sid, f_sid, H5P_DEFAULT, buffer) < 0){
- fprintf(stderr, "H5Dread failed\n");
- return -1;
+ HDfprintf(stderr, "H5Dread failed\n");
+ return -1;
}
/* compare read data with expected data value which is nplane */
bufptr = buffer;
nerrs=0;
for (j=0; j<dims[1]; j++){
- for (k=0; k<dims[2]; k++){
- if ((hsize_t)*bufptr++ != nplane){
- if (++nerrs < ErrorReportMax){
- fprintf(stderr,
- "found error %llu plane(%llu,%llu), expected %llu, got %d\n",
- (unsigned long long)nplane, (unsigned long long)j,
- (unsigned long long)k, (unsigned long long)nplane, (int)*(bufptr-1));
- }
- }
- }
+ for (k=0; k<dims[2]; k++){
+ if ((hsize_t)*bufptr++ != nplane){
+ if (++nerrs < ErrorReportMax){
+ HDfprintf(stderr,
+ "found error %llu plane(%llu,%llu), expected %llu, got %d\n",
+ (unsigned long long)nplane, (unsigned long long)j,
+ (unsigned long long)k, (unsigned long long)nplane, (int)*(bufptr-1));
+ }
+ }
+ }
}
if (nerrs){
- nreadererr++;
- fprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs,
+ nreadererr++;
+ HDfprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs,
(unsigned long long)nplane);
}
}
@@ -620,19 +596,19 @@ int read_uc_file(hbool_t towait)
#if 0
/* close dsid and file, then reopen them */
if (H5Dclose(dsid) < 0){
- fprintf(stderr, "H5Dclose failed\n");
+ HDfprintf(stderr, "H5Dclose failed\n");
return -1;
}
if (H5Fclose(fid) < 0){
- fprintf(stderr, "H5Fclose failed\n");
+ HDfprintf(stderr, "H5Fclose failed\n");
return -1;
}
if((fid = H5Fopen(name, H5F_ACC_RDONLY | (UC_opts.use_swmr ? H5F_ACC_SWMR_READ : 0), H5P_DEFAULT)) < 0){
- fprintf(stderr, "H5Fopen failed\n");
+ HDfprintf(stderr, "H5Fopen failed\n");
return -1;
}
if((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0){
- fprintf(stderr, "H5Dopen2 failed\n");
+ HDfprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
#else
@@ -640,16 +616,22 @@ int read_uc_file(hbool_t towait)
#endif
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0){
- fprintf(stderr, "H5Sget_simple_extent_dims got error\n");
+ HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
return -1;
}
}
+ /* Close the file */
+ if(H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "H5Fclose failed\n");
+ return -1;
+ }
+
if (nreadererr)
- return -1;
+ return -1;
else
- return 0;
-}
+ return 0;
+} /* read_uc_file() */
#endif /* H5_HAVE_FORK */
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index a03b60a..1596ea7 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -76,18 +76,6 @@ endif ()
##############################################################################
#-----------------------------------------------------------------------------
-# Add file(s) to CMake Install
-#-----------------------------------------------------------------------------
-install (
- FILES
- ${H5_TOOLS_LIB_HDRS}
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- toolsheaders
-)
-
-#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)