summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-09-01 04:36:17 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-09-01 04:36:17 (GMT)
commit59aa015d9f796d5cfc6c94073efb7741d9601970 (patch)
treec242978356043f892d5ef2021ec65726acb94387
parent3b5a4a064871fdf9a0fcabafc27c491fc1f56a2f (diff)
parenta90e09889d575b26648f642d3bc85639df165dc9 (diff)
downloadhdf5-59aa015d9f796d5cfc6c94073efb7741d9601970.zip
hdf5-59aa015d9f796d5cfc6c94073efb7741d9601970.tar.gz
hdf5-59aa015d9f796d5cfc6c94073efb7741d9601970.tar.bz2
[svn-r27638] Merged r27500-27631 from trunk.
-rw-r--r--CMakeLists.txt68
-rw-r--r--MANIFEST66
-rw-r--r--README.txt4
-rwxr-xr-xbin/bbrelease2
-rwxr-xr-xbin/chkcopyright43
-rw-r--r--c++/src/H5IdComponent.cpp6
-rw-r--r--c++/src/cpp_doc_config2
-rw-r--r--c++/test/tfile.cpp12
-rw-r--r--c++/test/tlinks.cpp61
-rw-r--r--config/cmake/HDF5UseFortran.cmake62
-rw-r--r--config/cmake/cacheinit.cmake2
-rw-r--r--config/conclude_fc.am33
-rw-r--r--config/lt_vers.am2
-rw-r--r--config/pgi-fflags1
-rw-r--r--configure.ac159
-rw-r--r--fortran/examples/CMakeLists.txt12
-rw-r--r--fortran/examples/CMakeTests.cmake24
-rw-r--r--fortran/examples/Makefile.am2
-rw-r--r--fortran/src/CMakeLists.txt45
-rw-r--r--fortran/src/H5Dff.F903
-rw-r--r--fortran/src/H5_f.c15
-rw-r--r--fortran/src/H5_ff.F9011
-rw-r--r--fortran/src/H5config_f.inc.cmake3
-rw-r--r--fortran/src/H5config_f.inc.in3
-rw-r--r--fortran/src/H5f90global.F9012
-rw-r--r--fortran/src/H5f90proto.h12
-rw-r--r--fortran/src/Makefile.am7
-rw-r--r--fortran/src/hdf5_fortrandll.def.in3
-rw-r--r--fortran/test/CMakeLists.txt172
-rw-r--r--fortran/test/CMakeTests.cmake4
-rw-r--r--fortran/test/Makefile.am18
-rw-r--r--fortran/test/fflush1.F90 (renamed from fortran/test/fflush1.f90)0
-rw-r--r--fortran/test/fflush2.F90 (renamed from fortran/test/fflush2.f90)0
-rw-r--r--fortran/test/fortranlib_test.F90 (renamed from fortran/test/fortranlib_test.f90)6
-rw-r--r--fortran/test/fortranlib_test_1_8.F90 (renamed from fortran/test/fortranlib_test_1_8.f90)0
-rw-r--r--fortran/test/fortranlib_test_F03.F90 (renamed from fortran/test/fortranlib_test_F03.f90)0
-rw-r--r--fortran/test/tH5A.F90 (renamed from fortran/test/tH5A.f90)0
-rw-r--r--fortran/test/tH5A_1_8.F90 (renamed from fortran/test/tH5A_1_8.f90)0
-rw-r--r--fortran/test/tH5D.F90 (renamed from fortran/test/tH5D.f90)120
-rw-r--r--fortran/test/tH5E.F90 (renamed from fortran/test/tH5E.f90)0
-rw-r--r--fortran/test/tH5E_F03.F90 (renamed from fortran/test/tH5E_F03.f90)0
-rw-r--r--fortran/test/tH5F.F90 (renamed from fortran/test/tH5F.f90)0
-rw-r--r--fortran/test/tH5F_F03.F90 (renamed from fortran/test/tH5F_F03.f90)0
-rw-r--r--fortran/test/tH5G.F90 (renamed from fortran/test/tH5G.f90)0
-rw-r--r--fortran/test/tH5G_1_8.F90 (renamed from fortran/test/tH5G_1_8.f90)0
-rw-r--r--fortran/test/tH5I.F90 (renamed from fortran/test/tH5I.f90)0
-rw-r--r--fortran/test/tH5L_F03.F90 (renamed from fortran/test/tH5L_F03.f90)0
-rw-r--r--fortran/test/tH5MISC_1_8.F90 (renamed from fortran/test/tH5MISC_1_8.f90)0
-rw-r--r--fortran/test/tH5O.F90 (renamed from fortran/test/tH5O.f90)0
-rw-r--r--fortran/test/tH5O_F03.F90 (renamed from fortran/test/tH5O_F03.f90)0
-rw-r--r--fortran/test/tH5P.F90 (renamed from fortran/test/tH5P.f90)0
-rw-r--r--fortran/test/tH5P_F03.F90 (renamed from fortran/test/tH5P_F03.f90)0
-rw-r--r--fortran/test/tH5R.F90 (renamed from fortran/test/tH5R.f90)0
-rw-r--r--fortran/test/tH5S.F90 (renamed from fortran/test/tH5S.f90)0
-rw-r--r--fortran/test/tH5Sselect.F90 (renamed from fortran/test/tH5Sselect.f90)0
-rw-r--r--fortran/test/tH5T.F90 (renamed from fortran/test/tH5T.f90)0
-rw-r--r--fortran/test/tH5VL.F90 (renamed from fortran/test/tH5VL.f90)0
-rw-r--r--fortran/test/tH5Z.F90 (renamed from fortran/test/tH5Z.f90)0
-rw-r--r--fortran/test/tHDF5.F90 (renamed from fortran/test/tHDF5.f90)0
-rw-r--r--fortran/test/tHDF5_1_8.F90 (renamed from fortran/test/tHDF5_1_8.f90)0
-rw-r--r--fortran/test/tHDF5_F03.F90 (renamed from fortran/test/tHDF5_F03.f90)0
-rw-r--r--fortran/testpar/Makefile.am2
-rw-r--r--hl/fortran/examples/Makefile.am2
-rw-r--r--hl/fortran/src/CMakeLists.txt44
-rw-r--r--hl/fortran/src/Makefile.am2
-rw-r--r--hl/fortran/test/CMakeLists.txt16
-rw-r--r--hl/fortran/test/CMakeTests.cmake8
-rw-r--r--hl/fortran/test/Makefile.am2
-rw-r--r--m4/aclocal_fc.m434
-rw-r--r--release_docs/INSTALL_CMake.txt335
-rw-r--r--release_docs/INSTALL_VMS.txt77
-rw-r--r--release_docs/RELEASE.txt1244
-rw-r--r--release_docs/USING_CMake_Examples.txt45
-rw-r--r--release_docs/USING_HDF5_CMake.txt179
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/H5.c47
-rw-r--r--src/H5Abtree2.c20
-rw-r--r--src/H5B2dbg.c79
-rw-r--r--src/H5B2private.h6
-rw-r--r--src/H5B2test.c53
-rw-r--r--src/H5D.c44
-rw-r--r--src/H5Dchunk.c10
-rw-r--r--src/H5Dcontig.c76
-rw-r--r--src/H5Ddeprec.c46
-rw-r--r--src/H5Dint.c163
-rw-r--r--src/H5Dlayout.c65
-rw-r--r--src/H5Dpkg.h6
-rw-r--r--src/H5FDcore.c22
-rw-r--r--src/H5FDdirect.c15
-rw-r--r--src/H5FDlog.c24
-rw-r--r--src/H5FDsec2.c22
-rw-r--r--src/H5FDstdio.c57
-rw-r--r--src/H5Fdbg.c2
-rw-r--r--src/H5Fsuper.c10
-rw-r--r--src/H5Gbtree2.c22
-rw-r--r--src/H5HF.c66
-rw-r--r--src/H5HFbtree2.c84
-rw-r--r--src/H5HFdbg.c74
-rw-r--r--src/H5HFhuge.c87
-rw-r--r--src/H5HFman.c35
-rw-r--r--src/H5HFpkg.h6
-rw-r--r--src/H5HFprivate.h4
-rw-r--r--src/H5Lexternal.c2
-rw-r--r--src/H5Ocache.c22
-rw-r--r--src/H5Odbg.c21
-rw-r--r--src/H5Olayout.c44
-rw-r--r--src/H5Olink.c4
-rw-r--r--src/H5PL.c2
-rw-r--r--src/H5Pdcpl.c12
-rw-r--r--src/H5S.c2
-rw-r--r--src/H5SM.c62
-rw-r--r--src/H5SMbtree2.c51
-rw-r--r--src/H5SMprivate.h2
-rw-r--r--src/H5Shyper.c96
-rw-r--r--src/H5Tconv.c7
-rw-r--r--src/H5Tfixed.c16
-rw-r--r--src/H5Topaque.c20
-rw-r--r--src/H5Tpad.c18
-rw-r--r--src/H5Tprecis.c32
-rw-r--r--src/H5Tstrpad.c16
-rw-r--r--src/H5Tvisit.c13
-rw-r--r--src/H5Tvlen.c26
-rw-r--r--src/H5Znbit.c123
-rw-r--r--src/H5Zscaleoffset.c2
-rw-r--r--src/H5Ztrans.c201
-rw-r--r--src/H5err.txt1
-rw-r--r--src/H5private.h56
-rw-r--r--src/H5public.h8
-rw-r--r--src/H5system.c62
-rw-r--r--test/CMakeLists.txt40
-rw-r--r--test/CMakeTests.cmake14
-rw-r--r--test/H5srcdir.h16
-rw-r--r--test/dsets.c2
-rw-r--r--test/dt_arith.c118
-rw-r--r--test/dtypes.c4
-rw-r--r--test/earray.c4
-rw-r--r--test/farray.c8
-rw-r--r--test/fheap.c14
-rw-r--r--test/fillval.c2
-rw-r--r--test/flush2.c4
-rw-r--r--test/gen_cross.c4
-rw-r--r--test/gen_udlinks.c4
-rw-r--r--test/getname.c2
-rw-r--r--test/lheap.c4
-rw-r--r--test/links.c29
-rw-r--r--test/links_env.c4
-rw-r--r--test/objcopy.c2
-rw-r--r--test/stab.c2
-rw-r--r--test/tattr.c12
-rw-r--r--test/tconfig.c9
-rw-r--r--test/tfile.c124
-rw-r--r--test/tgenprop.c82
-rw-r--r--test/th5o.c2
-rw-r--r--test/th5s.c45
-rw-r--r--test/tmisc.c42
-rw-r--r--test/tsohm.c3
-rw-r--r--test/ttsafe.c43
-rw-r--r--test/ttsafe.h10
-rw-r--r--test/ttsafe_error.c1
-rw-r--r--test/ttst.c6
-rw-r--r--test/tvltypes.c52
-rw-r--r--tools/h5diff/h5diffgentest.c10
-rw-r--r--tools/h5dump/errfiles/tdset-2.err13
-rw-r--r--tools/h5dump/errfiles/tperror.err13
-rw-r--r--tools/h5dump/errfiles/tslink-D.err19
-rw-r--r--tools/h5dump/h5dump.c4
-rw-r--r--tools/h5dump/h5dump.h19
-rw-r--r--tools/h5dump/h5dump_ddl.c17
-rw-r--r--tools/h5dump/h5dump_xml.c245
-rw-r--r--tools/h5jam/h5jamgentest.c2
-rw-r--r--tools/h5ls/h5ls.c5
-rw-r--r--tools/lib/h5diff_array.c62
-rw-r--r--tools/lib/h5diff_dset.c47
-rw-r--r--tools/lib/h5diff_util.c49
-rw-r--r--tools/lib/h5tools.c16
-rw-r--r--tools/lib/h5tools_dump.c8
-rw-r--r--tools/lib/h5tools_ref.c4
-rw-r--r--tools/lib/h5tools_str.c18
-rw-r--r--tools/lib/h5tools_type.c193
-rw-r--r--tools/lib/h5tools_utils.c3
-rw-r--r--tools/lib/io_timer.c12
-rw-r--r--tools/misc/h5debug.c26
-rw-r--r--tools/misc/h5mkgrp.c2
-rw-r--r--tools/misc/h5repart.c10
-rw-r--r--tools/perform/chunk.c6
-rw-r--r--tools/perform/overhead.c2
-rw-r--r--tools/perform/sio_engine.c2
-rw-r--r--tools/perform/sio_perf.c20
-rw-r--r--tools/perform/sio_standalone.h11
-rw-r--r--tools/perform/zip_perf.c9
190 files changed, 2875 insertions, 3741 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 799c1da..cd3e1c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,6 +103,8 @@ if (HDF5_USE_FOLDERS)
endif (HDF5_USE_FOLDERS)
option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
mark_as_advanced (HDF5_NO_PACKAGES)
+option (ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
+mark_as_advanced (ALLOW_UNSUPPORTED)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries
@@ -541,25 +543,36 @@ if (WIN32)
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
- if (H5_BUILT_AS_STATIC_LIB)
- message (FATAL_ERROR " **** thread-safety option not supported with static library **** ")
- endif (H5_BUILT_AS_STATIC_LIB)
+ message (STATUS " **** thread-safety option not supported with static library **** ")
+ message (STATUS " **** thread-safety option will not be used building static library **** ")
if (HDF5_ENABLE_PARALLEL)
- message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_ENABLE_PARALLEL)
if (HDF5_BUILD_FORTRAN)
- message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Fortran and thread-safety options are not supported **** ")
+ message (STATUS " **** thread-safety option will not be used building Fortran library **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_BUILD_FORTRAN)
if (HDF5_BUILD_CPP_LIB)
- message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** C++ and thread-safety options are not supported **** ")
+ message (STATUS " **** thread-safety option will not be used building C++ library **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_BUILD_CPP_LIB)
- set (H5_HAVE_THREADSAFE 1)
if (H5_HAVE_IOEO)
message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
set (H5_HAVE_WIN_THREADS 1)
else (H5_HAVE_IOEO)
if (NOT H5_HAVE_PTHREAD_H)
- set (H5_HAVE_THREADSAFE 0)
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
endif (NOT H5_HAVE_PTHREAD_H)
endif (H5_HAVE_IOEO)
@@ -601,8 +614,23 @@ if (BUILD_TESTING)
CACHE INTEGER
"Timeout in seconds for each test (default 1200=20minutes)"
)
+
+ option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
+ mark_as_advanced (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
+ option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_VFD)
+ endif (HDF5_TEST_VFD)
+
+ option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
+ mark_as_advanced (HDF_TEST_EXPRESS)
+
+ include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
+ configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+
enable_testing ()
include (CTest)
+
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib)
@@ -614,16 +642,6 @@ if (BUILD_TESTING)
endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
endif (H5_HAVE_PARALLEL)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
-
- option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
- mark_as_advanced (HDF5_TEST_VFD)
- if (HDF5_TEST_VFD)
- option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
- mark_as_advanced (HDF5_TEST_FHEAP_VFD)
- endif (HDF5_TEST_VFD)
-
- include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
- configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
@@ -667,9 +685,15 @@ set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
+ option (SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF)
if (HDF5_BUILD_FORTRAN)
if (BUILD_SHARED_LIBS AND APPLE)
- message (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Shared FORTRAN libraries are unsupported **** ")
+ set (SKIP_HDF5_FORTRAN_SHARED ON)
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Fortran shared libraries **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (BUILD_SHARED_LIBS AND APPLE)
option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
@@ -703,7 +727,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
- message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_ENABLE_PARALLEL)
if (CMAKE_NO_STD_NAMESPACE)
set (H5_NO_STD 1)
diff --git a/MANIFEST b/MANIFEST
index 5dcded2..0c0c2f0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -37,7 +37,7 @@
./configure.ac.orig _DO_NOT_DISTRIBUTE_
./bin/COPYING
-./bin/bbrelease
+./bin/bbrelease _DO_NOT_DISTRIBUTE_
./bin/buildhdf5
./bin/checkapi _DO_NOT_DISTRIBUTE_
./bin/checkposix _DO_NOT_DISTRIBUTE_
@@ -77,6 +77,7 @@
./config/cce-flags
./config/commence.am
./config/conclude.am
+./config/conclude_fc.am
./config/examples.am
./config/freebsd
./config/gnu-fflags
@@ -217,40 +218,39 @@
./fortran/test/Makefile.am
-./fortran/test/fflush1.f90
-./fortran/test/fflush2.f90
-./fortran/test/fortranlib_test.f90
-./fortran/test/fortranlib_test_1_8.f90
-./fortran/test/fortranlib_test_F03.f90
+./fortran/test/fflush1.F90
+./fortran/test/fflush2.F90
+./fortran/test/fortranlib_test.F90
+./fortran/test/fortranlib_test_1_8.F90
+./fortran/test/fortranlib_test_F03.F90
./fortran/test/t.c
./fortran/test/t.h
./fortran/test/tf.F90
-./fortran/test/tH5A.f90
-./fortran/test/tH5A_1_8.f90
-./fortran/test/tH5D.f90
-./fortran/test/tH5E_F03.f90
-./fortran/test/tH5E.f90
-./fortran/test/tH5F.f90
-./fortran/test/tH5F_F03.f90
-./fortran/test/tH5G.f90
-./fortran/test/tH5G_1_8.f90
-./fortran/test/tH5I.f90
-./fortran/test/tH5L_F03.f90
-./fortran/test/tH5MISC_1_8.f90
-./fortran/test/tH5O.f90
-./fortran/test/tH5O_F03.f90
-./fortran/test/tH5P_F03.f90
-./fortran/test/tH5P.f90
-./fortran/test/tH5R.f90
-./fortran/test/tH5S.f90
-./fortran/test/tH5Sselect.f90
-./fortran/test/tH5T.f90
-./fortran/test/tH5T_F03.F90
-./fortran/test/tH5VL.f90
-./fortran/test/tH5Z.f90
-./fortran/test/tHDF5_1_8.f90
-./fortran/test/tHDF5_F03.f90
-./fortran/test/tHDF5.f90
+./fortran/test/tH5A.F90
+./fortran/test/tH5A_1_8.F90
+./fortran/test/tH5D.F90
+./fortran/test/tH5E_F03.F90
+./fortran/test/tH5E.F90
+./fortran/test/tH5F.F90
+./fortran/test/tH5F_F03.F90
+./fortran/test/tH5G.F90
+./fortran/test/tH5G_1_8.F90
+./fortran/test/tH5I.F90
+./fortran/test/tH5L_F03.F90
+./fortran/test/tH5MISC_1_8.F90
+./fortran/test/tH5O.F90
+./fortran/test/tH5O_F03.F90
+./fortran/test/tH5P_F03.F90
+./fortran/test/tH5P.F90
+./fortran/test/tH5R.F90
+./fortran/test/tH5S.F90
+./fortran/test/tH5Sselect.F90
+./fortran/test/tH5T.F90
+./fortran/test/tH5VL.F90
+./fortran/test/tH5Z.F90
+./fortran/test/tHDF5_1_8.F90
+./fortran/test/tHDF5_F03.F90
+./fortran/test/tHDF5.F90
./fortran/test/H5_test_buildiface.F90
./fortran/testpar/Makefile.am
@@ -397,7 +397,6 @@
./release_docs/INSTALL_CMake.txt
./release_docs/INSTALL_Cygwin.txt
./release_docs/INSTALL_parallel
-./release_docs/INSTALL_VMS.txt
./release_docs/INSTALL_Windows.txt
./release_docs/RELEASE.txt
./release_docs/USING_HDF5_CMake.txt
@@ -1028,7 +1027,6 @@
./tools/h5dump/testh5dumpxml.sh.in
./tools/h5dump/binread.c
-
./tools/h5import/Makefile.am
./tools/h5import/h5import.h
./tools/h5import/h5import.c
diff --git a/README.txt b/README.txt
index 3ae4df3..058734f 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.227 currently under development
+HDF5 version 1.9.230 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
@@ -8,7 +8,7 @@ specific to this release of the library. Several INSTALL* files can also be
found in the release_docs/ directory: INSTALL contains instructions for
compiling and installing the library; INSTALL_parallel contains instructions
for installing the parallel version of the library; similarly-named files
-contain instructions for VMS and several environments on MS Windows systems.
+contain instructions for several environments on MS Windows systems.
Documentation for this release can be found at the following URL:
http://www.hdfgroup.org/HDF5/doc/.
diff --git a/bin/bbrelease b/bin/bbrelease
index fea498a..1e3b88d 100755
--- a/bin/bbrelease
+++ b/bin/bbrelease
@@ -260,7 +260,7 @@ if [ X$revmode = Xyes ]; then
# Copy old version of config/lt_vers.am, since it's hard to
# "undo" changes to it.
cp config/lt_vers.am $tmpdir
- branch=`svn info | grep URL: | awk -F/ '{print $NF}'`
+ branch=`svn info | grep ^URL: | awk -F/ '{print $NF}'`
revision=`svn info | grep "Last Changed Rev:" | awk '{print $4}'`
# Set version information to m.n.r-r$revision.
# (h5vers does not correctly handle just m.n.r-$today.)
diff --git a/bin/chkcopyright b/bin/chkcopyright
index fe9fe49..07fcb24 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -56,7 +56,6 @@ HTM_COPYRIGHT=/tmp/h5chkright_HTM.$$ # HTML style copyright
SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright
SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style.
WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice
-VMSCMD_COPYRIGHT=/tmp/h5chkright_VMSCMD.$$ # VMS command file Copyright notice
CONFIGURE_AC_COPYRIGHT=/tmp/h5chkright_CONFIGURE_AC.$$ # configure.ac file Copyright notice
tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file
@@ -223,22 +222,6 @@ dnl http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
dnl access to either file, you may request a copy from help@hdfgroup.org.
EOF
- # VMS command file Copyright notice
- cat > ${VMSCMD_COPYRIGHT} << \EOF
-$!# 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 files COPYING and Copyright.html. COPYING can be found at the root
-$!# of the source code distribution tree; Copyright.html can be found at the
-$!# root level of an installed copy of the electronic HDF5 document set and
-$!# is linked from the top-level documents page. It can also be found at
-$!# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-$!# access to either file, you may request a copy from help@hdfgroup.org.
-EOF
-
}
# Initialization
@@ -611,28 +594,6 @@ BATCH_FILE()
}
-# Check Windows Batch files
-#
-VMSCMD_FILE()
-{
- f=$1
- case `MATCH_COPYRIGHT $VMSCMD_COPYRIGHT $f` in
- PASSED)
- PASSED $f
- return
- ;;
- FAILED)
- # show the difference
- FAILED $f
- $DIFF ${EXTRACTEDFILE} ${VMSCMD_COPYRIGHT}
- if [ -n "$FIXIT" ]; then
- FIX_COPYRIGHT $VMSCMD_COPYRIGHT $f
- fi
- ;;
- esac
-}
-
-
# Check Configure.in type files
#
CONFIGURE_AC_FILE()
@@ -834,10 +795,6 @@ while read file; do
# Windows Batch files
BATCH_FILE ${file}
;;
- *.com )
- # VMS Command files
- VMSCMD_FILE ${file}
- ;;
*.h5 | *.hdf5 )
# Ignore HDF5 data files
continue
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index c01d41e..bcd69c4 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -285,15 +285,9 @@ IdComponent::~IdComponent() {}
//--------------------------------------------------------------------------
H5std_string IdComponent::inMemFunc(const char* func_name) const
{
-#ifdef H5_VMS
- H5std_string full_name = fromClass();
- full_name.append("::");
- full_name.append(func_name);
-#else
H5std_string full_name = func_name;
full_name.insert(0, "::");
full_name.insert(0, fromClass());
-#endif /*H5_VMS*/
return (full_name);
}
diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config
index 0e1fa6a..73c41eb 100644
--- a/c++/src/cpp_doc_config
+++ b/c++/src/cpp_doc_config
@@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = HDF5 version 1.9.227 currently under development
+PROJECT_NUMBER = "1.9.230 currently under development"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index f3bbb16..f84ce3a 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -109,9 +109,7 @@ static void test_file_create()
file1 = new H5File (FILE1, H5F_ACC_EXCL);
// Try to create the same file with H5F_ACC_TRUNC. This should fail
- // because file1 is the same file and is currently open. Skip it on
- // OpenVMS because it creates another version of the file.
-#ifndef H5_HAVE_FILE_VERSIONS
+ // because file1 is the same file and is currently open.
try {
H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
@@ -120,7 +118,6 @@ static void test_file_create()
}
catch( FileIException E ) // catch truncating existing file
{} // do nothing, FAIL expected
-#endif // H5_HAVE_FILE_VERSIONS
// Close file1
delete file1;
@@ -141,9 +138,7 @@ static void test_file_create()
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
// Try to create first file again. This should fail because file1
- // is the same file and is currently open. Skip it on OpenVMS because
- // it creates another version of the file.
-#ifndef H5_HAVE_FILE_VERSIONS
+ // is the same file and is currently open.
try {
H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
@@ -154,7 +149,7 @@ static void test_file_create()
{} // do nothing, FAIL expected
// Try with H5F_ACC_EXCL. This should fail too because the file already
- // exists. Skip it on OpenVMS because it creates another version of the file.
+ // exists.
try {
H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E
@@ -163,7 +158,6 @@ static void test_file_create()
}
catch( FileIException E ) // catching H5F_ACC_EXCL on existing file
{} // do nothing, FAIL expected
-#endif /*H5_HAVE_FILE_VERSIONS*/
// Get the file-creation template
FileCreatPropList tmpl1 = file1->getCreatePlist();
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 291b649..33d10ea 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -58,60 +58,6 @@
/* File for external link test. Created with gen_udlinks.c */
#define LINKED_FILE "be_extlink2.h5"
-#ifdef H5_VMS
-#if 0
-const char *FILENAME[] = {
- "links0",
- "links1",
- "links2",
- "links3",
- "links4a", /* 4 */
- "links4b", /* 5 */
- "links4c", /* 6 */
- "links4d", /* 7 */
- "links5", /* 8 */
- "links6", /* 9 */
- "links7", /* 10 */
- "links8", /* 11 */
- "extlinks0", /* 12: main files */
- "[.tmp]extlinks0", /* 13: */
- "extlinks1", /* 14: target files */
- "[.tmp]extlinks1", /* 15: */
- "extlinks2", /* 16: */
- "[.tmp]extlinks2", /* 17: */
- "extlinks3", /* 18: */
- "[.tmp]extlinks3", /* 19: */
- "extlinks4", /* 20: */
- "[.tmp]extlinks4", /* 21: */
- "extlinks5", /* 22: */
- "[.tmp]extlinks6", /* 23: */
- "extlinks7", /* 24: */
- "[.tmp]extlinks7", /* 25: */
- "[.tmp]extlinks8", /* 26: */
- "extlinks9", /* 27: */
- "[.tmp]extlinks9", /* 28: */
- "extlinks10", /* 29: */ /* TESTS for windows */
- "[.tmp]extlinks10", /* 30: */
- "[.tmp]extlinks11", /* 31: */
- "[.tmp]extlinks12", /* 32: */
- "extlinks13", /* 33: */
- "[.tmp]extlinks13", /* 34: */
- "[.tmp]extlinks14", /* 35: */
- "[.tmp]extlinks15", /* 36: */
- "extlinks16A", /* 37: */ /* TESTS for H5P_set_elink_fapl */
- "extlinks16B", /* 38: */
- "extlinks17", /* 39: */
- "extlinks18A", /* 40: */
- "extlinks18B", /* 41: */
- "extlinks19A", /* 42: */
- "extlinks19B", /* 43: */
- "extlinks20", /* 44: */
- NULL
-};
-#endif // 0
-
-#define TMPDIR "[.tmp]"
-#else
#if 0
const char *FILENAME[] = {
"links0",
@@ -165,7 +111,6 @@ const char *FILENAME[] = {
#endif // 0
#define TMPDIR "tmp"
-#endif
#define FAMILY_SIZE 1024
#define CORE_INCREMENT 1024
@@ -574,16 +519,12 @@ void test_links()
#ifndef H5_NO_DEPRECATED_SYMBOLS
nerrors += test_deprec(my_fapl, new_format);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_mult(my_fapl, new_format) < 0 ? 1 : 0;
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_self(envval, my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_pingpong(envval, my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_recursive(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_query(my_fapl, new_format) < 0 ? 1 : 0;
@@ -591,9 +532,7 @@ void test_links()
nerrors += external_link_unlink_dense(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0;
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_closing(envval, my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0;
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index b3dec14..8ca10a7 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -227,9 +227,9 @@ message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}")
# **********
# INTEGERS
# **********
-string(REGEX REPLACE "," ";" VAR_KIND "${pac_validIntKinds}")
+string(REGEX REPLACE "," ";" VAR "${pac_validIntKinds}")
-foreach( KIND ${VAR_KIND} )
+foreach( KIND ${VAR} )
set(PROG_SRC
"
PROGRAM main
@@ -262,14 +262,14 @@ message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
# **********
# REALS
# **********
-string(REGEX REPLACE "," ";" VAR_KIND "${pac_validRealKinds}")
+string(REGEX REPLACE "," ";" VAR "${pac_validRealKinds}")
#find the maximum kind of the real
-list(LENGTH VAR_KIND LEN_VAR_KIND)
-MATH (EXPR _LEN "${LEN_VAR_KIND} - 1")
-list(GET VAR_KIND ${_LEN} max_real_fortran_kind)
+list(LENGTH VAR LEN_VAR)
+MATH (EXPR _LEN "${LEN_VAR}-1")
+list(GET VAR ${_LEN} max_real_fortran_kind)
-foreach( KIND ${VAR_KIND} )
+foreach( KIND ${VAR} )
set(PROG_SRC
"
PROGRAM main
@@ -299,12 +299,14 @@ set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof =
message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}")
+set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
+
#find the maximum kind of the real
-list(LENGTH VAR_KIND LEN_VAR_KIND)
-MATH (EXPR _LEN "${LEN_VAR_KIND} - 1")
-list(GET VAR_KIND ${_LEN} max_real_fortran_sizeof)
+string(REGEX REPLACE "," ";" VAR "${pack_real_sizeof}")
+list(LENGTH VAR LEN_VAR)
+MATH (EXPR _LEN "${LEN_VAR}-1")
+list(GET VAR ${_LEN} max_real_fortran_sizeof)
-set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
#-----------------------------------------------------------------------------
# Find sizeof of native kinds
#-----------------------------------------------------------------------------
@@ -351,14 +353,18 @@ set(FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})
# remove the invalid kind from the list
if(NOT(${SIZEOF___FLOAT128} EQUAL 0))
- if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof}))
+ if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof})
+ AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})
+ # account for the fact that the C compiler can have 16-byte __float128 and the fortran compiler only has 8-byte doubles,
+ # so we don't want to remove the 8-byte fortran doubles.
+ AND NOT(${PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF} EQUAL ${max_real_fortran_sizeof}))
message(WARNING "
Fortran REAL(KIND=${max_real_fortran_kind}) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size
!!! Fortran interfaces will not be generated for REAL(KIND=${max_real_fortran_kind}) !!!")
string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS ${PAC_FC_ALL_REAL_KINDS})
string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS_SIZEOF ${PAC_FC_ALL_REAL_KINDS_SIZEOF})
MATH (EXPR NUM_RKIND "${NUM_RKIND} - 1")
- endif(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof}))
+ endif()
endif(NOT(${SIZEOF___FLOAT128} EQUAL 0))
set(H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}")
@@ -377,9 +383,7 @@ ENABLE_LANGUAGE (C)
# The provided CMake C macros don't provide a general compile/run function
# so this one is used.
#-----------------------------------------------------------------------------
-MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
-# MSB CHECK WHY THIS CHECK?
-# if (NOT DEFINED ${RUN_RESULT_VAR})
+MACRO (C_RUN FUNCTION CODE RETURN)
message (STATUS "Detecting C ${FUNCTION}")
if (CMAKE_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
@@ -391,7 +395,7 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
${CODE}
)
- TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR}
+ TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
@@ -400,18 +404,14 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
set(${RETURN} ${OUTPUT})
- #message ( "Test result1 ${RETURN} ")
- #message ( "Test result3 ${RESULT} ")
- #message ( "Test result2 ${CMAKE_MATCH_0} ")
- #message ( "Test result4 ${CMAKE_MATCH_1} ")
#message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #message ( "Test result ${COMPILE_RESULT_VAR} ")
+ #message ( "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
#message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #message ( "Test result ${RUN_RESULT_VAR} ")
+ #message ( "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
#message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
if (${COMPILE_RESULT_VAR})
- if (${RUN_RESULT_VAR} MATCHES 0)
+ if (${RUN_RESULT_VAR} MATCHES 1)
set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}")
message (STATUS "Testing C ${FUNCTION} - OK")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
@@ -420,13 +420,14 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
)
else ()
message (STATUS "Testing C ${FUNCTION} - Fail")
- set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}")
+ set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION}")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif ()
+ else ()
+ message (FATAL_ERROR "Compilation of C ${FUNCTION} - Failed")
endif()
-# endif (NOT DEFINED ${RUN_RESULT_VAR})
ENDMACRO (C_RUN)
set(PROG_SRC
@@ -451,17 +452,14 @@ set(PROG_SRC
#else
#define C_LDBL_DIG LDBL_DIG
#endif
- void main() {
+ int main() {
printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\;
+ return 1\\\;
}
"
)
-C_RUN("maximum decimal precision for C" ${PROG_SRC}
- XX
- YY
- PROG_OUTPUT
-)
+C_RUN("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT)
# dnl The output from the above program will be:
# dnl -- LINE 1 -- long double decimal precision
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index cca6e98..4bef99f 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -46,6 +46,8 @@ set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default"
set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
+
set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
diff --git a/config/conclude_fc.am b/config/conclude_fc.am
new file mode 100644
index 0000000..d9e7b56
--- /dev/null
+++ b/config/conclude_fc.am
@@ -0,0 +1,33 @@
+## config/conclude_fc.am
+## (Use double hashes for copyright notice so that automake treats it as
+## comments and does not pass it to Makefile.in)
+## 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 files COPYING and Copyright.html. COPYING can be found at the root
+## of the source code distribution tree; Copyright.html can be found at the
+## root level of an installed copy of the electronic HDF5 document set and
+## is linked from the top-level documents page. It can also be found at
+## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+## access to either file, you may request a copy from help@hdfgroup.org.
+
+
+## Textually included at the end of the Fortran HDF5 Makefiles.am.
+
+# Makefile.am include fragment with Fortran helper rules and macros.
+
+# AM_FCCPPFLAGS, FCCPPFLAGS are currently not used.
+
+PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE)
+
+# Treat all .f90 and .F90 files as preprocessed Fortran.
+.f90.o:
+ $(PPFCCOMPILE) -c -o $@ $(FCFLAGS) $<
+.F90.o:
+ $(PPFCCOMPILE) -c -o $@ $(FCFLAGS) $<
+
+include $(top_srcdir)/config/conclude.am
diff --git a/config/lt_vers.am b/config/lt_vers.am
index ac029c0..0a07eb7 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -19,7 +19,7 @@
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 217
+LT_VERS_REVISION = 220
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/config/pgi-fflags b/config/pgi-fflags
index 6cb8930..8e574e4 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -69,6 +69,7 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
# General
FC_BASENAME=pgf90
+ Fortran_COMPILER_ID=PGI
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""
# Uncomment the following to add something specific for FCFLAGS.
diff --git a/configure.ac b/configure.ac
index 8aa6ed4..827d34c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,17 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.227], [help@hdfgroup.org])
-
-## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING
-## --------------------------------------------------------------------------
-## Requirement #1: Check if Perl is installed.
-##
-AC_SUBST([PERL]) PERL=""
-AC_CHECK_PROG([PERL], [perl],, [$PATH])
-if test "x$PERL" = "xfalse"; then
- AC_MSG_ERROR([*** Perl is required for installing HDF5, but Perl could not be found!])
-fi
+AC_INIT([HDF5], [1.9.230], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADERS([src/H5config.h])
@@ -194,11 +184,13 @@ AC_SUBST([enable_shared])
AC_SUBST([enable_static])
AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a`
AC_SUBST([PAC_C_MAX_REAL_PRECISION])
+AC_SUBST([Fortran_COMPILER_ID])
+Fortran_COMPILER_ID=none
## ----------------------------------------------------------------------
## Some platforms have broken basename, and/or xargs programs. Check
## that it actually does what it's supposed to do. Catch this early
-## since configure and scripts relies upon them heavily and there's
+## since configure and scripts relies upon them heavily and there's
## no use continuing if it's broken.
##
AC_MSG_CHECKING([if basename works])
@@ -346,7 +338,7 @@ AC_ARG_ENABLE([unsupported],
[Allow unsupported combinations of configure options])],
[ALLOW_UNSUPPORTED=$enableval])
-case "X-$ALLOW_UNSUPPORTED" in
+case "X-$ALLOW_UNSUPPORTED" in
X-|X-no)
AC_MSG_RESULT([no])
;;
@@ -427,7 +419,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
[cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc])
AC_SUBST([FC]) HDF_FORTRAN=yes
-
+
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
## --------------------------------------------------------------------
@@ -452,7 +444,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## --------------------------------------------------------------------
## Check for a Fortran compiler and how to include modules.
- ##
+ ##
AC_PROG_FC([PAC_FC_SEARCH_LIST],)
AC_F9X_MODS
@@ -528,7 +520,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_SUBST([H5CONFIG_F_RKIND])
AC_SUBST([H5CONFIG_F_RKIND_SIZEOF])
AC_SUBST([H5CONFIG_F_NUM_IKIND])
- AC_SUBST([H5CONFIG_F_IKIND])
+ AC_SUBST([H5CONFIG_F_IKIND])
+ AC_DEFINE_UNQUOTED([Fortran_COMPILER_ID], $Fortran_COMPILER_ID, [Define Fortran compiler ID])
## Setting definition if there is a 16 byte fortran integer
if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then
@@ -577,28 +570,32 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl get the largest sizeof for REAL kinds
-
- max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`"
- max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`"
+ max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -ne 's/.*,\([[0-9]]*\)\}/\1/p'`"
+ max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | sed -ne 's/.*,\([[0-9]]*\)\}/\1/p'`"
dnl remove the invalid kind from the list
if test "$ac_cv_sizeof___float128" != 0;then
- if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then
- AC_MSG_WARN([
- Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size
- !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!!
- ])
- PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/,\d+}/}/g;'`"
- PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/,\d+}/}/g;'`"
+ if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" &&
+ test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof" &&
+ dnl account for the fact that the C compiler can have 16-byte __float128 and the Fortran compiler only has 8-byte doubles,
+ dnl so we don't want to remove the 8-byte Fortran doubles. This is sometimes the case if different C and Fortran vendors
+ dnl are used (for example gnu and pgi).
+ test "${ac_cv_sizeof_double}" != "$max_real_fortran_sizeof" ; then
+ AC_MSG_WARN([
+ Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size
+ !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!!
+ ])
+ PAC_FC_ALL_REAL_KINDS="`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/,[[0-9]]\+}/}/g'`"
+ PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/,[[0-9]]\+}/}/g'`"
fi
fi
AC_MSG_CHECKING([for Fortran interoperable KINDS with C])
AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS])
dnl count the number of real kinds
- H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = (<STDIN> =~ tr/,//);print $count+1'`"
- H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)"
- H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)"
+ H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | tr -d -c ',\n' | awk '{ print length + 1; }'`"
+ H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)"
+ H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)"
AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])
@@ -638,8 +635,8 @@ if test "X$HDF_CXX" = "Xyes"; then
# Checking if C++ can handle namespaces
PAC_PROG_CXX_NAMESPACE
-
- # Checking if C++ has offsetof extension
+
+ # Checking if C++ has offsetof extension
PAC_PROG_CXX_OFFSETOF
# if C++ can handle static cast
@@ -788,7 +785,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
H5_FORTRAN_SHARED="yes"
## Disable fortran shared libraries on Mac. (MAM - 03/30/11)
-
+
case "`uname`" in
Darwin*)
H5_FORTRAN_SHARED="no"
@@ -797,7 +794,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
esac
## Report results of check(s)
-
+
if test "X${H5_FORTRAN_SHARED}" = "Xno"; then
AC_MSG_RESULT([no])
AC_MSG_WARN([$CHECK_WARN])
@@ -831,7 +828,7 @@ LT_INIT([dlopen,win32-dll])
## ----------------------------------------------------------------------
## Check if we should install only statically linked executables.
## This check needs to occur after libtool is initialized because
-## we check a libtool cache value and may issue a warning based
+## we check a libtool cache value and may issue a warning based
## on its result.
AC_MSG_CHECKING([if we should install only statically linked executables])
AC_ARG_ENABLE([static_exec],
@@ -1026,11 +1023,11 @@ fi
## ----------------------------------------------------------------------
## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines
-## that might need to be set for largefile support to behave
+## that might need to be set for largefile support to behave
## correctly. This macro is defined in acsite.m4 and overrides
## the version provided by Autoconf (as of v2.65). The custom
-## macro additionally adds the appropriate defines to AM_CPPFLAGS
-## so that later configure checks have them visible.
+## macro additionally adds the appropriate defines to AM_CPPFLAGS
+## so that later configure checks have them visible.
## Check for _FILE_OFFSET_BITS
_AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64],
@@ -1051,16 +1048,16 @@ fi
##
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
- ## Make available various LFS-related routines using the following
+ ## Make available various LFS-related routines using the following
## _LARGEFILE*_SOURCE macros.
AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS"
## Add POSIX support on Linux systems, so <features.h> defines
## __USE_POSIX, which is required to get the prototype for fdopen
- ## defined correctly in <stdio.h>.
+ ## defined correctly in <stdio.h>.
##
## This flag was removed from h5cc as of 2009-10-17 when it was found
- ## that the flag broke compiling netCDF-4 code with h5cc, but kept in
+ ## that the flag broke compiling netCDF-4 code with h5cc, but kept in
## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen
## is used only by H5_debug_mask which is used only when debugging in
## H5_init_library (all in H5.c). When the flag was removed this was
@@ -1087,7 +1084,7 @@ case "$host_cpu-$host_vendor-$host_os" in
## correctly in <stdio.h>
## Linking to the bsd-compat library is required as per the gcc manual:
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- ## however, we do not do this since it breaks the big test on some
+ ## however, we do not do this since it breaks the big test on some
## older platforms.
H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS"
@@ -1098,7 +1095,7 @@ case "$host_cpu-$host_vendor-$host_os" in
;;
esac
-## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
+## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
## for configure checks.
## Note: Both will be restored by the end of configure.
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
@@ -1409,17 +1406,17 @@ case $withval in
fi
;;
esac
-
+
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
-
+
if test -n "$szlib_inc"; then
CPPFLAGS="$CPPFLAGS -I$szlib_inc"
AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc"
fi
-
+
AC_CHECK_HEADERS([szlib.h],
[HAVE_SZLIB_H="yes"],
[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB])
@@ -1428,7 +1425,7 @@ case $withval in
LDFLAGS="$LDFLAGS -L$szlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
-
+
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
[LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
@@ -1445,7 +1442,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_MSG_CHECKING([for szlib encoder])
## Set LD_LIBRARY_PATH so encoder test can find the library and run.
- ## Also add LL_PATH substitution to Makefiles so they can use the
+ ## Also add LL_PATH substitution to Makefiles so they can use the
## path as well, for testing examples.
if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
@@ -1468,25 +1465,25 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
]])]
, [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]
)
-
- AC_DEFINE([HAVE_FILTER_SZIP], [1],
+
+ AC_DEFINE([HAVE_FILTER_SZIP], [1],
[Define if support for szip filter is enabled])
USE_FILTER_SZIP="yes"
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
AC_MSG_RESULT([yes])
- fi
+ fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
AC_MSG_RESULT([no])
- fi
-
+ fi
+
## Add "szip" to external filter list
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
- fi
+ fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
@@ -1550,7 +1547,7 @@ case "X-$THREADSAFE" in
AC_MSG_RESULT([no])
;;
X-yes)
- THREADSAFE=yes
+ THREADSAFE=yes
AC_MSG_RESULT([yes])
;;
*)
@@ -1857,7 +1854,7 @@ for hdf5_cv_printf_ll in l ll L q unknown; do
done])
AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u])
-AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
+AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
[Width for printf() for type `long long' or `__int64', use `ll'])
@@ -2176,7 +2173,7 @@ if test -n "$PARALLEL"; then
fi
## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with
- ## the empty string. This means that no launch commands were requested,
+ ## the empty string. This means that no launch commands were requested,
## so we will not use any launch commands.
if test "X$RUNSERIAL" = "Xnone"; then
RUNSERIAL=""
@@ -2242,7 +2239,7 @@ if test -n "$PARALLEL"; then
fi
;;
esac
-
+
if test -n "$mpe_inc"; then
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
@@ -2252,7 +2249,7 @@ if test -n "$PARALLEL"; then
else
AC_CHECK_HEADERS([mpe.h],, [unset MPE])
fi
-
+
if test -n "$mpe_lib"; then
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
@@ -2336,12 +2333,12 @@ AC_DEFINE_UNQUOTED([DEFAULT_PLUGINDIR], ["$default_plugindir"],
## Decide whether the presence of user's exception handling functions is
## checked and data conversion exceptions are returned. This is mainly
## for the speed optimization of hard conversions. Soft conversions can
-## actually benefit little.
+## actually benefit little.
##
AC_MSG_CHECKING([whether exception handling functions is checked during data conversions])
AC_ARG_ENABLE([dconv-exception],
[AS_HELP_STRING([--enable-dconv-exception],
- [if exception handling functions is checked during
+ [if exception handling functions is checked during
data conversions [default=yes]])],
[DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes])
@@ -2395,9 +2392,9 @@ esac
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm to convert
-## 'long double' to '(unsigned) long' values. (This flag should only be set for
-## the IBM Power6 Linux. When the bit sequence of long double is
-## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
+## 'long double' to '(unsigned) long' values. (This flag should only be set for
+## the IBM Power6 Linux. When the bit sequence of long double is
+## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
## The machine's conversion gets the correct value. We define the macro and disable
## this kind of test until we figure out what algorithm they use.
@@ -2418,12 +2415,12 @@ else
unsigned char s[16];
unsigned char s2[8];
int ret = 1;
-
+
if(sizeof(long double) == 16 && sizeof(long) == 8) {
- /*make sure the long double type has 16 bytes in size and
+ /*make sure the long double type has 16 bytes in size and
* 11 bits of exponent. If it is,
- *the bit sequence should be like below. It's not
- *a decent way to check but this info isn't available. */
+ *the bit sequence should be like below. It's not
+ *a decent way to check but this info isn't available. */
memcpy(s, &ld, 16);
if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
@@ -2457,8 +2454,8 @@ else
if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
ret = 0;
- }
- }
+ }
+ }
exit(ret);
]])]
, [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)])
@@ -2474,10 +2471,10 @@ fi
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm
-## to convert some values of '(unsigned) long' to 'long double' values.
-## (This flag should be off for all machines, except for IBM Power6 Linux,
-## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
-## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
+## to convert some values of '(unsigned) long' to 'long double' values.
+## (This flag should be off for all machines, except for IBM Power6 Linux,
+## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
+## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
## macro and skip the test for now until we know about the algorithm.
##
AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values])
@@ -2495,17 +2492,17 @@ else
unsigned long ull;
unsigned char s[16];
int flag=0, ret=1;
-
+
/*Determine if long double has 16 byte in size, 11 bit exponent, and
- *the bias is 0x3ff */
- if(sizeof(long double) == 16) {
+ *the bias is 0x3ff */
+ if(sizeof(long double) == 16) {
ld = 1.0L;
memcpy(s, &ld, 16);
if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
- flag = 1;
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
+ flag = 1;
}
-
+
if(flag==1 && sizeof(long)==8) {
ll = 0x003fffffffffffffL;
ld = (long double)ll;
@@ -2521,7 +2518,7 @@ else
s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
ret = 0;
- }
+ }
if(flag==1 && sizeof(unsigned long)==8) {
ull = 0xffffffffffffffffUL;
ld = (long double)ull;
@@ -2539,7 +2536,7 @@ else
s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
ret = 0;
- }
+ }
exit(ret);
]])]
, [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)])
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index f2dc896..aad5f33 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -52,7 +52,7 @@ foreach (example ${examples})
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f90_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ")
@@ -66,7 +66,7 @@ foreach (example ${examples})
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${examples})
foreach (example ${F2003_examples})
@@ -83,7 +83,7 @@ foreach (example ${F2003_examples})
FOLDER examples/fortran03
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ")
@@ -97,7 +97,7 @@ foreach (example ${F2003_examples})
FOLDER examples/fortran03
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${F2003_examples})
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
@@ -115,7 +115,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ")
@@ -130,7 +130,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
if (BUILD_TESTING)
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 173984c..63e75c2 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -9,12 +9,12 @@
add_test (
NAME f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
compound.h5
copy1.h5
copy2.h5
dsetf.h5
- extend.h5
+ extend.h5
FORTRAN.h5
groupf.h5
groupsf.h5
@@ -28,16 +28,16 @@
set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex-clear-objects")
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (
NAME f90_ex-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
compound.h5
copy1.h5
copy2.h5
dsetf.h5
- extend.h5
+ extend.h5
FORTRAN.h5
groupf.h5
groupsf.h5
@@ -51,7 +51,7 @@
set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex-shared-clear-objects")
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
foreach (example ${examples})
add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
@@ -59,13 +59,13 @@ foreach (example ${examples})
set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex_${example}")
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME f90_ex-shared_${example} COMMAND $<TARGET_FILE:f90_ex_${example}-shared>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex-shared_${example}")
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${examples})
if (HDF5_ENABLE_F2003)
@@ -75,19 +75,19 @@ if (HDF5_ENABLE_F2003)
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f03_ex_${example}")
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME f03_ex-shared_${example} COMMAND $<TARGET_FILE:f03_ex_${example}-shared>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f03_ex-shared_${example}")
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${F2003_examples})
endif (HDF5_ENABLE_F2003)
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index cdd9317..5a3b09e 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -107,4 +107,4 @@ compound_fortran2003: compound_fortran2003.f90
compound_complex_fortran2003: compound_complex_fortran2003.f90
include $(top_srcdir)/config/examples.am
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 8f63b3c..d97e625 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -35,6 +35,8 @@ endif(HAVE_FLOAT128)
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY)
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY)
+set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
+
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
# H5_buildiface.F90 used to generate various KIND interfaces
@@ -62,7 +64,22 @@ set_target_properties (H5_buildiface PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ if (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE})
+ else (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ endif (WIN32)
+else (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ if (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE})
+ else (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ endif (WIN32)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+
+INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR})
+
#-----------------------------------------------------------------------------
add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
@@ -118,7 +135,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
)
set (install_targets ${HDF5_F90_C_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS})
@@ -132,7 +149,7 @@ if (BUILD_SHARED_LIBS)
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE)
@@ -206,7 +223,7 @@ if (WIN32)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
@@ -233,7 +250,7 @@ if (BUILD_SHARED_LIBS)
)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
@@ -251,20 +268,6 @@ install (
fortheaders
)
-if (BUILD_SHARED_LIBS)
- if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE})
- else (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- endif (WIN32)
-else (BUILD_SHARED_LIBS)
- if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE})
- else (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- endif (WIN32)
-endif (BUILD_SHARED_LIBS)
-
set (mod_files
${MOD_BUILD_DIR}/h5fortran_types.mod
${MOD_BUILD_DIR}/hdf5.mod
@@ -298,10 +301,10 @@ install (
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
#INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
install (
TARGETS
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index afdb5ba..e44d90e 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -1094,8 +1094,7 @@ CONTAINS
offset = h5dget_offset(dset_id)
- hdferr = 0
- IF(offset .LT. 0) hdferr = -1
+ hdferr = 0 ! never returns a function error because C API never returns a function error.
END SUBROUTINE h5dget_offset_f
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index e527dce..f3bc42f 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -436,11 +436,12 @@ h5close_types_c( hid_t_f * types, int_f *lentypes,
*/
int_f
h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
- int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
- hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags)
+ int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
+ int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
+ int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
+ hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
+ hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
+ haddr_t_f *h5_haddr_generic_flags)
/******/
{
int ret_value = -1;
@@ -773,7 +774,9 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
- h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+ h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+
+ h5_haddr_generic_flags[0] = (haddr_t_f)HADDR_UNDEF; /* undefined address */
ret_value = 0;
return ret_value;
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 4ceb1a8..169864f 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -105,16 +105,17 @@ CONTAINS
i_H5S_hsize_flags, &
i_H5T_flags, &
i_H5Z_flags, &
- i_H5generic_flags) &
+ i_H5generic_flags, &
+ i_H5generic_haddr_flags) &
BIND(C,NAME='h5init_flags_c')
- IMPORT :: HID_T, SIZE_T, HSIZE_T
+ IMPORT :: HID_T, SIZE_T, HSIZE_T, HADDR_T
IMPORT :: H5D_FLAGS_LEN, H5D_SIZE_FLAGS_LEN, &
H5E_FLAGS_LEN, H5E_HID_FLAGS_LEN, &
H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, &
H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, &
H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, &
H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, &
- H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN
+ H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN, H5generic_haddr_FLAGS_LEN
IMPLICIT NONE
INTEGER i_H5D_flags(H5D_FLAGS_LEN)
INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN)
@@ -135,6 +136,7 @@ CONTAINS
INTEGER i_H5T_flags(H5T_FLAGS_LEN)
INTEGER i_H5Z_flags(H5Z_FLAGS_LEN)
INTEGER i_H5generic_flags(H5generic_FLAGS_LEN)
+ INTEGER(HADDR_T) i_H5generic_haddr_flags(H5generic_haddr_FLAGS_LEN)
END FUNCTION h5init_flags_c
END INTERFACE
INTERFACE
@@ -164,7 +166,8 @@ CONTAINS
H5S_hsize_flags, &
H5T_flags, &
H5Z_flags, &
- H5generic_flags)
+ H5generic_flags,&
+ H5generic_haddr_flags)
error_3 = h5init1_flags_c(H5LIB_flags )
error = error_1 + error_2 + error_3
END SUBROUTINE h5open_f
diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake
index cc36889..f0b3472 100644
--- a/fortran/src/H5config_f.inc.cmake
+++ b/fortran/src/H5config_f.inc.cmake
@@ -82,3 +82,6 @@
! valid INTEGER KINDs (need to have a matching C counter-part)
#define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@
+
+! Fortran compiler id
+#define H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@
diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in
index 64c3a0c..9f094d2 100644
--- a/fortran/src/H5config_f.inc.in
+++ b/fortran/src/H5config_f.inc.in
@@ -57,3 +57,6 @@
! valid INTEGER KINDs (need to have a matching C counter-part)
#undef H5CONFIG_F_IKIND
+! Fortran compiler name
+#undef Fortran_COMPILER_ID
+
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index c88327c..947eff4 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -316,6 +316,18 @@ MODULE H5GLOBAL
EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F)
EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F)
EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F)
+
+ INTEGER, PARAMETER :: H5generic_haddr_FLAGS_LEN = 1
+ INTEGER(HADDR_T) :: H5generic_haddr_flags(H5generic_haddr_FLAGS_LEN)
+ !DEC$if defined(BUILD_HDF5_DLL)
+ !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_haddr_FLAGS/
+ !DEC$endif
+ COMMON /H5generic_haddr_FLAGS/ H5generic_haddr_flags
+
+ INTEGER(HADDR_T) :: HADDR_UNDEF_F
+
+ EQUIVALENCE(H5generic_haddr_flags(1), HADDR_UNDEF_F)
+
!
! H5G flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index b26e985..1d08d7e 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -23,9 +23,6 @@
H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len);
H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
-#ifdef H5_VMS
-#define H5_FC_FUNC_(name, NAME) NAME
-#endif /*H5_VMS*/
/*
* Storage info struct used by H5O_info_t and H5F_info_t
@@ -527,10 +524,11 @@ H5_FCDLL int_f h5close_c(void);
H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen);
H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
- hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags);
+ int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
+ int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
+ hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
+ hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
+ haddr_t_f *h5_haddr_generic_flags);
H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags);
H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 734f46e..eb45f60 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -58,9 +58,8 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5)
DISTCLEANFILES=h5fc
# H5fortran_types.F90 and H5f90i.h are automatically generaed by
-# H5match_types, and must be cleaned explicitly. H5fort_type_defines.h
-# is generated by H5fortran_detect
-MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h
+# H5match_types, and must be cleaned explicitly.
+MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
@@ -167,4 +166,4 @@ HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \
H5Off.lo H5Pff.lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 7b218ca..1333262 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -35,6 +35,8 @@ H5A_mp_H5ACREATE_BY_NAME_F
H5A_mp_H5AEXISTS_F
H5A_mp_H5AEXISTS_BY_NAME_F
H5A_mp_H5AOPEN_BY_NAME_F
+H5A_mp_H5AWRITE_PTR
+H5A_mp_H5AREAD_PTR
H5A_mp_H5ARENAME_F
; H5D
H5D_mp_H5DCREATE_F
@@ -62,6 +64,7 @@ H5D_mp_H5DFILL_CHAR
H5D_mp_H5DFILL_INTEGER
H5D_mp_H5DGET_SPACE_STATUS_F
H5D_mp_H5DCREATE_ANON_F
+H5D_mp_H5DGET_OFFSET_F
H5D_mp_H5DGET_SPACE_F
H5D_mp_H5DGET_TYPE_F
H5D_mp_H5DSET_EXTENT_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 19d4975..692cc4d 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -22,7 +22,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
@@ -37,13 +37,13 @@ if (BUILD_SHARED_LIBS)
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran)
add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
@@ -64,7 +64,7 @@ if (WIN32)
COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
)
endif (WIN32)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
set (SHARED_LINK_FLAGS "/DLL")
@@ -90,7 +90,7 @@ if (BUILD_SHARED_LIBS)
COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS"
)
endif (WIN32)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -132,25 +132,25 @@ add_custom_command (
#-- Adding test for testhdf5_fortran
add_executable (testhdf5_fortran
- fortranlib_test.f90
- tH5A.f90
- tH5D.f90
- tH5E.f90
- tH5F.f90
- tH5G.f90
- tH5I.f90
- tH5P.f90
- tH5R.f90
- tH5S.f90
- tH5Sselect.f90
- tH5T.f90
- tH5VL.f90
- tH5Z.f90
- tHDF5.f90
+ fortranlib_test.F90
+ tH5A.F90
+ tH5D.F90
+ tH5E.F90
+ tH5F.F90
+ tH5G.F90
+ tH5I.F90
+ tH5P.F90
+ tH5R.F90
+ tH5S.F90
+ tH5Sselect.F90
+ tH5T.F90
+ tH5VL.F90
+ tH5Z.F90
+ tHDF5.F90
)
TARGET_NAMING (testhdf5_fortran STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ")
-target_link_libraries (testhdf5_fortran
+target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -164,27 +164,27 @@ set_target_properties (testhdf5_fortran PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (testhdf5_fortran-shared
- fortranlib_test.f90
- tH5A.f90
- tH5D.f90
- tH5E.f90
- tH5F.f90
- tH5G.f90
- tH5I.f90
- tH5P.f90
- tH5R.f90
- tH5S.f90
- tH5Sselect.f90
- tH5T.f90
- tH5VL.f90
- tH5Z.f90
- tHDF5.f90
+ fortranlib_test.F90
+ tH5A.F90
+ tH5D.F90
+ tH5E.F90
+ tH5F.F90
+ tH5G.F90
+ tH5I.F90
+ tH5P.F90
+ tH5R.F90
+ tH5S.F90
+ tH5Sselect.F90
+ tH5T.F90
+ tH5VL.F90
+ tH5Z.F90
+ tHDF5.F90
)
TARGET_NAMING (testhdf5_fortran-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran-shared
+ target_link_libraries (testhdf5_fortran-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -198,20 +198,20 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for testhdf5_fortran_1_8
add_executable (testhdf5_fortran_1_8
- fortranlib_test_1_8.f90
- tH5O.f90
- tH5A_1_8.f90
- tH5G_1_8.f90
- tH5MISC_1_8.f90
- tHDF5_1_8.f90
+ fortranlib_test_1_8.F90
+ tH5O.F90
+ tH5A_1_8.F90
+ tH5G_1_8.F90
+ tH5MISC_1_8.F90
+ tHDF5_1_8.F90
)
TARGET_NAMING (testhdf5_fortran_1_8 STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ")
-target_link_libraries (testhdf5_fortran_1_8
+target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -225,18 +225,18 @@ set_target_properties (testhdf5_fortran_1_8 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (testhdf5_fortran_1_8-shared
- fortranlib_test_1_8.f90
- tH5O.f90
- tH5A_1_8.f90
- tH5G_1_8.f90
- tH5MISC_1_8.f90
- tHDF5_1_8.f90
+ fortranlib_test_1_8.F90
+ tH5O.F90
+ tH5A_1_8.F90
+ tH5G_1_8.F90
+ tH5MISC_1_8.F90
+ tHDF5_1_8.F90
)
TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran_1_8-shared
+ target_link_libraries (testhdf5_fortran_1_8-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -250,22 +250,22 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fortranlib_test_F03
add_executable (fortranlib_test_F03
- fortranlib_test_F03.f90
- tH5E_F03.f90
- tH5F_F03.f90
- tH5L_F03.f90
- tH5O_F03.f90
- tH5P_F03.f90
+ fortranlib_test_F03.F90
+ tH5E_F03.F90
+ tH5F_F03.F90
+ tH5L_F03.F90
+ tH5O_F03.F90
+ tH5P_F03.F90
tH5T_F03.F90
- tHDF5_F03.f90
+ tHDF5_F03.F90
)
TARGET_NAMING (fortranlib_test_F03 STATIC)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ")
-target_link_libraries (fortranlib_test_F03
+target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -279,20 +279,20 @@ set_target_properties (fortranlib_test_F03 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fortranlib_test_F03-shared
- fortranlib_test_F03.f90
- tH5E_F03.f90
- tH5F_F03.f90
- tH5L_F03.f90
- tH5O_F03.f90
- tH5P_F03.f90
+ fortranlib_test_F03.F90
+ tH5E_F03.F90
+ tH5F_F03.F90
+ tH5L_F03.F90
+ tH5O_F03.F90
+ tH5P_F03.F90
tH5T_F03.F90
- tHDF5_F03.f90
+ tHDF5_F03.F90
)
TARGET_NAMING (fortranlib_test_F03-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ")
- target_link_libraries (fortranlib_test_F03-shared
+ target_link_libraries (fortranlib_test_F03-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -306,13 +306,13 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fflush1
-add_executable (fflush1 fflush1.f90)
+add_executable (fflush1 fflush1.F90)
TARGET_NAMING (fflush1 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ")
-target_link_libraries (fflush1
+target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -326,11 +326,11 @@ set_target_properties (fflush1 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
- add_executable (fflush1-shared fflush1.f90)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ add_executable (fflush1-shared fflush1.F90)
TARGET_NAMING (fflush1-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ")
- target_link_libraries (fflush1-shared
+ target_link_libraries (fflush1-shared
${HDF5_F90_LIBSH_TARGET}
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -344,13 +344,13 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fflush2
-add_executable (fflush2 fflush2.f90)
+add_executable (fflush2 fflush2.F90)
TARGET_NAMING (fflush2 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ")
-target_link_libraries (fflush2
+target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -364,11 +364,11 @@ set_target_properties (fflush2 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
- add_executable (fflush2-shared fflush2.f90)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ add_executable (fflush2-shared fflush2.F90)
TARGET_NAMING (fflush2-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ")
- target_link_libraries (fflush2-shared
+ target_link_libraries (fflush2-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -382,6 +382,6 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
include (CMakeTests.cmake)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 94f6b64..154e70c 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -27,7 +27,7 @@ add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME FORTRAN_testhdf5_fortran-shared COMMAND $<TARGET_FILE:testhdf5_fortran-shared>)
set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
@@ -51,4 +51,4 @@ if (BUILD_SHARED_LIBS)
#-- Adding test for fflush2
add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>)
set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 608b1e9..c12233c 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -48,18 +48,18 @@ libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c
fortranlib_test_FCFLAGS=$(AM_FCFLAGS)
fortranlib_test_CFLAGS=$(AM_CFLAGS)
-fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \
- tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90
+fortranlib_test_SOURCES = tH5F.F90 tH5D.F90 tH5R.F90 tH5S.F90 tH5T.F90 tH5VL.F90 tH5Z.F90 \
+ tH5Sselect.F90 tH5P.F90 tH5A.F90 tH5I.F90 tH5G.F90 tH5E.F90 tHDF5.F90 fortranlib_test.F90
-fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \
- fortranlib_test_1_8.f90
+fortranlib_test_1_8_SOURCES = tH5O.F90 tH5A_1_8.F90 tH5G_1_8.F90 tH5MISC_1_8.F90 tHDF5_1_8.F90 \
+ fortranlib_test_1_8.F90
-fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \
- tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90
+fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5F_F03.F90 tH5L_F03.F90 \
+ tH5O_F03.F90 tH5P_F03.F90 tH5T_F03.F90 tHDF5_F03.F90 fortranlib_test_F03.F90
-fflush1_SOURCES=fflush1.f90
-fflush2_SOURCES=fflush2.f90
+fflush1_SOURCES=fflush1.F90
+fflush2_SOURCES=fflush2.F90
# The tests depend on both fortran libraries and both main libraries.
LDADD=libh5test_fortran.la $(LIBH5TEST) $(LIBH5F) $(LIBHDF5)
@@ -106,4 +106,4 @@ H5_test_buildiface_LDADD =
fflush2.chkexe_: fflush1.chkexe_
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.F90
index ca2550f..ca2550f 100644
--- a/fortran/test/fflush1.f90
+++ b/fortran/test/fflush1.F90
diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.F90
index 4230832..4230832 100644
--- a/fortran/test/fflush2.f90
+++ b/fortran/test/fflush2.F90
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.F90
index 79ff161..c3e995b 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.F90
@@ -94,6 +94,12 @@ PROGRAM fortranlibtest
CALL extenddsettest(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Extendible dataset test', total_error)
+! -- DISABLE TEST FOR PGI COMPILER DUE TO COMPILER BUG -- 8/2015 -- HDFFV-9498
+!#if H5_Fortran_COMPILER_ID!=PGI
+! CALL test_userblock_offset(cleanup, ret_total_error)
+! CALL write_test_status(ret_total_error, ' Dataset offset with user block', total_error)
+!#endif
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing DATASPACE Interface '
diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.F90
index 320d661..320d661 100644
--- a/fortran/test/fortranlib_test_1_8.f90
+++ b/fortran/test/fortranlib_test_1_8.F90
diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.F90
index 5b386b9..5b386b9 100644
--- a/fortran/test/fortranlib_test_F03.f90
+++ b/fortran/test/fortranlib_test_F03.F90
diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.F90
index 5b814fa..5b814fa 100644
--- a/fortran/test/tH5A.f90
+++ b/fortran/test/tH5A.F90
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.F90
index c70e288..c70e288 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.F90
diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.F90
index b5febb3..c9ba952 100644
--- a/fortran/test/tH5D.f90
+++ b/fortran/test/tH5D.F90
@@ -343,7 +343,7 @@ CONTAINS
!Modify dataset creation properties, i.e. enable chunking
!
CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error)
- CALL check("h5pcreat_f",error,total_error)
+ CALL check("h5pcreate_f",error,total_error)
CALL h5pset_chunk_f(crp_list, RANK, dims1, error)
CALL check("h5pset_chunk_f",error,total_error)
@@ -508,5 +508,123 @@ CONTAINS
RETURN
END SUBROUTINE extenddsettest
+
+!
+! The following subroutine tests h5dget_offset_f functionality
+!
+
+ SUBROUTINE test_userblock_offset(cleanup, total_error)
+
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+ !
+ !the dataset is stored in file "offset.h5"
+ !
+ INTEGER, PARAMETER :: dset_dim1=2, dset_dim2=10
+ CHARACTER(LEN=6), PARAMETER :: filename = "offset"
+ CHARACTER(LEN=80) :: fix_filename
+
+ INTEGER(hid_t) :: file, fcpl, dataset, space
+ INTEGER :: i, j, n, ios
+ INTEGER(hsize_t), DIMENSION(1:2) :: dims
+ INTEGER :: f
+ INTEGER(haddr_t) :: offset
+ INTEGER, DIMENSION(1:dset_dim1,1:dset_dim2), TARGET :: rdata, data_in
+ INTEGER :: error
+ TYPE(C_PTR) :: f_ptr
+ !
+ !Create a new file using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ WRITE(*,*) "Cannot modify filename"
+ STOP
+ ENDIF
+
+ CALL h5pcreate_f(H5P_FILE_CREATE_F, fcpl, error)
+ CALL check("h5pcreate_f",error,total_error)
+
+ ! Initialize the dataset
+ n = 0
+ DO i = 1, dset_dim1
+ DO j = 1, dset_dim2
+ n = n + 1
+ data_in(i,j) = n
+ END DO
+ END DO
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file, error, fcpl)
+ CALL check("h5fcreate_f",error,total_error)
+
+ ! Create the data space
+ dims(1:2) = (/dset_dim1,dset_dim2/)
+
+ CALL h5screate_simple_f(2, dims, space, error)
+ CALL check("h5screate_simple_f",error,total_error)
+
+ ! Create the dataset
+ CALL h5dcreate_f(file, "dset1", H5T_NATIVE_INTEGER, space, dataset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Test dataset address. Should be undefined.
+ CALL h5dget_offset_f(dataset, offset, error)
+ CALL VERIFY("h5dget_offset_f",offset, HADDR_UNDEF_F, total_error)
+
+ ! Write the data to the dataset
+ f_ptr = C_LOC(data_in(1,1))
+ CALL h5dwrite_f(dataset, H5T_NATIVE_INTEGER, f_ptr, error)
+ CALL check("h5dwrite_f", error, total_error)
+
+ ! Test dataset address in file. Open the same file as a C file, seek
+ ! the data position as H5Dget_offset points to, read the dataset, and
+ ! compare it with the data written in.
+ CALL h5dget_offset_f(dataset, offset, error)
+ CALL check("h5dget_offset_f", error, total_error)
+ IF(offset.EQ.HADDR_UNDEF_F)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ CALL h5dclose_f(dataset, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5fclose_f(file, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ IF(total_error.NE.0) RETURN
+
+ OPEN(10,FILE=fix_filename, ACCESS="STREAM", IOSTAT=ios)
+ IF(ios.NE.0)THEN
+ WRITE(*,'(A)') "Failed to open file "//TRIM(fix_filename)
+ total_error = total_error + 1
+ RETURN
+ ENDIF
+ ! The pos= specifier illustrates that positions are in bytes,
+ ! starting from byte 1 (as opposed to C, where they start from byte 0)
+ READ(10, POS=offset+1, IOSTAT=ios) rdata
+ IF(ios.NE.0)THEN
+ WRITE(*,'(A)') "Failed to read data from stream I/O "
+ total_error = total_error + 1
+ CLOSE(10)
+ RETURN
+ ENDIF
+
+ ! Check that the values read are the same as the values written
+ DO i = 1, dset_dim1
+ DO j = 1, dset_dim2
+ CALL VERIFY("h5dget_offset_f",rdata(i,j), data_in(i,j), total_error)
+ IF(total_error.NE.0)THEN
+ WRITE(*,'(A)') " Read different values than written."
+ WRITE(*,'(2(A,I0))') " At index ",i,",",j
+ CLOSE(10)
+ RETURN
+ ENDIF
+ END DO
+ END DO
+
+ CLOSE(10)
+
+ END SUBROUTINE test_userblock_offset
+
END MODULE TH5D
diff --git a/fortran/test/tH5E.f90 b/fortran/test/tH5E.F90
index 10ecaf6..10ecaf6 100644
--- a/fortran/test/tH5E.f90
+++ b/fortran/test/tH5E.F90
diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.F90
index 63e70a3..63e70a3 100644
--- a/fortran/test/tH5E_F03.f90
+++ b/fortran/test/tH5E_F03.F90
diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.F90
index 0b3c275..0b3c275 100644
--- a/fortran/test/tH5F.f90
+++ b/fortran/test/tH5F.F90
diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.F90
index 9e23d19..9e23d19 100644
--- a/fortran/test/tH5F_F03.f90
+++ b/fortran/test/tH5F_F03.F90
diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.F90
index 2ba174c..2ba174c 100644
--- a/fortran/test/tH5G.f90
+++ b/fortran/test/tH5G.F90
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.F90
index ddc3736..ddc3736 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.F90
diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.F90
index 97c48c6..97c48c6 100644
--- a/fortran/test/tH5I.f90
+++ b/fortran/test/tH5I.F90
diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.F90
index 40afdbc..40afdbc 100644
--- a/fortran/test/tH5L_F03.f90
+++ b/fortran/test/tH5L_F03.F90
diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.F90
index ba3f095..ba3f095 100644
--- a/fortran/test/tH5MISC_1_8.f90
+++ b/fortran/test/tH5MISC_1_8.F90
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.F90
index 51e1d64..51e1d64 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.F90
diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.F90
index 834308b..834308b 100644
--- a/fortran/test/tH5O_F03.f90
+++ b/fortran/test/tH5O_F03.F90
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.F90
index 39d8c1e..39d8c1e 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.F90
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.F90
index ec9fef2..ec9fef2 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.F90
diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.F90
index ef392b4..ef392b4 100644
--- a/fortran/test/tH5R.f90
+++ b/fortran/test/tH5R.F90
diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.F90
index 7223772..7223772 100644
--- a/fortran/test/tH5S.f90
+++ b/fortran/test/tH5S.F90
diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.F90
index aeb80e9..aeb80e9 100644
--- a/fortran/test/tH5Sselect.f90
+++ b/fortran/test/tH5Sselect.F90
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.F90
index efbceea..efbceea 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.F90
diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.F90
index 834fbde..834fbde 100644
--- a/fortran/test/tH5VL.f90
+++ b/fortran/test/tH5VL.F90
diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.F90
index 4201960..4201960 100644
--- a/fortran/test/tH5Z.f90
+++ b/fortran/test/tH5Z.F90
diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.F90
index d12bb25..d12bb25 100644
--- a/fortran/test/tHDF5.f90
+++ b/fortran/test/tHDF5.F90
diff --git a/fortran/test/tHDF5_1_8.f90 b/fortran/test/tHDF5_1_8.F90
index 9d1c3ec..9d1c3ec 100644
--- a/fortran/test/tHDF5_1_8.f90
+++ b/fortran/test/tHDF5_1_8.F90
diff --git a/fortran/test/tHDF5_F03.f90 b/fortran/test/tHDF5_F03.F90
index 3dbec11..3dbec11 100644
--- a/fortran/test/tHDF5_F03.f90
+++ b/fortran/test/tHDF5_F03.F90
diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am
index 517a3c8..380f475 100644
--- a/fortran/testpar/Makefile.am
+++ b/fortran/testpar/Makefile.am
@@ -50,4 +50,4 @@ LDADD=$(LIBH5FTEST) $(LIBH5TEST) $(LIBH5F) $(LIBHDF5)
# Mark this directory as part of the Fortran API
FORTRAN_API=yes
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am
index 6a5032b..997da73 100644
--- a/hl/fortran/examples/Makefile.am
+++ b/hl/fortran/examples/Makefile.am
@@ -64,4 +64,4 @@ EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# and fortran libraries above.
include $(top_srcdir)/config/examples.am
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 9d110a8..5df4e1d 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -36,6 +36,20 @@ set_target_properties (H5HL_buildiface PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ if (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE})
+ else (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ endif (WIN32)
+else (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ if (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE})
+ else (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ endif (WIN32)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
@@ -44,6 +58,7 @@ INCLUDE_DIRECTORIES (
${HDF5_F90_SRC_DIR}/src
${HDF5_F90_BINARY_DIR}
${CMAKE_Fortran_MODULE_DIRECTORY}
+ ${MOD_BUILD_DIR}
)
#-----------------------------------------------------------------------------
@@ -72,7 +87,7 @@ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
)
set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
@@ -86,7 +101,7 @@ if (BUILD_SHARED_LIBS)
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Fortran Modules
@@ -134,13 +149,13 @@ set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
if (WIN32)
- set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
+ set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
@@ -158,30 +173,17 @@ if (BUILD_SHARED_LIBS)
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
if (WIN32)
- set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET}
+ set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS"
)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-if (BUILD_SHARED_LIBS)
- if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE})
- else (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- endif (WIN32)
-else (BUILD_SHARED_LIBS)
- if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE})
- else (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- endif (WIN32)
-endif (BUILD_SHARED_LIBS)
set (mod_files
${MOD_BUILD_DIR}/h5ds.mod
@@ -205,10 +207,10 @@ install (
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
install (
TARGETS
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am
index 6457f81..d190ed1 100644
--- a/hl/fortran/src/Makefile.am
+++ b/hl/fortran/src/Makefile.am
@@ -102,4 +102,4 @@ H5IMff.lo: $(srcdir)/H5IMff.F90
H5TBff.lo: $(srcdir)/H5TBff.F90
H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90
H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index a1d1386..fc703dc 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -14,7 +14,7 @@ target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TAR
target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstds-shared tstds.F90)
TARGET_NAMING (hl_f90_tstds-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ")
@@ -25,7 +25,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for hl_f90_tstlite
add_executable (hl_f90_tstlite tstlite.F90)
@@ -35,7 +35,7 @@ target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_T
target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstlite-shared tstlite.F90)
TARGET_NAMING (hl_f90_tstlite-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ")
@@ -46,7 +46,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for hl_f90_tstimage
add_executable (hl_f90_tstimage tstimage.F90)
@@ -56,7 +56,7 @@ target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB
target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstimage-shared tstimage.F90)
TARGET_NAMING (hl_f90_tstimage-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ")
@@ -67,7 +67,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for hl_f90_tsttable
add_executable (hl_f90_tsttable tsttable.F90)
@@ -77,7 +77,7 @@ target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_
target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tsttable-shared tsttable.F90)
TARGET_NAMING (hl_f90_tsttable-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ")
@@ -88,6 +88,6 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
include (CMakeTests.cmake)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 38181bf..499e255 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -9,7 +9,7 @@
add_test (
NAME HL_FORTRAN_test-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
dsetf1.h5
dsetf2.h5
dsetf3.h5
@@ -32,11 +32,11 @@ set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test
add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (
NAME HL_FORTRAN_test-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
dsetf1.h5
dsetf2.h5
dsetf3.h5
@@ -61,4 +61,4 @@ if (BUILD_SHARED_LIBS)
add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $<TARGET_FILE:hl_f90_tsttable-shared>)
set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am
index 18fdaf3..ca49817 100644
--- a/hl/fortran/test/Makefile.am
+++ b/hl/fortran/test/Makefile.am
@@ -51,4 +51,4 @@ CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f1tab.h5 tstds.h5
# from tests in conclude.am)
FORTRAN_API=yes
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4
index 271e3e0..e855c3a 100644
--- a/m4/aclocal_fc.m4
+++ b/m4/aclocal_fc.m4
@@ -384,17 +384,17 @@ AC_RUN_IFELSE([
dnl -- LINE 4 -- number of valid integer kinds
dnl -- LINE 5 -- number of valid real kinds
- pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`"
- pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`"
- PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`"
+ pac_validIntKinds="`sed -n '1p' pac_fconftest.out`"
+ pac_validRealKinds="`sed -n '2p' pac_fconftest.out`"
+ PAC_FC_MAX_REAL_PRECISION="`sed -n '3p' pac_fconftest.out`"
AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision])
PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}"
PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}"
- H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`"
+ H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `sed -n '4p' pac_fconftest.out`"
H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)"
- H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`"
+ H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `sed -n '5p' pac_fconftest.out`"
H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)"
AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
@@ -427,7 +427,7 @@ AC_LANG_PUSH([Fortran])
pack_int_sizeof=""
rm -f pac_fconftest.out
-for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do
+for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
PROGRAM main
@@ -454,7 +454,7 @@ for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do
pack_int_sizeof="$2"
])
done
-PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}"
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF])
AC_LANG_POP([Fortran])
])
@@ -465,7 +465,7 @@ AC_MSG_CHECKING([sizeof of available REAL KINDs])
AC_LANG_PUSH([Fortran])
pack_real_sizeof=""
rm -f pac_fconftest.out
-for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do
+for kind in `echo $pac_validRealKinds | sed -e 's/,/ /g'`; do
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
PROGRAM main
@@ -492,7 +492,7 @@ for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do
pack_real_sizeof="$2"
])
done
-PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}"
+PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF])
AC_LANG_POP([Fortran])
])
@@ -524,12 +524,12 @@ rm -f pac_fconftest.out
])
AC_RUN_IFELSE([],[
if test -s pac_fconftest.out ; then
- PAC_FORTRAN_NATIVE_INTEGER_KIND="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_REAL_KIND="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`"
else
AC_MSG_WARN([No output from test program!])
fi
@@ -576,8 +576,8 @@ rm -f pac_Cconftest.out
])
AC_RUN_IFELSE([],[
if test -s pac_Cconftest.out ; then
- LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`"
- FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`"
+ LDBL_DIG="`sed -n '1p' pac_Cconftest.out`"
+ FLT128_DIG="`sed -n '2p' pac_Cconftest.out`"
else
AC_MSG_WARN([No output from test program!])
fi
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 7a98bef..df6291f 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -4,11 +4,11 @@
************************************************************************
Table of Contents
-
+
Section I: Preconditions
-Section II: Quick Step Building HDF5 Libraries with CMake Script Mode
+Section II: Quick Step Building HDF5 Libraries with CMake Script Mode
Section III: Quick Step Building HDF5 Libraries with CMake Command Mode
-Section IV: Further considerations
+Section IV: Further considerations
Section V: Options for building HDF5 Libraries with CMake command line
Section VI: CMake option defaults for HDF5
Section VII: User Defined Options for HDF5 Libraries with CMake
@@ -20,7 +20,7 @@ Section VIII: Options for platform configuration files
========================================================================
I. Preconditions
========================================================================
-Obtaining HDF5 source code
+Obtaining HDF5 source code
1. Create a directory for your development; for example, "myhdfstuff".
2. Obtain compressed (*.tar or *.zip) HDF5 source from
@@ -29,17 +29,17 @@ Obtaining HDF5 source code
Uncompress the file. There should be a hdf5-1.8."X" folder.
CMake version
- 1. We suggest you obtain the latest CMake from the Kitware web site.
+ 1. We suggest you obtain the latest CMake from the Kitware web site.
The HDF5 1.8."X" product requires a minimum CMake version 3.1.0,
- where "X" is the current HDF5 release version.
+ where "X" is the current HDF5 release version.
========================================================================
II. Quick Step Building HDF5 Libraries with CMake Script Mode
========================================================================
-This short set of instructions is written for users who want to quickly
-build the HDF5 C and C++ static libraries and tools with SZIP and ZLIB
-compression included. This procedure will use the default settings in
+This short set of instructions is written for users who want to quickly
+build the HDF5 C and C++ static libraries and tools with SZIP and ZLIB
+compression included. This procedure will use the default settings in
the config/cmake/cacheinit.cmake file.
HDF Group recommends using the ctest script mode to build HDF5.
@@ -57,7 +57,7 @@ CMake build script:
External compression szip and zlib libraries:
SZip.tar.gz
ZLib.tar.gz
-
+
Platform configuration files:
HDF518config.cmake
-----------------------------------------------
@@ -65,18 +65,18 @@ Platform configuration files:
To build HDF5 with the SZIP and ZLIB external libraries you will need to:
1. Change to the development directory "myhdfstuff".
-
+
2. Download the SZip.tar.gz and ZLib.tar.gz to "myhdfstuff".
Do not uncompress the files.
-
+
3. Download the CTestScript.cmake file to "myhdfstuff".
- CTestScript.cmake file should not be modified.
-
+ CTestScript.cmake file should not be modified.
+
4. Download the platform configuration file, HDF518config.cmake,
to "myhdfstuff". Do not modify the file unless you want to change
default build environment. (See http://www.hdfgroup.org/HDF5/release/chgcmkbuild.html)
- 5. From the "myhdfstuff" directory execute the CTest Script with the
+ 5. From the "myhdfstuff" directory execute the CTest Script with the
following options:
On 32-bit Windows with Visual Studio 2012, execute:
@@ -90,31 +90,31 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
On Linux and Mac, execute:
ctest -S HDF518config.cmake -C Release -VV -O hdf5.log
- The command above will configure, build, test, and create an install
+ The command above will configure, build, test, and create an install
package in the myhdfstuff folder. It will have the format:
HDF5-1.8.NN-<platform>.<zip or tar.gz>
On Unix, <platform> will be "Linux". A similar .sh file will also be created.
- On Windows, <platform> will be "win64" or "win32". If you have an
- installer on your system, you will also see a similar file that ends
+ On Windows, <platform> will be "win64" or "win32". If you have an
+ installer on your system, you will also see a similar file that ends
in either .exe (NSIS) or .msi (WiX).
-
+
The -S option uses the script version of ctest.
-
- The value for the -C option (as shown above, "-C Release") must
- match the setting for CTEST_BUILD_CONFIGURATION in the platform
+
+ The value for the -C option (as shown above, "-C Release") must
+ match the setting for CTEST_BUILD_CONFIGURATION in the platform
configuration file.
-
+
The -VV option is for most verbose; use -V for less verbose.
-
+
The "-O hdf5.log" option saves the output to a log file hdf5.log.
6. To install, "X" is the current release version
-
+
On Windows, execute:
HDF5-1.8."X"-win32.msi or HDF5-1.8."X"-win64.msi
By default this program will install the hdf5 library into the
- "C:\Program Files" directory and will create the following
+ "C:\Program Files" directory and will create the following
directory structure:
HDF_Group
--HDF5
@@ -124,14 +124,14 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
------lib
------cmake
- On Linux, change to the install destination directory
+ On Linux, change to the install destination directory
(create it if doesn't exist) and execute:
<path-to>/myhdfstuff/HDF5-1.8."X"-Linux.sh
After accepting the license, the script will prompt:
By default the HDF5 will be installed in:
"<current directory>/HDF5-1.8."X"-Linux"
Do you want to include the subdirectory HDF5-1.8."X"-Linux?
- Saying no will install in: "<current directory>" [Yn]:
+ Saying no will install in: "<current directory>" [Yn]:
Note that the script will create the following directory structure
relative to the install point:
HDF_Group
@@ -141,10 +141,10 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
------include
------lib
------share
-
+
On Mac you will find HDF5-1.8."X"-Darwin.dmg in the myhdfstuff folder. Click
on the dmg file to proceed with installation. After accepting the license,
- there will be a folder with the following structure:
+ there will be a folder with the following structure:
HDF_Group
--HDF5
----1.8."X"
@@ -152,7 +152,7 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
------include
------lib
------share
-
+
By default the installation will create the bin, include, lib and cmake
folders in the <install destination directory>/HDF_Group/HDF5/1.8."X"
@@ -160,47 +160,47 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
========================================================================
III. Quick Step Building HDF5 C Static Libraries and Tools with CMake
========================================================================
-Notes: This short set of instructions is written for users who want to
- quickly build the just the HDF5 C static library and tools from
+Notes: This short set of instructions is written for users who want to
+ quickly build the just the HDF5 C static library and tools from
the HDF5 source code package using the CMake command line tools.
-
+
Go through these steps:
1. Change to the development directory "myhdfstuff".
2. Uncompress the HDF5 source file
-
+
3. Create a folder "build" in the "myhdfstuff" directory.
-
- 4. Change into the "build" folder.
-
+
+ 4. Change into the "build" folder.
+
5. Configure the C library, tools and tests with one of the following commands:
On Windows 32 bit
- cmake -G "Visual Studio 11 2012" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
+ cmake -G "Visual Studio 11 2012" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
On Windows 64 bit
- cmake -G "Visual Studio 11 2012 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
-
+ cmake -G "Visual Studio 11 2012 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
+
On Linux and Mac
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.8."X"
+ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.8."X"
where "X" is the current release version.
-
+
6. Build the C library, tools and tests with this command:
cmake --build . --config Release
-
+
7. Test the C library and tools with this command:
ctest . -C Release
-
+
8. Create an install image with this command:
cpack -C Release CPackConfig.cmake
-
- 9. To install
+
+ 9. To install
On Windows, execute:
HDF5-1.8."X"-win32.msi or HDF5-1.8."X"-win64.msi
By default this program will install the hdf5 library into the
- "C:\Program Files" directory and will create the following
+ "C:\Program Files" directory and will create the following
directory structure:
HDF_Group
--HDF5
@@ -210,14 +210,14 @@ Notes: This short set of instructions is written for users who want to
------lib
------cmake
- On Linux, change to the install destination directory
+ On Linux, change to the install destination directory
(create if doesn't exist) and execute:
<path-to>/myhdfstuff/build/HDF5-1.8."X"-Linux.sh
After accepting the license, the script will prompt:
By default the HDF5 will be installed in:
"<current directory>/HDF5-1.8."X"-Linux"
Do you want to include the subdirectory HDF5-1.8."X"-Linux?
- Saying no will install in: "<current directory>" [Yn]:
+ Saying no will install in: "<current directory>" [Yn]:
Note that the script will create the following directory structure
relative to the install point:
HDF_Group
@@ -227,10 +227,10 @@ Notes: This short set of instructions is written for users who want to
------include
------lib
------share
-
+
On Mac you will find HDF5-1.8."X"-Darwin.dmg in the build folder. Click
on the dmg file to proceed with installation. After accepting the license,
- there will be a folder with the following structure:
+ there will be a folder with the following structure:
HDF_Group
--HDF5
----1.8."X"
@@ -241,41 +241,41 @@ Notes: This short set of instructions is written for users who want to
========================================================================
-IV. Further considerations
+IV. Further considerations
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8."X" product requires a minimum CMake version 3.1.0.
-
+ web site. The HDF5 1.8."X" product requires a minimum CMake version 3.1.0.
+
2. If you plan to use Zlib or Szip:
- A. Download the binary packages and install them in a central location.
- For example on Windows, create a folder extlibs and install the
+ A. Download the binary packages and install them in a central location.
+ For example on Windows, create a folder extlibs and install the
packages there. Add the following CMake options:
-DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib
-DZLIB_INCLUDE_DIR:PATH=some_location/include
-DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib
-DSZIP_INCLUDE_DIR:PATH=some_location/include
- where "some_location" is the full path to the extlibs folder.
+ where "some_location" is the full path to the extlibs folder.
- B. Use source packages from an SVN server by adding the following CMake
+ B. Use source packages from an SVN server by adding the following CMake
options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
ZLIB_SVN_URL:STRING="http://some_location/zlib/trunk"
SZIP_SVN_URL:STRING="http://some_location/szip/trunk"
where "some_location" is the URL to the SVN repository. Also set
CMAKE_BUILD_TYPE to the configuration type.
-
- C. Use source packages from a compressed file by adding the following
+
+ C. Use source packages from a compressed file by adding the following
CMake options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
SZIP_TGZ_NAME:STRING="szip_src.ext"
TGZPATH:STRING="some_location"
- where "some_location" is the URL or full path to the compressed
+ where "some_location" is the URL or full path to the compressed
file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
to the configuration type during configuration
-
- 3. If you are building on Apple Darwin platforms, you should add the
+
+ 3. If you are building on Apple Darwin platforms, you should add the
following options:
Compiler choice - use xcode by setting the ENV variables of CC and CXX
Shared fortran is not supported, build static:
@@ -283,12 +283,12 @@ IV. Further considerations
Additional options:
CMAKE_ANSI_CFLAGS:STRING=-fPIC
CTEST_USE_LAUNCHERS:BOOL=ON
- CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
-
+ CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
+
4. Windows developers should install NSIS or WiX to create an install image with CPack.
Visual Studio Express users will not be able to package HDF5 into
an install image executable.
-
+
5. Developers can copy the config/cmake/cacheinit.cmake file and alter the
the settings for the developers' environment. Then the only options needed
on the command line are those options that are different. Example using HDF
@@ -299,31 +299,31 @@ IV. Further considerations
Notes: CMake and HDF5
- 1. Using CMake for building and using HDF5 is under active development.
- While we have attempted to provide error-free files, please
- understand that development with CMake has not been extensively
+ 1. Using CMake for building and using HDF5 is under active development.
+ While we have attempted to provide error-free files, please
+ understand that development with CMake has not been extensively
tested outside of HDF. The CMake specific files may change
before the next release.
-
- 2. CMake support for HDF5 development should be usable on any
- system where CMake is supported. Please send us any comments on
- how CMake support can be improved on any system. Visit the
+
+ 2. CMake support for HDF5 development should be usable on any
+ system where CMake is supported. Please send us any comments on
+ how CMake support can be improved on any system. Visit the
KitWare site for more information about CMake.
-
+
3. Build and test results can be submitted to our CDash server,
please read the HDF and CDash document at:
- www.hdfgroup.org/CDash/HowToSubmit.
-
+ www.hdfgroup.org/CDash/HowToSubmit.
+
4. See the appendix at the bottom of this file for examples of using
a ctest script for building and testing. Using a ctest script is
preferred because of its flexibility.
-
+
Notes: CMake in General
- 1. More information about using CMake can be found at the KitWare site at
+ 1. More information about using CMake can be found at the KitWare site at
www.cmake.org.
-
- 2. CMake uses the command line; however, the visual CMake tool is
+
+ 2. CMake uses the command line; however, the visual CMake tool is
available for the configuration step. The steps are similar for
all the operating systems supported by CMake.
@@ -348,27 +348,27 @@ These five steps are described in detail below.
The visual CMake executable is named "cmake-gui.exe" on Windows and should be
available in your Start menu. For Linux, UNIX, and Mac users the
- executable is named "cmake-gui" and can be found where CMake was
- installed.
-
- Specify the source and build directories.
-
+ executable is named "cmake-gui" and can be found where CMake was
+ installed.
+
+ Specify the source and build directories.
+
***** Make the build and source directories different. ******
-
- For example on Windows, if the source is at c:\MyHDFstuff\hdf5,
- then use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5 as the
+
+ For example on Windows, if the source is at c:\MyHDFstuff\hdf5,
+ then use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5 as the
build directory.
-
+
RECOMMENDED:
- Users can perform the configuration step without using the visual
- cmake-gui program. We use the file cacheinit.cmake in the
- config/cmake source folder for our testing. This file enables all of the
- basic options and we turn specific options on or off for testing
+ Users can perform the configuration step without using the visual
+ cmake-gui program. We use the file cacheinit.cmake in the
+ config/cmake source folder for our testing. This file enables all of the
+ basic options and we turn specific options on or off for testing
using the following command line within the build directory:
-
+
cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>" [-D<options>] <sourcepath>
-
- Where <generator> is
+
+ Where <generator> is
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
@@ -424,128 +424,128 @@ These five steps are described in detail below.
2. Configure the cache settings
- 2.1 Visual CMake users, click the Configure button. If this is the first time you are
- running cmake-gui in this directory, you will be prompted for the
- generator you wish to use (for example on Windows, Visual Studio 11).
- CMake will read in the CMakeLists.txt files from the source directory and
- display options for the HDF5 project. After the first configure you
+ 2.1 Visual CMake users, click the Configure button. If this is the first time you are
+ running cmake-gui in this directory, you will be prompted for the
+ generator you wish to use (for example on Windows, Visual Studio 11).
+ CMake will read in the CMakeLists.txt files from the source directory and
+ display options for the HDF5 project. After the first configure you
can adjust the cache settings and/or specify the locations of other programs.
-
+
Any conflicts or new values will be highlighted by the configure
- process in red. Once you are happy with all the settings and there are no
- more values in red, click the Generate button to produce the appropriate
- build files.
-
- On Windows, if you are using a Visual Studio generator, the solution and
+ process in red. Once you are happy with all the settings and there are no
+ more values in red, click the Generate button to produce the appropriate
+ build files.
+
+ On Windows, if you are using a Visual Studio generator, the solution and
project files will be created in the build folder.
-
+
On linux, if you are using the Unix Makefiles generator, the Makefiles will
be created in the build folder.
2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
-
+
cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 11 2012" \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
- 2.3 On Windows, if you are using a Visual Studio Express version you must
+ 2.3 On Windows, if you are using a Visual Studio Express version you must
be sure that the following two options are correctly set/unset:
-
+
HDF5_NO_PACKAGES:BOOL=ON
HDF5_USE_FOLDERS:BOOL=OFF
-
+
3. Build HDF5
-
- On Windows, you can build HDF5 using either the Visual Studio Environment
+
+ On Windows, you can build HDF5 using either the Visual Studio Environment
or the command line. The command line can be used on all platforms;
Windows, linux, Unix, and Mac.
To build from the command line, navigate to your build directory and
execute the following:
-
- cmake --build . --config {Debug | Release}
-
+
+ cmake --build . --config {Debug | Release}
+
NOTE: "--config {Debug | Release}" may be optional on your platform. We
- recommend choosing either Debug or Release on Windows.
-
- 3.1 If you wish to use the Visual Studio environment, open the solution
- file in your build directory. Be sure to select either Debug or
+ recommend choosing either Debug or Release on Windows.
+
+ 3.1 If you wish to use the Visual Studio environment, open the solution
+ file in your build directory. Be sure to select either Debug or
Release and build the solution.
-
+
3.2.1 The external libraries (zlib and szip) can be configured
to allow building the libraries by downloading from an SVN repository.
The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT'; by adding the following
configuration option:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
-
+
The options to control the SVN URL (config/cmake/cacheinit.cmake file) are:
ZLIB_SVN_URL:STRING="http://${svn_url}/zlib/trunk"
SZIP_SVN_URL:STRING="http://${svn_url}/szip/trunk"
${svn_url} should be changed to your location. Also define CMAKE_BUILD_TYPE
to be the configuration type.
-
+
3.2.2 Or the external libraries (zlib and szip) can be configured
to allow building the libraries by using a compressed file.
- The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT' and is enabled by
+ The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT' and is enabled by
adding the following configuration option:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
-
- The options to control the SVN URL (config/cmake/cacheinit.cmake
+
+ The options to control the SVN URL (config/cmake/cacheinit.cmake
file) are:
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
SZIP_TGZ_NAME:STRING="szip_src.ext"
TGZPATH:STRING="some_location"
- where "some_location/xxxx_src.ext" is the URL or full path to
- the compressed file and where ext is the type of the compression
+ where "some_location/xxxx_src.ext" is the URL or full path to
+ the compressed file and where ext is the type of the compression
file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define
CMAKE_BUILD_TYPE to be the configuration type.
4. Test HDF5
To test the build, navigate to your build directory and execute:
-
+
ctest . -C {Debug | Release}
-
+
NOTE: "-C {Debug | Release}" may be optional on your platform. We
recommend choosing either Debug or Release to match the build
- step on Windows.
+ step on Windows.
5. Packaging HDF5 (create an install image)
-
+
To package the build into a simple installer using WiX toolset or the NullSoft installer NSIS
on Windows, or into compressed files (.tar.gz, .sh, .zip), use the CPack tool.
To package the build, navigate to your build directory and execute;
-
+
cpack -C {Debug | Release} CPackConfig.cmake
-
+
NOTE: See note 8 of this document for NSIS information.
See note 9 of this document for WiX information.
- Also, if you are using a Visual Studio Express version or do not
- want to enable the packaging components, set HDF5_NO_PACKAGES
+ Also, if you are using a Visual Studio Express version or do not
+ want to enable the packaging components, set HDF5_NO_PACKAGES
to ON (on the command line add -DHDF5_NO_PACKAGES:BOOL=ON)
-
- 6. The files that support building HDF5 with CMake are all the files in the
- config/cmake folder, the CMakeLists.txt files in each source folder, and
- CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
- performed by The HDF Group. It should be altered for the user's
+
+ 6. The files that support building HDF5 with CMake are all the files in the
+ config/cmake folder, the CMakeLists.txt files in each source folder, and
+ CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
+ performed by The HDF Group. It should be altered for the user's
installation and needs. The cacheinit.cmake file settings are used by
- The HDF Group for daily testing. It should be altered/ignored for the user's
+ The HDF Group for daily testing. It should be altered/ignored for the user's
installation and needs.
- 7. More information about using CMake can be found at the KitWare site,
+ 7. More information about using CMake can be found at the KitWare site,
www.cmake.org.
-
+
8. Nullsoft Scriptable Install System
- The Nullsoft Scriptable Install System (NSIS) is an open source installation
- system. It was created by the WinAmp authors to distribute that application,
- but it is now a general-purpose system which anyone might use. NSIS installers
- recognize /S for silent installation and /D=dir to specify the
- "output directory", which is where the program will be installed. These
- options are case-sensitive, so be sure to type them in upper case.
+ The Nullsoft Scriptable Install System (NSIS) is an open source installation
+ system. It was created by the WinAmp authors to distribute that application,
+ but it is now a general-purpose system which anyone might use. NSIS installers
+ recognize /S for silent installation and /D=dir to specify the
+ "output directory", which is where the program will be installed. These
+ options are case-sensitive, so be sure to type them in upper case.
9. WiX Toolset
- WiX--the Windows Installer XML toolset--lets developers create installers for
+ WiX--the Windows Installer XML toolset--lets developers create installers for
Windows Installer, the Windows installation engine. See http://wixtoolset.org.
@@ -553,14 +553,14 @@ These five steps are described in detail below.
VI. CMake Option Defaults for HDF5
========================================================================
-In the options listed below, there are three columns of information:
-Option Name, Option Description, and Option Default.
-The config/cmake/cacheinit.cmake file overrides the following values.
+In the options listed below, there are three columns of information:
+Option Name, Option Description, and Option Default.
+The config/cmake/cacheinit.cmake file can override the following values.
---------------- General Build Options ---------------------
-BUILD_SHARED_LIBS "Build Shared Libraries" OFF
+BUILD_SHARED_LIBS "Build Shared Libraries" ON
BUILD_STATIC_EXECS "Build Static Executabless" OFF
-BUILD_TESTING "Build HDF5 Unit Testing" OFF
+BUILD_TESTING "Build HDF5 Unit Testing" ON
---------------- HDF5 Build Options ---------------------
HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON
@@ -568,7 +568,7 @@ HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON
HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON
HDF5_BUILD_TOOLS "Build HDF5 Tools" ON
-if (HDF5_BUILD_FORTRAN)
+if (HDF5_BUILD_FORTRAN)
HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON
---------------- HDF5 Advanced Options ---------------------
@@ -591,14 +591,13 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks"
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
-HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
-if (APPLE)
+if (APPLE)
HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
-if (CMAKE_BUILD_TYPE MATCHES Debug)
+if (CMAKE_BUILD_TYPE MATCHES Debug)
HDF5_ENABLE_TRACE "Enable API tracing capability" ON
-if (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
---------------- External Library Options ---------------------
@@ -607,7 +606,7 @@ HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF
ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
-if (HDF5_ENABLE_SZIP_SUPPORT)
+if (HDF5_ENABLE_SZIP_SUPPORT)
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
if (WINDOWS)
H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
@@ -624,9 +623,9 @@ VII. User Defined Options for HDF5 Libraries with CMake
Support for User Defined macros and options has been added. The file
UserMacros.cmake has an example of the technique. In the folder,
config/cmake/UserMacros, is an implementation for Windows Visual Studio
-users for linking libraries to the static CRT - Windows_MT.cmake.
+users for linking libraries to the static CRT - Windows_MT.cmake.
-Copy the contents of the file, both macro and option, into the
+Copy the contents of the file, both macro and option, into the
UserMacros.cmake file. Then enable the option to the CMake configuration,
build and test process.
@@ -648,7 +647,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script.
#########################################################################
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-set(CTEST_SOURCE_VERSION 1.8.15-pre7)
+set(CTEST_SOURCE_VERSION 1.8.16)
set(CTEST_SOURCE_NAME hdf5-${CTEST_SOURCE_VERSION})
set(CTEST_BINARY_NAME "build")
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
@@ -709,7 +708,7 @@ endif()
###################################################################
set(MODEL "Experimental")
######### Following describes computer ############
-## following is optional to describe build ##
+## following is optional to describe build ##
set(SITE_BUILDNAME_SUFFIX "STATIC")
###################################################################
diff --git a/release_docs/INSTALL_VMS.txt b/release_docs/INSTALL_VMS.txt
deleted file mode 100644
index c2a1463..0000000
--- a/release_docs/INSTALL_VMS.txt
+++ /dev/null
@@ -1,77 +0,0 @@
- Building and installation instructions for Alpha Open VMS
- HDF5 1.8.6 release
- 18 February 2011
-
-
-
- CONTENTS
- --------
-
- 1. Obtaining HDF5
- 2. Building and testing HDF5 C, Fortran and C++ libraries,
- and utilities
- 3. Installing HDF5 libraries
- 4. Known problems
-
-
- 1.Obtaining HDF5
-
- Please see INSTALL file in this directory for downloading instructions.
-
- 2. Building and testing HDF5 C, Fortran and C++ libraries and utilities.
-
- IMPORTANT: This version REQUIRES GNU ZLIB library to be installed
- on a system. You may download the source code from
- http://www.zlib.net/
-
- - Use tar command to untar HDF5 source ball
-
- tar -xvf <source>.tar
-
- - Change default directory to [.<source>.vms]
- - Specify top HDF5 source directory in the build.com file
- - Edit make.com:
- specify path to ZLIB library
- if necessary, modify compilation flags
- Do NOT REMOVE /define=H5_VMS and /standard=strict_ansi qualifiers.
- - Run build.com command file
- @build
- We recommend using batch queue to build and test this distribution.
- The command file runs make.com and builds
- C library, tests, and utilities
- Fortran library and tests
- C++ library and tests
- It also runs test scripts to test C, Fortran and C++ libraries, and
- h5dump, h5diff, h5ls, h5repack and h5import utilities.
-
- 3. Installing HDF5 libraries
-
- Modify install.com file to specify installation directory and run
- @install
- to install HDF5 C, Fortran, and C++ libraries, and utilities.
- The script will create the directories shown below in the
- installation directory:
-
- [.HDF5]...
- [.HDF5.INCLUDE]
- [.HDF5.LIB]
- [.HDF5.BIN]
- [.HDF5.EXAMPLES]
- [.HDF5.EXAMPLES.C]
- [.HDF5.EXAMPLES.F90]
- [.HDF5.EXAMPLES.CXX]
-
- [.HDF5.EXAMPLES.*] directories contain make.com and check.com files
- to build examples against the installed libraries and to verify
- the installation.
-
- 3. Known problems
-
- - dsets test fails for test_scleoffset_double and
- test_scleoffset_double_2 tests when G_FLOAT double is used
- - There is no support for szip compression filter.
- - Fortran multifile driver test fails; similar C test passes.
-
-
- For help contact help@hdfgroup.org
-
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index d034cd3..e281d7d 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,23 +1,23 @@
-HDF5 version 1.9.227 currently under development
+HDF5 version 1.9.230 currently under development
================================================================================
INTRODUCTION
This document describes the differences between HDF5-1.9.0 and
-HDF5 1.9.x snapshot, and contains information on the platforms
-tested and known problems in HDF5-1.9.x.
+HDF5 1.9.x snapshot, and contains information on the platforms
+tested and known problems in HDF5-1.9.x.
For more details check the HISTORY*.txt files in the HDF5 source.
-Links to HDF5 1.9.x source code can be found on The HDF Group's
+Links to HDF5 1.9.x source code can be found on The HDF Group's
development FTP server at the following location:
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots
-User documentation for the snapshot can be accessed directly at this location:
+User documentation for the snapshot can be accessed directly at this location:
http://www.hdfgroup.uiuc.edu/HDF5/doc_dev_snapshot/H5_dev/
For more information, see the HDF5 home page:
-
+
http://www.hdfgroup.org/HDF5/
If you have any questions or comments, please send them to the HDF Help Desk:
@@ -41,1137 +41,67 @@ New Features
Configuration:
-------------
- - cmakehdf5: configure options added to enable or disable the building of
- different API's and testings. See "cmakehdf5 --help" for details.
- (AKC - 2014/12/09 HDFFV-8932)
- - Autotools: Automake updated to 1.14.1 (ADB - 2014/04/08)
- - CMake: Moved minimum CMake version to 2.8.11 which enables better library
- include processing. (ADB - 2014/03/26)
- - New configuration option added to change the default plugin path.
- configure option is --with-default-plugin=location
- cmake option is -DH5_DEFAULT_PLUGINDIR:PATH=location
- HDFFV-8513. (ADB 2013/09/04)
- - Rename FFLAGS to FCFLAGS in configure (ADB 2013/08/13)
- - CMake minimum is now 2.8.10. (ADB 2013/01/14)
- - A new tool, cmakehdf5, which is a build command script similar to
- buildhdf5 is added and is available in the bin directory.
- (AKC - 2012/12/12)
- - Fixed AIX Fortran compiler flags to use appropriate settings for
- debugging, profiling, optimization situations. HDFFV-8069. (AKC
- 2012/09/27)
- - Updated to latest autotools and changed all hard *.sh scripts to
- configure managed *.sh.in files. Removed overloading of autotools
- TESTS variable by examples and tests. Renamed configure.in to
- configure.ac. (ADB - 2012/08/23 - HDFFV-8129)
- - Added code to display the version information of XL fortran and C++
- in the summary of configure. (AKC - 2012/02/28 - HDFFV-7793)
- - Configure now generates Makefiles that build in "silent make mode"
- by default in which compile and link lines are significantly
- simplified for clarity. To override this and view actual compile and
- link lines during building, the --disable-silent-rules flag can be used
- at configure time, or the 'make' command can be followed by V=1, to
- indicate a "verbose" make. (MAM - 2011/4/14).
- - Added mpicc and mpif90 as the default C and Fortran compilers for Linux
- systems when --enable-parallel is specified but no $CC or $FC is defined.
- (AKC - 2011/2/7)
- - Added a new configure option, "--enable-unsupported", which can
- be used to stop configure from preventing the use of unsupported
- configure option combinations, such as c++ in parallel or parallel
- HDF5 with threadsafe. Use at your own risk, as it may result in a
- library that won't compile or run as expected!
- (MAM - 2010/11/17 - Bug 2061)
- - PHDF5 changed to use "mpiexec", instead of mpirun, as the default MPI
- applications startup command as defined in the MPI-2 definition, section
- 4.1. (AKC - 2010/6/11 - Bug 1921)
- - Configure now adds appropriate defines for supporting large (64-bit)
- files on all systems, where supported, by default, instead of only linux.
- This largefile support is controllable with the --enable-largefile
- configure option. This is replacing the linux-specific --enable-linux-lfs
- option, which has been removed from configure.
- (MAM - 2010/05/05 - 1772/1434)
- - Upgraded versions of autotools used to generate configuration suite.
- We now use Automake 1.11.1, Autoconf 2.65, and Libtool 2.2.6b.
- MAM 2010/04/15.
- - Added the xlc-* and mpcc_r-* BASENAME patterns to be recognized as IBM
- compilers so that the ibm compiler options can be added properly. This
- allows non-system-default compiler command names (e.g. xlc-m.n.k.l) be
- recognized. AKC 2009/11/26.
- - Configuration suite now uses Automake 1.11 and Autoconf 2.64.
- MAM 2009/08/11.
- - Changed default Gnu fortran compiler from g95 to gfortran since
- gfortran is more likely installed with gcc now. -AKC 2009/07/19-
- - Added libtool version numbers to generated c++, fortran, and
- hl libraries. MAM 2009/04/19.
- - Regenerated Makefile.ins using Automake 1.10.2. MAM 2009/04/19.
- - Added a Make target of check-all-install to test the correctness of
- installing via the prefix= or $DESTDIR options. AKC - 2009/04/14
- - Configuration suite now uses Libtool 2.2.6a. MAM 2008/10/24
-
- - Configuration suite now uses Autoconf 2.61, Automake 1.10.1.
- MAM 2008/05/05.
-
- - The new configure option "--disable-sharedlib-rpath" disables
- embedding the '-Wl,-rpath' information into executables when
- shared libraries are produced, and instead solely relies on the
- information in LD_LIBRARY_PATH. (MAM - 2008/05/15)
Library:
--------
- - H5F_ACC_DEBUG labeled "deprecated"
-
- The symbol was originally used to emit some extra debugging
- informationi in the multi VFD. The underlying functionality
- was removed due to disuse in HDF5 1.8.16 though the symbol
- remained defined since it was visible in H5Fpublic.h.
-
- In this release, the symbol has been labeled deprecated and will
- not be defined when H5_NO_DEPRECATED_SYMBOLS is defined.
-
- (DER - 2015-04-30, HDFFV-1074)
-
- - The library can load filter libraries dynamically during runtime. Users
- can set the search path through environment variable HDF5_PLUGIN_PATH
- and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08)
- - Added new API functions H5Dscatter and H5Dgather to scatter data to and
- and gather data from a selection within a memory buffer.
- (NAF - 2013/02/05)
- - The library now supports the data conversion from enumeration to numeric
- (integer and floating-point number) datatypes. See Issue 8221.
- (SLU - 2012/10/23)
- - The data sieve buffer size was for all the datasets in the file. It
- could waste memory if any dataset size is smaller than the sieve buffer
- size. Now the library picks the smaller one between the dataset size
- and the sieve buffer size from the file access property. See Issue 7934.
- (SLU - 2012/4/2)
- - I added a new parameter of object access property list to the function
- H5Rdereference (Issue 2763). It's called H5Rdereference2 now. The former
- H5Rdereference function has been deprecated to H5Rdereference1. (SLU -
- 2011/7/18)
- - H5Tcreate now supports string type (fixed-length and variable-length).
- (SLU - 2011/05/20)
- - Added ability to cache files opened through external links. Added new
- public functions H5Pset_elink_file_cache_size(),
- H5Pget_elink_file_cache_size(), and H5Fclear_elink_file_cache().
- (NAF - 2011/02/17)
- - Removed all old code for Metraowerks compilers, bracketed by
- __MWERKS__). Metraowerks compiler is long gone. (AKC - 2010/11/17)
- - Added support for threadsafety on windows using the windows threads
- library. Use the HDF5_ENABLE_THREADSAFE option in CMake while on a
- windows platform to enable this functionality. This is supported on
- Windows Vista and newer Windows operating systems. (MAM - 2010/09/10)
- - When a mandatory filter failed to write data chunks, the dataset
- couldn't close (bug 1260). The fix releases all resources and closes
- the dataset but returns a failure. (SLU - 2010/9/8)
- - H5Tset_order and H5Tget_order now support all data types. A new byte
- order H5T_ORDER_MIXED has been added specifically for compound datatype
- and its derived type. Please see bug #1934. (SLU - 2010/8/23)
- - Improved performance of the chunk cache by avoiding unnecessary b-tree
- lookups of chunks already in cache. (NAF - 2010/06/15)
- - Greatly improved performance of extending a dataset with early
- allocation. (NAF - 2010/03/24 - 1637)
- - Added support for filtering densely stored groups. Many of the API
- functions related to filters have been extended to support dense groups
- as well as datasets. Pipeline messages can now be stored in a group's
- object header. (NAF/QAK - 2009/10/8)
- - The embedded library information is displayed by H5check_version() if a
- version mismatch is detected. Also changed H5check_version() to
- suppress the warning message totally if $HDF5_DISABLE_VERSION_CHECK is 2
- or higher. (Old behavior treated 3 or higher the same as 1, that is
- print a warning and allows the program to continue. (AKC - 2009/9/28)
- - If a user does not care for the extra library information insert
- in the executables, he may turn it off by --disable-embedded-libinfo
- during configure. (AKC - 2009/9/15)
- - Corrected problem where library would re-write the superblock in a file
- opened for R/W access, even when no changes were made to the file.
- (QAK - 2009/08/20, Bz#1473)
- - Separated "factory" free list class from block free lists. These free
- lists are dynamically created and manage blocks of a fixed size.
- H5set_free_list_limits() will use the same settings specified for block
- free lists for factory free lists. (NAF - 2009/04/08)
- - Added support for dense attributes to H5Ocopy. (XCao/NAF - 2009/01/29)
- - Added H5Pset_elink_cb and H5Pget_elink_cb functions to support a
- user-defined callback function for external link traversal.
- (NAF - 2009/01/08)
- - Added H5Pset_elink_acc_flags and H5Pget_elink_acc_flags functions to
- allow the user to specify the file access flags used to open the target
- file of an external link. (NAF - 2009/01/08)
- - Added H5Pset_chunk_cache() and H5Pget_chunk_cache() functions to allow
- individual rdcc configuration for each dataset. Added
- H5Dget_access_plist() function to retrieve a dataset access property
- list from a dataset. (NAF - 2008/11/12)
- - Added H5Iis_valid() function to check if an id is valid without producing
- an error message. (NAF - 2008/11/5)
- - Added two new public routines: H5Pget_elink_fapl() and
- H5Pset_elink_fapl(). (see bug #1247) (VC - 2008/10/13)
- - Improved free space tracking in file to be faster. (QAK - 2008/10/06)
- - Added 'mounted' field to H5G_info_t struct. (QAK - 2008/07/15)
Parallel Library:
-----------------
- - Add H5Pget_mpio_no_collective_cause() function that retrive reasons
- why the collective I/O was broken during read/write IO access.
- (JKM - 2012/08/30 HDFFV-8143)
- - Special Collective IO (IO when some processes do not contribute to the
- IO) and Complex Derived Datatype MPI functionalities are no longer
- conditionally enabled in the library by configure. They are always
- enabled in order to take advantage of performance boosts from these
- behaviors. Older MPI implementations that do not allow for these
- functionalities can no longer by used by HDF5. (MAM - 2011/07/08).
- - Modified parallel tests to run with arbitrary number of processes. The
- modified tests are testphdf5 (parallel dataset access), t_chunk_alloc
- (chunk allocation), and t_posix_compliant (posix compliance). The rest of
- the parallel tests already use in the code the number of processes
- available in the communicator. (CMC - 2009/04/28)
Fortran Library:
----------------
- - Added parallel routine H5Pget_mpio_actual_io_mode_f (MSB - 2012/09/27)
-
- - Added for the C API the Fortran wrapper:
- h5ocopy_f (MSB - 2012/03/22)
-
-
- HDF5 Fortran library was enhanced to support Fortran 2003 standard.
- The following features are available when the HDF5 library is configured
- using --enable-fortran --enable-fortran2003 configure flags AND
- if fortran compiler is Fortran2003 compliant:
-
- - Subroutines overloaded with the C_PTR derived type:
- h5pget_f
- h5pget_fill_value_f
- h5pinsert_f
- h5pregister_f
- h5pset_f
- h5pset_fill_value_f
- h5rcreate_f
- h5rderefrence_f
- h5rget_name_f
- h5rget_obj_type_f
- - Subroutines overloaded with the C_PTR derived type
- and simplified signatures:
- h5aread_f
- h5awrite_f
- h5dread_f
- h5dwrite_f
- - New subroutines
- h5dvlen_reclaim_f
- h5literate_by_name_f
- h5literate_f
- h5ovisit_f
- h5tconvert_f
-
- - Subroutines with additional optional parameters:
- h5pcreate_class_f
- (EIP - 2011/10/14)
-
- - Added for the C APIs the Fortran wrappers:
- h5dget_access_plist_f
- h5iis_valid_f
- h5pset_chunk_cache_f
- h5pget_chunk_cache_f
- (MSB - 2009/04/17)
-
-
-
C++ Library:
------------
- - New member functions
- + Overloaded CommonFG::getObjnameByIdx to take char* for name
- + Overloaded CommonFG::getObjTypeByIdx to return type name as a char*.
- (BMR - 2010/05/02)
- + DataSet::getInMemDataSize() to simplify getting the dataset's
- data size in memory. (BMR - 2009/07/26)
- - These member functions were added as wrapper for H5Rdereference to
- replace the incorrect IdComponent::dereference().
- void H5Object::dereference(H5File& h5file, void* ref)
- void H5Object::dereference(H5Object& obj, void* ref)
- In addition, these constructors were added to create the associated
- objects by way of dereference:
- Attribute(H5Object& obj, void* ref);
- Attribute(H5File& file, void* ref);
- DataSet(H5Object& obj, void* ref);
- DataSet(H5File& file, void* ref);
- DataType(H5Object& obj, void* ref);
- DataType(H5File& file, void* ref);
- Group(H5Object& obj, void* ref);
- Group(H5File& obj, void* ref);
- (BMR - 2008/08/10)
-
-
Tools:
------
- - h5repack: Added ability to use plugin filters. HDFFV-8345 (ADB - 2013/09/04).
- - h5dump: Added option -N --any_path, which searches the file for paths that
- match the search path. HDFFV-7989 (ADB - 2013/08/12).
- - h5dump: Added optional arg 0 to -A, which excludes attributes from display.
- HDFFV-8134 (ADB - 2013/08/01).
- - h5dump: Fixed displaying compression ratio for unknown or user-defined
- filters. HDFFV-8344 (XCAO 2013/03/19)
- - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined filter.
- HDFFV-8346 (XCAO 2013/03/19)
- - h5dump: Added capability for "-a" option to show attributes containing "/"
- by using an escape character. For example, for a dataset "/dset"
- containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)"
- to show the content of the attribute. See details at HDFFV-7523
- (PC -- 2012/03/12)
- - h5dump: Added ability to apply command options across multiple files using a
- wildcard in the filename. Example; "h5dump -H -d Dataset1 tarr*.h5".
- HDFFV-7876 (ADB - 2012/03/12).
- - h5repack: Improved performance for big chunked datasets (size > 128MB)
- when used with layout (-l) or compression (-f) option.
- It would perform much better prior to the improvement,
- especially for cases that chunk dimentions looks like
- "1024x5x1" (compare to "1x5x1024"). When bigger numbers
- are toward front and smaller number is toward back in chunk
- dimentions. HDFFV-7862 (JKM - 2012/03/01)
- - h5dump: Added new option --no-compact-subset. This option will not
- interpret the '[' character as starting the compact form of
- subsetting. This is useful when the "h5dump error: unable to
- open dataset "datset_name"" message is output because a dataset
- name contains a '[' character. HDFFV-7689 (ADB - 2012/01/31)
- - h5dump: Corrected schema location:
- <hdf5:HDF5-File
- xmlns:hdf5="http://hdfgroup.org/HDF5/XML/schema/HDF5-File"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://hdfgroup.org/HDF5/XML/schema/HDF5-File
- http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd">
- (ADB - 2011/08/10)
- - h5diff: Added new level for -v (verbose) option. The new levels are
- 1 and 2. So -v1 and -v2 can be specified to view more
- information about attributes differences.
- Bug#2121 (JKM 2011/3/23)
- - h5dump: Added new option --enable-error-stack. This option will display
- error stack information in the output stream. This is useful
- when the "h5dump: Unable to print data" message is output.
- (ADB - 2011/02/24)
- - h5diff: Add a new flag --exclude-path. Specified path to an object will
- be excluded from comparing the two files or two groups. If group
- is specified all the member objects will be excluded.
- (JKM - 2010/09/16).
- - h5ls: Add new flag --no-dangling-links. (refer to --help for details)
- (JKM - 2010/06/15)
- - h5ls: Add new flag --follow-symlinks. (refer to --help for details)
- (JKM - 2010/05/25)
- - h5diff: Add new flag --no-dangling-links. (refer to --help for details)
- (JKM - 2010/02/10)
- - h5diff: Add new flag --follow-symlinks. (refer to --help for details)
- (JKM - 2010/01/25)
- - h5diff: fix for displaying garbage value on LE machine for BE data.
- (JKM - 2009/11/20)
- - h5dump: subsetting now allows default for count. Also trailing ; in short form
- can be omitted after last specified value.
- (ADB - 2009/09/04)
- - h5dump/h5ls: now can display data in region references
- using new -R, --region flag.
- (ADB - 2009/09/04)
- - h5diff: new flag, -c, --compare, list objects that are not comparable.
- (PVN - 2009/4/10 - 1368)
- - h5diff new flag, -N, --nan, avoids NaNs detection. (PVN - 2009/4/10)
- - h5dump correctly specifies XML dtd / schema urls (ADB - 2009/4/3 - 1519)
- - h5repack now handles group creation order. (PVN - 2009/4/2 - 1402)
- - h5dump: added a printing of the compression ratio of uncompressed and compressed
- sizes for cases where compression filters are present. (PVN - 2008/05/01)
- - h5dump: added an option to allow a user defined formatting string for printf
- regarding floating point numbers. (PVN - 2008/05/06)
- - h5dump: support for external links, display the object that the external link
- points to. (PVN - 2008/05/12)
- - h5repack: add a userblock to an HDF5 file during the repack. (PVN - 2008/08/26)
- - h5repack: add 2 options that call H5Pset_alignment in the repacked file. (PVN - 2008/08/29)
- - h5ls: added capability to traverse through external links when the -r
- (recursive) flag is given. (NAF - 2008/09/16)
- - h5ls: added -E option to enable traversal of external links. h5ls will
- not traverse external links without this flag being set.
- (NAF - 2008/10/06)
- - h5diff: added support for long double (PVN - 2008/10/28)
- - h5dump: binary output defaults to NATIVE with -b optionally accepting
- the form of binary output (NATIVE, FILE, BE, LE). (PVN - 2008/10/30)
- - h5diff: return 1 for file differences when both file graphs differ by any object.
- Error return code was changed to 2 from -1. (PVN - 2008/10/30)
- - h5import: TEXTFPE (scientific format) was deprecated. Use TEXTFP
- instead (PVN - 2008/10/30)
- - h5repack: When user doesn't specify a chunk size, h5repack now defines a default
- chunk size as the same size of the size of the hyperslab used to read the chunks.
- The size of the hyperslabs are defined as the size of each dimension or a
- predefined constant, whatever is smaller. This assures that the chunk
- read fits in the chunk cache. (PVN - 2008/11/21)
- - h5diff: h5diff treats two INFINITY values different. Fixed by checking (value==expect)
- before call ABS(...) at h5diff_array.c This will make that (INF==INF) is true
- (INF is treated as an number instead of NaN) (PC -- 2009/07/28)
- - h5diff: add option "--use-system-epsilon" to print difference if (|a-b| > EPSILON)
- Change default to use strict equality (PC -- 2009/09/12)
-
-
+
+
High-Level APIs:
------
- - Table: In version 3.0 of Table, "NROWS" (used to store number of records) was
- deprecated (PVN - 2008/11/24)
-
- - Added Fortran wrappers for Dimension Scale APIs. HDFFV-3797
- h5dsset_scale_f
- h5dsattach_scale_f
- h5dsdetach_scale_f
- h5dsis_attached_f
- h5dsis_scale_f
- h5dsset_label_f
- h5dsget_label_f
- h5dsget_scale_name_f
- h5dsget_num_scales_f
- (EIP for SB - 2011/10/13)
-
- - New API: h5ltpath_valid (Fortran: h5ltpath_valid_f) which checks
- if a path is correct and determines if a link resolves to a valid
- object and checks that the link does not dangle. (MSB- 2012/3/15)
-
- - A new API function H5DOwrite_chunk. It writes a data chunk directly
- into a file bypassing hyperslab selection, data conversion, and
- filter pipeline. The user must be careful with the function and
- clearly understand the I/O process of the library.
- (SLU - 2013/2/11)
-
- Documentation
- -------------
+
+ Documentation
+ -------------
Support for new platforms, languages and compilers.
=======================================
- - Intel V11.1 uses now -O3 optimization in production mode (EIP - 2010/10/08)
- - PathScale compilers are recognized and can build the HDF5 library
- properly. AKC - 2009/7/28 -
- - SunOS 5.11 (emu) 32-bit and 64-bit with Sun C/C++ 5.12 compiler and
- Sun Fortran 95 8.6 compiler. (SLU - 2013/04/15)
Bug Fixes since HDF5-1.8.0 release
==================================
Library
-------
- - Incorrect usage of list in CMake COMPILE_DEFINITIONS set_property
-
- The CMake command, set_property with COMPILE_DEFINITIONS property
- needs a quoted semi-colon separated list of values. CMake will
- transform the list to a series of -D{value} for the compile.
-
- (ADB - 2014/12/09, HDFV-9041)
-
- - H5Z.c: H5Zfilter_avail(H5Z_filter_t id)
- Added else block if the call to the internal H5Z_filter_avail(id) does not
- fail and returns FALSE. This block calls the H5PL_load(H5PL_TYPE_FILTER, (int)id)
- function to attempt to dynamically load the filter plugin.
- (ADB - 2014/03/03 HDFFV-8629)
- - Added const qualifier to source buffer parameters in H5Dgather and
- H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/02)
- - Fixed an error involving failure to write fill values to the user's
- buffer when reading unallocated chunks from datasets that have a
- fill value set to H5D_FILL_VALUE_DEFAULT. A consequence of this
- was the reporting of spurious data values in h5dump and h5diff
- output.
- (HDFFV-8247; JP - 2013/05/03)
- - Fixed an error that could occur when calling H5Ocopy within an
- H5Literate callback (and possibly other situations).
- (NAF - 2012/7/25 - HDFFV-5853)
- - Fixed an error that would occur when copying an object with attribute
- creation order tracked and indexed. (NAF - 2012/3/28 - HDFFV-7762)
- - Fixed a bug in H5Ocopy(): When copying an opened object, call the
- object's flush class action to ensure that cached data is flushed
- so that H5Ocopy will get the correct data.
- (VC - 2012/3/27 - HDFFV-7853)
- - When an application tries to write or read many small data chunks and
- runs out of memory, the library had a seg fault. The fix is to
- return the error stack with proper information. (SLU - 2012/3/23.
- Issue 7785)
- - H5Pset_data_transform had seg fault in some cases like x*-100. It
- works correctly now and handles other cases like 100-x or 2/x.
- (SLU - 2012/3/15. Issue 7922)
- - Fixed rare corruption bugs that could occur when using the new object
- header format. (NAF - 2012/3/15 - HDFFV-7879)
- - Creating a dataset in a read-only file caused seg fault when the file
- is closed. It's fixed. The attemp to create a dataset will fail
- with the error stack indicating the file is read-only. (SLU -
- 2012/1/25. Issue 7756)
- - Fixed a seg fault that could occur when shrinking a dataset with chunks
- larger than 1 MB. (NAF - 2011/11/30 - HDFFV-7833)
- - Fixed a bug that could cause file corruption when copying named
- datatypes to a file using shared messages. (NAF - 2011/11/14)
- - Fixed a bug that could cause H5Oget_info to return the wrong address
- after copying a named datatype. (NAF - 2011/11/14)
- - The library allowed the conversion of strings between ASCII and UTF8
- (Issue 7582). We have corrected it to report an error under this
- situation. (SLU - 2011/11/8)
- - The library had seg fault when it tried to shrink the size of compound type
- through H5Tset_size immediately after the type was created (Issue
- 7618). It's fixed now. (SLU - 2011/10/26)
- - Fixed a bug that occurred when using H5Ocopy on a committed datatype
- containing an attribute using that committed datatype.
- (NAF - 2011/10/13 - Issue 5854)
- - #ifdef _WIN32 instances changed to #ifdef H5_HAVE_WIN32_API and added
- H5_HAVE_VISUAL_STUDIO checks where necessary. CMake only as configure
- never set _WIN32.
- - CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv
- discovered 3 problems in tests and tools' library (Issue 7674):
- 1. In dsets.c, left shifting an unsigned int for 32 bits or more
- caused undefined behavior.
- 2. In dt_arith.c, the INIT_INTEGER macro definition has an overflow
- when the value is negative minimal and is being subtracted one.
- 3. In tools/lib/h5tools_str.c, right shifting an int value for 32 bits
- or more caused undefined behavior.
- All the problems have been corrected. (SLU - 2011/9/2)
- - In v1.6 library, there was EOA for the whole MULTI file saved in the
- super block. We took it out in v1.8 library because it's meaningless
- for the MULTI file. v1.8 library saves the EOA for the metadata file,
- instead. But this caused some backward compatibility problem.
- v1.8 library couldn't open the file created with v1.6 library. We
- fixed the problem by checking the EOA value to detect the file
- created with v1.6 library. (SLU - 2011/6/22)
- - When a dataset had filters and reading data failed, the error message
- didn't say which filter isn't registered. It's fixed now.
- (SLU - 2011/6/3)
- - The datatype handler created with H5Tencode/decode used to have the
- reference count 0 (zero). I have fixed it. It is 1 (one) now.
- (SLU - 2011/2/18)
- - Fixed a bug that caused big endian machines to generate corrupt files
- when using the scale-offset filter with floating point data or
- fill values. Note that such datasets will no longer be readable
- by any machine after this patch. (NAF - 2010/02/02 - Bug 2131)
- - Retrieving a link's name by index in the case where the link is
- external and the file that the link refers to doesn't exist will
- now fail gracefully rather than cause a segmentation fault.
- (MAM - 2010/11/17)
- - Modified library to always cache symbol table information. Libraries
- version 1.6.3 have a bug which causes them to require this
- information for some operations. (NAF - 2010/09/21 - 1864)
- - Fixed a bug that could occur when getting information for a new-style
- group that was previously opened through a file handle that was
- later closed. (NAF - 2010/09/15)
- - Added define check in H5public.h if stdint.h is supported by the C++
- compiler. This define is only available on Windows with VS2010 and
- using CMake to build the library. (ADB - 2010/09/13 - Bug 1938)
- - H5Eset_current_stack now also closes the error stack to be set as the
- default. This is to avoid a potential problem (Bug 1799).
- (SLU - 2010/9/7)
- - Fixed the bug in the filter's public CAN_APPLY function. The return
- value should be htri_t not herr_t (Bug #1239). (SLU - 2010/8/5)
- - Fixed a bug in the direct I/O driver that could render files with
- certain kinds of unaligned data unreadable or corrupt them.
- (NAF - 2010/07/28)
- - valgrind reported an error of copying data to itself when a new attribute
- is written (Bug #1956). I fixed it by taking out the memcpy step in
- the attribute code. (SLU - 2010/07/28)
- - Fixed a bug that could cause file corruption when using non-default
- sizes of addresses and/or lengths. This bug could also cause
- uncorrupted files with this property to be unreadable. This bug
- was introduced in 1.8.5. (NAF - 2010/07/16 - 1951)
- - Fixed a file corruption bug that could happen when shrinking a
- compressed dataset. (NAF - 2010/05/20)
- - Fixed some memory leaks in VL datatype conversion when strings are
- used as fill values. (MAM - 2010/05/12 - BZ# 1826)
- - Fixed a bug when copying objects with NULL references with the
- H5O_COPY_EXPAND_REFERENCE_FLAG flag set. (NAF - 2010/04/08 - 1815)
- - Files can now be concurrently opened more than once using the core file
- driver, as long as the backing store is used. (NAF - 2010/03/09)
- - Added support for H5O_COPY_EXPAND_EXT_LINK_FLAG to H5Ocopy. External
- links will now be expanded if this flag is set.
- (NAF - 2010/03/05 - 1733)
- - Fixed a bug where the library, when traversing an external link, would
- reopen the source file if nothing else worked. (NAF - 2010/03/05)
- - Fixed an intermittent bug in the b-tree code which could be triggered
- by expanding and shrinking chunked datasets in certain ways.
- (NAF - 2010/02/16)
- - H5Tdetect_class said a VL string is a string type. But when it's
- in a compound type, it said it's a VL type (Bug #1584). I fixed it
- to be consistent. It always return string type. (SLU - 2009/12/10)
- - Fixed a bug where writing and deleting many global heap objects (i.e.
- variable length data) would render the file unreadable. Previously
- created files exhibiting this problem should now be readable.
- (NAF - 2009/10/27 - 1483)
- - Fixed incorrect return value for H5Pget_preserve. (AKC - 2009/10/08 - 1628)
- - Fixed an assertion failure that occurred when H5Ocopy was called on a
- dataset using a vlen inside a compound. (NAF - 2009/10/02 - 1597)
- - Fixed incorrect return value for H5Pget_filter_by_id1/2 in H5Ppublic.h.
- (NAF - 2009/09/25 - 1620)
- - Fixed a bug where properties weren't being compared with the registered
- compare callback. (NAF - 2009/09/25 - 1555)
- - Fixed a bug where H5Pget_fitler_by_id would succeed when called for a
- filter that wasn't present. (NAF - 2009/06/25 - 1250)
- - Fixed an issue with committed compound datatypes containing a vlen.
- Also fixed memory leaks involving committed datatypes.
- (NAF - 2009/06/10 - 1593)
- - Added versioning to H5Z_class_t struct to allow compatibility with 1.6
- API. (NAF - 2009/04/20 - 1533)
- - Fixed a problem with using data transforms with non-native types in the
- file. (NAF - 2009/04/20 - 1548)
- - Added direct.h include file to windows section of H5private.h
- to fix _getcwd() warning. (ADB - 2009/04/14 - 1536)
- - Fixed a bug that prevented external links from working after calling
- H5close(). (NAF - 2009/04/10 - 1539)
- - Modified library to write cached symbol table information to the
- superblock, to allow library versions 1.3.0 to 1.6.3 to read files
- created by this version. (NAF - 2009/04/08 - 1423)
- - Changed skip lists to use a deterministic algorithm. The library should
- now never call rand() or srand(). (NAF - 2009/04/08 - 503)
- - Fixed a bug where H5Lcopy and H5Lmove wouldn't create intermediate
- groups when that property was set. (NAF - 2009/04/07 - 1526)
- - Fixed a bug that caused files with a user block to grow by the size of
- the user block every time they were opened.
- (NAF - 2009/03/26 - 1499)
- - Fixed a rare problem that could occur with files using the old (pre 1.4)
- array datatype. (NAF - 2009/03/23)
- - Modified library to be able to open files with corrupt root group symbol
- table messages, and correct these errors if they are found. Such
- files can only be successfully opened with write access.
- (NAF - 2009/03/23 - 1189)
- - Removed the long_long #define and replaced all instances with
- "long long". This caused problems with third party products. All
- currently supported compliers support the type. (ADB - 2009/03/05)
- - Fixed various bugs that could prevent the fill value from being written
- in certain rare cases. (NAF - 2009/02/26 - 1469)
- - Fixed a bug that prevented more than one dataset chunk from being cached
- at a time. (NAF - 2009/02/12 - 1015)
- - Fixed an assertion failure caused by opening an attribute multiple times
- through multiple file handles. (NAF - 2009/02/12 - 1420)
- - Fixed a problem that could prevent the user from adding attributes (or
- any object header message) in some circumstances.
- (NAF - 2009/02/12 - 1427)
- - Fixed a bug that could cause problems when an attribute was added to a
- committed datatype using the committed datatype's datatype.
- (NAF - 2009/02/12)
- - Fixed a bug that could cause problems when copying an object with a
- shared message in its own object header. (NAF - 2009/01/29)
- - Changed H5Tset_order to properly reject H5T_ORDER_NONE for most
- datatypes. (NAF - 2009/01/27 - 1443)
- - Fixed a bug where H5Tpack wouldn't remove trailing space from an
- otherwise packed compound type. (NAF - 2009/01/14)
- - Fixed up some old v2 btree assertions that get run in debug mode that
- were previously failing on compilation, and removed some of the
- more heavily outdated and non-rewritable ones. (MAM - 2008/12/15)
- - Fixed a bug that could cause problems when "automatically" unmounting
- multiple files. (NAF - 2008/11/17)
- - H5Ovisit and H5Ovisit_by_name will now properly terminate when the
- callback function returns a positive value on the starting object.
- (NAF - 2008/11/03)
- - Fixed an error where a null message could be created that was larger
- than could be written to the file. (NAF - 2008/10/23)
- - Corrected error with family/split/multi VFD not updating driver info
- when "latest" version of the file format used. (QAK - 2008/10/14)
- - Corrected alignment+threshold errors to work correctly when metadata
- aggregation is enabled. (QAK - 2008/10/06)
- - Changed H5Fget_obj_count and H5Fget_obj_ids to ignore objects registered
- by the library for internal library use. (NAF - 2008/10/06)
- - Fixed potential memory leak during compound conversion.
- (NAF - 2008/10/06)
- - Changed the return value of H5Fget_obj_count from INT to SSIZE_T. Also
- changed the return value of H5Fget_obj_ids from HERR_T to SSIZE_T and
- the type of the parameter MAX_OBJS from INT to SIZE_T. (SLU - 2008/09/26)
- - Fixed an issue that could cause data to be improperly overwritten
- during compound type conversion. (NAF - 2008/09/19)
- - Fixed pointer alignment violations that could occur during vlen
- conversion. (NAF - 2008/09/16)
- - Fixed problem where library could cause a segmentation fault when
- an invalid location ID was given to H5Giterate(). (QAK - 2008/08/19)
- - Fixed improper shutdown when objects have reference count > 1. The
- library now tracks reference count due to the application separately
- from that due to internal library routines. (NAF - 2008/08/19)
- - Fixed assertion failure caused by incorrect array datatype version.
- (NAF - 2008/08/08)
- - Fixed an issue where mount point traversal would fail when using
- multiple handles for the child. (NAF - 2008/08/07)
- - Fixed an issue where mount points were inaccessible when using multiple
- file handles for the parent. The mount table is now in the shared
- file structure (the parent pointer is still in the top structure).
- (NAF - 2008/08/07)
- - when an attribute was opened twice and data was written with one of the handles,
- the file didn't have the data. It happened because each handle had its own
- object structure, and the empty one overwrote the data with fill value. This is
- fixed by making some attribute information like the data be shared in the
- attribute structure. SLU - 2008/07/22
- - Fixed issue where a group could have a file mounted on it twice.
- (QAK - 2008/07/15)
- - Fixed a Windows-specific issue in the ohdr test which was causing users
- in some timezones to get false errors. This a deficiency in the Windows
- mktime() function, and has been handled properly. SJW - 2008/06/19
- - Fixed the problem with the searching of target file for H5Lcreate_external().
- The searching pattern will depend on whether the target file's
- pathname is an absolute or a relative path. Please see the description
- in the RM for H5Lcreate_external(). (VC - 2008/04/08)
- - Fixed possible file corruption bug when encoding datatype
- descriptions for compound datatypes whose size was between
- 256 & 511 bytes and the file was opened with the "use the
- latest format" property enabled (with H5Pset_libver_bounds).
- (QAK - 2008/03/13)
- - Fixed bug in H5Aget_num_attrs() routine to handle invalid location
- ID correctly. (QAK - 2008/03/11)
- - H5Dset_extent: when shrinking dimensions, some chunks were not deleted.
- (PVN - 2009/01/8)
- - Added code to maintain a min_clean_fraction in the metadata cache when
- in serial mode. (MAM - 2009/01/9)
-
-
Configuration
-------------
- - CMake: When CMake commands are executed individually on the command line
- and the external filters are being built, the CMAKE_BUILD_TYPE define
- must be set to the same value as the configuration
- (-DCMAKE_BUILD_TYPE:STRING=Release if using -C Release). This is needed
- by the the szip and zlib filter build commands. (ADB - HDFFV-8695)
- - CMake: Remove use of XLATE_UTILITY program. (ADB - 2014/03/28 HDFFV-8640)
- - CMake: Added missing quotes in setting the CMAKE_EXE_LINKER_FLAGS for the
- MPI option. (ADB - 2014/02/27 HDFFV-8674)
- - Modified H5detect.c to scan floating point types for padding bits before
- analyzing the type further. This should fix problems with gcc 4.8
- (NAF - 2013/09/19 - HDFFV-8523/HDFFV-8500)
- - Fixed Makefile issue in which "-Wl," was not properly specified
- prior to -rpath when building parallel fortran libraries with
- an Intel compiler. (MAM - 2012/03/26)
- - Makefiles generated by other packages using h5cc as the compiler
- no longer error when 'make' is invoked more than once in order
- to 'rebuild' after changes to source. (MAM - 2012/03/26)
- - Added --enable-fortran2003 flag to enable Fortran2003 support
- in the HDF5 Fortran library. The flag should be used along with the
- --enable-fortran flag and takes affect only when Fortran compiler
- is Fortran2003 compliant. (EIP - 2011/11/14)
-
- - In Windows platform, the default VFD, was Windows VFD, is restored back
- to the SEC2, aka POSIX, VFD. The Windows VFD is deprecated. HDFFV-7740
- (AKC 2011/09/26)
- - Removed config/ibm-aix6.x. All IBM-AIX settings are in one file,
- ibm-aix. (AKC - 2011/4/14)
- - Shared C libraries are no longer disabled on Mac when Fortran
- is enabled. Shared Fortran libraries are still not supported on Mac,
- so configure will disable them by default, but this is overridable
- with the new --enable-unsupported configure option. The configure
- summary has been updated to reflect the fact that the shared-ness of
- the C++/Fortran wrapper libraries may not align with the C library.
- (MAM - 04/11/2011 - HDFFV-4353).
- - Removed recognition of the parallel compilers of LAM(hcc) and
- ChMPIon(cmpicc) since we have no access to these two MPI implementations
- and cannot verify their correctness. (AKC - 2010/7/14 - Bug 1921)
- - Removed the following config files, as we no longer support them:
- config/dec-osf*, config/hpux11.00, config/irix5.x,
- config/powerpc-ibm-aix4.x config/rs6000-ibm-aix5.x config/unicos*
- MAM - 2009/10/08
- - Modified configure and make process to properly preserve user's CFLAGS
- (and company) environment variables. Build will now properly use
- automake's AM_CFLAGS for any compiler flags set by the configure
- process. Configure will no longer modify CFLAGS directly, nor will
- setting CFLAGS during make completely replace what configure has set up.
- MAM - 2009/10/08
- - Support for TFLOPS, config/intel-osf1, is removed since the TFLOPS
- machine has long retired. AKC - 2009/10/06.
- - Added $(EXEEXT) extension to H5detect when it's executed in the
- src/Makfile to generate H5Tinit.c so it works correctly on platforms
- that require the full extension when running executables.
- MAM - 2009/10/01 - BZ #1613
- - Configure will now set FC and CXX to "no" when fortran and c++
- are not being compiled, respectively, so configure will not run
- some of the compiler tests for these languages when they are not
- being used. MAM - 2009/10/01
- - The PathScale compiler (v3.2) was mistaken as gcc v4.2.0 but it fails to
- recognize some gcc options. Fixed. (see bug 1301). AKC - 2009/7/28 -
- - The --enable-static-exec flag will now properly place the -static flag
- on the link line of all installed executables. This will force the
- executable to link with static libraries over shared libraries, provided
- the static libraries are available. MAM - 2009/08/31 - BZ #1583
- - The --includedir=DIR configuration option now works as intended, and can
- be used to specify the location to install C header files. The default
- location remains unchanged, residing at ${prefix}/include.
- MAM - 2009/03/10 - BZ #1381
- - Configure no longer removes the '-g' flag from CFLAGS when in production
- mode if it has been explicitly set in the CFLAGS environment variable
- prior to configuration. MAM - 2009/03/09 - BZ #1401.
- - Fixed error with 'make check install' failing due to h5dump
- needing other tools built first. MAM - 2008/10/24.
- - Wpen using shared szip, it is no longer necessary to specify
- the path to the shared szip libraries in LD_LIBRARY_PATH. MAM -
- 2008/10/24.
- - The file libhdf5_fortran.settings is not installed since its content
- is included in libhdf5.settings now. AKC - 2008/10/21
- - "make DESTDIR=xxx install" failed to install some tools and files
- (e.g., h5cc and fortran modules). Fixed. AKC - 2008/10/8.
- - Autotools: An export of LD_LIBRARY_PATH=<szip library location> was
- removed from configure and make installcheck was revised to run
- scripts installed in share/hdf5_examples to use the installed h5cc, etc.
- to compile and run example source files also installed there. Make
- installcheck will now fail when a shared szip or other external lib file
- cannot be found in the same manner that executables compiled and linked
- with h5cc will fail to run when those lib files cannot be found after
- install. Make installcheck should pass after setting LD_LIBRARY_PATH to the
- szip location.
- (LRK - 2014/04/16)
Performance
-------------
- - Removed program perform/benchpar from the enable-build-all list. The
- program will be retired or moved to another location. HDFFV-8156
- (AKC 2012/10/01)
- - Retired program perform/mpi-perf. Its purpose has been incorporated
- into h5perf before. (AKC 2012/09/20)
- - ifdefs added to tests around include unistd.h and function to simulate
- getlogin() on Windows.
- (ADB - 2011/08/15)
- - perf_serial test added to Windows projects and check batch file.
- (ADB - 2009/06/11)
+
Fortran
--------
- - Fixed a typo in return value of the nh5dread_f_c function ( was 1
- instead of 0 on success); fixed the return value to make it consistent
- with other Fortran functions; cleaned the code from debug statements.
- (EIP - 2012/06/23)
-
- - Fixed problem writing/reading control characters to a dataset; writing
- a string containing: alerts, backspace, carriage_return, form_feed,
- horizontal_tab, vertical_tab, new_line is now tested and working.
- (MSB - 2012/09/01)
-
- - Corrected the integer type of H5S_UNLIMITED_F to HSIZE_T (MSB - 2012/09/01)
-
- - Corrected the number of continuation lines in the src files
- to be less then 32 lines for F95 compliance. (MSB - 2012/10/01)
Tools
-----
- - h5repack: h5repack would not attempt to remove UD filters. Added a
- check to h5repack for UD filters that checks if the filter can
- be dynamically loaded. This will require a change in the library to
- add the H5PL_load() to the H5Zfilter_avail(). (ADB - 2014/03/03 HDFFV-8629)
- - h5repack: Fixed failure for converting a layout of small chunked dataset
- (size < 1K) to contiguous layout. HDFFV-8214 (JKM 2013/03/18)
- - h5diff: Fixed to return correct exit code 1 when detect unique extra
- attribute. Prior to this fix, h5diff returned exit code 0 indicating
- two files are identical. HDFFV-7643 (JKM 2013/02/15)
- - h5diff: Improved speed when comparing HDF5 files with lots of
- attributes. Much slower performance was identified with release
- version from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19)
- - h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if
- source file contains chunked dataset and a chunk dim is bigger than
- the dataset dim. Another issue is that the command changed max dims
- if chunk dim is smaller than the dataset dim.
- These issue occurred when dataset size is smaller than 64k (compact
- size limit) Fixed both.
- HDFFV-8012 (JKM 2012/09/24)
- - h5diff: Fixed not to accumulate attribute difference to dataset
- difference in verbose mode (-v, -r), which caused incorrect
- difference between dataset and group/datatype object if attribute
- exist with any differences. This also lead to fix inconsistent
- format indicating difference between dataset and group/datatype
- object. HDFFV-5919 (JKM 2012/09/05)
- - h5diff: Fixed the incorrect result when comparing attribute data
- values and the data type has same class but different size.
- HDFFV-7942 (JKM 2012/08/15)
- - ph5diff: Fixed intermittent hang issue on a certain operation in
- parallel mode. It was detected by daily test for comparing
- non-comparable objects, but it could have occurred in other
- operations depend on machine condition. HDFFV-8003 (JKM 2012/08/01)
- - h5diff: Fixed test failure for "make check" due to failure of
- copying test files when performed in HDF5 source tree. Also applied
- to other tools.
- HDFFV-8107 (JKM 2012/08/01)
- - h5diff: Fixed the Function COPY_TESTFILES_TO_TESTDIR() of
- testh5diff.sh to better report when there is an error in the file
- copying. HDFFV-8105 (AKC -2012/07/22)
- - h5diff: Fixed not to check and display dangling link status without
- --follow-symlinks option. This also improved performance when
- comparing lots of external links without the --follow-symlinks
- option. HDFFV-7998 (JKM 2012/04/26)
- - h5unjam: Fixed sefgault when used -V (show version) option.
- HDFFV-8001 (JKM 2012/04/19)
- - h5repack: Fixed a failure when change the chunk size of a specified
- chunked dataset with unlimited max dims. HDFFV-7993 (JKM 2012/04/11)
- - h5diff: Fixed failure for comparing same named object with different
- object types in comparing groups. Prior to the fix, h5diff resulted
- in error. After the fix, h5diff detects such case as non-comparable
- and display messages accordingly. HDFFV-7664 (JKM 2012/03/28)
- - h5diff: If unique objects exists only in one file and try to exclude
- the unique objects with --exclude-path option, h5diff missed
- excluding some objects.
- Fixed to exclude objects correctly in such case.
- HDFFV-7837 (JKM 2012/03/20)
- - h5dump: Added tools library error stack to properly catch error
- information generated within the library.
- HDFFV-7958 (ADB 2012/03/12)
- - h5dump: Dangling links no longer throw error message, change process
- when open link fails.
- HDFFV-7839 (ADB 2012/03/12)
- - h5diff: When two symbolic dangling links are compared with
- --follow-symlinks option, the result should be same. It worked for
- comparing two files, but didn't work for comparing two objects.
- HDFFV-7835 (JKM 2012/03/09)
- - h5dump: Refactored code to remove duplicated functions. Split XML
- functions from DDL functions. Corrected indentation and formatting
- errors. Also fixed subsetting counting overflow (HDFFV-5874). Verified
- all tools call tools_init() in main.
- HDFFV-7560 (ADB 2012/02/17)
- - h5diff: fixed to prevent from displaying error stack message when
- comparing the two dangling symlinks with follow-symlinks option.
- HDFFV-7836 (JKM 2012/01/13)
- - h5repack: fixed memory leak for handling variable length string in
- attribute. HDFFV-7840 (JKM 2012/01/06)
- - h5ls: fixed segfault when access region reference data in an
- attribute. HDFFV-7838 (JKM 2011/12/29)
- - h5diff: fixed segfault over non-comparable attribute with different
- dimention or rank, along with '-c' option to display details.
- HDFFV-7770 (JKM 2011/10/24)
- - Fixed h5diff to display all the comparable object and attribute
- regardless of non-comparables. HDFFV-7693 (JKM 2011/09/16)
- - Fixed h5repack to update values of references(object and region) of
- attributes in h5repack for 1) references, 2) ARRAY of references,
- 3) VLEN of references, and 4) COMPOUND of references.
- (JIRA HDF5 5932) PC -2011/09/14
- - h5diff: fixed segfault over dataset with container types
- (array,lven) with multiple nested compound types.
- (ex: compound->array->compound, compound->vlen->compound)
- HDFFV-7712 JKM (2011/09/01)
- - h5repack: added macro to handle failure in H5Dread/write when memory
- allocation failed inside the library. (PC -- 2011/08/19)
- - Fixed h5jam not to allow specifying an HDF5 formatted file as input
- file for -u (user block file) option, because the original HDF5 file
- will not be accessible if allows. HDFFV-5941 (JKM 2011/08/15)
- - Revised command help pages of h5jam and h5unjam. The descriptions
- were not up to date and some were missing.
- HDFFV-7515 (JKM 2011/08/15)
- - h5repack: h5repack failed to copy dataset if the layout is changed
- from chunked with unlimited dims to contiguous. HDFFV-7649
- (PC -- 2011/07/15)
- - h5diff: "--delta" option considers two NaN of the same type are
- different, which is wrong based on h5diff description in Reference
- Manual. HDFFV-7656 (PC -- 2011/07/15)
- - Fixed h5diff to display instructive error message and exit with 1
- when mutually exclusive options (-d, -p and --use-system-epsilon)
- are used together. HDFFV-7600 (JKM 2011/07/07)
- - Fixed h5dump to display the first line of each element into correct
- position for multiple dimention array type.
- Before this fix, the first line of each element in array were
- displayed after the last line of previous element without
- moving to the next line (+indentation).
- Bug #HDFFV-5878 (JKM 2011/06/15)
- - Fixed h5dump to display correct value for H5T_STD_I8LE dataset
- on a system (ppc64, linux, Big-Endian, clustering).
- Bug #HDFFV-7594 (ABERT & JKM 2011/05/12)
- - Fixed h5diff to compare file itself correctly. Previously h5diff
- reported either different or not compatible in certain cases even
- comparing file itself. This fix also improve performance when
- comparing same target objects through verifying the obj&file
- addresses before comparing the details in the objects (ex: datasets
- or attributes) Bug #HDFFV-5928 (XCAO & JKM 2011/05/06)
- - Updated h5dump test case script to prevent entire test failure upon
- source directory is read-only. Bug# HDFFV-4342 (JKM 2011/4/12)
- - Fixed h5dump displaying incorrect values for H5T_STD_I8BE type data in
- attribute on Big-Endian machine. H5T_STD_I8BE is unsigned 8bit type,
- so h5dump is supposed to display -2 instead of 254. It worked
- correctly on Little-Endian system , but not on Big-Endian system.
- Bug #HDFFV-4358 (JKM 2011/04/08)
- - Updated to unify option name to '--enable-error-stack' for printing
- HDF5 error stack messages for HDF5 tools. h5ls and h5dump for now.
- For h5ls, this replaces "-e/--errors" option, which is deprecated.
- Bug#2182 (JKM 2011/3/30)
- - Fix h5diff for --use-system-epsilon option: the calculation changed
- from ( |a - b| / b ) to ( |a - b| ). This was decided for better
- performance. Bug#2184 (JKM 2011/3/24)
- - Fixed output for H5T_REFERENCE in h5dump. According to the BNF document
- the output of a H5T_REFERENCE should be followed by the type;
- <reference> ::= H5T_REFERENCE { <ref_type> }
- <ref_type> ::= H5T_STD_REF_OBJECT | H5T_STD_REF_DSETREG
- Previously this was only displayed if the -R option was used.
- Bug#1725 (ADB 2011/3/28)
- - Fix h5diff issues for #1: h5diff compared attributes correctly only
- when two objects have the same number of attributes and attribute
- names are identical, #2: didn't display useful information about
- attribute difference. Bug#2121 (JKM 2011/3/17)
- - Fixed memory leak for h5diff when accessing symbolic links with
- --follow-symlink option. Bug#2214 (JKM 2011/3/18)
- - Fixed memory leak for h5diff when access variable length string
- data. Bug#2216 (JKM 2011/3/18)
- - Fixed and improved help page for -a option of h5ls.
- Bug#1904 (JKM 2011/3/11)
- - Fixed h5dump not to include attribute values in the output file when
- h5dump "-y -o output_file" options were used. The problem was introduced
- in HDF5 1.8.6 by showing data pointed by region references. (XCAO 2011/3/9)
- - Fixed h5copy to be able to copy any object into the same HDF5 file.
- Previously h5copy displayed error message when target file is same
- as source file. (XCAO 2011/3/8)
- - Fixed h5dump for skipping some values for long array type dataset on
- Windows. This issue only occurred on Windows due to the different
- return behavior from _vsnprintf() funtion. Bug#2161 (JKM 2011/3/3)
- - Fixed h5dump for skipping array indices every certain number
- when the array type dataset is relatively big. The certain number
- varies according to the size of array. Bug#2092 (JKM 2011/2/15).
- - Fixed h5diff for the segfault when compares compound datasets
- with combination of fixed length string types and vlen string types
- in certain orders. bug#2089 (JKM 2010/12/28)
- - Improve h5diff performance. 1) use HDmemcmp() before comparing each
- elements. 2) replace expensive H5Tequals() calls 3) retrieve datatype
- information at dataset level not each element level for compound
- datasets
- - Fixed h5ls to display nested compound type with curly bracket
- when -S (--simple) option is used with -l (--label), so it shows
- which member (in curly bracket) belong to which nested compound type
- and make the output make sense. bug#1979 (JKM 2010/11/09)
- - Fixed h5diff to handle variable-length strings in a compound dataset
- correctly. (also variable-length string array in a compound dataset)
- Garbage values were displayed when h5diff compared multiple
- variable-length strings in a compound type dataset.
- Bug#1989 (JKM 2010/10/28)
- - Fixed h5copy to fail gracefully when copying object to non-exist
- group without -p option. Bug#2040 (JKM 2010/10/18)
- - Fixed to compare member objects and groups recursively when two
- files or groups are specified to be compared. Bug#1975
- (JKM 2010/9/16)
- - Make h5repack be able to convert a layout to COMPACT for small size
- dataset as default. bug#1896 (JKM 2010/09/15)
- - Change h5ls not to manipulate special characters in object name or
- attribute name for smart display. bug#1784 (JKM 2010/06/28)
- - Fixed h5ls to return exit code 1 (error) when non-existent file is
- specified. bug#1793. (JKM 2010/04/27)
- - h5copy failed to copy dangling link when the link is specified
- directly. bug#1817. (JKM 2010/04/22)
- - h5repack lost attributes from a dataset of reference type. bug#1726.
- (JKM 2010/3/25)
- - h5repack sets NULL for object reference value for group or
- named datatype. bug#1814. (JKM 2010/03/19)
- - h5diff: fixed incorrect behavior (hang) in parallel mode when
- specify invalid options (ex: -v and -q) (JKM 2010/02/17)
- - h5dump/h5ls display buffer resize fixed in tools library.
- (ADB - 2009/07/21 - 1520)
- - Fixed many problems that could occur when using h5repack with named
- datatypes. (NAF - 2009/4/20 - 1516/1466)
- - h5dump, h5diff, h5repack were not reading (by hyperslabs) datasets
- that have a datatype datum size greater than H5TOOLS_BUFSIZE, a
- constant defined as 1024Kb, such as array types with large
- dimensions (PVN - 2009/4/1 - 1501)
- - h5import: By selecting a compression type, a big endian byte order was being
- selected (PVN - 2009/3/11 - 1462)
- - zip_perf.c had missing argument on one of the open() calls. Fixed.
- (AKC - 2008/12/9)
- - h5dump now checks for uniqueness of committed datatypes.
- (NAF - 2008/10/15)
- - Fixed unnecessary indentation of committed datatypes in h5dump.
- (NAF - 2008/10/15)
- - Fixed bugs in h5stat:segmemtation fault when printing groups and
- print warning message when traversal of objects is unsuccessful.
- (see bug #1253) (VC- 2008/10/13)
- - Fixed bug in h5ls that prevented relative group listings (like
- "h5ls foo.h5/bar") from working correctly (QAK - 2008/06/03)
- - Fixed bug in h5diff that prevented datasets & attributes with
- variable-length string elements from comparing correctly.
- (QAK - 2008/02/28)
- - h5import bug on Windows w/binary datasets. fread in windows needs a
- binary file to be open with 'rb' instead of 'r' otherwise it
- terminates execution if an end of file character is found on the
- input file. Besides that the binary file generated needs to be open
- with 'wb' , otherwise an end of line character is read twice.
- (PVN - 2008/02/19)
- - Fixed bug in h5dump that caused binary output to be made only for the first
- dataset, when several datasets were requested. (PVN - 2008/04/07)
- - h5dump: when doing binary output (-b), the stdout printing of attributes
- was done incorrectly. Removed printing of attributes when doing binary
- output. PVN - 2008/06/05
-
High-Level APIs:
------
- - Fixed problem with H5DSget_scale_name including the NULL terminator in
- the size calculation returned by the function. The API does not
- include the NULL terminator in the size returned (MSB- 2013/2/10)
-
- - Fixed problem with H5TBdelete_record destroying all data following the deletion
- of a row. (MSB- 2012/7/26)
-
- - Fixed H5LTget_attribute_string not closing an object identifier when an
- error occurs. (MSB- 2012/7/21)
-
- - Fixed the H5LTdtype_to_text function. It had some memory problems when
- dealing with some complicated data types. HDFFVI-7701 (SLU - 2011/10/19)
-
- - Fixed a bug in H5DSattach_scale, H5DSis_attached and H5DSdetach_scale
- caused by using H5Tget_native_type function to determine the native
- type for reading REFERENCE_LIST attribute. The bug was exposed
- on Mac PPC.
- (EIP - 2010/05/22 -1851)
- - Fixed a bug in the H5DSdetach_scale function when 0 bytes
- were allocated after the last reference to a dim. scale
- was removed from the list of references in a VL element of the
- DIMENSION_LIST attribute; modified the function to comply
- with the Spec: DIMENSION_LIST attribute is deleted now when no
- dimension scales left attached.
- (EIP - 2010/05/14 -1822)
- - Fixed a bug where the H5TB API would forget the order of fields when
- added out of offset order. (NAF - 2009/10/27 - 1582)
- - H5DSis_attached failed to account for different platform types. Added a
- get native type call. (ADB - 2009/9/29 - 1562)
- - Dimension scales: The scale index return value in H5DSiterate_scales was not always
- incremented. (PVN - 2009/4/8 - 1538)
Fortran High-Level APIs:
------
- - Lite: The h5ltget_attribute_string_f used to return the C NULL character in the
- returned character buffer. The returned Fortran charactor buffer now does
- not return the C NULL character. (MSB - 2012/3/23)
- - Lite: The h5ltget_dataset_info_f function (gets information about a dataset)
- was not correctly returning the dimension array. (PVN - 2009/3/23)
- - Lite: the h5ltread_dataset_string_f and h5ltget_attribute_string_f functions
- had memory problems with the g95 fortran compiler. (PVN � 5/13/2009) 1522
-
-
-
-
-
- Documentation
- -------------
-
+ Documentation
+ -------------
F90 APIs
--------
- - Modified the h5open_f and h5close_f subroutines to not to call H5open
- and H5close correspodningly. While the H5open call just adds overhead,
- the H5close call called by an Fortran application shuts down the HDF5
- library making it unaccessible to the application.
- HDFFV-915 (EIP & SB - 2011/10/13)
-
C++ APIs
--------
- - The constructor PropList::PropList(id) was fixed to act properly
- according to the nature of 'id'. When 'id' is a property class id,
- a new property list will be created. When 'id' id a property list id,
- a copy of the property list will be made. (BMR - 2010/5/9)
- - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and
- CommonFG::getComment, respectively, now have default values for
- user's convenience. (BMR - 2009/10/23)
- - NULL pointer accessing was fixed, bugzilla 1061. (BMR - 2009/10/05)
- - read/write methods of DataSet and Attribute classes were fixed
- to handle string correctly. (BMR - 2009/07/26)
- - Fixed bug that caused segfaults in Attribute::read. (BMR - 2008/04/20)
- - Fixed bug in PropList::getClassName to use portable HDfree instead
- of free. (BMR - 2008/04/20)
- - Fixed a design bug which allowed an Attribute object to create/modify
- attributes (bugzilla #1068). The API class hierarchy was revised
- to address the problem. Classes AbstractDS and Attribute are moved
- out of H5Object. Class Attribute now multiply inherits from
- IdComponent and AbstractDs and class DataSet from H5Object and
- AbstractDs. In addition, the data member IdComponent::id was
- moved into subclasses: Attribute, DataSet, DataSpace, DataType,
- H5File, Group, and PropList. (BMR - 2008/08/10)
- - IdComponent::dereference was incorrect and replaced as described
- in "New Features" section.
- (BMR - 2008/08/10)
Testing
-------
- - tools/h5diff/testh5diff.sh is run in every "make check", even after it
- has passed in the previous run. It should not run again if there is no
- code changes. Fixed. (AKC - 2013/07/19 HDFFV-8392)
- - In some Mac system, testlibinfo.sh failed with this error:
- Check file ../src/.libs/libhdf5.7.dylib
- strings: object: ../src/.libs/libhdf5.7.dylib malformed object \
- (unknown load command 15)
- The strings command of Mac inspects library files and older
- versions of strings may not know newer library format, resulting
- in errors. Fixed by sending the library file as stdin to the strings
- coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305)
-
- - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation
- faulted when used before. (AKC - 2013/02/12 HDFFV-8267)
Supported Platforms
@@ -1195,17 +125,17 @@ Supported Platforms
#1 SMP x86_64 GNU/Linux compilers for 64-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54)
Version 4.8.2
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 14.0.2 (Build 20140120)
Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
(platypus) Version 4.4.7 20120313
Version 4.8.2
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 13.7-0
+ Version 13.7-0
Intel(R) C (icc), C++ (icpc), Fortran (icc)
compilers:
Version 14.0.2 (Build 20140120)
@@ -1215,7 +145,7 @@ Supported Platforms
(ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
IBM XL C/C++ V13.1
IBM XL Fortran V15.1
-
+
Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers
ch5.x86_64 GNU/Linux Version 12.1.5.339
(LLNL Aztec)
@@ -1232,14 +162,14 @@ Supported Platforms
Visual Studio 2010 w/ Intel Fortran 14 (cmake)
Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
- Cygwin(CYGWIN_NT-6.1 1.7.34(0.285/5/3) gcc(4.9.2) compiler and gfortran)
+ Cygwin(CYGWIN_NT-6.1 2.2.0(0.289/5/3) gcc(4.9.3) compiler and gfortran)
(cmake and autotools)
Windows 7 x64 Visual Studio 2008 (cmake)
Visual Studio 2010 w/ Intel Fortran 14 (cmake)
Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
-
+
Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
@@ -1252,23 +182,23 @@ Supported Platforms
Mac OS X Mountain Lion 10.8.1 cc Apple clang version 4.0 from Xcode 4.5.1
(owl) c++ Apple clang version 4.0 from Xcode 4.5.1
- gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1
- g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1
- gfortran GNU Fortran (GCC) 4.6.2
+ gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1
+ g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1
+ gfortran GNU Fortran (GCC) 4.6.2
Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -1296,30 +226,30 @@ CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y
Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.11 32-bit y y y y
-Solaris2.11 64-bit y y y y
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
Windows 7 Cygwin n n n y
Windows 7 x64 Cygwin n n n y
Windows 8 y y y y
Windows 8 x64 y y y y
-Mac OS X Lion 10.7.3 32-bit y n y y
-Mac OS X Lion 10.7.3 64-bit y n y y
-Mac OS X Mountain Lion 10.8.1 64-bit y n y y
+Mac OS X Lion 10.7.3 32-bit y n y y
+Mac OS X Lion 10.7.3 64-bit y n y y
+Mac OS X Mountain Lion 10.8.1 64-bit y n y y
Mac OS X Mavericks 10.9.1 64-bit y n y y
-AIX 6.1 32- and 64-bit y n n y
-CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
+AIX 6.1 32- and 64-bit y n n y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n
CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n
-CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
-Linux 2.6.32-431.11.2.el6.ppc64 y y y n
+CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
+Linux 2.6.32-431.11.2.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -1335,7 +265,7 @@ The following platforms are not supported but have been tested for this release.
Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1.2 compiled with
#1 SMP x86_64 GNU/Linux gcc 4.9.1 and gfortran 4.9.1
- (platypus) g95 (GCC 4.0.3 (g95 0.94!)
+ (platypus) g95 (GCC 4.0.3 (g95 0.94!)
FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719
(loyalty) gcc 4.6.1 20110422
@@ -1386,7 +316,7 @@ The following platforms are not supported but have been tested for this release.
gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
(cmake and autotools)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46
hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai
@@ -1402,20 +332,20 @@ Known Problems
* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv
catches some undefined behavior in the alignment algorithm of the macro DETECT_I
- in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment
- of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for
- H5detect.c. In the future, we can separate flags for H5detect.c from the rest of
+ in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment
+ of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for
+ H5detect.c. In the future, we can separate flags for H5detect.c from the rest of
the library. (SLU - 2013/10/16)
* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
complains with this message:
"/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined.
-
+
The reason is that __func__ is a predefined identifier in C99 standard. The
HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
- H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9
+ H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9
C++ compiler doesn't support __func__, thus fails to compile the C++ test.
- But 5.11 C++ compiler does. To check whether your Sun C++ compiler knows this
+ But 5.11 C++ compiler does. To check whether your Sun C++ compiler knows this
identifier, try to compile the following simple C++ program:
#include<stdio.h>
@@ -1433,23 +363,23 @@ Known Problems
* The data conversion test dt_arith.c has failures (segmentation fault) from
"long double" to other datatypes during hard conversion when the library
- is built with the default GCC 4.2.1 on Mac Lion system. It only happens
- with optimization (-O3, -O2, and -O1). Some newer versions of GCC do not
+ is built with the default GCC 4.2.1 on Mac Lion system. It only happens
+ with optimization (-O3, -O2, and -O1). Some newer versions of GCC do not
have this problem. Users should disable optimization or try newer version
of GCC. (Issue 8017. SLU - 2012/6/12)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal
- (3.2.2 on Fedora) doesn't have the problem. Users should lower down the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) doesn't have the problem. Users should lower down the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
- It will overwrite the library's default optimization level. (Issue 7829.
+ It will overwrite the library's default optimization level. (Issue 7829.
SLU - 2012/2/7)
-
+
* --with-mpe configure option does not work with Mpich2. AKC - 2011/03/10)
* While working on the 1.8.6 release of HDF5, a bug was discovered that can
@@ -1472,7 +402,7 @@ Known Problems
cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not
existing. This is due to the MPI_File_open() call failing if the amode has
the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
@@ -1481,19 +411,19 @@ Known Problems
* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel
tests failed with MPI-IO file locking message. AKC - 2007/6/25.
* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers use
- -mp -O1 compilation flags to build the libraries. Higher level of optimization
- causes failures in several HDF5 library tests.
+ -mp -O1 compilation flags to build the libraries. Higher level of optimization
+ causes failures in several HDF5 library tests.
* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the
shared libraries (tested for 1.8.0-beta2)
* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass
and the parallel tests also pass with lots of non-fatal error messages.
-* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test
+* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test
* configuring with --enable-debug=all produces compiler errors on most
platforms. Users who want to run HDF5 in debug mode should use
--enable-debug rather than --enable-debug=all to enable debugging
information on most modules.
* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long
- double to (unsigned) long long and from (unsigned)long long to long double.
+ double to (unsigned) long long and from (unsigned)long long to long double.
* On Altix SGI with Intel 9.0 testmeta.c would not compile with -O3
optimization flag.
* On VAX, Scaleoffset filter isn't supported. The filter cannot be applied to
@@ -1506,19 +436,19 @@ Known Problems
contribute no IO and the application asks to do IO with collective, we found
that when using 4 processors, a simple collective write will be hung
sometimes. This can be verified with t_mpi test under testpar.
-* The dataset created or rewritten with the v1.6.3 library or after can't
- be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is
- enabled. There was a bug in the calculating code of the Fletcher32
- checksum in the library before v1.6.3. The checksum value wasn't consistent
- between big-endian and little-endian systems. This bug was fixed in
- Release 1.6.3. However, after fixing the bug, the checksum value is no
- longer the same as before on little-endian system. The library release
+* The dataset created or rewritten with the v1.6.3 library or after can't
+ be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is
+ enabled. There was a bug in the calculating code of the Fletcher32
+ checksum in the library before v1.6.3. The checksum value wasn't consistent
+ between big-endian and little-endian systems. This bug was fixed in
+ Release 1.6.3. However, after fixing the bug, the checksum value is no
+ longer the same as before on little-endian system. The library release
after 1.6.4 can still read the dataset created or rewritten with the library
of v1.6.2 or before. SLU - 2005/6/30
* For the version 6(6.02 and 6.04) of Portland Group compiler on AMD Opteron
processor, there's a bug in the compiler for optimization(-O2). The library
- failed in several tests but all related to multi driver. The problem has
- been reported to the vendor.
+ failed in several tests but all related to multi driver. The problem has
+ been reported to the vendor.
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
messages like "INFO: 0031-XXX ...". This is from the command poe.
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
@@ -1532,7 +462,7 @@ Known Problems
to provide a mean to run poe without the debug socket.
* The C++ library's tests fails when compiling with PGI C++ compiler. The
- workaround until the problem is correctly handled is to use the
+ workaround until the problem is correctly handled is to use the
flag "--instantiate=local" prior to the configure and build steps, as:
setenv CXX "pgCC --instantiate=local" for pgCC 5.02 and higher
@@ -1546,9 +476,9 @@ Known Problems
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
* With the gcc 2.95.2 compiler, HDF 5 uses the `-ansi' flag during
@@ -1556,7 +486,7 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
* Certain platforms give false negatives when testing h5ls:
@@ -1574,35 +504,35 @@ Known Problems
* On some platforms that use Intel and Absoft compilers to build HDF5 fortran library,
compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90
- complaining about exit subroutine. Comment out the line
+ complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
* Information about building with PGI and Intel compilers is available in
INSTALL file sections 5.7 and 5.8
* On at least one system, (SDSC DataStar), the scheduler (in this case
- LoadLeveler) sends job status updates to standard error when you run
+ LoadLeveler) sends job status updates to standard error when you run
any executable that was compiled with the parallel compilers.
- This causes problems when running "make check" on parallel builds, as
+ This causes problems when running "make check" on parallel builds, as
many of the tool tests function by saving the output from test runs,
- and comparing it to an exemplar.
+ and comparing it to an exemplar.
The best solution is to reconfigure the target system so it no longer
inserts the extra text. However, this may not be practical.
- In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
- the configure and build. This will cause "make check" to continue after
+ In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
+ the configure and build. This will cause "make check" to continue after
detecting errors in the tool tests. However, in the case of SDSC DataStar,
it also leaves you with some 150 "failed" tests to examine by hand.
A second solution is to write a script to run serial tests and filter
out the text added by the scheduler. A sample script used on SDSC
- DataStar is given below, but you will probably have to customize it
- for your installation.
+ DataStar is given below, but you will probably have to customize it
+ for your installation.
- Observe that the basic idea is to insert the script as the first item
- on the command line which executes the the test. The script then
+ Observe that the basic idea is to insert the script as the first item
+ on the command line which executes the the test. The script then
executes the test and filters out the offending text before passing
it on.
@@ -1624,11 +554,11 @@ Known Problems
exit $RETURN_VALUE
You get the HDF make files and test scipts to execute your filter script
- by setting the environment variable "RUNSERIAL" to the full path of the
- script prior to running configure for parallel builds. Remember to
+ by setting the environment variable "RUNSERIAL" to the full path of the
+ script prior to running configure for parallel builds. Remember to
"unsetenv RUNSERIAL" before running configure for a serial build.
- Note that the RUNSERIAL environment variable exists so that we can
+ Note that the RUNSERIAL environment variable exists so that we can
can prefix serial runs as necessary on the target system. On DataStar,
no prefix is necessary. However on an MPICH system, the prefix might
have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index 0956ff1..d52a719 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -2,39 +2,34 @@
* Build and Test HDF5 Examples with CMake *
************************************************************************
-Notes: This short instruction is written for users who want to quickly
+Notes: This short instruction is written for users who want to quickly
test the installation of HDF5 by using the CMake tools to build
and test the HDF5 Examples. The following instructions will show
the default usage and then present common changes for non-default
installations.
For more information, see the USING_HDF5_CMake.txt file.
-
- More information about using CMake can be found at the KitWare
+
+ More information about using CMake can be found at the KitWare
site, www.cmake.org.
-
+
CMake uses the command line and these instructions use the script
method of the ctest command.
========================================================================
-I. Preconditions
+I. Preconditions
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires a minimum CMake version
- of 3.1.0.
-
- 2. You have installed the HDF5 library built with CMake, by executing
- the HDF Install Utility (the *.exe file in the binary package for
- Windows or the *.sh on Linux). If you are using a Windows platform,
- you can obtain a pre-built Windows binary from The HDF Group's website
- at www.hdfgroup.org. See Section "III. Common changes to the
+ web site. The HDF5 1.8.x product requires a minimum CMake version
+ of 3.1.0.
+
+ 2. You have installed the HDF5 library built with CMake, by executing
+ the HDF Install Utility (the *.msi file in the binary package for
+ Windows or the *.sh on Linux). If you are using a Windows platform,
+ you can obtain a pre-built Windows binary from The HDF Group's website
+ at www.hdfgroup.org. See Section "III. Common changes to the
HDF518_Examples.cmake file", for the line to change the location.
-
- 3. On Windows, you have installed the 7Zip package. See Section "III.
- Common changes to the HDF518_Examples.cmake file", for the line to
- change the command.
-
========================================================================
@@ -42,16 +37,16 @@ II. Building HDF5 Examples with CMake
========================================================================
Files in the HDF5 install directory:
- HDF5Examples-0.1.1-Source.zip (or HDF5Examples-0.1.1-Source.tar.gz)
+ HDF5Examples-0.1.1-Source folder
HDF518_Examples.cmake
-
+
Default installation process:
Create a directory to run the examples, i.e. \test_hdf5.
- Copy HDF5Examples-0.1.1-Source.zip(.tar.gz) to this directory, uncompress.
+ Copy HDF5Examples-0.1.1-Source folder to this directory.
Copy HDF518_Examples.cmake to this directory.
- Edit line 8 of the HDF518_Examples.cmake file and change the INSTALLDIR
+ Edit line 8 of the HDF518_Examples.cmake file and change the INSTALLDIR
to the HDF5 install location.
-
+
Execute from this directory:
ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
@@ -60,7 +55,7 @@ The script will use the examples folder HDF5Examples-0.1.1-Source,
It will then configure, build, and execute the examples. All the log files
will be found under the build\Testing\Temporary directory, check these for
errors.
-
+
The amount of script information can be increased by adding -V to the ctest
command. Even more information can be shown by adding -VV instead of -V.
@@ -79,5 +74,3 @@ Line 16: comment to NOT build and test Fortran examples with F2003 option.
Line 17: uncomment to use a compressed source file.
-Line 71: change the CTEST_7Z_COMMAND to a different unzip program.
-
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 514cced..5fdb76c 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -2,60 +2,60 @@
* Build and Install HDF5 Applications with CMake *
************************************************************************
-Notes: This short instruction is written for users who want to quickly
- build HDF5 applications using the CMake tools. Users can adapt
- these instructions for their own applications. For more information,
+Notes: This short instruction is written for users who want to quickly
+ build HDF5 applications using the CMake tools. Users can adapt
+ these instructions for their own applications. For more information,
see the "Minimum C Project Files for CMake" section.
-
- More information about using CMake can be found at the KitWare
+
+ More information about using CMake can be found at the KitWare
site, www.cmake.org.
-
- CMake uses the command line; however, the visual CMake tool is
+
+ CMake uses the command line; however, the visual CMake tool is
available for the configuration step. The steps are similar for
all of the operating systems supported by CMake.
-
+
NOTES:
- 1. Using CMake for building and using HDF5 is under active
- development. While we have attempted to provide error-free
- files, please understand that development with CMake has not
- been extensively tested outside of HDF. The CMake specific
+ 1. Using CMake for building and using HDF5 is under active
+ development. While we have attempted to provide error-free
+ files, please understand that development with CMake has not
+ been extensively tested outside of HDF. The CMake specific
files may change before the next release.
-
- 2. CMake for HDF5 development should be usable on any system
- where CMake is supported. Please send us any comments on how
- CMake support can be improved on any system.
-
- 3. See the appendix at the bottom of this file for an example
- of using a ctest script for building and testing. See
+
+ 2. CMake for HDF5 development should be usable on any system
+ where CMake is supported. Please send us any comments on how
+ CMake support can be improved on any system.
+
+ 3. See the appendix at the bottom of this file for an example
+ of using a ctest script for building and testing. See
INSTALL_CMake.txt for more information.
========================================================================
-I. Preconditions
+I. Preconditions
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires a minimum CMake version
- of 3.1.0.
-
- 2. You have installed the HDF5 library built with CMake, by executing
- the HDF Install Utility (the *.exe file in the binary package for
- Windows). If you are using a Windows platform, you can obtain a
- pre-built Windows binary from The HDF Group's website at
+ web site. The HDF5 1.8.x product requires a minimum CMake version
+ of 3.1.0.
+
+ 2. You have installed the HDF5 library built with CMake, by executing
+ the HDF Install Utility (the *.msi file in the binary package for
+ Windows). If you are using a Windows platform, you can obtain a
+ pre-built Windows binary from The HDF Group's website at
www.hdfgroup.org.
- 3. Set the environment variable HDF5_DIR to the installed location of
- the config files for HDF5. On Windows:
- HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.8.x/cmake/hdf5
-
+ 3. Set the environment variable HDF5_DIR to the installed location of
+ the config files for HDF5. On Windows:
+ HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.8.x/cmake
+
(Note there are no quote characters used on Windows and all platforms
use forward slashes)
4. Created separate source and build directories.
(CMake commands are executed in the build directory)
- 5. Created a CMakeLists.txt file(s) for your source. See Section III
+ 5. Created a CMakeLists.txt file(s) for your source. See Section III
below.
@@ -65,6 +65,7 @@ II. Building HDF5 Applications with CMake
========================================================================
Go through these steps to build HDF5 applications with CMake.
+ (The application must support building with CMake.)
1. Run CMake
2. Configure the cache settings
@@ -79,22 +80,22 @@ These steps are described in more detail below.
The visual CMake executable is named "cmake-gui.exe" on Windows and should be
available in your Start menu. For Linux, UNIX, and Mac users the
- executable is named "cmake-gui" and can be found where CMake was
- installed.
-
- Specify the source and build directories. Make the build and source
- directories different. For example on Windows, if the source is at
- c:\MyHDFstuff\hdf5, then use c:\MyHDFstuff\hdf5\build or
- c:\MyHDFstuff\build\hdf5 for the build directory.
-
+ executable is named "cmake-gui" and can be found where CMake was
+ installed.
+
+ Specify the source and build directories. Make the build and source
+ directories different. For example on Windows, if the source is at
+ c:\MyHDFstuff\hdf5, then use c:\MyHDFstuff\hdf5\build or
+ c:\MyHDFstuff\build\hdf5 for the build directory.
+
PREFERRED:
- Users can perform the configuration step without using the visual
- cmake-gui program. The following is an example command line
+ Users can perform the configuration step without using the visual
+ cmake-gui program. The following is an example command line
configuration step executed within the build directory:
-
+
cmake -G "<generator>" [-D<options>] <sourcepath>
-
- Where <generator> is
+
+ Where <generator> is
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
@@ -111,63 +112,63 @@ These steps are described in more detail below.
2. Configure the cache settings
- 2.1 Visual CMake users, click the Configure button. If this is the first time you are
- running cmake-gui in this directory, you will be prompted for the
- generator you wish to use (for example on Windows, Visual Studio 10).
- CMake will read in the CMakeLists.txt files from the source directory and
- display options for the HDF5 project. After the first configure you
+ 2.1 Visual CMake users, click the Configure button. If this is the first time you are
+ running cmake-gui in this directory, you will be prompted for the
+ generator you wish to use (for example on Windows, Visual Studio 10).
+ CMake will read in the CMakeLists.txt files from the source directory and
+ display options for the HDF5 project. After the first configure you
can adjust the cache settings and/or specify locations of other programs.
-
+
Any conflicts or new values will be highlighted by the configure
- process in red. Once you are happy with all the settings and there are no
- more values in red, click the Generate button to produce the appropriate
- build files.
-
- On Windows, if you are using a Visual Studio generator, the solution and
+ process in red. Once you are happy with all the settings and there are no
+ more values in red, click the Generate button to produce the appropriate
+ build files.
+
+ On Windows, if you are using a Visual Studio generator, the solution and
project files will be created in the build folder.
-
+
On linux, if you are using the Unix Makefiles generator, the Makefiles will
be created in the build folder.
2.2 Alternative command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
-
+
cmake -G "Visual Studio 11" -DBUILD_TESTING:BOOL=ON ..
3. Build HDF5 Applications
-
- On Windows, you can build HDF5 applications using either the Visual Studio Environment
+
+ On Windows, you can build HDF5 applications using either the Visual Studio Environment
or the command line. The command line is normally used on linux, Unix, and Mac.
To build from the command line, navigate to your build directory and
execute the following:
-
- cmake --build . --config {Debug | Release}
-
+
+ cmake --build . --config {Debug | Release}
+
NOTE: "--config {Debug | Release}" may be optional on your platform. We
recommend choosing either Debug or Release on Windows. If you are
- using the pre-built binaries from HDF, use Release.
-
- 3.1 If you wish to use the Visual Studio environment, open the solution
- file in your build directory. Be sure to select either Debug or
+ using the pre-built binaries from HDF, use Release.
+
+ 3.1 If you wish to use the Visual Studio environment, open the solution
+ file in your build directory. Be sure to select either Debug or
Release and build the solution.
-
+
4. Test HDF5 Applications
To test the build, navigate to your build directory and execute:
-
+
ctest . -C {Debug | Release}
-
+
NOTE: "-C {Debug | Release}" may be optional on your platform. We
recommend choosing either Debug or Release to match the build
- step on Windows.
+ step on Windows.
- 5. The files that support building with CMake are all of the files in the
- config/cmake folder, the CMakeLists.txt files in each source folder, and
- CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
- performed by The HDF Group. It should be altered for the user's
+ 5. The files that support building with CMake are all of the files in the
+ config/cmake folder, the CMakeLists.txt files in each source folder, and
+ CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
+ performed by The HDF Group. It should be altered for the user's
installation and needs. The cacheinit.cmake file settings are used by
- The HDF Group for daily testing. It should be altered/ignored for the user's
- installation and needs.
+ The HDF Group for daily testing. It should be altered/ignored for the user's
+ installation and needs.
@@ -175,17 +176,17 @@ These steps are described in more detail below.
III. Minimum C Project Files for CMake
========================================================================
-Create a CMakeLists.txt file at the source root. Include the
+Create a CMakeLists.txt file at the source root. Include the
following text in the file:
##########################################################
cmake_minimum_required (VERSION 3.1.0)
-PROJECT (HDF5MyApp C CXX)
+project (HDF5MyApp C CXX)
-FIND_PACKAGE (HDF5 NAMES hdf5)
-# FIND_PACKAGE (HDF5) # Find non-cmake built HDF5
+find_package (HDF5 NAMES hdf5 COMPONENTS C static)
+# find_package (HDF5) # Find non-cmake built HDF5
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
-set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
+set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
set (example hdf_example)
@@ -193,7 +194,7 @@ add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
TARGET_C_PROPERTIES (${example} " " " ")
target_link_libraries (${example} ${LINK_LIBS})
-ENABLE_TESTING ()
+enable_testing ()
include (CTest)
add_test (NAME test_example COMMAND ${example})
@@ -216,8 +217,8 @@ NOTE: these files are available at the HDF web site:
http://www.hdfgroup.org/HDF5/release/cmakebuild.html
CTestScript.cmake
-
- HDF518ExamplesWindowsbinaryCMake.cmake
+
+ HDF518_Examples.cmake
@@ -226,10 +227,10 @@ ctest
========================================================================
############################################################################
-# Product specific script, HDF518Example.cmake, that uses the
+# Product specific script, HDF518_Examples.cmake, that uses the
# CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
-# "ctest -S HDF518Example.cmake,hdf518Examples -C Release -O hdf518EX.log"
-# where hdf518Examples is the source folder relative to the location of these scripts
+# "ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log"
+# where HDF5Examples-0.1.1-Source is the source folder relative to the location of these scripts
############################################################################
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
@@ -259,7 +260,7 @@ set(REPOSITORY_URL "http://svn.${hdfgroup_url}/hdf5-examples/trunk/1_8")
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5Examples-1.8")
# location of the installed hdf5 (cmake configuration folder)
-set(ENV{HDF5_DIR} "/usr/share/cmake/hdf5")
+set(ENV{HDF5_DIR} "/usr/share/cmake")
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index eddc951..dc6ba0a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -802,7 +802,7 @@ add_custom_command (
)
if (GENERATE_ERROR_HEADERS)
- find_pacakge (Perl)
+ find_package (Perl)
if (PERL_FOUND)
add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/H5Edefin.h
@@ -896,9 +896,15 @@ if (BUILD_SHARED_LIBS)
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
+ if (HDF5_ENABLE_THREADSAFE)
+ set_property (TARGET ${HDF5_LIBSH_TARGET}
+ APPEND PROPERTY COMPILE_DEFINITIONS
+ "H5_HAVE_THREADSAFE"
+ )
+ endif (HDF5_ENABLE_THREADSAFE)
if (HDF5_ENABLE_DEBUG_APIS)
- set_property (TARGET ${HDF5_LIBSH_TARGET}
+ set_property (TARGET ${HDF5_LIBSH_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
"H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG"
)
diff --git a/src/H5.c b/src/H5.c
index 3d4512f..2e05819 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -21,17 +21,16 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Lprivate.h" /* Links */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Lprivate.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Tprivate.h" /* Datatypes */
+#include "H5Pprivate.h" /* Property lists */
#include "H5SLprivate.h" /* Skip lists */
-
+#include "H5Tprivate.h" /* Datatypes */
/****************/
/* Local Macros */
@@ -973,6 +972,36 @@ H5free_memory(void *mem)
} /* end H5free_memory() */
+/*-------------------------------------------------------------------------
+ * Function: H5is_library_threadsafe
+ *
+ * Purpose: Checks to see if the library was built with thread-safety
+ * enabled.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5is_library_threadsafe(hbool_t *is_ts)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API_NOINIT
+ H5TRACE1("e", "*b", is_ts);
+
+ HDassert(is_ts);
+
+#ifdef H5_HAVE_THREADSAFE
+ *is_ts = TRUE;
+#else /* H5_HAVE_THREADSAFE */
+ *is_ts = FALSE;
+#endif /* H5_HAVE_THREADSAFE */
+
+ FUNC_LEAVE_API(ret_value)
+} /* end H5is_library_threadsafe() */
+
+
#if defined(H5_HAVE_THREADSAFE) && defined(H5_BUILT_AS_DYNAMIC_LIB) \
&& defined(H5_HAVE_WIN32_API) && defined(H5_HAVE_WIN_THREADS)
/*-------------------------------------------------------------------------
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index b85bee3..5e29d3f 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -85,8 +85,7 @@ static herr_t H5A__dense_btree2_corder_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5A__dense_btree2_corder_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5A__dense_btree2_corder_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void *record);
/* v2 B-tree driver callbacks for 'name' index */
static herr_t H5A__dense_btree2_name_store(void *native, const void *udata);
@@ -95,8 +94,7 @@ static herr_t H5A__dense_btree2_name_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5A__dense_btree2_name_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5A__dense_btree2_name_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *record);
/* Fractal heap function callbacks */
static herr_t H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *op_data);
@@ -116,9 +114,7 @@ const H5B2_class_t H5A_BT2_NAME[1]={{ /* B-tree class information */
H5A__dense_btree2_name_compare, /* Record comparison callback */
H5A__dense_btree2_name_encode, /* Record encoding callback */
H5A__dense_btree2_name_decode, /* Record decoding callback */
- H5A__dense_btree2_name_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5A__dense_btree2_name_debug /* Record debugging callback */
}};
/* v2 B-tree class for indexing 'creation order' field of attributes */
@@ -132,9 +128,7 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
H5A__dense_btree2_corder_compare, /* Record comparison callback */
H5A__dense_btree2_corder_encode, /* Record encoding callback */
H5A__dense_btree2_corder_decode, /* Record decoding callback */
- H5A__dense_btree2_corder_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5A__dense_btree2_corder_debug /* Record debugging callback */
}};
@@ -381,8 +375,7 @@ H5A__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_U
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__dense_btree2_name_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
+H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
@@ -539,8 +532,7 @@ H5A__dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__dense_btree2_corder_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
+H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord;
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 6e1250b..d3b5014 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -91,7 +91,6 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
const H5B2_class_t *type, haddr_t obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header info */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
unsigned u; /* Local index variable */
char temp_str[128]; /* Temporary string, for formatting */
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
@@ -109,22 +108,13 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
HDassert(type);
- HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
-
- /* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
- /* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
- } /* end if */
/*
* Load the B-tree header.
*/
cache_udata.f = f;
cache_udata.addr = addr;
- cache_udata.ctx_udata = dbg_ctx;
+ cache_udata.ctx_udata = f;
if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
@@ -139,12 +129,12 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
*/
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
"Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of node:",
- hdr->node_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ (unsigned)hdr->node_size);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of raw (disk) record:",
- hdr->rrec_size);
+ (unsigned)hdr->rrec_size);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Dirty flag:",
hdr->cache_info.is_dirty ? "True" : "False");
@@ -177,8 +167,6 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
} /* end for */
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
if(hdr) {
hdr->f = NULL;
if(H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
@@ -208,7 +196,6 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_internal_t *internal = NULL; /* B-tree internal node */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
unsigned u; /* Local index variable */
char temp_str[128]; /* Temporary string, for formatting */
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
@@ -225,25 +212,16 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
HDassert(type);
- HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
- /* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
- /* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
- } /* end if */
-
/*
* Load the B-tree header.
*/
cache_udata.f = f;
cache_udata.addr = hdr_addr;
- cache_udata.ctx_udata = dbg_ctx;
+ cache_udata.ctx_udata = f;
if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
@@ -259,22 +237,19 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
/* Print opening message */
- if(internal->depth == 1)
- HDfprintf(stream, "%*sv2 B-tree Internal 'Leaf' Node...\n", indent, "");
- else
- HDfprintf(stream, "%*sv2 B-tree Internal 'Branch' Node...\n", indent, "");
+ HDfprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
/*
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
"Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of node:",
- hdr->node_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ (unsigned)hdr->node_size);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of raw (disk) record:",
- hdr->rrec_size);
+ (unsigned)hdr->rrec_size);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Dirty flag:",
internal->cache_info.is_dirty ? "True" : "False");
@@ -297,8 +272,8 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str);
HDassert(H5B2_INT_NREC(internal, hdr, u));
- (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6),
- H5B2_INT_NREC(internal, hdr, u), dbg_ctx);
+ (void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6),
+ H5B2_INT_NREC(internal, hdr, u));
} /* end for */
/* Print final node pointer */
@@ -310,8 +285,6 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
internal->node_ptrs[u].addr);
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
if(hdr) {
hdr->f = NULL;
if(H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
@@ -344,7 +317,6 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
unsigned u; /* Local index variable */
char temp_str[128]; /* Temporary string, for formatting */
herr_t ret_value = SUCCEED; /* Return value */
@@ -360,25 +332,16 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
HDassert(indent >= 0);
HDassert(fwidth >= 0);
HDassert(type);
- HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
- /* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
- /* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
- } /* end if */
-
/*
* Load the B-tree header.
*/
cache_udata.f = f;
cache_udata.addr = hdr_addr;
- cache_udata.ctx_udata = dbg_ctx;
+ cache_udata.ctx_udata = f;
if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree header")
@@ -400,12 +363,12 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
*/
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
"Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of node:",
- hdr->node_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ (unsigned)hdr->node_size);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of raw (disk) record:",
- hdr->rrec_size);
+ (unsigned)hdr->rrec_size);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Dirty flag:",
leaf->cache_info.is_dirty ? "True" : "False");
@@ -420,13 +383,11 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str);
HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
- (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6),
- H5B2_LEAF_NREC(leaf, hdr, u), dbg_ctx);
+ (void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6),
+ H5B2_LEAF_NREC(leaf, hdr, u));
} /* end for */
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
if(hdr) {
hdr->f = NULL;
if(H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 08d3ce1..45b6737 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -92,10 +92,8 @@ struct H5B2_class_t {
herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */
herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */
herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */
- herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
- int indent, int fwidth, const void *record, const void *ctx);
- void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
- herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
+ herr_t (*debug)(FILE *stream, int indent, int fwidth, /* Print a record for debugging */
+ const void *record);
};
/* v2 B-tree creation parameters */
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 35771f2..31cf8e1 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -67,9 +67,7 @@ static herr_t H5B2__test_store(void *nrecord, const void *udata);
static herr_t H5B2__test_compare(const void *rec1, const void *rec2);
static herr_t H5B2__test_encode(uint8_t *raw, const void *nrecord, void *ctx);
static herr_t H5B2__test_decode(const uint8_t *raw, void *nrecord, void *ctx);
-static herr_t H5B2__test_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
-static void *H5B2__test_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+static herr_t H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record);
/*********************/
@@ -86,9 +84,7 @@ const H5B2_class_t H5B2_TEST[1]={{ /* B-tree class information */
H5B2__test_compare, /* Record comparison callback */
H5B2__test_encode, /* Record encoding callback */
H5B2__test_decode, /* Record decoding callback */
- H5B2__test_debug, /* Record debugging callback */
- H5B2__test_crt_dbg_context, /* Create debugging context */
- H5B2__test_dst_context /* Destroy debugging context */
+ H5B2__test_debug /* Record debugging callback */
}};
@@ -295,13 +291,11 @@ H5B2__test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2__test_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *record,
- const void H5_ATTR_UNUSED *_udata)
+H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record)
{
FUNC_ENTER_STATIC_NOERR
- HDassert (record);
+ HDassert(record);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Record:",
*(const hsize_t *)record);
@@ -311,45 +305,6 @@ H5B2__test_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUS
/*-------------------------------------------------------------------------
- * Function: H5B2__test_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5B2__test_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5B2_test_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_size = H5F_SIZEOF_SIZE(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5B2__test_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5B2_get_root_addr_test
*
* Purpose: Retrieve the root node's address
diff --git a/src/H5D.c b/src/H5D.c
index f06ec9b..6183ec5 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -323,14 +323,9 @@ hid_t
H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
{
H5D_t *dset = NULL;
- H5G_loc_t loc; /* Object location of group */
- H5G_loc_t dset_loc; /* Object location of dataset */
- H5G_name_t path; /* Dataset group hier. path */
- H5O_loc_t oloc; /* Dataset object location */
- H5O_type_t obj_type; /* Type of object at location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
- hid_t ret_value;
+ H5G_loc_t loc; /* Object location of group */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*si", loc_id, name, dapl_id);
@@ -348,41 +343,18 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
- /* Set up dataset location to fill in */
- dset_loc.oloc = &oloc;
- dset_loc.path = &path;
- H5G_loc_reset(&dset_loc);
-
- /* Find the dataset object */
- if(H5G_loc_find(&loc, name, &dset_loc, dapl_id, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
- loc_found = TRUE;
-
- /* Check that the object found is the correct type */
- if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_DATASET)
- HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
-
/* Open the dataset */
- if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open dataset")
+ if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
/* Register an atom for the dataset */
if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "can't register dataset atom")
done:
- if(ret_value < 0) {
- if(dset) {
- if(H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
- } /* end if */
- else {
- if(loc_found && H5G_loc_free(&dset_loc) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't free location")
- } /* end else */
- } /* end if */
+ if(ret_value < 0)
+ if(dset && H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Dopen2() */
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index af5123c..8584d0a 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -192,6 +192,8 @@ typedef struct H5D_chunk_coll_info_t {
/* Chunked layout operation callbacks */
static herr_t H5D__chunk_construct(H5F_t *f, H5D_t *dset);
+static herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
+ hid_t dapl_id);
static herr_t H5D__chunk_io_init(const H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
const H5S_t *mem_space, H5D_chunk_map_t *fm);
@@ -585,7 +587,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
@@ -593,7 +595,7 @@ H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
H5P_genplist_t *dapl; /* Data access property list object pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(f);
@@ -2118,10 +2120,6 @@ H5D__chunk_flush(H5D_t *dset, hid_t dxpl_id)
/* Sanity check */
HDassert(dset);
- /* Flush any data caught in sieve buffer */
- if(H5D__flush_sieve_buf(dset, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer")
-
/* Fill the DXPL cache values for later use */
if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 29ab1ff..fb3ac85 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -96,6 +96,8 @@ typedef struct H5D_contig_writevv_ud_t {
/* Layout operation callbacks */
static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
+static herr_t H5D__contig_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
+ hid_t dapl_id);
static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t *cm);
@@ -119,7 +121,7 @@ static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset,
/* Contiguous storage layout I/O ops */
const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
H5D__contig_construct,
- NULL,
+ H5D__contig_init,
H5D__contig_is_space_alloc,
H5D__contig_io_init,
H5D__contig_read,
@@ -451,6 +453,78 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D__contig_init
+ *
+ * Purpose: Initialize the contiguous info for a dataset. This is
+ * called when the dataset is initialized.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Friday, August 28, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D__contig_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
+{
+ hsize_t tmp_size; /* Temporary holder for raw data size */
+ size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(dset);
+
+ /* Compute the size of the contiguous storage for versions of the
+ * layout message less than version 3 because versions 1 & 2 would
+ * truncate the dimension sizes to 32-bits of information. - QAK 5/26/04
+ */
+ if(dset->shared->layout.version < 3) {
+ hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
+ hsize_t nelmts; /* Number of elements in dataspace */
+ size_t dt_size; /* Size of datatype */
+
+ /* Retrieve the number of elements in the dataspace */
+ if((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
+ nelmts = (hsize_t)snelmts;
+
+ /* Get the datatype's size */
+ if(0 == (dt_size = H5T_GET_SIZE(dset->shared->type)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
+
+ /* Compute the size of the dataset's contiguous storage */
+ tmp_size = nelmts * dt_size;
+
+ /* Check for overflow during multiplication */
+ if(nelmts != (tmp_size / dt_size))
+ HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
+
+ /* Assign the dataset's contiguous storage size */
+ dset->shared->layout.storage.u.contig.size = tmp_size;
+ } /* end if */
+ else
+ tmp_size = dset->shared->layout.storage.u.contig.size;
+
+ /* Get the sieve buffer size for the file */
+ tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dset->oloc.file);
+
+ /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
+ * from the file access property. (SLU - 2012/3/30) */
+ if(tmp_size < tmp_sieve_buf_size)
+ dset->shared->cache.contig.sieve_buf_size = tmp_size;
+ else
+ dset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__contig_init() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__contig_is_space_alloc
*
* Purpose: Query if space is allocated for layout
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index 3da6b95..cd2bc84 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -226,15 +226,10 @@ hid_t
H5Dopen1(hid_t loc_id, const char *name)
{
H5D_t *dset = NULL;
- H5G_loc_t loc; /* Object location of group */
- H5G_loc_t dset_loc; /* Object location of dataset */
- H5G_name_t path; /* Dataset group hier. path */
- H5O_loc_t oloc; /* Dataset object location */
- H5O_type_t obj_type; /* Type of object at location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
- hid_t ret_value;
+ H5G_loc_t loc; /* Object location of group */
+ hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
@@ -245,41 +240,18 @@ H5Dopen1(hid_t loc_id, const char *name)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- /* Set up dataset location to fill in */
- dset_loc.oloc = &oloc;
- dset_loc.path = &path;
- H5G_loc_reset(&dset_loc);
-
- /* Find the dataset object */
- if(H5G_loc_find(&loc, name, &dset_loc, H5P_DEFAULT, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
- loc_found = TRUE;
-
- /* Check that the object found is the correct type */
- if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_DATASET)
- HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
-
/* Open the dataset */
- if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open dataset")
+ if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
/* Register an atom for the dataset */
if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "can't register dataset atom")
done:
- if(ret_value < 0) {
- if(dset != NULL) {
- if(H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
- } /* end if */
- else {
- if(loc_found && H5G_loc_free(&dset_loc) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
- } /* end else */
- } /* end if */
+ if(ret_value < 0)
+ if(dset && H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Dopen1() */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 53cd86a..28bfa59 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1048,12 +1048,14 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
layout = &new_dset->shared->layout;
if(H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, layout) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve layout")
- if(pline->nused > 0 && H5D_CHUNKED != layout->type)
- HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
fill = &new_dset->shared->dcpl_cache.fill;
if(H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve fill value info")
+ /* Check that chunked layout is used if filters are enabled */
+ if(pline->nused > 0 && H5D_CHUNKED != layout->type)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
+
/* Check if the alloc_time is the default and error out */
if(fill->alloc_time == H5D_ALLOC_TIME_DEFAULT)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "invalid space allocation state")
@@ -1091,7 +1093,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize I/O operations")
/* Create the layout information for the new dataset */
- if((new_dset->shared->layout.ops->construct)(file, new_dset) < 0)
+ if(new_dset->shared->layout.ops->construct && (new_dset->shared->layout.ops->construct)(file, new_dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to construct layout information")
/* Update the dataset's object header info. */
@@ -1144,6 +1146,69 @@ done:
} /* end H5D__create() */
+/*-------------------------------------------------------------------------
+ * Function: H5D__open_name
+ *
+ * Purpose: Opens an existing dataset by name.
+ *
+ * Return: Success: Ptr to a new dataset.
+ * Failure: NULL
+ *
+ * Programmer: Neil Fortner
+ * Friday, March 6, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+H5D_t *
+H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id,
+ hid_t dxpl_id)
+{
+ H5D_t *dset = NULL;
+ H5G_loc_t dset_loc; /* Object location of dataset */
+ H5G_name_t path; /* Dataset group hier. path */
+ H5O_loc_t oloc; /* Dataset object location */
+ H5O_type_t obj_type; /* Type of object at location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ H5D_t *ret_value; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Check args */
+ HDassert(loc);
+ HDassert(name);
+
+ /* Set up dataset location to fill in */
+ dset_loc.oloc = &oloc;
+ dset_loc.path = &path;
+ H5G_loc_reset(&dset_loc);
+
+ /* Find the dataset object */
+ if(H5G_loc_find(loc, name, &dset_loc, dapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found")
+ loc_found = TRUE;
+
+ /* Check that the object found is the correct type */
+ if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get object type")
+ if(obj_type != H5O_TYPE_DATASET)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, NULL, "not a dataset")
+
+ /* Open the dataset */
+ if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't open dataset")
+
+ /* Set return value */
+ ret_value = dset;
+
+done:
+ if(!ret_value)
+ if(loc_found && H5G_loc_free(&dset_loc) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, NULL, "can't free location")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__open_name() */
+
+
/*
*-------------------------------------------------------------------------
* Function: H5D_open
@@ -1423,7 +1488,7 @@ done:
herr_t
H5D_close(H5D_t *dataset)
{
- unsigned free_failed = FALSE;
+ hbool_t free_failed = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1443,16 +1508,18 @@ H5D_close(H5D_t *dataset)
if(H5D__flush_real(dataset, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
- /* Free the data sieve buffer, if it's been allocated */
- if(dataset->shared->cache.contig.sieve_buf) {
- HDassert(dataset->shared->layout.type != H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
-
- dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf);
- } /* end if */
+ /* Set a flag to indicate the dataset is closing, before we start freeing things */
+ /* (Avoids problems with flushing datasets twice, when one is holding
+ * the file open and it iterates through dataset to flush them -QAK)
+ */
+ dataset->shared->closing = TRUE;
/* Free cached information for each kind of dataset */
switch(dataset->shared->layout.type) {
case H5D_CONTIGUOUS:
+ /* Free the data sieve buffer, if it's been allocated */
+ if(dataset->shared->cache.contig.sieve_buf)
+ dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf);
break;
case H5D_CHUNKED:
@@ -1499,8 +1566,9 @@ H5D_close(H5D_t *dataset)
* Release datatype, dataspace and creation property list -- there isn't
* much we can do if one of these fails, so we just continue.
*/
- free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 ||
- H5I_dec_ref(dataset->shared->dcpl_id) < 0);
+ free_failed = (H5I_dec_ref(dataset->shared->type_id) < 0) ||
+ (H5S_close(dataset->shared->space) < 0) ||
+ (H5I_dec_ref(dataset->shared->dcpl_id) < 0);
/* Remove the dataset from the list of opened objects in the file */
if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
@@ -2206,6 +2274,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
{
hsize_t curr_dims[H5S_MAX_RANK]; /* Current dimension sizes */
htri_t changed; /* Whether the dataspace changed size */
+ size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, dset->oloc.addr, FAIL)
@@ -2241,10 +2310,9 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
hbool_t shrink = FALSE; /* Flag to indicate a dimension has shrank */
hbool_t expand = FALSE; /* Flag to indicate a dimension has grown */
hbool_t update_chunks = FALSE; /* Flag to indicate chunk cache update is needed */
- unsigned u; /* Local index variable */
/* Determine if we are shrinking and/or expanding any dimensions */
- for(u = 0; u < dset->shared->ndims; u++) {
+ for(u = 0; u < (size_t)dset->shared->ndims; u++) {
/* Check for various status changes */
if(size[u] < curr_dims[u])
shrink = TRUE;
@@ -2396,44 +2464,48 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
/* Check args */
HDassert(dataset);
+ HDassert(dataset->shared);
+
+ /* Avoid flushing the dataset (again) if it's closing */
+ if(!dataset->shared->closing) {
+ /* Check for metadata changes that will require updating the object's modification time */
+ if(dataset->shared->layout_dirty || dataset->shared->space_dirty) {
+ unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
+
+ /* Pin the object header */
+ if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
+
+ /* Update the layout on disk, if it's been changed */
+ if(dataset->shared->layout_dirty) {
+ if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
+ dataset->shared->layout_dirty = FALSE;
+
+ /* Reset the "update the modification time" flag, so we only do it once */
+ update_flags = 0;
+ } /* end if */
- /* Check for metadata changes that will require updating the object's modification time */
- if(dataset->shared->layout_dirty || dataset->shared->space_dirty) {
- unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
-
- /* Pin the object header */
- if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
-
- /* Update the layout on disk, if it's been changed */
- if(dataset->shared->layout_dirty) {
- if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
- dataset->shared->layout_dirty = FALSE;
-
- /* Reset the "update the modification time" flag, so we only do it once */
- update_flags = 0;
- } /* end if */
+ /* Update the dataspace on disk, if it's been changed */
+ if(dataset->shared->space_dirty) {
+ if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
+ dataset->shared->space_dirty = FALSE;
- /* Update the dataspace on disk, if it's been changed */
- if(dataset->shared->space_dirty) {
- if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
- dataset->shared->space_dirty = FALSE;
+ /* Reset the "update the modification time" flag, so we only do it once */
+ update_flags = 0;
+ } /* end if */
- /* Reset the "update the modification time" flag, so we only do it once */
- update_flags = 0;
+ /* _Somebody_ should have update the modification time! */
+ HDassert(update_flags == 0);
} /* end if */
- /* _Somebody_ should have update the modification time! */
- HDassert(update_flags == 0);
+ /* Flush cached raw data for each kind of dataset layout */
+ if(dataset->shared->layout.ops->flush &&
+ (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
} /* end if */
- /* Flush cached raw data for each kind of dataset layout */
- if(dataset->shared->layout.ops->flush &&
- (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
-
done:
/* Release pointer to object header */
if(oh != NULL)
@@ -2815,3 +2887,4 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_type() */
+
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 01898f2..e9dfb03 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -382,68 +382,9 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
if(H5D_CHUNKED == dataset->shared->layout.type)
dataset->shared->layout.u.chunk.ndims++;
- switch(dataset->shared->layout.type) {
- case H5D_CONTIGUOUS:
- {
- hsize_t tmp_size; /* Temporary holder for raw data size */
- size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
-
- /* Compute the size of the contiguous storage for versions of the
- * layout message less than version 3 because versions 1 & 2 would
- * truncate the dimension sizes to 32-bits of information. - QAK 5/26/04
- */
- if(dataset->shared->layout.version < 3) {
- hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
- hsize_t nelmts; /* Number of elements in dataspace */
- size_t dt_size; /* Size of datatype */
-
- /* Retrieve the number of elements in the dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
- nelmts = (hsize_t)snelmts;
-
- /* Get the datatype's size */
- if(0 == (dt_size = H5T_GET_SIZE(dataset->shared->type)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
-
- /* Compute the size of the dataset's contiguous storage */
- tmp_size = nelmts * dt_size;
-
- /* Check for overflow during multiplication */
- if(nelmts != (tmp_size / dt_size))
- HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
-
- /* Assign the dataset's contiguous storage size */
- dataset->shared->layout.storage.u.contig.size = tmp_size;
- } else
- tmp_size = dataset->shared->layout.storage.u.contig.size;
-
- /* Get the sieve buffer size for the file */
- tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dataset->oloc.file);
-
- /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
- * from the file access property. (SLU - 2012/3/30) */
- if(tmp_size < tmp_sieve_buf_size)
- dataset->shared->cache.contig.sieve_buf_size = tmp_size;
- else
- dataset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
- }
- break;
-
- case H5D_CHUNKED:
- /* Initialize the chunk cache for the dataset */
- if(H5D__chunk_init(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize chunk cache")
- break;
-
- case H5D_COMPACT:
- break;
-
- case H5D_LAYOUT_ERROR:
- case H5D_NLAYOUTS:
- default:
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown storage method")
- } /* end switch */ /*lint !e788 All appropriate cases are covered */
+ /* Initialize the layout information for the dataset */
+ if(dataset->shared->layout.ops->init && (dataset->shared->layout.ops->init)(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 1476229..11f8918 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -408,6 +408,7 @@ typedef struct H5D_rdcdc_t {
*/
typedef struct H5D_shared_t {
size_t fo_count; /* Reference count */
+ hbool_t closing; /* Flag to indicate dataset is closing */
hid_t type_id; /* ID for dataset's datatype */
H5T_t *type; /* Datatype for this dataset */
H5S_t *space; /* Dataspace of this dataset */
@@ -535,6 +536,8 @@ H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space,
H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name,
hid_t type_id, const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id,
hid_t dapl_id, hid_t dxpl_id);
+H5_DLL H5D_t *H5D__open_name(const H5G_loc_t *loc, const char *name,
+ hid_t dapl_id, hid_t dxpl_id);
H5_DLL herr_t H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation,
hid_t dxpl_id);
H5_DLL herr_t H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
@@ -605,14 +608,11 @@ H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage
H5_DLL herr_t H5D__contig_delete(H5F_t *f, hid_t dxpl_id,
const H5O_storage_t *store);
-
/* Functions that operate on chunked dataset storage */
H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr,
hbool_t write_op);
H5_DLL herr_t H5D__chunk_create(const H5D_t *dset /*in,out*/, hid_t dxpl_id);
H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
-H5_DLL herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
- hid_t dapl_id);
H5_DLL hbool_t H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id,
const hsize_t *scaled, H5D_chunk_ud_t *udata);
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 32f23fb..e553f6b 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -65,11 +65,7 @@ typedef struct H5FD_core_t {
* identify a file.
*/
dev_t device; /*file device number */
-#ifdef H5_VMS
- ino_t inode[3]; /*file i-node number */
-#else
ino_t inode; /*file i-node number */
-#endif /*H5_VMS*/
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -741,14 +737,7 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
-#ifdef H5_VMS
- file->inode[0] = sb.st_ino[0];
- file->inode[1] = sb.st_ino[1];
- file->inode[2] = sb.st_ino[2];
-#else
file->inode = sb.st_ino;
-#endif /* H5_VMS */
-
#endif /* H5_HAVE_WIN32_API */
} /* end if */
@@ -981,13 +970,8 @@ H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
-#ifndef H5_VMS
if (f1->inode < f2->inode) HGOTO_DONE(-1)
if (f1->inode > f2->inode) HGOTO_DONE(1)
-#else
- if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1)
-#endif /* H5_VMS */
#endif /*H5_HAVE_WIN32_API*/
} /* end if */
@@ -1523,12 +1507,6 @@ H5FD_core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
if(0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#else /* H5_HAVE_WIN32_API */
-#ifdef H5_VMS
- /* Reset seek offset to the beginning of the file, so that the file isn't
- * re-extended later. This may happen on Open VMS. */
- if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET))
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-#endif /* H5_VMS */
if(-1 == HDftruncate(file->fd, (HDoff_t)new_eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index e9fd1ea..f4ee910 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -83,11 +83,7 @@ typedef struct H5FD_direct_t {
* identify a file.
*/
dev_t device; /*file device number */
-#ifdef H5_VMS
- ino_t inode[3]; /*file i-node number */
-#else
ino_t inode; /*file i-node number */
-#endif /*H5_VMS*/
#else
/*
* On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the
@@ -525,13 +521,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
file->fileindexlo = fileinfo.nFileIndexLow;
#else
file->device = sb.st_dev;
-#ifdef H5_VMS
- file->inode[0] = sb.st_ino[0];
- file->inode[1] = sb.st_ino[1];
- file->inode[2] = sb.st_ino[2];
-#else
file->inode = sb.st_ino;
-#endif /*H5_VMS*/
#endif /*H5_HAVE_WIN32_API*/
file->fa.mboundary = fa->mboundary;
file->fa.fbsize = fa->fbsize;
@@ -673,13 +663,8 @@ H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
-#ifndef H5_VMS
if (f1->inode < f2->inode) HGOTO_DONE(-1)
if (f1->inode > f2->inode) HGOTO_DONE(1)
-#else
- if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1)
-#endif /*H5_VMS*/
#endif
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index d2289fd..e8695c5 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -92,11 +92,7 @@ typedef struct H5FD_log_t {
* Windows code further below.
*/
dev_t device; /* file device number */
-#ifdef H5_VMS
- ino_t inode[3]; /* file i-node number */
-#else
ino_t inode; /* file i-node number */
-#endif /*H5_VMS*/
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -587,14 +583,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
-#ifdef H5_VMS
- file->inode[0] = sb.st_ino[0];
- file->inode[1] = sb.st_ino[1];
- file->inode[2] = sb.st_ino[2];
-#else
file->inode = sb.st_ino;
-#endif /*H5_VMS*/
-
#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
@@ -867,13 +856,8 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
-#ifndef H5_VMS
if(f1->inode < f2->inode) HGOTO_DONE(-1)
if(f1->inode > f2->inode) HGOTO_DONE(1)
-#else
- if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) HGOTO_DONE(1)
-#endif /*H5_VMS*/
#endif
@@ -1553,13 +1537,6 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U
if(0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#else /* H5_HAVE_WIN32_API */
-#ifdef H5_VMS
- /* Reset seek offset to the beginning of the file, so that the file isn't
- * re-extended later. This may happen on Open VMS. */
- if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET))
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-#endif
-
if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
@@ -1579,3 +1556,4 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_truncate() */
+
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 73dd7a0..10e2a66 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -69,11 +69,7 @@ typedef struct H5FD_sec2_t {
* Windows code further below.
*/
dev_t device; /* file device number */
-#ifdef H5_VMS
- ino_t inode[3]; /* file i-node number */
-#else
ino_t inode; /* file i-node number */
-#endif /* H5_VMS */
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -374,13 +370,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
-#ifdef H5_VMS
- file->inode[0] = sb.st_ino[0];
- file->inode[1] = sb.st_ino[1];
- file->inode[2] = sb.st_ino[2];
-#else /* H5_VMS */
file->inode = sb.st_ino;
-#endif /* H5_VMS */
#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
@@ -501,13 +491,8 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) HGOTO_DONE(-1)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
-#ifdef H5_VMS
- if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) HGOTO_DONE(1)
-#else /* H5_VMS */
if(f1->inode < f2->inode) HGOTO_DONE(-1)
if(f1->inode > f2->inode) HGOTO_DONE(1)
-#endif /* H5_VMS */
#endif /* H5_HAVE_WIN32_API */
done:
@@ -901,12 +886,6 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
if(0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#else /* H5_HAVE_WIN32_API */
-#ifdef H5_VMS
- /* Reset seek offset to the beginning of the file, so that the file isn't
- * re-extended later. This may happen on Open VMS. */
- if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET))
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-#endif
if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
@@ -922,3 +901,4 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_truncate() */
+
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 8e7eaf4..686e1fc 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -43,17 +43,7 @@
#include <windows.h>
#include <io.h>
-/* This is not defined in the Windows header files */
-#ifndef F_OK
-#define F_OK 00
-#endif
-
-#endif
-
-#ifdef MAX
-#undef MAX
-#endif /* MAX */
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+#endif /* H5_HAVE_WIN32_API */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_STDIO_g = 0;
@@ -97,11 +87,7 @@ typedef struct H5FD_stdio_t {
* Windows code further below.
*/
dev_t device; /* file device number */
-#ifdef H5_VMS
- ino_t inode[3]; /* file i-node number */
-#else
ino_t inode; /* file i-node number */
-#endif /* H5_VMS */
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -335,7 +321,7 @@ H5Pset_fapl_stdio(hid_t fapl_id)
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
+H5FD_stdio_open( const char *name, unsigned flags, hid_t /*UNUSED*/ fapl_id,
haddr_t maxaddr)
{
FILE *f = NULL;
@@ -450,13 +436,7 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL)
} /* end if */
file->device = sb.st_dev;
-#ifdef H5_VMS
- file->inode[0] = sb.st_ino[0];
- file->inode[1] = sb.st_ino[1];
- file->inode[2] = sb.st_ino[2];
-#else /* H5_VMS */
file->inode = sb.st_ino;
-#endif /* H5_VMS */
#endif /* H5_HAVE_WIN32_API */
return (H5FD_t*)file;
@@ -542,13 +522,8 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) return -1;
if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) return 1;
#endif /* H5_DEV_T_IS_SCALAR */
-#ifdef H5_VMS
- if(memcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) return -1;
- if(memcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) return 1;
-#else /* H5_VMS */
if(f1->inode < f2->inode) return -1;
if(f1->inode > f2->inode) return 1;
-#endif /* H5_VMS */
#endif /* H5_HAVE_WIN32_API */
return 0;
@@ -571,7 +546,7 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
+H5FD_stdio_query(const H5FD_t *_f, unsigned long /*OUT*/ *flags)
{
/* Quiet the compiler */
_f=_f;
@@ -608,7 +583,7 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_ATTR_UNUSED*/ dxpl_id, hsize_t size)
+H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id, hsize_t size)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
haddr_t addr;
@@ -653,7 +628,7 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_A
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
+H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type)
{
const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
@@ -684,7 +659,7 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t addr)
+H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, haddr_t addr)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
@@ -719,10 +694,13 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t ad
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
+H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type)
{
const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
+ /* Quiet the compiler */
+ type = type;
+
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -743,7 +721,7 @@ H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD_stdio_get_handle(H5FD_t *_file, hid_t /*UNUSED*/ fapl, void **file_handle)
{
H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
static const char *func = "H5FD_stdio_get_handle"; /* Function Name for error reporting */
@@ -781,8 +759,8 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *buf/*out*/)
+H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id,
+ haddr_t addr, size_t size, void /*OUT*/ *buf)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_read"; /* Function Name for error reporting */
@@ -886,8 +864,8 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id,
+ haddr_t addr, size_t size, const void *buf)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_write"; /* Function Name for error reporting */
@@ -976,7 +954,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
+H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, unsigned closing)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */
@@ -1021,7 +999,8 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id,
+ hbool_t /*UNUSED*/ closing)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index 40d24e5..93da900 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -104,6 +104,8 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
"Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]);
HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
"File status flags:", (unsigned)(f->shared->sblock->status_flags));
HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index e83330d..ce3f2ea 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -914,20 +914,20 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id)
/* Check for driver info to store */
if(driver_size > 0) {
- H5O_drvinfo_t drvinfo; /* Driver info */
+ H5O_drvinfo_t info; /* Driver info */
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
+ if(H5FD_sb_encode(f->shared->lf, info.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
/* Write driver info information to the superblock extension */
- drvinfo.len = driver_size;
- drvinfo.buf = dbuf;
- if(H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo, dxpl_id) < 0)
+ info.len = driver_size;
+ info.buf = dbuf;
+ if(H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &info, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message")
} /* end if */
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index 06af245..31db886 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -83,8 +83,7 @@ static herr_t H5G_dense_btree2_corder_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5G_dense_btree2_corder_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5G_dense_btree2_corder_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5G_dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void *record);
/* v2 B-tree driver callbacks for 'name' index */
static herr_t H5G_dense_btree2_name_store(void *native, const void *udata);
@@ -93,8 +92,7 @@ static herr_t H5G_dense_btree2_name_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5G_dense_btree2_name_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5G_dense_btree2_name_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5G_dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *record);
/* Fractal heap function callbacks */
static herr_t H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *op_data);
@@ -114,9 +112,7 @@ const H5B2_class_t H5G_BT2_NAME[1]={{ /* B-tree class information */
H5G_dense_btree2_name_compare, /* Record comparison callback */
H5G_dense_btree2_name_encode, /* Record encoding callback */
H5G_dense_btree2_name_decode, /* Record decoding callback */
- H5G_dense_btree2_name_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5G_dense_btree2_name_debug /* Record debugging callback */
}};
/* v2 B-tree class for indexing 'creation order' field of links */
@@ -130,9 +126,7 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
H5G_dense_btree2_corder_compare, /* Record comparison callback */
H5G_dense_btree2_corder_encode, /* Record encoding callback */
H5G_dense_btree2_corder_decode, /* Record decoding callback */
- H5G_dense_btree2_corder_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5G_dense_btree2_corder_debug /* Record debugging callback */
}};
/*****************************/
@@ -362,9 +356,7 @@ H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_name_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+H5G_dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
unsigned u; /* Local index variable */
@@ -528,9 +520,7 @@ H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_corder_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+H5G_dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
unsigned u; /* Local index variable */
diff --git a/src/H5HF.c b/src/H5HF.c
index 0464da4..4a0ad07 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -451,8 +451,8 @@ H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *_id, size_t *obj_len_p)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
- HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
done:
@@ -461,6 +461,68 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5HF_get_obj_off
+ *
+ * Purpose: Get the offset of an entry in a fractal heap
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 20 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_get_obj_off(H5HF_t *fh, hid_t dxpl_id, const void *_id, hsize_t *obj_off_p)
+{
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(fh);
+ HDassert(id);
+ HDassert(obj_off_p);
+
+ /* Get the ID flags */
+ id_flags = *id;
+
+ /* Check for correct heap ID version */
+ if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
+
+ /* Set the shared heap header's file context for this operation */
+ fh->hdr->f = fh->f;
+
+ /* Check type of object in heap */
+ if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ H5HF__man_get_obj_off(fh->hdr, id, obj_off_p);
+ } /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ /* Huge objects are located directly in the file */
+ if(H5HF__huge_get_obj_off(fh->hdr, dxpl_id, id, obj_off_p) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's offset")
+ } /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ /* Tiny objects are not stored in the heap */
+ *obj_off_p = (hsize_t)0;
+ } /* end if */
+ else {
+HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_get_obj_off() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5HF_read
*
* Purpose: Read an object from a fractal heap into a buffer
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index 0229ebe..cb1ec77 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -70,7 +70,6 @@ typedef struct H5HF_huge_bt2_ctx_t {
static void *H5HF_huge_bt2_crt_context(void *udata);
static herr_t H5HF_huge_bt2_dst_context(void *ctx);
-static void *H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
static herr_t H5HF_huge_bt2_indir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_indir_compare(const void *rec1, const void *rec2);
@@ -78,8 +77,7 @@ static herr_t H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *record);
static herr_t H5HF_huge_bt2_filt_indir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_filt_indir_compare(const void *rec1, const void *rec2);
@@ -87,8 +85,7 @@ static herr_t H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void *record);
static herr_t H5HF_huge_bt2_dir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_dir_compare(const void *rec1, const void *rec2);
@@ -96,8 +93,7 @@ static herr_t H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *record);
static herr_t H5HF_huge_bt2_filt_dir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_filt_dir_compare(const void *rec1, const void *rec2);
@@ -105,8 +101,7 @@ static herr_t H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *native,
void *ctx);
static herr_t H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5HF_huge_bt2_filt_dir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void *record);
/*********************/
/* Package Variables */
@@ -122,9 +117,7 @@ const H5B2_class_t H5HF_HUGE_BT2_INDIR[1]={{ /* B-tree class information */
H5HF_huge_bt2_indir_compare, /* Record comparison callback */
H5HF_huge_bt2_indir_encode, /* Record encoding callback */
H5HF_huge_bt2_indir_decode, /* Record decoding callback */
- H5HF_huge_bt2_indir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+ H5HF_huge_bt2_indir_debug /* Record debugging callback */
}};
/* v2 B-tree class for indirectly accessed, filtered 'huge' objects */
@@ -138,9 +131,7 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1]={{ /* B-tree class information */
H5HF_huge_bt2_filt_indir_compare, /* Record comparison callback */
H5HF_huge_bt2_filt_indir_encode, /* Record encoding callback */
H5HF_huge_bt2_filt_indir_decode, /* Record decoding callback */
- H5HF_huge_bt2_filt_indir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+ H5HF_huge_bt2_filt_indir_debug /* Record debugging callback */
}};
/* v2 B-tree class for directly accessed 'huge' objects */
@@ -154,9 +145,7 @@ const H5B2_class_t H5HF_HUGE_BT2_DIR[1]={{ /* B-tree class information */
H5HF_huge_bt2_dir_compare, /* Record comparison callback */
H5HF_huge_bt2_dir_encode, /* Record encoding callback */
H5HF_huge_bt2_dir_decode, /* Record decoding callback */
- H5HF_huge_bt2_dir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+ H5HF_huge_bt2_dir_debug /* Record debugging callback */
}};
/* v2 B-tree class for directly accessed, filtered 'huge' objects */
@@ -170,9 +159,7 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1]={{ /* B-tree class information */
H5HF_huge_bt2_filt_dir_compare, /* Record comparison callback */
H5HF_huge_bt2_filt_dir_encode, /* Record encoding callback */
H5HF_huge_bt2_filt_dir_decode, /* Record decoding callback */
- H5HF_huge_bt2_filt_dir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+ H5HF_huge_bt2_filt_dir_debug /* Record debugging callback */
}};
/*****************************/
@@ -265,46 +252,6 @@ H5HF_huge_bt2_dst_context(void *_ctx)
/*-------------------------------------------------------------------------
- * Function: H5HF_huge_bt2_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_addr = H5F_SIZEOF_ADDR(f);
- ctx->sizeof_size = H5F_SIZEOF_SIZE(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_huge_bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_found
*
* Purpose: Retrieve record for indirectly accessed 'huge' object, when
@@ -505,9 +452,7 @@ H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+H5HF_huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
@@ -727,9 +672,7 @@ H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+H5HF_huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
@@ -920,9 +863,7 @@ H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+H5HF_huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
@@ -1149,8 +1090,7 @@ H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_huge_bt2_filt_dir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
+H5HF_huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrecord)
{
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 5183b67..736b98d 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -100,6 +100,80 @@ static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
/*-------------------------------------------------------------------------
+ * Function: H5HF_id_print
+ *
+ * Purpose: Prints a fractal heap ID.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 20 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_id_print(H5HF_t *fh, hid_t dxpl_id, const void *_id, FILE *stream, int indent, int fwidth)
+{
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ hsize_t obj_off; /* Offset of object */
+ size_t obj_len; /* Length of object */
+ char id_type; /* Character for the type of heap ID */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /*
+ * Check arguments.
+ */
+ HDassert(fh);
+ HDassert(id);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
+
+ /* Get the ID flags */
+ id_flags = *id;
+
+ /* Check for correct heap ID version */
+ if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
+
+ /* Check type of object in heap */
+ if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ id_type = 'M';
+ } /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ id_type = 'H';
+ } /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ id_type = 'T';
+ } /* end if */
+ else {
+HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ } /* end else */
+
+ /* Get the length of the heap object */
+ if(H5HF_get_obj_len(fh, dxpl_id, id, &obj_len) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length")
+
+ /* Get the offset of the heap object */
+ if(H5HF_get_obj_off(fh, dxpl_id, id, &obj_off) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length")
+
+ /* Display the heap ID */
+ HDfprintf(stream, "%*s%-*s (%c, %Hu, %Zu)\n", indent, "", fwidth,
+ "Heap ID info: (type, offset, length)",
+ id_type, obj_off, obj_len);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_id_print() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5HF_dtable_debug
*
* Purpose: Prints debugging info about a doubling table
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index 7f0da02..04cd425 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -585,6 +585,93 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5HF__huge_get_obj_off
+ *
+ * Purpose: Get the offset of a 'huge' object in a fractal heap
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 8 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
+ hsize_t *obj_off_p)
+{
+ haddr_t obj_addr; /* Object's address in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ HDassert(id);
+ HDassert(obj_off_p);
+
+ /* Skip over the flag byte */
+ id++;
+
+ /* Check if 'huge' object ID encodes address & length directly */
+ if(hdr->huge_ids_direct) {
+ /* Retrieve the object's address (common) */
+ H5F_addr_decode(hdr->f, &id, &obj_addr);
+ } /* end if */
+ else {
+ /* Sanity check */
+ HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+
+ /* Check if v2 B-tree is open yet */
+ if(NULL == hdr->huge_bt2) {
+ /* Open existing v2 B-tree */
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
+ } /* end if */
+
+ if(hdr->filter_len > 0) {
+ H5HF_huge_bt2_filt_indir_rec_t found_rec; /* Record found from tracking object */
+ H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
+
+ /* Get ID for looking up 'huge' object in v2 B-tree */
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+
+ /* Look up object in v2 B-tree */
+ if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_found, &found_rec) != TRUE)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
+
+ /* Retrieve the object's address & length */
+ obj_addr = found_rec.addr;
+ } /* end if */
+ else {
+ H5HF_huge_bt2_indir_rec_t found_rec; /* Record found from tracking object */
+ H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
+
+ /* Get ID for looking up 'huge' object in v2 B-tree */
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+
+ /* Look up object in v2 B-tree */
+ if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
+
+ /* Retrieve the object's address & length */
+ obj_addr = found_rec.addr;
+ } /* end else */
+ } /* end else */
+
+ /* Set the value to return */
+ *obj_off_p = (hsize_t)obj_addr;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF__huge_get_obj_off() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5HF_huge_op_real
*
* Purpose: Internal routine to perform an operation on a 'huge' object
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 5f95a91..cfbcd87 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -256,6 +256,41 @@ H5HF_man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*-------------------------------------------------------------------------
+ * Function: H5HF__man_get_obj_off
+ *
+ * Purpose: Get the offset of a managed heap object
+ *
+ * Return: SUCCEED (Can't fail)
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 20 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+H5HF__man_get_obj_off(const H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(id);
+ HDassert(obj_off_p);
+
+ /* Skip over the flag byte */
+ id++;
+
+ /* Skip over object offset */
+ UINT64DECODE_VAR(id, *obj_off_p, hdr->heap_off_size);
+
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5HF__man_get_obj_off() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5HF_man_op_real
*
* Purpose: Internal routine to perform an operation on a managed heap
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index 4655d83..685c83a 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -702,6 +702,8 @@ H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size,
const void *obj, void *id);
H5_DLL herr_t H5HF_man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
size_t *obj_len_p);
+H5_DLL void H5HF__man_get_obj_off(const H5HF_hdr_t *hdr, const uint8_t *id,
+ hsize_t *obj_off_p);
H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
void *obj);
H5_DLL herr_t H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
@@ -716,6 +718,8 @@ H5_DLL herr_t H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size,
void *obj, void *id);
H5_DLL herr_t H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id,
const uint8_t *id, size_t *obj_len_p);
+H5_DLL herr_t H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, hid_t dxpl_id,
+ const uint8_t *id, hsize_t *obj_off_p);
H5_DLL herr_t H5HF_huge_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
void *obj);
H5_DLL herr_t H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
@@ -748,7 +752,7 @@ H5_DLL herr_t H5HF_tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
/* Debugging routines for dumping file structures */
H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id,
- hbool_t dump_internal, FILE *stream, int indent, int fwidth);
+ hbool_t dump_internal, FILE *stream, int indent, int fwidth);
H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
FILE *stream, int indent, int fwidth);
H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h
index 55daa30..441ad3e 100644
--- a/src/H5HFprivate.h
+++ b/src/H5HFprivate.h
@@ -116,6 +116,8 @@ H5_DLL herr_t H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size,
const void *obj, void *id/*out*/);
H5_DLL herr_t H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *id,
size_t *obj_len_p/*out*/);
+H5_DLL herr_t H5HF_get_obj_off(H5HF_t *fh, hid_t dxpl_id, const void *_id,
+ hsize_t *obj_off_p/*out*/);
H5_DLL herr_t H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *id,
void *obj/*out*/);
H5_DLL herr_t H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *id, hbool_t *id_changed,
@@ -131,6 +133,8 @@ H5_DLL herr_t H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats);
H5_DLL herr_t H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size/*out*/);
/* Debugging routines */
+H5_DLL herr_t H5HF_id_print(H5HF_t *fh, hid_t dxpl_id,
+ const void *id, FILE *stream, int indent, int fwidth);
#ifdef H5HF_DEBUGGING
H5_DLL herr_t H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
FILE *stream, int indent, int fwidth);
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index ae13e6b..08d401e 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -125,8 +125,6 @@ H5L_getenv_prefix_name(char **env_prefix/*in,out*/)
*
* Programmer: Vailin Choi, April 2, 2008
*
- * Modification: Raymond Lu, 14 Jan. 2009
- * Added support for OpenVMS pathname
--------------------------------------------------------------------------*/
static herr_t
H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/)
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 203d0fc..3c64131 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -636,13 +636,21 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
+#ifdef H5_HAVE_PARALLEL
+H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy)
+#else
+H5O__cache_clear(const H5F_t H5_ATTR_UNUSED *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy)
+#endif /* H5_HAVE_PARALLEL */
{
H5O_t *oh = (H5O_t *)_thing; /* Object header to reset */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
+#ifdef H5_HAVE_PARALLEL
FUNC_ENTER_STATIC
+#else
+ FUNC_ENTER_STATIC_NOERR
+#endif /* H5_HAVE_PARALLEL */
/* Check arguments */
HDassert(oh);
@@ -673,7 +681,9 @@ H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
oh->ndecode_dirtied = 0;
#endif /* NDEBUG */
+#ifdef H5_HAVE_PARALLEL
done:
+#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__cache_clear() */
@@ -942,14 +952,22 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
+#ifdef H5_HAVE_PARALLEL
H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
+#else
+H5O__cache_chk_clear(const H5F_t H5_ATTR_UNUSED *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy)
+#endif /* H5_HAVE_PARALLEL */
{
H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk to reset */
H5O_t *oh; /* Object header for chunk */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
+#ifdef H5_HAVE_PARALLEL
FUNC_ENTER_STATIC
+#else
+ FUNC_ENTER_STATIC_NOERR
+#endif /* H5_HAVE_PARALLEL */
/* Check arguments */
HDassert(chk_proxy);
@@ -971,7 +989,9 @@ H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
if(chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno)
chk_proxy->oh->mesg[u].dirty = FALSE;
+#ifdef H5_HAVE_PARALLEL
done:
+#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__cache_chk_clear() */
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 0388cd5..bd789c5 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -454,20 +454,23 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
if(oh->mesg[i].flags) {
hbool_t flag_printed = FALSE;
- if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
- HDfprintf(stream, "<S");
- flag_printed = TRUE;
- } /* end if */
+ /* Sanity check that all flags in format are covered below */
+ HDcompile_assert(H5O_MSG_FLAG_BITS == (H5O_MSG_FLAG_CONSTANT|H5O_MSG_FLAG_SHARED|H5O_MSG_FLAG_DONTSHARE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE|H5O_MSG_FLAG_MARK_IF_UNKNOWN|H5O_MSG_FLAG_WAS_UNKNOWN|H5O_MSG_FLAG_SHAREABLE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS));
+
if(oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
HDfprintf(stream, "%sC", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
+ if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
+ HDfprintf(stream, "%sS", (flag_printed ? ", " : "<"));
+ flag_printed = TRUE;
+ } /* end if */
if(oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
- HDfprintf(stream, "%sFIU", (flag_printed ? ", " : "<"));
+ HDfprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
@@ -479,6 +482,14 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
+ if(oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) {
+ HDfprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
+ flag_printed = TRUE;
+ } /* end if */
+ if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) {
+ HDfprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
+ flag_printed = TRUE;
+ } /* end if */
if(!flag_printed)
HDfprintf(stream, "-");
HDfprintf(stream, ">\n");
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 8821694..b38d2a9 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -190,7 +190,7 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
} /* end if */
else {
/* Layout class */
- mesg->type = (H5D_layout_t)*p++;
+ mesg->type = mesg->storage.type = (H5D_layout_t)*p++;
/* Interpret the rest of the message according to the layout class */
switch(mesg->type) {
@@ -389,19 +389,35 @@ H5O_layout_copy(const void *_mesg, void *_dest)
/* copy */
*dest = *mesg;
- /* Deep copy the buffer for compact datasets also */
- if(mesg->type == H5D_COMPACT && mesg->storage.u.compact.size > 0) {
- /* Allocate memory for the raw data */
- if(NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
- HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset")
+ /* Special actions for each type of layout */
+ switch(mesg->type) {
+ case H5D_COMPACT:
+ /* Deep copy the buffer for compact datasets also */
+ if(mesg->storage.u.compact.size > 0) {
+ /* Allocate memory for the raw data */
+ if(NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
+ HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset")
- /* Copy over the raw data */
- HDmemcpy(dest->storage.u.compact.buf, mesg->storage.u.compact.buf, dest->storage.u.compact.size);
- } /* end if */
+ /* Copy over the raw data */
+ HDmemcpy(dest->storage.u.compact.buf, mesg->storage.u.compact.buf, dest->storage.u.compact.size);
+ } /* end if */
+ break;
- /* Reset the pointer of the chunked storage index but not the address */
- if(dest->type == H5D_CHUNKED && dest->storage.u.chunk.ops)
- H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
+ case H5D_CONTIGUOUS:
+ /* Nothing required */
+ break;
+
+ case H5D_CHUNKED:
+ /* Reset the pointer of the chunked storage index but not the address */
+ if(dest->storage.u.chunk.ops)
+ H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
+ break;
+
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
+ default:
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, NULL, "Invalid layout class")
+ } /* end switch */
/* Set return value */
ret_value = dest;
@@ -686,7 +702,7 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo
FILE * stream, int indent, int fwidth)
{
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
- unsigned u;
+ size_t u;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -709,7 +725,7 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo
"Number of dimensions:",
(unsigned long)(mesg->u.chunk.ndims));
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:");
- for(u = 0; u < mesg->u.chunk.ndims; u++)
+ for(u = 0; u < (size_t)mesg->u.chunk.ndims; u++)
HDfprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u]));
HDfprintf(stream, "}\n");
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 53191ca..7e70196 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -834,7 +834,7 @@ H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Link Name Character Set:", (lnk->cset == H5T_CSET_ASCII ?
"ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth,
"Link Name:", lnk->name);
/* Display link-specific information */
@@ -845,7 +845,7 @@ H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
break;
case H5L_TYPE_SOFT:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth,
"Link Value:", lnk->u.soft.name);
break;
diff --git a/src/H5PL.c b/src/H5PL.c
index f4cd3e7..bfe79aa 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -329,6 +329,8 @@ H5PL_load(H5PL_type_t type, int id)
if((H5PL_plugin_g & H5PL_FILTER_PLUGIN) == 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin filter '%d' is not available", id)
break;
+ case H5PL_TYPE_ERROR:
+ case H5PL_TYPE_NONE:
default:
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin '%d' is not valid", id)
}
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 9bf58e4..fe13ac5 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -478,7 +478,7 @@ static herr_t
H5P__dcrt_layout_dec(const void **_pp, void *value)
{
const H5O_layout_t *layout; /* Storage layout */
- H5O_layout_t chunk_layout; /* Layout structure for chunk info */
+ H5O_layout_t tmp_layout; /* Temporary local layout structure */
H5D_layout_t type; /* Layout type */
const uint8_t **pp = (const uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
@@ -518,15 +518,15 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
unsigned u; /* Local index variable */
/* Initialize to default values */
- chunk_layout = H5D_def_layout_chunk_g;
+ tmp_layout = H5D_def_layout_chunk_g;
/* Set rank & dimensions */
- chunk_layout.u.chunk.ndims = (unsigned)ndims;
+ tmp_layout.u.chunk.ndims = (unsigned)ndims;
for(u = 0; u < ndims; u++)
- UINT32DECODE(*pp, chunk_layout.u.chunk.dim[u])
+ UINT32DECODE(*pp, tmp_layout.u.chunk.dim[u])
/* Point at the newly set up struct */
- layout = &chunk_layout;
+ layout = &tmp_layout;
} /* end else */
}
break;
@@ -1185,8 +1185,10 @@ H5P__init_def_layout(void)
FUNC_ENTER_STATIC_NOERR
/* Initialize the default layout info for non-contigous layouts */
+ H5D_def_layout_compact_g.storage.type = H5D_COMPACT;
H5D_def_layout_compact_g.storage.u.compact = def_store_compact;
H5D_def_layout_chunk_g.u.chunk = def_layout_chunk;
+ H5D_def_layout_chunk_g.storage.type = H5D_CHUNKED;
H5D_def_layout_chunk_g.storage.u.chunk = def_store_chunk;
/* Note that we've initialized the default values */
diff --git a/src/H5S.c b/src/H5S.c
index 9b37797..efb9d34 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -190,7 +190,7 @@ H5S_create(H5S_class_t type)
FUNC_ENTER_NOAPI(NULL)
/* Create a new dataspace */
- if(NULL == (new_ds = H5FL_MALLOC(H5S_t)))
+ if(NULL == (new_ds = H5FL_CALLOC(H5S_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Initialize default dataspace state */
diff --git a/src/H5SM.c b/src/H5SM.c
index 1d391f1..1fc3b85 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -2580,14 +2580,15 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr,
- FILE *stream, int indent, int fwidth,
- unsigned table_vers, size_t num_messages)
+H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr, FILE *stream,
+ int indent, int fwidth, haddr_t table_addr)
{
-
+ H5SM_master_table_t *table = NULL; /* SOHM master table */
H5SM_list_t *list = NULL; /* SOHM index list for message type (if in list form) */
- H5SM_index_header_t header; /* A "false" header used to read the list */
- H5SM_list_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ H5SM_list_cache_ud_t lst_cache_udata; /* List user-data for metadata cache callback */
+ H5SM_table_cache_ud_t tbl_cache_udata; /* Table user-data for metadata cache callback */
+ H5HF_t *fh = NULL; /* Fractal heap for SOHM messages */
+ unsigned index_num; /* Index of list, within master table */
unsigned x; /* Counter variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2599,36 +2600,51 @@ H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- /* Check arguments. Version must be 0, the only version implemented so far */
- if(table_vers > H5SM_LIST_VERSION)
- HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "unknown shared message list version")
- if(num_messages == 0 || num_messages > H5O_SHMESG_MAX_LIST_SIZE)
- HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "number of indexes must be between 1 and H5O_SHMESG_MAX_NINDEXES")
+ /* Set up user data for callback */
+ tbl_cache_udata.f = f;
+
+ /* Look up the master SOHM table */
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, &tbl_cache_udata, H5AC__READ_ONLY_FLAG)))
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
- /* Create a temporary header using the arguments. The cache needs this to load the list. */
- HDmemset(&header, 0, sizeof(H5SM_index_header_t));
- header.list_max = header.num_messages = num_messages;
- header.index_type = H5SM_LIST;
- header.index_addr = list_addr;
+ /* Determine which index the list is part of */
+ index_num = table->num_indexes;
+ for(x = 0; x < table->num_indexes; x++) {
+ if(H5F_addr_eq(table->indexes[x].index_addr, list_addr)) {
+ index_num = x;
+ break;
+ } /* end if */
+ } /* end for */
+ if(x == table->num_indexes)
+ HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "list address doesn't match address for any indices in table")
/* Set up user data for metadata cache callback */
- cache_udata.f = f;
- cache_udata.header = &header;
+ lst_cache_udata.f = f;
+ lst_cache_udata.header = &(table->indexes[index_num]);
/* Get the list from the cache */
- if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, list_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, list_addr, &lst_cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index")
+ /* Open the heap, if one exists */
+ if(H5F_addr_defined(table->indexes[index_num].heap_addr))
+ if(NULL == (fh = H5HF_open(f, dxpl_id, table->indexes[index_num].heap_addr)))
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open SOHM heap")
+
HDfprintf(stream, "%*sShared Message List Index...\n", indent, "");
- for(x = 0; x < num_messages; ++x) {
+ for(x = 0; x < table->indexes[index_num].num_messages; ++x) {
HDfprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x);
HDfprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth,
"Hash value:", (unsigned long)list->messages[x].hash);
if(list->messages[x].location == H5SM_IN_HEAP) {
+ HDassert(fh);
+
HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth,
"Location:", "in heap");
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s 0x%Zx\n", indent + 3, "", fwidth,
"Heap ID:", list->messages[x].u.heap_loc.fheap_id);
+H5HF_id_print(fh, dxpl_id,
+ &(list->messages[x].u.heap_loc.fheap_id), stream, indent + 6, (fwidth - 3));
HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
"Reference count:", list->messages[x].u.heap_loc.ref_count);
} /* end if */
@@ -2648,8 +2664,12 @@ H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr,
} /* end for */
done:
+ if(fh && H5HF_close(fh, dxpl_id) < 0)
+ HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "unable to close SOHM heap")
if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, list_addr, list, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index")
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_list_debug() */
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index e18e9fb..7706cbd 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -48,9 +48,8 @@
static void *H5SM_bt2_crt_context(void *udata);
static herr_t H5SM_bt2_dst_context(void *ctx);
static herr_t H5SM_bt2_store(void *native, const void *udata);
-static herr_t H5SM_bt2_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
-static void *H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+static herr_t H5SM_bt2_debug(FILE *stream, int indent, int fwidth,
+ const void *record);
/*****************************/
@@ -67,9 +66,7 @@ const H5B2_class_t H5SM_INDEX[1]={{ /* B-tree class information */
H5SM_message_compare, /* Record comparison callback */
H5SM_message_encode, /* Record encoding callback */
H5SM_message_decode, /* Record decoding callback */
- H5SM_bt2_debug, /* Record debugging callback */
- H5SM_bt2_crt_dbg_context, /* Create debugging context */
- H5SM_bt2_dst_context /* Destroy debugging context */
+ H5SM_bt2_debug /* Record debugging callback */
}};
@@ -195,8 +192,7 @@ H5SM_bt2_store(void *native, const void *udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_bt2_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *record, const void H5_ATTR_UNUSED *_udata)
+H5SM_bt2_debug(FILE *stream, int indent, int fwidth, const void *record)
{
const H5SM_sohm_t *sohm = (const H5SM_sohm_t *)record;
@@ -218,45 +214,6 @@ H5SM_bt2_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED
/*-------------------------------------------------------------------------
- * Function: H5SM_bt2_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5SM_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_addr = H5F_SIZEOF_ADDR(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5SM_bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5SM_bt2_convert_to_list_op
*
* Purpose: An H5B2_remove_t callback function to convert a SOHM
diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h
index d072434..57afacf 100644
--- a/src/H5SMprivate.h
+++ b/src/H5SMprivate.h
@@ -74,7 +74,7 @@ H5_DLL herr_t H5SM_table_debug(H5F_t *f, hid_t dxpl_id, haddr_t table_addr,
FILE *stream, int indent, int fwidth, unsigned table_vers,
unsigned num_indexes);
H5_DLL herr_t H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr,
- FILE *stream, int indent, int fwidth, unsigned list_vers, size_t num_messages);
+ FILE *stream, int indent, int fwidth, haddr_t table_addr);
#endif /*_H5SMprivate_H*/
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 51b5ab6..a2eb804 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -4833,7 +4833,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Advance span 'a', leave span 'b' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -4848,7 +4848,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add lower part of span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Check for overlaps between upper part of span 'a' and lower part of span 'b' */
@@ -4859,7 +4859,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -4876,7 +4876,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_a->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -4886,7 +4886,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -4896,7 +4896,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -4935,7 +4935,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add lower part of span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Check for overlaps between middle part of span 'a' and span 'b' */
@@ -4946,7 +4946,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -4963,7 +4963,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_b->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -4973,7 +4973,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -4983,7 +4983,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -5014,7 +5014,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->low>span_b->low) {
/* Merge/add lower part of span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
} /* end if */
else {
/* Keep going, nothing to split off */
@@ -5029,7 +5029,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -5046,7 +5046,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -5056,7 +5056,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -5066,7 +5066,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_a->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -5106,7 +5106,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add lower part of span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
} /* end if */
else {
/* Keep going, nothing to split off */
@@ -5121,7 +5121,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -5138,7 +5138,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -5148,7 +5148,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -5158,7 +5158,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_b->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -5187,7 +5187,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Advance span 'b', leave span 'a' */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5201,7 +5201,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Advance to the next 'a' span */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5214,7 +5214,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span")
/* Advance to the next 'b' span */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5296,7 +5296,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(span_a->high<span_b->low) {
/* Merge/add span 'a' with/to the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Advance span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5311,19 +5311,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of span 'a' with/to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Merge/add lower part of span 'a' with/to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Get merged span tree for overlapped section */
tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down);
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5360,19 +5360,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of lower & middle parts of span 'a' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Merge/add lower part of span 'a' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Get merged span tree for overlapped section */
tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down);
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5400,14 +5400,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of lower & middle parts of span 'b' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Check if there is a lower part of span 'b' */
if(span_a->low>span_b->low) {
/* Merge/add lower part of span 'b' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* No lower part of span 'b' , keep going... */
@@ -5418,7 +5418,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5455,14 +5455,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of span 'b' to merged spans if so */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Check if there is a lower part of span 'b' */
if(span_a->low>span_b->low) {
/* Merge/add lower part of span 'b' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* No lower part of span 'b' , keep going... */
@@ -5473,7 +5473,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5499,7 +5499,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
else {
/* Merge/add span 'b' with the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Advance span 'b' */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5511,7 +5511,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
while(span_a!=NULL) {
/* Merge/add all 'a' spans into the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Advance to next 'a' span, until all processed */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5523,7 +5523,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
while(span_b!=NULL) {
/* Merge/add all 'b' spans into the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span")
/* Advance to next 'b' span, until all processed */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -7099,8 +7099,8 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab")
/* Allocate space for the hyperslab selection information */
- if((space->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info")
+ if(NULL == (space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info")
/* Save the diminfo */
space->select.num_elem=1;
@@ -7119,18 +7119,18 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
} /* end for */
/* Indicate that the dimension information is valid */
- space->select.sel_info.hslab->diminfo_valid=TRUE;
+ space->select.sel_info.hslab->diminfo_valid = TRUE;
/* Indicate that there's no slab information */
- space->select.sel_info.hslab->span_lst=NULL;
+ space->select.sel_info.hslab->span_lst = NULL;
} /* end if */
else if(op>=H5S_SELECT_OR && op<=H5S_SELECT_NOTA) {
/* Sanity check */
HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Check if there's no hyperslab span information currently */
- if(space->select.sel_info.hslab->span_lst==NULL)
- if(H5S_hyper_generate_spans(space)<0)
+ if(NULL == space->select.sel_info.hslab->span_lst)
+ if(H5S_hyper_generate_spans(space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
/* Add in the new hyperslab information */
@@ -7144,7 +7144,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
/* Set selection type */
- space->select.type=H5S_sel_hyper;
+ space->select.type = H5S_sel_hyper;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -8794,7 +8794,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned H5_ATTR_UNUSED flags, H5S_se
/* Make certain that we don't write too many */
actual_elem = MIN3(leftover, (size_t)iter->elmt_left, maxelem);
- /* initialize row sizes for each dimension */
+ /* Initialize row sizes for each dimension */
elem_size = iter->elmt_size;
for(i = (int)fast_dim, acc = elem_size; i >= 0; i--) {
slab[i] = acc;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index b14f6e5..6847e68 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -4255,7 +4255,11 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
goto padding;
-#ifndef H5_VMS /*Temporary solution to handle VAX special values*/
+ /* Temporary solution to handle VAX special values.
+ * Note that even though we don't support VAX anymore, we
+ * still need to handle legacy VAX files so this code must
+ * remain in place.
+ */
} else if (H5T__bit_find (s, src.u.f.epos, src.u.f.esize,
H5T_BIT_LSB, FALSE)<0) {
/* NaN */
@@ -4280,7 +4284,6 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
goto padding;
-#endif /*H5_VMS*/
}
/*
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index b2401d4..daa7886 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -79,8 +79,8 @@ H5Tget_sign(hid_t type_id)
H5TRACE1("Ts", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype")
ret_value = H5T_get_sign(dt);
@@ -158,18 +158,18 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
H5TRACE2("e", "iTs", type_id, sign);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
if (sign < H5T_SGN_NONE || sign >= H5T_NSGN)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_INTEGER!=dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
/* Commit */
dt->shared->u.atomic.u.i.sign = sign;
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index e93bf65..f37d14b 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -77,18 +77,18 @@ H5Tset_tag(hid_t type_id, const char *tag)
H5TRACE2("e", "i*s", type_id, tag);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_OPAQUE!=dt->shared->type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
if (!tag)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
if (HDstrlen(tag) >= H5T_OPAQUE_TAG_MAX)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long")
/* Commit */
H5MM_xfree(dt->shared->u.opaque.tag);
@@ -124,16 +124,16 @@ H5Tget_tag(hid_t type_id)
H5TRACE1("*s", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_OPAQUE != dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
/* result */
if (NULL==(ret_value=H5MM_strdup(dt->shared->u.opaque.tag)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index 88a5e13..38de494 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -80,12 +80,12 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/)
H5TRACE3("e", "ixx", type_id, lsb, msb);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
/* Get values */
if (lsb)
@@ -124,18 +124,18 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
H5TRACE3("e", "iTpTp", type_id, lsb, msb);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
if (lsb < H5T_PAD_ZERO || lsb >= H5T_NPAD || msb < H5T_PAD_ZERO || msb >= H5T_NPAD)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
/* Commit */
dt->shared->u.atomic.lsb_pad = lsb;
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index b3975af..73a4e32 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -87,12 +87,12 @@ H5Tget_precision(hid_t type_id)
H5TRACE1("z", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
/* Get precision */
if((ret_value = H5T_get_precision(dt)) == 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, 0, "cant't get precision for specified datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, 0, "cant't get precision for specified datatype")
done:
FUNC_LEAVE_API(ret_value)
@@ -176,22 +176,22 @@ H5Tset_precision(hid_t type_id, size_t prec)
H5TRACE2("e", "iz", type_id, prec);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only")
if (prec == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after members are defined")
if (H5T_STRING==dt->shared->type)
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "precision for this type is read-only")
if (H5T_COMPOUND==dt->shared->type || H5T_OPAQUE==dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
/* Do the work */
if (H5T_set_precision(dt, prec)<0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
done:
FUNC_LEAVE_API(ret_value)
@@ -283,9 +283,19 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
dt->shared->u.atomic.u.f.mpos + dt->shared->u.atomic.u.f.msize > prec+offset)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjust sign, mantissa, and exponent fields first")
break;
+
+ case H5T_NO_CLASS:
+ case H5T_STRING:
+ case H5T_OPAQUE:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ case H5T_NCLASSES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
- } /* end switch */ /*lint !e788 All appropriate cases are covered */
+ } /* end switch */
/* Commit */
dt->shared->size = size;
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c
index e8ac4f5..c71827b 100644
--- a/src/H5Tstrpad.c
+++ b/src/H5Tstrpad.c
@@ -83,12 +83,12 @@ H5Tget_strpad(hid_t type_id)
H5TRACE1("Tz", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR, "not a datatype")
while (dt->shared->parent && !H5T_IS_STRING(dt->shared))
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_STRING(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class")
/* result */
if(H5T_IS_FIXED_STRING(dt->shared))
@@ -140,16 +140,16 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad)
H5TRACE2("e", "iTz", type_id, strpad);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
if (strpad < H5T_STR_NULLTERM || strpad >= H5T_NSTR)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type")
while (dt->shared->parent && !H5T_IS_STRING(dt->shared))
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_STRING(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
/* Commit */
if(H5T_IS_FIXED_STRING(dt->shared))
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index 68cabda..4ede3f3 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -136,6 +136,19 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype")
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ /* Not real values */
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
+ break;
+
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
default:
/* Visit "simple" datatypes here */
if(visit_flags & H5T_VISIT_SIMPLE)
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 4ee3d0d..64337b8 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -113,7 +113,7 @@ H5Tvlen_create(hid_t base_id)
H5TRACE1("i", "i", base_id);
/* Check args */
- if(NULL == (base = H5I_object_verify(base_id, H5I_DATATYPE)))
+ if(NULL == (base = (H5T_t *)H5I_object_verify(base_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
/* Create up VL datatype */
@@ -288,6 +288,8 @@ H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
*/
break;
+ case H5T_LOC_MAXLOC:
+ /* MAXLOC is invalid */
default:
HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype location")
} /* end switch */ /*lint !e788 All appropriate cases are covered */
@@ -716,11 +718,11 @@ H5T_vlen_str_mem_write(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, co
/* Use the user's memory allocation routine if one is defined */
if(vl_alloc_info->alloc_func!=NULL) {
- if(NULL==(t=(vl_alloc_info->alloc_func)((seq_len+1)*base_size,vl_alloc_info->alloc_info)))
+ if(NULL==(t = (char *)(vl_alloc_info->alloc_func)((seq_len+1)*base_size,vl_alloc_info->alloc_info)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end if */
else { /* Default to system malloc */
- if(NULL==(t=H5MM_malloc((seq_len+1)*base_size)))
+ if(NULL==(t = (char *)H5MM_malloc((seq_len+1)*base_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end else */
@@ -1119,8 +1121,24 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
} /* end else */
break;
+ /* Don't do anything for simple types */
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ break;
+
+ /* Should never have these values */
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
default:
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype class")
break;
+
} /* end switch */ /*lint !e788 All appropriate cases are covered */
done:
@@ -1167,7 +1185,7 @@ H5T_vlen_reclaim(void *elem, hid_t type_id, unsigned H5_ATTR_UNUSED ndim, const
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
/* Check args */
- if(NULL == (dt = H5I_object_verify(type_id, H5I_DATATYPE)))
+ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Pull the free function and free info pointer out of the op_data and call the recurse datatype free function */
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 38610b6..479cd6c 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -266,9 +266,23 @@ H5Z_calc_parms_array(const H5T_t *type)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
- default: /* Other datatype class: nbit does no compression */
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* Other datatype classes: nbit does no compression */
H5Z_calc_parms_nooptype();
break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
done:
@@ -351,9 +365,23 @@ H5Z_calc_parms_compound(const H5T_t *type)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
- default: /* Other datatype class: nbit does no compression */
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* Other datatype classes: nbit does no compression */
H5Z_calc_parms_nooptype();
break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
/* Close member datatype */
@@ -444,7 +472,7 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned cd_values[])
/* Get datatype's size */
if((dtype_size = H5T_get_size(type)) == 0)
- HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size")
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size")
/* Set "local" parameter for datatype size */
cd_values[cd_values_index++] = dtype_size;
@@ -463,6 +491,10 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned cd_values[])
cd_values[cd_values_index++] = H5Z_NBIT_ORDER_BE;
break;
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_ERROR:
+ case H5T_ORDER_NONE:
default:
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order")
} /* end switch */
@@ -561,7 +593,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned cd_values[])
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
- default: /* other datatype that nbit does no compression */
+ case H5T_VLEN:
/* Check if base datatype is a variable-length string */
if((is_vlstring = H5T_is_variable_str(dtype_base)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot determine if datatype is a variable-length string")
@@ -573,6 +605,23 @@ H5Z_set_parms_array(const H5T_t *type, unsigned cd_values[])
if(H5Z_set_parms_nooptype(dtype_base, cd_values) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
+
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ if(H5Z_set_parms_nooptype(dtype_base, cd_values) == FAIL)
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
done:
@@ -666,16 +715,16 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned cd_values[])
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
- default: /* other datatype that nbit does no compression */
+ case H5T_VLEN:
/* Check if datatype is a variable-length string */
if((is_vlstring = H5T_is_variable_str(dtype_member)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot determine if datatype is a variable-length string")
/* Because for some no-op datatype (VL datatype and VL string datatype), its
- * size can not be retrieved correctly by using function call H5T_get_size,
- * special handling is needed for getting the size. Here the difference between
+ * size can not be retrieved correctly by using function call H5T_get_size,
+ * special handling is needed for getting the size. Here the difference between
* adjacent member offset is used (if alignment is present, the result can be
- * larger, but it does not affect the nbit filter's correctness).
+ * larger, but it does not affect the nbit filter's correctness).
*/
if(dtype_member_class == H5T_VLEN || is_vlstring) {
/* Set datatype class code */
@@ -688,9 +737,25 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned cd_values[])
/* Set "local" parameter for datatype size */
cd_values[cd_values_index++] = dtype_next_member_offset - dtype_member_offset;
- } else
- if(H5Z_set_parms_nooptype(dtype_member, cd_values)==FAIL)
- HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
+ }
+ break;
+
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ /* other datatype that nbit does no compression */
+ if(H5Z_set_parms_nooptype(dtype_member, cd_values) == FAIL)
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit was passed bad datatype")
break;
} /* end switch */
@@ -770,8 +835,22 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
- default: /* no need to calculate other datatypes at top level */
- break;
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* No need to calculate other datatypes at top level */
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
/* Check if the number of parameters exceed what cd_values[] can store */
@@ -826,8 +905,22 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
- default: /* no need to set parameters for other datatypes at top level */
- break;
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* No need to set parameters for other datatypes at top level */
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
/* Check if calculation of parameters matches with setting of parameters */
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 673b9e0..46dd3c1 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -977,6 +977,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
case H5T_ORDER_ERROR:
case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
case H5T_ORDER_NONE:
default:
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order")
@@ -1075,6 +1076,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
case H5T_ORDER_ERROR:
case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
case H5T_ORDER_NONE:
default:
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "bad H5T_NATIVE_INT endianness order")
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 7a94487..db61cc5 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -731,11 +731,20 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_END:
HGOTO_DONE(term)
- default:
+ case H5Z_XFORM_INTEGER:
+ case H5Z_XFORM_FLOAT:
+ case H5Z_XFORM_SYMBOL:
+ case H5Z_XFORM_PLUS:
+ case H5Z_XFORM_MINUS:
+ case H5Z_XFORM_LPAREN:
H5Z_unget_token(current);
HGOTO_DONE(term)
- }
- }
+
+ case H5Z_XFORM_ERROR:
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad transform type passed to data transform expression")
+ } /* end switch */
+ } /* end for */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -773,112 +782,115 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
current = H5Z_get_token(current);
switch (current->tok_type) {
- case H5Z_XFORM_INTEGER:
- factor = H5Z_new_node(H5Z_XFORM_INTEGER);
-
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- sscanf(current->tok_begin, "%ld", &factor->value.int_val);
- break;
+ case H5Z_XFORM_INTEGER:
+ factor = H5Z_new_node(H5Z_XFORM_INTEGER);
- case H5Z_XFORM_FLOAT:
- factor = H5Z_new_node(H5Z_XFORM_FLOAT);
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ sscanf(current->tok_begin, "%ld", &factor->value.int_val);
+ break;
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- sscanf(current->tok_begin, "%lf", &factor->value.float_val);
- break;
+ case H5Z_XFORM_FLOAT:
+ factor = H5Z_new_node(H5Z_XFORM_FLOAT);
- case H5Z_XFORM_SYMBOL:
- factor = H5Z_new_node(H5Z_XFORM_SYMBOL);
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ sscanf(current->tok_begin, "%lf", &factor->value.float_val);
+ break;
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ case H5Z_XFORM_SYMBOL:
+ factor = H5Z_new_node(H5Z_XFORM_SYMBOL);
- factor->value.dat_val = &(dat_val_pointers->ptr_dat_val[dat_val_pointers->num_ptrs]);
- dat_val_pointers->num_ptrs++;
- break;
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- case H5Z_XFORM_LPAREN:
- factor = H5Z_parse_expression(current, dat_val_pointers);
+ factor->value.dat_val = &(dat_val_pointers->ptr_dat_val[dat_val_pointers->num_ptrs]);
+ dat_val_pointers->num_ptrs++;
+ break;
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ case H5Z_XFORM_LPAREN:
+ factor = H5Z_parse_expression(current, dat_val_pointers);
- current = H5Z_get_token(current);
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- if (current->tok_type != H5Z_XFORM_RPAREN) {
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression")
- }
- break;
+ current = H5Z_get_token(current);
- case H5Z_XFORM_RPAREN:
- /* We shouldn't see a ) right now */
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ")
+ if (current->tok_type != H5Z_XFORM_RPAREN) {
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression")
+ }
+ break;
- case H5Z_XFORM_PLUS:
- /* unary + */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ case H5Z_XFORM_RPAREN:
+ /* We shouldn't see a ) right now */
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ")
+
+ case H5Z_XFORM_PLUS:
+ /* unary + */
+ new_node = H5Z_parse_factor(current, dat_val_pointers);
+
+ if (new_node) {
+ if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
+ new_node->type != H5Z_XFORM_SYMBOL) {
+ H5Z_xform_destroy_parse_tree(new_node);
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (new_node) {
- if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
- new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
+ factor = new_node;
+ new_node = H5Z_new_node(H5Z_XFORM_PLUS);
- factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_PLUS);
+ if (!new_node) {
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (!new_node) {
+ new_node->rchild = factor;
+ factor = new_node;
+ } else {
H5Z_xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
+ break;
- new_node->rchild = factor;
- factor = new_node;
- } else {
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
- break;
+ case H5Z_XFORM_MINUS:
+ /* unary - */
+ new_node = H5Z_parse_factor(current, dat_val_pointers);
- case H5Z_XFORM_MINUS:
- /* unary - */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ if (new_node) {
+ if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
+ new_node->type != H5Z_XFORM_SYMBOL) {
+ H5Z_xform_destroy_parse_tree(new_node);
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (new_node) {
- if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
- new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
+ factor = new_node;
+ new_node = H5Z_new_node(H5Z_XFORM_MINUS);
- factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_MINUS);
+ if (!new_node) {
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (!new_node) {
+ new_node->rchild = factor;
+ factor = new_node;
+ } else {
H5Z_xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
+ break;
- new_node->rchild = factor;
- factor = new_node;
- } else {
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
- break;
-
- case H5Z_XFORM_END:
- break;
+ case H5Z_XFORM_END:
+ break;
- default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Invalid token while parsing data transform expression")
+ case H5Z_XFORM_MULT:
+ case H5Z_XFORM_DIVIDE:
+ case H5Z_XFORM_ERROR:
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Invalid token while parsing data transform expression")
}
@@ -1091,23 +1103,30 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
switch (tree->type) {
case H5Z_XFORM_PLUS:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, +, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, +, array_size)
+ break;
case H5Z_XFORM_MINUS:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, -, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, -, array_size)
+ break;
case H5Z_XFORM_MULT:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, *, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, *, array_size)
+ break;
case H5Z_XFORM_DIVIDE:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, /, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, /, array_size)
+ break;
+ case H5Z_XFORM_ERROR:
+ case H5Z_XFORM_INTEGER:
+ case H5Z_XFORM_FLOAT:
+ case H5Z_XFORM_SYMBOL:
+ case H5Z_XFORM_LPAREN:
+ case H5Z_XFORM_RPAREN:
+ case H5Z_XFORM_END:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid expression tree")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid expression tree")
} /* end switch */
/* The result stores a pointer to the new data */
diff --git a/src/H5err.txt b/src/H5err.txt
index 5a38cdf..e0ebf5e 100644
--- a/src/H5err.txt
+++ b/src/H5err.txt
@@ -217,6 +217,7 @@ MINOR, DSPACE, H5E_CANTSELECT, Can't select hyperslab
MINOR, DSPACE, H5E_CANTNEXT, Can't move to next iterator location
MINOR, DSPACE, H5E_BADSELECT, Invalid selection
MINOR, DSPACE, H5E_CANTCOMPARE, Can't compare objects
+MINOR, DSPACE, H5E_CANTAPPEND, Can't append object
# Property list errors
MINOR, PLIST, H5E_CANTGET, Can't get value
diff --git a/src/H5private.h b/src/H5private.h
index 9efd145..5e968a0 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1130,22 +1130,9 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDrealpath
#define HDrealpath(F1,F2) realpath(F1,F2)
#endif /* HDrealloc */
-#ifdef H5_VMS
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
- int HDremove_all(const char * fname);
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
- #ifndef HDremove
- #define HDremove(S) HDremove_all(S)
- #endif /* HDremove */
-#else /* H5_VMS */
- #ifndef HDremove
- #define HDremove(S) remove(S)
- #endif /* HDremove */
-#endif /*H5_VMS*/
+#ifndef HDremove
+ #define HDremove(S) remove(S)
+#endif /* HDremove */
#ifndef HDrename
#define HDrename(OLD,NEW) rename(OLD,NEW)
#endif /* HDrename */
@@ -1562,19 +1549,7 @@ extern char *strdup(const char *s);
(ptr = slash); \
}
-#elif defined(H5_HAVE_VMS_PATH)
-
-/* OpenVMS pathname: <disk name>$<partition>:[path]<file name>
- * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */
-#define H5_DIR_SEPC ']'
-#define H5_DIR_SEPS "]"
-#define H5_CHECK_DELIMITER(SS) (SS == H5_DIR_SEPC)
-#define H5_CHECK_ABSOLUTE(NAME) (HDstrrchr(NAME, ':') && HDstrrchr(NAME, '['))
-#define H5_CHECK_ABS_DRIVE(NAME) (0)
-#define H5_CHECK_ABS_PATH(NAME) (0)
-#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
-
-#else
+#else /* H5_HAVE_WINDOW_PATH */
#define H5_DIR_SEPC '/'
#define H5_DIR_SEPS "/"
@@ -1584,7 +1559,7 @@ extern char *strdup(const char *s);
#define H5_CHECK_ABS_PATH(NAME) (0)
#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
-#endif
+#endif /* H5_HAVE_WINDOW_PATH */
#define H5_COLON_SEPC ':'
@@ -1746,9 +1721,24 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ
*-------------------------------------------------------------------------
*/
-/* `S' is the name of a function which is being tested to check if its */
-/* an API function */
-#define H5_IS_API(S) ('_'!=((const char *)S)[2] && '_'!=((const char *)S)[3] && (!((const char *)S)[4] || '_'!=((const char *)S)[4]))
+/* `S' is the name of a function which is being tested to check if it's
+ * an API function.
+ *
+ * BADNESS:
+ * - Underscore at positions 2 or 3 (0-indexed string). Handles
+ * H5_ and H5X_.
+ * - Underscore at position 4 if position 3 is uppercase or a digit.
+ * Handles H5XY_.
+ */
+#define H5_IS_API(S) (\
+ '_'!=((const char *)S)[2] /* underscore at position 2 */ \
+ && '_'!=((const char *)S)[3] /* underscore at position 3 */ \
+ && !( /* NOT */ \
+ ((const char *)S)[4] /* pos 4 exists */ \
+ && (HDisupper(S[3]) || HDisdigit(S[3])) /* pos 3 dig | uc */ \
+ && '_'==((const char *)S)[4] /* pos 4 underscore */ \
+ )\
+)
/* `S' is the name of a function which is being tested to check if it's */
/* a public API function */
diff --git a/src/H5public.h b/src/H5public.h
index 1d99c11..6d868de 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -94,10 +94,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 227 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 230 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.227" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.230" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
@@ -331,6 +331,7 @@ H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum,
unsigned *relnum);
H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum,
unsigned relnum);
+H5_DLL herr_t H5is_library_threadsafe(hbool_t *is_ts);
H5_DLL herr_t H5free_memory(void *mem);
H5_DLL void *H5allocate_memory(size_t size, hbool_t clear);
H5_DLL void *H5resize_memory(void *mem, size_t size);
@@ -338,5 +339,6 @@ H5_DLL void *H5resize_memory(void *mem, size_t size);
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* _H5public_H */
+
diff --git a/src/H5system.c b/src/H5system.c
index 56db380..e00e5a5 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -582,45 +582,8 @@ void HDsrand(unsigned int seed)
{
g_seed = seed;
}
-#endif
+#endif /* H5_HAVE_RAND_R */
-
-/*-------------------------------------------------------------------------
- * Function: HDremove_all
- *
- * Purpose: Wrapper function for remove on VMS systems
- *
- * This function deletes all versions of a file
- *
- * Return: Success: 0;
- *
- * Failure: -1
- *
- * Programmer: Elena Pourmal
- * March 22, 2006
- *
- *-------------------------------------------------------------------------
- */
-#ifdef H5_VMS
-int
-HDremove_all(const char *fname)
-{
- int ret_value = -1;
- size_t fname_len;
- char *_fname;
-
- fname_len = HDstrlen(fname) + 3; /* to accomodate ";*" and null terminator */
- _fname = (char *)H5MM_malloc(fname_len);
- if(_fname) {
- HDsnprintf(_fname, fname_len, "%s;*", fname);
- /* Do not use HDremove; function becomes recursive (see H5private.h file)*/
- remove(_fname);
- H5MM_xfree(_fname);
- ret_value = 0;
- }
- return ret_value;
-}
-#endif
/*-------------------------------------------------------------------------
* Function: Wgettimeofday
@@ -764,8 +727,6 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
/*
* Unix: name[0] is a "/"
* Windows: name[0-2] is "<drive letter>:\" or "<drive-letter>:/"
- * OpenVMS: <disk name>$<partition>:[path]<file name>
- * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c
*/
if(H5_CHECK_ABSOLUTE(name)) {
if(NULL == (full_path = (char *)H5MM_strdup(name)))
@@ -786,7 +747,6 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
* Windows: name[0-1] is "<drive-letter>:"
* Get current working directory on the drive specified in NAME
* Unix: does not apply
- * OpenVMS: does not apply
*/
if(H5_CHECK_ABS_DRIVE(name)) {
drive = name[0] - 'A' + 1;
@@ -797,14 +757,13 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
* Windows: name[0] is a '/' or '\'
* Get current drive
* Unix: does not apply
- * OpenVMS: does not apply
*/
else if(H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) {
HDsnprintf(cwdpath, MAX_PATH_LEN, "%c:%c", (drive + 'A' - 1), name[0]);
retcwd = cwdpath;
HDstrncpy(new_name, &name[1], name_len);
}
- /* totally relative for Unix, Windows, and OpenVMS: get current working directory */
+ /* totally relative for Unix and Windows: get current working directory */
else {
retcwd = HDgetcwd(cwdpath, MAX_PATH_LEN);
HDstrncpy(new_name, name, name_len);
@@ -823,26 +782,9 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed")
HDstrncpy(full_path, cwdpath, cwdlen + 1);
-#ifdef H5_VMS
- /* If the file name contains relative path, cut off the beginning bracket. Also cut off the
- * ending bracket of CWDPATH to combine the full path name. i.g.
- * cwdpath = SYS$SYSUSERS:[LU.HDF5.TEST]
- * new_name = [.tmp]extlinks.h5
- * full_path = SYS$SYSUSERS:[LU.HDF5.TEST.tmp]extlinks.h5
- */
- if(new_name[0] == '[') {
- char *tmp = new_name;
-
- full_path[cwdlen - 1] = '\0';
- HDstrncat(full_path, ++tmp, HDstrlen(tmp));
- } /* end if */
- else
- HDstrncat(full_path, new_name, HDstrlen(new_name));
-#else
if(!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1]))
HDstrncat(full_path, H5_DIR_SEPS, HDstrlen(H5_DIR_SEPS));
HDstrncat(full_path, new_name, HDstrlen(new_name));
-#endif
} /* end if */
} /* end else */
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c94b880..f33c2df 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -58,6 +58,12 @@ if (BUILD_SHARED_LIBS)
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
+ if (HDF5_ENABLE_THREADSAFE)
+ set_property (TARGET ${HDF5_TEST_LIBSH_TARGET}
+ APPEND PROPERTY COMPILE_DEFINITIONS
+ "H5_HAVE_THREADSAFE"
+ )
+ endif (HDF5_ENABLE_THREADSAFE)
endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
@@ -103,7 +109,7 @@ endif (BUILD_SHARED_LIBS)
TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
)
@@ -134,7 +140,7 @@ endif (BUILD_SHARED_LIBS)
TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
)
@@ -207,7 +213,7 @@ set (H5_TESTS
#cache_api
#cache_tagging
pool
- hyperslab
+ #hyperslab
istore
bittests
dt_arith
@@ -307,6 +313,26 @@ if (BUILD_SHARED_LIBS)
set_target_properties (cache_tagging-shared PROPERTIES FOLDER test)
endif (BUILD_SHARED_LIBS)
+#-- Adding test for hyperslab
+add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
+TARGET_NAMING (hyperslab STATIC)
+TARGET_C_PROPERTIES (hyperslab STATIC " " " ")
+target_link_libraries (hyperslab ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (hyperslab PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (hyperslab-shared ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
+ TARGET_NAMING (hyperslab-shared SHARED)
+ TARGET_C_PROPERTIES (hyperslab-shared SHARED " " " ")
+ target_link_libraries (hyperslab-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (hyperslab-shared PROPERTIES FOLDER test)
+ if (HDF5_ENABLE_THREADSAFE)
+ set_property (TARGET hyperslab-shared
+ APPEND PROPERTY COMPILE_DEFINITIONS
+ "H5_HAVE_THREADSAFE"
+ )
+ endif (HDF5_ENABLE_THREADSAFE)
+endif (BUILD_SHARED_LIBS)
+
#-- Adding test for ttsafe
add_executable (ttsafe
${HDF5_TEST_SOURCE_DIR}/ttsafe.c
@@ -331,6 +357,12 @@ if (BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ")
target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
+ if (HDF5_ENABLE_THREADSAFE)
+ set_property (TARGET ttsafe-shared
+ APPEND PROPERTY COMPILE_DEFINITIONS
+ "H5_HAVE_THREADSAFE"
+ )
+ endif (HDF5_ENABLE_THREADSAFE)
endif (BUILD_SHARED_LIBS)
#-- Adding test for err_compat
@@ -379,7 +411,7 @@ endif (BUILD_SHARED_LIBS)
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
-file (WRITE ${GREP_RUNNER}
+file (WRITE ${GREP_RUNNER}
"file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
if (\${TEST_RESULT} STREQUAL \"0\")
message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 5fe51ed..0efa2ae 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -562,9 +562,10 @@ if (NOT CYGWIN)
add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>)
set_tests_properties (H5TEST-cache PROPERTIES
DEPENDS H5TEST-clear-cache-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=2"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
+ set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 2400)
endif (NOT CYGWIN)
#-- Adding test for cache_api
@@ -725,9 +726,10 @@ if (BUILD_SHARED_LIBS)
add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>)
set_tests_properties (H5TEST-shared-cache PROPERTIES
DEPENDS H5TEST-shared-clear-cache-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=2"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 2400)
endif (NOT CYGWIN)
#-- Adding test for cache_api
@@ -1052,7 +1054,7 @@ if (HDF5_TEST_VFD)
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS)
@@ -1068,7 +1070,7 @@ if (HDF5_TEST_VFD)
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
endif (BUILD_SHARED_LIBS)
@@ -1136,7 +1138,7 @@ if (HDF5_TEST_VFD)
)
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
TIMEOUT 1800
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS)
@@ -1153,7 +1155,7 @@ if (HDF5_TEST_VFD)
)
set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
TIMEOUT 1800
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
endif (BUILD_SHARED_LIBS)
diff --git a/test/H5srcdir.h b/test/H5srcdir.h
index 4f0f439..81624d8 100644
--- a/test/H5srcdir.h
+++ b/test/H5srcdir.h
@@ -32,11 +32,7 @@ static char srcdir_path[1024] = "";
static char srcdir_testpath[1024] = "";
/* Append the test file name to the srcdir path and return the whole string */
-#ifdef H5_VMS
-static const char *H5_get_srcdir_filename(char *filename)
-#else
static const char *H5_get_srcdir_filename(const char *filename)
-#endif
{
const char *srcdir = HDgetenv("srcdir");
@@ -46,19 +42,7 @@ static const char *H5_get_srcdir_filename(const char *filename)
/* Build path to test file */
if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) {
-#ifdef H5_VMS
- HDstrcpy(srcdir_testpath, srcdir);
- if(filename[0] == '[') {
- char *tmp = filename;
-
- srcdir_testpath[HDstrlen(srcdir) - 1] = '\0';
- HDstrcat(srcdir_testpath, ++tmp);
- } /* end if */
- else
- HDstrcat(srcdir_testpath, filename);
-#else
HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s/%s", srcdir, filename);
-#endif
return(srcdir_testpath);
} /* end if */
else
diff --git a/test/dsets.c b/test/dsets.c
index e6b2ee4..136fec2 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -7567,7 +7567,7 @@ test_chunk_expand(hid_t fapl)
if(TRUE != H5Zfilter_avail(H5Z_FILTER_EXPAND)) FAIL_STACK_ERROR
/* Loop over storage allocation time */
- for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; alloc_time++) {
+ for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; H5_INC_ENUM(H5D_alloc_time_t, alloc_time)) {
/* Create file */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
diff --git a/test/dt_arith.c b/test/dt_arith.c
index b3f5cad..eb201d0 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -58,10 +58,9 @@ const char *FILENAME[] = {
};
/*
- * Count up or down depending on whether the machine is big endian, little
- * endian, or VAX (OpenVMS). If local variable `endian' is H5T_ORDER_BE then
- * the result will be I, otherwise the result will be Z-(I+1). VAX is printed
- * as little endian.
+ * Count up or down depending on whether the machine is big endian or little
+ * endian. If local variable `endian' is H5T_ORDER_BE then the result will
+ * be I, otherwise the result will be Z-(I+1).
*/
#define ENDIAN(Z,I,E) (H5T_ORDER_BE==E?(I):(Z)-((I)+1))
@@ -88,11 +87,6 @@ static int skip_overflow_tests_g = 0;
#define HANDLE_SIGFPE
#endif
-/* OpenVMS doesn't have this feature. Make sure to disable it*/
-#ifdef H5_VMS
-#undef HANDLE_SIGFPE
-#endif
-
/*
* Decide what values of floating-point number we want to test. They are
* 1 - normalized; 2 - denormalized; 3 - special.
@@ -2740,24 +2734,6 @@ my_isnan(dtype_t type, void *val)
retval = 1;
}
-#ifdef H5_VMS
- /* For "float" and "double" on OpenVMS/Alpha, NaN is
- * actually a valid value of maximal value.*/
- if(!retval) {
- if (FLT_FLOAT==type) {
- float x;
- HDmemcpy(&x, val, sizeof(float));
- retval = (x==FLT_MAX || x==-FLT_MAX);
- } else if (FLT_DOUBLE==type) {
- double x;
- HDmemcpy(&x, val, sizeof(double));
- retval = (x==DBL_MAX || x==-DBL_MAX);
- } else {
- return 0;
- }
- }
-#endif /*H5_VMS*/
-
return retval;
}
@@ -2786,23 +2762,8 @@ my_isinf(int endian, unsigned char *val, size_t size,
bits = (unsigned char*)HDcalloc((size_t)1, size);
-#ifdef H5_VMS
- if(H5T_ORDER_VAX==endian) {
- for (i = 0; i < size; i += 4) {
- bits[i] = val[(size-2)-i];
- bits[i+1] = val[(size-1)-i];
-
- bits[(size-2)-i] = val[i];
- bits[(size-1)-i] = val[i+1];
- }
- } else {
- for (i=0; i<size; i++)
- bits[size-(i+1)] = *(val + ENDIAN(size,i,endian));
- }
-#else /*H5_VMS*/
for (i=0; i<size; i++)
bits[size-(i+1)] = *(val + ENDIAN(size, i, endian));
-#endif /*H5_VMS*/
if(H5T__bit_find(bits, mpos, msize, H5T_BIT_LSB, 1) < 0 &&
H5T__bit_find(bits, epos, esize, H5T_BIT_LSB, 0) < 0)
@@ -2860,9 +2821,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
unsigned char *hw=NULL; /*ptr to hardware-conv'd*/
int underflow; /*underflow occurred */
int overflow; /*overflow occurred */
-#ifdef H5_VMS
- int maximal; /*maximal value occurred, for VMS only. */
-#endif /* H5_VMS */
int uflow=0; /*underflow debug counters*/
size_t j, k; /*counters */
int sendian; /* source type endianess */
@@ -2913,9 +2871,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
* The remainder of this function is executed only by the child if
* HANDLE_SIGFPE is defined.
*/
-#ifndef H5_VMS
HDsignal(SIGFPE,fpe_handler);
-#endif
/* What are the names of the source and destination types */
if (H5Tequal(src, H5T_NATIVE_FLOAT)) {
@@ -3013,47 +2969,19 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
switch (run_test) {
case TEST_NOOP:
case TEST_NORMAL:
-#ifdef H5_VMS
if(src_type == FLT_FLOAT) {
INIT_FP_NORM(float, FLT_MAX, FLT_MIN, FLT_MAX_10_EXP, FLT_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
- } else if(src_type == FLT_DOUBLE && dst_type == FLT_FLOAT) {
- /*Temporary solution for VMS. Cap double values between maximal and minimal
- *destination values because VMS return exception when overflows or underflows.
- *Same below.*/
- INIT_FP_NORM(double, FLT_MAX, FLT_MIN, FLT_MAX_10_EXP, FLT_MIN_10_EXP,
- src_size, dst_size, buf, saved, nelmts);
} else if(src_type == FLT_DOUBLE) {
INIT_FP_NORM(double, DBL_MAX, DBL_MIN, DBL_MAX_10_EXP, DBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
- } else if(src_type == FLT_LDOUBLE && dst_type == FLT_FLOAT) {
- INIT_FP_NORM(long double, FLT_MAX, FLT_MIN, FLT_MAX_10_EXP, FLT_MIN_10_EXP,
- src_size, dst_size, buf, saved, nelmts);
- } else if(src_type == FLT_LDOUBLE && dst_type == FLT_DOUBLE) {
- INIT_FP_NORM(long double, DBL_MAX, DBL_MIN, DBL_MAX_10_EXP, DBL_MIN_10_EXP,
- src_size, dst_size, buf, saved, nelmts);
} else if(src_type == FLT_LDOUBLE) {
INIT_FP_NORM(long double, LDBL_MAX, LDBL_MIN, LDBL_MAX_10_EXP, LDBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
#endif
} else
goto error;
-#else /*H5_VMS*/
- if(src_type == FLT_FLOAT) {
- INIT_FP_NORM(float, FLT_MAX, FLT_MIN, FLT_MAX_10_EXP, FLT_MIN_10_EXP,
- src_size, dst_size, buf, saved, nelmts);
- } else if(src_type == FLT_DOUBLE) {
- INIT_FP_NORM(double, DBL_MAX, DBL_MIN, DBL_MAX_10_EXP, DBL_MIN_10_EXP,
- src_size, dst_size, buf, saved, nelmts);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
- } else if(src_type == FLT_LDOUBLE) {
- INIT_FP_NORM(long double, LDBL_MAX, LDBL_MIN, LDBL_MAX_10_EXP, LDBL_MIN_10_EXP,
- src_size, dst_size, buf, saved, nelmts);
-#endif
- } else
- goto error;
-#endif /*H5_VMS*/
break;
case TEST_DENORM:
@@ -3129,9 +3057,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_f;
underflow = HDfabs(*((double*)aligned)) < FLT_MIN;
overflow = HDfabs(*((double*)aligned)) > FLT_MAX;
-#ifdef H5_VMS
- maximal = HDfabs(*((double*)aligned)) == FLT_MAX;
-#endif
} else if (FLT_DOUBLE==dst_type) {
hw_d = *((double*)aligned);
hw = (unsigned char*)&hw_d;
@@ -3149,17 +3074,11 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_f;
underflow = HDfabsl(*((long double*)aligned)) < FLT_MIN;
overflow = HDfabsl(*((long double*)aligned)) > FLT_MAX;
-#ifdef H5_VMS
- maximal = HDfabs(*((long double*)aligned)) == FLT_MAX;
-#endif
} else if (FLT_DOUBLE==dst_type) {
hw_d = *((long double*)aligned);
hw = (unsigned char*)&hw_d;
underflow = HDfabsl(*((long double*)aligned)) < DBL_MIN;
overflow = HDfabsl(*((long double*)aligned)) > DBL_MAX;
-#ifdef H5_VMS
- maximal = HDfabs(*((long double*)aligned)) == DBL_MAX;
-#endif
} else {
hw_ld = *((long double*)aligned);
hw = (unsigned char*)&hw_ld;
@@ -3194,17 +3113,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
if (k==dst_size)
continue; /*no error*/
-#ifdef H5_VMS
- /* For "float" and "double" on OpenVMS/Alpha, NaN is
- * a valid value of maximal value.*/
- if (FLT_FLOAT==src_type &&
- my_isnan(src_type, saved+j*sizeof(float))) {
- continue;
- } else if (FLT_DOUBLE==src_type &&
- my_isnan(src_type, saved+j*sizeof(double))) {
- continue;
- }
-#endif /*H5_VMS*/
/*
* Assume same if both results are NaN. There are many NaN bit
@@ -3262,11 +3170,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
if (overflow && my_isinf(dendian, buf+j*sizeof(float),
dst_size, dst_mpos, dst_msize, dst_epos, dst_esize))
continue; /* all overflowed, no error */
-#ifdef H5_VMS
- if (maximal && my_isinf(dendian, buf+j*sizeof(float),
- dst_size, dst_mpos, dst_msize, dst_epos, dst_esize))
- continue; /* maximal value, no error */
-#endif /*H5_VMS*/
check_mant[0] = HDfrexpf(x, check_expo+0);
check_mant[1] = HDfrexpf(hw_f, check_expo+1);
} else if (FLT_DOUBLE==dst_type) {
@@ -3278,11 +3181,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
if (overflow && my_isinf(dendian, buf+j*sizeof(double),
dst_size, dst_mpos, dst_msize, dst_epos, dst_esize))
continue; /* all overflowed, no error */
-#ifdef H5_VMS
- if (maximal && my_isinf(dendian, buf+j*sizeof(double),
- dst_size, dst_mpos, dst_msize, dst_epos, dst_esize))
- continue; /* maximal value, no error */
-#endif /*H5_VMS*/
check_mant[0] = HDfrexp(x, check_expo+0);
check_mant[1] = HDfrexp(hw_d, check_expo+1);
#if H5_SIZEOF_LONG_DOUBLE !=0 && (H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE)
@@ -4924,7 +4822,6 @@ run_fp_tests(const char *name)
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_DOUBLE);
#endif
-#ifndef H5_VMS
/*Test denormalized values. TEST_DENORM indicates denormalized values.*/
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
@@ -4944,7 +4841,6 @@ run_fp_tests(const char *name)
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_DOUBLE);
#endif
-#endif /*H5_VMS*/
done:
return nerrors;
@@ -5085,11 +4981,7 @@ run_fp_int_conv(const char *name)
int nerrors = 0;
int test_values;
-#ifdef H5_VMS
- test_values = TEST_NORMAL;
-#else
for(test_values = TEST_NORMAL; test_values <= TEST_SPECIAL; test_values++) {
-#endif /*H5_VMS*/
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SCHAR);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SCHAR);
@@ -5194,9 +5086,7 @@ run_fp_int_conv(const char *name)
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#endif
#endif
-#ifndef H5_VMS
} /* end for */
-#endif /* H5_VMS */
return nerrors;
}
@@ -5248,10 +5138,8 @@ main(void)
* for user-defined integer types */
nerrors += test_derived_integer();
-#ifndef H5_VMS
/* Does floating point overflow generate a SIGFPE? */
generates_sigfpe();
-#endif
/* Test degenerate cases */
nerrors += run_fp_tests("noop");
diff --git a/test/dtypes.c b/test/dtypes.c
index 59cf000..88bbce0 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -3233,11 +3233,7 @@ test_compound_18(void)
/* Open Generated File */
/* (generated with gen_bad_compound.c) */
-#ifdef H5_VMS
- if((file = H5Fopen(TESTFILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
-#else
if((file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
-#endif
/* Try to open the datatype */
H5E_BEGIN_TRY {
diff --git a/test/earray.c b/test/earray.c
index feaa15e..b510992 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -2894,7 +2894,7 @@ main(void)
init_cparam(&cparam);
/* Iterate over the testing parameters */
- for(curr_test = EARRAY_TEST_NORMAL; curr_test < EARRAY_TEST_NTESTS; curr_test++) {
+ for(curr_test = EARRAY_TEST_NORMAL; curr_test < EARRAY_TEST_NTESTS; H5_INC_ENUM(earray_test_type_t, curr_test)) {
/* Initialize the testing parameters */
init_tparam(&tparam, &cparam);
@@ -2926,7 +2926,7 @@ main(void)
nerrors += test_flush_depend(fapl, &cparam, &tparam);
/* Iterate over the type of capacity tests */
- for(curr_iter = EARRAY_ITER_FW; curr_iter < EARRAY_ITER_NITERS; curr_iter++) {
+ for(curr_iter = EARRAY_ITER_FW; curr_iter < EARRAY_ITER_NITERS; H5_INC_ENUM(earray_iter_type_t, curr_iter)) {
hsize_t sblk; /* Super block index */
hsize_t dblk; /* Data block index */
hsize_t nelmts; /* # of elements to test */
diff --git a/test/farray.c b/test/farray.c
index 4c18916..43b63c6 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -1554,11 +1554,11 @@ main(void)
}
/* Iterate over the testing parameters */
- for(curr_test = FARRAY_TEST_NORMAL; curr_test < FARRAY_TEST_NTESTS; curr_test++) {
+ for(curr_test = FARRAY_TEST_NORMAL; curr_test < FARRAY_TEST_NTESTS; H5_INC_ENUM(farray_test_type_t, curr_test)) {
/* Initialize the testing parameters */
- HDmemset(&tparam, 0, sizeof(tparam));
- tparam.nelmts = TEST_NELMTS;
+ HDmemset(&tparam, 0, sizeof(tparam));
+ tparam.nelmts = TEST_NELMTS;
/* Set appropriate testing parameters for each test */
switch(curr_test) {
@@ -1589,7 +1589,7 @@ main(void)
nerrors += test_delete_open(fapl, &cparam, &tparam);
/* Iterate over the type of capacity tests */
- for(curr_iter = FARRAY_ITER_FW; curr_iter < FARRAY_ITER_NITERS; curr_iter++) {
+ for(curr_iter = FARRAY_ITER_FW; curr_iter < FARRAY_ITER_NITERS; H5_INC_ENUM(farray_iter_type_t, curr_iter)) {
/* Set appropriate parameters for each type of iteration */
switch(curr_iter) {
diff --git a/test/fheap.c b/test/fheap.c
index fee6fdf..bb30e05 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -16380,7 +16380,7 @@ main(void)
/* Iterate over the testing parameters */
#ifndef QAK
- for(curr_test = FHEAP_TEST_NORMAL; curr_test < FHEAP_TEST_NTESTS; curr_test++) {
+ for(curr_test = FHEAP_TEST_NORMAL; curr_test < FHEAP_TEST_NTESTS; H5_INC_ENUM(fheap_test_type_t, curr_test)) {
#else /* QAK */
HDfprintf(stderr, "Uncomment test loop!\n");
curr_test = FHEAP_TEST_NORMAL;
@@ -16418,9 +16418,7 @@ curr_test = FHEAP_TEST_NORMAL;
nerrors += test_id_limits(fapl, &small_cparam);
nerrors += test_filtered_create(fapl, &small_cparam);
nerrors += test_size(fapl, &small_cparam);
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += test_reopen_hdr(fapl, &small_cparam);
-#endif /*H5_CANNOT_OPEN_TWICE*/
#else /* QAK */
HDfprintf(stderr, "Uncomment tests!\n");
#endif /* QAK */
@@ -16432,7 +16430,7 @@ HDfprintf(stderr, "Uncomment tests!\n");
#ifndef QAK2
/* Filling with different sized objects */
- for(fill = FHEAP_TEST_FILL_LARGE; fill < FHEAP_TEST_FILL_N; fill++) {
+ for(fill = FHEAP_TEST_FILL_LARGE; fill < FHEAP_TEST_FILL_N; H5_INC_ENUM(fheap_test_fill_t, fill)) {
#else /* QAK2 */
HDfprintf(stderr, "Uncomment test loop!\n");
fill = FHEAP_TEST_FILL_LARGE;
@@ -16544,9 +16542,9 @@ HDfprintf(stderr, "Uncomment tests!\n");
fheap_test_del_drain_t drain_half; /* Deletion draining */
/* More complex removal patterns */
- for(del_dir = FHEAP_DEL_FORWARD; del_dir < FHEAP_DEL_NDIRS; del_dir++) {
+ for(del_dir = FHEAP_DEL_FORWARD; del_dir < FHEAP_DEL_NDIRS; H5_INC_ENUM(fheap_test_del_dir_t, del_dir)) {
tparam.del_dir = del_dir;
- for(drain_half = FHEAP_DEL_DRAIN_ALL; drain_half < FHEAP_DEL_DRAIN_N; drain_half++) {
+ for(drain_half = FHEAP_DEL_DRAIN_ALL; drain_half < FHEAP_DEL_DRAIN_N; H5_INC_ENUM(fheap_test_del_drain_t, drain_half)) {
tparam.drain_half = drain_half;
#else /* QAK2 */
HDfprintf(stderr, "Uncomment test loops!\n");
@@ -16685,7 +16683,7 @@ HDfprintf(stderr, "Uncomment tests!\n");
} /* end switch */
/* Try several different methods of deleting objects */
- for(del_dir = FHEAP_DEL_FORWARD; del_dir < FHEAP_DEL_NDIRS; del_dir++) {
+ for(del_dir = FHEAP_DEL_FORWARD; del_dir < FHEAP_DEL_NDIRS; H5_INC_ENUM(fheap_test_del_dir_t, del_dir)) {
tparam.del_dir = del_dir;
/* Test 'huge' object insert & delete */
@@ -16728,7 +16726,7 @@ HDfprintf(stderr, "Uncomment tests!\n");
{
fheap_test_del_dir_t del_dir; /* Deletion direction */
- for(del_dir = FHEAP_DEL_FORWARD; del_dir < FHEAP_DEL_NDIRS; del_dir++) {
+ for(del_dir = FHEAP_DEL_FORWARD; del_dir < FHEAP_DEL_NDIRS; H5_INC_ENUM(fheap_test_del_dir_t, del_dir)) {
tparam.del_dir = del_dir;
/* Controlled tests */
diff --git a/test/fillval.c b/test/fillval.c
index c791504..b7b2ff5 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -845,7 +845,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
if(datatype==H5T_INTEGER) {
/*check for overflow*/
HDassert((nelmts * sizeof(int)) == (hsize_t)((size_t)(nelmts * sizeof(int))));
- buf = HDmalloc((size_t)(nelmts * sizeof(int)));
+ buf = (int *)HDmalloc((size_t)(nelmts * sizeof(int)));
if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, buf) < 0)
goto error;
diff --git a/test/flush2.c b/test/flush2.c
index 28ce41e..0ee299e 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -189,8 +189,6 @@ main(void)
#if defined H5_HAVE_WIN32_API && !defined (hdf5_EXPORTS)
SKIPPED();
puts(" DLL will flush the file even when calling _exit, skip this test temporarily");
-#elif defined H5_VMS
- SKIPPED();
#else
H5_FAILED()
goto error;
@@ -212,8 +210,6 @@ main(void)
#if defined H5_HAVE_WIN32_API && !defined (hdf5_EXPORTS)
SKIPPED();
puts(" DLL will flush the file even when calling _exit, skip this test temporarily");
-#elif defined H5_VMS
- SKIPPED();
#else
H5_FAILED()
goto error;
diff --git a/test/gen_cross.c b/test/gen_cross.c
index 1c73016..2d4b788 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -22,6 +22,10 @@
* Run it on an OpenVMS, a little-endian, and a big-endian machine. Change the
* output file names to vms_data.h5, le_data.h5, and be_data.h5, and put them
* under hdf5/test/ directory.
+ *
+ * Note that we no longer support OpenVMS. The OpenVMS file will eventually
+ * have to go away since we won't be able to re-create it but it's probably
+ * worth keeping around for now.
*/
#include <stdio.h>
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index a1312d2..fc044da 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -57,6 +57,10 @@ main (void)
strcpy(filename1, NAME_BE_1);
strcpy(filename2, NAME_BE_2);
break;
+ case H5T_ORDER_ERROR:
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
default:
goto error;
}
diff --git a/test/getname.c b/test/getname.c
index dc1ddbe..e1bbc6b 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -2995,9 +2995,7 @@ main(void)
nerrors += test_main(file_id, fapl);
nerrors += test_obj_ref(fapl);
nerrors += test_reg_ref(fapl);
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += test_elinks(fapl);
-#endif /*H5_CANNOT_OPEN_TWICE*/
/* Close file */
H5Fclose(file_id);
diff --git a/test/lheap.c b/test/lheap.c
index bdb6360..492316e 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -179,11 +179,7 @@ main(void)
{
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
hid_t dset = -1;
-#ifdef H5_VMS
- file = H5Fopen(TESTFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
-#else
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
-#endif
if(file >= 0){
if((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0)
TEST_ERROR
diff --git a/test/links.c b/test/links.c
index cfbc4a1..ef71be7 100644
--- a/test/links.c
+++ b/test/links.c
@@ -36,13 +36,8 @@
/* File for external link test. Created with gen_udlinks.c */
#define LINKED_FILE "be_extlink2.h5"
-#ifdef H5_VMS
-#define TMPDIR "[.tmp]"
-#define TMPDIR2 "[.tmp2]"
-#else /* H5_VMS */
#define TMPDIR "tmp/"
#define TMPDIR2 "tmp2/"
-#endif /* H5_VMS */
/* Symlinks for external link symlink test */
#define SYMLINK1 TMPDIR "sym1.h5"
@@ -320,7 +315,7 @@ typedef struct {
* Function: fix_ext_filename
*
* Purpose: Internal function to append path to file name. It handles
- * path name of Unix, Windows, and OpenVMS.
+ * path name of Unix and Windows.
*
* Return: void
*
@@ -333,17 +328,8 @@ fix_ext_filename(char *path_name, char *cwd, const char *file_name)
{
HDstrcpy(path_name, cwd);
-#ifdef H5_VMS
- if(file_name[0] == '[') {
- char *tmp = file_name;
- path_name[strlen(cwd)-1] = '\0';
- HDstrcat(path_name, ++tmp);
- } else
- HDstrcat(path_name, file_name);
-#else
HDstrcat(path_name, "/");
HDstrcat(path_name, file_name);
-#endif
}
@@ -2877,7 +2863,6 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
* set up name for main file:
* Linux: "/CWD/tmp/extlinks0"
* Window: "<cur drive>:/CWD/tmp/extlinks0"
- * OpenVMS: "<cur disk>$<partition>:[CWD.tmp]extlinks0"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
@@ -6943,7 +6928,6 @@ external_file_cache(hid_t fapl, hbool_t new_format)
/* Verify that all files are now closed */
H5F_sfile_assert_num(0);
-#ifndef H5_CANNOT_OPEN_TWICE
/*
* Test 5: 3 file cycle
*/
@@ -7045,7 +7029,6 @@ external_file_cache(hid_t fapl, hbool_t new_format)
/* Verify that all files are now closed */
H5F_sfile_assert_num(0);
-#endif /* H5_CANNOT_OPEN_TWICE */
/* Close fapl */
H5Pclose(my_fapl);
@@ -14580,15 +14563,11 @@ main(void)
printf("\n---Testing without external file cache---\n");
} /* end else */
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0;
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_self(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_pingpong(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_recursive(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_query(my_fapl, new_format) < 0 ? 1 : 0;
@@ -14596,9 +14575,7 @@ main(void)
nerrors += external_link_unlink_dense(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0;
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_closing(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0;
@@ -14628,9 +14605,7 @@ main(void)
nerrors += external_symlink(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_copy_invalid_object(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_dont_fail_to_source(my_fapl, new_format) < 0 ? 1 : 0;
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_open_twice(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
} /* end for */
/* These tests assume that external links are a form of UD links,
@@ -14654,9 +14629,7 @@ main(void)
nerrors += obj_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += obj_visit_stop(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += link_filters(my_fapl, new_format) < 0 ? 1 : 0;
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += obj_exists(my_fapl, new_format) < 0 ? 1 : 0;
-#endif /* H5_CANNOT_OPEN_TWICE */
/* Keep this test last, it's testing files that are used above */
/* do not do this for files used by external link tests */
diff --git a/test/links_env.c b/test/links_env.c
index 308d562..6e47667 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -25,11 +25,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
-#ifdef H5_VMS
-#define TMPDIR "[.tmp]"
-#else /* H5_VMS */
#define TMPDIR "tmp/"
-#endif /* H5_VMS */
#define NAME_BUF_SIZE 1024
const char *FILENAME[] = {
diff --git a/test/objcopy.c b/test/objcopy.c
index e84e70c..a73beb3 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -12276,9 +12276,7 @@ main(void)
nerrors += test_copy_group_wide_loop(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
-#ifndef H5_CANNOT_OPEN_TWICE
nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
-#endif /* H5_CANNOT_OPEN_TWICE */
nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_path(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
diff --git a/test/stab.c b/test/stab.c
index 48b58b1..95e9722 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -57,8 +57,6 @@ const char *FILENAME[] = {
/* The group_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory
* for version 1.6. To get this data file, simply compile gen_old_group.c with
* the HDF5 library in that branch and run it. */
-/* I changed the name "group_old.h5.copy" to "group_old_copy.h5" because OpenVMS
- * doesn't like any file name with more than one ".". SLU 2010/12/13 */
#define FILE_OLD_GROUPS "group_old.h5"
#define FILE_OLD_GROUPS_COPY "group_old_copy.h5"
diff --git a/test/tattr.c b/test/tattr.c
index 137c7c9..6642cf1 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -5919,9 +5919,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over operating on different indices on link fields */
- for(idx_type = H5_INDEX_NAME; idx_type <=H5_INDEX_CRT_ORDER; idx_type++) {
+ for(idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; H5_INC_ENUM(H5_index_t, idx_type)) {
/* Loop over operating in different orders */
- for(order = H5_ITER_INC; order <=H5_ITER_DEC; order++) {
+ for(order = H5_ITER_INC; order <= H5_ITER_DEC; H5_INC_ENUM(H5_iter_order_t, order)) {
/* Loop over using index for creation order value */
for(use_index = FALSE; use_index <= TRUE; use_index++) {
/* Print appropriate test message */
@@ -6868,9 +6868,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
iter_info.visited = visited;
/* Loop over operating on different indices on link fields */
- for(idx_type = H5_INDEX_NAME; idx_type <=H5_INDEX_CRT_ORDER; idx_type++) {
+ for(idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; H5_INC_ENUM(H5_index_t, idx_type)) {
/* Loop over operating in different orders */
- for(order = H5_ITER_INC; order <=H5_ITER_DEC; order++) {
+ for(order = H5_ITER_INC; order <= H5_ITER_DEC; H5_INC_ENUM(H5_iter_order_t, order)) {
/* Loop over using index for creation order value */
for(use_index = FALSE; use_index <= TRUE; use_index++) {
/* Print appropriate test message */
@@ -7223,9 +7223,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over operating on different indices on link fields */
- for(idx_type = H5_INDEX_NAME; idx_type <=H5_INDEX_CRT_ORDER; idx_type++) {
+ for(idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; H5_INC_ENUM(H5_index_t, idx_type)) {
/* Loop over operating in different orders */
- for(order = H5_ITER_INC; order <=H5_ITER_DEC; order++) {
+ for(order = H5_ITER_INC; order <= H5_ITER_DEC; H5_INC_ENUM(H5_iter_order_t, order)) {
/* Loop over using index for creation order value */
for(use_index = FALSE; use_index <= TRUE; use_index++) {
/* Print appropriate test message */
diff --git a/test/tconfig.c b/test/tconfig.c
index f3ac242..14c863e 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -60,13 +60,6 @@ void test_exit_definitions(void);
* Programmer: Albert Cheng
* September 25, 2001
*
- * Modifications:
- * Raymond Lu
- * 16 Dec 2009
- * On Boeing's OpenVMS, the value of EXIT_FAILURE is 268435458.
- * (The test is in test_exit_definitions.) Their document says
- * it's supposed to be 2. I commented it out for OpenVMS for
- * further consideration.
*-------------------------------------------------------------------------
*/
void
@@ -75,9 +68,7 @@ test_configure(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing configure definitions\n"));
test_config_ctypes();
-#ifndef H5_VMS
test_exit_definitions();
-#endif
}
diff --git a/test/tfile.c b/test/tfile.c
index 52c8fd9..33c947f 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -181,19 +181,15 @@ test_file_create(void)
* try to create the same file with H5F_ACC_TRUNC. This should fail
* because fid1 is the same file and is currently open.
*/
-#ifndef H5_HAVE_FILE_VERSIONS
fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(fid2, FAIL, "H5Fcreate");
-#endif /*H5_DONT_HAVE_FILE_VERSIONS*/
/* Close all files */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-#ifndef H5_HAVE_FILE_VERSIONS
ret = H5Fclose(fid2);
VERIFY(ret, FAIL, "H5Fclose"); /*file should not have been open */
-#endif /*H5_HAVE_FILE_VERSIONS*/
/*
* Try again with H5F_ACC_EXCL. This should fail because the file already
@@ -206,7 +202,6 @@ test_file_create(void)
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid1, FAIL, "H5Fcreate");
-#ifndef H5_HAVE_FILE_VERSIONS
/*
* Try to truncate first file again. This should fail because fid1 is the
* same file and is currently open.
@@ -220,7 +215,6 @@ test_file_create(void)
*/
fid2 = H5Fcreate(FILE1, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(fid2, FAIL, "H5Fcreate");
-#endif /*H5_HAVE_FILE_VERSIONS*/
/* Get the file-creation template */
tmpl1 = H5Fget_create_plist(fid1);
@@ -833,7 +827,9 @@ test_file_close(void)
ret = H5Gclose(group_id3);
CHECK(ret, FAIL, "H5Gclose");
break;
- default:
+
+ case H5F_CLOSE_DEFAULT:
+ default:
CHECK(fc_degree, H5F_CLOSE_DEFAULT, "H5Pget_fclose_degree");
break;
}
@@ -1320,6 +1316,19 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
VERIFY(oid_list[i], did, "H5Fget_obj_ids");
break;
+ case H5I_UNINIT:
+ case H5I_BADID:
+ case H5I_DATATYPE:
+ case H5I_DATASPACE:
+ case H5I_ATTR:
+ case H5I_REFERENCE:
+ case H5I_VFL:
+ case H5I_GENPROP_CLS:
+ case H5I_GENPROP_LST:
+ case H5I_ERROR_CLASS:
+ case H5I_ERROR_MSG:
+ case H5I_ERROR_STACK:
+ case H5I_NTYPES:
default:
ERROR("H5Fget_obj_ids");
} /* end switch */
@@ -1370,7 +1379,6 @@ test_file_perm(void)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
-#ifndef H5_CANNOT_OPEN_TWICE
/* Open the file (with read-only permission) */
filero = H5Fopen(FILE2, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(filero, FAIL, "H5Fopen");
@@ -1387,7 +1395,6 @@ test_file_perm(void)
ret = H5Fclose(filero);
CHECK(ret, FAIL, "H5Fclose");
-#endif /*H5_CANNOT_OPEN_TWICE*/
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
@@ -2364,7 +2371,7 @@ test_rw_noupdate(void)
/* Check That Timestamps Are Equal */
if(diff > 0.0F) {
/* Output message about test being performed */
- MESSAGE(1, ("Testing to verify that nothing is written if nothing is changed: This test is skipped on this system because the modification time from stat is the same as the last access time (We know OpenVMS behaves in this way).\n"));
+ MESSAGE(1, ("Testing to verify that nothing is written if nothing is changed: This test is skipped on this system because the modification time from stat is the same as the last access time.\n"));
} /* end if */
else {
hid_t file_id; /* HDF5 File ID */
@@ -3087,67 +3094,68 @@ test_filespace_info(void)
my_fapl = fapl;
} /* end else */
- /* Test with different sized free space section threshold */
- for(fs_size = 0; fs_size <= TEST_THRESHOLD10; fs_size++) {
+ /* Test with different sized free space section threshold */
+ for(fs_size = 0; fs_size <= TEST_THRESHOLD10; fs_size++) {
- /* Test with different file space handling strategies */
- for(fs_type = 0; fs_type < H5F_FILE_SPACE_NTYPES; H5_INC_ENUM(H5F_file_space_type_t, fs_type)) {
+ /* Test with different file space handling strategies */
+ for(fs_type = H5F_FILE_SPACE_DEFAULT; fs_type < H5F_FILE_SPACE_NTYPES; H5_INC_ENUM(H5F_file_space_type_t, fs_type)) {
- /* Get a copy of the default file creation property */
- fcpl1 = H5Pcopy(fcpl);
- CHECK(fcpl1, FAIL, "H5Pcopy");
+ /* Get a copy of the default file creation property */
+ fcpl1 = H5Pcopy(fcpl);
+ CHECK(fcpl1, FAIL, "H5Pcopy");
- /* Set file space strategy and free space section threshold */
- ret = H5Pset_file_space(fcpl1, fs_type, fs_size);
- CHECK(ret, FAIL, "H5Pget_file_space");
+ /* Set file space strategy and free space section threshold */
+ ret = H5Pset_file_space(fcpl1, fs_type, fs_size);
+ CHECK(ret, FAIL, "H5Pget_file_space");
- /* Get the file space info from the creation property */
- ret = H5Pget_file_space(fcpl1, &strategy, &threshold);
- CHECK(ret, FAIL, "H5Pget_file_space");
+ /* Get the file space info from the creation property */
+ ret = H5Pget_file_space(fcpl1, &strategy, &threshold);
+ CHECK(ret, FAIL, "H5Pget_file_space");
- /* A 0 value for strategy retains existing strategy in use */
- VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
- /* A 0 value for threshold retains existing threshold in use */
- VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
+ /* A 0 value for strategy retains existing strategy in use */
+ VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
+ /* A 0 value for threshold retains existing threshold in use */
+ VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
- /* Create the file with the specified file space info */
- fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl);
- CHECK(ret, FAIL, "H5Fcreate");
+ /* Create the file with the specified file space info */
+ fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl);
+ CHECK(ret, FAIL, "H5Fcreate");
- /* Close the file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close the file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Re-open the file */
- fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl);
- CHECK(ret, FAIL, "H5Fopen");
+ /* Re-open the file */
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl);
+ CHECK(ret, FAIL, "H5Fopen");
- /* Get the file's creation property */
- fcpl2 = H5Fget_create_plist(fid2);
- CHECK(fcpl2, FAIL, "H5Fget_create_plist");
+ /* Get the file's creation property */
+ fcpl2 = H5Fget_create_plist(fid2);
+ CHECK(fcpl2, FAIL, "H5Fget_create_plist");
- strategy = threshold = 0;
+ strategy = H5F_FILE_SPACE_DEFAULT;
+ threshold = 0;
- /* Get the file space info from the creation property list */
- ret = H5Pget_file_space(fcpl2, &strategy, &threshold);
- CHECK(ret, FAIL, "H5Pget_file_space");
+ /* Get the file space info from the creation property list */
+ ret = H5Pget_file_space(fcpl2, &strategy, &threshold);
+ CHECK(ret, FAIL, "H5Pget_file_space");
- VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
- VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
+ VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
+ VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
- /* Close the file */
- ret = H5Fclose(fid2);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close the file */
+ ret = H5Fclose(fid2);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Release file-creation template */
- ret = H5Pclose(fcpl1);
- CHECK(ret, FAIL, "H5Pclose");
- ret = H5Pclose(fcpl2);
- CHECK(ret, FAIL, "H5Pclose");
- } /* end for file space strategy type */
- } /* end for free space threshold */
+ /* Release file-creation template */
+ ret = H5Pclose(fcpl1);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Pclose(fcpl2);
+ CHECK(ret, FAIL, "H5Pclose");
+ } /* end for file space strategy type */
+ } /* end for free space threshold */
- h5_cleanup(FILESPACE_NAME, my_fapl);
+ h5_cleanup(FILESPACE_NAME, my_fapl);
} /* end for new/old format */
@@ -3660,16 +3668,12 @@ test_file(void)
test_file_freespace(); /* Test file free space information */
test_file_ishdf5(); /* Test detecting HDF5 files correctly */
test_file_open_dot(); /* Test opening objects with "." for a name */
-#ifndef H5_CANNOT_OPEN_TWICE
test_file_open_overlap(); /* Test opening files in an overlapping manner */
-#endif /*H5_CANNOT_OPEN_TWICE*/
test_file_getname(); /* Test basic H5Fget_name() functionality */
-#ifndef H5_CANNOT_OPEN_TWICE
test_file_double_root_open(); /* Test opening root group from two files works properly */
test_file_double_group_open(); /* Test opening same group from two files works properly */
test_file_double_dataset_open(); /* Test opening same dataset from two files works properly */
test_file_double_datatype_open(); /* Test opening same named datatype from two files works properly */
-#endif /*H5_CANNOT_OPEN_TWICE*/
test_userblock_file_size(); /* Tests that files created with a userblock have the correct size */
test_cached_stab_info(); /* Tests that files are created with cached stab info in the superblock */
test_rw_noupdate(); /* Test to ensure that RW permissions don't write the file unless dirtied */
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 10cae6d..fda4161 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -61,6 +61,18 @@ double prop4_def=1.41F; /* Property 4 default value */
#define PROP4_SIZE sizeof(prop4_def)
#define PROP4_DEF_VALUE (&prop4_def)
+/* Structs used during iteration */
+typedef struct iter_data_t {
+ int iter_count;
+ char **names;
+} iter_data_t;
+
+typedef struct count_data_t {
+ int count;
+ hid_t id;
+} count_data_t;
+
+
/****************************************************************
**
** test_genprop_basic_class(): Test basic generic property list code.
@@ -284,17 +296,12 @@ test_genprop_basic_class_prop(void)
**
****************************************************************/
static int
-test_genprop_iter1(hid_t id, const char *name, void *iter_data)
+test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name,
+ void *iter_data)
{
- struct { /* Struct for iterations */
- int iter_count;
- const char **names;
- } *iter_struct = iter_data;
-
- /* Shut compiler up */
- id = id;
+ iter_data_t *idata = (iter_data_t *)iter_data;
- return(HDstrcmp(name,iter_struct->names[iter_struct->iter_count++]));
+ return HDstrcmp(name,idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -373,43 +380,34 @@ test_genprop_class_iter(void)
static herr_t
test_genprop_cls_crt_cb1(hid_t list_id, void *create_data)
{
- struct { /* Struct for iterations */
- int count;
- hid_t id;
- } *count_struct=create_data;
+ count_data_t *cdata = (count_data_t *)create_data;
- count_struct->count++;
- count_struct->id=list_id;
+ cdata->count++;
+ cdata->id = list_id;
- return(SUCCEED);
+ return SUCCEED;
}
static herr_t
test_genprop_cls_cpy_cb1(hid_t new_list_id, hid_t H5_ATTR_UNUSED old_list_id, void *copy_data)
{
- struct { /* Struct for iterations */
- int count;
- hid_t id;
- } *count_struct=copy_data;
+ count_data_t *cdata = (count_data_t *)copy_data;
- count_struct->count++;
- count_struct->id=new_list_id;
+ cdata->count++;
+ cdata->id = new_list_id;
- return(SUCCEED);
+ return SUCCEED;
}
static herr_t
test_genprop_cls_cls_cb1(hid_t list_id, void *create_data)
{
- struct { /* Struct for iterations */
- int count;
- hid_t id;
- } *count_struct=create_data;
+ count_data_t *cdata = (count_data_t *)create_data;
- count_struct->count++;
- count_struct->id=list_id;
+ cdata->count++;
+ cdata->id = list_id;
- return(SUCCEED);
+ return SUCCEED;
}
/****************************************************************
@@ -843,17 +841,12 @@ test_genprop_basic_list_prop(void)
**
****************************************************************/
static int
-test_genprop_iter2(hid_t id, const char *name, void *iter_data)
+test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name,
+ void *iter_data)
{
- struct { /* Struct for iterations */
- int iter_count;
- const char **names;
- } *iter_struct=iter_data;
-
- /* Shut compiler up */
- id=id;
+ iter_data_t *idata = (iter_data_t *)iter_data;
- return(HDstrcmp(name,iter_struct->names[iter_struct->iter_count++]));
+ return HDstrcmp(name,idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -995,15 +988,12 @@ prop_cb_info prop3_cb_info; /* Callback statistics for property #3 */
static herr_t
test_genprop_cls_cpy_cb2(hid_t new_list_id, hid_t H5_ATTR_UNUSED old_list_id, void *create_data)
{
- struct { /* Struct for iterations */
- int count;
- hid_t id;
- } *count_struct=create_data;
+ count_data_t *cdata = (count_data_t *)create_data;
- count_struct->count++;
- count_struct->id=new_list_id;
+ cdata->count++;
+ cdata->id = new_list_id;
- return(SUCCEED);
+ return SUCCEED;
}
/****************************************************************
diff --git a/test/th5o.c b/test/th5o.c
index be3b4ab..40844fa 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -1355,9 +1355,7 @@ test_h5o(void)
test_h5o_link(); /* Test object link routine */
test_h5o_comment(); /* Test routines for comment */
test_h5o_comment_by_name(); /* Test routines for comment by name */
-#ifndef H5_CANNOT_OPEN_TWICE /* OpenVMS can't open a file twice */
test_h5o_getinfo_same_file(); /* Test info for objects in the same file */
-#endif /* H5_CANNOT_OPEN_TWICE */
} /* test_h5o() */
diff --git a/test/th5s.c b/test/th5s.c
index 1560ef4..a478803 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -565,7 +565,7 @@ test_h5s_zero_dim(void)
wdata_real[i][j][k] = i + j + k;
/* Test with different space allocation times */
- for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; alloc_time++) {
+ for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; H5_INC_ENUM(H5D_alloc_time_t, alloc_time)) {
/* Make sure we can create the space with the dimension size 0 (starting from v1.8.7).
* The dimension doesn't need to be unlimited. */
@@ -2326,6 +2326,48 @@ test_h5s_extent_copy(void)
/****************************************************************
**
+** test_h5s_bug1(): Test Creating dataspace with H5Screate then
+* setting extent with H5Sextent_copy.
+**
+****************************************************************/
+static void
+test_h5s_bug1(void)
+{
+ hid_t space1; /* Dataspace to copy extent to */
+ hid_t space2; /* Scalar dataspace */
+ hsize_t dims[2] = {10, 10}; /* Dimensions */
+ hsize_t start[2] = {0, 0}; /* Hyperslab start */
+ htri_t select_valid; /* Whether the dataspace selection is valid */
+ herr_t ret; /* Generic error return */
+
+ /* Create dataspaces */
+ space1 = H5Screate(H5S_SIMPLE);
+ CHECK(space1, FAIL, "H5Screate");
+ space2 = H5Screate_simple(2, dims, NULL);
+ CHECK(space2, FAIL, "H5Screate");
+
+ /* Copy extent to space1 */
+ ret = H5Sextent_copy(space1, space2);
+ CHECK(ret, FAIL, "H5Sextent_copy");
+
+ /* Select hyperslab in space1 containing entire extent */
+ ret = H5Sselect_hyperslab(space1, H5S_SELECT_SET, start, NULL, dims, NULL);
+ CHECK(ret, FAIL, "H5Sselect_hyperslab");
+
+ /* Check that space1's selection is valid */
+ select_valid = H5Sselect_valid(space1);
+ CHECK(select_valid, FAIL, "H5Sselect_valid");
+ VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+
+ /* Close dataspaces */
+ ret = H5Sclose(space1);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(space2);
+ CHECK(ret, FAIL, "H5Sclose");
+} /* test_h5s_bug1() */
+
+/****************************************************************
+**
** test_h5s(): Main H5S (dataspace) testing routine.
**
****************************************************************/
@@ -2350,6 +2392,7 @@ test_h5s(void)
test_h5s_extent_equal(); /* Test extent comparison code */
test_h5s_extent_copy(); /* Test extent copy code */
+ test_h5s_bug1(); /* Test bug in offset initialization */
} /* test_h5s() */
diff --git a/test/tmisc.c b/test/tmisc.c
index 11c6de7..6a68857 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -713,7 +713,7 @@ create_struct3(void)
misc5_struct3_hndl *str3hndl; /* New 'struct3' created */
herr_t ret; /* For error checking */
- str3hndl = HDmalloc(sizeof(misc5_struct3_hndl));
+ str3hndl = (misc5_struct3_hndl *)HDmalloc(sizeof(misc5_struct3_hndl));
CHECK(str3hndl,NULL,"malloc");
str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3));
@@ -722,10 +722,10 @@ create_struct3(void)
ret = H5Tinsert(str3hndl->st3h_base, "st3_el1", HOFFSET( misc5_struct3, st3_el1), H5T_NATIVE_INT);
CHECK(ret,FAIL,"H5Tinsert");
- str3hndl->st3h_id=H5Tvlen_create(str3hndl->st3h_base);
+ str3hndl->st3h_id = H5Tvlen_create(str3hndl->st3h_base);
CHECK(str3hndl->st3h_id,FAIL,"H5Tvlen_create");
- return(str3hndl);
+ return str3hndl;
}
static void
@@ -733,10 +733,10 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
{
herr_t ret; /* For error checking */
- ret=H5Tclose(str3hndl->st3h_id);
+ ret = H5Tclose(str3hndl->st3h_id);
CHECK(ret,FAIL,"H5Tclose");
- ret=H5Tclose(str3hndl->st3h_base);
+ ret = H5Tclose(str3hndl->st3h_base);
CHECK(ret,FAIL,"H5Tclose");
HDfree(str3hndl);
@@ -756,7 +756,7 @@ create_struct2(void)
misc5_struct2_hndl *str2hndl; /* New 'struct2' created */
herr_t ret; /* For error checking */
- str2hndl = HDmalloc(sizeof(misc5_struct2_hndl));
+ str2hndl = (misc5_struct2_hndl *)HDmalloc(sizeof(misc5_struct2_hndl));
CHECK(str2hndl, NULL, "malloc");
str2hndl->st2h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct2));
@@ -765,16 +765,16 @@ create_struct2(void)
ret = H5Tinsert(str2hndl->st2h_base, "st2_el1", HOFFSET(misc5_struct2, st2_el1), H5T_NATIVE_INT);
CHECK(ret, FAIL, "H5Tinsert");
- str2hndl->st2h_st3hndl=create_struct3();
+ str2hndl->st2h_st3hndl = create_struct3();
CHECK(str2hndl->st2h_st3hndl,NULL,"create_struct3");
- ret=H5Tinsert(str2hndl->st2h_base, "st2_el2", HOFFSET(misc5_struct2, st2_el2), str2hndl->st2h_st3hndl->st3h_id);
+ ret = H5Tinsert(str2hndl->st2h_base, "st2_el2", HOFFSET(misc5_struct2, st2_el2), str2hndl->st2h_st3hndl->st3h_id);
CHECK(ret,FAIL,"H5Tinsert");
- str2hndl->st2h_id= H5Tvlen_create(str2hndl->st2h_base);
+ str2hndl->st2h_id = H5Tvlen_create(str2hndl->st2h_base);
CHECK(str2hndl->st2h_id,FAIL,"H5Tvlen_create");
- return(str2hndl);
+ return str2hndl;
}
static void
@@ -798,10 +798,10 @@ set_struct2(misc5_struct2 *buf)
{
unsigned i; /* Local index variable */
- buf->st2_el1=MISC5_DBGELVAL2;
- buf->st2_el2.len=MISC5_DBGNELM3;
+ buf->st2_el1 = MISC5_DBGELVAL2;
+ buf->st2_el2.len = MISC5_DBGNELM3;
- buf->st2_el2.p=HDmalloc((buf->st2_el2.len)*sizeof(misc5_struct3));
+ buf->st2_el2.p = HDmalloc((buf->st2_el2.len)*sizeof(misc5_struct3));
CHECK(buf->st2_el2.p,NULL,"malloc");
for(i=0; i<(buf->st2_el2.len); i++)
@@ -822,7 +822,7 @@ create_struct1(void)
misc5_struct1_hndl *str1hndl; /* New 'struct1' created */
herr_t ret; /* For error checking */
- str1hndl = HDmalloc(sizeof(misc5_struct1_hndl));
+ str1hndl = (misc5_struct1_hndl *)HDmalloc(sizeof(misc5_struct1_hndl));
CHECK(str1hndl, NULL, "malloc");
str1hndl->st1h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct1));
@@ -834,13 +834,13 @@ create_struct1(void)
str1hndl->st1h_st2hndl=create_struct2();
CHECK(str1hndl->st1h_st2hndl,NULL,"create_struct2");
- ret=H5Tinsert(str1hndl->st1h_base, "st1_el2", HOFFSET(misc5_struct1, st1_el2), str1hndl->st1h_st2hndl->st2h_id);
+ ret = H5Tinsert(str1hndl->st1h_base, "st1_el2", HOFFSET(misc5_struct1, st1_el2), str1hndl->st1h_st2hndl->st2h_id);
CHECK(ret,FAIL,"H5Tinsert");
- str1hndl->st1h_id=H5Tvlen_create(str1hndl->st1h_base);
+ str1hndl->st1h_id = H5Tvlen_create(str1hndl->st1h_base);
CHECK(str1hndl->st1h_id,FAIL,"H5Tvlen_create");
- return(str1hndl);
+ return str1hndl;
}
static void
@@ -848,12 +848,12 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
{
herr_t ret; /* For error checking */
- ret=H5Tclose(str1hndl->st1h_id);
+ ret = H5Tclose(str1hndl->st1h_id);
CHECK(ret,FAIL,"H5Tclose");
delete_struct2(str1hndl->st1h_st2hndl);
- ret=H5Tclose(str1hndl->st1h_base);
+ ret = H5Tclose(str1hndl->st1h_base);
CHECK(ret,FAIL,"H5Tclose");
HDfree(str1hndl);
@@ -1243,10 +1243,10 @@ test_misc8(void)
MESSAGE(5, ("Testing dataset storage sizes\n"));
/* Allocate space for the data to write & read */
- wdata=HDmalloc(sizeof(int)*MISC8_DIM0*MISC8_DIM1);
+ wdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
CHECK(wdata,NULL,"malloc");
#ifdef VERIFY_DATA
- rdata=HDmalloc(sizeof(int)*MISC8_DIM0*MISC8_DIM1);
+ rdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
CHECK(rdata,NULL,"malloc");
#endif /* VERIFY_DATA */
diff --git a/test/tsohm.c b/test/tsohm.c
index 9da655e..e22940f 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3988,10 +3988,7 @@ test_sohm(void)
test_sohm_delete(); /* Test deleting shared messages */
test_sohm_delete_revert(); /* Test that a file with SOHMs becomes an
* empty file again when they are deleted. */
-#ifndef H5_CANNOT_OPEN_TWICE /* On VMS this test fails since it tries to
- open target file the second time */
test_sohm_extlink(); /* Test SOHMs when external links are used */
-#endif /* H5_CANNOT_OPEN_TWICE */
test_sohm_extend_dset(); /* Test extending shared datasets */
test_sohm_external_dtype(); /* Test using datatype in another file */
diff --git a/test/ttsafe.c b/test/ttsafe.c
index d0ab81a..d3c5cfb 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -40,13 +40,6 @@
/* ANY new test needs to have a prototype in ttsafe.h */
#include "ttsafe.h"
-#ifndef H5_HAVE_THREADSAFE
-int main(void)
-{
- printf("Test skipped because THREADSAFE not enabled\n");
- return 0;
-}
-#else
#define MAX_NUM_NAME 1000
#define NAME_OFFSET 6 /* offset for "name<num>" */
@@ -66,6 +59,30 @@ num_digits(int num)
return u;
}
+/* Test the H5is_library_threadsafe() function */
+void
+tts_is_threadsafe(void)
+{
+ hbool_t is_ts;
+ hbool_t should_be;
+
+#ifdef H5_HAVE_THREADSAFE
+ is_ts = FALSE;
+ should_be = TRUE;
+#else /* H5_HAVE_THREADSAFE */
+ is_ts = TRUE;
+ should_be = FALSE;
+#endif /* H5_HAVE_THREADSAFE */
+
+ if(H5is_library_threadsafe(&is_ts) != SUCCEED)
+ TestErrPrintf("H5_is_library_threadsafe() call failed - test failed\n");
+
+ if(is_ts != should_be)
+ TestErrPrintf("Thread-safety value incorrect - test failed\n");
+
+ return;
+}
+
/* Routine to generate attribute names for numeric values */
char *gen_name(int value)
{
@@ -88,10 +105,13 @@ char *gen_name(int value)
int main(int argc, char *argv[])
{
+
/* Initialize testing framework */
TestInit(argv[0], NULL, NULL);
/* Tests are generally arranged from least to most complexity... */
+ AddTest("is_threadsafe", tts_is_threadsafe, NULL, "library threadsafe status", NULL);
+#ifdef H5_HAVE_THREADSAFE
AddTest("dcreate", tts_dcreate, cleanup_dcreate, "multi-dataset creation", NULL);
AddTest("error", tts_error, cleanup_error, "per-thread error stacks", NULL);
#ifdef H5_HAVE_PTHREAD_H
@@ -100,6 +120,12 @@ int main(int argc, char *argv[])
#endif /* H5_HAVE_PTHREAD_H */
AddTest("acreate", tts_acreate, cleanup_acreate, "multi-attribute creation", NULL);
+#else /* H5_HAVE_THREADSAFE */
+
+ printf("Most thread-safety tests skipped because THREADSAFE not enabled\n");
+
+#endif /* H5_HAVE_THREADSAFE */
+
/* Display testing information */
TestInfo(argv[0]);
@@ -118,5 +144,6 @@ int main(int argc, char *argv[])
TestCleanup();
return GetTestNumErrs();
+
} /* end main() */
-#endif /*H5_HAVE_THREADSAFE*/
+
diff --git a/test/ttsafe.h b/test/ttsafe.h
index b4826fc..f2e9e86 100644
--- a/test/ttsafe.h
+++ b/test/ttsafe.h
@@ -20,8 +20,6 @@
#ifndef TTSAFE_H
#define TTSAFE_H
-#include <string.h>
-
/*
* Include required headers. This file tests internal library functions,
* so we include the private headers here.
@@ -31,16 +29,13 @@
#include "H5Eprivate.h"
#include "testhdf5.h"
-#ifdef H5_HAVE_THREADSAFE
-/* Include pthread library for threadsafe tests */
-#ifdef H5_HAVE_PTHREAD_H
-#include <pthread.h>
-#endif /* H5_HAVE_PTHREAD_H */
/* Prototypes for the support routines */
extern char* gen_name(int);
/* Prototypes for the test routines */
+void tts_is_threadsafe(void);
+#ifdef H5_HAVE_THREADSAFE
void tts_dcreate(void);
void tts_error(void);
void tts_cancel(void);
@@ -54,3 +49,4 @@ void cleanup_acreate(void);
#endif /* H5_HAVE_THREADSAFE */
#endif /* TTSAFE_H */
+
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index e143263..a2f25db 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -231,3 +231,4 @@ void cleanup_error(void)
}
#endif /*H5_HAVE_THREADSAFE*/
+
diff --git a/test/ttst.c b/test/ttst.c
index 4ffe4cd..b869b63 100644
--- a/test/ttst.c
+++ b/test/ttst.c
@@ -95,13 +95,13 @@ test_tst_init(void)
} /* end for */
/* Allocate space for the array of unique words */
- uniq_words=HDmalloc(sizeof(char *)*num_uniq_words);
+ uniq_words = (char **)HDmalloc(sizeof(char *)*num_uniq_words);
/* Allocate space for the array of randomized order unique words also */
- rand_uniq_words=HDmalloc(sizeof(char *)*num_uniq_words);
+ rand_uniq_words = (char **)HDmalloc(sizeof(char *)*num_uniq_words);
/* Allocate space for the array of sorted order unique words also */
- sort_uniq_words=HDmalloc(sizeof(char *)*num_uniq_words);
+ sort_uniq_words = (char **)HDmalloc(sizeof(char *)*num_uniq_words);
/* Insert unique words from test set into unique word set */
w=0;
diff --git a/test/tvltypes.c b/test/tvltypes.c
index d1a4235..b7bbaee 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1021,7 +1021,7 @@ test_vltypes_compound_vlen_vlen(void)
wdata[i].f=(float)((i*20)/3.0F);
wdata[i].v.p=HDmalloc((i+L1_INCM)*sizeof(hvl_t));
wdata[i].v.len=i+L1_INCM;
- for(t1=(wdata[i].v).p,j=0; j<(i+L1_INCM); j++, t1++) {
+ for(t1=(hvl_t *)((wdata[i].v).p),j=0; j<(i+L1_INCM); j++, t1++) {
t1->p=HDmalloc((j+L2_INCM)*sizeof(unsigned int));
t1->len=j+L2_INCM;
for(k=0; k<j+L2_INCM; k++)
@@ -1102,7 +1102,7 @@ test_vltypes_compound_vlen_vlen(void)
continue;
} /* end if */
- for(t1=wdata[i].v.p, t2=rdata[i].v.p, j=0; j<rdata[i].v.len; j++, t1++, t2++) {
+ for(t1=(hvl_t *)(wdata[i].v.p), t2=(hvl_t *)(rdata[i].v.p), j=0; j<rdata[i].v.len; j++, t1++, t2++) {
if(t1->len != t2->len) {
TestErrPrintf("%d: VL data length don't match!, i=%d, j=%d, t1->len=%d, t2->len=%d\n",__LINE__,(int)i,(int)j,(int)t1->len,(int)t2->len);
continue;
@@ -1161,13 +1161,13 @@ static void
test_vltypes_compound_vlstr(void)
{
typedef enum {
- red,
- blue,
- green
+ red,
+ blue,
+ green
} e1;
typedef struct {
char *string;
- e1 color;
+ e1 color;
} s2;
typedef struct { /* Struct that the compound type are composed of */
hvl_t v;
@@ -1199,12 +1199,12 @@ test_vltypes_compound_vlstr(void)
for(i=0; i<SPACE1_DIM1; i++) {
wdata[i].v.p=(s2*)HDmalloc((i+L3_INCM)*sizeof(s2));
wdata[i].v.len=i+L3_INCM;
- for(t1=(wdata[i].v).p, j=0; j<(i+L3_INCM); j++, t1++) {
- strcat(str, "m");
- t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1);
+ for(t1=(s2 *)((wdata[i].v).p), j=0; j<(i+L3_INCM); j++, t1++) {
+ strcat(str, "m");
+ t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1);
strcpy(t1->string, str);
- /*t1->color = red;*/
- t1->color = blue;
+ /*t1->color = red;*/
+ t1->color = blue;
}
} /* end for */
@@ -1342,7 +1342,7 @@ test_vltypes_compound_vlstr(void)
continue;
} /* end if */
- for(t1=wdata[i].v.p, t2=rdata[i].v.p, j=0; j<rdata[i].v.len; j++, t1++, t2++) {
+ for(t1=(s2 *)(wdata[i].v.p), t2=(s2 *)(rdata[i].v.p), j=0; j<rdata[i].v.len; j++, t1++, t2++) {
if( strcmp(t1->string, t2->string) ) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n",t1->string, t2->string);
continue;
@@ -1400,7 +1400,7 @@ test_vltypes_compound_vlstr(void)
continue;
} /* end if */
- for(t1=wdata2[i].v.p, t2=rdata2[i].v.p, j=0; j<rdata2[i].v.len; j++, t1++, t2++) {
+ for(t1=(s2 *)(wdata2[i].v.p), t2=(s2 *)(rdata2[i].v.p), j=0; j<rdata2[i].v.len; j++, t1++, t2++) {
if( strcmp(t1->string, t2->string) ) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n",t1->string, t2->string);
continue;
@@ -1871,7 +1871,7 @@ test_vltypes_vlen_vlen_atomic(void)
return;
} /* end if */
wdata[i].len=i+1;
- for(t1=wdata[i].p,j=0; j<(i+1); j++, t1++) {
+ for(t1=(hvl_t *)(wdata[i].p),j=0; j<(i+1); j++, t1++) {
t1->p=HDmalloc((j+1)*sizeof(unsigned int));
if(t1->p==NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n",i,j);
@@ -1977,7 +1977,7 @@ test_vltypes_vlen_vlen_atomic(void)
TestErrPrintf("%d: VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n",__LINE__,(int)i,(int)wdata[i].len,(int)i,(int)rdata[i].len);
continue;
} /* end if */
- for(t1=wdata[i].p, t2=rdata[i].p, j=0; j<rdata[i].len; j++, t1++, t2++) {
+ for(t1=(hvl_t *)wdata[i].p, t2=(hvl_t *)(rdata[i].p), j=0; j<rdata[i].len; j++, t1++, t2++) {
if(t1->len!=t2->len) {
TestErrPrintf("%d: VL data length don't match!, i=%d, j=%d, t1->len=%d, t2->len=%d\n",__LINE__,(int)i,(int)j,(int)t1->len,(int)t2->len);
continue;
@@ -2062,7 +2062,7 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
return;
} /* end if */
wdata[i].len = i + increment;
- for(t1 = wdata[i].p, j = 0; j < (i + increment); j++, t1++) {
+ for(t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
if(t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
@@ -2157,7 +2157,7 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
TestErrPrintf("%d: VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n",__LINE__,(int)i,(int)wdata[i].len,(int)i,(int)rdata[i].len);
continue;
} /* end if */
- for(t1=wdata[i].p, t2=rdata[i].p, j=0; j<rdata[i].len; j++, t1++, t2++) {
+ for(t1=(hvl_t *)(wdata[i].p), t2=(hvl_t *)(rdata[i].p), j=0; j<rdata[i].len; j++, t1++, t2++) {
if(t1->len!=t2->len) {
TestErrPrintf("%d: VL data length don't match!, i=%d, j=%d, t1->len=%d, t2->len=%d\n",__LINE__,(int)i,(int)j,(int)t1->len,(int)t2->len);
continue;
@@ -2238,7 +2238,7 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
return;
} /* end if */
wdata[i].len=i+increment;
- for(t1=wdata[i].p,j=0; j<(i+increment); j++, t1++) {
+ for(t1=(hvl_t *)(wdata[i].p),j=0; j<(i+increment); j++, t1++) {
t1->p=HDmalloc((j+1)*sizeof(unsigned int));
if(t1->p==NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n",i,j);
@@ -2333,7 +2333,7 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
TestErrPrintf("%d: VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n",__LINE__,(int)i,(int)wdata[i].len,(int)i,(int)rdata[i].len);
continue;
} /* end if */
- for(t1=wdata[i].p, t2=rdata[i].p, j=0; j<rdata[i].len; j++, t1++, t2++) {
+ for(t1=(hvl_t *)(wdata[i].p), t2=(hvl_t *)(rdata[i].p), j=0; j<rdata[i].len; j++, t1++, t2++) {
if(t1->len!=t2->len) {
TestErrPrintf("%d: VL data length don't match!, i=%d, j=%d, t1->len=%d, t2->len=%d\n",__LINE__,(int)i,(int)j,(int)t1->len,(int)t2->len);
continue;
@@ -2496,7 +2496,7 @@ test_vltypes_fill_value(void)
/* Allocate space for the buffer to read data */
- rbuf = HDmalloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
+ rbuf = (dtype1_struct *)HDmalloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
CHECK(rbuf, NULL, "HDmalloc");
@@ -2538,7 +2538,7 @@ test_vltypes_fill_value(void)
CHECK(file_id, FAIL, "H5Fcreate");
/* Create datasets with different storage layouts */
- for(layout = H5D_COMPACT; layout <= H5D_CHUNKED; layout++) {
+ for(layout = H5D_COMPACT; layout <= H5D_CHUNKED; H5_INC_ENUM(H5D_layout_t, layout)) {
unsigned compress_loop; /* # of times to run loop, for testing compressed chunked dataset */
unsigned test_loop; /* Loop over datasets */
@@ -2597,6 +2597,8 @@ test_vltypes_fill_value(void)
}
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
assert(0 && "Unknown layout type!");
break;
@@ -2648,7 +2650,7 @@ test_vltypes_fill_value(void)
CHECK(file_id, FAIL, "H5Fopen");
/* Read empty datasets with different storage layouts */
- for(layout = H5D_COMPACT; layout <= H5D_CHUNKED; layout++) {
+ for(layout = H5D_COMPACT; layout <= H5D_CHUNKED; H5_INC_ENUM(H5D_layout_t, layout)) {
unsigned compress_loop; /* # of times to run loop, for testing compressed chunked dataset */
unsigned test_loop; /* Loop over datasets */
@@ -2698,6 +2700,8 @@ test_vltypes_fill_value(void)
dset_elmts = SPACE4_DIM_LARGE;
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
assert(0 && "Unknown layout type!");
break;
@@ -2843,7 +2847,7 @@ test_vltypes_fill_value(void)
CHECK(file_id, FAIL, "H5Fopen");
/* Write one element & fill values to datasets with different storage layouts */
- for(layout = H5D_COMPACT; layout <= H5D_CHUNKED; layout++) {
+ for(layout = H5D_COMPACT; layout <= H5D_CHUNKED; H5_INC_ENUM(H5D_layout_t, layout)) {
unsigned compress_loop; /* # of times to run loop, for testing compressed chunked dataset */
unsigned test_loop; /* Loop over datasets */
@@ -2893,6 +2897,8 @@ test_vltypes_fill_value(void)
dset_elmts = SPACE4_DIM_LARGE;
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
assert(0 && "Unknown layout type!");
break;
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index cfaffe6..a871709 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -5023,10 +5023,10 @@ static void test_data_nocomparables (const char * fname, int make_diffs)
/* attr2 - non-compatible : same rank, different dimention */
- write_attr(did2,1, attr2_dim_ptr,"attr2", H5T_NATIVE_INT, data3);
+ write_attr(did2,1,(hsize_t *)attr2_dim_ptr,"attr2", H5T_NATIVE_INT, data3);
/* attr3 - non-compatible : different rank */
- write_attr(did2, rank_attr,attr3_dim_ptr,"attr3", H5T_NATIVE_INT, attr_data_ptr3);
+ write_attr(did2, rank_attr,(hsize_t *)attr3_dim_ptr,"attr3", H5T_NATIVE_INT, attr_data_ptr3);
/* attr4 - compatible : different data values */
write_attr(did2,1,dims1_1,"attr4", H5T_NATIVE_INT, attr_data_ptr4);
@@ -6551,7 +6551,7 @@ void write_dset_in(hid_t loc_id,
/* allocate and initialize array data to write */
size = ( H5TOOLS_MALLOCSIZE / sizeof(double) + 1 ) * sizeof(double);
- dbuf = HDmalloc( size );
+ dbuf = (double *)HDmalloc( size );
for( j = 0; j < H5TOOLS_MALLOCSIZE / sizeof(double) + 1; j++)
dbuf[j] = j;
@@ -7018,10 +7018,10 @@ void gen_datareg(hid_t fid,
int i;
/* allocate the buffer for write the references */
- rbuf = HDcalloc((size_t)2, sizeof(hdset_reg_ref_t));
+ rbuf = (hdset_reg_ref_t *)HDcalloc((size_t)2, sizeof(hdset_reg_ref_t));
/* allocate the buffer for write the data dataset */
- buf = HDmalloc(10 * 10 * sizeof(int));
+ buf = (int *)HDmalloc(10 * 10 * sizeof(int));
for(i = 0; i < 10 * 10; i++)
buf[i] = i;
diff --git a/tools/h5dump/errfiles/tdset-2.err b/tools/h5dump/errfiles/tdset-2.err
index d9b92f3..775351e 100644
--- a/tools/h5dump/errfiles/tdset-2.err
+++ b/tools/h5dump/errfiles/tdset-2.err
@@ -1,17 +1,20 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dopen2(): not found
+ #000: (file name) line (number) in H5Dopen2(): unable to open dataset
+ major: Dataset
+ minor: Can't open object
+ #001: (file name) line (number) in H5D__open_name(): not found
major: Dataset
minor: Object not found
- #001: (file name) line (number) in H5G_loc_find(): can't find object
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ #004: (file name) line (number) in H5G_traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #004: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist
+ #005: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
diff --git a/tools/h5dump/errfiles/tperror.err b/tools/h5dump/errfiles/tperror.err
index 19a7a73..29f9e7f 100644
--- a/tools/h5dump/errfiles/tperror.err
+++ b/tools/h5dump/errfiles/tperror.err
@@ -1,17 +1,20 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dopen2(): not found
+ #000: (file name) line (number) in H5Dopen2(): unable to open dataset
+ major: Dataset
+ minor: Can't open object
+ #001: (file name) line (number) in H5D__open_name(): not found
major: Dataset
minor: Object not found
- #001: (file name) line (number) in H5G_loc_find(): can't find object
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ #004: (file name) line (number) in H5G_traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #004: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist
+ #005: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
diff --git a/tools/h5dump/errfiles/tslink-D.err b/tools/h5dump/errfiles/tslink-D.err
index b98e324..924e9cf 100644
--- a/tools/h5dump/errfiles/tslink-D.err
+++ b/tools/h5dump/errfiles/tslink-D.err
@@ -1,25 +1,28 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dopen2(): not found
+ #000: (file name) line (number) in H5Dopen2(): unable to open dataset
+ major: Dataset
+ minor: Can't open object
+ #001: (file name) line (number) in H5D__open_name(): not found
major: Dataset
minor: Object not found
- #001: (file name) line (number) in H5G_loc_find(): can't find object
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #003: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #004: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ #005: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
major: Links
minor: Link traversal failure
- #005: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link
+ #006: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ #007: (file name) line (number) in H5G_traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #007: (file name) line (number) in H5G_traverse_slink_cb(): component not found
+ #008: (file name) line (number) in H5G_traverse_slink_cb(): component not found
major: Symbol table
minor: Object not found
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 3c60bb0..68889c9 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -389,10 +389,10 @@ table_list_add(hid_t oid, unsigned long file_no)
/* Allocate space if necessary */
if(table_list.nused == table_list.nalloc) {
- void *tmp_ptr;
+ h5dump_table_items_t *tmp_ptr;
table_list.nalloc = MAX(1, table_list.nalloc * 2);
- if(NULL == (tmp_ptr = HDrealloc(table_list.tables, table_list.nalloc * sizeof(table_list.tables[0]))))
+ if(NULL == (tmp_ptr = (h5dump_table_items_t *)HDrealloc(table_list.tables, table_list.nalloc * sizeof(table_list.tables[0]))))
return -1;
table_list.tables = tmp_ptr;
} /* end if */
diff --git a/tools/h5dump/h5dump.h b/tools/h5dump/h5dump.h
index 7bfead7..2b1fb04 100644
--- a/tools/h5dump/h5dump.h
+++ b/tools/h5dump/h5dump.h
@@ -38,16 +38,17 @@ typedef struct dump_functions_t {
} dump_functions;
/* List of table structures. There is one table structure for each file */
+typedef struct h5dump_table_items_t {
+ unsigned long fileno; /* File number that these tables refer to */
+ hid_t oid; /* ID of an object in this file, held open so fileno is consistent */
+ table_t *group_table; /* Table of groups */
+ table_t *dset_table; /* Table of datasets */
+ table_t *type_table; /* Table of datatypes */
+} h5dump_table_items_t;
typedef struct h5dump_table_list_t {
- size_t nalloc;
- size_t nused;
- struct {
- unsigned long fileno; /* File number that these tables refer to */
- hid_t oid; /* ID of an object in this file, held open so fileno is consistent */
- table_t *group_table; /* Table of groups */
- table_t *dset_table; /* Table of datasets */
- table_t *type_table; /* Table of datatypes */
- } *tables;
+ size_t nalloc;
+ size_t nused;
+ h5dump_table_items_t *tables;
} h5dump_table_list_t;
h5dump_table_list_t table_list = {0, 0, NULL};
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index 3822251..0cd0847 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -377,6 +377,8 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
}
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
error_msg("unknown object \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
@@ -509,6 +511,11 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
HDfree(targbuf);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_MAX:
+ HDassert(0);
+ /* fall through */
+ case H5L_TYPE_HARD:
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -1054,7 +1061,10 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
}
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
default:
+ HDassert(0);
break;
} /* end switch */
} /* for(i=0;i<data_loop;i++) */
@@ -1927,6 +1937,11 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT
end_obj(h5tools_dump_header_format->extlinkend, h5tools_dump_header_format->extlinkblockend);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_MAX:
+ HDassert(0);
+ /* fall through */
+ H5L_TYPE_HARD:
default:
begin_obj(h5tools_dump_header_format->udlinkbegin, links, h5tools_dump_header_format->udlinkblockbegin);
PRINTVALSTREAM(rawoutstream, "\n");
@@ -2094,6 +2109,8 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
case H5O_TYPE_NAMED_DATATYPE:
handle_datatypes(group, linkname, NULL, 0, objname);
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
h5tools_setstatus(EXIT_FAILURE);
}
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 4f8d250..e872114 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -359,6 +359,8 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
}
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
error_msg("unknown object \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
@@ -521,42 +523,48 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
HDfree(targbuf);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_MAX:
+ HDassert(0);
+ /* fall through */
+ case H5L_TYPE_HARD:
default:
- {
- char linkxid[100];
- char parentxid[100];
- char *t_name = xml_escape_the_name(name);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/");
- char *t_obj_path = xml_escape_the_name(obj_path);
+ {
+ char linkxid[100];
+ char parentxid[100];
+ char *t_name = xml_escape_the_name(name);
+ char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/");
+ char *t_obj_path = xml_escape_the_name(obj_path);
- /* Create OBJ-XIDs for the parent and object */
- xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1);
- xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1);
+ /* Create OBJ-XIDs for the parent and object */
+ xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1);
+ xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
- h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
+ ctx.need_prefix = TRUE;
+ h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
- /* Render the element */
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "<%sUserDefined LinkName=\"%s\" "
- "OBJ-XID=\"%s\" "
- "H5SourcePath=\"%s\" "
- "LinkClass=\"%d\" "
- "Parents=\"%s\" H5ParentPaths=\"%s\" />",
- xmlnsprefix,
- t_name, /* LinkName */
- linkxid, /* OBJ-XID */
- t_obj_path, /* H5SourcePath */
- linfo->type, /* LinkClass */
- parentxid, /* Parents */
- t_prefix); /* H5ParentPaths */
- h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
-
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_obj_path);
- }
+ /* Render the element */
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "<%sUserDefined LinkName=\"%s\" "
+ "OBJ-XID=\"%s\" "
+ "H5SourcePath=\"%s\" "
+ "LinkClass=\"%d\" "
+ "Parents=\"%s\" H5ParentPaths=\"%s\" />",
+ xmlnsprefix,
+ t_name, /* LinkName */
+ linkxid, /* OBJ-XID */
+ t_obj_path, /* H5SourcePath */
+ linfo->type, /* LinkClass */
+ parentxid, /* Parents */
+ t_prefix); /* H5ParentPaths */
+ h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
+
+ HDfree(t_prefix);
+ HDfree(t_name);
+ HDfree(t_obj_path);
+ }
break;
+
} /* end switch */
} /* end else */
@@ -969,29 +977,36 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "<%sIntegerType ByteOrder=\"",xmlnsprefix);
switch (ord) {
- case H5T_ORDER_LE:
- h5tools_str_append(&buffer, "LE");
- break;
- case H5T_ORDER_BE:
- h5tools_str_append(&buffer, "BE");
- break;
- case H5T_ORDER_VAX:
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_ORDER_LE:
+ h5tools_str_append(&buffer, "LE");
+ break;
+ case H5T_ORDER_BE:
+ h5tools_str_append(&buffer, "BE");
+ break;
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
+ case H5T_ORDER_ERROR:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\" Sign=\"");
switch (sgn) {
- case H5T_SGN_NONE:
- h5tools_str_append(&buffer, "false");
- break;
- case H5T_SGN_2:
- h5tools_str_append(&buffer, "true");
- break;
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_SGN_NONE:
+ h5tools_str_append(&buffer, "false");
+ break;
+ case H5T_SGN_2:
+ h5tools_str_append(&buffer, "true");
+ break;
+ case H5T_SGN_ERROR:
+ case H5T_NSGN:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\" Size=\"");
sz = H5Tget_size(type);
@@ -1033,18 +1048,21 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_append(&buffer, "<%sFloatType ByteOrder=\"",xmlnsprefix);
switch (ord) {
- case H5T_ORDER_LE:
- h5tools_str_append(&buffer, "LE");
- break;
- case H5T_ORDER_BE:
- h5tools_str_append(&buffer, "BE");
- break;
- case H5T_ORDER_VAX:
- h5tools_str_append(&buffer, "VAX");
- break;
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_ORDER_LE:
+ h5tools_str_append(&buffer, "LE");
+ break;
+ case H5T_ORDER_BE:
+ h5tools_str_append(&buffer, "BE");
+ break;
+ case H5T_ORDER_VAX:
+ h5tools_str_append(&buffer, "VAX");
+ break;
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
+ case H5T_ORDER_ERROR:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ } /* end switch */
h5tools_str_append(&buffer, "\" Size=\"");
sz = H5Tget_size(type);
@@ -1172,16 +1190,19 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_append(&buffer, "<%sBitfieldType ByteOrder=\"",xmlnsprefix);
switch (ord) {
- case H5T_ORDER_LE:
- h5tools_str_append(&buffer, "LE");
- break;
- case H5T_ORDER_BE:
- h5tools_str_append(&buffer, "BE");
- break;
- case H5T_ORDER_VAX:
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_ORDER_LE:
+ h5tools_str_append(&buffer, "LE");
+ break;
+ case H5T_ORDER_BE:
+ h5tools_str_append(&buffer, "BE");
+ break;
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
+ case H5T_ORDER_ERROR:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ } /* end switch */
size = H5Tget_size(type);
h5tools_str_append(&buffer, "\" Size=\"%lu\"/>", (unsigned long)size);
@@ -1516,6 +1537,10 @@ xml_print_datatype(hid_t type, unsigned in_group)
H5Tclose(super);
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -1813,6 +1838,7 @@ xml_dump_dataspace(hid_t space)
break;
#endif /* TMP */
+ case H5S_NULL:
case H5S_NO_CLASS:
default:
ctx.need_prefix = TRUE;
@@ -2246,6 +2272,10 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL, 0);
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -3701,6 +3731,12 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
+ case H5T_STRING:
+ case H5T_REFERENCE:
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -4004,37 +4040,43 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s
H5Pget_fill_time(dcpl, &ft);
h5tools_str_append(&buffer, "FillTime=\"");
switch (ft) {
- case H5D_FILL_TIME_ALLOC:
- h5tools_str_append(&buffer, "FillOnAlloc");
- break;
- case H5D_FILL_TIME_NEVER:
- h5tools_str_append(&buffer, "FillNever");
- break;
- case H5D_FILL_TIME_IFSET:
- h5tools_str_append(&buffer, "FillIfSet");
- break;
- default:
- h5tools_str_append(&buffer, "?");
- break;
- }
+ case H5D_FILL_TIME_ALLOC:
+ h5tools_str_append(&buffer, "FillOnAlloc");
+ break;
+ case H5D_FILL_TIME_NEVER:
+ h5tools_str_append(&buffer, "FillNever");
+ break;
+ case H5D_FILL_TIME_IFSET:
+ h5tools_str_append(&buffer, "FillIfSet");
+ break;
+ case H5D_FILL_TIME_ERROR:
+ HDassert(0);
+ /* fall through */
+ default:
+ h5tools_str_append(&buffer, "?");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\" ");
H5Pget_alloc_time(dcpl, &at);
h5tools_str_append(&buffer, "AllocationTime=\"");
switch (at) {
- case H5D_ALLOC_TIME_EARLY:
- h5tools_str_append(&buffer, "Early");
- break;
- case H5D_ALLOC_TIME_INCR:
- h5tools_str_append(&buffer, "Incremental");
- break;
- case H5D_ALLOC_TIME_LATE:
- h5tools_str_append(&buffer, "Late");
- break;
- case H5D_ALLOC_TIME_DEFAULT:
- default:
- h5tools_str_append(&buffer, "?");
- break;
- }
+ case H5D_ALLOC_TIME_EARLY:
+ h5tools_str_append(&buffer, "Early");
+ break;
+ case H5D_ALLOC_TIME_INCR:
+ h5tools_str_append(&buffer, "Incremental");
+ break;
+ case H5D_ALLOC_TIME_LATE:
+ h5tools_str_append(&buffer, "Late");
+ break;
+ case H5D_ALLOC_TIME_DEFAULT:
+ case H5D_ALLOC_TIME_ERROR:
+ HDassert(0);
+ /* fall through */
+ default:
+ h5tools_str_append(&buffer, "?");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\"");
h5tools_str_append(&buffer, ">");
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -4255,6 +4297,11 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s
ctx.indent_level--;
dump_indent -= COL;
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
+
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 5f24566..ef45372 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -308,7 +308,7 @@ create_textfile(const char *name, size_t size)
fd = HDcreat(name,0777);
HDassert(fd >= 0);
- buf = HDcalloc(size, (size_t)1);
+ buf = (char *)HDcalloc(size, (size_t)1);
HDassert(buf);
/* fill buf with pattern */
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index fe128fa..fe146c1 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1759,7 +1759,6 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
size_t cd_nelmts; /* filter client number of values */
size_t cd_num; /* filter client data counter */
char f_name[256]; /* filter/file name */
- char dset_name[256]; /* filter/file name */
char s[64]; /* temporary string buffer */
off_t f_offset; /* offset in external file */
hsize_t f_size; /* bytes used in external file */
@@ -1847,7 +1846,11 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_str_append(&buffer, "\n");
} /* end if */
break;
+
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
+ HDassert(0);
break;
}
/* Print total raw storage size */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index cfd171a..d592528 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -102,29 +102,29 @@
static hbool_t not_comparable;
-#define PER(A,B) { \
- per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
- if(0 == (A) && 0 == (B)) \
- both_zero = TRUE; \
- if(0 != (A)) \
- per = (double)ABS((double)((B) - (A)) / (double)(A)); \
- else \
- not_comparable = TRUE; \
+#define PER(A,B) { \
+ per = -1; \
+ not_comparable = FALSE; \
+ both_zero = FALSE; \
+ if(H5_DBL_ABS_EQUAL(0,A) && H5_DBL_ABS_EQUAL(0,B)) \
+ both_zero = TRUE; \
+ if(!H5_DBL_ABS_EQUAL(0,A)) \
+ per = (double)ABS((double)((B) - (A)) / (double)(A)); \
+ else \
+ not_comparable = TRUE; \
}
-#define PER_UNSIGN(TYPE,A,B) { \
- per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
- if((A) == 0 && (B) == 0) \
- both_zero = TRUE; \
- if((A) != 0) \
- per = ABS((double)((TYPE)((B) - (A))) / (double)(A)) ; \
- else \
- not_comparable = TRUE; \
+#define PER_UNSIGN(TYPE,A,B) { \
+ per = -1; \
+ not_comparable = FALSE; \
+ both_zero = FALSE; \
+ if(H5_DBL_ABS_EQUAL(0,A) && H5_DBL_ABS_EQUAL(0,B)) \
+ both_zero = TRUE; \
+ if(!H5_DBL_ABS_EQUAL(0,A)) \
+ per = ABS((double)((TYPE)((B) - (A))) / (double)(A)) ; \
+ else \
+ not_comparable = TRUE; \
}
@@ -6090,28 +6090,6 @@ my_isnan(dtype_t type, void *val)
}
}
-#ifdef H5_VMS
- /* For "float" and "double" on OpenVMS/Alpha, NaN is
- * actually a valid value of maximal value.*/
- if(!retval)
- {
- if (FLT_FLOAT==type)
- {
- float x;
-
- HDmemcpy(&x, val, sizeof(float));
- retval = (x==FLT_MAX || x==-FLT_MAX);
- } else if (FLT_DOUBLE==type) {
- double x;
-
- HDmemcpy(&x, val, sizeof(double));
- retval = (x==DBL_MAX || x==-DBL_MAX);
- } else
- {
- return FALSE;
- }
- }
-#endif /*H5_VMS*/
h5difftrace("my_isnan finish\n");
return retval;
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index d7c5639..b8dd0e8 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -687,31 +687,30 @@ int diff_can_type( hid_t f_tid1, /* file data type */
HDassert(tclass1==tclass2);
switch (tclass1)
{
- case H5T_INTEGER:
- case H5T_FLOAT:
- case H5T_COMPOUND:
- case H5T_STRING:
- case H5T_ARRAY:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_REFERENCE:
-
- break;
-
- default: /*H5T_TIME */
-
+ case H5T_TIME:
+ if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) {
+ parallel_print("Not comparable: <%s> and <%s> are of class %s\n",
+ obj1_name,obj2_name,get_class(tclass2) );
+ } /* end if */
+ can_compare = 0;
+ options->not_cmp = 1;
+ return can_compare;
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
- parallel_print("Not comparable: <%s> and <%s> are of class %s\n",
- obj1_name,obj2_name,get_class(tclass2) );
- }
- can_compare = 0;
- options->not_cmp = 1;
- return can_compare;
- }
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_COMPOUND:
+ case H5T_STRING:
+ case H5T_ARRAY:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_REFERENCE:
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ break;
+ } /* end switch */
/*-------------------------------------------------------------------------
* check for equal file datatype; warning only
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index aefd641..14fbcaa 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -78,8 +78,6 @@ void print_type(hid_t type)
{
switch (H5Tget_class(type))
{
- default:
- return;
case H5T_INTEGER:
if (H5Tequal(type, H5T_STD_I8BE)) {
parallel_print("H5T_STD_I8BE");
@@ -160,7 +158,21 @@ void print_type(hid_t type)
}
break;
- }/*switch*/
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ return;
+
+ } /* end switch */
}
/*-------------------------------------------------------------------------
@@ -219,6 +231,7 @@ get_type(h5trav_type_t type)
return("H5G_LINK");
case H5TRAV_TYPE_UDLINK:
return("H5G_UDLINK");
+ case H5TRAV_TYPE_UNKNOWN:
default:
return("unknown type");
}
@@ -242,13 +255,18 @@ get_sign(H5T_sign_t sign)
{
switch (sign)
{
- default:
- return("H5T_SGN_ERROR");
- case H5T_SGN_NONE:
- return("H5T_SGN_NONE");
- case H5T_SGN_2:
- return("H5T_SGN_2");
- }
+ case H5T_SGN_NONE:
+ return "H5T_SGN_NONE";
+ case H5T_SGN_2:
+ return "H5T_SGN_2";
+ case H5T_SGN_ERROR:
+ return "H5T_SGN_ERROR";
+ case H5T_NSGN:
+ return "H5T_NSGN";
+ default:
+ HDassert(0);
+ return "unknown sign value";
+ } /* end switch */
}
@@ -268,8 +286,6 @@ get_class(H5T_class_t tclass)
{
switch (tclass)
{
- default:
- return("Invalid class");
case H5T_TIME:
return("H5T_TIME");
case H5T_INTEGER:
@@ -292,8 +308,13 @@ get_class(H5T_class_t tclass)
return("H5T_VLEN");
case H5T_ARRAY:
return("H5T_ARRAY");
- }
-}
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ HDassert(0);
+ return("Invalid class");
+ } /* end switch */
+} /* end get_class() */
/*-------------------------------------------------------------------------
* Function: print_found
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index c820aff..274b398 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1498,14 +1498,24 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
}
}
break;
- default:
+
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
if (size != HDfwrite(mem, sizeof(char), size, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
- }
+ } /* end for */
break;
- }
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class");
+ break;
+ } /* end switch */
CATCH
return ret_value;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 26cac47..6388273 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2476,6 +2476,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
default:
h5tools_str_append(buffer, "unknown datatype");
break;
@@ -2903,7 +2905,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
off_t offset; /* offset of external file */
char f_name[256]; /* filter name */
char name[256]; /* external or virtual file name */
- char dsetname[256]; /* virtual datset name */
hsize_t chsize[64]; /* chunk size in elements */
hsize_t size; /* size of external file */
hsize_t storage_size;
@@ -3080,6 +3081,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
}
}
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", "Unknown layout");
@@ -3305,6 +3308,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
case H5D_FILL_TIME_IFSET:
h5tools_str_append(&buffer, "%s", "H5D_FILL_TIME_IFSET");
break;
+ case H5D_FILL_TIME_ERROR:
default:
HDassert(0);
break;
@@ -3362,6 +3366,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
case H5D_ALLOC_TIME_LATE:
h5tools_str_append(&buffer, "%s", "H5D_ALLOC_TIME_LATE");
break;
+ case H5D_ALLOC_TIME_ERROR:
+ case H5D_ALLOC_TIME_DEFAULT:
default:
HDassert(0);
break;
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index 0bb7d77..60666f1 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -218,7 +218,7 @@ ref_path_table_put(const char *path, haddr_t objno)
HDassert(ref_path_table);
HDassert(path);
- if((new_node = HDmalloc(sizeof(ref_path_node_t))) == NULL)
+ if((new_node = (ref_path_node_t *)HDmalloc(sizeof(ref_path_node_t))) == NULL)
return(-1);
new_node->objno = objno;
@@ -300,7 +300,7 @@ lookup_ref_path(haddr_t ref)
if(ref_path_table == NULL)
init_ref_path_table();
- node = H5SL_search(ref_path_table, &ref);
+ node = (ref_path_node_t *)H5SL_search(ref_path_table, &ref);
return(node ? node->path : NULL);
}
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 470620f..88308ed 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -860,11 +860,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else
tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
}
- #ifdef H5_VMS
- h5tools_str_append(str, OPT(info->fmt_schar, "%hd"), tempchar);
- #else
h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
- #endif
}
} /* end if (sizeof(char) == nsize) */
else if (sizeof(int) == nsize) {
@@ -1062,6 +1058,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, H5_TOOLS_DATATYPE);
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
h5tools_str_append(str, "%u-", (unsigned) oi.type);
break;
@@ -1191,7 +1189,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
break;
- default:
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
{
/* All other types get printed as hexadecimal */
size_t i;
@@ -1204,6 +1204,12 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
}
break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ h5tools_str_append(str, "invalid datatype");
+ break;
} /* end switch */
}
return h5tools_str_fmt(str, start, OPT(info->elmt_fmt, "%s"));
@@ -1398,7 +1404,7 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac
head = newstr;
while ( (tok = HDstrstr ( head, substr ))){
oldstr = newstr;
- newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 );
+ newstr = (char *)HDmalloc( HDstrlen( oldstr ) - HDstrlen( substr ) + HDstrlen( replacement ) + 1 );
if ( newstr == NULL ){
HDfree (oldstr);
diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c
index d68d3c5..8a56d29 100644
--- a/tools/lib/h5tools_type.c
+++ b/tools/lib/h5tools_type.c
@@ -13,6 +13,7 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include "H5private.h"
#include "h5tools.h"
/*-------------------------------------------------------------------------
@@ -75,54 +76,54 @@ h5tools_get_little_endian_type(hid_t tid)
size = H5Tget_size(tid);
sign = H5Tget_sign(tid);
- switch( type_class )
- {
- case H5T_INTEGER:
- {
- if ( size == 1 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I8LE);
- else if ( size == 2 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I16LE);
- else if ( size == 4 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I32LE);
- else if ( size == 8 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I64LE);
- else if ( size == 1 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U8LE);
- else if ( size == 2 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U16LE);
- else if ( size == 4 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U32LE);
- else if ( size == 8 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U64LE);
- }
- break;
-
- case H5T_FLOAT:
- if ( size == 4)
- p_type=H5Tcopy(H5T_IEEE_F32LE);
- else if ( size == 8)
- p_type=H5Tcopy(H5T_IEEE_F64LE);
- break;
-
- case H5T_TIME:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_STRING:
- case H5T_COMPOUND:
- case H5T_REFERENCE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_ARRAY:
- break;
-
- default:
- break;
-
- }
-
- return(p_type);
-}
+ switch(type_class) {
+ case H5T_INTEGER:
+ if ( size == 1 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I8LE);
+ else if ( size == 2 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I16LE);
+ else if ( size == 4 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I32LE);
+ else if ( size == 8 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I64LE);
+ else if ( size == 1 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U8LE);
+ else if ( size == 2 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U16LE);
+ else if ( size == 4 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U32LE);
+ else if ( size == 8 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U64LE);
+ break;
+
+ case H5T_FLOAT:
+ if ( size == 4)
+ p_type=H5Tcopy(H5T_IEEE_F32LE);
+ else if ( size == 8)
+ p_type=H5Tcopy(H5T_IEEE_F64LE);
+ break;
+
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_STRING:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ HDassert(0);
+ break;
+
+ } /* end switch */
+
+ return p_type;
+} /* end h5tools_get_little_endian_type() */
/*-------------------------------------------------------------------------
@@ -152,53 +153,51 @@ h5tools_get_big_endian_type(hid_t tid)
size = H5Tget_size(tid);
sign = H5Tget_sign(tid);
- switch( type_class )
- {
- case H5T_INTEGER:
- {
- if ( size == 1 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I8BE);
- else if ( size == 2 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I16BE);
- else if ( size == 4 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I32BE);
- else if ( size == 8 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I64BE);
- else if ( size == 1 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U8BE);
- else if ( size == 2 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U16BE);
- else if ( size == 4 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U32BE);
- else if ( size == 8 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U64BE);
- }
- break;
-
- case H5T_FLOAT:
- if ( size == 4)
- p_type=H5Tcopy(H5T_IEEE_F32BE);
- else if ( size == 8)
- p_type=H5Tcopy(H5T_IEEE_F64BE);
- break;
-
- case H5T_TIME:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_STRING:
- case H5T_COMPOUND:
- case H5T_REFERENCE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_ARRAY:
- break;
-
- default:
- break;
-
- }
-
-
- return(p_type);
-}
+ switch(type_class) {
+ case H5T_INTEGER:
+ if ( size == 1 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I8BE);
+ else if ( size == 2 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I16BE);
+ else if ( size == 4 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I32BE);
+ else if ( size == 8 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I64BE);
+ else if ( size == 1 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U8BE);
+ else if ( size == 2 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U16BE);
+ else if ( size == 4 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U32BE);
+ else if ( size == 8 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U64BE);
+ break;
+
+ case H5T_FLOAT:
+ if ( size == 4)
+ p_type=H5Tcopy(H5T_IEEE_F32BE);
+ else if ( size == 8)
+ p_type=H5Tcopy(H5T_IEEE_F64BE);
+ break;
+
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_STRING:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ HDassert(0);
+ break;
+ } /* end switch */
+
+ return p_type;
+} /* end h5tools_get_big_endian_type() */
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fc8cf1d..a09a003 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -612,7 +612,10 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
} /* end if */
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
+ HDassert(0);
break;
} /* end switch */
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index b8d44de..b85133d 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -169,6 +169,10 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS];
}
break;
+#else
+ case MPI_CLOCK:
+ HDfprintf(stderr, "MPI clock set in serial library\n");
+ return NULL;
#endif /* H5_HAVE_PARALLEL */
case SYS_CLOCK:
if (start_stop == TSTART) {
@@ -197,11 +201,11 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
}
break;
+
default:
- HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
- return (NULL);
- break;
- }
+ HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
+ return NULL;
+ } /* end switch */
#if 0
/* this does not belong here. Need fix in h5perf code when set_time() is called. -AKC- */
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 87c112a..3789723 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -121,8 +121,9 @@ get_H5B2_class(const uint8_t *sig)
cls = H5A_BT2_CORDER;
break;
+ case H5B2_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
} /* end switch */
@@ -156,8 +157,9 @@ get_H5EA_class(const uint8_t *sig)
cls = H5EA_CLS_TEST;
break;
+ case H5EA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown array class %u\n", (unsigned)(clsid));
+ HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
HDexit(4);
} /* end switch */
@@ -191,8 +193,9 @@ get_H5FA_class(const uint8_t *sig)
cls = H5FA_CLS_TEST;
break;
+ case H5FA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown array class %u\n", (unsigned)(clsid));
+ HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
HDexit(4);
} /* end switch */
@@ -355,11 +358,11 @@ main(int argc, char *argv[])
/* Build array of chunk dimensions */
ndims = (unsigned)extra;
- dim[0] = extra2;
+ dim[0] = (uint32_t)extra2;
if(ndims > 1)
- dim[1] = extra3;
+ dim[1] = (uint32_t)extra3;
if(ndims > 2)
- dim[2] = extra4;
+ dim[2] = (uint32_t)extra4;
/* Check for dimension error */
if(ndims > 3) {
@@ -382,8 +385,9 @@ main(int argc, char *argv[])
status = H5D_btree_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims, dim);
break;
+ case H5B_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
}
@@ -502,14 +506,14 @@ main(int argc, char *argv[])
*/
/* Check for enough valid parameters */
- if(extra2 == 0) {
- HDfprintf(stderr, "ERROR: Need list format version and number of messages in order to shared message list\n");
+ if(extra == 0) {
+ HDfprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n");
HDfprintf(stderr, "Shared message list usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <shared message list address> <list format version> <number of mesages in list>\n");
+ HDfprintf(stderr, "\th5debug <filename> <shared message list address> <shared message header address>\n");
HDexit(4);
} /* end if */
- status = H5SM_list_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, (unsigned) extra, (size_t) extra2);
+ status = H5SM_list_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, (haddr_t)extra);
} else if(!HDmemcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c
index 8dee706..1c1bba1 100644
--- a/tools/misc/h5mkgrp.c
+++ b/tools/misc/h5mkgrp.c
@@ -181,7 +181,7 @@ parse_command_line(int argc, const char *argv[], param_t *parms)
/* Allocate space for the group name pointers */
parms->ngroups = (argc - opt_ind);
- parms->groups = HDmalloc(parms->ngroups * sizeof(char *));
+ parms->groups = (char **)HDmalloc(parms->ngroups * sizeof(char *));
/* Retrieve the group names */
curr_group = 0;
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index ffd52e8..f58af3a 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -261,13 +261,13 @@ main (int argc, char *argv[])
src_is_family = strcmp (src_name, src_gen_name);
if ((src=HDopen(src_name, O_RDONLY,0))<0) {
- perror (src_name);
- exit (EXIT_FAILURE);
+ perror (src_name);
+ exit (EXIT_FAILURE);
}
if (HDfstat(src, &sb)<0) {
- perror ("fstat");
- exit (EXIT_FAILURE);
+ perror ("fstat");
+ exit (EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
if (verbose) fprintf (stderr, "< %s\n", src_name);
@@ -290,7 +290,7 @@ main (int argc, char *argv[])
if (argno<argc) usage (prog_name);
/* Now the real work, split the file */
- buf = HDmalloc (blk_size);
+ buf = (char *)HDmalloc(blk_size);
while (src_offset<src_size) {
/* Read a block. The amount to read is the minimum of:
diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c
index 74bcc46..0ea16e8 100644
--- a/tools/perform/chunk.c
+++ b/tools/perform/chunk.c
@@ -163,7 +163,7 @@ create_dataset (void)
assert(dset>=0);
/* The data */
- buf = calloc(1, SQUARE (DS_SIZE*CH_SIZE));
+ buf = (signed char *)calloc(1, SQUARE (DS_SIZE*CH_SIZE));
H5Dwrite(dset, H5T_NATIVE_SCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
free(buf);
@@ -194,7 +194,7 @@ static double
test_rowmaj (int op, size_t cache_size, size_t io_size)
{
hid_t file, dset, mem_space, file_space;
- signed char *buf = calloc (1, (size_t)(SQUARE(io_size)));
+ signed char *buf = (signed char *)calloc (1, (size_t)(SQUARE(io_size)));
hsize_t i, j, hs_size[2];
hsize_t hs_offset[2];
int mdc_nelmts;
@@ -273,7 +273,7 @@ test_diag (int op, size_t cache_size, size_t io_size, size_t offset)
hsize_t i, hs_size[2];
hsize_t nio = 0;
hsize_t hs_offset[2];
- signed char *buf = calloc (1, (size_t)(SQUARE (io_size)));
+ signed char *buf = (signed char *)calloc(1, (size_t)(SQUARE (io_size)));
int mdc_nelmts;
size_t rdcc_nelmts;
double w0;
diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c
index 0288ffa..feabd3a 100644
--- a/tools/perform/overhead.c
+++ b/tools/perform/overhead.c
@@ -224,7 +224,7 @@ test(fill_t fill_style, const double splits[],
if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666)) < 0) goto error;
if(FILL_RANDOM==fill_style)
- had = calloc((size_t)cur_size[0], sizeof(int));
+ had = (int *)calloc((size_t)cur_size[0], sizeof(int));
for (i=1; i<=cur_size[0]; i++) {
diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c
index 3b28ea7..5622810 100644
--- a/tools/perform/sio_engine.c
+++ b/tools/perform/sio_engine.c
@@ -181,7 +181,7 @@ do_sio(parameters param)
}
/* Allocate transfer buffer */
- if ((buffer = malloc(linear_buf_size)) == NULL){
+ if ((buffer = (char *)malloc(linear_buf_size)) == NULL){
HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
}
diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c
index 7d75a2d..34d8552 100644
--- a/tools/perform/sio_perf.c
+++ b/tools/perform/sio_perf.c
@@ -481,16 +481,16 @@ run_test(iotype iot, parameters parms, struct options *opts)
/* allocate space for tables minmax and that it is sufficient */
/* to initialize all elements to zeros by calloc. */
- write_sys_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- write_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- write_gross_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- write_raw_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_sys_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_gross_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_raw_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
if (!parms.h5_write_only) {
- read_sys_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- read_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- read_gross_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- read_raw_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_sys_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_gross_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_raw_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
}
/* Do IO iteration times, collecting statistics each time */
@@ -1443,6 +1443,10 @@ void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop)
case HDF5_RAW_READ_FIXED_DIMS:
msg = "Raw Read";
break;
+ case HDF5_FILE_READ_OPEN:
+ case HDF5_FILE_READ_CLOSE:
+ case HDF5_FILE_WRITE_OPEN:
+ case HDF5_FILE_WRITE_CLOSE:
default:
msg = "Unknown Timer";
break;
diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h
index 4eb1ded..8f52eba 100644
--- a/tools/perform/sio_standalone.h
+++ b/tools/perform/sio_standalone.h
@@ -322,18 +322,7 @@ H5_DLL int HDrand(void);
#define HDread(F,M,Z) read(F,M,Z)
#define HDreaddir(D) readdir(D)
#define HDrealloc(M,Z) realloc(M,Z)
-#ifdef H5_VMS
-#ifdef __cplusplus
-extern "C" {
-#endif
-int HDremove_all(const char * fname);
-#ifdef __cplusplus
-}
-#endif
-#define HDremove(S) HDremove_all(S)
-#else
#define HDremove(S) remove(S)
-#endif /*H5_VMS*/
#define HDrename(OLD,NEW) rename(OLD,NEW)
#define HDrewind(F) rewind(F)
#define HDrewinddir(D) rewinddir(D)
diff --git a/tools/perform/zip_perf.c b/tools/perform/zip_perf.c
index f73ba40..d025602 100644
--- a/tools/perform/zip_perf.c
+++ b/tools/perform/zip_perf.c
@@ -30,15 +30,6 @@
#include <zlib.h>
-#ifdef VMS
-# define unlink delete
-#endif /* VMS */
-
-#ifdef RISCOS
-# define unlink remove
-# define fileno(file) file->__file
-#endif /* RISCOS */
-
#define ONE_KB 1024
#define ONE_MB (ONE_KB * ONE_KB)
#define ONE_GB (ONE_MB * ONE_KB)