summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2014-06-19 20:09:06 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2014-06-19 20:09:06 (GMT)
commit67ba5eb6e8a71a110d47fd3079edcc1fe09fb95f (patch)
tree92735056c19013281c6ba687e836ed59772e2f3e
parent02eab2eb72a18fa685545ba7c7c5ac7715693d1b (diff)
downloadhdf5-67ba5eb6e8a71a110d47fd3079edcc1fe09fb95f.zip
hdf5-67ba5eb6e8a71a110d47fd3079edcc1fe09fb95f.tar.gz
hdf5-67ba5eb6e8a71a110d47fd3079edcc1fe09fb95f.tar.bz2
[svn-r25333] Bring revisions #24948 - #25120 from trunk to revise_chunks.
Tested on jam, ostrich, koala, platypus.
-rw-r--r--CMakeInstallation.cmake63
-rw-r--r--CMakeLists.txt25
-rw-r--r--COPYING2
-rw-r--r--MANIFEST13
-rw-r--r--Makefile.in1
-rw-r--r--README.txt2
-rwxr-xr-xbin/release83
-rwxr-xr-xbin/snapshot2
-rw-r--r--c++/Makefile.in1
-rw-r--r--c++/examples/Makefile.am4
-rw-r--r--c++/examples/Makefile.in25
-rw-r--r--c++/src/H5Attribute.cpp48
-rw-r--r--c++/src/H5Attribute.h6
-rw-r--r--c++/src/H5CommonFG.cpp162
-rw-r--r--c++/src/H5CommonFG.h14
-rw-r--r--c++/src/H5DataSet.cpp64
-rw-r--r--c++/src/H5DataSet.h10
-rw-r--r--c++/src/H5DataSpace.cpp16
-rw-r--r--c++/src/H5DataSpace.h4
-rw-r--r--c++/src/H5DataType.cpp34
-rw-r--r--c++/src/H5DataType.h4
-rw-r--r--c++/src/H5DcreatProp.cpp9
-rw-r--r--c++/src/H5DxferProp.cpp2
-rw-r--r--c++/src/H5DxferProp.h2
-rw-r--r--c++/src/H5Exception.cpp27
-rw-r--r--c++/src/H5Exception.h4
-rw-r--r--c++/src/H5FaccProp.cpp45
-rw-r--r--c++/src/H5FaccProp.h19
-rw-r--r--c++/src/H5File.cpp45
-rw-r--r--c++/src/H5File.h3
-rw-r--r--c++/src/H5Group.cpp2
-rw-r--r--c++/src/H5IdComponent.cpp22
-rw-r--r--c++/src/H5IdComponent.h3
-rw-r--r--c++/src/H5Location.cpp23
-rw-r--r--c++/src/H5Location.h6
-rw-r--r--c++/src/H5Object.cpp112
-rw-r--r--c++/src/H5Object.h8
-rw-r--r--c++/src/H5PredType.h24
-rw-r--r--c++/src/Makefile.am5
-rw-r--r--c++/src/Makefile.in11
-rw-r--r--c++/src/cpp_doc_config2251
-rw-r--r--c++/src/header_files/hdf_logo.jpgbin0 -> 1964 bytes
-rw-r--r--c++/src/header_files/help.jpgbin0 -> 3280 bytes
-rw-r--r--c++/test/CMakeLists.txt1
-rw-r--r--c++/test/Makefile.am4
-rw-r--r--c++/test/Makefile.in10
-rw-r--r--c++/test/dsets.cpp38
-rw-r--r--c++/test/h5cpputil.h15
-rw-r--r--c++/test/tattr.cpp49
-rw-r--r--c++/test/tcompound.cpp8
-rw-r--r--c++/test/tdspl.cpp5
-rw-r--r--c++/test/testhdf5.cpp71
-rw-r--r--c++/test/tfile.cpp1
-rw-r--r--c++/test/tfilter.cpp2
-rw-r--r--c++/test/tobject.cpp335
-rw-r--r--c++/test/trefer.cpp4
-rw-r--r--c++/test/ttypes.cpp17
-rw-r--r--c++/test/tvlstr.cpp12
-rw-r--r--config/cmake/FindHDF5.cmake.in172
-rw-r--r--config/cmake/HDF518_Examples.cmake.in233
-rw-r--r--[-rwxr-xr-x]config/cmake/README.txt.cmake.in107
-rw-r--r--config/cmake/cacheinit.cmake156
-rw-r--r--[-rwxr-xr-x]config/cmake/hdf.icnsbin2632 -> 2632 bytes
-rw-r--r--config/cmake/hdf5-config-version.cmake.in54
-rw-r--r--config/cmake/hdf5-config.cmake.build.in146
-rw-r--r--config/cmake/hdf5-config.cmake.install.in162
-rw-r--r--config/cmake/libhdf5.settings.cmake.in2
-rw-r--r--config/cmake/mccacheinit.cmake162
-rw-r--r--config/examples.am23
-rw-r--r--config/intel-flags11
-rw-r--r--config/linux-gnulibc121
-rw-r--r--config/lt_vers.am2
-rw-r--r--config/solaris2.x6
-rwxr-xr-xconfigure52
-rw-r--r--configure.ac17
-rw-r--r--examples/Makefile.am10
-rw-r--r--examples/Makefile.in31
-rw-r--r--examples/h5_cmprss.c250
-rw-r--r--examples/h5_crtatt.c126
-rw-r--r--examples/h5_crtdat.c102
-rw-r--r--examples/h5_crtgrp.c80
-rw-r--r--examples/h5_crtgrpar.c96
-rw-r--r--examples/h5_crtgrpd.c182
-rw-r--r--examples/h5_rdwt.c106
-rw-r--r--fortran/Makefile.in1
-rw-r--r--fortran/examples/Makefile.am4
-rw-r--r--fortran/examples/Makefile.in25
-rw-r--r--fortran/examples/h5_cmprss.f90262
-rw-r--r--fortran/examples/h5_extend.f902
-rw-r--r--fortran/examples/hyperslab.f9011
-rw-r--r--fortran/examples/run-fortran-ex.sh.in32
-rw-r--r--fortran/examples/rwdset_fortran2003.f907
-rw-r--r--fortran/examples/selectele.f909
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--fortran/src/H5Pff.f904
-rw-r--r--fortran/src/Makefile.am5
-rw-r--r--fortran/src/Makefile.in11
-rw-r--r--fortran/src/README_DEVELOPEMENT26
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1144
-rw-r--r--fortran/test/CMakeLists.txt4
-rw-r--r--fortran/test/CMakeTests.cmake8
-rw-r--r--fortran/test/Makefile.am29
-rw-r--r--fortran/test/Makefile.in138
-rw-r--r--fortran/test/fflush1.f903
-rw-r--r--fortran/test/fflush2.f902
-rw-r--r--fortran/test/fortranlib_test.f9019
-rw-r--r--fortran/test/fortranlib_test_1_8.f90445
-rw-r--r--fortran/test/fortranlib_test_F03.f904
-rw-r--r--fortran/test/tH5A.f9027
-rw-r--r--fortran/test/tH5A_1_8.f9061
-rw-r--r--fortran/test/tH5D.f9017
-rw-r--r--fortran/test/tH5E.f9010
-rw-r--r--fortran/test/tH5E_F03.f9030
-rw-r--r--fortran/test/tH5F.f9027
-rw-r--r--fortran/test/tH5F_F03.f909
-rw-r--r--fortran/test/tH5G.f909
-rw-r--r--fortran/test/tH5G_1_8.f9073
-rw-r--r--fortran/test/tH5I.f908
-rw-r--r--fortran/test/tH5L_F03.f9028
-rw-r--r--fortran/test/tH5MISC_1_8.f90474
-rw-r--r--fortran/test/tH5O.f9022
-rw-r--r--fortran/test/tH5O_F03.f9012
-rw-r--r--fortran/test/tH5P.f9031
-rw-r--r--fortran/test/tH5P_F03.f9044
-rw-r--r--fortran/test/tH5R.f9012
-rw-r--r--fortran/test/tH5S.f907
-rw-r--r--fortran/test/tH5Sselect.f9043
-rw-r--r--fortran/test/tH5T.f9061
-rw-r--r--fortran/test/tH5T_F03.f90212
-rw-r--r--fortran/test/tH5VL.f9042
-rw-r--r--fortran/test/tH5Z.f909
-rw-r--r--fortran/test/tHDF5.f9045
-rw-r--r--fortran/test/tHDF5_1_8.f9038
-rw-r--r--fortran/test/tHDF5_F03.f9039
-rw-r--r--fortran/test/tf.f90348
-rw-r--r--fortran/testpar/Makefile.am3
-rw-r--r--fortran/testpar/Makefile.in4
-rw-r--r--fortran/testpar/hyper.f903
-rw-r--r--fortran/testpar/mdset.f903
-rw-r--r--hl/Makefile.in1
-rw-r--r--hl/c++/Makefile.in1
-rw-r--r--hl/c++/examples/Makefile.am1
-rw-r--r--hl/c++/examples/Makefile.in23
-rw-r--r--hl/c++/src/Makefile.am5
-rw-r--r--hl/c++/src/Makefile.in11
-rw-r--r--hl/c++/test/Makefile.in1
-rw-r--r--hl/examples/Makefile.am5
-rw-r--r--hl/examples/Makefile.in27
-rw-r--r--hl/fortran/Makefile.in1
-rw-r--r--hl/fortran/examples/Makefile.am1
-rw-r--r--hl/fortran/examples/Makefile.in23
-rw-r--r--hl/fortran/examples/ex_ds1.f902
-rw-r--r--hl/fortran/src/Makefile.am5
-rw-r--r--hl/fortran/src/Makefile.in11
-rw-r--r--hl/fortran/test/Makefile.in1
-rw-r--r--hl/src/H5LTanalyze.c6
-rw-r--r--hl/src/H5LTanalyze.l4
-rw-r--r--hl/src/H5LTparse.c22
-rw-r--r--hl/src/H5LTparse.y10
-rw-r--r--hl/src/Makefile.am5
-rw-r--r--hl/src/Makefile.in11
-rw-r--r--hl/test/Makefile.in1
-rw-r--r--hl/tools/Makefile.in1
-rw-r--r--hl/tools/gif2h5/Makefile.in1
-rw-r--r--hl/tools/h5watch/Makefile.in1
-rw-r--r--perform/Makefile.in1
-rw-r--r--perform/pio_engine.c2
-rw-r--r--perform/sio_engine.c2
-rw-r--r--perform/sio_timer.c394
-rw-r--r--release_docs/INSTALL_CMake.txt27
-rw-r--r--release_docs/RELEASE.txt130
-rw-r--r--release_docs/USING_CMake_Examples.txt162
-rw-r--r--release_docs/USING_HDF5_CMake.txt13
-rw-r--r--src/H5.c73
-rw-r--r--src/H5A.c7
-rw-r--r--src/H5AC.c70
-rw-r--r--src/H5ACpkg.h2
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5Adeprec.c24
-rw-r--r--src/H5Apkg.h1
-rw-r--r--src/H5C.c58
-rw-r--r--src/H5CS.c10
-rw-r--r--src/H5Cprivate.h16
-rw-r--r--src/H5D.c33
-rw-r--r--src/H5Ddeprec.c24
-rw-r--r--src/H5Dint.c8
-rw-r--r--src/H5Dio.c79
-rw-r--r--src/H5Dpkg.h2
-rw-r--r--src/H5Dpublic.h4
-rw-r--r--src/H5E.c9
-rw-r--r--src/H5EA.c2
-rw-r--r--src/H5Edeprec.c38
-rw-r--r--src/H5Epkg.h3
-rw-r--r--src/H5F.c26
-rw-r--r--src/H5FD.c22
-rw-r--r--src/H5FDcore.c395
-rw-r--r--src/H5FDint.c79
-rw-r--r--src/H5FDprivate.h6
-rw-r--r--src/H5Faccum.c523
-rw-r--r--src/H5Fdeprec.c36
-rw-r--r--src/H5Fio.c26
-rw-r--r--src/H5Fpkg.h16
-rw-r--r--src/H5Fprivate.h53
-rw-r--r--src/H5Fsuper.c71
-rw-r--r--src/H5Fsuper_cache.c28
-rw-r--r--src/H5G.c25
-rw-r--r--src/H5Gdeprec.c36
-rw-r--r--src/H5Gpkg.h1
-rw-r--r--src/H5MF.c13
-rw-r--r--src/H5P.c36
-rw-r--r--src/H5Pacpl.c9
-rw-r--r--src/H5Pdapl.c11
-rw-r--r--src/H5Pdcpl.c11
-rw-r--r--src/H5Pdeprec.c37
-rw-r--r--src/H5Pdxpl.c9
-rw-r--r--src/H5Pencdec.c6
-rw-r--r--src/H5Pfapl.c118
-rw-r--r--src/H5Pfcpl.c9
-rw-r--r--src/H5Pfmpl.c10
-rw-r--r--src/H5Pgcpl.c11
-rw-r--r--src/H5Pint.c330
-rw-r--r--src/H5Plapl.c9
-rw-r--r--src/H5Plcpl.c9
-rw-r--r--src/H5Pocpl.c7
-rw-r--r--src/H5Pocpypl.c10
-rw-r--r--src/H5Ppkg.h17
-rw-r--r--src/H5Pprivate.h42
-rw-r--r--src/H5Ppublic.h128
-rw-r--r--src/H5Pstrcpl.c8
-rw-r--r--src/H5R.c3
-rw-r--r--src/H5Rdeprec.c39
-rw-r--r--src/H5Rpkg.h1
-rw-r--r--src/H5T.c19
-rw-r--r--src/H5TS.c225
-rw-r--r--src/H5TSprivate.h13
-rw-r--r--src/H5Tcommit.c2
-rw-r--r--src/H5Tdeprec.c38
-rw-r--r--src/H5Tpkg.h1
-rw-r--r--src/H5Zprivate.h2
-rw-r--r--src/H5private.h2
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in3
-rw-r--r--test/CMakeTests.cmake2
-rw-r--r--test/Makefile.am2
-rw-r--r--test/Makefile.in4
-rw-r--r--test/accum.c213
-rw-r--r--test/dsets.c11
-rw-r--r--test/enc_dec_plist.c3
-rw-r--r--test/gen_bogus.c2
-rw-r--r--test/gen_plist.c2
-rw-r--r--test/h5test.c104
-rw-r--r--test/testfiles/plist_files/fapl_bebin1402 -> 1462 bytes
-rw-r--r--test/testfiles/plist_files/fapl_lebin1402 -> 1462 bytes
-rw-r--r--test/testfiles/plist_files/lapl_bebin1502 -> 1562 bytes
-rw-r--r--test/testfiles/plist_files/lapl_lebin1502 -> 1562 bytes
-rw-r--r--test/tmisc.c110
-rw-r--r--test/tselect.c12
-rw-r--r--test/vfd.c13
-rw-r--r--testpar/Makefile.in1
-rw-r--r--testpar/t_prop.c1
-rw-r--r--tools/Makefile.in1
-rw-r--r--tools/h5copy/CMakeLists.txt6
-rw-r--r--tools/h5copy/Makefile.in1
-rw-r--r--tools/h5diff/CMakeLists.txt6
-rw-r--r--tools/h5diff/Makefile.in1
-rw-r--r--tools/h5diff/h5diff_common.c7
-rw-r--r--tools/h5diff/testfiles/h5diff_101w.txt22
-rw-r--r--tools/h5diff/testfiles/h5diff_102w.txt20
-rw-r--r--tools/h5diff/testfiles/h5diff_tmp1.txt5
-rw-r--r--tools/h5diff/testfiles/h5diff_tmp2.txt13
-rw-r--r--tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5bin0 -> 124440 bytes
-rw-r--r--tools/h5diff/testfiles/tmpSingleSiteBethe.reference.h5bin0 -> 119464 bytes
-rw-r--r--tools/h5diff/testfiles/tmptest.he5bin0 -> 4740424 bytes
-rw-r--r--tools/h5diff/testfiles/tmptest2.he5bin0 -> 4734280 bytes
-rw-r--r--tools/h5diff/testh5diff.sh.in10
-rw-r--r--tools/h5dump/CMakeLists.txt6
-rw-r--r--tools/h5dump/Makefile.in1
-rw-r--r--tools/h5import/CMakeLists.txt6
-rw-r--r--tools/h5import/Makefile.in1
-rw-r--r--tools/h5jam/CMakeLists.txt6
-rw-r--r--tools/h5jam/Makefile.in1
-rw-r--r--tools/h5ls/CMakeLists.txt6
-rw-r--r--tools/h5ls/Makefile.in1
-rw-r--r--tools/h5repack/CMakeLists.txt6
-rw-r--r--tools/h5repack/Makefile.in1
-rw-r--r--tools/h5stat/CMakeLists.txt6
-rw-r--r--tools/h5stat/Makefile.in1
-rw-r--r--tools/lib/Makefile.in1
-rw-r--r--tools/lib/h5diff_attr.c37
-rw-r--r--tools/misc/CMakeLists.txt6
-rw-r--r--tools/misc/CMakeTests.cmake2
-rw-r--r--tools/misc/Makefile.in1
-rw-r--r--tools/misc/h5perf_gentest.c1196
-rw-r--r--vms/src/h5pubconf.h6
-rw-r--r--vms/test/H5srcdir_str.h44
295 files changed, 10330 insertions, 5528 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 0631c61..bac7581 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -112,6 +112,24 @@ install (
)
#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+#foreach (libs ${LINK_LIBS})
+# set (LIBS "${LIBS} -l${libs}")
+#endforeach (libs ${LINK_LIBS})
+#foreach (libs ${HDF5_LIBRARIES_TO_EXPORT})
+# set (HDF5LIBS "${HDF5LIBS} -l${libs}")
+#endforeach (libs ${HDF5_LIBRARIES_TO_EXPORT})
+#configure_file (
+# ${HDF5_RESOURCES_DIR}/libhdf5.pc.in
+# ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc @ONLY
+#)
+#install (
+# FILES ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc
+# DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+#)
+
+#-----------------------------------------------------------------------------
# Configure the HDF518_Examples.cmake file and the examples
#-----------------------------------------------------------------------------
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
@@ -200,12 +218,12 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
if (HDF5_PACK_INSTALL_DOCS)
set (release_files
${release_files}
@@ -214,18 +232,17 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
${HDF5_SOURCE_DIR}/release_docs/INSTALL
)
if (WIN32)
- if (NOT CYGWIN)
- set (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
- )
- else (NOT CYGWIN)
- set (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
- )
- endif (NOT CYGWIN)
+ set (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
+ )
endif (WIN32)
+ if (CYGWIN)
+ set (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
+ )
+ endif (CYGWIN)
if (HDF5_ENABLE_PARALLEL)
set (release_files
${release_files}
@@ -241,6 +258,19 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ if (CMAKE_HOST_UNIX)
+ set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ else (CMAKE_HOST_UNIX)
+ GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
+ set (CMAKE_INSTALL_PREFIX
+ "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ set (CMAKE_GENERIC_PROGRAM_FILES)
+ endif (CMAKE_HOST_UNIX)
+endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+
#-----------------------------------------------------------------------------
# Set the cpack variables
#-----------------------------------------------------------------------------
@@ -285,7 +315,8 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
# set the package header icon for MUI
set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.bmp")
- set (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data")
+ #set (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data")
+ set (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
set (CPACK_MONOLITHIC_INSTALL ON)
set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
@@ -293,10 +324,8 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
elseif (APPLE)
LIST (APPEND CPACK_GENERATOR "DragNDrop")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
- set (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
- set (CPACK_PACKAGING_INSTALL_PREFIX "/")
+ set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
- set (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
if (HDF5_PACK_MACOSX_BUNDLE)
LIST (APPEND CPACK_GENERATOR "Bundle")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index efa9ba6..ea6f945 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -213,22 +213,6 @@ set (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org")
#-----------------------------------------------------------------------------
-# Set Install folder value
-#-----------------------------------------------------------------------------
-if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- if (CMAKE_HOST_UNIX)
- set (CMAKE_INSTALL_PREFIX "/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
- CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- else (CMAKE_HOST_UNIX)
- GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
- set (CMAKE_INSTALL_PREFIX
- "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
- CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- set (CMAKE_GENERIC_PROGRAM_FILES)
- endif (CMAKE_HOST_UNIX)
-endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-
-#-----------------------------------------------------------------------------
# Include some macros for reusable code
#-----------------------------------------------------------------------------
include (${HDF5_RESOURCES_DIR}/HDFMacros.cmake)
@@ -730,14 +714,17 @@ 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)
if (HDF5_ENABLE_PARALLEL)
- message (FATAL_ERROR " **** parallel and thread-safety options are mutually exclusive **** ")
+ message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
endif (HDF5_ENABLE_PARALLEL)
if (HDF5_BUILD_FORTRAN)
- message (FATAL_ERROR " **** Fortran and thread-safety options are mutually exclusive **** ")
+ message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
endif (HDF5_BUILD_FORTRAN)
if (HDF5_BUILD_CPP_LIB)
- message (FATAL_ERROR " **** C++ and thread-safety options are mutually exclusive **** ")
+ message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
endif (HDF5_BUILD_CPP_LIB)
set (H5_HAVE_THREADSAFE 1)
if (H5_HAVE_IOEO)
diff --git a/COPYING b/COPYING
index faa7122..b48d527 100644
--- a/COPYING
+++ b/COPYING
@@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-Copyright 2006-2013 by The HDF Group.
+Copyright 2006-2014 by The HDF Group.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.
diff --git a/MANIFEST b/MANIFEST
index 9792051..3d37ae8 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -363,6 +363,7 @@
./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
@@ -374,6 +375,9 @@
./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/testpar/Makefile.am
./fortran/testpar/Makefile.in
@@ -485,6 +489,8 @@
./c++/src/h5c++.in
./c++/src/header.html
./c++/src/header_files/filelist.xml
+./c++/src/header_files/hdf_logo.jpg
+./c++/src/header_files/help.jpg
./c++/src/header_files/image001.jpg
./c++/src/header_files/image002.jpg
@@ -503,6 +509,7 @@
./c++/test/th5s.cpp
./c++/test/th5s.h5
./c++/test/tlinks.cpp
+./c++/test/tobject.cpp
./c++/test/ttypes.cpp
./c++/test/trefer.cpp
./c++/test/tvlstr.cpp
@@ -2180,6 +2187,12 @@
./tools/h5diff/testfiles/compounds_array_vlen2.h5
./tools/h5diff/testfiles/non_comparables1.h5
./tools/h5diff/testfiles/non_comparables2.h5
+./tools/h5diff/testfiles/tmptest2.he5
+./tools/h5diff/testfiles/tmpSingleSiteBethe.reference.h5
+./tools/h5diff/testfiles/h5diff_tmp1.txt
+./tools/h5diff/testfiles/tmptest.he5
+./tools/h5diff/testfiles/h5diff_tmp2.txt
+./tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5
#test files for h5repack
./tools/h5repack/testfiles/h5repack_attr.h5
diff --git a/Makefile.in b/Makefile.in
index ae119c9..d254df5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -338,7 +338,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/README.txt b/README.txt
index dc8c529..6e879a4 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.176-swmr0 currently under development
+HDF5 version 1.9.178-swmr0 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/bin/release b/bin/release
index be8eb14..fd04279 100755
--- a/bin/release
+++ b/bin/release
@@ -53,9 +53,9 @@ for compressing the resulting tar archive (if none are given then
"tar md5" is assumed):
tar -- use tar and don't do any compressing.
- compress -- use compress and append ".Z" to the output name.
gzip -- use gzip with "-9" and append ".gz" to the output name.
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
+ zip -- convert all text files to DOS style and form a zip file for Windows use.
md5 -- produce a md5 checksum in addition to the archive.
doc -- produce the latest doc tree in addition to the archive.
@@ -68,7 +68,7 @@ Examples:
$ release gzip
releases/hdf5-1.0.38.tar.gz
- $ release -d /tmp tar compress gzip bzip2 md5
+ $ release -d /tmp tar gzip zip md5
/tmp/hdf5-1.0.38.tar
/tmp/hdf5-1.0.38.tar.Z
/tmp/hdf5-1.0.38.tar.gz
@@ -79,6 +79,73 @@ EOF
}
+# Function name: tar2zip
+# Convert the release tarball to a Windows zipball.
+#
+# Programmer: Albert Cheng
+# Creation date: 2014-04-23
+#
+# Modifications
+#
+# Steps:
+# 1. untar the tarball in a temporay directory;
+# Note: do this in a temporary directory to avoid changing
+# the original source directory which maybe around.
+# 2. convert all its text files to DOS (LF-CR) style;
+# 3. form a zip file which is usable by Windows users.
+#
+# Parameters:
+# $1 version
+# $2 release tarball
+# $3 output zipball file name
+#
+# Returns 0 if successful; 1 otherwise
+#
+tar2zip()
+{
+ if [ $# -ne 3 ]; then
+ echo "usage: tar2zip <tarfilename> <zipfilename>"
+ return 1
+ fi
+ tmpdir=/tmp/tmpdir$$
+ mkdir -p $tmpdir
+ version=$1
+ tarfile=$2
+ zipfile=$3
+
+ # step 1: untar tarball in tmpdir
+ (cd $tmpdir; tar xf -) < $tarfile
+ # sanity check
+ if [ ! -d $tmpdir/$version ]; then
+ echo "untar did not create $tmp/$version source dir"
+ # cleanup
+ rm -rf $tmpdir
+ return 1
+ fi
+ # step 2: convert text files
+ # There maybe a simpler way to do this.
+ # options used in unix2dos:
+ # -k Keep the date stamp
+ # -q quiet mode
+ # grep redirect output to /dev/null because -q or -s are not portable.
+ find $tmpdir/$version | \
+ while read inf; do \
+ if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
+ unix2dos -q -k $inf; \
+ fi\
+ done
+ # step 3: make zipball
+ # -9 maximum compression
+ # -y Store symbolic links as such in the zip archive
+ # -r recursive
+ # -q quiet
+ (cd $tmpdir; zip -9 -y -r -q $version.zip $version)
+ mv $tmpdir/$version.zip $zipfile
+
+ # cleanup
+ rm -rf $tmpdir
+}
+
# This command must be run at the top level of the hdf5 source directory.
# Verify this requirement.
if [ ! \( -f configure -a -f bin/release \) ]; then
@@ -225,10 +292,6 @@ for comp in $methods; do
tar)
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
;;
- compress)
- test "$verbose" && echo " Running compress..." 1>&2
- compress -c <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.Z
- ;;
gzip)
test "$verbose" && echo " Running gzip..." 1>&2
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
@@ -237,6 +300,10 @@ for comp in $methods; do
test "$verbose" && echo " Running bzip2..." 1>&2
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
;;
+ zip)
+ test "$verbose" && echo " Creating zip ball..." 1>&2
+ tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
+ ;;
md5)
test "$verbose" && echo " Creating checksum..." 1>&2
(cd $tmpdir; md5sum $HDF5_VERS.tar ) > $DEST/$HDF5_VERS.tar.md5
@@ -255,6 +322,10 @@ for comp in $methods; do
(cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
;;
+ *)
+ echo "***Error*** Unknown method $comp"
+ exit 1
+ ;;
esac
done
diff --git a/bin/snapshot b/bin/snapshot
index bb02595..b4adf5e 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -68,7 +68,7 @@ ZLIB_default=
ZLIB=$ZLIB_default
# What compression methods to use? (md5 does checksum).
-METHODS="gzip bzip2 md5 doc"
+METHODS="gzip zip bzip2 md5 doc"
# Use User's MAKE if set. Else use generic make.
MAKE=${MAKE:-make}
diff --git a/c++/Makefile.in b/c++/Makefile.in
index 3ee43eb..c56cfc4 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -498,7 +498,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am
index 9e616f7..5bb8d59 100644
--- a/c++/examples/Makefile.am
+++ b/c++/examples/Makefile.am
@@ -21,6 +21,8 @@
include $(top_srcdir)/config/commence.am
+INSTALL_SCRIPT_FILES = run-c++-ex.sh
+
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \
@@ -28,6 +30,7 @@ EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \
h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \
h5tutr_subset
TEST_SCRIPT=testh5c++.sh
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# These are the example files to be installed
INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
@@ -35,7 +38,6 @@ INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \
h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \
h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp
-INSTALL_SCRIPT_FILES = run-c++-ex.sh
# Some of the examples depend on files created by running other examples
readdata.chkexe_: create.chkexe_
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index d7a39fe..273ab52 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -446,7 +446,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -613,6 +612,7 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
+INSTALL_SCRIPT_FILES = run-c++-ex.sh
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
@@ -622,6 +622,7 @@ EXAMPLE_PROG = create readdata writedata compound extend_ds chunks h5group \
h5tutr_subset
TEST_SCRIPT = testh5c++.sh
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# These are the example files to be installed
INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
@@ -630,7 +631,6 @@ INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \
h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp
-INSTALL_SCRIPT_FILES = run-c++-ex.sh
# Tell conclude.am that these are C++ tests.
CXX_API = yes
@@ -1101,27 +1101,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 9554f95..bdd0ac0 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -327,7 +327,7 @@ ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
{
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
-
+ // Return length of the name
return(name_size);
}
@@ -357,7 +357,7 @@ H5std_string Attribute::getName() const
{
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
- // If attribute's name exists, calls C routine again to get it
+ // Attribute's name exists, retrieve it
else if (name_size > 0)
{
char* name_C = new char[name_size+1]; // temporary C-string
@@ -379,6 +379,27 @@ H5std_string Attribute::getName() const
//--------------------------------------------------------------------------
// Function: Attribute::getName
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function in that it takes an integer
+/// specifying a desired length to be retrieved of the name.
+///\return Name (or part of name) of the attribute
+///\param len - IN: Desired length of the name
+///\exception H5::AttributeIException
+// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Mar 2014 - BMR
+// Revised to use the new getName() below
+//--------------------------------------------------------------------------
+H5std_string Attribute::getName(size_t len) const
+{
+ H5std_string attr_name;
+ ssize_t name_size = getName(attr_name, len);
+ return(attr_name);
+ // let caller catch exception if any
+}
+
+//--------------------------------------------------------------------------
+// Function: Attribute::getName
///\brief Gets the name of this attribute, returning its length.
///\param attr_name - OUT: Buffer for the name string as \a H5std_string
///\param len - IN: Desired length of the name, default to 0
@@ -391,7 +412,8 @@ H5std_string Attribute::getName() const
// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Mar 2014 - BMR
-// Revised to allow buf_size to be skipped
+// Added to replace getName(size_t, H5std_string&) so that it'll
+// allow the argument "len" to be skipped.
//--------------------------------------------------------------------------
ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
{
@@ -425,6 +447,24 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
}
//--------------------------------------------------------------------------
+// Function: Attribute::getName
+///\brief This function is replaced by the previous function, which
+/// provides more convenient prototype. It will be removed
+/// in future release.
+///\param len - IN: Desired length of the name
+///\param attr_name - OUT: Buffer for the name string
+///\return Actual length of the attribute name
+///\exception H5::AttributeIException
+// Programmer Binh-Minh Ribler - Nov, 2001
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+//--------------------------------------------------------------------------
+ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
+{
+ return (getName(attr_name, len));
+}
+
+//--------------------------------------------------------------------------
// Function: Attribute::getStorageSize
///\brief Returns the amount of storage size required for this attribute.
///\return Size of the storage or 0, for no data
@@ -566,6 +606,7 @@ void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg
HDfree(strg_C);
}
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Attribute::p_setId
///\brief Sets the identifier of this object to a new value.
@@ -590,6 +631,7 @@ void Attribute::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Attribute::close
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index 8332632..f57b922 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -39,8 +39,12 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
// Gets the name of this attribute.
ssize_t getName(char* attr_name, size_t buf_size = 0) const;
- ssize_t getName(H5std_string& attr_name, size_t buf_size = 0) const;
+ H5std_string getName(size_t len) const;
H5std_string getName() const;
+ ssize_t getName(H5std_string& attr_name, size_t len = 0) const;
+ // The overloaded function below is replaced by the one above and it
+ // is kept for backward compatibility purpose.
+ ssize_t getName( size_t buf_size, H5std_string& attr_name ) const;
// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const;
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index fc8b08d..d296db4 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -467,9 +467,9 @@ H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
///\param child - IN: File to mount
///\param plist - IN: Property list to use
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2014 (original 2000)
//--------------------------------------------------------------------------
-void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
+void CommonFG::mount(const char* name, const H5File& child, const PropList& plist ) const
{
// Obtain identifiers for C API
hid_t plist_id = plist.getId();
@@ -485,14 +485,41 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
//--------------------------------------------------------------------------
// Function: CommonFG::mount
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\param name - IN: Name of the group
+///\param child - IN: File to mount
+///\param plist - IN: Property list to use
+///\exception H5::FileIException or H5::GroupIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+void CommonFG::mount(const char* name, H5File& child, PropList& plist) const
+{
+ mount(name, (const H5File)child, (const PropList)plist);
+}
+
+//--------------------------------------------------------------------------
+// Function: CommonFG::mount
///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function in that it takes an
-/// \c H5std_string for \a name.
+/// It takes an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const
+void CommonFG::mount(const H5std_string& name, const H5File& child, const PropList& plist) const
{
- mount( name.c_str(), child, plist );
+ mount(name.c_str(), child, plist);
+}
+
+//--------------------------------------------------------------------------
+// Function: CommonFG::mount
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+// Programmer Binh-Minh Ribler - 2014
+//--------------------------------------------------------------------------
+void CommonFG::mount(const H5std_string& name, H5File& child, PropList& plist) const
+{
+ mount(name.c_str(), (const H5File)child, (const PropList)plist);
}
//--------------------------------------------------------------------------
@@ -939,7 +966,125 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size)
return (name_len);
}
+//--------------------------------------------------------------------------
+// Function: CommonFG::childObjType
+///\brief Returns the type of an object in this file/group, given the
+/// object's name.
+///\param objname - IN: Name of the object
+///\return Object type, which can have the following values for group,
+/// dataset, and named datatype
+/// \li \c H5O_TYPE_GROUP
+/// \li \c H5O_TYPE_DATASET
+/// \li \c H5O_TYPE_NAMED_DATATYPE
+/// Refer to the C API documentation for more details:
+/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
+///\exception H5::FileIException or H5::GroupIException
+/// Exception will be thrown when:
+/// - an error returned by the C API
+/// - object type is not one of the valid values above
+// Programmer Binh-Minh Ribler - April, 2014
+//--------------------------------------------------------------------------
+H5O_type_t CommonFG::childObjType(const char* objname) const
+{
+ H5O_info_t objinfo;
+ H5O_type_t objtype = H5O_TYPE_UNKNOWN;
+
+ // Use C API to get information of the object
+ herr_t ret_value = H5Oget_info_by_name(getLocId(), objname, &objinfo, H5P_DEFAULT);
+
+ // Throw exception if C API returns failure
+ if (ret_value < 0)
+ throwException("childObjType", "H5Oget_info_by_name failed");
+ // Return a valid type or throw an exception for unknown type
+ else
+ switch (objinfo.type)
+ {
+ case H5O_TYPE_GROUP:
+ case H5O_TYPE_DATASET:
+ case H5O_TYPE_NAMED_DATATYPE:
+ objtype = objinfo.type;
+ break;
+ default:
+ throwException("childObjType", "Unknown type of object");
+ }
+ return(objtype);
+}
+
+//--------------------------------------------------------------------------
+// Function: CommonFG::childObjType
+///\brief This is an overloaded member function, provided for convenience.
+/// It takes an \a H5std_string for the object's name.
+///\brief Returns the type of an object in this group, given the
+/// object's name.
+///\param objname - IN: Name of the object (H5std_string&)
+///\exception H5::FileIException or H5::GroupIException
+// Programmer Binh-Minh Ribler - April, 2014
+//--------------------------------------------------------------------------
+H5O_type_t CommonFG::childObjType(const H5std_string& objname) const
+{
+ // Use overloaded function
+ H5O_type_t objtype = childObjType(objname.c_str());
+ return(objtype);
+}
+
+//--------------------------------------------------------------------------
+// Function: CommonFG::childObjType
+///\brief Returns the type of an object in this file/group, given the
+/// object's index and its type and order.
+///\param index - IN: Position of the object
+///\param index_type - IN: Type of the index, default to H5_INDEX_NAME
+///\param order - IN: Traversing order, default to H5_ITER_INC
+///\param objname - IN: Name of the object, default to "."
+///\return Object type, which can have the following values for group,
+/// dataset, and named datatype
+/// \li \c H5O_TYPE_GROUP
+/// \li \c H5O_TYPE_DATASET
+/// \li \c H5O_TYPE_NAMED_DATATYPE
+/// Refer to the C API documentation for more details:
+/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
+///\exception H5::FileIException or H5::GroupIException
+/// Exception will be thrown when:
+/// - an error returned by the C API
+/// - object type is not one of the valid values above
+// Developer's Notes:
+// - this overload uses H5Oget_info_by_idx instead of H5Oget_info_by_name
+// like the previous childObjType()
+// - index is the required argument so, first
+// - objname is last because it's more likely the location is already
+// fully specified
+// - Leave property list out for now because C API is not using it, it
+// can be added later when needed.
+// Programmer Binh-Minh Ribler - April, 2014
+//--------------------------------------------------------------------------
+H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, const char* objname) const
+{
+ herr_t ret_value;
+ H5O_info_t objinfo;
+ H5O_type_t objtype = H5O_TYPE_UNKNOWN;
+
+ // Use C API to get information of the object
+ ret_value = H5Oget_info_by_idx(getLocId(), objname, index_type, order, index, &objinfo, H5P_DEFAULT);
+
+ // Throw exception if C API returns failure
+ if (ret_value < 0)
+ throwException("childObjType", "H5Oget_info_by_idx failed");
+ // Return a valid type or throw an exception for unknown type
+ else
+ switch (objinfo.type)
+ {
+ case H5O_TYPE_GROUP:
+ case H5O_TYPE_DATASET:
+ case H5O_TYPE_NAMED_DATATYPE:
+ objtype = objinfo.type;
+ break;
+ default:
+ throwException("childObjType", "Unknown type of object");
+ }
+ return(objtype);
+}
+
#ifndef H5_NO_DEPRECATED_SYMBOLS
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: CommonFG::getObjTypeByIdx
///\brief Returns the type of an object in this group, given the
@@ -964,7 +1109,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
/// It differs from the above function because it also provides
/// the returned object type in text (char*)
///\param idx - IN: Transient index of the object
-///\param type_name - IN: Object type in text
+///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - May, 2010
@@ -990,7 +1135,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
/// It differs from the above function because it also provides
/// the returned object type in text (H5std_string&)
///\param idx - IN: Transient index of the object
-///\param type_name - IN: Object type in text
+///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
@@ -1010,6 +1155,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
}
return (obj_type);
}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index 2f10e8e..5c8a142 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -27,7 +27,7 @@ class ArrayType;
class VarLenType;
/*! \class CommonFG
- \brief \i CommonFG is an abstract base class of H5File and H5Group.
+ \brief \a CommonFG is an abstract base class of H5File and H5Group.
It provides common operations of H5File and H5Group.
*/
@@ -64,6 +64,12 @@ class H5_DLLCPP CommonFG {
ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
+ // Retrieves the type of an object in this file or group, given the
+ // object's name
+ H5O_type_t childObjType(const H5std_string& objname) const;
+ H5O_type_t childObjType(const char* objname) const;
+ H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
+
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Returns the type of an object in this group, given the
// object's index.
@@ -94,8 +100,10 @@ class H5_DLLCPP CommonFG {
void unlink(const H5std_string& name) const;
// Mounts the file 'child' onto this location.
- void mount(const char* name, H5File& child, PropList& plist) const;
- void mount(const H5std_string& name, H5File& child, PropList& plist) const;
+ void mount(const char* name, const H5File& child, const PropList& plist) const;
+ void mount(const char* name, H5File& child, PropList& plist) const; // backward compatibility
+ void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
+ void mount(const H5std_string& name, H5File& child, PropList& plist) const; // backward compatibility
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 699f982..c34769e 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -85,6 +85,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
/// object that the dataset is located within.
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::DataSetIException
///\par Description
/// \c loc can be DataSet, Group, H5File, or named DataType, that
@@ -106,6 +107,7 @@ DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, co
///\param attr - IN: Specifying location where the referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
@@ -294,7 +296,7 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
+hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) const
{
// Obtain identifiers for C API
hid_t type_id = type.getId();
@@ -311,6 +313,20 @@ hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
}
//--------------------------------------------------------------------------
+// Function: DataSet::getVlenBufSize
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\return Amount of storage
+///\exception H5::DataSetIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
+{
+ return(getVlenBufSize((const DataType)type, (const DataSpace)space));
+}
+
+//--------------------------------------------------------------------------
// Function: DataSet::vlenReclaim
///\brief Reclaims VL datatype memory buffers.
///\param type - IN: Datatype, which is the datatype stored in the buffer
@@ -575,9 +591,11 @@ void DataSet::extend( const hsize_t* size ) const
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2014
+// Modification
+// Used the non-const version.
//--------------------------------------------------------------------------
-void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
+void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const
{
hid_t fill_type_id = fill_type.getId();
hid_t buf_type_id = buf_type.getId();
@@ -591,16 +609,32 @@ void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataT
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
-///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function in that it only takes the
-/// the last three arguments.
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\param fill - IN: Pointer to fill value to use - default NULL
+///\param fill_type - IN: Datatype of the fill value
///\param buf - IN/OUT: Memory buffer to fill selection within
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
+void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
+{
+ fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space);
+}
+
+//--------------------------------------------------------------------------
+// Function: DataSet::fillMemBuf
+///\brief Fills a selection in memory with 0.
+///\param buf - IN/OUT: Memory buffer to fill selection within
+///\param buf_type - IN: Datatype of the elements in buffer
+///\param space - IN: Dataspace describing memory buffer & containing selection to use
+///\exception H5::DataSetIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const
{
hid_t buf_type_id = buf_type.getId();
hid_t space_id = space.getId();
@@ -612,6 +646,22 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
}
//--------------------------------------------------------------------------
+// Function: DataSet::fillMemBuf
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\param buf - IN/OUT: Memory buffer to fill selection within
+///\param buf_type - IN: Datatype of the elements in buffer
+///\param space - IN: Dataspace describing memory buffer & containing selection to use
+///\exception H5::DataSetIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
+{
+ fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
+}
+
+//--------------------------------------------------------------------------
// Function: DataSet::getId
///\brief Get the id of this dataset.
///\return DataSet identifier
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 92c651c..529466a 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -37,9 +37,12 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
void extend( const hsize_t* size ) const;
// Fills a selection in memory with a value
- void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
+ void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const;
+ void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
+
// Fills a selection in memory with zero
- void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
+ void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const;
+ void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
@@ -60,7 +63,8 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
virtual size_t getInMemDataSize() const;
// Returns the number of bytes required to store VL data.
- hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
+ hsize_t getVlenBufSize(const DataType& type, const DataSpace& space ) const;
+ hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // kept for backward compatibility
// Reclaims VL datatype memory buffers.
static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 059c812..6ad8c8d 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -279,7 +279,7 @@ H5S_class_t DataSpace::getSimpleExtentType () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::extentCopy ( DataSpace& dest_space ) const
+void DataSpace::extentCopy (const DataSpace& dest_space) const
{
hid_t dest_space_id = dest_space.getId();
herr_t ret_value = H5Sextent_copy( dest_space_id, id );
@@ -290,6 +290,20 @@ void DataSpace::extentCopy ( DataSpace& dest_space ) const
}
//--------------------------------------------------------------------------
+// Function: DataSpace::extentCopy
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const. This wrapper will be removed in future release.
+///\param dest_space - IN: Dataspace to copy from
+///\exception H5::DataSpaceIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+void DataSpace::extentCopy( DataSpace& dest_space ) const
+{
+ extentCopy((const DataSpace)dest_space);
+}
+
+//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple
///\brief Sets or resets the size of an existing dataspace.
///\param rank - IN: Rank of the dataspace
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 05ee70c..9efecdf 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -43,7 +43,9 @@ class H5_DLLCPP DataSpace : public IdComponent {
void copy(const DataSpace& like_space);
// Copies the extent of this dataspace.
- void extentCopy( DataSpace& dest_space ) const;
+ void extentCopy(const DataSpace& dest_space) const;
+ // Kept for backward compatibility only.
+ void extentCopy(DataSpace& dest_space) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hsize_t* start, hsize_t* end ) const;
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 4c3cc62..afc5678 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -98,6 +98,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
///\param loc - IN: Location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
@@ -116,6 +117,7 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type,
///\param attr - IN: Specifying location where the referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
@@ -264,6 +266,21 @@ void DataType::p_commit(hid_t loc_id, const char* name)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
+void DataType::commit(const H5Location& loc, const char* name)
+{
+ p_commit(loc.getId(), name);
+}
+
+//--------------------------------------------------------------------------
+// Function: DataType::commit
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\param loc - IN: A location (file, dataset, datatype, or group)
+///\param name - IN: Name of the datatype
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Jan, 2007
+//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const char* name)
{
p_commit(loc.getId(), name);
@@ -276,6 +293,21 @@ void DataType::commit(H5Location& loc, const char* name)
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
+void DataType::commit(const H5Location& loc, const H5std_string& name)
+{
+ p_commit(loc.getId(), name.c_str());
+}
+
+//--------------------------------------------------------------------------
+// Function: DataType::commit
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\param loc - IN: A location (file, dataset, datatype, or group)
+///\param name - IN: Name of the datatype
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Jan, 2007
+//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const H5std_string& name)
{
p_commit(loc.getId(), name.c_str());
@@ -333,7 +365,7 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
///\param buf - IN/OUT: Array containing pre- and post-conversion
/// values
///\param background - IN: Optional backgroud buffer
-///\param plist - IN: Dataset transfer property list
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\return Pointer to a suitable conversion function
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index c5c8a7d..064bfe1 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -54,6 +54,10 @@ class H5_DLLCPP DataType : public H5Object {
// Commits a transient datatype to a file; this datatype becomes
// a named datatype which can be accessed from the location.
+ void commit(const H5Location& loc, const char* name);
+ void commit(const H5Location& loc, const H5std_string& name);
+ // These two overloaded functions are kept for backward compatibility
+ // only; they missed the const.
void commit(H5Location& loc, const char* name);
void commit(H5Location& loc, const H5std_string& name);
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index ece435c..2b124ee 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -349,13 +349,16 @@ int DSetCreatPropList::getNfilters() const
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
/// of values defined by the filter
///\param cd_values - OUT: Array to hold the data; allocated by the user
-///\param namelen - OUT: Length of \a name
+///\param namelen - IN: Length of \a name
///\param name - OUT: Name of the filter
///\param filter_config - OUT: Flags indicating whether filter can encode/decode
///\return Filter id
///\exception H5::PropListIException
///\par Description
/// Failure occurs when \a filter_number is out of range.
+// Note: the first argument was mistakenly typed as int instead
+// of unsigned int, but for backward compatibility, it cannot be
+// changed. -BMR (2014/04/15)
//--------------------------------------------------------------------------
H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
@@ -635,8 +638,8 @@ int DSetCreatPropList::getExternalCount() const
///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
/// returned by getExternalCount()
///\param name_size - IN: Maximum length of \a name
-///\param name - IN: Name of the external file
-///\param offset - IN: Location to return an offset value
+///\param name - OUT: Name of the external file
+///\param offset - OUT: Location to return an offset value
///\param size - OUT: Location to return the size of the external file data
///\exception H5::PropListIException
///\par Description
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index c58eeda..1f4a638 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -229,7 +229,7 @@ void DSetMemXferPropList::setDataTransform(const H5std_string& expression) const
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getDataTransform
///\brief Sets data transform expression.
-///\param expression - OUT: buffer for data transform expression (char*)
+///\param exp - OUT: buffer for data transform expression (char*)
///\param buf_size - IN: size of buffer for expression, including the
/// null terminator
///\exception H5::PropListIException
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 8149b8e..f93676e 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -54,8 +54,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
// Gets data transform expression.
ssize_t getDataTransform(char* exp, size_t buf_size=0) const;
H5std_string getDataTransform() const;
- //H5std_string getDataTransform(const size_t buf_size=0) const;
- // this will collide with the first one when exp=NULL
// Sets the dataset transfer property list status to TRUE or FALSE.
void setPreserve( bool status ) const;
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index 492abed..5e7ccd4 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -295,16 +295,33 @@ const char* Exception::getCFuncName() const
}
//--------------------------------------------------------------------------
-// Function: Exception::printError
+// Function: Exception::printErrorStack (static)
///\brief Prints the error stack in a default manner.
-///\param stream - IN: File pointer
+///\param stream - IN: File pointer, default to stderr
+///\param err_stack - IN: Error stack ID, default to H5E_DEFAULT(0)
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Exception::printError( FILE* stream ) const
+void Exception::printErrorStack(FILE* stream, hid_t err_stack)
{
- herr_t ret_value = H5Eprint2( H5E_DEFAULT, stream ); // print to stderr
+ herr_t ret_value = H5Eprint2(err_stack, stream);
if( ret_value < 0 )
- throw Exception( "Exception::printError", "H5Eprint failed" );
+ throw Exception( "Printing error stack", "H5Eprint2 failed" );
+}
+
+//--------------------------------------------------------------------------
+// Function: Exception::printError
+///\brief Prints the error stack in a default manner. This member
+/// function is replaced by the static function printErrorStack
+/// and will be removed from the next major release.
+///\param stream - IN: File pointer
+// Programmer Binh-Minh Ribler - 2000
+// Description:
+// This function can be removed in next major release.
+// -BMR, 2014/04/24
+//--------------------------------------------------------------------------
+void Exception::printError(FILE* stream) const
+{
+ Exception::printErrorStack(stream, H5E_DEFAULT);
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 7d71022..ce35fde 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -72,7 +72,9 @@ class H5_DLLCPP Exception {
H5E_walk2_t func, void* client_data);
// Prints the error stack in a default manner.
- virtual void printError( FILE* stream = NULL ) const;
+ static void printErrorStack(FILE* stream = stderr,
+ hid_t err_stack = H5E_DEFAULT); // Static
+ void printError(FILE* stream = NULL) const;
// Default constructor
Exception();
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index 4fb3836..5696742 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -264,7 +264,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
+void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
hid_t meta_pid = meta_plist.getId();
hid_t raw_pid = raw_plist.getId();
@@ -277,19 +277,54 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
+///\param meta_plist - IN: File access plist for the metadata file
+///\param raw_plist - IN: File access plist for the raw data file
+///\param meta_ext - IN: Metadata filename extension as \c char*
+///\param raw_ext - IN: Raw data filename extension as \c char*
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - April, 2004
+// Note: Retiring April, 2014
+//--------------------------------------------------------------------------
+void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
+{
+ setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext, raw_ext);
+}
+
+//--------------------------------------------------------------------------
+// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function only in what arguments it
-/// accepts.
+/// It takes character arguments as \c H5std_string.
+///\param meta_plist - IN: File access plist for the metadata file
+///\param raw_plist - IN: File access plist for the raw data file
+///\param meta_ext - IN: Metadata filename extension as \c H5std_string
+///\param raw_ext - IN: Raw data filename extension as \c H5std_string
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
+{
+ setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
+}
+
+//--------------------------------------------------------------------------
+// Function: FileAccPropList::setSplit
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const's. This wrapper will be removed in future release.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c string
///\param raw_ext - IN: Raw data filename extension as \c string
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
+// Note: Retiring April, 2014
//--------------------------------------------------------------------------
-void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
+void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
- setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
+ setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
// Stream Virtual File Driver had been removed from the main library.
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 5dd108f..861ac4c 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -62,10 +62,21 @@ class H5_DLLCPP FileAccPropList : public PropList {
FileAccPropList getFamily(hsize_t& memb_size) const;
// Emulates the old split file driver,
- void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
- const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
- void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
- const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
+ void setSplit(const FileAccPropList& meta_plist,
+ const FileAccPropList& raw_plist,
+ const char* meta_ext = ".meta",
+ const char* raw_ext = ".raw" ) const;
+ void setSplit(const FileAccPropList& meta_plist,
+ const FileAccPropList& raw_plist,
+ const H5std_string& meta_ext = ".meta",
+ const H5std_string& raw_ext = ".raw") const;
+ // These two overloaded functions are kept for backward compatibility
+ // only; they missed the const's and will be removed in future release.
+ void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
+ const char* meta_ext=".meta", const char* raw_ext=".raw") const;
+ void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
+ const H5std_string& meta_ext=".meta",
+ const H5std_string& raw_ext=".raw") const;
// Sets the maximum size of the data sieve buffer.
void setSieveBufSize(size_t bufsize) const;
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 615c1cb..e4ac4a1 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -442,7 +442,7 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
/// closed and reopened or opened during a subsequent session.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
+void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
{
hid_t fapl_id = fapl.getId();
herr_t ret_value = H5Fget_vfd_handle(id, fapl_id, file_handle);
@@ -454,6 +454,23 @@ void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
+///\brief This is an overloaded member function, kept for backward
+/// compatibility. It differs from the above function in that it
+/// misses const. This wrapper will be removed in future release.
+///\param fapl - File access property list
+///\param file_handle - Pointer to the file handle being used by
+/// the low-level virtual file driver
+///\exception H5::FileIException
+// Programmer Binh-Minh Ribler - May 2004
+// Note: Retiring April, 2014
+//--------------------------------------------------------------------------
+void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
+{
+ getVFDHandle((const FileAccPropList)fapl, file_handle);
+}
+
+//--------------------------------------------------------------------------
+// Function: H5File::getVFDHandle
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
@@ -493,19 +510,6 @@ hsize_t H5File::getFileSize() const
}
//--------------------------------------------------------------------------
-// Function: H5File::getLocId
-// Purpose: Get the id of this file
-// Description
-// This function is a redefinition of CommonFG::getLocId. It
-// is used by CommonFG member functions to get the file id.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-hid_t H5File::getLocId() const
-{
- return( getId() );
-}
-
-//--------------------------------------------------------------------------
// Function: H5File::getId
///\brief Get the id of this file
///\return File identifier
@@ -524,6 +528,19 @@ hid_t H5File::getId() const
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
+// Function: H5File::getLocId
+// Purpose: Get the id of this file
+// Description
+// This function is a redefinition of CommonFG::getLocId. It
+// is used by CommonFG member functions to get the file id.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+hid_t H5File::getLocId() const
+{
+ return( getId() );
+}
+
+//--------------------------------------------------------------------------
// Function: H5File::reopen
// Purpose: Reopens this file.
// Exception H5::FileIException
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 694d688..0ef85b5 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -67,8 +67,9 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
// Returns the pointer to the file handle of the low-level file driver.
- void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(void **file_handle) const;
+ void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
+ void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // kept for backward compatibility
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 5d5b124..7679315 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -93,6 +93,7 @@ Group::Group(const hid_t existing_id) : H5Object()
///\param loc - IN: Specifying location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
///\par Description
/// \c obj can be DataSet, Group, or named DataType, that
@@ -110,6 +111,7 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const
///\param attr - IN: Specifying location where the referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index cdf4272..99a8dc4 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -130,7 +130,7 @@ int IdComponent::getCounter() const
}
//--------------------------------------------------------------------------
-// Function: hdfObjectType
+// Function: getHDFObjType (static)
///\brief Given an id, returns the type of the object.
///\return a valid HDF object type, which may be one of the following:
/// \li \c H5I_FILE
@@ -155,6 +155,26 @@ H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
}
//--------------------------------------------------------------------------
+// Function: getHDFObjType
+///\brief Returns the type of the object. It is an overloaded function
+/// of the above function.
+///\return a valid HDF object type, which may be one of the following:
+/// \li \c H5I_FILE
+/// \li \c H5I_GROUP
+/// \li \c H5I_DATATYPE
+/// \li \c H5I_DATASPACE
+/// \li \c H5I_DATASET
+/// \li \c H5I_ATTR
+/// \li or \c H5I_BADID, if no valid type can be determined or the
+/// input object id is invalid.
+// Programmer Binh-Minh Ribler - Mar, 2014
+//--------------------------------------------------------------------------
+H5I_type_t IdComponent::getHDFObjType() const
+{
+ return(getHDFObjType(getId()));
+}
+
+//--------------------------------------------------------------------------
// Function: IdComponent::operator=
///\brief Assignment operator.
///\param rhs - IN: Reference to the existing object
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index ca9352d..3208a39 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -46,6 +46,9 @@ class H5_DLLCPP IdComponent {
// Returns an HDF5 object type, given the object id.
static H5I_type_t getHDFObjType(const hid_t obj_id);
+ // Returns an HDF5 object type of this object.
+ H5I_type_t getHDFObjType() const;
+
// Assignment operator.
IdComponent& operator=( const IdComponent& rhs );
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index acd5033..9d3d7bf 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -488,7 +488,7 @@ void H5Location::removeComment(const H5std_string& name) const
/// will be truncated to accommodate the null terminator.
// Programmer Binh-Minh Ribler - Mar 2014
//--------------------------------------------------------------------------
-ssize_t H5Location::getComment(const char* name, const size_t buf_size, char* comment) const
+ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment) const
{
// H5Oget_comment_by_name will get buf_size chars of the comment including
// the null terminator
@@ -502,7 +502,7 @@ ssize_t H5Location::getComment(const char* name, const size_t buf_size, char* co
}
// If the comment is longer than the provided buffer size, the C library
// will not null terminate it
- if (comment_len >= buf_size)
+ if ((size_t)comment_len >= buf_size)
comment[buf_size-1] = '\0';
// Return the actual comment length, which might be different from buf_size
@@ -519,7 +519,7 @@ ssize_t H5Location::getComment(const char* name, const size_t buf_size, char* co
///\exception H5::LocationException
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
-H5std_string H5Location::getComment(const char* name, const size_t buf_size) const
+H5std_string H5Location::getComment(const char* name, size_t buf_size) const
{
// Initialize string to "", so that if there is no comment, the returned
// string will be empty
@@ -549,6 +549,10 @@ H5std_string H5Location::getComment(const char* name, const size_t buf_size) con
// Used overloaded function
ssize_t comment_len = getComment(name, tmp_len+1, comment_C);
+ if (comment_len < 0)
+ {
+ throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
+ }
// Convert the C comment to return
comment = comment_C;
@@ -568,7 +572,7 @@ H5std_string H5Location::getComment(const char* name, const size_t buf_size) con
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
-H5std_string H5Location::getComment(const H5std_string& name, const size_t buf_size) const
+H5std_string H5Location::getComment(const H5std_string& name, size_t buf_size) const
{
return(getComment(name.c_str(), buf_size));
}
@@ -696,6 +700,8 @@ void H5Location::reference(void* ref, const H5std_string& name, H5R_type_t ref_t
// referenced object
// ref - IN: Reference pointer
// ref_type - IN: Reference type
+// plist - IN: Property list - default to PropList::DEFAULT
+// from_func - IN: Name of the calling function
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
@@ -726,6 +732,7 @@ hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_ty
///\param loc - IN: Location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
@@ -743,6 +750,7 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t
///\param attr - IN: Attribute specifying the location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
+///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
@@ -860,11 +868,14 @@ H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
{
H5O_type_t obj_type = H5O_TYPE_UNKNOWN;
herr_t ret_value = H5Rget_obj_type2(getId(), ref_type, ref, &obj_type);
-
- if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES)
+ if (ret_value < 0)
{
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 failed");
}
+ if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES)
+ {
+ throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 returned invalid type");
+ }
return(obj_type);
}
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index 05acc7c..e015825 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -104,9 +104,9 @@ class H5_DLLCPP H5Location : public IdComponent {
void setComment(const H5std_string& comment) const;
// Retrieves comment for the HDF5 object specified by its name.
- ssize_t getComment(const char* name, const size_t buf_size, char* comment) const;
- H5std_string getComment(const char* name, const size_t buf_size=0) const;
- H5std_string getComment(const H5std_string& name, const size_t buf_size=0) const;
+ ssize_t getComment(const char* name, size_t buf_size, char* comment) const;
+ H5std_string getComment(const char* name, size_t buf_size=0) const;
+ H5std_string getComment(const H5std_string& name, size_t buf_size=0) const;
// Removes the comment for the HDF5 object specified by its name.
void removeComment(const char* name) const;
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 1d96f2e..94b03ab 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -31,6 +31,7 @@
#include "H5File.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
+#include "H5private.h" // for HDmemset
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -53,6 +54,117 @@ H5Object::H5Object() : H5Location() {}
H5Object::H5Object( const hid_t object_id ) : H5Location( object_id ) {}
//--------------------------------------------------------------------------
+// Function: getObjName
+///\brief Given an id, returns the type of the object.
+///\return The name of the object
+// Programmer Binh-Minh Ribler - Mar, 2014
+//--------------------------------------------------------------------------
+ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const
+{
+ // H5Iget_name will get buf_size-1 chars of the name to null terminate it
+ ssize_t name_size = H5Iget_name(getId(), obj_name, buf_size);
+
+ // If H5Iget_name returns a negative value, raise an exception
+ if (name_size < 0)
+ {
+ throw Exception(inMemFunc("getObjName"), "H5Iget_name failed");
+ }
+ else if (name_size == 0)
+ {
+ throw Exception(inMemFunc("getObjName"), "Object must have a name, but name length is 0");
+ }
+ // Return length of the name
+ return(name_size);
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Object::getObjName
+///\brief Returns the name of this object as an \a H5std_string.
+///\return Name of the object
+///\exception H5::Exception
+// Programmer Binh-Minh Ribler - Mar, 2014
+// Modification
+//--------------------------------------------------------------------------
+H5std_string H5Object::getObjName() const
+{
+ H5std_string obj_name(""); // object name to return
+
+ // Preliminary call to get the size of the object name
+ ssize_t name_size = H5Iget_name(getId(), NULL, (size_t)0);
+
+ // If H5Iget_name failed, throw exception
+ if (name_size < 0)
+ {
+ throw Exception(inMemFunc("getObjName"), "H5Iget_name failed");
+ }
+ else if (name_size == 0)
+ {
+ throw Exception(inMemFunc("getObjName"), "Object must have a name, but name length is 0");
+ }
+ // Object's name exists, retrieve it
+ else if (name_size > 0)
+ {
+ char* name_C = new char[name_size+1]; // temporary C-string
+ HDmemset(name_C, 0, name_size+1); // clear buffer
+
+ // Use overloaded function
+ name_size = getObjName(name_C, name_size+1);
+
+ // Convert the C object name to return
+ obj_name = name_C;
+
+ // Clean up resource
+ delete []name_C;
+ }
+ // Return object's name
+ return(obj_name);
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Object::getObjName
+///\brief Gets the name of this object, returning its length.
+///\param obj_name - OUT: Buffer for the name string as \a H5std_string
+///\param len - IN: Desired length of the name, default to 0
+///\return Actual length of the object name
+///\exception H5::Exception
+///\par Description
+/// This function retrieves the object's name as an std string.
+/// buf_size can specify a specific length or default to 0, in
+/// which case the entire name will be retrieved.
+// Programmer Binh-Minh Ribler - Mar, 2014
+//--------------------------------------------------------------------------
+ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
+{
+ ssize_t name_size = 0;
+
+ // If no length is provided, get the entire object name
+ if (len == 0)
+ {
+ obj_name = getObjName();
+ name_size = obj_name.length();
+ }
+ // If length is provided, get that number of characters in name
+ else
+ {
+ char* name_C = new char[len+1]; // temporary C-string
+ HDmemset(name_C, 0, len+1); // clear buffer
+
+ // Use overloaded function
+ name_size = getObjName(name_C, len+1);
+
+ // Convert the C object name to return
+ obj_name = name_C;
+
+ // Clean up resource
+ delete []name_C;
+ }
+ // Otherwise, keep obj_name intact
+
+ // Return name size
+ return(name_size);
+}
+
+//--------------------------------------------------------------------------
// Function: H5Object copy constructor
///\brief Copy constructor: makes a copy of the original H5Object
/// instance.
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 5c2ef98..5576d13 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -33,7 +33,7 @@
// H5Object is H5File is not an HDF5 object, and renaming H5Object
// to H5Location will risk breaking user applications.
// -BMR
-
+// Apr 2, 2014: Added wrapper getObjName for H5Iget_name
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
@@ -50,6 +50,12 @@ class H5_DLLCPP H5Object : public H5Location {
// Copy constructor: makes copy of an H5Object object.
H5Object(const H5Object& original);
+ // Gets the name of this HDF5 object, i.e., Group, DataSet, or
+ // DataType.
+ ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
+ ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
+ H5std_string getObjName() const;
+
// Noop destructor.
virtual ~H5Object();
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index a8ec0b8..494b169 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -230,18 +230,18 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType NATIVE_UINT_FAST64;
#endif /* H5_SIZEOF_UINT_FAST64_T */
- /*! \brief This dummy function do not inherit from DataType - it will
- throw a DataTypeIException if invoked.
- */
- void commit(H5Location& loc, const H5std_string& name );
- /*! \brief This dummy function do not inherit from DataType - it will
- throw a DataTypeIException if invoked.
- */
- void commit(H5Location& loc, const char* name );
- /*! \brief This dummy function do not inherit from DataType - it will
- throw a DataTypeIException if invoked.
- */
- bool committed();
+ /*! \brief This dummy function do not inherit from DataType - it will
+ throw a DataTypeIException if invoked.
+ */
+ void commit(H5Location& loc, const H5std_string& name );
+ /*! \brief This dummy function do not inherit from DataType - it will
+ throw a DataTypeIException if invoked.
+ */
+ void commit(H5Location& loc, const char* name );
+ /*! \brief This dummy function do not inherit from DataType - it will
+ throw a DataTypeIException if invoked.
+ */
+ bool committed();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am
index 9ff2e66..7c1f497 100644
--- a/c++/src/Makefile.am
+++ b/c++/src/Makefile.am
@@ -47,11 +47,8 @@ libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp H5Library.cpp \
H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp \
H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
-# HDF5 C++ library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-if LT_ADD_LIBHDF5_DEPENDENCY
+# HDF5 C++ library depends on HDF5 Library.
libhdf5_cpp_la_LIBADD=$(LIBHDF5)
-endif
# Public headers
include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index 7344600..6ee76e5 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -146,8 +146,7 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_cpp_la_DEPENDENCIES = \
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@ $(LIBHDF5)
+libhdf5_cpp_la_DEPENDENCIES = $(LIBHDF5)
am_libhdf5_cpp_la_OBJECTS = H5Exception.lo H5IdComponent.lo \
H5Library.lo H5Attribute.lo H5Location.lo H5Object.lo \
H5PropList.lo H5FaccProp.lo H5FcreatProp.lo H5DcreatProp.lo \
@@ -513,7 +512,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -684,7 +682,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
# This is our main target
@@ -704,9 +702,8 @@ libhdf5_cpp_la_SOURCES = H5Exception.cpp H5IdComponent.cpp H5Library.cpp
H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
-# HDF5 C++ library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_cpp_la_LIBADD = $(LIBHDF5)
+# HDF5 C++ library depends on HDF5 Library.
+libhdf5_cpp_la_LIBADD = $(LIBHDF5)
# Public headers
include_HEADERS = H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config
index 1fac954..ea10b04 100644
--- a/c++/src/cpp_doc_config
+++ b/c++/src/cpp_doc_config
@@ -1,234 +1,2351 @@
-# 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.
-
-# Doxyfile 1.4.2
+# Doxyfile 1.8.5
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME =
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = cpplus_RM/
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "HDF5 C++ API"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER = 1.8.13
+
+# 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
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO = ./header_files/hdf_logo.jpg
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = HTML
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-
+# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en,
+# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish,
+# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
+# Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = NO
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = NO
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
HIDE_UNDOC_MEMBERS = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
HIDE_UNDOC_CLASSES = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: NO.
+
SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = NO
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = NO
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= NO
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = YES
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = NO
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
WARN_LOGFILE =
+
#---------------------------------------------------------------------------
-# configuration options related to the input files
+# Configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT =
-FILE_PATTERNS =
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = .
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.idl \
+ *.ddl \
+ *.odl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.cs \
+ *.d \
+ *.php \
+ *.php4 \
+ *.php5 \
+ *.phtml \
+ *.inc \
+ *.m \
+ *.markdown \
+ *.md \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.for \
+ *.tcl \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.as \
+ *.js
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
RECURSIVE = NO
-EXCLUDE =
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE = C:/hdf/C++/src/H5Alltypes.h \
+ C:/hdf/C++/src/H5Classes.h
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
EXAMPLE_PATH = ../examples
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
#---------------------------------------------------------------------------
-# configuration options related to source browsing
+# Configuration options related to source browsing
#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
VERBATIM_HEADERS = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# compiled with the --with-libclang option.
+# The default value is: NO.
+
+# CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+# CLANG_OPTIONS =
+
#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
IGNORE_PREFIX =
+
#---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# Configuration options related to the HTML output
#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
GENERATE_HTML = YES
-HTML_OUTPUT = .
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = HTML
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
HTML_FILE_EXTENSION = .html
-HTML_HEADER = header.html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
HTML_FOOTER =
-HTML_STYLESHEET = RM_stylesheet.css
-HTML_ALIGN_MEMBERS = YES
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = NO
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
+# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
#---------------------------------------------------------------------------
-# configuration options related to the RTF output
+# Configuration options related to the RTF output
#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
RTF_EXTENSIONS_FILE =
+
#---------------------------------------------------------------------------
-# configuration options related to the man page output
+# Configuration options related to the man page output
#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
MAN_LINKS = NO
+
#---------------------------------------------------------------------------
-# configuration options related to the XML output
+# Configuration options related to the XML output
#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
XML_PROGRAMLISTING = YES
+
#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
+# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
GENERATE_AUTOGEN_DEF = NO
+
#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
+# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
PERLMOD_MAKEVAR_PREFIX =
+
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
SKIP_FUNCTION_MACROS = YES
+
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration options related to external references
#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
PERL_PATH = /usr/bin/perl
+
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
diff --git a/c++/src/header_files/hdf_logo.jpg b/c++/src/header_files/hdf_logo.jpg
new file mode 100644
index 0000000..2770aa4
--- /dev/null
+++ b/c++/src/header_files/hdf_logo.jpg
Binary files differ
diff --git a/c++/src/header_files/help.jpg b/c++/src/header_files/help.jpg
new file mode 100644
index 0000000..f30550a
--- /dev/null
+++ b/c++/src/header_files/help.jpg
Binary files differ
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 220d4b1..acb2b7f 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -20,6 +20,7 @@ set (CPP_TEST_SRCS
${HDF5_CPP_TEST_SOURCE_DIR}/tfilter.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/th5s.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tlinks.cpp
+ ${HDF5_CPP_TEST_SOURCE_DIR}/tobject.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/trefer.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/ttypes.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tvlstr.cpp
diff --git a/c++/test/Makefile.am b/c++/test/Makefile.am
index 6cef381..2717e9c 100644
--- a/c++/test/Makefile.am
+++ b/c++/test/Makefile.am
@@ -38,8 +38,8 @@ check_PROGRAMS=$(TEST_PROG)
LDADD=$(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
testhdf5_SOURCES=testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \
- tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp trefer.cpp \
- ttypes.cpp tvlstr.cpp h5cpputil.cpp
+ tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp tobject.cpp \
+ trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
# Tell conclude.am that these are C++ tests.
CXX_API=yes
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index 59cab8f..621618e 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -117,8 +117,8 @@ am__EXEEXT_1 = testhdf5$(EXEEXT)
am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) dsets.$(OBJEXT) \
tattr.$(OBJEXT) tcompound.$(OBJEXT) tdspl.$(OBJEXT) \
tfile.$(OBJEXT) tfilter.$(OBJEXT) th5s.$(OBJEXT) \
- tlinks.$(OBJEXT) trefer.$(OBJEXT) ttypes.$(OBJEXT) \
- tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT)
+ tlinks.$(OBJEXT) tobject.$(OBJEXT) trefer.$(OBJEXT) \
+ ttypes.$(OBJEXT) tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT)
testhdf5_OBJECTS = $(am_testhdf5_OBJECTS)
testhdf5_LDADD = $(LDADD)
testhdf5_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
@@ -503,7 +503,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -681,8 +680,8 @@ TEST_PROG = testhdf5
# The tests depend on the hdf5 library, test library, and the c++ library
LDADD = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
testhdf5_SOURCES = testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \
- tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp trefer.cpp \
- ttypes.cpp tvlstr.cpp h5cpputil.cpp
+ tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp tobject.cpp \
+ trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
# Tell conclude.am that these are C++ tests.
@@ -774,6 +773,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfilter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5s.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlinks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tobject.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trefer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttypes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvlstr.Po@am__quote@
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 72d7977..d1ced1d 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -49,6 +49,7 @@
const H5std_string FILE1("dataset.h5");
const H5std_string DSET_DEFAULT_NAME("default");
+const H5std_string DSET_DEFAULT_NAME_PATH("/default");
const H5std_string DSET_CHUNKED_NAME("chunked");
const H5std_string DSET_SIMPLE_IO_NAME("simple_io");
const H5std_string DSET_TCONV_NAME ("tconv");
@@ -96,6 +97,7 @@ test_create( H5File& file)
dataset = new DataSet (file.createDataSet
(DSET_DEFAULT_NAME, PredType::NATIVE_DOUBLE, space));
+
// Add a comment to the dataset
file.setComment (DSET_DEFAULT_NAME, "This is a dataset");
@@ -120,10 +122,15 @@ test_create( H5File& file)
// way to open an existing dataset for accessing.
dataset = new DataSet (file.openDataSet (DSET_DEFAULT_NAME));
+ // Get and verify the name of this dataset, using
+ // H5std_string getObjName()
+ H5std_string ds_name = dataset->getObjName();
+ verify_val(ds_name, DSET_DEFAULT_NAME_PATH, "DataSet::getObjName", __LINE__, __FILE__);
+
// Get and verify the comment from this dataset, using
// H5std_string getComment(const H5std_string& name, <buf_size=0, by default>)
H5std_string comment = file.getComment(DSET_DEFAULT_NAME);
- verify_val(comment, "This is a dataset", "H5Location::getComment", __LINE__, __FILE__);
+ verify_val(comment, "This is a dataset", "DataSet::getComment", __LINE__, __FILE__);
// Close the dataset when accessing is completed
delete dataset;
@@ -305,10 +312,14 @@ test_datasize(FileAccPropList &fapl)
// Get the dimension sizes.
hsize_t dims[2];
int n_dims = space.getSimpleExtentDims(dims);
+ if (n_dims < 0)
+ {
+ throw Exception("test_compression", "DataSpace::getSimpleExtentDims() failed");
+ }
// Calculate the supposed size. Size of each value is int (4), from
// test_simple_io.
- int expected_size = 4 * dims[0] * dims[1];
+ size_t expected_size = 4 * dims[0] * dims[1];
// getInMemDataSize() returns the in memory size of the data.
size_t ds_size = dset.getInMemDataSize();
@@ -1050,11 +1061,6 @@ void test_dset()
try
{
- // Turn of the auto-printing when failure occurs so that we can
- // handle the errors appropriately since sometime failures are
- // caused deliberately and expected.
- Exception::dontPrint();
-
// Use the file access template id to create a file access prop.
// list object to pass in H5File::H5File
FileAccPropList fapl(fapl_id);
@@ -1065,18 +1071,12 @@ void test_dset()
Group grp = file.createGroup( "emit diagnostics", 0);
grp.setComment("Causes diagnostic messages to be emitted");
- nerrors += test_create(file)<0 ?1:0;
- nerrors += test_simple_io(file)<0 ?1:0;
- nerrors += test_tconv(file)<0 ?1:0;
- nerrors += test_compression(file)<0 ?1:0;
- nerrors += test_multiopen (file)<0 ?1:0;
- nerrors += test_types(file)<0 ?1:0;
-
- // Get part of the comment, random length using
- // ssize_t getComment(const char* name, const size_t buf_size, char* comment)
- char* comment = new char[11];
- ssize_t comment_len = file.getComment("emit diagnostics", 11, comment);
- verify_val((const char*)comment, "Causes dia", "H5Location::getComment", __LINE__, __FILE__);
+ nerrors += test_create(file) < 0 ? 1:0;
+ nerrors += test_simple_io(file) < 0 ? 1:0;
+ nerrors += test_tconv(file) < 0 ? 1:0;
+ nerrors += test_compression(file) < 0 ? 1:0;
+ nerrors += test_multiopen (file) < 0 ? 1:0;
+ nerrors += test_types(file) < 0 ? 1:0;
// Close group "emit diagnostics".
grp.close();
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index cc135bd..8625213 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -115,6 +115,19 @@ template <class Type1, class Type2>
}
}
+template <class Type1, class Type2>
+ void CHECK(Type1 x, Type2 value, const char* msg, int line, const char* file_name)
+{
+ if (x == value)
+ {
+ cerr << endl;
+ cerr << "*** Function " << msg << " FAILED at line " << line << endl;
+ IncTestNumErrs();
+ throw TestFailedException(file_name, msg);
+ }
+}
+
+
/* Prototypes for the test routines */
#ifdef __cplusplus
extern "C" {
@@ -126,6 +139,7 @@ void test_file();
void test_filters();
void test_links();
void test_h5s();
+void test_object();
void test_reference();
void test_types();
void test_vlstrings();
@@ -140,6 +154,7 @@ void cleanup_file();
void cleanup_filters();
void cleanup_links();
void cleanup_h5s();
+void cleanup_object();
void cleanup_reference();
void cleanup_types();
void cleanup_vlstrings();
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index e2e347b..29f50f8 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -248,16 +248,20 @@ static void test_attr_basic_write()
**
** Test these functions:
** A. ssize_t Attribute::getName(char* attr_name, size_t buf_size)
-** 1. With arbitrary buf_size that is larger than the name size
-** 2. With arbitrary buf_size that is smaller than the name's length.
-** 3. With a buf_size that equals the name's length.
+** 1. With arbitrary buf_size that is larger than the name size
+** 2. With arbitrary buf_size that is smaller than the name's length.
+** 3. With a buf_size that equals the name's length.
**
** B. ssize_t Attribute::getName(H5std_string& attr_name, size_t buf_size)
-** With buffer smaller than the actual name
+** 1. With buffer smaller than the actual name
+** 2. Same test but with retiring overloaded function
+** ssize_t Attribute::getName(size_t buf_size, H5std_string& attr_name)
**
-** C. H5std_string Attribute::getName() with file's and dataset's attrs.
+** C. H5std_string Attribute::getName()
**
-** D. ssize_t Attribute::getName(H5std_string& attr_name, size_t buf_size)
+** D. H5std_string Attribute::getName(size_t len)
+**
+** E. ssize_t Attribute::getName(H5std_string& attr_name, size_t buf_size)
** With buffer size equals the name's length, i.e., buf_size=0
**
****************************************************************/
@@ -292,6 +296,8 @@ static void test_attr_getname()
HDmemset(fattr1_name, 0, buf_size+1);
ssize_t name_size = 0; // actual length of attribute name
name_size = fattr1.getName(fattr1_name, buf_size+1);
+ CHECK(name_size, FAIL, "Attribute::getName", __LINE__, __FILE__);
+ verify_val((size_t)name_size, FATTR1_NAME.length(), "Attribute::getName", __LINE__, __FILE__);
verify_val((const char*)fattr1_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
delete []fattr1_name;
@@ -302,6 +308,8 @@ static void test_attr_getname()
fattr1_name = new char[buf_size+1];
HDmemset(fattr1_name, 0, buf_size+1);
name_size = fattr1.getName(fattr1_name, buf_size+1);
+ CHECK(name_size, FAIL, "Attribute::getName", __LINE__, __FILE__);
+ verify_val((size_t)name_size, FATTR1_NAME.size(), "Attribute::getName", __LINE__, __FILE__);
verify_val((const char*)fattr1_name, (const char*)short_name, "Attribute::getName", __LINE__, __FILE__);
delete []fattr1_name;
@@ -310,6 +318,7 @@ static void test_attr_getname()
fattr1_name = new char[buf_size+1];
HDmemset(fattr1_name, 0, buf_size+1);
name_size = fattr1.getName(fattr1_name, buf_size+1);
+ CHECK(name_size, FAIL, "Attribute::getName", __LINE__, __FILE__);
verify_val(fattr1_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
delete []fattr1_name;
@@ -319,6 +328,14 @@ static void test_attr_getname()
buf_size = 4;
H5std_string fattr1_name2;
name_size = fattr1.getName(fattr1_name2, buf_size);
+ verify_val(fattr1_name2, "File", "Attribute::getName", __LINE__, __FILE__);
+
+ // Same test as above, but with deprecated overloaded function
+ // ssize_t Attribute::getName(size_t buf_size, H5std_string& attr_name)
+ // using buffer smaller than the actual name
+ H5std_string fattr1_name2a;
+ name_size = fattr1.getName(fattr1_name2a, buf_size);
+ verify_val(fattr1_name2a, "File", "Attribute::getName", __LINE__, __FILE__);
// C. Get file attribute's name with
// H5std_string Attribute::getName()
@@ -326,7 +343,8 @@ static void test_attr_getname()
verify_val(fattr1_name3, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
//
- // Open the dataset DSET1_NAME and test getName with its attribute
+ // D. Test getName getting part of an attribute's name using
+ // H5std_string Attribute::getName(len)
//
// Open dataset DSET1_NAME
@@ -340,12 +358,11 @@ static void test_attr_getname()
// Open attribute
Attribute attr1(dataset.openAttribute(ATTR1_NAME));
- // Get dataset attribute's name with
- // H5std_string Attribute::getName()
- H5std_string dattr_name1 = attr1.getName();
- verify_val(dattr_name1, ATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
+ size_t len = 4;
+ H5std_string dattr_name1 = attr1.getName(len);
+ verify_val(dattr_name1, "Attr", "Attribute::getName", __LINE__, __FILE__);
- // D. Get attribute name with
+ // E. Get dataset's attribute name with
// H5std_string Attribute::getName(H5std_string attr_name, buf_size=0)
H5std_string dattr_name2;
name_size = attr1.getName(dattr_name2);
@@ -607,7 +624,7 @@ static void test_attr_compound_read()
size_t size; // Attribute datatype size as stored in file
size_t offset; // Attribute datatype field offset
struct attr4_struct read_data4[ATTR4_DIM1][ATTR4_DIM2]; // Buffer for reading 4th attribute
- int i,j;
+ hsize_t i,j;
// Output message about test being performed
SUBTEST("Basic Attribute Functions");
@@ -1590,6 +1607,10 @@ extern "C"
#endif
void cleanup_attr()
{
- //HDremove(FILENAME.c_str());
+ HDremove(FILE_BASIC.c_str());
+ HDremove(FILE_COMPOUND.c_str());
+ HDremove(FILE_SCALAR.c_str());
+ HDremove(FILE_MULTI.c_str());
+ HDremove(FILE_DTYPE.c_str());
}
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index 60d44b2..156f438 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -742,13 +742,12 @@ cerr << "test_compound_7 in catch" << endl;
*
*-------------------------------------------------------------------------
*/
-#define COMPFILE "tcompound_types.h5"
+const H5std_string COMPFILE("tcompound_types.h5");
static void test_compound_set_size()
{
typedef struct {
int a, b, c[4], d, e;
} src_typ_t;
- src_typ_t *s_ptr;
// Output message about test being performed
SUBTEST("Setting Size on Compound Datatype");
@@ -794,7 +793,7 @@ static void test_compound_set_size()
// Verify setSize() actually set size
size_t new_size = dtype.getSize();
- verify_val(new_size, 33, "DataType::getSize", __LINE__, __FILE__);
+ verify_val(new_size, (size_t)33, "DataType::getSize", __LINE__, __FILE__);
// Shrink the type, and verify that it became packed
dtype.setSize((size_t)32);
@@ -803,7 +802,7 @@ static void test_compound_set_size()
// Verify setSize() actually set size again
new_size = dtype.getSize();
- verify_val(new_size, 32, "DataType::getSize", __LINE__, __FILE__);
+ verify_val(new_size, (size_t)32, "DataType::getSize", __LINE__, __FILE__);
/* Close types and file */
dtype_tmp.close();
@@ -867,4 +866,5 @@ extern "C"
#endif
void cleanup_compound()
{
+ HDremove(COMPFILE.c_str());
} // cleanup_file
diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp
index 5944fb1..5c1d953 100644
--- a/c++/test/tdspl.cpp
+++ b/c++/test/tdspl.cpp
@@ -50,7 +50,6 @@ static void test_transfplist()
const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
/* inverses the utrans transform in init_test to get back original array */
const char* utrans_inv = "(x/3)*4 - 100";
- char *c_to_f_read=NULL, *simple_read=NULL, *utrans_inv_read=NULL;
SUBTEST("DSetMemXferPropList::set/getDataTransform()");
try {
@@ -75,7 +74,7 @@ static void test_transfplist()
// Find out the length of the transform expression, allocate the buffer
// for it, then read and verify the expression from the copied plist
ssize_t tran_len = dxpl_c_to_f_copy.getDataTransform(NULL);
- c_to_f_read = (char *)HDmalloc(tran_len+1);
+ char *c_to_f_read = (char *)HDmalloc(tran_len+1);
HDmemset(c_to_f_read, 0, tran_len+1);
dxpl_c_to_f_copy.getDataTransform(c_to_f_read, tran_len+1);
verify_val((const char*)c_to_f_read, (const char*)c_to_f,
@@ -106,7 +105,7 @@ static void test_transfplist()
// Get and verify the expression with:
// ssize_t getDataTransform(char* exp, const size_t buf_size)
tran_len = dxpl_utrans_inv.getDataTransform(NULL, 0);
- utrans_inv_read = (char *)HDmalloc(tran_len+1);
+ char *utrans_inv_read = (char *)HDmalloc(tran_len+1);
HDmemset(utrans_inv_read, 0, tran_len+1);
dxpl_utrans_inv.getDataTransform(utrans_inv_read, tran_len+1);
verify_val((const char*)utrans_inv_read, (const char*)utrans_inv,
diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp
index 57210d0..19b4f0d 100644
--- a/c++/test/testhdf5.cpp
+++ b/c++/test/testhdf5.cpp
@@ -67,41 +67,54 @@
int
main(int argc, char *argv[])
{
- /* Initialize testing framework */
- TestInit(argv[0], NULL, NULL);
-
- // testing file creation and opening in tfile.cpp
- AddTest("tfile", test_file, cleanup_file, "File I/O Operations", NULL);
- // testing dataset functionalities in dset.cpp
- AddTest("dsets", test_dset, cleanup_dsets, "Dataset I/O Operations", NULL);
- // testing dataspace functionalities in th5s.cpp
- AddTest("th5s", test_h5s, cleanup_h5s, "Dataspaces", NULL);
- // testing attribute functionalities in tattr.cpp
- AddTest("tattr", test_attr, cleanup_attr, "Attributes", NULL);
- // testing reference functionalities in trefer.cpp
- AddTest("trefer", test_reference, cleanup_reference, "References", NULL);
- // testing variable-length strings in tvlstr.cpp
- AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
- AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL);
- AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL);
- AddTest("tdspl", test_dsproplist, cleanup_dsproplist, "Dataset Property List", NULL);
- AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL);
- AddTest("tlinks", test_links, cleanup_links, "Various Links", NULL);
+ try
+ {
+ // Turn of the auto-printing when failure occurs so that we can
+ // handle the errors appropriately since sometime failures are
+ // caused deliberately and expected.
+ Exception::dontPrint();
+ /* Initialize testing framework */
+ TestInit(argv[0], NULL, NULL);
+
+ // testing file creation and opening in tfile.cpp
+ AddTest("tfile", test_file, cleanup_file, "File I/O Operations", NULL);
+ // testing dataset functionalities in dset.cpp
+ AddTest("dsets", test_dset, cleanup_dsets, "Dataset I/O Operations", NULL);
+ // testing dataspace functionalities in th5s.cpp
+ AddTest("th5s", test_h5s, cleanup_h5s, "Dataspaces", NULL);
+ // testing attribute functionalities in tattr.cpp
+ AddTest("tattr", test_attr, cleanup_attr, "Attributes", NULL);
+ // testing object functionalities in tobject.cpp
+ AddTest("tobject", test_object, cleanup_object, "Objects", NULL);
+ // testing reference functionalities in trefer.cpp
+ AddTest("trefer", test_reference, cleanup_reference, "References", NULL);
+ // testing variable-length strings in tvlstr.cpp
+ AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
+ AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL);
+ AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL);
+ AddTest("tdspl", test_dsproplist, cleanup_dsproplist, "Dataset Property List", NULL);
+ AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL);
+ AddTest("tlinks", test_links, cleanup_links, "Various Links", NULL);
/* Comment out tests that are not done yet. - BMR, Feb 2001
- AddTest("select", test_select, cleanup_select, "Selections", NULL);
- AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
- AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
- AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
- AddTest("array", test_array, cleanup_array, "Array Datatypes", NULL);
- AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
- AddTest("id", test_ids, NULL, "User-Created Identifiers", NULL);
+ AddTest("select", test_select, cleanup_select, "Selections", NULL);
+ AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
+ AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
+ AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
+ AddTest("array", test_array, cleanup_array, "Array Datatypes", NULL);
+ AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
+ AddTest("id", test_ids, NULL, "User-Created Identifiers", NULL);
Comment out tests that are not done yet */
/* Tentative - BMR 2007/1/12
- AddTest("datatypes", test_dtypes, cleanup_dtypes, "Data Types", NULL);
- AddTest("enum", test_enum, cleanup_enum, "Enum Data Types", NULL);
+ AddTest("enum", test_enum, cleanup_enum, "Enum Data Types", NULL);
*/
+ }
+ catch (Exception E)
+ {
+ issue_fail_msg("Tests failed", __LINE__, __FILE__, E.getCDetailMsg());
+ }
+
/* Display testing information */
TestInfo(argv[0]);
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index 965065a..1f53e61 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -654,4 +654,5 @@ void cleanup_file()
HDremove(FILE2.c_str());
HDremove(FILE3.c_str());
HDremove(FILE4.c_str());
+ HDremove(FILE5.c_str());
} // cleanup_file
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index 257e4be..854c7bb 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -165,7 +165,7 @@ static void test_null_filter()
const H5std_string DSET_SZIP_NAME("szipped dataset");
-void test_szip_filter(H5File& file1)
+static void test_szip_filter(H5File& file1)
{
#ifdef H5_HAVE_FILTER_SZIP
int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp
new file mode 100644
index 0000000..b86d7cb
--- /dev/null
+++ b/c++/test/tobject.cpp
@@ -0,0 +1,335 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*****************************************************************************
+ FILE
+ tobject.cpp - HDF5 C++ testing object related functionality
+
+ ***************************************************************************/
+
+#ifdef OLD_HEADER_FILENAME
+#include <iostream.h>
+#else
+#include <iostream>
+#endif
+#include <string>
+
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::cerr;
+ using std::endl;
+#endif // H5_NO_STD
+#endif
+
+#include "H5Cpp.h" // C++ API header file
+
+#ifndef H5_NO_NAMESPACE
+ using namespace H5;
+#endif
+
+#include "h5cpputil.h" // C++ utilility header file
+
+const H5std_string FILE_OBJECTS("tobjects.h5");
+const H5std_string GROUP1("Top Group");
+const H5std_string GROUP1_PATH("/Top Group");
+const H5std_string GROUP1_1("Sub-Group 1.1");
+const H5std_string GROUP1_1_PATH("/Top Group/Sub-Group 1.1");
+const H5std_string GROUP1_2("Sub-Group 1.2");
+const H5std_string GROUP1_2_PATH("/Top Group/Sub-Group 1.2");
+const H5std_string DSET_DEFAULT_NAME("default");
+const H5std_string DSET_IN_FILE("Dataset in File");
+const H5std_string DSET_IN_FILE_PATH("/Dataset in File");
+const H5std_string DSET_IN_GRP1("Dataset in Group 1");
+const H5std_string DSET_IN_GRP1_PATH("/Top Group/Dataset in Group 1");
+const H5std_string DSET_IN_GRP1_2("Dataset in Group 1.2");
+const H5std_string DSET_IN_GRP1_2_PATH("/Top Group/Sub-Group 1.2/Dataset in Group 1.2");
+
+/*-------------------------------------------------------------------------
+ * Function: test_get_objname
+ *
+ * Purpose: Tests getting object name of groups and datasets.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Binh-Minh Ribler
+ * Friday, March 4, 2014
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void test_get_objname()
+{
+ SUBTEST("H5Object::getObjName on Groups and Datasets");
+
+ try {
+ // Create file
+ H5File file(FILE_OBJECTS, H5F_ACC_TRUNC);
+
+ // Create a top group and 2 subgroups
+ Group grp1 = file.createGroup(GROUP1, 0);
+ Group grp1_1 = grp1.createGroup(GROUP1_1, 0);
+ Group grp1_2 = grp1.createGroup(GROUP1_2, 0);
+
+ // Get part of the group's name, random length using
+ // ssize_t getObjName(char* comment, size_t buf_size)
+
+ // Get the length of the group's name first
+ ssize_t name_len = grp1.getObjName(NULL);
+
+ // Random length is 4
+ if (name_len > 4)
+ {
+ char* grp1_name = new char[5];
+ name_len = grp1.getObjName(grp1_name, 5);
+ verify_val((const char*)grp1_name, "/Top", "Group::getObjName", __LINE__, __FILE__);
+ delete []grp1_name;
+ }
+
+ // Create a data space
+ hsize_t dims[2];
+ dims[0] = 2;
+ dims[1] = 5;
+ DataSpace space (2, dims, NULL);
+
+ // Create a dataset in the file
+ DataSet dsinfile = file.createDataSet(DSET_IN_FILE,
+ PredType::NATIVE_DOUBLE, space);
+
+ // Create a dataset in the group
+ DataSet dsingrp = grp1.createDataSet(DSET_IN_GRP1,
+ PredType::NATIVE_INT, space);
+
+ // Get and verify the name of each dataset, using
+ // H5std_string getObjName() and
+ // ssize_t getObjName(H5std_string& obj_name, size_t len = 0)
+ H5std_string ds_name = dsinfile.getObjName();
+ verify_val(ds_name, DSET_IN_FILE_PATH, "DataSet::getObjName", __LINE__, __FILE__);
+
+ name_len = dsingrp.getObjName(ds_name); // default len
+ verify_val(ds_name, DSET_IN_GRP1_PATH, "DataSet::getObjName", __LINE__, __FILE__);
+
+ // Close dataset
+ dsingrp.close();
+
+ // Create a dataset in sub-group 1.2
+ dsingrp = grp1_2.createDataSet(DSET_IN_GRP1_2, PredType::NATIVE_INT, space);
+
+ // Get and verify the name of the dataset that belongs to subgroup
+ // 1.2, using H5std_string getObjName()
+ ds_name = dsingrp.getObjName();
+ verify_val(ds_name, DSET_IN_GRP1_2_PATH, "DataSet::getObjName", __LINE__, __FILE__);
+
+ // Close dataset
+ dsingrp.close();
+
+ // Reopen that same dataset then check the name again with another
+ // overload: ssize_t getObjName(H5std_string& obj_name, size_t len = 0)
+ dsingrp = grp1_2.openDataSet(DSET_IN_GRP1_2);
+ name_len = dsingrp.getObjName(ds_name);
+ verify_val(ds_name, DSET_IN_GRP1_2_PATH, "DataSet::getObjName", __LINE__, __FILE__);
+
+ // Everything will be closed as they go out of scope
+
+ PASSED();
+ } // try block
+
+ // catch all other exceptions
+ catch (Exception E)
+ {
+ issue_fail_msg("test_get_objname", __LINE__, __FILE__);
+ }
+} // test_get_objname
+
+/*-------------------------------------------------------------------------
+ * Function: test_get_objname_ontypes
+ *
+ * Purpose: Test getting object name from various committed types.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Binh-Minh Ribler
+ * March 4, 2014
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void test_get_objname_ontypes()
+{
+ SUBTEST("H5Object::getObjName on Committed Datatypes");
+
+ try {
+ // Create a file with default prop lists
+ H5File file(FILE_OBJECTS, H5F_ACC_RDWR);
+
+ // Create a group
+ Group grp = file.createGroup ("typetests");
+
+ // Create a datatype and save it
+ DataType dtype(PredType::STD_B8LE);
+ dtype.commit(file, "STD_B8LE");
+
+ // Get and verify its name
+ H5std_string type_name = dtype.getObjName();
+ verify_val(type_name, "/STD_B8LE", "DataSet::getObjName", __LINE__, __FILE__);
+
+ // Test getting type's name from copied type
+ DataType copied_type;
+ copied_type.copy(dtype);
+ copied_type.commit(file, "copy of STD_B8LE");
+ type_name = copied_type.getObjName();
+ verify_val(type_name, "/copy of STD_B8LE", "DataSet::getObjName", __LINE__, __FILE__);
+
+ // Test copying an integer predefined type
+ IntType new_int_type(PredType::NATIVE_INT);
+
+ // Name this datatype
+ new_int_type.commit(grp, "IntType NATIVE_INT");
+ ssize_t name_len = new_int_type.getObjName(type_name); // default len
+ verify_val(type_name, "/typetests/IntType NATIVE_INT", "DataSet::getObjName", __LINE__, __FILE__);
+
+ // Close everything or they can be closed when objects go out of scope
+ dtype.close();
+ copied_type.close();
+ new_int_type.close();
+ grp.close();
+ file.close();
+
+ PASSED();
+ } // end top try block
+
+ catch (Exception E)
+ {
+ issue_fail_msg("test_get_objname_ontypes", __LINE__, __FILE__);
+ }
+} // test_get_objname_ontypes
+
+/*-------------------------------------------------------------------------
+ * Function: test_get_objtype
+ *
+ * Purpose: Tests getting object type
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Binh-Minh Ribler
+ * Friday, March 4, 2014
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void test_get_objtype()
+{
+ SUBTEST("H5File::childObjType and H5Group::childObjType");
+
+ try {
+ // Open file
+ H5File file(FILE_OBJECTS, H5F_ACC_RDWR);
+
+ // Open the top group
+ Group grp1 = file.openGroup(GROUP1);
+
+ // Create a datatype and save it
+ DataType dtype(PredType::STD_I32LE);
+ dtype.commit(grp1, "STD_I32LE");
+
+ // Get and verify object type with
+ // H5O_type_t childObjType(const H5std_string& objname)
+ H5O_type_t objtype = file.childObjType(DSET_IN_FILE);
+ verify_val(objtype, H5O_TYPE_DATASET, "DataSet::childObjType", __LINE__, __FILE__);
+
+ // Get and verify object type with
+ // H5O_type_t childObjType(const char* objname)
+ objtype = grp1.childObjType(GROUP1_1.c_str());
+ verify_val(objtype, H5O_TYPE_GROUP, "DataSet::childObjType", __LINE__, __FILE__);
+
+ // Get and verify object type with
+ // H5O_type_t childObjType(hsize_t index, H5_index_t index_type,
+ // H5_iter_order_t order, const char* objname=".")
+ objtype = grp1.childObjType((hsize_t)1, H5_INDEX_NAME, H5_ITER_INC);
+ verify_val(objtype, H5O_TYPE_NAMED_DATATYPE, "DataSet::childObjType", __LINE__, __FILE__);
+
+ // Get and verify object type with
+ // H5O_type_t childObjType(hsize_t index,
+ // H5_index_t index_type=H5_INDEX_NAME,
+ // H5_iter_order_t order=H5_ITER_INC, const char* objname=".")
+ objtype = grp1.childObjType((hsize_t)2);
+ verify_val(objtype, H5O_TYPE_GROUP, "DataSet::childObjType", __LINE__, __FILE__);
+
+ // Everything will be closed as they go out of scope
+
+ PASSED();
+ } // try block
+
+ // catch all other exceptions
+ catch (Exception E)
+ {
+ issue_fail_msg("test_get_objtype", __LINE__, __FILE__);
+ }
+} // test_get_objtype
+
+/*-------------------------------------------------------------------------
+ * Function: test_objects
+ *
+ * Purpose: Tests HDF5 object related functionality
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Binh-Minh Ribler
+ * Friday, Mar 4, 2014
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef __cplusplus
+extern "C"
+#endif
+void test_object()
+{
+ // Output message about test being performed
+ MESSAGE(5, ("Testing Object Functions\n"));
+
+ test_get_objname(); // Test get object name from groups/datasets
+ test_get_objname_ontypes(); // Test get object name from types
+ test_get_objtype(); // Test get object type
+
+} // test_objects
+
+/*-------------------------------------------------------------------------
+ * Function: cleanup_objects
+ *
+ * Purpose: Cleanup temporary test files
+ *
+ * Return: none
+ *
+ * Programmer: (use C version)
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef __cplusplus
+extern "C"
+#endif
+void cleanup_object()
+{
+ HDremove(FILE_OBJECTS.c_str());
+} // cleanup_objects
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index e7a28de..dcfb644 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -321,6 +321,10 @@ static void test_reference_obj(void)
H5std_string read_comment1 = group.getComment(".", 10);
verify_val(read_comment1.c_str(), write_comment, "Group::getComment",__LINE__,__FILE__);
+ // Test with the old default value
+ read_comment1 = group.getComment(".", 256);
+ verify_val(read_comment1.c_str(), write_comment, "Group::getComment",__LINE__,__FILE__);
+
// Test that getComment handles failures gracefully, using
// H5std_string getComment(const char* name, <buf_size=0 by default>)
try {
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 933181c..e9e1427 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -414,6 +414,23 @@ static void test_named ()
IntType itype(PredType::NATIVE_INT);
itype.commit(file, "native-int");
+ // Test commit passing in const H5File& for prototype with const
+ try
+ {
+ // Create random char type
+ IntType atype(PredType::NATIVE_UCHAR);
+
+ // Creating group, declared as const
+ const Group const_grp = file.createGroup("GR as loc");
+
+ // Commit type passing in const group; compilation would fail if
+ // no matching prototype
+ atype.commit(const_grp, "random uchar");
+ } // end of try block
+ catch (Exception E) {
+ issue_fail_msg("test_named", __LINE__, __FILE__, "Commit at const group");
+ }
+
// Check that it is committed.
if (itype.committed() == false)
cerr << "IntType::committed() returned false" << endl;
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 89f24f2..a2669db 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -50,10 +50,6 @@ const H5std_string FILENAME("tvlstr.h5");
const int SPACE1_RANK = 1;
const hsize_t SPACE1_DIM1 = 4;
-// Utility functions - not used now, later though.
-void *test_vlstr_alloc_custom(size_t size, void *info);
-void test_vlstr_free_custom(void *mem, void *info);
-
/****************************************************************
**
** test_vlstr_alloc_custom(): Test VL datatype custom memory
@@ -62,9 +58,9 @@ void test_vlstr_free_custom(void *mem, void *info);
** allocated. It is passed into setVlenMemManager.
**
** Note: exact copy from the C version.
-**
+** (Not used now)
****************************************************************/
-void *test_vlstr_alloc_custom(size_t size, void *info)
+static void *test_vlstr_alloc_custom(size_t size, void *info)
{
void *ret_value=NULL; // Pointer to return
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
@@ -94,9 +90,9 @@ void *test_vlstr_alloc_custom(size_t size, void *info)
** allocated. It is passed into setVlenMemManager.
**
** Note: exact copy from the C version.
-**
+** (Not used now)
****************************************************************/
-void test_vlstr_free_custom(void *_mem, void *info)
+static void test_vlstr_free_custom(void *_mem, void *info)
{
unsigned char *mem;
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
diff --git a/config/cmake/FindHDF5.cmake.in b/config/cmake/FindHDF5.cmake.in
index 0ac8bc9..fbc49f1 100644
--- a/config/cmake/FindHDF5.cmake.in
+++ b/config/cmake/FindHDF5.cmake.in
@@ -1,86 +1,86 @@
-#
-# To be used by projects that make use of Cmakeified hdf5-@HDF5_PACKAGE_VERSION@
-#
-
-#
-# Find the HDF5 includes and get all installed hdf5 library settings from
-# HDF5-config.cmake file : Requires a CMake compatible hdf5-1.8.5 or later
-# for this feature to work. The following vars are set if hdf5 is found.
-#
-# HDF5_FOUND - True if found, otherwise all other vars are undefined
-# HDF5_INCLUDE_DIR - The include dir for main *.h files
-# HDF5_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers
-# HDF5_VERSION_STRING - full version (e.g. @HDF5_PACKAGE_VERSION@)
-# HDF5_VERSION_MAJOR - major part of version (e.g. @HDF5_PACKAGE_VERSION_MAJOR@)
-# HDF5_VERSION_MINOR - minor part (e.g. @HDF5_PACKAGE_VERSION_MINOR@)
-#
-# The following boolean vars will be defined
-# HDF5_ENABLE_PARALLEL - 1 if HDF5 parallel supported
-# HDF5_BUILD_FORTRAN - 1 if HDF5 was compiled with fortran on
-# HDF5_BUILD_CPP_LIB - 1 if HDF5 was compiled with cpp on
-# HDF5_BUILD_TOOLS - 1 if HDF5 was compiled with tools on
-# HDF5_BUILD_HL_LIB - 1 if HDF5 was compiled with high level on
-# HDF5_BUILD_HL_CPP_LIB - 1 if HDF5 was compiled with high level and cpp on
-#
-# Target names that are valid (depending on enabled options)
-# will be the following
-#
-# hdf5 : HDF5 C library
-# hdf5_tools : the tools library
-# hdf5_f90cstub : used by Fortran to C interface
-# hdf5_fortran : Fortran HDF5 library
-# hdf5_cpp : HDF5 cpp interface library
-# hdf5_hl : High Level library
-# hdf5_hl_f90cstub : used by Fortran to C interface to High Level library
-# hdf5_hl_fortran : Fortran High Level library
-# hdf5_hl_cpp : High Level cpp interface library
-#
-# To aid in finding HDF5 as part of a subproject set
-# HDF5_ROOT_DIR_HINT to the location where @HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake lies
-
-include (SelectLibraryConfigurations)
-include (FindPackageHandleStandardArgs)
-
-# The HINTS option should only be used for values computed from the system.
-set (_HDF5_HINTS
- $ENV{HOME}/.local
- $ENV{HDF5_ROOT}
- $ENV{HDF5_ROOT_DIR_HINT}
-)
-# Hard-coded guesses should still go in PATHS. This ensures that the user
-# environment can always override hard guesses.
-set (_HDF5_PATHS
- $ENV{HOME}/.local
- $ENV{HDF5_ROOT}
- $ENV{HDF5_ROOT_DIR_HINT}
- /usr/lib/@HDF5_PACKAGE@
- /usr/share/@HDF5_PACKAGE@
- /usr/local/@HDF5_PACKAGE@
- /usr/local/@HDF5_PACKAGE@/share
-)
-
-FIND_PATH (HDF5_ROOT_DIR "@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake"
- HINTS ${_HDF5_HINTS}
- PATHS ${_HDF5_PATHS}
- PATH_SUFFIXES
- cmake/@HDF5_PACKAGE@
- lib/cmake/@HDF5_PACKAGE@
- share/cmake/@HDF5_PACKAGE@
-)
-
-FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h"
- HINTS ${_HDF5_HINTS}
- PATHS ${_HDF5_PATHS}
- PATH_SUFFIXES
- include
- Include
-)
-
-# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
-# HDF5_INCLUDE_DIRS
-set ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
-
-if (HDF5_INCLUDE_DIR)
- set (HDF5_FOUND "YES")
- include (${HDF5_ROOT_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake)
-endif (HDF5_INCLUDE_DIR)
+#
+# To be used by projects that make use of Cmakeified hdf5-@HDF5_PACKAGE_VERSION@
+#
+
+#
+# Find the HDF5 includes and get all installed hdf5 library settings from
+# HDF5-config.cmake file : Requires a CMake compatible hdf5-1.8.5 or later
+# for this feature to work. The following vars are set if hdf5 is found.
+#
+# HDF5_FOUND - True if found, otherwise all other vars are undefined
+# HDF5_INCLUDE_DIR - The include dir for main *.h files
+# HDF5_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers
+# HDF5_VERSION_STRING - full version (e.g. @HDF5_PACKAGE_VERSION@)
+# HDF5_VERSION_MAJOR - major part of version (e.g. @HDF5_PACKAGE_VERSION_MAJOR@)
+# HDF5_VERSION_MINOR - minor part (e.g. @HDF5_PACKAGE_VERSION_MINOR@)
+#
+# The following boolean vars will be defined
+# HDF5_ENABLE_PARALLEL - 1 if HDF5 parallel supported
+# HDF5_BUILD_FORTRAN - 1 if HDF5 was compiled with fortran on
+# HDF5_BUILD_CPP_LIB - 1 if HDF5 was compiled with cpp on
+# HDF5_BUILD_TOOLS - 1 if HDF5 was compiled with tools on
+# HDF5_BUILD_HL_LIB - 1 if HDF5 was compiled with high level on
+# HDF5_BUILD_HL_CPP_LIB - 1 if HDF5 was compiled with high level and cpp on
+#
+# Target names that are valid (depending on enabled options)
+# will be the following
+#
+# hdf5 : HDF5 C library
+# hdf5_tools : the tools library
+# hdf5_f90cstub : used by Fortran to C interface
+# hdf5_fortran : Fortran HDF5 library
+# hdf5_cpp : HDF5 cpp interface library
+# hdf5_hl : High Level library
+# hdf5_hl_f90cstub : used by Fortran to C interface to High Level library
+# hdf5_hl_fortran : Fortran High Level library
+# hdf5_hl_cpp : High Level cpp interface library
+#
+# To aid in finding HDF5 as part of a subproject set
+# HDF5_ROOT_DIR_HINT to the location where @HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake lies
+
+include (SelectLibraryConfigurations)
+include (FindPackageHandleStandardArgs)
+
+# The HINTS option should only be used for values computed from the system.
+set (_HDF5_HINTS
+ $ENV{HOME}/.local
+ $ENV{HDF5_ROOT}
+ $ENV{HDF5_ROOT_DIR_HINT}
+)
+# Hard-coded guesses should still go in PATHS. This ensures that the user
+# environment can always override hard guesses.
+set (_HDF5_PATHS
+ $ENV{HOME}/.local
+ $ENV{HDF5_ROOT}
+ $ENV{HDF5_ROOT_DIR_HINT}
+ /usr/lib/@HDF5_PACKAGE@
+ /usr/share/@HDF5_PACKAGE@
+ /usr/local/@HDF5_PACKAGE@
+ /usr/local/@HDF5_PACKAGE@/share
+)
+
+FIND_PATH (HDF5_ROOT_DIR "@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake"
+ HINTS ${_HDF5_HINTS}
+ PATHS ${_HDF5_PATHS}
+ PATH_SUFFIXES
+ cmake/@HDF5_PACKAGE@
+ lib/cmake/@HDF5_PACKAGE@
+ share/cmake/@HDF5_PACKAGE@
+)
+
+FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h"
+ HINTS ${_HDF5_HINTS}
+ PATHS ${_HDF5_PATHS}
+ PATH_SUFFIXES
+ include
+ Include
+)
+
+# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
+# HDF5_INCLUDE_DIRS
+set ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
+
+if (HDF5_INCLUDE_DIR)
+ set (HDF5_FOUND "YES")
+ include (${HDF5_ROOT_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake)
+endif (HDF5_INCLUDE_DIR)
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index 075920e..48c2b56 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -1,119 +1,116 @@
-cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
-###############################################################################################################
-# This script will build and run the examples from a compressed file
-# Execute from a command line:
-# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
-###############################################################################################################
-
-set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
-set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@")
-set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
-set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-set(CTEST_BUILD_CONFIGURATION "Release")
-#set(NO_MAC_FORTRAN "true")
-#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
-#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON)
-
-###############################################################################################################
-# Adjust the following SET Commands as needed
-###############################################################################################################
-if(WIN32)
- if(STATICLIBRARIES)
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF")
- endif(STATICLIBRARIES)
- set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5")
- set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else(WIN32)
- if(STATICLIBRARIES)
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- endif(STATICLIBRARIES)
- set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5")
- set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
- set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif(WIN32)
-
-###############################################################################################################
-# For any comments please contact cdashhelp@hdfgroup.org
-#
-###############################################################################################################
-
-#-----------------------------------------------------------------------------
-# MAC machines need special option
-#-----------------------------------------------------------------------------
-if(APPLE)
- # Compiler choice
- execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(ENV{CC} "${XCODE_CC}")
- set(ENV{CXX} "${XCODE_CXX}")
- if(NOT NO_MAC_FORTRAN)
- # Shared fortran is not supported, build static
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else(NOT NO_MAC_FORTRAN)
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
- endif(NOT NO_MAC_FORTRAN)
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif(APPLE)
-
-#-----------------------------------------------------------------------------
-set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-## Uncompress source in tar file provided
-## --------------------------
-if(WIN32)
- set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe")
- message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]")
- execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv)
-else(WIN32)
- message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]")
- execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv)
-endif(WIN32)
-
-if(NOT rv EQUAL 0)
- message("extracting... [error-(${rv}) clean up]")
- file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
- message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
-endif(NOT rv EQUAL 0)
-
-#-----------------------------------------------------------------------------
-## Clear the build directory
-## --------------------------
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-
-# Use multiple CPU cores to build
-include(ProcessorCount)
-ProcessorCount(N)
-if(NOT N EQUAL 0)
- if(NOT WIN32)
- set(CTEST_BUILD_FLAGS -j${N})
- endif(NOT WIN32)
- set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif()
-set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
-)
-
-#-----------------------------------------------------------------------------
-## -- set output to english
-set($ENV{LC_MESSAGES} "en_EN")
-
-#-----------------------------------------------------------------------------
- ## NORMAL process
- ## --------------------------
- CTEST_START (Experimental)
- CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
- CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
- CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
- if(res GREATER 0)
- message (FATAL_ERROR "tests FAILED")
- endif(res GREATER 0)
-#-----------------------------------------------------------------------------
-##############################################################################################################
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+###############################################################################################################
+# This script will build and run the examples from a compressed file
+# Execute from a command line:
+# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -VV -O test.log
+###############################################################################################################
+
+set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@")
+set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+set(CTEST_BUILD_CONFIGURATION "Release")
+#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON)
+
+###############################################################################################################
+# Adjust the following SET Commands as needed
+###############################################################################################################
+if(WIN32)
+ if(STATICLIBRARIES)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF")
+ endif(STATICLIBRARIES)
+ set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5")
+ set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
+ set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
+ set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
+else(WIN32)
+ if(STATICLIBRARIES)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ endif(STATICLIBRARIES)
+ set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5")
+ set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
+ set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
+ set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+ set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+endif(WIN32)
+
+###############################################################################################################
+# For any comments please contact cdashhelp@hdfgroup.org
+#
+###############################################################################################################
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if(APPLE)
+ # Compiler choice
+ execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(ENV{CC} "${XCODE_CC}")
+ set(ENV{CXX} "${XCODE_CXX}")
+ if(HDF_BUILD_FORTRAN AND BUILD_SHARED_LIBS)
+ message(FATAL_ERROR "error: Shared fortran is not supported, build static")
+ #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ endif(HDF_BUILD_FORTRAN AND BUILD_SHARED_LIBS)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif(APPLE)
+
+#-----------------------------------------------------------------------------
+set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+## Uncompress source in tar file provided
+## --------------------------
+if(WIN32)
+ set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe")
+ message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]")
+ execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv)
+else(WIN32)
+ message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]")
+ execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv)
+endif(WIN32)
+
+if(NOT rv EQUAL 0)
+ message("extracting... [error-(${rv}) clean up]")
+ file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
+endif(NOT rv EQUAL 0)
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+
+# Use multiple CPU cores to build
+include(ProcessorCount)
+ProcessorCount(N)
+if(NOT N EQUAL 0)
+ if(NOT WIN32)
+ set(CTEST_BUILD_FLAGS -j${N})
+ endif(NOT WIN32)
+ set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif()
+set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+)
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set($ENV{LC_MESSAGES} "en_EN")
+
+#-----------------------------------------------------------------------------
+ ## NORMAL process
+ ## --------------------------
+ CTEST_START (Experimental)
+ CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+ CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+ CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+ if(res GREATER 0)
+ message (FATAL_ERROR "tests FAILED")
+ endif(res GREATER 0)
+#-----------------------------------------------------------------------------
+##############################################################################################################
message("DONE") \ No newline at end of file
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index 4d3ab3d..04a166c 100755..100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -1,53 +1,54 @@
-@HDF5_PACKAGE_NAME@ version @HDF5_PACKAGE_VERSION_STRING@
-------------------------------------------------------------------------------
-
-This directory contains the binary (release) distribution of
-@HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@ that was compiled on;
- @BINARY_PLATFORM@.
-
-It was built with the following options:
- -- @LIB_TYPE@ C/C++/Fortran libraries
- -- SZIP (encoder enabled) and ZLIB
- -- @LIB_TYPE@ HDF5 tools
-
-The contents of this directory are:
-
- COPYING - Copyright notice
- README.txt - This file
- @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ - HDF5 Install Package
-
-Installation
-===========================================================================
-1. Execute @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@
-2. Follow prompts
-===========================================================================
-
-After Installation
-===========================================================================
-The compressed examples file HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@, located in the
-HDF5 install folder, can be built and tested with CMake and the supplied
-HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have
-been installed in the default location with above compilers.
-
-To test the installation with the examples;
- Create a directory to run the examples.
- Copy HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@ to this directory, do NOT unzip.
- Copy HDF518_Examples.cmake to this directory.
- Edit HDF518_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed.
- Execute from this directory:
- ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
-
-When executed, the ctest script will save the results to the log file, test.log, as
-indicated by the ctest command. If you wish the to see more build and test information,
-add "-VV" to the ctest command.
-
-For more information see USING_CMake_Examples.txt in the install folder.
-===========================================================================
-
-Documentation for this release can be found at the following URL:
- http://www.hdfgroup.org/HDF5/doc/.
-
-See the HDF5 home page for further details:
- http://hdfgroup.org/HDF5/
-
-Bugs should be reported to help@hdfgroup.org.
+@HDF5_PACKAGE_NAME@ version @HDF5_PACKAGE_VERSION_STRING@
+------------------------------------------------------------------------------
+
+This directory contains the binary (release) distribution of
+@HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@ that was compiled on;
+ @BINARY_PLATFORM@.
+
+It was built with the following options:
+ -- @LIB_TYPE@ C/C++/Fortran libraries
+ -- SZIP (encoder enabled) and ZLIB
+ -- @LIB_TYPE@ HDF5 tools
+
+The contents of this directory are:
+
+ COPYING - Copyright notice
+ README.txt - This file
+ @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ - HDF5 Install Package
+
+Installation
+===========================================================================
+1. Execute @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@
+2. Follow prompts
+===========================================================================
+
+After Installation
+===========================================================================
+The compressed examples file HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@, located in the
+HDF5 install folder, can be built and tested with CMake and the supplied
+HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have
+been installed in the default location with above compilers.
+
+To test the installation with the examples;
+ Create a directory to run the examples.
+ Copy HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@ to this directory, do NOT unzip.
+ Copy HDF518_Examples.cmake to this directory.
+ Edit HDF518_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed.
+ (The default should be correct unless you installed into a different folder.)
+ Execute from this directory:
+ ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -V -O test.log
+
+When executed, the ctest script will save the results to the log file, test.log, as
+indicated by the ctest command. If you wish the to see more build and test information,
+add "-VV" to the ctest command.
+
+For more information see USING_CMake_Examples.txt in the install folder.
+===========================================================================
+
+Documentation for this release can be found at the following URL:
+ http://www.hdfgroup.org/HDF5/doc/.
+
+See the HDF5 home page for further details:
+ http://hdfgroup.org/HDF5/
+
+Bugs should be reported to help@hdfgroup.org.
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index f715a3f..85015a3 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -1,78 +1,78 @@
-# This is the CMakeCache file.
-
-########################
-# EXTERNAL cache entries
-########################
-
-set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
-
-set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
-
-set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
-
-set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
-
-set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
-
-set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
-
-set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
-
-set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
-
-set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
-
-set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
-
-set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
-
-set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
-
-set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-
-set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
-
-set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
-
-set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
-
-set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
-
-set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
-
-set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
-
-set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
-
-set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
-
-set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
-
-set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
-
-set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
-
-set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
-
-set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
-
-set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" 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)
-
-set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
-SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-
-set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-
-set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-
-set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
-
-set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
-
-set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-
-set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+# This is the CMakeCache file.
+
+########################
+# EXTERNAL cache entries
+########################
+
+set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
+
+set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+
+set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+
+set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+
+set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+
+set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+
+set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+
+set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+
+set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+
+set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
+
+set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+
+set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+
+set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+
+set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+
+set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
+
+set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
+
+set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+
+set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+
+set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+
+set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
+
+set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+
+set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
+
+set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+
+set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
+
+set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
+
+set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
+
+set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" 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)
+
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
+SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
+
+set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
+
+set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
+
+set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+
+set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+
+set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/hdf.icns b/config/cmake/hdf.icns
index 22afa2e..22afa2e 100755..100644
--- a/config/cmake/hdf.icns
+++ b/config/cmake/hdf.icns
Binary files differ
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
index c3d0811..148a659 100644
--- a/config/cmake/hdf5-config-version.cmake.in
+++ b/config/cmake/hdf5-config-version.cmake.in
@@ -1,27 +1,27 @@
-#-----------------------------------------------------------------------------
-# HDF5 Version file for install directory
-#-----------------------------------------------------------------------------
-
-set (PACKAGE_VERSION @HDF5_VERSION_STRING@)
-
-if ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
-
- # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
- if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
-
- # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
- set (PACKAGE_VERSION_COMPATIBLE 1)
-
- if ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
- set (PACKAGE_VERSION_EXACT 1)
-
- if ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
- # not using this yet
- endif ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
-
- endif ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
-
- endif ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
-endif ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
-
-
+#-----------------------------------------------------------------------------
+# HDF5 Version file for install directory
+#-----------------------------------------------------------------------------
+
+set (PACKAGE_VERSION @HDF5_VERSION_STRING@)
+
+if ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
+
+ # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
+ if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
+
+ # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
+ set (PACKAGE_VERSION_COMPATIBLE 1)
+
+ if ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
+ set (PACKAGE_VERSION_EXACT 1)
+
+ if ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
+ # not using this yet
+ endif ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
+
+ endif ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
+
+ endif ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
+endif ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
+
+
diff --git a/config/cmake/hdf5-config.cmake.build.in b/config/cmake/hdf5-config.cmake.build.in
index 60888c8..0276ea7 100644
--- a/config/cmake/hdf5-config.cmake.build.in
+++ b/config/cmake/hdf5-config.cmake.build.in
@@ -1,73 +1,73 @@
-#-----------------------------------------------------------------------------
-# HDF5 Config file for compiling against hdf5 build directory
-#-----------------------------------------------------------------------------
-GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-#-----------------------------------------------------------------------------
-# User Options
-#-----------------------------------------------------------------------------
-set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
-set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
-set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
-set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
-set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
-set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
-set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
-set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
-set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
-set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-
-#-----------------------------------------------------------------------------
-# Dependencies
-#-----------------------------------------------------------------------------
-IF(HDF5_ENABLE_PARALLEL)
- SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
- SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
-ENDIF(HDF5_ENABLE_PARALLEL)
-
-#-----------------------------------------------------------------------------
-# Directories
-#-----------------------------------------------------------------------------
-set (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@" "${HDF5_MPI_C_INCLUDE_PATH}" )
-
-if (HDF5_BUILD_FORTRAN)
- set (HDF5_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
-endif (HDF5_BUILD_FORTRAN)
-
-if (HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_CPP ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_HL_LIB)
- set (HDF5_INCLUDE_DIR_HL ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_HL_LIB)
-
-if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_HL_CPP ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_TOOLS)
- set (HDF5_INCLUDE_DIR_TOOLS ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_TOOLS)
-
-if (HDF5_BUILD_SHARED_LIBS)
- set (H5_BUILT_AS_DYNAMIC_LIB 1 )
-else (HDF5_BUILD_SHARED_LIBS)
- set (H5_BUILT_AS_STATIC_LIB 1 )
-endif (HDF5_BUILD_SHARED_LIBS)
-
-#-----------------------------------------------------------------------------
-# Version Strings
-#-----------------------------------------------------------------------------
-set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
-set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
-set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
-
-#-----------------------------------------------------------------------------
-# Don't include targets if this file is being picked up by another
-# project which has already build hdf5 as a subproject
-#-----------------------------------------------------------------------------
-if (NOT TARGET "@HDF5_PACKAGE@")
- include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
- set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-endif (NOT TARGET "@HDF5_PACKAGE@")
+#-----------------------------------------------------------------------------
+# HDF5 Config file for compiling against hdf5 build directory
+#-----------------------------------------------------------------------------
+GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+#-----------------------------------------------------------------------------
+# User Options
+#-----------------------------------------------------------------------------
+set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
+set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
+set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
+set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
+set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+
+#-----------------------------------------------------------------------------
+# Dependencies
+#-----------------------------------------------------------------------------
+IF(HDF5_ENABLE_PARALLEL)
+ SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
+ SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
+ENDIF(HDF5_ENABLE_PARALLEL)
+
+#-----------------------------------------------------------------------------
+# Directories
+#-----------------------------------------------------------------------------
+set (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@" "${HDF5_MPI_C_INCLUDE_PATH}" )
+
+if (HDF5_BUILD_FORTRAN)
+ set (HDF5_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
+endif (HDF5_BUILD_FORTRAN)
+
+if (HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_CPP ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_CPP_LIB)
+
+if (HDF5_BUILD_HL_LIB)
+ set (HDF5_INCLUDE_DIR_HL ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_HL_LIB)
+
+if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_HL_CPP ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+
+if (HDF5_BUILD_TOOLS)
+ set (HDF5_INCLUDE_DIR_TOOLS ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_TOOLS)
+
+if (HDF5_BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_DYNAMIC_LIB 1 )
+else (HDF5_BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_STATIC_LIB 1 )
+endif (HDF5_BUILD_SHARED_LIBS)
+
+#-----------------------------------------------------------------------------
+# Version Strings
+#-----------------------------------------------------------------------------
+set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
+set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+
+#-----------------------------------------------------------------------------
+# Don't include targets if this file is being picked up by another
+# project which has already build hdf5 as a subproject
+#-----------------------------------------------------------------------------
+if (NOT TARGET "@HDF5_PACKAGE@")
+ include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
+endif (NOT TARGET "@HDF5_PACKAGE@")
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
index 799ff9d..c275511 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.install.in
@@ -1,81 +1,81 @@
-#-----------------------------------------------------------------------------
-# HDF5 Config file for compiling against hdf5 install directory
-#-----------------------------------------------------------------------------
-GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${SELF_DIR}" PATH)
-GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-if (NOT WIN32)
- GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-endif (NOT WIN32)
-
-#-----------------------------------------------------------------------------
-# User Options
-#-----------------------------------------------------------------------------
-set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
-set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
-set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
-set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
-set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
-set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
-set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
-set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
-set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
-set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-set (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
-
-#-----------------------------------------------------------------------------
-# Dependencies
-#-----------------------------------------------------------------------------
-IF(HDF5_ENABLE_PARALLEL)
- SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
- SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
-ENDIF(HDF5_ENABLE_PARALLEL)
-
-#-----------------------------------------------------------------------------
-# Directories
-#-----------------------------------------------------------------------------
-set (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
-
-if (HDF5_BUILD_FORTRAN)
- set (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include/fortran" )
-endif (HDF5_BUILD_FORTRAN)
-
-if (HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_CPP "${_IMPORT_PREFIX}/include/cpp" )
-endif (HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_HL_LIB)
- set (HDF5_INCLUDE_DIR_HL "${_IMPORT_PREFIX}/include/hl" )
-endif (HDF5_BUILD_HL_LIB)
-
-if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_HL_CPP "${_IMPORT_PREFIX}/include/hl/cpp" )
-endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_TOOLS)
- set (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include" )
- set (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin" )
-endif (HDF5_BUILD_TOOLS)
-
-#-----------------------------------------------------------------------------
-# Version Strings
-#-----------------------------------------------------------------------------
-set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
-set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
-set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
-
-#-----------------------------------------------------------------------------
-# Don't include targets if this file is being picked up by another
-# project which has already built hdf5 as a subproject
-#-----------------------------------------------------------------------------
-if (NOT TARGET "@HDF5_PACKAGE@")
- if (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- include (${SELF_DIR}/../ZLIB/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
- endif (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- if (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- include (${SELF_DIR}/../SZIP/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
- endif (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
- set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-endif (NOT TARGET "@HDF5_PACKAGE@")
-
+#-----------------------------------------------------------------------------
+# HDF5 Config file for compiling against hdf5 install directory
+#-----------------------------------------------------------------------------
+GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${SELF_DIR}" PATH)
+GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+if (NOT WIN32)
+ GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+endif (NOT WIN32)
+
+#-----------------------------------------------------------------------------
+# User Options
+#-----------------------------------------------------------------------------
+set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
+set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
+set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
+set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
+set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+set (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
+
+#-----------------------------------------------------------------------------
+# Dependencies
+#-----------------------------------------------------------------------------
+IF(HDF5_ENABLE_PARALLEL)
+ SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
+ SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
+ENDIF(HDF5_ENABLE_PARALLEL)
+
+#-----------------------------------------------------------------------------
+# Directories
+#-----------------------------------------------------------------------------
+set (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
+
+if (HDF5_BUILD_FORTRAN)
+ set (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include/fortran" )
+endif (HDF5_BUILD_FORTRAN)
+
+if (HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_CPP "${_IMPORT_PREFIX}/include/cpp" )
+endif (HDF5_BUILD_CPP_LIB)
+
+if (HDF5_BUILD_HL_LIB)
+ set (HDF5_INCLUDE_DIR_HL "${_IMPORT_PREFIX}/include/hl" )
+endif (HDF5_BUILD_HL_LIB)
+
+if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_HL_CPP "${_IMPORT_PREFIX}/include/hl/cpp" )
+endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+
+if (HDF5_BUILD_TOOLS)
+ set (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include" )
+ set (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin" )
+endif (HDF5_BUILD_TOOLS)
+
+#-----------------------------------------------------------------------------
+# Version Strings
+#-----------------------------------------------------------------------------
+set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
+set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+
+#-----------------------------------------------------------------------------
+# Don't include targets if this file is being picked up by another
+# project which has already built hdf5 as a subproject
+#-----------------------------------------------------------------------------
+if (NOT TARGET "@HDF5_PACKAGE@")
+ if (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
+ include (${SELF_DIR}/../ZLIB/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
+ if (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
+ include (${SELF_DIR}/../SZIP/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
+ include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
+endif (NOT TARGET "@HDF5_PACKAGE@")
+
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index 418a6cf..0c0befa 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -20,7 +20,7 @@ Compiling Options:
CFLAGS: @CMAKE_C_FLAGS@
H5_CFLAGS: @H5_CFLAGS@
AM_CFLAGS: @AM_CFLAGS@
- CPPFLAGS: @CMAKE_CXX_FLAGS@
+ CPPFLAGS: @CPPFLAGS@
H5_CPPFLAGS: @H5_CPPFLAGS@
AM_CPPFLAGS: @AM_CPPFLAGS@
Shared Libraries: @H5_ENABLE_SHARED_LIB@
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index dd1a311..1beef2b 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -1,81 +1,81 @@
-# This is the CMakeCache file.
-
-########################
-# EXTERNAL cache entries
-########################
-
-set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
-
-set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
-
-set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
-
-set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
-
-set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
-
-set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
-
-set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
-
-set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
-
-set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
-
-set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
-
-set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
-
-set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
-
-set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-
-set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
-
-set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
-
-set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
-
-set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
-
-set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
-
-set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
-
-set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
-
-set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
-
-set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE)
-
-set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
-
-set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
-
-set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
-
-set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
-
-set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
-
-set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
-
-set (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
-
-set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
-
-set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-
-set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-
-set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
-
-set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
-
-set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
-
-set (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
-
-set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-
-set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+# This is the CMakeCache file.
+
+########################
+# EXTERNAL cache entries
+########################
+
+set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
+
+set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+
+set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+
+set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+
+set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+
+set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+
+set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+
+set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+
+set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+
+set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
+
+set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+
+set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+
+set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+
+set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+
+set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
+
+set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
+
+set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+
+set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+
+set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+
+set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
+
+set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+
+set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE)
+
+set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+
+set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
+
+set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
+
+set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
+
+set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+
+set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
+
+set (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
+
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
+
+set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
+
+set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
+
+set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+
+set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+
+set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
+
+set (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
+
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+
+set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/examples.am b/config/examples.am
index bf0708c..8597a16 100644
--- a/config/examples.am
+++ b/config/examples.am
@@ -91,27 +91,32 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
-
-
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
diff --git a/config/intel-flags b/config/intel-flags
index 1d01d7f..3187daf 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -92,12 +92,8 @@ fi
#
# Please follow the pattern below by adding new versions at the top, copying
# the information from the previous version and adding modifications to that.
+# The default at the bottom will apply if no earlier version matches.
case "$cc_vendor-$cc_version" in
- icc-11* | icc-12*)
- # -s became obsolete; we also fixed bugs that allow us to enable higher level
- # of optimization starting with 1.8.7
- PROD_CFLAGS="-O3"
- ;;
icc-10*)
PROD_CFLAGS="-O1 -Wl,-s"
;;
@@ -105,6 +101,11 @@ case "$cc_vendor-$cc_version" in
# v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2.
PROD_CFLAGS="-O2 -Wl,-s"
;;
+ icc-*)
+ # -s became obsolete; we also fixed bugs that allow us to enable higher level
+ # of optimization starting with 1.8.7
+ PROD_CFLAGS="-O3"
+ ;;
esac
# Clear cc info if no flags set
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 9dcc411..c18c02d 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -41,7 +41,6 @@ fi
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
-echo "CC_BASENAME is $CC_BASENAME."
# Use default Fortran 90 compiler according to what C compiler is used.
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
@@ -136,6 +135,13 @@ case $CC in
cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
;;
+ # this must come before *icc* for the same reason
+ *mpicc*)
+ cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -v 2>&1 | grep 'version' |\
+ sed 's/^[a-z0-9]* for //' |\
+ sed 's/^\([a-z]* \)/ built with \1/1'`
+ cc_version_info=`echo $cc_version_info`
+ ;;
*icc*)
cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
@@ -154,6 +160,13 @@ case $FC in
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
;;
+ *mpif90*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 | grep 'version' |\
+ sed 's/^[a-z0-9]* for //' |\
+ sed 's/^\([a-z]* \)/ built with \1/1'`
+ fc_version_info=`echo $fc_version_info`
+ ;;
+
*ifc*|*ifort*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
@@ -202,6 +215,12 @@ case $CXX in
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgCC'`
;;
+ *mpicxx*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep 'version' |\
+ sed 's/^[a-z0-9]* for //' |\
+ sed 's/^\([a-z]* \)/ built with \1/1'`
+ cxx_version_info=`echo $cxx_version_info`
+ ;;
*)
echo "No match to get cxx_version_info for $CXX"
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 9bc5f0a..80dca85 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -17,7 +17,7 @@
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/config/solaris2.x b/config/solaris2.x
index edf8d59..310c373 100644
--- a/config/solaris2.x
+++ b/config/solaris2.x
@@ -122,7 +122,7 @@ fi
case $CC in
*cc*)
cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'Sun' |\
- sed 's/.*\(Sun.*\)/\1 /'`
+ sed 's/.*\(Sun .*\)/\1 /'`
;;
*)
@@ -135,7 +135,7 @@ case $FC in
# The PGI and Intel compilers are automatically detected below
*f90*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Sun' |\
- sed 's/.*\(Sun.*\)/\1 /'`
+ sed 's/.*\(Sun .*\)/\1 /'`
;;
*)
@@ -148,7 +148,7 @@ echo "Fortran compiler '$FC' is $fc_version_info"
case $CXX in
*CC*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Sun' |\
- sed 's/.*\(Sun.*\)/\1 /'`
+ sed 's/.*\(Sun .*\)/\1 /'`
;;
*)
diff --git a/configure b/configure
index 59ebba6..badb857 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF5 1.9.176-swmr0.
+# Generated by GNU Autoconf 2.69 for HDF5 1.9.178-swmr0.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.9.176-swmr0'
-PACKAGE_STRING='HDF5 1.9.176-swmr0'
+PACKAGE_VERSION='1.9.178-swmr0'
+PACKAGE_STRING='HDF5 1.9.178-swmr0'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -690,9 +690,6 @@ LL_PATH
USE_FILTER_SZIP
USE_FILTER_DEFLATE
AM_MAKEFLAGS
-LT_ADD_LIBHDF5_DEPENDENCY
-LT_ADD_LIBHDF5_DEPENDENCY_FALSE
-LT_ADD_LIBHDF5_DEPENDENCY_TRUE
LT_STATIC_EXEC
USE_PLUGINS_CONDITIONAL_FALSE
USE_PLUGINS_CONDITIONAL_TRUE
@@ -1490,7 +1487,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures HDF5 1.9.176-swmr0 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.178-swmr0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1560,7 +1557,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.9.176-swmr0:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.178-swmr0:";;
esac
cat <<\_ACEOF
@@ -1758,7 +1755,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.9.176-swmr0
+HDF5 configure 1.9.178-swmr0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2852,7 +2849,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by HDF5 $as_me 1.9.176-swmr0, which was
+It was created by HDF5 $as_me 1.9.178-swmr0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3723,7 +3720,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.9.176-swmr0'
+ VERSION='1.9.178-swmr0'
cat >>confdefs.h <<_ACEOF
@@ -22227,6 +22224,7 @@ $as_echo "no" >&6; }
runpath_var=
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld=
+ hardcode_into_libs=no
;;
X-|X-yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -22238,23 +22236,6 @@ $as_echo "error" >&6; }
as_fn_error $? "\'$enableval\' is not a valid rpath type" "$LINENO" 5
;;
esac
-## ----------------------------------------------------------------------
-## When sharedlib-rpath is disabled, setting runpath_var to "" above, don't
-## add libhdf5 as a dependency for the other hdf5 libs, either. This keeps
-## the rpath to libhdf5 out of the lib files as well as the executables.
- if test "X$runpath_var" != X; then
- LT_ADD_LIBHDF5_DEPENDENCY_TRUE=
- LT_ADD_LIBHDF5_DEPENDENCY_FALSE='#'
-else
- LT_ADD_LIBHDF5_DEPENDENCY_TRUE='#'
- LT_ADD_LIBHDF5_DEPENDENCY_FALSE=
-fi
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking make" >&5
-$as_echo_n "checking make... " >&6; }
## ----------------------------------------------------------------------
## Sometimes makes think the `.PATH:' appearing before the first rule
@@ -27711,9 +27692,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
## Try to figure out how to print `long long'. Some machines use `%lld'
## and others use `%qd'. There may be more! The final `l' is a
## default in case none of the others work.
-## Need to patch up LD_LIBRARY_PATH so that the execution can find all
-## the dynamic library. The correct way to do it should be updating
-## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro.
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print long long" >&5
$as_echo_n "checking how to print long long... " >&6; }
@@ -27721,8 +27699,6 @@ if ${hdf5_cv_printf_ll+:} false; then :
$as_echo_n "(cached) " >&6
else
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
-export LD_LIBRARY_PATH
for hdf5_cv_printf_ll in l ll L q unknown; do
if test "$cross_compiling" = yes; then :
@@ -31726,7 +31702,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-HDF5 config.lt 1.9.176-swmr0
+HDF5 config.lt 1.9.178-swmr0
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -33430,10 +33406,6 @@ if test -z "${USE_PLUGINS_CONDITIONAL_TRUE}" && test -z "${USE_PLUGINS_CONDITION
as_fn_error $? "conditional \"USE_PLUGINS_CONDITIONAL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${LT_ADD_LIBHDF5_DEPENDENCY_TRUE}" && test -z "${LT_ADD_LIBHDF5_DEPENDENCY_FALSE}"; then
- as_fn_error $? "conditional \"LT_ADD_LIBHDF5_DEPENDENCY\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then
as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined.
@@ -33864,7 +33836,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by HDF5 $as_me 1.9.176-swmr0, which was
+This file was extended by HDF5 $as_me 1.9.178-swmr0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -33930,7 +33902,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-HDF5 config.status 1.9.176-swmr0
+HDF5 config.status 1.9.178-swmr0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 16450a0..10d19bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +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.176-swmr0], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.178-swmr0], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -1081,6 +1081,7 @@ case "X-$RPATH" in
runpath_var=
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld=
+ hardcode_into_libs=no
;;
X-|X-yes)
AC_MSG_RESULT([yes])
@@ -1090,15 +1091,6 @@ case "X-$RPATH" in
AC_MSG_ERROR([\'$enableval\' is not a valid rpath type])
;;
esac
-## ----------------------------------------------------------------------
-## When sharedlib-rpath is disabled, setting runpath_var to "" above, don't
-## add libhdf5 as a dependency for the other hdf5 libs, either. This keeps
-## the rpath to libhdf5 out of the lib files as well as the executables.
-AM_CONDITIONAL([LT_ADD_LIBHDF5_DEPENDENCY], [test "X$runpath_var" != X])
-
-AC_SUBST([LT_ADD_LIBHDF5_DEPENDENCY])
-
-AC_MSG_CHECKING([make])
## ----------------------------------------------------------------------
## Sometimes makes think the `.PATH:' appearing before the first rule
@@ -2329,14 +2321,9 @@ AC_TRY_COMPILE(,[
## Try to figure out how to print `long long'. Some machines use `%lld'
## and others use `%qd'. There may be more! The final `l' is a
## default in case none of the others work.
-## Need to patch up LD_LIBRARY_PATH so that the execution can find all
-## the dynamic library. The correct way to do it should be updating
-## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro.
##
AC_MSG_CHECKING([how to print long long])
AC_CACHE_VAL([hdf5_cv_printf_ll], [
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
-export LD_LIBRARY_PATH
for hdf5_cv_printf_ll in l ll L q unknown; do
AC_TRY_RUN([
diff --git a/examples/Makefile.am b/examples/Makefile.am
index d8eac95..5d0da93 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -25,6 +25,10 @@ if BUILD_PARALLEL_CONDITIONAL
EXAMPLE_PROG_PARA = ph5example
endif
+INSTALL_SCRIPT_FILES = run-c-ex.sh
+INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
+INSTALL_TOP_FILES = README
+
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
@@ -34,7 +38,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
h5_crtatt h5_crtgrp h5_crtdat \
h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg
-TEST_SCRIPT=testh5cc.sh
+TEST_SCRIPT=testh5cc.sh
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# Install files
# List all file that should be installed in examples directory
@@ -45,10 +50,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \
h5_ref2reg.c h5_shared_mesg.c ph5example.c
-INSTALL_SCRIPT_FILES = run-c-ex.sh
-INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
-INSTALL_TOP_FILES = README
# How to build examples, using installed version of h5cc
if BUILD_PARALLEL_CONDITIONAL
diff --git a/examples/Makefile.in b/examples/Makefile.in
index ae93c78..02db80c 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -446,7 +446,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -614,6 +613,9 @@ TRACE = perl $(top_srcdir)/bin/trace
# *.clog are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog $(EXTLINK_DIRS) *.h5
@BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example
+INSTALL_SCRIPT_FILES = run-c-ex.sh
+INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
+INSTALL_TOP_FILES = README
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
@@ -625,7 +627,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg
-TEST_SCRIPT = testh5cc.sh
+TEST_SCRIPT = testh5cc.sh
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# Install files
# List all file that should be installed in examples directory
@@ -636,9 +639,6 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \
h5_ref2reg.c h5_shared_mesg.c ph5example.c
-INSTALL_SCRIPT_FILES = run-c-ex.sh
-INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
-INSTALL_TOP_FILES = README
# The external link examples demonstrate how to use paths; they need
# directories to be created to do this.
@@ -1131,27 +1131,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/examples/h5_cmprss.c b/examples/h5_cmprss.c
index 4a2f982..8d365a3 100644
--- a/examples/h5_cmprss.c
+++ b/examples/h5_cmprss.c
@@ -1,125 +1,125 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates how to create a compressed dataset.
- * It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-
-#define FILE "cmprss.h5"
-#define RANK 2
-#define DIM0 100
-#define DIM1 20
-
-int main () {
-
- hid_t file_id, dataset_id, dataspace_id; /* identifiers */
- hid_t plist_id;
-
- size_t nelmts;
- unsigned flags, filter_info;
- H5Z_filter_t filter_type;
-
- herr_t status;
- hsize_t dims[2];
- hsize_t cdims[2];
-
- int idx;
- int i,j, numfilt;
- int buf[DIM0][DIM1];
- int rbuf [DIM0][DIM1];
-
- /* Uncomment these variables to use SZIP compression
- unsigned szip_options_mask;
- unsigned szip_pixels_per_block;
- */
-
- /* Create a file. */
- file_id = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
-
- /* Create dataset "Compressed Data" in the group using absolute name. */
- dims[0] = DIM0;
- dims[1] = DIM1;
- dataspace_id = H5Screate_simple (RANK, dims, NULL);
-
- plist_id = H5Pcreate (H5P_DATASET_CREATE);
-
- /* Dataset must be chunked for compression */
- cdims[0] = 20;
- cdims[1] = 20;
- status = H5Pset_chunk (plist_id, 2, cdims);
-
- /* Set ZLIB / DEFLATE Compression using compression level 6.
- * To use SZIP Compression comment out these lines.
- */
- status = H5Pset_deflate (plist_id, 6);
-
- /* Uncomment these lines to set SZIP Compression
- szip_options_mask = H5_SZIP_NN_OPTION_MASK;
- szip_pixels_per_block = 16;
- status = H5Pset_szip (plist_id, szip_options_mask, szip_pixels_per_block);
- */
-
- dataset_id = H5Dcreate2 (file_id, "Compressed_Data", H5T_STD_I32BE,
- dataspace_id, H5P_DEFAULT, plist_id, H5P_DEFAULT);
-
- for (i = 0; i< DIM0; i++)
- for (j=0; j<DIM1; j++)
- buf[i][j] = i+j;
-
- status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
-
- status = H5Sclose (dataspace_id);
- status = H5Dclose (dataset_id);
- status = H5Pclose (plist_id);
- status = H5Fclose (file_id);
-
- /* Now reopen the file and dataset in the file. */
- file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- dataset_id = H5Dopen2 (file_id, "Compressed_Data", H5P_DEFAULT);
-
- /* Retrieve filter information. */
- plist_id = H5Dget_create_plist (dataset_id);
-
- numfilt = H5Pget_nfilters (plist_id);
- printf ("Number of filters associated with dataset: %i\n", numfilt);
-
- for (i=0; i<numfilt; i++) {
- nelmts = 0;
- filter_type = H5Pget_filter2 (plist_id, 0, &flags, &nelmts, NULL, 0, NULL,
- &filter_info);
- printf ("Filter Type: ");
- switch (filter_type) {
- case H5Z_FILTER_DEFLATE:
- printf ("H5Z_FILTER_DEFLATE\n");
- break;
- case H5Z_FILTER_SZIP:
- printf ("H5Z_FILTER_SZIP\n");
- break;
- default:
- printf ("Other filter type included.\n");
- }
- }
-
- status = H5Dread (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, rbuf);
-
- status = H5Dclose (dataset_id);
- status = H5Pclose (plist_id);
- status = H5Fclose (file_id);
-}
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create a compressed dataset.
+ * It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+
+#define FILE "cmprss.h5"
+#define RANK 2
+#define DIM0 100
+#define DIM1 20
+
+int main () {
+
+ hid_t file_id, dataset_id, dataspace_id; /* identifiers */
+ hid_t plist_id;
+
+ size_t nelmts;
+ unsigned flags, filter_info;
+ H5Z_filter_t filter_type;
+
+ herr_t status;
+ hsize_t dims[2];
+ hsize_t cdims[2];
+
+ int idx;
+ int i,j, numfilt;
+ int buf[DIM0][DIM1];
+ int rbuf [DIM0][DIM1];
+
+ /* Uncomment these variables to use SZIP compression
+ unsigned szip_options_mask;
+ unsigned szip_pixels_per_block;
+ */
+
+ /* Create a file. */
+ file_id = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+
+ /* Create dataset "Compressed Data" in the group using absolute name. */
+ dims[0] = DIM0;
+ dims[1] = DIM1;
+ dataspace_id = H5Screate_simple (RANK, dims, NULL);
+
+ plist_id = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Dataset must be chunked for compression */
+ cdims[0] = 20;
+ cdims[1] = 20;
+ status = H5Pset_chunk (plist_id, 2, cdims);
+
+ /* Set ZLIB / DEFLATE Compression using compression level 6.
+ * To use SZIP Compression comment out these lines.
+ */
+ status = H5Pset_deflate (plist_id, 6);
+
+ /* Uncomment these lines to set SZIP Compression
+ szip_options_mask = H5_SZIP_NN_OPTION_MASK;
+ szip_pixels_per_block = 16;
+ status = H5Pset_szip (plist_id, szip_options_mask, szip_pixels_per_block);
+ */
+
+ dataset_id = H5Dcreate2 (file_id, "Compressed_Data", H5T_STD_I32BE,
+ dataspace_id, H5P_DEFAULT, plist_id, H5P_DEFAULT);
+
+ for (i = 0; i< DIM0; i++)
+ for (j=0; j<DIM1; j++)
+ buf[i][j] = i+j;
+
+ status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+
+ status = H5Sclose (dataspace_id);
+ status = H5Dclose (dataset_id);
+ status = H5Pclose (plist_id);
+ status = H5Fclose (file_id);
+
+ /* Now reopen the file and dataset in the file. */
+ file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ dataset_id = H5Dopen2 (file_id, "Compressed_Data", H5P_DEFAULT);
+
+ /* Retrieve filter information. */
+ plist_id = H5Dget_create_plist (dataset_id);
+
+ numfilt = H5Pget_nfilters (plist_id);
+ printf ("Number of filters associated with dataset: %i\n", numfilt);
+
+ for (i=0; i<numfilt; i++) {
+ nelmts = 0;
+ filter_type = H5Pget_filter2 (plist_id, 0, &flags, &nelmts, NULL, 0, NULL,
+ &filter_info);
+ printf ("Filter Type: ");
+ switch (filter_type) {
+ case H5Z_FILTER_DEFLATE:
+ printf ("H5Z_FILTER_DEFLATE\n");
+ break;
+ case H5Z_FILTER_SZIP:
+ printf ("H5Z_FILTER_SZIP\n");
+ break;
+ default:
+ printf ("Other filter type included.\n");
+ }
+ }
+
+ status = H5Dread (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, rbuf);
+
+ status = H5Dclose (dataset_id);
+ status = H5Pclose (plist_id);
+ status = H5Fclose (file_id);
+}
diff --git a/examples/h5_crtatt.c b/examples/h5_crtatt.c
index 416839f..5e1378c 100644
--- a/examples/h5_crtatt.c
+++ b/examples/h5_crtatt.c
@@ -1,63 +1,63 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates how to create an attribute attached to a
- * dataset. It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-#define FILE "dset.h5"
-
-int main() {
-
- hid_t file_id, dataset_id, attribute_id, dataspace_id; /* identifiers */
- hsize_t dims;
- int attr_data[2];
- herr_t status;
-
- /* Initialize the attribute data. */
- attr_data[0] = 100;
- attr_data[1] = 200;
-
- /* Open an existing file. */
- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
-
- /* Open an existing dataset. */
- dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
-
- /* Create the data space for the attribute. */
- dims = 2;
- dataspace_id = H5Screate_simple(1, &dims, NULL);
-
- /* Create a dataset attribute. */
- attribute_id = H5Acreate2 (dataset_id, "Units", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT);
-
- /* Write the attribute data. */
- status = H5Awrite(attribute_id, H5T_NATIVE_INT, attr_data);
-
- /* Close the attribute. */
- status = H5Aclose(attribute_id);
-
- /* Close the dataspace. */
- status = H5Sclose(dataspace_id);
-
- /* Close to the dataset. */
- status = H5Dclose(dataset_id);
-
- /* Close the file. */
- status = H5Fclose(file_id);
-}
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create an attribute attached to a
+ * dataset. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "dset.h5"
+
+int main() {
+
+ hid_t file_id, dataset_id, attribute_id, dataspace_id; /* identifiers */
+ hsize_t dims;
+ int attr_data[2];
+ herr_t status;
+
+ /* Initialize the attribute data. */
+ attr_data[0] = 100;
+ attr_data[1] = 200;
+
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Open an existing dataset. */
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
+
+ /* Create the data space for the attribute. */
+ dims = 2;
+ dataspace_id = H5Screate_simple(1, &dims, NULL);
+
+ /* Create a dataset attribute. */
+ attribute_id = H5Acreate2 (dataset_id, "Units", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write the attribute data. */
+ status = H5Awrite(attribute_id, H5T_NATIVE_INT, attr_data);
+
+ /* Close the attribute. */
+ status = H5Aclose(attribute_id);
+
+ /* Close the dataspace. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close to the dataset. */
+ status = H5Dclose(dataset_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_crtdat.c b/examples/h5_crtdat.c
index bbb29b2..f9327e7 100644
--- a/examples/h5_crtdat.c
+++ b/examples/h5_crtdat.c
@@ -1,51 +1,51 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates how to create a dataset that is a 4 x 6
- * array. It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-#define FILE "dset.h5"
-
-int main() {
-
- hid_t file_id, dataset_id, dataspace_id; /* identifiers */
- hsize_t dims[2];
- herr_t status;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Create the data space for the dataset. */
- dims[0] = 4;
- dims[1] = 6;
- dataspace_id = H5Screate_simple(2, dims, NULL);
-
- /* Create the dataset. */
- dataset_id = H5Dcreate2(file_id, "/dset", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* End access to the dataset and release resources used by it. */
- status = H5Dclose(dataset_id);
-
- /* Terminate access to the data space. */
- status = H5Sclose(dataspace_id);
-
- /* Close the file. */
- status = H5Fclose(file_id);
-}
-
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create a dataset that is a 4 x 6
+ * array. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "dset.h5"
+
+int main() {
+
+ hid_t file_id, dataset_id, dataspace_id; /* identifiers */
+ hsize_t dims[2];
+ herr_t status;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create the data space for the dataset. */
+ dims[0] = 4;
+ dims[1] = 6;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
+
+ /* Create the dataset. */
+ dataset_id = H5Dcreate2(file_id, "/dset", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* End access to the dataset and release resources used by it. */
+ status = H5Dclose(dataset_id);
+
+ /* Terminate access to the data space. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
+
diff --git a/examples/h5_crtgrp.c b/examples/h5_crtgrp.c
index 3a94a8f..a626ed8 100644
--- a/examples/h5_crtgrp.c
+++ b/examples/h5_crtgrp.c
@@ -1,40 +1,40 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates how to create and close a group.
- * It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-#define FILE "group.h5"
-
-int main() {
-
- hid_t file_id, group_id; /* identifiers */
- herr_t status;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Create a group named "/MyGroup" in the file. */
- group_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Close the group. */
- status = H5Gclose(group_id);
-
- /* Terminate access to the file. */
- status = H5Fclose(file_id);
-}
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create and close a group.
+ * It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "group.h5"
+
+int main() {
+
+ hid_t file_id, group_id; /* identifiers */
+ herr_t status;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create a group named "/MyGroup" in the file. */
+ group_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Close the group. */
+ status = H5Gclose(group_id);
+
+ /* Terminate access to the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_crtgrpar.c b/examples/h5_crtgrpar.c
index 9e6fc40..e8cf7c3 100644
--- a/examples/h5_crtgrpar.c
+++ b/examples/h5_crtgrpar.c
@@ -1,48 +1,48 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates the creation of groups using absolute and
- * relative names. It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-#define FILE "groups.h5"
-
-int main() {
-
- hid_t file_id, group1_id, group2_id, group3_id; /* identifiers */
- herr_t status;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Create group "MyGroup" in the root group using absolute name. */
- group1_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Create group "Group_A" in group "MyGroup" using absolute name. */
- group2_id = H5Gcreate2(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Create group "Group_B" in group "MyGroup" using relative name. */
- group3_id = H5Gcreate2(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Close groups. */
- status = H5Gclose(group1_id);
- status = H5Gclose(group2_id);
- status = H5Gclose(group3_id);
-
- /* Close the file. */
- status = H5Fclose(file_id);
-}
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates the creation of groups using absolute and
+ * relative names. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "groups.h5"
+
+int main() {
+
+ hid_t file_id, group1_id, group2_id, group3_id; /* identifiers */
+ herr_t status;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create group "MyGroup" in the root group using absolute name. */
+ group1_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create group "Group_A" in group "MyGroup" using absolute name. */
+ group2_id = H5Gcreate2(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create group "Group_B" in group "MyGroup" using relative name. */
+ group3_id = H5Gcreate2(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Close groups. */
+ status = H5Gclose(group1_id);
+ status = H5Gclose(group2_id);
+ status = H5Gclose(group3_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_crtgrpd.c b/examples/h5_crtgrpd.c
index 9c45928..d6a320b 100644
--- a/examples/h5_crtgrpd.c
+++ b/examples/h5_crtgrpd.c
@@ -1,91 +1,91 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates how to create a dataset in a group.
- * It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-#define FILE "groups.h5"
-
-int main() {
-
- hid_t file_id, group_id, dataset_id, dataspace_id; /* identifiers */
- hsize_t dims[2];
- herr_t status;
- int i, j, dset1_data[3][3], dset2_data[2][10];
-
- /* Initialize the first dataset. */
- for (i = 0; i < 3; i++)
- for (j = 0; j < 3; j++)
- dset1_data[i][j] = j + 1;
-
- /* Initialize the second dataset. */
- for (i = 0; i < 2; i++)
- for (j = 0; j < 10; j++)
- dset2_data[i][j] = j + 1;
-
- /* Open an existing file. */
- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
-
- /* Create the data space for the first dataset. */
- dims[0] = 3;
- dims[1] = 3;
- dataspace_id = H5Screate_simple(2, dims, NULL);
-
- /* Create a dataset in group "MyGroup". */
- dataset_id = H5Dcreate2(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Write the first dataset. */
- status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset1_data);
-
- /* Close the data space for the first dataset. */
- status = H5Sclose(dataspace_id);
-
- /* Close the first dataset. */
- status = H5Dclose(dataset_id);
-
- /* Open an existing group of the specified file. */
- group_id = H5Gopen2(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
-
- /* Create the data space for the second dataset. */
- dims[0] = 2;
- dims[1] = 10;
- dataspace_id = H5Screate_simple(2, dims, NULL);
-
- /* Create the second dataset in group "Group_A". */
- dataset_id = H5Dcreate2(group_id, "dset2", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Write the second dataset. */
- status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset2_data);
-
- /* Close the data space for the second dataset. */
- status = H5Sclose(dataspace_id);
-
- /* Close the second dataset */
- status = H5Dclose(dataset_id);
-
- /* Close the group. */
- status = H5Gclose(group_id);
-
- /* Close the file. */
- status = H5Fclose(file_id);
-}
-
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create a dataset in a group.
+ * It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "groups.h5"
+
+int main() {
+
+ hid_t file_id, group_id, dataset_id, dataspace_id; /* identifiers */
+ hsize_t dims[2];
+ herr_t status;
+ int i, j, dset1_data[3][3], dset2_data[2][10];
+
+ /* Initialize the first dataset. */
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++)
+ dset1_data[i][j] = j + 1;
+
+ /* Initialize the second dataset. */
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 10; j++)
+ dset2_data[i][j] = j + 1;
+
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Create the data space for the first dataset. */
+ dims[0] = 3;
+ dims[1] = 3;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
+
+ /* Create a dataset in group "MyGroup". */
+ dataset_id = H5Dcreate2(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write the first dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset1_data);
+
+ /* Close the data space for the first dataset. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close the first dataset. */
+ status = H5Dclose(dataset_id);
+
+ /* Open an existing group of the specified file. */
+ group_id = H5Gopen2(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
+
+ /* Create the data space for the second dataset. */
+ dims[0] = 2;
+ dims[1] = 10;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
+
+ /* Create the second dataset in group "Group_A". */
+ dataset_id = H5Dcreate2(group_id, "dset2", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write the second dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset2_data);
+
+ /* Close the data space for the second dataset. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close the second dataset */
+ status = H5Dclose(dataset_id);
+
+ /* Close the group. */
+ status = H5Gclose(group_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
+
diff --git a/examples/h5_rdwt.c b/examples/h5_rdwt.c
index d5444e0..0e290ca 100644
--- a/examples/h5_rdwt.c
+++ b/examples/h5_rdwt.c
@@ -1,53 +1,53 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This example illustrates how to write and read data in an existing
- * dataset. It is used in the HDF5 Tutorial.
- */
-
-#include "hdf5.h"
-#define FILE "dset.h5"
-
-int main() {
-
- hid_t file_id, dataset_id; /* identifiers */
- herr_t status;
- int i, j, dset_data[4][6];
-
- /* Initialize the dataset. */
- for (i = 0; i < 4; i++)
- for (j = 0; j < 6; j++)
- dset_data[i][j] = i * 6 + j + 1;
-
- /* Open an existing file. */
- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
-
- /* Open an existing dataset. */
- dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
-
- /* Write the dataset. */
- status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset_data);
-
- status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset_data);
-
- /* Close the dataset. */
- status = H5Dclose(dataset_id);
-
- /* Close the file. */
- status = H5Fclose(file_id);
-}
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to write and read data in an existing
+ * dataset. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "dset.h5"
+
+int main() {
+
+ hid_t file_id, dataset_id; /* identifiers */
+ herr_t status;
+ int i, j, dset_data[4][6];
+
+ /* Initialize the dataset. */
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 6; j++)
+ dset_data[i][j] = i * 6 + j + 1;
+
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Open an existing dataset. */
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
+
+ /* Write the dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset_data);
+
+ status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset_data);
+
+ /* Close the dataset. */
+ status = H5Dclose(dataset_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 121fd86..b1c7f6a 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -502,7 +502,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index e994d4e..feed32c 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -26,6 +26,8 @@ if BUILD_PARALLEL_CONDITIONAL
EXAMPLE_PROG_PARA=ph5example
endif
+INSTALL_SCRIPT_FILES = run-fortran-ex.sh
+
# These are the programs that 'make all' or 'make tests' will build and
# that 'make check' will run. List them in the order in which they should
# be run.
@@ -41,7 +43,6 @@ INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \
h5_crtatt.f90 h5_crtgrp.f90 h5_crtgrpar.f90 h5_crtgrpd.f90 \
h5_extend.f90 h5_subset.f90 h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
refregexample.f90 mountexample.f90 compound.f90 ph5example.f90
-INSTALL_SCRIPT_FILES = run-fortran-ex.sh
# Add attention tests for Fortran 2003 features
@@ -52,6 +53,7 @@ if FORTRAN_2003_CONDITIONAL_F
compound_fortran2003.f90 compound_complex_fortran2003.f90
endif
TEST_SCRIPT=testh5fc.sh
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# Mark this directory as part of the Fortran API
FORTRAN_API=yes
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index ce2251d..890d52a 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -454,7 +454,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -624,6 +623,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# Compile parallel fortran examples only if parallel is enabled
@BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example
+INSTALL_SCRIPT_FILES = run-fortran-ex.sh
# These are the programs that 'make all' or 'make tests' will build and
# that 'make check' will run. List them in the order in which they should
@@ -641,8 +641,8 @@ INSTALL_FILES = h5_crtdat.f90 h5_rdwt.f90 h5_crtatt.f90 h5_crtgrp.f90 \
h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 \
$(am__append_2)
-INSTALL_SCRIPT_FILES = run-fortran-ex.sh
TEST_SCRIPT = testh5fc.sh
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# Mark this directory as part of the Fortran API
FORTRAN_API = yes
@@ -1122,27 +1122,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/fortran/examples/h5_cmprss.f90 b/fortran/examples/h5_cmprss.f90
index 847a922..9ab28f7 100644
--- a/fortran/examples/h5_cmprss.f90
+++ b/fortran/examples/h5_cmprss.f90
@@ -1,131 +1,131 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! 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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-! This example illustrates how to create a compressed dataset.
-! It is used in the HDF5 Tutorial.
-!
-PROGRAM h5_cmprss
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- !
- ! The dataset is stored in file "h5_cmprss.h5"
- !
- CHARACTER(LEN=12), PARAMETER :: filename = "h5_cmprss.h5"
- INTEGER, PARAMETER :: rank = 2 ! Rank of the data set
- INTEGER, PARAMETER :: dim0 = 100 ! Data set sizes
- INTEGER, PARAMETER :: dim1 = 20
-
- INTEGER(hid_t) :: file_id, dataset_id, dataspace_id ! Identifiers
- INTEGER(hid_t) :: plist_id ! Property list identifier
-
- INTEGER :: error
- INTEGER(hsize_t), DIMENSION(1:rank) :: dims ! dimensions of data
- INTEGER(hsize_t), DIMENSION(1:rank) :: cdims ! sizes of chunked data
-
- INTEGER :: i,j, numfilt
- INTEGER, DIMENSION(1:dim0,1:dim1) :: buf ! write buffer
- INTEGER, DIMENSION(1:dim0,1:dim1) :: rbuf ! read buffer
- INTEGER(HSIZE_T), DIMENSION(1:rank) :: data_dims ! dimensions of data buffers
-
- INTEGER, DIMENSION(1:1) :: cd_values ! Auxiliary data for the filter
- INTEGER(size_t) :: nelmts ! Number of elements in cd_values
- INTEGER :: flags ! Bit vector specifying certain general properties of the filter
- INTEGER(SIZE_T) :: namelen = 180 ! Anticipated number of characters in name
- CHARACTER(LEN=180) :: name ! Name of the filter
- INTEGER :: filter_id ! Filter identification number
-
- ! Uncomment these variables to use SZIP compression
- !INTEGER :: szip_options_mask
- !INTEGER :: szip_pixels_per_block
-
- !
- !Initialize FORTRAN predifined datatypes
- !
- CALL h5open_f(error)
- !
- ! Create a file
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
- !
- ! Create dataset "Compressed Data" in the group using absolute name.
- dims(1:2) = (/dim0, dim1/)
- CALL h5screate_simple_f(rank, dims, dataspace_id, error)
- CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
- !
- ! Dataset must be chunked for compression
- cdims(1:2) = 20
- CALL h5pset_chunk_f(plist_id, 2, cdims, error)
-
- ! Set ZLIB / DEFLATE Compression using compression level 6.
- ! To use SZIP Compression comment out these lines.
- CALL h5pset_deflate_f(plist_id, 6, error)
-
- ! Uncomment these lines to set SZIP Compression
- !szip_options_mask = H5_SZIP_NN_OM_F
- !szip_pixels_per_block = 16
- !CALL H5Pset_szip_f(plist_id, szip_options_mask, szip_pixels_per_block, error)
-
- ! Create data set
- CALL h5dcreate_f(file_id, "Compressed_Data", H5T_NATIVE_INTEGER, dataspace_id, &
- dataset_id, error, dcpl_id=plist_id)
-
- DO j = 1, dim1
- DO i = 1, dim0
- buf(i,j) = i+j
- ENDDO
- ENDDO
-
- data_dims(1:2) = (/dim0,dim1/)
- CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, buf, data_dims, error)
-
- ! Close resources
- CALL h5sclose_f(dataspace_id, error)
- CALL h5pclose_f(plist_id, error)
- CALL h5dclose_f(dataset_id, error)
- CALL h5fclose_f(file_id, error)
-
- ! Now reopen the file and dataset in the file.
- CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error)
- CALL h5dopen_f(file_id, "Compressed_Data", dataset_id, error)
-
- ! Retrieve filter information.
- CALL h5dget_create_plist_f(dataset_id, plist_id, error)
-
- CALL h5pget_nfilters_f(plist_id, numfilt, error)
- WRITE(*,'(A, I0)') "Number of filters associated with dataset: ", numfilt
-
- DO i = 1, numfilt
- nelmts = 1
- CALL h5pget_filter_f(plist_id, 0, flags, nelmts, cd_values, &
- namelen, name, filter_id, error)
-
- WRITE(*,'(30X,A)', ADVANCE='NO')"Filter Type: "
- IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
- WRITE(*,'(A)') "H5Z_FILTER_DEFLATE"
- ELSEIF (filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
- WRITE(*,'(A)') "H5Z_FILTER_SZIP"
- ELSE
- WRITE(*,'(A)') "Other filter type included"
- ENDIF
- ENDDO
- data_dims(1:2) = (/dim0,dim1/)
- CALL h5dread_f(dataset_id, H5T_NATIVE_INTEGER, rbuf, data_dims, error)
-
- CALL h5dclose_f(dataset_id, error)
- CALL h5pclose_f(plist_id, error)
- CALL h5fclose_f(file_id, error)
-
-END PROGRAM h5_cmprss
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example illustrates how to create a compressed dataset.
+! It is used in the HDF5 Tutorial.
+!
+PROGRAM h5_cmprss
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ !
+ ! The dataset is stored in file "h5_cmprss.h5"
+ !
+ CHARACTER(LEN=12), PARAMETER :: filename = "h5_cmprss.h5"
+ INTEGER, PARAMETER :: rank = 2 ! Rank of the data set
+ INTEGER, PARAMETER :: dim0 = 100 ! Data set sizes
+ INTEGER, PARAMETER :: dim1 = 20
+
+ INTEGER(hid_t) :: file_id, dataset_id, dataspace_id ! Identifiers
+ INTEGER(hid_t) :: plist_id ! Property list identifier
+
+ INTEGER :: error
+ INTEGER(hsize_t), DIMENSION(1:rank) :: dims ! dimensions of data
+ INTEGER(hsize_t), DIMENSION(1:rank) :: cdims ! sizes of chunked data
+
+ INTEGER :: i,j, numfilt
+ INTEGER, DIMENSION(1:dim0,1:dim1) :: buf ! write buffer
+ INTEGER, DIMENSION(1:dim0,1:dim1) :: rbuf ! read buffer
+ INTEGER(HSIZE_T), DIMENSION(1:rank) :: data_dims ! dimensions of data buffers
+
+ INTEGER, DIMENSION(1:1) :: cd_values ! Auxiliary data for the filter
+ INTEGER(size_t) :: nelmts ! Number of elements in cd_values
+ INTEGER :: flags ! Bit vector specifying certain general properties of the filter
+ INTEGER(SIZE_T) :: namelen = 180 ! Anticipated number of characters in name
+ CHARACTER(LEN=180) :: name ! Name of the filter
+ INTEGER :: filter_id ! Filter identification number
+
+ ! Uncomment these variables to use SZIP compression
+ !INTEGER :: szip_options_mask
+ !INTEGER :: szip_pixels_per_block
+
+ !
+ !Initialize FORTRAN predifined datatypes
+ !
+ CALL h5open_f(error)
+ !
+ ! Create a file
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+ !
+ ! Create dataset "Compressed Data" in the group using absolute name.
+ dims(1:2) = (/dim0, dim1/)
+ CALL h5screate_simple_f(rank, dims, dataspace_id, error)
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
+ !
+ ! Dataset must be chunked for compression
+ cdims(1:2) = 20
+ CALL h5pset_chunk_f(plist_id, 2, cdims, error)
+
+ ! Set ZLIB / DEFLATE Compression using compression level 6.
+ ! To use SZIP Compression comment out these lines.
+ CALL h5pset_deflate_f(plist_id, 6, error)
+
+ ! Uncomment these lines to set SZIP Compression
+ !szip_options_mask = H5_SZIP_NN_OM_F
+ !szip_pixels_per_block = 16
+ !CALL H5Pset_szip_f(plist_id, szip_options_mask, szip_pixels_per_block, error)
+
+ ! Create data set
+ CALL h5dcreate_f(file_id, "Compressed_Data", H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error, dcpl_id=plist_id)
+
+ DO j = 1, dim1
+ DO i = 1, dim0
+ buf(i,j) = i+j
+ ENDDO
+ ENDDO
+
+ data_dims(1:2) = (/dim0,dim1/)
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, buf, data_dims, error)
+
+ ! Close resources
+ CALL h5sclose_f(dataspace_id, error)
+ CALL h5pclose_f(plist_id, error)
+ CALL h5dclose_f(dataset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ ! Now reopen the file and dataset in the file.
+ CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error)
+ CALL h5dopen_f(file_id, "Compressed_Data", dataset_id, error)
+
+ ! Retrieve filter information.
+ CALL h5dget_create_plist_f(dataset_id, plist_id, error)
+
+ CALL h5pget_nfilters_f(plist_id, numfilt, error)
+ WRITE(*,'(A, I0)') "Number of filters associated with dataset: ", numfilt
+
+ DO i = 1, numfilt
+ nelmts = 1
+ CALL h5pget_filter_f(plist_id, 0, flags, nelmts, cd_values, &
+ namelen, name, filter_id, error)
+
+ WRITE(*,'(30X,A)', ADVANCE='NO')"Filter Type: "
+ IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
+ WRITE(*,'(A)') "H5Z_FILTER_DEFLATE"
+ ELSEIF (filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
+ WRITE(*,'(A)') "H5Z_FILTER_SZIP"
+ ELSE
+ WRITE(*,'(A)') "Other filter type included"
+ ENDIF
+ ENDDO
+ data_dims(1:2) = (/dim0,dim1/)
+ CALL h5dread_f(dataset_id, H5T_NATIVE_INTEGER, rbuf, data_dims, error)
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL h5pclose_f(plist_id, error)
+ CALL h5fclose_f(file_id, error)
+
+END PROGRAM h5_cmprss
diff --git a/fortran/examples/h5_extend.f90 b/fortran/examples/h5_extend.f90
index 1316281..315d84f 100644
--- a/fortran/examples/h5_extend.f90
+++ b/fortran/examples/h5_extend.f90
@@ -73,7 +73,7 @@ PROGRAM H5_EXTEND
!
!general purpose integer
!
- INTEGER :: i, j
+ INTEGER(HSIZE_T) :: i, j
!
!flag to check operation success
diff --git a/fortran/examples/hyperslab.f90 b/fortran/examples/hyperslab.f90
index ca27f35..7823ff6 100644
--- a/fortran/examples/hyperslab.f90
+++ b/fortran/examples/hyperslab.f90
@@ -33,8 +33,6 @@
INTEGER(HSIZE_T), DIMENSION(3) :: dimsm = (/7,7,3/) ! Dataset dimensions
! in memory
- INTEGER(HSIZE_T), DIMENSION(2) :: dims_out ! Buffer to read in dataset
- ! dimesions
INTEGER(HSIZE_T), DIMENSION(2) :: dimsf = (/5,6/) ! Dataset dimensions.
INTEGER(HSIZE_T), DIMENSION(2) :: count = (/3,4/)
@@ -49,16 +47,15 @@
INTEGER, DIMENSION(7,7,3) :: data_out ! Output buffer
INTEGER :: dsetrank = 2 ! Dataset rank ( in file )
INTEGER :: memrank = 3 ! Dataset rank ( in memory )
- INTEGER :: rank
INTEGER :: i, j, k
- INTEGER :: error, error_n ! Error flags
+ INTEGER :: error ! Error flag
INTEGER(HSIZE_T), DIMENSION(3) :: data_dims
- !
- ! Write data to the HDF5 file.
- !
+ !
+ ! Write data to the HDF5 file.
+ !
!
! Data initialization.
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index c5c379e..ead7361 100644
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -63,19 +63,15 @@ RunTest()
./$TEST_EXEC
}
-
+F2003_ENABLED=@HAVE_FORTRAN_2003@
################## MAIN ##################
# Run tests
if [ $? -eq 0 ]
then
- if (RunTest h5_cmprss &&\
- rm h5_cmprss &&\
- RunTest h5_crtdat &&\
+ if (RunTest h5_crtdat &&\
rm h5_crtdat &&\
- RunTest h5_extend &&\
- rm h5_extend &&\
RunTest h5_rdwt &&\
rm h5_rdwt &&\
RunTest h5_crtatt &&\
@@ -86,14 +82,16 @@ then
rm h5_crtgrpar &&\
RunTest h5_crtgrpd &&\
rm h5_crtgrpd &&\
+ RunTest h5_extend &&\
+ rm h5_extend &&\
RunTest h5_subset &&\
rm h5_subset &&\
+ RunTest h5_cmprss &&\
+ rm h5_cmprss &&\
RunTest hyperslab &&\
rm hyperslab &&\
RunTest selectele &&\
rm selectele &&\
- RunTest grpit &&\
- rm grpit &&\
RunTest refobjexample &&\
rm refobjexample &&\
RunTest refregexample &&\
@@ -108,6 +106,24 @@ then
fi
fi
+if [ $EXIT_VALUE -eq ${EXIT_SUCCESS} -a "$F2003_ENABLED" = "yes" ]
+then
+# Add attention tests for Fortran 2003 features
+ if (RunTest rwdset_fortran2003 &&\
+ rm rwdset_fortran2003 &&\
+ RunTest nested_derived_type &&\
+ rm nested_derived_type &&\
+ RunTest compound_fortran2003 &&\
+ rm compound_fortran2003 &&\
+ RunTest compound_complex_fortran2003 &&\
+ rm compound_complex_fortran2003); then
+ EXIT_VALUE=${EXIT_SUCCESS}
+ else
+ EXIT_VALUE=${EXIT_FAILURE}
+ fi
+fi
+
+
# Cleanup
rm *.o
rm *.h5
diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90
index 74bda85..d65db9e 100644
--- a/fortran/examples/rwdset_fortran2003.f90
+++ b/fortran/examples/rwdset_fortran2003.f90
@@ -53,13 +53,11 @@ PROGRAM RWDSET_FORTRAN2003
INTEGER(HID_T) :: dset_idr8 ! Dataset identifier
INTEGER :: error ! Error flag
- INTEGER :: i, j
+ INTEGER :: i
! Data buffers:
- INTEGER, DIMENSION(1:4) :: dset_data
-
- INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1
+ INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1
INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4
INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8
INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16
@@ -73,7 +71,6 @@ PROGRAM RWDSET_FORTRAN2003
INTEGER(HID_T) :: dspace_id ! Dataspace identifier
TYPE(C_PTR) :: f_ptr
- INTEGER(hid_t) :: datatype !/* Common datatype ID */
!
! Initialize FORTRAN interface.
diff --git a/fortran/examples/selectele.f90 b/fortran/examples/selectele.f90
index 3ab7ebc..dcd2379 100644
--- a/fortran/examples/selectele.f90
+++ b/fortran/examples/selectele.f90
@@ -64,14 +64,13 @@
INTEGER :: i, j
INTEGER :: error ! Error flag
- LOGICAL :: status
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
- !
- ! Create two files containing identical datasets. Write 0's to one
- ! and 1's to the other.
- !
+ !
+ ! Create two files containing identical datasets. Write 0's to one
+ ! and 1's to the other.
+ !
!
! Data initialization.
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 204495a..723e930 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -272,6 +272,7 @@ if (WIN32)
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5fortran_types.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5test_kind_sizeof_mod.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/hdf5.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5global.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e.mod
@@ -279,6 +280,7 @@ if (WIN32)
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5g.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5i.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lib.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r.mod
@@ -290,6 +292,7 @@ if (WIN32)
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lib_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r_provisional.mod
@@ -305,6 +308,7 @@ else (WIN32)
FILES
${CMAKE_Fortran_MODULE_DIRECTORY}/h5fortran_types.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/hdf5.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5global.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5a.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5d.mod
@@ -313,6 +317,7 @@ else (WIN32)
${CMAKE_Fortran_MODULE_DIRECTORY}/h5g.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5i.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5l.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lib.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5o.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5p.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5r.mod
@@ -324,6 +329,7 @@ else (WIN32)
${CMAKE_Fortran_MODULE_DIRECTORY}/h5e_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5e_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5l_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lib_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5o_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5p_provisional.mod
${CMAKE_Fortran_MODULE_DIRECTORY}/h5r_provisional.mod
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index 18ad784..0d85252 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -246,7 +246,7 @@ CONTAINS
! H5P_ROOT_F
! H5P_FILE_CREATE_F
! H5P_FILE_ACCESS_F
-! H5PE_DATASET_CREATE_F
+! H5P_DATASET_CREATE_F
! H5P_DATASET_XFER_F
! H5P_FILE_MOUNT_F
! hdferr: - error code
@@ -271,7 +271,7 @@ CONTAINS
! H5P_ROOT_F
! H5P_FILE_CREATE_F
! H5P_FILE_ACCESS_F
- ! H5PE_DATASET_CREATE_F
+ ! H5P_DATASET_CREATE_F
! H5P_DATASET_XFER_F
! H5P_FILE_MOUNT_F
INTEGER, INTENT(OUT) :: hdferr ! Error code
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 5e190a2..af0e6ee 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -79,11 +79,8 @@ libhdf5_fortran_la_SOURCES=H5f90global.f90 \
H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
-# HDF5 Fortran library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-if LT_ADD_LIBHDF5_DEPENDENCY
+# HDF5 Fortran library depends on HDF5 Library.
libhdf5_fortran_la_LIBADD=$(LIBHDF5)
-endif
# h5fc is generated during configure.
# Remove it only when distclean.
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 504c413..6e4772d 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -148,8 +148,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_fortran_la_DEPENDENCIES = \
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@ $(LIBHDF5)
+libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5)
am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \
H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 \
H5Dff.f90 H5Eff.f90 H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 \
@@ -564,7 +563,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -735,7 +733,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
AM_FCLIBS = $(LIBHDF5)
@@ -774,9 +772,8 @@ libhdf5_fortran_la_SOURCES = H5f90global.f90 \
H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
-# HDF5 Fortran library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_fortran_la_LIBADD = $(LIBHDF5)
+# HDF5 Fortran library depends on HDF5 Library.
+libhdf5_fortran_la_LIBADD = $(LIBHDF5)
# h5fc is generated during configure.
# Remove it only when distclean.
diff --git a/fortran/src/README_DEVELOPEMENT b/fortran/src/README_DEVELOPEMENT
index dc65f47..43982e1 100644
--- a/fortran/src/README_DEVELOPEMENT
+++ b/fortran/src/README_DEVELOPEMENT
@@ -1,13 +1,15 @@
-Procedure to add a new function:
+Procedure to add a new function
+---------------------------------
(1) Edit the fortran/src/H5*ff.f90 file
-(2) Edit the fortran/sr/H5*f.c file
+(2) Edit the fortran/src/H5*f.c file
(3) Edit the fortran/src/H5f90proto.h file
+(4) Add the new function to fortran/src/hdf5_fortrandll.def.in
+Procedure for passing C variables to Fortran
+---------------------------------------------
-
-Procedure:
-(1) Find the struct name you are interested in:
+(1) Find the C struct name you are interested in:
(a) src/H5public.h if it is a generic type, i.e. H5_*
or
(b) src/H5*public.h if is a specific type, i.e. H5*_
@@ -17,7 +19,7 @@ Procedure:
(b) edit fortran/src/H5f90proto.h and edit nh5init_flags_c interface call
(3) Edit the function call in fortran/src/H5_ff.f90
- (a) edit the call FUNCTION h5init_flags_c
+ (a) edit the call: FUNCTION h5init_flags_c
(b) edit h5init_flags_c call in h5open_f to match the number of arguments passing
(4) add the size of the array and array to fortran/src/H5f90global.f90
@@ -25,12 +27,12 @@ Procedure:
NOTE: To just add a default C value argument, do steps (2a) and (4)
-Adding a new file to the repository
--------------------------------------
-Add the name of the file to:
- (1) Makefile.am located in the same directory as the newfile
- (2) MANIFEST located in the top level directory
+Procedure for adding a new file to the repository
+--------------------------------------------------
+Add the name of the file to the:
+ (1) Makefile.am located in the same directory as the newfile
+ (2) CMakeLists.txt located in the same directory as the newfile
+ (3) MANIFEST located in the top level directory
-If you add a new file, be sure to add it to the MANIFEST located in the top directory
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 41e93e4..c9c5e76 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -1,572 +1,572 @@
-EXPORTS
-; H5LIB
-H5LIB_mp_H5OPEN_F
-H5LIB_mp_H5CLOSE_F
-H5LIB_mp_H5GET_LIBVERSION_F
-H5LIB_mp_H5CHECK_VERSION_F
-H5LIB_mp_H5GARBAGE_COLLECT_F
-H5LIB_mp_H5DONT_ATEXIT_F
-H5LIB_mp_H5KIND_TO_TYPE
-@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF
-; H5_DBLE_INTERFACE
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_1
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_2
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_3
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_4
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_5
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_6
-H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_7
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_SCALAR
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_1
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_2
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_3
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_4
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_5
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_6
-H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_7
-H5_DBLE_INTERFACE_mp_H5DFILL_DOUBLE
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_SCALAR
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_1
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_2
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_3
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_4
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_5
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_6
-H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_7
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_SCALAR
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_1
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_2
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_3
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_4
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_5
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_6
-H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_7
-H5_DBLE_INTERFACE_mp_H5PGET_DOUBLE
-H5_DBLE_INTERFACE_mp_H5PSET_DOUBLE
-H5_DBLE_INTERFACE_mp_H5PSET_FILL_VALUE_DOUBLE
-H5_DBLE_INTERFACE_mp_H5PGET_FILL_VALUE_DOUBLE
-H5_DBLE_INTERFACE_mp_H5PINSERT_DOUBLE
-H5_DBLE_INTERFACE_mp_H5PREGISTER_DOUBLE
-; H5A
-H5A_mp_H5ACREATE_F
-H5A_mp_H5AOPEN_NAME_F
-H5A_mp_H5AOPEN_IDX_F
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_SCALAR
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_1
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_2
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_3
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_4
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_5
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_6
-H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_7
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_SCALAR
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_1
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_2
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_3
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_4
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_5
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_6
-H5A_PROVISIONAL_mp_H5AWRITE_REAL_7
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_SCALAR
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_1
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_2
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_3
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_4
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_5
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_6
-H5A_PROVISIONAL_mp_H5AWRITE_CHAR_7
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_SCALAR
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_1
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_2
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_3
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_4
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_5
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_6
-H5A_PROVISIONAL_mp_H5AREAD_INTEGER_7
-H5A_PROVISIONAL_mp_H5AREAD_REAL_SCALAR
-H5A_PROVISIONAL_mp_H5AREAD_REAL_1
-H5A_PROVISIONAL_mp_H5AREAD_REAL_2
-H5A_PROVISIONAL_mp_H5AREAD_REAL_3
-H5A_PROVISIONAL_mp_H5AREAD_REAL_4
-H5A_PROVISIONAL_mp_H5AREAD_REAL_5
-H5A_PROVISIONAL_mp_H5AREAD_REAL_6
-H5A_PROVISIONAL_mp_H5AREAD_REAL_7
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_SCALAR
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_1
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_2
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_3
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_4
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_5
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_6
-H5A_PROVISIONAL_mp_H5AREAD_CHAR_7
-H5A_mp_H5AGET_SPACE_F
-H5A_mp_H5AGET_TYPE_F
-H5A_mp_H5AGET_NAME_F
-H5A_mp_H5AGET_NAME_BY_IDX_F
-H5A_mp_H5AGET_NUM_ATTRS_F
-H5A_mp_H5ADELETE_F
-H5A_mp_H5ACLOSE_F
-H5A_mp_H5AGET_STORAGE_SIZE_F
-H5A_mp_H5AGET_CREATE_PLIST_F
-H5A_mp_H5ARENAME_BY_NAME_F
-H5A_mp_H5AOPEN_F
-H5A_mp_H5ADELETE_BY_IDX_F
-H5A_mp_H5ADELETE_BY_NAME_F
-H5A_mp_H5AOPEN_BY_IDX_F
-H5A_mp_H5AGET_INFO_F
-H5A_mp_H5AGET_INFO_BY_IDX_F
-H5A_mp_H5AGET_INFO_BY_NAME_F
-H5A_mp_H5ACREATE_BY_NAME_F
-H5A_mp_H5AEXISTS_F
-H5A_mp_H5AEXISTS_BY_NAME_F
-H5A_mp_H5AOPEN_BY_NAME_F
-H5A_mp_H5ARENAME_F
-@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AWRITE_PTR
-@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AREAD_PTR
-; H5D
-H5D_mp_H5DCREATE_F
-H5D_mp_H5DOPEN_F
-H5D_mp_H5DCLOSE_F
-H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_OBJ
-H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_DSETREG
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_SCALAR
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_1
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_2
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_3
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_4
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_5
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_6
-H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_7
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_SCALAR
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_1
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_2
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_3
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_4
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_5
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_6
-H5D_PROVISIONAL_mp_H5DWRITE_CHAR_7
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_SCALAR
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_1
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_2
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_3
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_4
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_5
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_6
-H5D_PROVISIONAL_mp_H5DWRITE_REAL_7
-H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_OBJ
-H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_DSETREG
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_SCALAR
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_1
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_2
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_3
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_4
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_5
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_6
-H5D_PROVISIONAL_mp_H5DREAD_INTEGER_7
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_SCALAR
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_1
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_2
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_3
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_4
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_5
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_6
-H5D_PROVISIONAL_mp_H5DREAD_CHAR_7
-H5D_PROVISIONAL_mp_H5DREAD_REAL_SCALAR
-H5D_PROVISIONAL_mp_H5DREAD_REAL_1
-H5D_PROVISIONAL_mp_H5DREAD_REAL_2
-H5D_PROVISIONAL_mp_H5DREAD_REAL_3
-H5D_PROVISIONAL_mp_H5DREAD_REAL_4
-H5D_PROVISIONAL_mp_H5DREAD_REAL_5
-H5D_PROVISIONAL_mp_H5DREAD_REAL_6
-H5D_PROVISIONAL_mp_H5DREAD_REAL_7
-H5D_mp_H5DGET_SPACE_F
-H5D_mp_H5DGET_TYPE_F
-H5D_mp_H5DSET_EXTENT_F
-H5D_mp_H5DGET_CREATE_PLIST_F
-H5D_mp_H5DGET_STORAGE_SIZE_F
-H5D_mp_H5DVLEN_GET_MAX_LEN_F
-H5D_mp_H5DWRITE_VL_INTEGER
-H5D_mp_H5DREAD_VL_INTEGER
-H5D_mp_H5DWRITE_VL_REAL
-H5D_mp_H5DREAD_VL_REAL
-H5D_mp_H5DWRITE_VL_STRING
-H5D_mp_H5DREAD_VL_STRING
-H5D_PROVISIONAL_mp_H5DFILL_INTEGER
-H5D_PROVISIONAL_mp_H5DFILL_REAL
-H5D_PROVISIONAL_mp_H5DFILL_CHAR
-H5D_mp_H5DGET_SPACE_STATUS_F
-H5D_mp_H5DCREATE_ANON_F
-H5D_mp_H5DGET_SPACE_F
-H5D_mp_H5DGET_TYPE_F
-H5D_mp_H5DSET_EXTENT_F
-H5D_mp_H5DGET_CREATE_PLIST_F
-H5D_mp_H5DGET_STORAGE_SIZE_F
-H5D_mp_H5DVLEN_GET_MAX_LEN_F
-H5D_mp_H5DGET_ACCESS_PLIST_F
-@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DWRITE_PTR
-@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DREAD_PTR
-@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DVLEN_RECLAIM_F
-; H5E
-H5E_mp_H5ECLEAR_F
-H5E_mp_H5EPRINT_F
-H5E_mp_H5EGET_MAJOR_F
-H5E_mp_H5EGET_MINOR_F
-H5E_PROVISIONAL_mp_H5ESET_AUTO_F
-; H5F
-H5F_mp_H5FCREATE_F
-H5F_mp_H5FFLUSH_F
-H5F_mp_H5FCLOSE_F
-H5F_mp_H5FGET_OBJ_COUNT_F
-H5F_mp_H5FGET_OBJ_IDS_F
-H5F_mp_H5FGET_FREESPACE_F
-H5F_mp_H5FMOUNT_F
-H5F_mp_H5FUNMOUNT_F
-H5F_mp_H5FOPEN_F
-H5F_mp_H5FREOPEN_F
-H5F_mp_H5FGET_CREATE_PLIST_F
-H5F_mp_H5FGET_ACCESS_PLIST_F
-H5F_mp_H5FIS_HDF5_F
-H5F_mp_H5FGET_NAME_F
-H5F_mp_H5FGET_FILESIZE_F
-@H5_NOF03EXP@H5F_PROVISIONAL_mp_H5FGET_FILE_IMAGE_F
-; H5G
-H5G_mp_H5GOPEN_F
-H5G_mp_H5GCREATE_F
-H5G_mp_H5GCLOSE_F
-H5G_mp_H5GGET_OBJ_INFO_IDX_F
-H5G_mp_H5GN_MEMBERS_F
-H5G_mp_H5GLINK_F
-H5G_mp_H5GLINK2_F
-H5G_mp_H5GUNLINK_F
-H5G_mp_H5GMOVE_F
-H5G_mp_H5GMOVE2_F
-H5G_mp_H5GGET_LINKVAL_F
-H5G_mp_H5GSET_COMMENT_F
-H5G_mp_H5GGET_COMMENT_F
-H5G_mp_H5GCREATE_ANON_F
-H5G_mp_H5GGET_CREATE_PLIST_F
-H5G_mp_H5GGET_INFO_F
-H5G_mp_H5GGET_INFO_BY_IDX_F
-H5G_mp_H5GGET_INFO_BY_NAME_F
-H5G_mp_H5GGET_OBJ_INFO_IDX_F
-; H5GLOBAL
-; PREDEFINED_TYPES DATA
-; FLOATING_TYPES DATA
-; INTEGER_TYPES DATA
-; H5F_FLAGS DATA
-; H5GENERIC_FLAGS DATA
-; H5G_FLAGS DATA
-; H5D_FLAGS DATA
-; H5FD_FLAGS DATA
-; H5FD_HID_FLAGS DATA
-; H5I_FLAGS DATA
-; H5L_FLAGS DATA
-; H5O_FLAGS DATA
-; H5P_FLAGS DATA
-; H5P_FLAGS_INT DATA
-; H5R_FLAGS DATA
-; H5S_FLAGS DATA
-; H5T_FLAGS DATA
-; H5Z_FLAGS DATA
-; H5LIB_FLAGS DATA
-; H5I
-H5I_mp_H5IGET_TYPE_F
-H5I_mp_H5IGET_NAME_F
-H5I_mp_H5IINC_REF_F
-H5I_mp_H5IDEC_REF_F
-H5I_mp_H5IGET_REF_F
-H5I_mp_H5IGET_FILE_ID_F
-H5I_mp_H5IIS_VALID_F
-; H5L
-H5L_mp_H5LCOPY_F
-H5L_mp_H5LDELETE_F
-H5L_mp_H5LCREATE_SOFT_F
-H5L_mp_H5LCREATE_HARD_F
-H5L_mp_H5LCREATE_EXTERNAL_F
-H5L_mp_H5LDELETE_BY_IDX_F
-H5L_mp_H5LEXISTS_F
-H5L_mp_H5LGET_INFO_F
-H5L_mp_H5LGET_INFO_BY_IDX_F
-H5L_mp_H5LIS_REGISTERED_F
-H5L_mp_H5LMOVE_F
-H5L_mp_H5LGET_NAME_BY_IDX_F
-@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_F
-@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_BY_NAME_F
-; H5O
-H5O_mp_H5OCLOSE_F
-H5O_mp_H5OCOPY_F
-H5O_mp_H5ODECR_REFCOUNT_F
-H5O_mp_H5OEXISTS_BY_NAME_F
-H5O_mp_H5OGET_COMMENT_F
-H5O_mp_H5OGET_COMMENT_BY_NAME_F
-H5O_mp_H5OINCR_REFCOUNT_F
-H5O_mp_H5OLINK_F
-H5O_mp_H5OOPEN_BY_ADDR_F
-H5O_mp_H5OOPEN_BY_IDX_F
-H5O_mp_H5OOPEN_F
-H5O_mp_H5OSET_COMMENT_F
-H5O_mp_H5OSET_COMMENT_BY_NAME_F
-@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F
-@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F
-@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_F
-@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F
-@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_F
-; H5P
-H5P_mp_H5PCREATE_F
-H5P_mp_H5PSET_PRESERVE_F
-H5P_mp_H5PGET_PRESERVE_F
-H5P_mp_H5PGET_CLASS_F
-H5P_mp_H5PCOPY_F
-H5P_mp_H5PCLOSE_F
-H5P_mp_H5PSET_CHUNK_F
-H5P_mp_H5PGET_CHUNK_F
-H5P_mp_H5PSET_DEFLATE_F
-H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_INTEGER
-H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_INTEGER
-H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_REAL
-H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_REAL
-H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_CHAR
-H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_CHAR
-H5P_mp_H5PGET_VERSION_F
-H5P_mp_H5PSET_USERBLOCK_F
-H5P_mp_H5PGET_USERBLOCK_F
-H5P_mp_H5PSET_SIZES_F
-H5P_mp_H5PGET_SIZES_F
-H5P_mp_H5PSET_SYM_K_F
-H5P_mp_H5PGET_SYM_K_F
-H5P_mp_H5PSET_ISTORE_K_F
-H5P_mp_H5PGET_ISTORE_K_F
-H5P_mp_H5PGET_DRIVER_F
-H5P_mp_H5PSET_FAPL_STDIO_F
-H5P_mp_H5PSET_FAPL_SEC2_F
-H5P_mp_H5PSET_ALIGNMENT_F
-H5P_mp_H5PGET_ALIGNMENT_F
-H5P_mp_H5PSET_FAPL_CORE_F
-H5P_mp_H5PGET_FAPL_CORE_F
-H5P_mp_H5PSET_FAPL_FAMILY_F
-H5P_mp_H5PGET_FAPL_FAMILY_F
-H5P_mp_H5PSET_CACHE_F
-H5P_mp_H5PGET_CACHE_F
-H5P_mp_H5PSET_FAPL_SPLIT_F
-H5P_mp_H5PSET_GC_REFERENCES_F
-H5P_mp_H5PGET_GC_REFERENCES_F
-H5P_mp_H5PSET_LAYOUT_F
-H5P_mp_H5PGET_LAYOUT_F
-H5P_mp_H5PSET_FILTER_F
-H5P_mp_H5PGET_NFILTERS_F
-H5P_mp_H5PGET_FILTER_F
-H5P_mp_H5PSET_EXTERNAL_F
-H5P_mp_H5PGET_EXTERNAL_COUNT_F
-H5P_mp_H5PGET_EXTERNAL_F
-H5P_mp_H5PSET_BTREE_RATIOS_F
-H5P_mp_H5PGET_BTREE_RATIOS_F
-H5P_mp_H5PGET_FCLOSE_DEGREE_F
-H5P_mp_H5PSET_FCLOSE_DEGREE_F
-H5P_mp_H5PEQUAL_F
-H5P_mp_H5PSET_BUFFER_F
-H5P_mp_H5PGET_BUFFER_F
-H5P_mp_H5PFILL_VALUE_DEFINED_F
-H5P_mp_H5PSET_ALLOC_TIME_F
-H5P_mp_H5PGET_ALLOC_TIME_F
-H5P_mp_H5PSET_FILL_TIME_F
-H5P_mp_H5PGET_FILL_TIME_F
-H5P_mp_H5PSET_META_BLOCK_SIZE_F
-H5P_mp_H5PGET_META_BLOCK_SIZE_F
-H5P_mp_H5PSET_SIEVE_BUF_SIZE_F
-H5P_mp_H5PGET_SIEVE_BUF_SIZE_F
-H5P_mp_H5PSET_SMALL_DATA_BLOCK_SIZE_F
-H5P_mp_H5PGET_SMALL_DATA_BLOCK_SIZE_F
-H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F
-H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F
-H5P_PROVISIONAL_mp_H5PSET_INTEGER
-H5P_PROVISIONAL_mp_H5PSET_REAL
-H5P_PROVISIONAL_mp_H5PSET_CHAR
-H5P_PROVISIONAL_mp_H5PGET_INTEGER
-H5P_PROVISIONAL_mp_H5PGET_REAL
-H5P_PROVISIONAL_mp_H5PGET_CHAR
-H5P_mp_H5PEXIST_F
-H5P_mp_H5PGET_SIZE_F
-H5P_mp_H5PGET_NPROPS_F
-H5P_mp_H5PGET_CLASS_NAME_F
-H5P_mp_H5PGET_CLASS_PARENT_F
-H5P_mp_H5PISA_CLASS_F
-H5P_mp_H5PCOPY_PROP_F
-H5P_mp_H5PREMOVE_F
-H5P_mp_H5PUNREGISTER_F
-H5P_mp_H5PCLOSE_CLASS_F
-H5P_PROVISIONAL_mp_H5PCREATE_CLASS_F
-H5P_PROVISIONAL_mp_H5PREGISTER_INTEGER
-H5P_PROVISIONAL_mp_H5PREGISTER_REAL
-H5P_PROVISIONAL_mp_H5PREGISTER_CHAR
-H5P_PROVISIONAL_mp_H5PINSERT_INTEGER
-H5P_PROVISIONAL_mp_H5PINSERT_REAL
-H5P_PROVISIONAL_mp_H5PINSERT_CHAR
-H5P_mp_H5PSET_SHUFFLE_F
-H5P_mp_H5PSET_EDC_CHECK_F
-H5P_mp_H5PGET_EDC_CHECK_F
-H5P_mp_H5PSET_FLETCHER32_F
-H5P_mp_H5PSET_FAMILY_OFFSET_F
-H5P_mp_H5PSET_FAPL_MULTI_L
-H5P_mp_H5PSET_FAPL_MULTI_S
-H5P_mp_H5PGET_FAPL_MULTI_F
-H5P_mp_H5PSET_SZIP_F
-H5P_mp_H5PALL_FILTERS_AVAIL_F
-H5P_mp_H5PGET_FILTER_BY_ID_F
-H5P_mp_H5PMODIFY_FILTER_F
-H5P_mp_H5PREMOVE_FILTER_F
-H5P_mp_H5PGET_ATTR_PHASE_CHANGE_F
-H5P_mp_H5PSET_ATTR_CREATION_ORDER_F
-H5P_mp_H5PSET_SHARED_MESG_NINDEXES_F
-H5P_mp_H5PSET_SHARED_MESG_INDEX_F
-H5P_mp_H5PGET_ATTR_CREATION_ORDER_F
-H5P_mp_H5PSET_LIBVER_BOUNDS_F
-H5P_mp_H5PSET_LINK_CREATION_ORDER_F
-H5P_mp_H5PGET_LINK_PHASE_CHANGE_F
-H5P_mp_H5PGET_OBJ_TRACK_TIMES_F
-H5P_mp_H5PSET_OBJ_TRACK_TIMES_F
-H5P_mp_H5PSET_CREATE_INTER_GROUP_F
-H5P_mp_H5PGET_LINK_CREATION_ORDER_F
-H5P_mp_H5PSET_CHAR_ENCODING_F
-H5P_mp_H5PGET_CHAR_ENCODING_F
-H5P_mp_H5PSET_COPY_OBJECT_F
-H5P_mp_H5PGET_COPY_OBJECT_F
-H5P_mp_H5PGET_DATA_TRANSFORM_F
-H5P_mp_H5PSET_DATA_TRANSFORM_F
-H5P_mp_H5PGET_LOCAL_HEAP_SIZE_HINT_F
-H5P_mp_H5PGET_EST_LINK_INFO_F
-H5P_mp_H5PSET_LOCAL_HEAP_SIZE_HINT_F
-H5P_mp_H5PSET_EST_LINK_INFO_F
-H5P_mp_H5PSET_LINK_PHASE_CHANGE_F
-H5P_mp_H5PSET_FAPL_DIRECT_F
-H5P_mp_H5PGET_FAPL_DIRECT_F
-H5P_mp_H5PSET_ATTR_PHASE_CHANGE_F
-H5P_mp_H5PSET_NBIT_F
-H5P_mp_H5PSET_SCALEOFFSET_F
-H5P_mp_H5PSET_NLINKS_F
-H5P_mp_H5PGET_NLINKS_F
-H5P_mp_H5PGET_CREATE_INTER_GROUP_F
-H5P_mp_H5PSET_CHUNK_CACHE_F
-H5P_mp_H5PGET_CHUNK_CACHE_F
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_PTR
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_PTR
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_PTR
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_PTR
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PREGISTER_PTR
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PINSERT_PTR
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILE_IMAGE_F
-@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILE_IMAGE_F
-; H5R
-H5R_PROVISIONAL_mp_H5RCREATE_OBJECT_F
-H5R_PROVISIONAL_mp_H5RCREATE_REGION_F
-H5R_PROVISIONAL_mp_H5RDEREFERENCE_OBJECT_F
-H5R_PROVISIONAL_mp_H5RDEREFERENCE_REGION_F
-H5R_PROVISIONAL_mp_H5RGET_REGION_REGION_F
-H5R_mp_H5RGET_OBJECT_TYPE_OBJ_F
-H5R_PROVISIONAL_mp_H5RGET_NAME_OBJECT_F
-H5R_PROVISIONAL_mp_H5RGET_NAME_REGION_F
-@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_REGION_PTR_F
-@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RCREATE_PTR_F
-@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RDEREFERENCE_PTR_F
-@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_NAME_PTR_F
-@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_OBJ_TYPE_F
-; H5S
-H5S_mp_H5SCREATE_SIMPLE_F
-H5S_mp_H5SCLOSE_F
-H5S_mp_H5SCREATE_F
-H5S_mp_H5SCOPY_F
-H5S_mp_H5SGET_SELECT_HYPER_NBLOCKS_F
-H5S_mp_H5SGET_SELECT_HYPER_BLOCKLIST_F
-H5S_mp_H5SGET_SELECT_BOUNDS_F
-H5S_mp_H5SGET_SELECT_ELEM_NPOINTS_F
-H5S_mp_H5SGET_SELECT_ELEM_POINTLIST_F
-H5S_mp_H5SSELECT_ELEMENTS_F
-H5S_mp_H5SSELECT_ALL_F
-H5S_mp_H5SSELECT_NONE_F
-H5S_mp_H5SSELECT_VALID_F
-H5S_mp_H5SGET_SIMPLE_EXTENT_NPOINTS_F
-H5S_mp_H5SGET_SELECT_NPOINTS_F
-H5S_mp_H5SGET_SIMPLE_EXTENT_NDIMS_F
-H5S_mp_H5SGET_SIMPLE_EXTENT_DIMS_F
-H5S_mp_H5SGET_SIMPLE_EXTENT_TYPE_F
-H5S_mp_H5SSET_EXTENT_SIMPLE_F
-H5S_mp_H5SIS_SIMPLE_F
-H5S_mp_H5SOFFSET_SIMPLE_F
-H5S_mp_H5SEXTENT_COPY_F
-H5S_mp_H5SSET_EXTENT_NONE_F
-H5S_mp_H5SSELECT_HYPERSLAB_F
-H5S_mp_H5SGET_SELECT_TYPE_F
-H5S_mp_H5SDECODE_F
-H5S_mp_H5SENCODE_F
-H5S_mp_H5SEXTENT_EQUAL_F
-; H5T
-H5T_mp_H5TOPEN_F
-H5T_mp_H5TCOMMIT_F
-H5T_mp_H5TCOPY_F
-H5T_mp_H5TEQUAL_F
-H5T_mp_H5TCLOSE_F
-H5T_mp_H5TGET_CLASS_F
-H5T_mp_H5TGET_SIZE_F
-H5T_mp_H5TSET_SIZE_F
-H5T_mp_H5TGET_ORDER_F
-H5T_mp_H5TSET_ORDER_F
-H5T_mp_H5TGET_PRECISION_F
-H5T_mp_H5TSET_PRECISION_F
-H5T_mp_H5TGET_OFFSET_F
-H5T_mp_H5TSET_OFFSET_F
-H5T_mp_H5TGET_PAD_F
-H5T_mp_H5TSET_PAD_F
-H5T_mp_H5TGET_SIGN_F
-H5T_mp_H5TSET_SIGN_F
-H5T_mp_H5TGET_FIELDS_F
-H5T_mp_H5TSET_FIELDS_F
-H5T_mp_H5TGET_EBIAS_F
-H5T_mp_H5TSET_EBIAS_F
-H5T_mp_H5TGET_NORM_F
-H5T_mp_H5TSET_NORM_F
-H5T_mp_H5TGET_INPAD_F
-H5T_mp_H5TSET_INPAD_F
-H5T_mp_H5TGET_CSET_F
-H5T_mp_H5TSET_CSET_F
-H5T_mp_H5TGET_STRPAD_F
-H5T_mp_H5TSET_STRPAD_F
-H5T_mp_H5TGET_NMEMBERS_F
-H5T_mp_H5TGET_MEMBER_NAME_F
-H5T_mp_H5TGET_MEMBER_OFFSET_F
-H5T_mp_H5TGET_MEMBER_INDEX_F
-H5T_mp_H5TGET_ARRAY_DIMS_F
-H5T_mp_H5TGET_ARRAY_NDIMS_F
-H5T_mp_H5TGET_SUPER_F
-H5T_mp_H5TGET_MEMBER_TYPE_F
-H5T_mp_H5TCREATE_F
-H5T_mp_H5TINSERT_F
-H5T_mp_H5TPACK_F
-H5T_mp_H5TARRAY_CREATE_F
-H5T_mp_H5TENUM_CREATE_F
-H5T_mp_H5TENUM_INSERT_F
-H5T_mp_H5TENUM_NAMEOF_F
-H5T_mp_H5TENUM_VALUEOF_F
-H5T_mp_H5TGET_MEMBER_VALUE_F
-H5T_mp_H5TSET_TAG_F
-H5T_mp_H5TGET_TAG_F
-H5T_mp_H5TVLEN_CREATE_F
-H5T_mp_H5TIS_VARIABLE_STR_F
-H5T_mp_H5TGET_MEMBER_CLASS_F
-H5T_mp_H5TCOMMIT_ANON_F
-H5T_mp_H5TCOMMITTED_F
-H5T_mp_H5TDECODE_F
-H5T_mp_H5TENCODE_F
-H5T_mp_H5TGET_CREATE_PLIST_F
-H5T_mp_H5TCOMPILER_CONV_F
-H5T_mp_H5TGET_NATIVE_TYPE_F
-@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F
-; H5Z
-H5Z_mp_H5ZUNREGISTER_F
-H5Z_mp_H5ZFILTER_AVAIL_F
-H5Z_mp_H5ZGET_FILTER_INFO_F
-; Parallel
-@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_DXPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F
+EXPORTS
+; H5LIB
+H5LIB_mp_H5OPEN_F
+H5LIB_mp_H5CLOSE_F
+H5LIB_mp_H5GET_LIBVERSION_F
+H5LIB_mp_H5CHECK_VERSION_F
+H5LIB_mp_H5GARBAGE_COLLECT_F
+H5LIB_mp_H5DONT_ATEXIT_F
+H5LIB_mp_H5KIND_TO_TYPE
+@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF
+; H5_DBLE_INTERFACE
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_1
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_2
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_3
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_4
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_5
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_6
+H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_7
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_SCALAR
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_1
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_2
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_3
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_4
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_5
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_6
+H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_7
+H5_DBLE_INTERFACE_mp_H5DFILL_DOUBLE
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_SCALAR
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_1
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_2
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_3
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_4
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_5
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_6
+H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_7
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_SCALAR
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_1
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_2
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_3
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_4
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_5
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_6
+H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_7
+H5_DBLE_INTERFACE_mp_H5PGET_DOUBLE
+H5_DBLE_INTERFACE_mp_H5PSET_DOUBLE
+H5_DBLE_INTERFACE_mp_H5PSET_FILL_VALUE_DOUBLE
+H5_DBLE_INTERFACE_mp_H5PGET_FILL_VALUE_DOUBLE
+H5_DBLE_INTERFACE_mp_H5PINSERT_DOUBLE
+H5_DBLE_INTERFACE_mp_H5PREGISTER_DOUBLE
+; H5A
+H5A_mp_H5ACREATE_F
+H5A_mp_H5AOPEN_NAME_F
+H5A_mp_H5AOPEN_IDX_F
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_SCALAR
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_1
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_2
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_3
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_4
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_5
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_6
+H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_7
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_SCALAR
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_1
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_2
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_3
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_4
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_5
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_6
+H5A_PROVISIONAL_mp_H5AWRITE_REAL_7
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_SCALAR
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_1
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_2
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_3
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_4
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_5
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_6
+H5A_PROVISIONAL_mp_H5AWRITE_CHAR_7
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_SCALAR
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_1
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_2
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_3
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_4
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_5
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_6
+H5A_PROVISIONAL_mp_H5AREAD_INTEGER_7
+H5A_PROVISIONAL_mp_H5AREAD_REAL_SCALAR
+H5A_PROVISIONAL_mp_H5AREAD_REAL_1
+H5A_PROVISIONAL_mp_H5AREAD_REAL_2
+H5A_PROVISIONAL_mp_H5AREAD_REAL_3
+H5A_PROVISIONAL_mp_H5AREAD_REAL_4
+H5A_PROVISIONAL_mp_H5AREAD_REAL_5
+H5A_PROVISIONAL_mp_H5AREAD_REAL_6
+H5A_PROVISIONAL_mp_H5AREAD_REAL_7
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_SCALAR
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_1
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_2
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_3
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_4
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_5
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_6
+H5A_PROVISIONAL_mp_H5AREAD_CHAR_7
+H5A_mp_H5AGET_SPACE_F
+H5A_mp_H5AGET_TYPE_F
+H5A_mp_H5AGET_NAME_F
+H5A_mp_H5AGET_NAME_BY_IDX_F
+H5A_mp_H5AGET_NUM_ATTRS_F
+H5A_mp_H5ADELETE_F
+H5A_mp_H5ACLOSE_F
+H5A_mp_H5AGET_STORAGE_SIZE_F
+H5A_mp_H5AGET_CREATE_PLIST_F
+H5A_mp_H5ARENAME_BY_NAME_F
+H5A_mp_H5AOPEN_F
+H5A_mp_H5ADELETE_BY_IDX_F
+H5A_mp_H5ADELETE_BY_NAME_F
+H5A_mp_H5AOPEN_BY_IDX_F
+H5A_mp_H5AGET_INFO_F
+H5A_mp_H5AGET_INFO_BY_IDX_F
+H5A_mp_H5AGET_INFO_BY_NAME_F
+H5A_mp_H5ACREATE_BY_NAME_F
+H5A_mp_H5AEXISTS_F
+H5A_mp_H5AEXISTS_BY_NAME_F
+H5A_mp_H5AOPEN_BY_NAME_F
+H5A_mp_H5ARENAME_F
+@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AWRITE_PTR
+@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AREAD_PTR
+; H5D
+H5D_mp_H5DCREATE_F
+H5D_mp_H5DOPEN_F
+H5D_mp_H5DCLOSE_F
+H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_OBJ
+H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_DSETREG
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_SCALAR
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_1
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_2
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_3
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_4
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_5
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_6
+H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_7
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_SCALAR
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_1
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_2
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_3
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_4
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_5
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_6
+H5D_PROVISIONAL_mp_H5DWRITE_CHAR_7
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_SCALAR
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_1
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_2
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_3
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_4
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_5
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_6
+H5D_PROVISIONAL_mp_H5DWRITE_REAL_7
+H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_OBJ
+H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_DSETREG
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_SCALAR
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_1
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_2
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_3
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_4
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_5
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_6
+H5D_PROVISIONAL_mp_H5DREAD_INTEGER_7
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_SCALAR
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_1
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_2
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_3
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_4
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_5
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_6
+H5D_PROVISIONAL_mp_H5DREAD_CHAR_7
+H5D_PROVISIONAL_mp_H5DREAD_REAL_SCALAR
+H5D_PROVISIONAL_mp_H5DREAD_REAL_1
+H5D_PROVISIONAL_mp_H5DREAD_REAL_2
+H5D_PROVISIONAL_mp_H5DREAD_REAL_3
+H5D_PROVISIONAL_mp_H5DREAD_REAL_4
+H5D_PROVISIONAL_mp_H5DREAD_REAL_5
+H5D_PROVISIONAL_mp_H5DREAD_REAL_6
+H5D_PROVISIONAL_mp_H5DREAD_REAL_7
+H5D_mp_H5DGET_SPACE_F
+H5D_mp_H5DGET_TYPE_F
+H5D_mp_H5DSET_EXTENT_F
+H5D_mp_H5DGET_CREATE_PLIST_F
+H5D_mp_H5DGET_STORAGE_SIZE_F
+H5D_mp_H5DVLEN_GET_MAX_LEN_F
+H5D_mp_H5DWRITE_VL_INTEGER
+H5D_mp_H5DREAD_VL_INTEGER
+H5D_mp_H5DWRITE_VL_REAL
+H5D_mp_H5DREAD_VL_REAL
+H5D_mp_H5DWRITE_VL_STRING
+H5D_mp_H5DREAD_VL_STRING
+H5D_PROVISIONAL_mp_H5DFILL_INTEGER
+H5D_PROVISIONAL_mp_H5DFILL_REAL
+H5D_PROVISIONAL_mp_H5DFILL_CHAR
+H5D_mp_H5DGET_SPACE_STATUS_F
+H5D_mp_H5DCREATE_ANON_F
+H5D_mp_H5DGET_SPACE_F
+H5D_mp_H5DGET_TYPE_F
+H5D_mp_H5DSET_EXTENT_F
+H5D_mp_H5DGET_CREATE_PLIST_F
+H5D_mp_H5DGET_STORAGE_SIZE_F
+H5D_mp_H5DVLEN_GET_MAX_LEN_F
+H5D_mp_H5DGET_ACCESS_PLIST_F
+@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DWRITE_PTR
+@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DREAD_PTR
+@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DVLEN_RECLAIM_F
+; H5E
+H5E_mp_H5ECLEAR_F
+H5E_mp_H5EPRINT_F
+H5E_mp_H5EGET_MAJOR_F
+H5E_mp_H5EGET_MINOR_F
+H5E_PROVISIONAL_mp_H5ESET_AUTO_F
+; H5F
+H5F_mp_H5FCREATE_F
+H5F_mp_H5FFLUSH_F
+H5F_mp_H5FCLOSE_F
+H5F_mp_H5FGET_OBJ_COUNT_F
+H5F_mp_H5FGET_OBJ_IDS_F
+H5F_mp_H5FGET_FREESPACE_F
+H5F_mp_H5FMOUNT_F
+H5F_mp_H5FUNMOUNT_F
+H5F_mp_H5FOPEN_F
+H5F_mp_H5FREOPEN_F
+H5F_mp_H5FGET_CREATE_PLIST_F
+H5F_mp_H5FGET_ACCESS_PLIST_F
+H5F_mp_H5FIS_HDF5_F
+H5F_mp_H5FGET_NAME_F
+H5F_mp_H5FGET_FILESIZE_F
+@H5_NOF03EXP@H5F_PROVISIONAL_mp_H5FGET_FILE_IMAGE_F
+; H5G
+H5G_mp_H5GOPEN_F
+H5G_mp_H5GCREATE_F
+H5G_mp_H5GCLOSE_F
+H5G_mp_H5GGET_OBJ_INFO_IDX_F
+H5G_mp_H5GN_MEMBERS_F
+H5G_mp_H5GLINK_F
+H5G_mp_H5GLINK2_F
+H5G_mp_H5GUNLINK_F
+H5G_mp_H5GMOVE_F
+H5G_mp_H5GMOVE2_F
+H5G_mp_H5GGET_LINKVAL_F
+H5G_mp_H5GSET_COMMENT_F
+H5G_mp_H5GGET_COMMENT_F
+H5G_mp_H5GCREATE_ANON_F
+H5G_mp_H5GGET_CREATE_PLIST_F
+H5G_mp_H5GGET_INFO_F
+H5G_mp_H5GGET_INFO_BY_IDX_F
+H5G_mp_H5GGET_INFO_BY_NAME_F
+H5G_mp_H5GGET_OBJ_INFO_IDX_F
+; H5GLOBAL
+; PREDEFINED_TYPES DATA
+; FLOATING_TYPES DATA
+; INTEGER_TYPES DATA
+; H5F_FLAGS DATA
+; H5GENERIC_FLAGS DATA
+; H5G_FLAGS DATA
+; H5D_FLAGS DATA
+; H5FD_FLAGS DATA
+; H5FD_HID_FLAGS DATA
+; H5I_FLAGS DATA
+; H5L_FLAGS DATA
+; H5O_FLAGS DATA
+; H5P_FLAGS DATA
+; H5P_FLAGS_INT DATA
+; H5R_FLAGS DATA
+; H5S_FLAGS DATA
+; H5T_FLAGS DATA
+; H5Z_FLAGS DATA
+; H5LIB_FLAGS DATA
+; H5I
+H5I_mp_H5IGET_TYPE_F
+H5I_mp_H5IGET_NAME_F
+H5I_mp_H5IINC_REF_F
+H5I_mp_H5IDEC_REF_F
+H5I_mp_H5IGET_REF_F
+H5I_mp_H5IGET_FILE_ID_F
+H5I_mp_H5IIS_VALID_F
+; H5L
+H5L_mp_H5LCOPY_F
+H5L_mp_H5LDELETE_F
+H5L_mp_H5LCREATE_SOFT_F
+H5L_mp_H5LCREATE_HARD_F
+H5L_mp_H5LCREATE_EXTERNAL_F
+H5L_mp_H5LDELETE_BY_IDX_F
+H5L_mp_H5LEXISTS_F
+H5L_mp_H5LGET_INFO_F
+H5L_mp_H5LGET_INFO_BY_IDX_F
+H5L_mp_H5LIS_REGISTERED_F
+H5L_mp_H5LMOVE_F
+H5L_mp_H5LGET_NAME_BY_IDX_F
+@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_F
+@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_BY_NAME_F
+; H5O
+H5O_mp_H5OCLOSE_F
+H5O_mp_H5OCOPY_F
+H5O_mp_H5ODECR_REFCOUNT_F
+H5O_mp_H5OEXISTS_BY_NAME_F
+H5O_mp_H5OGET_COMMENT_F
+H5O_mp_H5OGET_COMMENT_BY_NAME_F
+H5O_mp_H5OINCR_REFCOUNT_F
+H5O_mp_H5OLINK_F
+H5O_mp_H5OOPEN_BY_ADDR_F
+H5O_mp_H5OOPEN_BY_IDX_F
+H5O_mp_H5OOPEN_F
+H5O_mp_H5OSET_COMMENT_F
+H5O_mp_H5OSET_COMMENT_BY_NAME_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_F
+; H5P
+H5P_mp_H5PCREATE_F
+H5P_mp_H5PSET_PRESERVE_F
+H5P_mp_H5PGET_PRESERVE_F
+H5P_mp_H5PGET_CLASS_F
+H5P_mp_H5PCOPY_F
+H5P_mp_H5PCLOSE_F
+H5P_mp_H5PSET_CHUNK_F
+H5P_mp_H5PGET_CHUNK_F
+H5P_mp_H5PSET_DEFLATE_F
+H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_INTEGER
+H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_INTEGER
+H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_REAL
+H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_REAL
+H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_CHAR
+H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_CHAR
+H5P_mp_H5PGET_VERSION_F
+H5P_mp_H5PSET_USERBLOCK_F
+H5P_mp_H5PGET_USERBLOCK_F
+H5P_mp_H5PSET_SIZES_F
+H5P_mp_H5PGET_SIZES_F
+H5P_mp_H5PSET_SYM_K_F
+H5P_mp_H5PGET_SYM_K_F
+H5P_mp_H5PSET_ISTORE_K_F
+H5P_mp_H5PGET_ISTORE_K_F
+H5P_mp_H5PGET_DRIVER_F
+H5P_mp_H5PSET_FAPL_STDIO_F
+H5P_mp_H5PSET_FAPL_SEC2_F
+H5P_mp_H5PSET_ALIGNMENT_F
+H5P_mp_H5PGET_ALIGNMENT_F
+H5P_mp_H5PSET_FAPL_CORE_F
+H5P_mp_H5PGET_FAPL_CORE_F
+H5P_mp_H5PSET_FAPL_FAMILY_F
+H5P_mp_H5PGET_FAPL_FAMILY_F
+H5P_mp_H5PSET_CACHE_F
+H5P_mp_H5PGET_CACHE_F
+H5P_mp_H5PSET_FAPL_SPLIT_F
+H5P_mp_H5PSET_GC_REFERENCES_F
+H5P_mp_H5PGET_GC_REFERENCES_F
+H5P_mp_H5PSET_LAYOUT_F
+H5P_mp_H5PGET_LAYOUT_F
+H5P_mp_H5PSET_FILTER_F
+H5P_mp_H5PGET_NFILTERS_F
+H5P_mp_H5PGET_FILTER_F
+H5P_mp_H5PSET_EXTERNAL_F
+H5P_mp_H5PGET_EXTERNAL_COUNT_F
+H5P_mp_H5PGET_EXTERNAL_F
+H5P_mp_H5PSET_BTREE_RATIOS_F
+H5P_mp_H5PGET_BTREE_RATIOS_F
+H5P_mp_H5PGET_FCLOSE_DEGREE_F
+H5P_mp_H5PSET_FCLOSE_DEGREE_F
+H5P_mp_H5PEQUAL_F
+H5P_mp_H5PSET_BUFFER_F
+H5P_mp_H5PGET_BUFFER_F
+H5P_mp_H5PFILL_VALUE_DEFINED_F
+H5P_mp_H5PSET_ALLOC_TIME_F
+H5P_mp_H5PGET_ALLOC_TIME_F
+H5P_mp_H5PSET_FILL_TIME_F
+H5P_mp_H5PGET_FILL_TIME_F
+H5P_mp_H5PSET_META_BLOCK_SIZE_F
+H5P_mp_H5PGET_META_BLOCK_SIZE_F
+H5P_mp_H5PSET_SIEVE_BUF_SIZE_F
+H5P_mp_H5PGET_SIEVE_BUF_SIZE_F
+H5P_mp_H5PSET_SMALL_DATA_BLOCK_SIZE_F
+H5P_mp_H5PGET_SMALL_DATA_BLOCK_SIZE_F
+H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F
+H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F
+H5P_PROVISIONAL_mp_H5PSET_INTEGER
+H5P_PROVISIONAL_mp_H5PSET_REAL
+H5P_PROVISIONAL_mp_H5PSET_CHAR
+H5P_PROVISIONAL_mp_H5PGET_INTEGER
+H5P_PROVISIONAL_mp_H5PGET_REAL
+H5P_PROVISIONAL_mp_H5PGET_CHAR
+H5P_mp_H5PEXIST_F
+H5P_mp_H5PGET_SIZE_F
+H5P_mp_H5PGET_NPROPS_F
+H5P_mp_H5PGET_CLASS_NAME_F
+H5P_mp_H5PGET_CLASS_PARENT_F
+H5P_mp_H5PISA_CLASS_F
+H5P_mp_H5PCOPY_PROP_F
+H5P_mp_H5PREMOVE_F
+H5P_mp_H5PUNREGISTER_F
+H5P_mp_H5PCLOSE_CLASS_F
+H5P_PROVISIONAL_mp_H5PCREATE_CLASS_F
+H5P_PROVISIONAL_mp_H5PREGISTER_INTEGER
+H5P_PROVISIONAL_mp_H5PREGISTER_REAL
+H5P_PROVISIONAL_mp_H5PREGISTER_CHAR
+H5P_PROVISIONAL_mp_H5PINSERT_INTEGER
+H5P_PROVISIONAL_mp_H5PINSERT_REAL
+H5P_PROVISIONAL_mp_H5PINSERT_CHAR
+H5P_mp_H5PSET_SHUFFLE_F
+H5P_mp_H5PSET_EDC_CHECK_F
+H5P_mp_H5PGET_EDC_CHECK_F
+H5P_mp_H5PSET_FLETCHER32_F
+H5P_mp_H5PSET_FAMILY_OFFSET_F
+H5P_mp_H5PSET_FAPL_MULTI_L
+H5P_mp_H5PSET_FAPL_MULTI_S
+H5P_mp_H5PGET_FAPL_MULTI_F
+H5P_mp_H5PSET_SZIP_F
+H5P_mp_H5PALL_FILTERS_AVAIL_F
+H5P_mp_H5PGET_FILTER_BY_ID_F
+H5P_mp_H5PMODIFY_FILTER_F
+H5P_mp_H5PREMOVE_FILTER_F
+H5P_mp_H5PGET_ATTR_PHASE_CHANGE_F
+H5P_mp_H5PSET_ATTR_CREATION_ORDER_F
+H5P_mp_H5PSET_SHARED_MESG_NINDEXES_F
+H5P_mp_H5PSET_SHARED_MESG_INDEX_F
+H5P_mp_H5PGET_ATTR_CREATION_ORDER_F
+H5P_mp_H5PSET_LIBVER_BOUNDS_F
+H5P_mp_H5PSET_LINK_CREATION_ORDER_F
+H5P_mp_H5PGET_LINK_PHASE_CHANGE_F
+H5P_mp_H5PGET_OBJ_TRACK_TIMES_F
+H5P_mp_H5PSET_OBJ_TRACK_TIMES_F
+H5P_mp_H5PSET_CREATE_INTER_GROUP_F
+H5P_mp_H5PGET_LINK_CREATION_ORDER_F
+H5P_mp_H5PSET_CHAR_ENCODING_F
+H5P_mp_H5PGET_CHAR_ENCODING_F
+H5P_mp_H5PSET_COPY_OBJECT_F
+H5P_mp_H5PGET_COPY_OBJECT_F
+H5P_mp_H5PGET_DATA_TRANSFORM_F
+H5P_mp_H5PSET_DATA_TRANSFORM_F
+H5P_mp_H5PGET_LOCAL_HEAP_SIZE_HINT_F
+H5P_mp_H5PGET_EST_LINK_INFO_F
+H5P_mp_H5PSET_LOCAL_HEAP_SIZE_HINT_F
+H5P_mp_H5PSET_EST_LINK_INFO_F
+H5P_mp_H5PSET_LINK_PHASE_CHANGE_F
+H5P_mp_H5PSET_FAPL_DIRECT_F
+H5P_mp_H5PGET_FAPL_DIRECT_F
+H5P_mp_H5PSET_ATTR_PHASE_CHANGE_F
+H5P_mp_H5PSET_NBIT_F
+H5P_mp_H5PSET_SCALEOFFSET_F
+H5P_mp_H5PSET_NLINKS_F
+H5P_mp_H5PGET_NLINKS_F
+H5P_mp_H5PGET_CREATE_INTER_GROUP_F
+H5P_mp_H5PSET_CHUNK_CACHE_F
+H5P_mp_H5PGET_CHUNK_CACHE_F
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PREGISTER_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PINSERT_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILE_IMAGE_F
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILE_IMAGE_F
+; H5R
+H5R_PROVISIONAL_mp_H5RCREATE_OBJECT_F
+H5R_PROVISIONAL_mp_H5RCREATE_REGION_F
+H5R_PROVISIONAL_mp_H5RDEREFERENCE_OBJECT_F
+H5R_PROVISIONAL_mp_H5RDEREFERENCE_REGION_F
+H5R_PROVISIONAL_mp_H5RGET_REGION_REGION_F
+H5R_mp_H5RGET_OBJECT_TYPE_OBJ_F
+H5R_PROVISIONAL_mp_H5RGET_NAME_OBJECT_F
+H5R_PROVISIONAL_mp_H5RGET_NAME_REGION_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_REGION_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RCREATE_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RDEREFERENCE_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_NAME_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_OBJ_TYPE_F
+; H5S
+H5S_mp_H5SCREATE_SIMPLE_F
+H5S_mp_H5SCLOSE_F
+H5S_mp_H5SCREATE_F
+H5S_mp_H5SCOPY_F
+H5S_mp_H5SGET_SELECT_HYPER_NBLOCKS_F
+H5S_mp_H5SGET_SELECT_HYPER_BLOCKLIST_F
+H5S_mp_H5SGET_SELECT_BOUNDS_F
+H5S_mp_H5SGET_SELECT_ELEM_NPOINTS_F
+H5S_mp_H5SGET_SELECT_ELEM_POINTLIST_F
+H5S_mp_H5SSELECT_ELEMENTS_F
+H5S_mp_H5SSELECT_ALL_F
+H5S_mp_H5SSELECT_NONE_F
+H5S_mp_H5SSELECT_VALID_F
+H5S_mp_H5SGET_SIMPLE_EXTENT_NPOINTS_F
+H5S_mp_H5SGET_SELECT_NPOINTS_F
+H5S_mp_H5SGET_SIMPLE_EXTENT_NDIMS_F
+H5S_mp_H5SGET_SIMPLE_EXTENT_DIMS_F
+H5S_mp_H5SGET_SIMPLE_EXTENT_TYPE_F
+H5S_mp_H5SSET_EXTENT_SIMPLE_F
+H5S_mp_H5SIS_SIMPLE_F
+H5S_mp_H5SOFFSET_SIMPLE_F
+H5S_mp_H5SEXTENT_COPY_F
+H5S_mp_H5SSET_EXTENT_NONE_F
+H5S_mp_H5SSELECT_HYPERSLAB_F
+H5S_mp_H5SGET_SELECT_TYPE_F
+H5S_mp_H5SDECODE_F
+H5S_mp_H5SENCODE_F
+H5S_mp_H5SEXTENT_EQUAL_F
+; H5T
+H5T_mp_H5TOPEN_F
+H5T_mp_H5TCOMMIT_F
+H5T_mp_H5TCOPY_F
+H5T_mp_H5TEQUAL_F
+H5T_mp_H5TCLOSE_F
+H5T_mp_H5TGET_CLASS_F
+H5T_mp_H5TGET_SIZE_F
+H5T_mp_H5TSET_SIZE_F
+H5T_mp_H5TGET_ORDER_F
+H5T_mp_H5TSET_ORDER_F
+H5T_mp_H5TGET_PRECISION_F
+H5T_mp_H5TSET_PRECISION_F
+H5T_mp_H5TGET_OFFSET_F
+H5T_mp_H5TSET_OFFSET_F
+H5T_mp_H5TGET_PAD_F
+H5T_mp_H5TSET_PAD_F
+H5T_mp_H5TGET_SIGN_F
+H5T_mp_H5TSET_SIGN_F
+H5T_mp_H5TGET_FIELDS_F
+H5T_mp_H5TSET_FIELDS_F
+H5T_mp_H5TGET_EBIAS_F
+H5T_mp_H5TSET_EBIAS_F
+H5T_mp_H5TGET_NORM_F
+H5T_mp_H5TSET_NORM_F
+H5T_mp_H5TGET_INPAD_F
+H5T_mp_H5TSET_INPAD_F
+H5T_mp_H5TGET_CSET_F
+H5T_mp_H5TSET_CSET_F
+H5T_mp_H5TGET_STRPAD_F
+H5T_mp_H5TSET_STRPAD_F
+H5T_mp_H5TGET_NMEMBERS_F
+H5T_mp_H5TGET_MEMBER_NAME_F
+H5T_mp_H5TGET_MEMBER_OFFSET_F
+H5T_mp_H5TGET_MEMBER_INDEX_F
+H5T_mp_H5TGET_ARRAY_DIMS_F
+H5T_mp_H5TGET_ARRAY_NDIMS_F
+H5T_mp_H5TGET_SUPER_F
+H5T_mp_H5TGET_MEMBER_TYPE_F
+H5T_mp_H5TCREATE_F
+H5T_mp_H5TINSERT_F
+H5T_mp_H5TPACK_F
+H5T_mp_H5TARRAY_CREATE_F
+H5T_mp_H5TENUM_CREATE_F
+H5T_mp_H5TENUM_INSERT_F
+H5T_mp_H5TENUM_NAMEOF_F
+H5T_mp_H5TENUM_VALUEOF_F
+H5T_mp_H5TGET_MEMBER_VALUE_F
+H5T_mp_H5TSET_TAG_F
+H5T_mp_H5TGET_TAG_F
+H5T_mp_H5TVLEN_CREATE_F
+H5T_mp_H5TIS_VARIABLE_STR_F
+H5T_mp_H5TGET_MEMBER_CLASS_F
+H5T_mp_H5TCOMMIT_ANON_F
+H5T_mp_H5TCOMMITTED_F
+H5T_mp_H5TDECODE_F
+H5T_mp_H5TENCODE_F
+H5T_mp_H5TGET_CREATE_PLIST_F
+H5T_mp_H5TCOMPILER_CONV_F
+H5T_mp_H5TGET_NATIVE_TYPE_F
+@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F
+; H5Z
+H5Z_mp_H5ZUNREGISTER_F
+H5Z_mp_H5ZFILTER_AVAIL_F
+H5Z_mp_H5ZGET_FILTER_INFO_F
+; Parallel
+@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIO_F
+@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIO_F
+@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_DXPL_MPIO_F
+@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F
+@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index dac8243..17c55a5 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -65,6 +65,7 @@ add_executable (testhdf5_fortran
tH5T.f90
tH5VL.f90
tH5Z.f90
+ tHDF5.f90
)
TARGET_NAMING (testhdf5_fortran ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran " " " ")
@@ -86,6 +87,8 @@ add_executable (testhdf5_fortran_1_8
tH5O.f90
tH5A_1_8.f90
tH5G_1_8.f90
+ tH5MISC_1_8.f90
+ tHDF5_1_8.f90
)
TARGET_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 " " " ")
@@ -111,6 +114,7 @@ if (HDF5_ENABLE_F2003)
tH5O_F03.f90
tH5P_F03.f90
tH5T_F03.f90
+ tHDF5_F03.f90
)
TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 " " " ")
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index f87ebbe..6a9c535 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -6,16 +6,16 @@
##############################################################################
add_test (NAME FORTRAN_testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
-SET_TESTS_PROPERTIES(FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
#-- Adding test for testhdf5_fortran_1_8
add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
-SET_TESTS_PROPERTIES(FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
- SET_TESTS_PROPERTIES(FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+ set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
endif (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
@@ -23,4 +23,4 @@ add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
#-- Adding test for fflush2
add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
-SET_TESTS_PROPERTIES(FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
+set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index ea58b2d..9c6b906 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -17,7 +17,8 @@
#
# HDF5-Fortran test/Makefile(.in)
#
-
+# Autoconf cannot figure out dependencies between modules; disable parallel make
+.NOTPARALLEL:
include $(top_srcdir)/config/commence.am
# Include files
@@ -59,16 +60,15 @@ libh5test_fortran_la_SOURCES= tf.f90 t.c
fortranlib_test_FCFLAGS=$(AM_FCFLAGS)
fortranlib_test_CFLAGS=$(AM_CFLAGS)
-fortranlib_test_SOURCES = fortranlib_test.f90 \
- 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
+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 = fortranlib_test_1_8.f90 \
- tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90
+fortranlib_test_1_8_SOURCES = tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\
+ fortranlib_test_1_8.f90
if FORTRAN_2003_CONDITIONAL_F
- fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \
- tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
+ fortranlib_test_F03_SOURCES = tH5F.f90 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
endif
@@ -79,9 +79,20 @@ fflush2_SOURCES=fflush2.f90
LDADD=libh5test_fortran.la $(LIBH5TEST) $(LIBH5F) $(LIBHDF5)
# Temporary files
-CHECK_CLEANFILES+=*.h5
+CHECK_CLEANFILES+=*.h5 *.raw
MOSTLYCLEANFILES=*.tmp
+# Fortran module files can have different extensions and different names
+# (e.g., different capitalizations) on different platforms. Write rules
+# for them explicitly rather than trying to teach automake about them.
+# They should be installed as headers and removed during clean.
+maintainer-clean-local: clean-local
+distclean-local: clean-local
+clean-local:
+ @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
+ $(RM) *.$(F9XMODEXT); \
+ fi
+
# Mark this directory as part of the Fortran API (this affects output
# from tests in conclude.am)
FORTRAN_API=yes
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index e827662..bd1d01d 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -14,23 +14,6 @@
@SET_MAKE@
-#
-# 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.
-#
-# HDF5-Fortran test/Makefile(.in)
-#
-
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
@@ -138,16 +121,15 @@ fflush2_OBJECTS = $(am_fflush2_OBJECTS)
fflush2_LDADD = $(LDADD)
fflush2_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) $(LIBH5F) \
$(LIBHDF5)
-am_fortranlib_test_OBJECTS = \
- fortranlib_test-fortranlib_test.$(OBJEXT) \
- fortranlib_test-tH5F.$(OBJEXT) fortranlib_test-tH5D.$(OBJEXT) \
- fortranlib_test-tH5R.$(OBJEXT) fortranlib_test-tH5S.$(OBJEXT) \
- fortranlib_test-tH5T.$(OBJEXT) fortranlib_test-tH5VL.$(OBJEXT) \
- fortranlib_test-tH5Z.$(OBJEXT) \
+am_fortranlib_test_OBJECTS = fortranlib_test-tH5F.$(OBJEXT) \
+ fortranlib_test-tH5D.$(OBJEXT) fortranlib_test-tH5R.$(OBJEXT) \
+ fortranlib_test-tH5S.$(OBJEXT) fortranlib_test-tH5T.$(OBJEXT) \
+ fortranlib_test-tH5VL.$(OBJEXT) fortranlib_test-tH5Z.$(OBJEXT) \
fortranlib_test-tH5Sselect.$(OBJEXT) \
fortranlib_test-tH5P.$(OBJEXT) fortranlib_test-tH5A.$(OBJEXT) \
fortranlib_test-tH5I.$(OBJEXT) fortranlib_test-tH5G.$(OBJEXT) \
- fortranlib_test-tH5E.$(OBJEXT)
+ fortranlib_test-tH5E.$(OBJEXT) fortranlib_test-tHDF5.$(OBJEXT) \
+ fortranlib_test-fortranlib_test.$(OBJEXT)
fortranlib_test_OBJECTS = $(am_fortranlib_test_OBJECTS)
fortranlib_test_LDADD = $(LDADD)
fortranlib_test_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \
@@ -156,24 +138,26 @@ fortranlib_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \
$(fortranlib_test_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
-am_fortranlib_test_1_8_OBJECTS = fortranlib_test_1_8.$(OBJEXT) \
- tH5F.$(OBJEXT) tH5O.$(OBJEXT) tH5A_1_8.$(OBJEXT) \
- tH5G_1_8.$(OBJEXT)
+am_fortranlib_test_1_8_OBJECTS = tH5F.$(OBJEXT) tH5O.$(OBJEXT) \
+ tH5A_1_8.$(OBJEXT) tH5G_1_8.$(OBJEXT) tH5MISC_1_8.$(OBJEXT) \
+ tHDF5_1_8.$(OBJEXT) fortranlib_test_1_8.$(OBJEXT)
fortranlib_test_1_8_OBJECTS = $(am_fortranlib_test_1_8_OBJECTS)
fortranlib_test_1_8_LDADD = $(LDADD)
fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \
$(LIBH5F) $(LIBHDF5)
-am__fortranlib_test_F03_SOURCES_DIST = fortranlib_test_F03.f90 \
- tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 \
- tH5P_F03.f90 tH5T_F03.f90
-@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = fortranlib_test_F03.$(OBJEXT) \
+am__fortranlib_test_F03_SOURCES_DIST = tH5F.f90 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
+@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5E_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5L_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5P_F03.$(OBJEXT) \
-@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT)
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT) \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tHDF5_F03.$(OBJEXT) \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03.$(OBJEXT)
fortranlib_test_F03_OBJECTS = $(am_fortranlib_test_F03_OBJECTS)
fortranlib_test_F03_LDADD = $(LDADD)
fortranlib_test_F03_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \
@@ -576,7 +560,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -744,7 +727,7 @@ TRACE = perl $(top_srcdir)/bin/trace
# *.clog are from the MPE option.
# Temporary files
-CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.raw
# The Fortran test library
noinst_LTLIBRARIES = libh5test_fortran.la
@@ -763,15 +746,14 @@ libh5test_fortran_la_SOURCES = tf.f90 t.c
# Automake will complain about this without the following workaround.
fortranlib_test_FCFLAGS = $(AM_FCFLAGS)
fortranlib_test_CFLAGS = $(AM_CFLAGS)
-fortranlib_test_SOURCES = fortranlib_test.f90 \
- 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
+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 = fortranlib_test_1_8.f90 \
- tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90
+fortranlib_test_1_8_SOURCES = tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\
+ fortranlib_test_1_8.f90
-@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \
-@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
+@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90
fflush1_SOURCES = fflush1.f90
fflush2_SOURCES = fflush2.f90
@@ -920,12 +902,6 @@ distclean-compile:
.f90.lo:
$(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
-fortranlib_test-fortranlib_test.o: fortranlib_test.f90
- $(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-fortranlib_test.o $(FCFLAGS_f90) `test -f 'fortranlib_test.f90' || echo '$(srcdir)/'`fortranlib_test.f90
-
-fortranlib_test-fortranlib_test.obj: fortranlib_test.f90
- $(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-fortranlib_test.obj $(FCFLAGS_f90) `if test -f 'fortranlib_test.f90'; then $(CYGPATH_W) 'fortranlib_test.f90'; else $(CYGPATH_W) '$(srcdir)/fortranlib_test.f90'; fi`
-
fortranlib_test-tH5F.o: tH5F.f90
$(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-tH5F.o $(FCFLAGS_f90) `test -f 'tH5F.f90' || echo '$(srcdir)/'`tH5F.f90
@@ -1004,6 +980,18 @@ fortranlib_test-tH5E.o: tH5E.f90
fortranlib_test-tH5E.obj: tH5E.f90
$(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-tH5E.obj $(FCFLAGS_f90) `if test -f 'tH5E.f90'; then $(CYGPATH_W) 'tH5E.f90'; else $(CYGPATH_W) '$(srcdir)/tH5E.f90'; fi`
+fortranlib_test-tHDF5.o: tHDF5.f90
+ $(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-tHDF5.o $(FCFLAGS_f90) `test -f 'tHDF5.f90' || echo '$(srcdir)/'`tHDF5.f90
+
+fortranlib_test-tHDF5.obj: tHDF5.f90
+ $(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-tHDF5.obj $(FCFLAGS_f90) `if test -f 'tHDF5.f90'; then $(CYGPATH_W) 'tHDF5.f90'; else $(CYGPATH_W) '$(srcdir)/tHDF5.f90'; fi`
+
+fortranlib_test-fortranlib_test.o: fortranlib_test.f90
+ $(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-fortranlib_test.o $(FCFLAGS_f90) `test -f 'fortranlib_test.f90' || echo '$(srcdir)/'`fortranlib_test.f90
+
+fortranlib_test-fortranlib_test.obj: fortranlib_test.f90
+ $(AM_V_FC)$(FC) $(fortranlib_test_FCFLAGS) $(FCFLAGS) -c -o fortranlib_test-fortranlib_test.obj $(FCFLAGS_f90) `if test -f 'fortranlib_test.f90'; then $(CYGPATH_W) 'fortranlib_test.f90'; else $(CYGPATH_W) '$(srcdir)/fortranlib_test.f90'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1314,14 +1302,14 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
+ distclean-local distclean-tags
dvi: dvi-am
@@ -1366,7 +1354,8 @@ installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
+maintainer-clean-am: distclean-am maintainer-clean-generic \
+ maintainer-clean-local
mostlyclean: mostlyclean-am
@@ -1387,20 +1376,40 @@ uninstall-am:
.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \
check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
- clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
+ clean-local clean-noinstLTLIBRARIES cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic maintainer-clean-local mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \
uninstall uninstall-am
+#
+# 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.
+#
+# HDF5-Fortran test/Makefile(.in)
+#
+# Autoconf cannot figure out dependencies between modules; disable parallel make
+.NOTPARALLEL:
+
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
# This tells the Makefiles that these targets are not files to be built but
# commands that should be executed even if a file with the same name already
@@ -1412,6 +1421,17 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+# Fortran module files can have different extensions and different names
+# (e.g., different capitalizations) on different platforms. Write rules
+# for them explicitly rather than trying to teach automake about them.
+# They should be installed as headers and removed during clean.
+maintainer-clean-local: clean-local
+distclean-local: clean-local
+clean-local:
+ @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
+ $(RM) *.$(F9XMODEXT); \
+ fi
+
# fflush2 depends on files created by fflush1
fflush2.chkexe_: fflush1.chkexe_
diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.f90
index d35bfff..ca2550f 100644
--- a/fortran/test/fflush1.f90
+++ b/fortran/test/fflush1.f90
@@ -30,6 +30,7 @@
PROGRAM FFLUSH1EXAMPLE
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
@@ -149,7 +150,7 @@
IF (total_error .ne. 0) CALL h5_exit_f (1)
- 001 STOP
+ STOP
END PROGRAM FFLUSH1EXAMPLE
diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90
index d699150..04ce439 100644
--- a/fortran/test/fflush2.f90
+++ b/fortran/test/fflush2.f90
@@ -30,6 +30,7 @@
PROGRAM FFLUSH2EXAMPLE
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
@@ -39,7 +40,6 @@
!
!data space rank and dimensions
!
- INTEGER, PARAMETER :: RANK = 2
INTEGER, PARAMETER :: NX = 4
INTEGER, PARAMETER :: NY = 5
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index 6268d15..79ff161 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -27,6 +27,7 @@
PROGRAM fortranlibtest
USE HDF5
+ USE THDF5
IMPLICIT NONE
INTEGER :: total_error = 0
@@ -72,14 +73,9 @@ PROGRAM fortranlibtest
CALL reopentest(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Reopen test', total_error)
-!DEC$ if defined(H5_VMS)
- GOTO 8
-!DEC$ else
ret_total_error = 0
CALL file_close(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' File open/close test', total_error)
-!DEC$ endif
-8 CONTINUE
ret_total_error = 0
CALL file_space("file_space",cleanup, ret_total_error)
@@ -143,11 +139,11 @@ PROGRAM fortranlibtest
CALL write_test_status(ret_total_error, ' Element selection functions test ', total_error)
ret_total_error = 0
- CALL test_select_combine(cleanup, ret_total_error)
+ CALL test_select_combine(ret_total_error)
CALL write_test_status(ret_total_error, ' Selection combinations test ', total_error)
ret_total_error = 0
- CALL test_select_bounds(cleanup, ret_total_error)
+ CALL test_select_bounds(ret_total_error)
CALL write_test_status(ret_total_error, ' Selection bounds test ', total_error)
! write(*,*)
@@ -155,7 +151,7 @@ PROGRAM fortranlibtest
! write(*,*) 'Testing DATATYPE interface '
! write(*,*) '========================================='
ret_total_error = 0
- CALL basic_data_type_test(cleanup, ret_total_error)
+ CALL basic_data_type_test(ret_total_error)
CALL write_test_status(ret_total_error, ' Basic datatype test', total_error)
ret_total_error = 0
@@ -179,14 +175,9 @@ PROGRAM fortranlibtest
CALL external_test(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' External dataset test', total_error)
-!DEC$ if defined(H5_VMS)
- GOTO 9
-!DEC$ else
ret_total_error = 0
CALL multi_file_test(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Multi file driver test', total_error)
-!DEC$ endif
-9 CONTINUE
ret_total_error = 0
CALL test_chunk_cache (cleanup, ret_total_error)
@@ -211,7 +202,7 @@ PROGRAM fortranlibtest
CALL write_test_status(ret_total_error, ' Identifier test', total_error)
ret_total_error = 0
- CALL filters_test(cleanup, ret_total_error)
+ CALL filters_test(ret_total_error)
CALL write_test_status(ret_total_error, ' Filters test', total_error)
ret_total_error = 0
diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.f90
index dc45560..66f799b 100644
--- a/fortran/test/fortranlib_test_1_8.f90
+++ b/fortran/test/fortranlib_test_1_8.f90
@@ -27,7 +27,8 @@
PROGRAM fortranlibtest
USE HDF5
-
+ USE THDF5_1_8
+ USE TH5_MISC
IMPLICIT NONE
INTEGER :: total_error = 0
INTEGER :: error
@@ -113,445 +114,3 @@ PROGRAM fortranlibtest
IF (total_error .NE. 0) CALL h5_exit_f (1)
END PROGRAM fortranlibtest
-
-SUBROUTINE dtransform(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- INTEGER(HID_T) :: dxpl_id_c_to_f
- INTEGER(HID_T) :: file_id
-
- CHARACTER(LEN=15), PARAMETER :: c_to_f = "(9/5.0)*x + 123"
- INTEGER :: error
- CHARACTER(LEN=15) :: ptrgetTest
- CHARACTER(LEN=7) :: ptrgetTest_small
- CHARACTER(LEN=30) :: ptrgetTest_big
-
- INTEGER(SIZE_T) :: size
-
- CALL H5Fcreate_f("dtransform.h5", H5F_ACC_TRUNC_F, file_id, error)
- CALL check("dtransform.H5Fcreate_f", error, total_error)
-
- CALL H5Pcreate_f(H5P_DATASET_XFER_F, dxpl_id_c_to_f, error)
- CALL check("dtransform.H5Pcreate_f", error, total_error)
-
- CALL H5Pset_data_transform_f(dxpl_id_c_to_f, c_to_f, error)
- CALL check("dtransform.H5Pset_data_transform_f", error, total_error)
-
- CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest, error, size=size)
- CALL check("dtransform.H5Pget_data_transform_f", error, total_error)
- CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error)
- CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error)
-
-! check case when receiving buffer to small
-
- CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_small, error, size=size)
- CALL check("dtransform.H5Pget_data_transform_f", error, total_error)
- CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error)
- CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error)
-
-! check case when receiving buffer to big
-
- CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_big, error, size=size)
- CALL check("dtransform.H5Pget_data_transform_f", error, total_error)
- CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error)
- CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error)
-
- CALL H5Fclose_f(file_id, error)
- CALL check("H5Fclose_f", error, total_error)
-
- IF(cleanup) CALL h5_cleanup_f("dtransform", H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
-
-
-END SUBROUTINE dtransform
-
-
-!/****************************************************************
-!**
-!** test_genprop_basic_class(): Test basic generic property list code.
-!** Tests creating new generic classes.
-!**
-!****************************************************************/
-
-SUBROUTINE test_genprop_basic_class(cleanup, total_error)
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- INTEGER(HID_T) :: cid1 !/* Generic Property class ID */
- INTEGER(HID_T) :: cid2 !/* Generic Property class ID */
-
- CHARACTER(LEN=7) :: CLASS1_NAME = "Class 1"
- CHARACTER(LEN=7) :: name ! /* Name of class */
- CHARACTER(LEN=10) :: name_big ! /* Name of class bigger buffer */
- CHARACTER(LEN=4) :: name_small ! /* Name of class smaller buffer*/
- INTEGER :: error
- INTEGER :: size
- LOGICAL :: flag
-
- !/* Output message about test being performed */
-
- !WRITE(*,*) "Testing Basic Generic Property List Class Creation Functionality"
-
- ! Try some bogus value for class identifier; function should fail gracefully
-
- cid1 = 456
- CALL H5Pget_class_name_f(cid1, name, size, error)
- CALL VERIFY("H5Pget_class_name", error, -1, error)
-
- ! /* Create a new generic class, derived from the root of the class hierarchy */
- CALL H5Pcreate_class_f(H5P_ROOT_F, CLASS1_NAME, cid1, error)
- CALL check("H5Pcreate_class", error, total_error)
-
- ! /* Check class name */
- CALL H5Pget_class_name_f(cid1, name, size, error)
- CALL check("H5Pget_class_name", error, total_error)
- CALL VERIFY("H5Pget_class_name", size,7,error)
- CALL verifystring("H5Pget_class_name", name, CLASS1_NAME, error)
- IF(error.NE.0)THEN
- WRITE(*,*) 'Class names do not match! name=',name, 'CLASS1_NAME=',CLASS1_NAME
- total_error = total_error + 1
- ENDIF
-
- ! /* Check class name smaller buffer*/
- CALL H5Pget_class_name_f(cid1, name_small, size, error)
- CALL check("H5Pget_class_name", error, total_error)
- CALL VERIFY("H5Pget_class_name", size,7,error)
- CALL verifystring("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error)
- IF(error.NE.0)THEN
- WRITE(*,*) 'Class names do not match! name=',name_small(1:4), 'CLASS1_NAME=',CLASS1_NAME(1:4)
- total_error = total_error + 1
- ENDIF
-
- ! /* Check class name bigger buffer*/
- CALL H5Pget_class_name_f(cid1, name_big, size, error)
- CALL check("H5Pget_class_name", error, total_error)
- CALL VERIFY("H5Pget_class_name", size,7,error)
- CALL verifystring("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error)
- IF(error.NE.0)THEN
- WRITE(*,*) 'Class names do not match! name=',TRIM(name_small), 'CLASS1_NAME=',TRIM(CLASS1_NAME)
- total_error = total_error + 1
- ENDIF
-
- ! /* Check class parent */
- CALL H5Pget_class_parent_f(cid1, cid2, error)
- CALL check("H5Pget_class_parent_f", error, total_error)
-
- ! /* Verify class parent correct */
- CALL H5Pequal_f(cid2, H5P_ROOT_F, flag, error)
- CALL check("H5Pequal_f", error, total_error)
- CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error)
-
-
- ! /* Make certain false postives aren't being returned */
- CALL H5Pequal_f(cid2, H5P_FILE_CREATE_F, flag, error)
- CALL check("H5Pequal_f", error, total_error)
- CALL verifylogical("H5Pequal_f", flag, .FALSE., total_error)
-
- !/* Close parent class */
- CALL H5Pclose_class_f(cid2, error)
- CALL check("H5Pclose_class_f", error, total_error)
-
-
- !/* Close class */
- CALL H5Pclose_class_f(cid1, error)
- CALL check("H5Pclose_class_f", error, total_error)
-
-END SUBROUTINE test_genprop_basic_class
-
-SUBROUTINE test_h5s_encode(cleanup, total_error)
-
-!/****************************************************************
-!**
-!** test_h5s_encode(): Test H5S (dataspace) encoding and decoding.
-!**
-!****************************************************************/
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- INTEGER(hid_t) :: sid1, sid3! /* Dataspace ID */
- INTEGER(hid_t) :: decoded_sid1, decoded_sid3
- INTEGER :: rank !/* LOGICAL rank of dataspace */
- INTEGER(size_t) :: sbuf_size=0, scalar_size=0
-
-! Make sure the size is large
- CHARACTER(LEN=288) :: sbuf
- CHARACTER(LEN=288) :: scalar_buf
-
- INTEGER(hsize_t) :: n ! /* Number of dataspace elements */
-
- INTEGER(hsize_t), DIMENSION(1:3) :: start = (/0, 0, 0/)
- INTEGER(hsize_t), DIMENSION(1:3) :: stride = (/2, 5, 3/)
- INTEGER(hsize_t), DIMENSION(1:3) :: count = (/2, 2, 2/)
- INTEGER(hsize_t), DIMENSION(1:3) :: BLOCK = (/1, 3, 1/)
-
- INTEGER :: space_type
- !
- ! Dataset dimensions
- !
- INTEGER, PARAMETER :: SPACE1_DIM1= 3, SPACE1_DIM2=15, SPACE1_DIM3=13
-
- INTEGER(HSIZE_T), DIMENSION(1:3) :: dims1 = (/SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3/)
- INTEGER :: SPACE1_RANK = 3
- INTEGER :: error
-
- !/*-------------------------------------------------------------------------
- ! * Test encoding and decoding of simple dataspace and hyperslab selection.
- ! *-------------------------------------------------------------------------
- ! */
-
- CALL H5Screate_simple_f(SPACE1_RANK, dims1, sid1, error)
- CALL check("H5Screate_simple", error, total_error)
-
- CALL h5sselect_hyperslab_f(sid1, H5S_SELECT_SET_F, &
- start, count, error, stride=stride, BLOCK=BLOCK)
- CALL check("h5sselect_hyperslab_f", error, total_error)
-
-
- !/* Encode simple data space in a buffer */
-
- ! First find the buffer size
- CALL H5Sencode_f(sid1, sbuf, sbuf_size, error)
- CALL check("H5Sencode", error, total_error)
-
-
- ! /* Try decoding bogus buffer */
-
- CALL H5Sdecode_f(sbuf, decoded_sid1, error)
- CALL VERIFY("H5Sdecode", error, -1, total_error)
-
- CALL H5Sencode_f(sid1, sbuf, sbuf_size, error)
- CALL check("H5Sencode", error, total_error)
-
- ! /* Decode from the dataspace buffer and return an object handle */
- CALL H5Sdecode_f(sbuf, decoded_sid1, error)
- CALL check("H5Sdecode", error, total_error)
-
-
- ! /* Verify the decoded dataspace */
- CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error)
- CALL check("h5sget_simple_extent_npoints_f", error, total_error)
- CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, &
- total_error)
-
- !
- !Close the dataspace for the dataset.
- !
- CALL h5sclose_f(sid1, error)
- CALL check("h5sclose_f", error, total_error)
-
- CALL h5sclose_f(decoded_sid1, error)
- CALL check("h5sclose_f", error, total_error)
-
- ! /*-------------------------------------------------------------------------
- ! * Test encoding and decoding of scalar dataspace.
- ! *-------------------------------------------------------------------------
- ! */
- ! /* Create scalar dataspace */
-
- CALL H5Screate_f(H5S_SCALAR_F, sid3, error)
- CALL check("H5Screate_f",error, total_error)
-
- ! /* Encode scalar data space in a buffer */
-
- ! First find the buffer size
- CALL H5Sencode_f(sid3, scalar_buf, scalar_size, error)
- CALL check("H5Sencode_f", error, total_error)
-
- ! encode
-
- CALL H5Sencode_f(sid3, scalar_buf, scalar_size, error)
- CALL check("H5Sencode_f", error, total_error)
-
-
- ! /* Decode from the dataspace buffer and return an object handle */
-
- CALL H5Sdecode_f(scalar_buf, decoded_sid3, error)
- CALL check("H5Sdecode_f", error, total_error)
-
-
- ! /* Verify extent type */
-
- CALL H5Sget_simple_extent_type_f(decoded_sid3, space_type, error)
- CALL check("H5Sget_simple_extent_type_f", error, total_error)
- CALL VERIFY("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error)
-
- ! /* Verify decoded dataspace */
- CALL h5sget_simple_extent_npoints_f(decoded_sid3, n, error)
- CALL check("h5sget_simple_extent_npoints_f", error, total_error)
- CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), 1, total_error)
-
- CALL H5Sget_simple_extent_ndims_f(decoded_sid3, rank, error)
- CALL CHECK("H5Sget_simple_extent_ndims_f", error, total_error)
- CALL VERIFY("H5Sget_simple_extent_ndims_f", rank, 0, total_error )
-
- CALL h5sclose_f(sid3, error)
- CALL check("h5sclose_f", error, total_error)
-
- CALL h5sclose_f(decoded_sid3, error)
- CALL check("h5sclose_f", error, total_error)
-
-END SUBROUTINE test_h5s_encode
-
-!-------------------------------------------------------------------------
-! Function: test_scaleoffset
-!
-! Purpose: Tests the integer datatype for scaleoffset filter
-! with fill value set
-!
-! Return: Success: 0
-! Failure: >0
-!
-! Programmer: M. Scot Breitenfeld
-! Decemeber 11, 2010
-!
-! Modifications:
-!
-!-------------------------------------------------------------------------
-!
-
-SUBROUTINE test_scaleoffset(cleanup, total_error )
-
- USE HDF5
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
- INTEGER(hid_t) :: file
-
- INTEGER(hid_t) :: dataset, datatype, space, mspace, dc
- INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2, 5/)
- INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2, 5/)
- INTEGER, DIMENSION(1:2,1:5) :: orig_data
- INTEGER, DIMENSION(1:2,1:5) :: new_data
- INTEGER(hsize_t), DIMENSION(1:2) :: start ! Start of hyperslab
- INTEGER(hsize_t), DIMENSION(1:2) :: stride ! Stride of hyperslab
- INTEGER(hsize_t), DIMENSION(1:2) :: count ! BLOCK count
- INTEGER(hsize_t), DIMENSION(1:2) :: BLOCK ! BLOCK sizes
- INTEGER :: fillval
- INTEGER(size_t) :: j
- REAL :: x
- INTEGER :: error
- LOGICAL :: status
-
- ! check to see if filter is available
- CALL H5Zfilter_avail_f(H5Z_FILTER_SCALEOFFSET_F, status, error)
- IF(.NOT.status)THEN ! We don't have H5Z_FILTER_SCALEOFFSET_F filter
- total_error = -1 ! so return
- RETURN
- ENDIF
-
- CALL H5Fcreate_f("h5scaleoffset.h5", H5F_ACC_TRUNC_F, file, error)
- CALL check("H5Fcreate_f", error, total_error)
-
- CALL H5Tcopy_f(H5T_NATIVE_INTEGER, datatype, error)
- CALL CHECK(" H5Tcopy_f", error, total_error)
-
- ! Set order of dataset datatype
- CALL H5Tset_order_f(datatype, H5T_ORDER_BE_F, error)
- CALL CHECK(" H5Tset_order_f", error, total_error)
-
- ! Create the data space for the dataset
- CALL H5Screate_simple_f(2, dims, space, error)
- CALL CHECK(" H5Screate_simple_f", error, total_error)
-
- ! Create the dataset property list
- CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error)
- CALL CHECK(" H5Pcreate_f", error, total_error)
-
- ! Set fill value
- fillval = 10000
- CALL H5Pset_fill_value_f(dc, H5T_NATIVE_INTEGER, fillval, error)
- CALL CHECK(" H5Pset_fill_value_f", error, total_error)
-
- ! Set up to use scaleoffset filter, let library calculate minbits
- CALL H5Pset_chunk_f(dc, 2, chunk_dim, error)
- CALL CHECK(" H5Pset_chunk_f", error, total_error)
-
- CALL H5Pset_scaleoffset_f(dc, H5Z_SO_INT_F, H5Z_SO_INT_MINBITS_DEFAULT_F, error)
- CALL CHECK(" H5Pset_scaleoffset_f", error, total_error)
-
- ! Create the dataset
- CALL H5Dcreate_f(file, "scaleoffset_int", datatype, &
- space, dataset, error, dc)
- CALL CHECK(" H5Dcreate_f", error, total_error)
-
- ! Create the memory data space
- CALL H5Screate_simple_f(2, dims, mspace, error)
- CALL CHECK(" H5Screate_simple_f", error, total_error)
-
- ! Select hyperslab for data to write, using 1x5 blocks,
- ! (1,1) stride and (1,1) count starting at the position (0,0)
-
- start(1:2) = (/0,0/)
- stride(1:2) = (/1,1/)
- COUNT(1:2) = (/1,1/)
- BLOCK(1:2) = (/1,5/)
-
- CALL H5Sselect_hyperslab_f(mspace, H5S_SELECT_SET_F, start, &
- count, error, stride, BLOCK)
- CALL CHECK(" H5Sselect_hyperslab_f", error, total_error)
-
- CALL RANDOM_SEED()
- ! Initialize data of hyperslab
- DO j = 1, dims(2)
- CALL RANDOM_NUMBER(x)
- orig_data(1,j) = INT(x*10000.)
- IF(MOD(j,2_size_t).EQ.0)THEN
- orig_data(1,j) = - orig_data(1,j)
- ENDIF
- ENDDO
-
- !----------------------------------------------------------------------
- ! STEP 1: Test scaleoffset by setting up a chunked dataset and writing
- ! to it.
- !----------------------------------------------------------------------
-
- ! Only data in the hyperslab will be written, other value should be fill value
- CALL H5Dwrite_f(dataset, H5T_NATIVE_INTEGER, orig_data, dims, error, mspace, mspace, H5P_DEFAULT_F)
- CALL CHECK(" H5Dwrite_f", error, total_error)
-
- !----------------------------------------------------------------------
- ! STEP 2: Try to read the data we just wrote.
- !----------------------------------------------------------------------
-
- ! Read the dataset back
-
- CALL H5Dread_f(dataset, H5T_NATIVE_INTEGER, new_data, dims, error, mspace, mspace, H5P_DEFAULT_F)
- CALL CHECK(" H5Dread_f", error, total_error)
-
- ! Check that the values read are the same as the values written
- DO j = 1, dims(2)
- IF(new_data(1,j) .NE. orig_data(1,j))THEN
- total_error = total_error + 1
- WRITE(*,'(" Read different values than written.")')
- WRITE(*,'(" At index ", 2(1X,I0))') 1, j
- EXIT
- ENDIF
- ENDDO
- !----------------------------------------------------------------------
- ! Cleanup
- !----------------------------------------------------------------------
- CALL H5Tclose_f(datatype, error)
- CALL CHECK(" H5Tclose_f", error, total_error)
- CALL H5Pclose_f(dc, error)
- CALL CHECK(" H5Pclose_f", error, total_error)
- CALL H5Sclose_f(space, error)
- CALL CHECK(" H5Sclose_f", error, total_error)
- CALL H5Dclose_f(dataset, error)
- CALL CHECK(" H5Dclose_f", error, total_error)
- CALL H5Fclose_f(file, error)
- CALL CHECK(" H5Fclose_f", error, total_error)
-
-END SUBROUTINE test_scaleoffset
diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.f90
index dbdc184..5b386b9 100644
--- a/fortran/test/fortranlib_test_F03.f90
+++ b/fortran/test/fortranlib_test_F03.f90
@@ -28,12 +28,12 @@
PROGRAM fortranlibtest_F03
USE HDF5
-
+ USE THDF5_F03
+
IMPLICIT NONE
INTEGER :: total_error = 0
INTEGER :: error
INTEGER :: majnum, minnum, relnum
- LOGICAL :: szip_flag
INTEGER :: ret_total_error
LOGICAL :: cleanup, status
diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90
index cecaded..07ca6da 100644
--- a/fortran/test/tH5A.f90
+++ b/fortran/test/tH5A.f90
@@ -27,7 +27,9 @@
!
!
!*****
+MODULE TH5A
+CONTAINS
SUBROUTINE attribute_test(cleanup, total_error)
! This subroutine tests following functionalities:
@@ -36,10 +38,10 @@
!
USE HDF5 ! This module contains all necessary modules
-
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=5), PARAMETER :: filename = "atest" !File name
CHARACTER(LEN=80) :: fix_filename
@@ -100,7 +102,7 @@
CHARACTER(LEN=35), DIMENSION(2) :: aread_data ! Buffer to put read back
! string attr data
CHARACTER :: attr_character_data = 'A'
- REAL(KIND=Fortran_DOUBLE), DIMENSION(1) :: attr_double_data = 3.459
+ REAL(KIND=Fortran_DOUBLE), DIMENSION(1) :: attr_double_data = 3.459D0
REAL, DIMENSION(1) :: attr_real_data = 4.0
INTEGER, DIMENSION(1) :: attr_integer_data = 5
INTEGER(HSIZE_T), DIMENSION(7) :: data_dims
@@ -127,6 +129,7 @@
!data buffers
!
INTEGER, DIMENSION(NX,NY) :: data_in
+ LOGICAL :: differ
!
@@ -516,20 +519,21 @@
data_dims(1) = 1
CALL h5aread_f(attr3_id, H5T_NATIVE_DOUBLE, aread_double_data, data_dims, error)
CALL check("h5aread_f",error,total_error)
- IF (aread_double_data(1) .NE. 3.459 ) THEN
- WRITE(*,*) "Read back double attrbute is wrong", aread_double_data(1)
- total_error = total_error + 1
- END IF
+
+ IF( .NOT.dreal_eq( REAL(aread_double_data(1),dp), 3.459_dp) )THEN
+ WRITE(*,*) "Read back double attrbute is wrong", aread_double_data(1)
+ total_error = total_error + 1
+ ENDIF
!
!read the real attribute data back to memory
!
data_dims(1) = 1
CALL h5aread_f(attr4_id, H5T_NATIVE_REAL, aread_real_data, data_dims, error)
CALL check("h5aread_f",error,total_error)
- IF (aread_real_data(1) .NE. 4.0 ) THEN
- WRITE(*,*) "Read back real attrbute is wrong ", aread_real_data
- total_error = total_error + 1
- END IF
+ IF( .NOT.dreal_eq( REAL(aread_real_data(1),dp), 4.0_dp) )THEN
+ WRITE(*,*) "Read back real attrbute is wrong", aread_real_data(1)
+ total_error = total_error + 1
+ ENDIF
!
!read the Integer attribute data back to memory
!
@@ -624,3 +628,4 @@
RETURN
END SUBROUTINE attribute_test
+END MODULE TH5A
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90
index 32cb228..02bef53 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.f90
@@ -30,7 +30,9 @@
! test_attr_basic_write, test_attr_many, attr_open_check,
!
!*****
+MODULE TH5A_1_8
+CONTAINS
SUBROUTINE attribute_test_1_8(cleanup, total_error)
! This subroutine tests following 1.8 functionalities:
@@ -40,27 +42,12 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
!
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(INOUT) :: total_error
- CHARACTER(LEN=5), PARAMETER :: filename = "atest" !File name
- CHARACTER(LEN=9), PARAMETER :: dsetname = "atestdset" !Dataset name
- CHARACTER(LEN=11), PARAMETER :: aname = "attr_string" !String Attribute name
- CHARACTER(LEN=14), PARAMETER :: aname2 = "attr_character"!Character Attribute name
- CHARACTER(LEN=11), PARAMETER :: aname3 = "attr_double" !DOuble Attribute name
- CHARACTER(LEN=9), PARAMETER :: aname4 = "attr_real" !Real Attribute name
- CHARACTER(LEN=12), PARAMETER :: aname5 = "attr_integer" !Integer Attribute name
- CHARACTER(LEN=9), PARAMETER :: aname6 = "attr_null" !Null Attribute name
-
- !
- !data space rank and dimensions
- !
- INTEGER, PARAMETER :: RANK = 2
- INTEGER, PARAMETER :: NX = 4
- INTEGER, PARAMETER :: NY = 5
-
!
!general purpose integer
!
@@ -213,8 +200,10 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error)
! Needed for get_info_by_name
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
+
! - - - arg types - - -
INTEGER(HID_T), INTENT(IN) :: fcpl
@@ -401,6 +390,8 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error)
!**
!****************************************************************/
USE HDF5
+ USE TH5_MISC
+
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: fcpl
@@ -413,8 +404,6 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error)
INTEGER(HID_T) :: dataset
CHARACTER(LEN=8) :: DSET1_NAME = "Dataset1"
- INTEGER, PARAMETER :: NUM_DSETS = 3
-
INTEGER :: error
@@ -532,6 +521,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error)
!****************************************************************/
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -746,6 +736,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error)
!****************************************************************/
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -951,6 +942,7 @@ END SUBROUTINE test_attr_info_by_idx
SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error )
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -1091,6 +1083,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error)
!****************************************************************/
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -1105,7 +1098,6 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error)
CHARACTER(LEN=8) :: DSET1_NAME = "Dataset1"
CHARACTER(LEN=8) :: DSET2_NAME = "Dataset2"
- INTEGER, PARAMETER :: NUM_DSETS = 3
INTEGER(HID_T) :: dataset, dataset2
@@ -1127,22 +1119,11 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error)
CHARACTER(LEN=7) :: attrname
CHARACTER(LEN=11) :: attrname2
- CHARACTER(LEN=1), PARAMETER :: chr1 = '.'
-
INTEGER :: u
- INTEGER, PARAMETER :: SPACE1_RANK = 3
- INTEGER, PARAMETER :: NX = 20
- INTEGER, PARAMETER :: NY = 5
- INTEGER, PARAMETER :: NZ = 10
INTEGER(HID_T) :: my_fcpl
CHARACTER(LEN=5), PARAMETER :: TYPE1_NAME = "/Type"
- INTEGER, PARAMETER :: SPACE1_DIM1 = 4
- INTEGER, PARAMETER :: SPACE1_DIM2 = 8
- INTEGER, PARAMETER :: SPACE1_DIM3 = 10
-
-
INTEGER :: test_shared
INTEGER(HSIZE_T), DIMENSION(1) :: adims2 = (/1/) ! Attribute dimension
INTEGER :: arank = 1 ! Attribure rank
@@ -1412,6 +1393,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error)
!****************************************************************/
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -1457,7 +1439,6 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error)
INTEGER(SIZE_T) :: size
CHARACTER(LEN=8) :: tmpname
- CHARACTER(LEN=1), PARAMETER :: chr1 = '.'
INTEGER :: idx_type
INTEGER :: order
@@ -1773,6 +1754,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error)
!****************************************************************/
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -1786,7 +1768,6 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error)
CHARACTER(LEN=8) :: DSET1_NAME = "Dataset1"
CHARACTER(LEN=8) :: DSET2_NAME = "Dataset2"
- INTEGER, PARAMETER :: NUM_DSETS = 3
INTEGER(HID_T) :: dataset, dataset2
@@ -1806,13 +1787,7 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error)
INTEGER, DIMENSION(1) :: attr_integer_data
CHARACTER(LEN=7) :: attrname
- CHARACTER(LEN=1), PARAMETER :: chr1 = '.'
-
INTEGER :: u
- INTEGER, PARAMETER :: SPACE1_RANK = 3
- INTEGER, PARAMETER :: NX = 20
- INTEGER, PARAMETER :: NY = 5
- INTEGER, PARAMETER :: NZ = 10
INTEGER(HID_T) :: my_fcpl
CHARACTER(LEN=5), PARAMETER :: TYPE1_NAME = "/Type"
@@ -2056,6 +2031,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error)
!****************************************************************/
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -2207,6 +2183,7 @@ END SUBROUTINE test_attr_dense_open
SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error)
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -2302,6 +2279,7 @@ END SUBROUTINE test_attr_dense_verify
SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error )
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -2424,6 +2402,7 @@ END SUBROUTINE test_attr_corder_create_basic
SUBROUTINE test_attr_basic_write(fapl, total_error)
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -2445,8 +2424,6 @@ SUBROUTINE test_attr_basic_write(fapl, total_error)
CHARACTER(LEN=25) :: check_name
CHARACTER(LEN=18) :: chr_exact_size
- INTEGER, PARAMETER :: SPACE1_RANK = 2
-
CHARACTER(LEN=5), PARAMETER :: ATTR1_NAME="Attr1"
INTEGER, PARAMETER :: ATTR1_RANK = 1
INTEGER, PARAMETER :: ATTR1_DIM1 = 3
@@ -2623,6 +2600,7 @@ END SUBROUTINE test_attr_basic_write
SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error)
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -2740,6 +2718,7 @@ END SUBROUTINE test_attr_many
SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error )
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: fid
@@ -2750,7 +2729,6 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error )
INTEGER :: u
CHARACTER (LEN=8) :: attrname
- INTEGER, PARAMETER :: NUM_DSETS = 3
INTEGER :: error
LOGICAL :: f_corder_valid ! Indicates whether the the creation order data is valid for this attribute
INTEGER :: corder ! Is a positive integer containing the creation order of the attribute
@@ -2835,3 +2813,4 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error )
ENDDO
END SUBROUTINE attr_open_check
+END MODULE TH5A_1_8
diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90
index 9f7b50c..c0eb8f9 100644
--- a/fortran/test/tH5D.f90
+++ b/fortran/test/tH5D.f90
@@ -34,8 +34,12 @@
!*****
!
+MODULE TH5D
+
+CONTAINS
SUBROUTINE datasettest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -204,7 +208,7 @@
do j = 1, 6
IF (data_out(i,j) .NE. dset_data(i, j)) THEN
write(*, *) "dataset test error occured"
- write(*,*) "data read is not the same as the data writen"
+ write(*,*) "data read is not the same as the data written"
END IF
end do
end do
@@ -252,8 +256,10 @@
SUBROUTINE extenddsettest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
+
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
@@ -308,6 +314,7 @@
!general purpose integer
!
INTEGER :: i, j
+ INTEGER(HSIZE_T) :: ih, jh
!
!flag to check operation success
@@ -484,9 +491,9 @@
!
!Compare the data.
!
- do i = 1, dims1(1)
- do j = 1, dims1(2)
- IF (data_out(i,j) .NE. data_in(i, j)) THEN
+ do ih = 1, dims1(1)
+ do jh = 1, dims1(2)
+ IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN
write(*, *) "extend dataset test error occured"
write(*, *) "read value is not the same as the written values"
END IF
@@ -527,5 +534,5 @@
RETURN
END SUBROUTINE extenddsettest
-
+END MODULE TH5D
diff --git a/fortran/test/tH5E.f90 b/fortran/test/tH5E.f90
index 4d431a1..10ecaf6 100644
--- a/fortran/test/tH5E.f90
+++ b/fortran/test/tH5E.f90
@@ -31,15 +31,20 @@
!
!*****
!
+MODULE TH5E
+
+CONTAINS
+
SUBROUTINE error_report_test(cleanup, total_error)
! This subroutine tests following functionalities: h5eprint_f
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=6), PARAMETER :: filename = "etestf" ! File name
CHARACTER(LEN=80) :: fix_filename
@@ -92,3 +97,6 @@
CALL check("h5_cleanup_f", error, total_error)
RETURN
END SUBROUTINE error_report_test
+
+END MODULE TH5E
+
diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.f90
index 04e3190..82ba27c 100644
--- a/fortran/test/tH5E_F03.f90
+++ b/fortran/test/tH5E_F03.f90
@@ -34,10 +34,8 @@
! *****************************************
! *** H 5 E T E S T S
! *****************************************
-
MODULE test_my_hdf5_error_handler
- IMPLICIT NONE
CONTAINS
@@ -56,9 +54,8 @@ CONTAINS
IMPLICIT NONE
! estack_id is always passed from C as: H5E_DEFAULT
- INTEGER(HID_T) :: estack_id
+ INTEGER(HID_T) :: estack_id
! data that was registered with H5Eset_auto_f
-! INTEGER, DIMENSION(1:2) :: data_inout
INTEGER :: data_inout
PRINT*, " "
@@ -82,10 +79,10 @@ CONTAINS
IMPLICIT NONE
! estack_id is always passed from C as: H5E_DEFAULT
- INTEGER(HID_T) :: estack_id
+ INTEGER(HID_T) :: estack_id
! data that was registered with H5Eset_auto_f
TYPE(C_PTR) :: data_inout
-
+
PRINT*, " "
PRINT*, " Subtest: H5Eset_auto_f custom error message with callback, NO DATA"
PRINT*, " -This message should be written to standard out- "
@@ -94,12 +91,19 @@ CONTAINS
my_hdf5_error_handler_nodata = 1 ! this is not used by the C routine
END FUNCTION my_hdf5_error_handler_nodata
-
+
END MODULE test_my_hdf5_error_handler
+
+
+MODULE TH5E_F03
+
+CONTAINS
+
SUBROUTINE test_error(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
USE test_my_hdf5_error_handler
@@ -109,27 +113,17 @@ SUBROUTINE test_error(total_error)
INTEGER :: total_error
INTEGER(hid_t) :: file
INTEGER(hid_t) :: dataset, space
- INTEGER(hid_t) :: estack_id
INTEGER(hsize_t), DIMENSION(1:2) :: dims
- CHARACTER(LEN=10) :: FUNC_test_error = "test_error"
- TYPE(C_FUNPTR) :: old_func
- TYPE(C_PTR) :: old_data, null_data
INTEGER :: error
- TYPE(C_FUNPTR) :: op
- INTEGER, DIMENSION(1:100,1:200), TARGET :: ipoints2
- !! INTEGER, DIMENSION(1:2), TARGET :: my_hdf5_error_handler_data
INTEGER, DIMENSION(:), POINTER :: ptr_data
INTEGER, TARGET :: my_hdf5_error_handler_data
TYPE(C_PTR) :: f_ptr
TYPE(C_FUNPTR) :: func
TYPE(C_PTR), TARGET :: f_ptr1
- TYPE(C_FUNPTR), TARGET :: func1
INTEGER, DIMENSION(1:1) :: array_shape
- LOGICAL :: is_associated
- ! my_hdf5_error_handler_data(1:2) =(/1,2/)
my_hdf5_error_handler_data = 99
CALL h5fcreate_f("terror.h5", H5F_ACC_TRUNC_F, file, error)
CALL check("h5fcreate_f", error, total_error)
@@ -208,3 +202,5 @@ SUBROUTINE test_error(total_error)
CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error)
END SUBROUTINE test_error
+
+END MODULE TH5E_F03
diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90
index d8f683c..931a046 100644
--- a/fortran/test/tH5F.f90
+++ b/fortran/test/tH5F.f90
@@ -1,4 +1,4 @@
-!****h* root/fortran/test/tH5F.f90
+!***rh* root/fortran/test/tH5F.f90
!
! NAME
! tH5F.f90
@@ -31,11 +31,19 @@
! and another file with a dataset. Mounting is used to
! access the dataset from the second file as a member of a group
! in the first file.
+
+
+
+MODULE TH5F
+
+CONTAINS
+
SUBROUTINE mountingtest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
!
!the respective filename is "mount1.h5" and "mount2.h5"
@@ -241,7 +249,6 @@
do i = 1, NX
do j = 1, NY
IF (data_out(i,j) .NE. data_in(i, j)) THEN
- write(*, *) "mounting test error occured"
END IF
end do
end do
@@ -289,9 +296,10 @@
SUBROUTINE reopentest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
!
CHARACTER(LEN=6), PARAMETER :: filename = "reopen"
@@ -475,9 +483,10 @@
SUBROUTINE plisttest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
!
!file names are "plist1.h5" and "plist2.h5"
@@ -574,9 +583,10 @@
SUBROUTINE file_close(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER :: error
!
@@ -702,10 +712,11 @@
SUBROUTINE file_space(filename, cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
CHARACTER(*), INTENT(IN) :: filename
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER :: error
!
CHARACTER(LEN=3), PARAMETER :: grpname = "grp"
@@ -770,4 +781,4 @@
END SUBROUTINE file_space
-
+END MODULE TH5F
diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90
index 79b0458..c878a59 100644
--- a/fortran/test/tH5F_F03.f90
+++ b/fortran/test/tH5F_F03.f90
@@ -36,11 +36,16 @@
! *** H 5 F T E S T S
! *****************************************
+MODULE TH5F_F03
+
+CONTAINS
+
SUBROUTINE test_get_file_image(total_error)
!
! Tests the wrapper for h5fget_file_image
!
- USE HDF5
+ USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -169,3 +174,5 @@ SUBROUTINE test_get_file_image(total_error)
DEALLOCATE(file_image_ptr,image_ptr)
END SUBROUTINE test_get_file_image
+
+END MODULE TH5F_F03
diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.f90
index 6befa94..2ba174c 100644
--- a/fortran/test/tH5G.f90
+++ b/fortran/test/tH5G.f90
@@ -27,6 +27,10 @@
!
!*****
+MODULE TH5G
+
+CONTAINS
+
SUBROUTINE group_test(cleanup, total_error)
! This subroutine tests following functionalities:
@@ -35,10 +39,11 @@
! h5gget_comment_f
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=5), PARAMETER :: filename = "gtest" !File name
CHARACTER(LEN=80) :: fix_filename
@@ -254,3 +259,5 @@
if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE group_test
+
+END MODULE TH5G
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90
index fd55ba9..5e6f50a 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.f90
@@ -28,12 +28,18 @@
! lapl_nlinks
!
!*****
+
+MODULE TH5G_1_8
+
+CONTAINS
+
SUBROUTINE group_test(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T) :: fapl, fapl2, my_fapl ! /* File access property lists */
@@ -134,9 +140,10 @@ END SUBROUTINE group_test
SUBROUTINE group_info(cleanup, fapl, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl
INTEGER(HID_T) :: gcpl_id ! /* Group creation property list ID */
@@ -450,9 +457,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
SUBROUTINE timestamps(cleanup, fapl, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl
INTEGER(HID_T) :: file_id !/* File ID */
@@ -646,9 +654,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
SUBROUTINE mklinks(fapl, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl
INTEGER(HID_T) :: file, scalar, grp, d1
@@ -661,10 +670,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_TYPE_HARD_F - Hard link
- ! H5L_TYPE_SOFT_F - Soft link
- ! H5L_TYPE_EXTERNAL_F - External link
- ! H5L_TYPE_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -741,9 +750,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
SUBROUTINE test_move_preserves(fapl_id, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl_id
INTEGER(HID_T):: file_id
@@ -768,10 +778,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_TYPE_HARD_F - Hard link
- ! H5L_TYPE_SOFT_F - Soft link
- ! H5L_TYPE_EXTERNAL_F - External link
- ! H5L_TYPE_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -948,9 +958,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl2
INTEGER :: error
@@ -962,8 +973,8 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error)
INTEGER(size_t) :: lheap_size_hint !/* Local heap size hint */
INTEGER :: max_compact !/* Maximum # of links to store in group compactly */
INTEGER :: min_dense !/* Minimum # of links to store in group "densely" */
- INTEGER :: est_num_entries !/* Estimated # of entries in group */
- INTEGER :: est_name_len !/* Estimated length of entry name */
+ INTEGER :: est_num_entries !/* Estimated # of entries in group */
+ INTEGER :: est_name_len !/* Estimated length of entry name */
CHARACTER(LEN=NAME_BUF_SIZE) :: filename = 'fixx.h5'
INTEGER(SIZE_T) :: LIFECYCLE_LOCAL_HEAP_SIZE_HINT = 256
INTEGER :: LIFECYCLE_MAX_COMPACT = 4
@@ -1096,9 +1107,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error)
! USE ISO_C_BINDING
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl
INTEGER :: error
@@ -1165,9 +1177,10 @@ END SUBROUTINE cklinks
SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T), INTENT(IN) :: fapl
INTEGER(HID_T) :: file_id ! /* File ID */
@@ -1406,6 +1419,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
hard_link, use_index, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
INTEGER, INTENT(INOUT) :: total_error
@@ -1509,6 +1523,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
SUBROUTINE test_lcpl(cleanup, fapl, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
INTEGER, INTENT(INOUT) :: total_error
@@ -1526,10 +1541,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_TYPE_HARD_F - Hard link
- ! H5L_TYPE_SOFT_F - Soft link
- ! H5L_TYPE_EXTERNAL_F - External link
- ! H5L_TYPE_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -1635,13 +1650,11 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
CALL check("h5sget_simple_extent_dims_f",error, total_error)
DO i = 1, 2
- tmp1 = dimsout(i)
- tmp2 = extend_dim(i)
-!EP CALL VERIFY("H5Sget_simple_extent_dims", dimsout(i), extend_dim(i), total_error)
+ tmp1 = INT(dimsout(i))
+ tmp2 = INT(extend_dim(i))
CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error)
-!EP CALL VERIFY("H5Sget_simple_extent_dims", maxdimsout(i), dims(i), total_error)
- tmp1 = maxdimsout(i)
- tmp2 = dims(i)
+ tmp1 = INT(maxdimsout(i))
+ tmp2 = INT(dims(i))
CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error)
ENDDO
@@ -1822,6 +1835,7 @@ END SUBROUTINE test_lcpl
SUBROUTINE objcopy(fapl, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
INTEGER, INTENT(INOUT) :: total_error
@@ -1885,6 +1899,7 @@ END SUBROUTINE objcopy
SUBROUTINE lapl_nlinks( fapl, total_error)
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: fapl
@@ -2140,3 +2155,5 @@ SUBROUTINE lapl_nlinks( fapl, total_error)
CALL check("H5Fclose_f", error, total_error)
END SUBROUTINE lapl_nlinks
+
+END MODULE TH5G_1_8
diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90
index 184edaf..088b4eb 100644
--- a/fortran/test/tH5I.f90
+++ b/fortran/test/tH5I.f90
@@ -26,16 +26,20 @@
! identifier_test
!
!*****
+MODULE TH5I
+
+CONTAINS
SUBROUTINE identifier_test(cleanup, total_error)
! This subroutine tests following functionalities: h5iget_type_f
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=6), PARAMETER :: filename = "itestf" ! File name
CHARACTER(LEN=80) :: fix_filename
@@ -311,3 +315,5 @@
RETURN
END SUBROUTINE identifier_test
+
+END MODULE TH5I
diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.f90
index f71f450..8cc17fb 100644
--- a/fortran/test/tH5L_F03.f90
+++ b/fortran/test/tH5L_F03.f90
@@ -30,14 +30,13 @@
! test_iter_group
!
!*****
-
MODULE liter_cb_mod
USE HDF5
USE ISO_C_BINDING
IMPLICIT NONE
-
- TYPE iter_enum
+
+ TYPE iter_enum
INTEGER RET_ZERO
INTEGER RET_TWO
INTEGER RET_CHANGE
@@ -74,7 +73,7 @@ CONTAINS
TYPE(iter_info) :: op_data
INTEGER, SAVE :: count
- INTEGER, SAVE :: count2
+ INTEGER, SAVE :: count2
!!$
!!$ iter_info *info = (iter_info *)op_data;
@@ -108,6 +107,10 @@ CONTAINS
END FUNCTION liter_cb
END MODULE liter_cb_mod
+MODULE TH5L_F03
+
+CONTAINS
+
! *****************************************
! *** H 5 L T E S T S
! *****************************************
@@ -121,34 +124,29 @@ END MODULE liter_cb_mod
SUBROUTINE test_iter_group(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
USE liter_cb_mod
IMPLICIT NONE
INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T) :: fapl
- INTEGER(HID_T) :: file ! File ID
+ INTEGER(HID_T) :: file ! File ID
INTEGER(hid_t) :: dataset ! Dataset ID
INTEGER(hid_t) :: datatype ! Common datatype ID
INTEGER(hid_t) :: filespace ! Common dataspace ID
- INTEGER(hid_t) :: root_group,grp ! Root group ID
- INTEGER i,j ! counting variable
- INTEGER(hsize_t) idx ! Index in the group
+ INTEGER(hid_t) :: grp ! Group ID
+ INTEGER i,j ! counting variable
+ INTEGER(hsize_t) idx ! Index in the group
CHARACTER(LEN=11) :: DATAFILE = "titerate.h5"
INTEGER, PARAMETER :: ndatasets = 50
CHARACTER(LEN=10) :: name ! temporary name buffer
CHARACTER(LEN=10), DIMENSION(1:ndatasets+2) :: lnames ! Names of the links created
-!!$ char dataset_name[NAMELEN]; dataset name
TYPE(iter_info), TARGET :: info
-!!$ iter_info info; Custom iteration information
-!!$ H5G_info_t ginfo; Buffer for querying object's info
-!!$ herr_t ret; Generic return value
-
INTEGER :: error
INTEGER :: ret_value
- TYPE(C_PTR) :: f_ptr
TYPE(C_FUNPTR) :: f1
TYPE(C_PTR) :: f2
CHARACTER(LEN=2) :: ichr2
@@ -319,3 +317,5 @@ SUBROUTINE test_iter_group(total_error)
CALL check("H5Fclose_f", error, total_error)
END SUBROUTINE test_iter_group
+
+END MODULE TH5L_F03
diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.f90
new file mode 100644
index 0000000..bb7d50a
--- /dev/null
+++ b/fortran/test/tH5MISC_1_8.f90
@@ -0,0 +1,474 @@
+!****h* root/fortran/test/tH5MISC_1_8.f90
+!
+! NAME
+! tH5MISC_1_8.f90
+!
+! FUNCTION
+! Basic testing of Fortran API's introduced in 1.8 release.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!*****
+MODULE TH5MISC_1_8
+
+CONTAINS
+
+SUBROUTINE dtransform(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+
+ INTEGER(HID_T) :: dxpl_id_c_to_f
+ INTEGER(HID_T) :: file_id
+
+ CHARACTER(LEN=15), PARAMETER :: c_to_f = "(9/5.0)*x + 123"
+ INTEGER :: error
+ CHARACTER(LEN=15) :: ptrgetTest
+ CHARACTER(LEN=7) :: ptrgetTest_small
+ CHARACTER(LEN=30) :: ptrgetTest_big
+
+ INTEGER(SIZE_T) :: size
+
+ CALL H5Fcreate_f("dtransform.h5", H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("dtransform.H5Fcreate_f", error, total_error)
+
+ CALL H5Pcreate_f(H5P_DATASET_XFER_F, dxpl_id_c_to_f, error)
+ CALL check("dtransform.H5Pcreate_f", error, total_error)
+
+ CALL H5Pset_data_transform_f(dxpl_id_c_to_f, c_to_f, error)
+ CALL check("dtransform.H5Pset_data_transform_f", error, total_error)
+
+ CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest, error, size=size)
+ CALL check("dtransform.H5Pget_data_transform_f", error, total_error)
+ CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error)
+ CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error)
+
+! check case when receiving buffer to small
+
+ CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_small, error, size=size)
+ CALL check("dtransform.H5Pget_data_transform_f", error, total_error)
+ CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error)
+ CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error)
+
+! check case when receiving buffer to big
+
+ CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_big, error, size=size)
+ CALL check("dtransform.H5Pget_data_transform_f", error, total_error)
+ CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error)
+ CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error)
+
+ CALL H5Fclose_f(file_id, error)
+ CALL check("H5Fclose_f", error, total_error)
+
+ IF(cleanup) CALL h5_cleanup_f("dtransform", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+
+END SUBROUTINE dtransform
+
+
+!/****************************************************************
+!**
+!** test_genprop_basic_class(): Test basic generic property list code.
+!** Tests creating new generic classes.
+!**
+!****************************************************************/
+
+SUBROUTINE test_genprop_basic_class(cleanup, total_error)
+
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+
+ INTEGER(HID_T) :: cid1 !/* Generic Property class ID */
+ INTEGER(HID_T) :: cid2 !/* Generic Property class ID */
+
+ CHARACTER(LEN=7) :: CLASS1_NAME = "Class 1"
+ CHARACTER(LEN=7) :: name ! /* Name of class */
+ CHARACTER(LEN=10) :: name_big ! /* Name of class bigger buffer */
+ CHARACTER(LEN=4) :: name_small ! /* Name of class smaller buffer*/
+ INTEGER :: error
+ INTEGER :: size
+ LOGICAL :: flag
+
+ !/* Output message about test being performed */
+
+ !WRITE(*,*) "Testing Basic Generic Property List Class Creation Functionality"
+
+ ! Try some bogus value for class identifier; function should fail gracefully
+
+ cid1 = 456
+ CALL H5Pget_class_name_f(cid1, name, size, error)
+ CALL VERIFY("H5Pget_class_name", error, -1, error)
+
+ ! /* Create a new generic class, derived from the root of the class hierarchy */
+ CALL H5Pcreate_class_f(H5P_ROOT_F, CLASS1_NAME, cid1, error)
+ CALL check("H5Pcreate_class", error, total_error)
+
+ ! /* Check class name */
+ CALL H5Pget_class_name_f(cid1, name, size, error)
+ CALL check("H5Pget_class_name", error, total_error)
+ CALL VERIFY("H5Pget_class_name", size,7,error)
+ CALL verifystring("H5Pget_class_name", name, CLASS1_NAME, error)
+ IF(error.NE.0)THEN
+ WRITE(*,*) 'Class names do not match! name=',name, 'CLASS1_NAME=',CLASS1_NAME
+ total_error = total_error + 1
+ ENDIF
+
+ ! /* Check class name smaller buffer*/
+ CALL H5Pget_class_name_f(cid1, name_small, size, error)
+ CALL check("H5Pget_class_name", error, total_error)
+ CALL VERIFY("H5Pget_class_name", size,7,error)
+ CALL verifystring("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error)
+ IF(error.NE.0)THEN
+ WRITE(*,*) 'Class names do not match! name=',name_small(1:4), 'CLASS1_NAME=',CLASS1_NAME(1:4)
+ total_error = total_error + 1
+ ENDIF
+
+ ! /* Check class name bigger buffer*/
+ CALL H5Pget_class_name_f(cid1, name_big, size, error)
+ CALL check("H5Pget_class_name", error, total_error)
+ CALL VERIFY("H5Pget_class_name", size,7,error)
+ CALL verifystring("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error)
+ IF(error.NE.0)THEN
+ WRITE(*,*) 'Class names do not match! name=',TRIM(name_small), 'CLASS1_NAME=',TRIM(CLASS1_NAME)
+ total_error = total_error + 1
+ ENDIF
+
+ ! /* Check class parent */
+ CALL H5Pget_class_parent_f(cid1, cid2, error)
+ CALL check("H5Pget_class_parent_f", error, total_error)
+
+ ! /* Verify class parent correct */
+ CALL H5Pequal_f(cid2, H5P_ROOT_F, flag, error)
+ CALL check("H5Pequal_f", error, total_error)
+ CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error)
+
+
+ ! /* Make certain false postives aren't being returned */
+ CALL H5Pequal_f(cid2, H5P_FILE_CREATE_F, flag, error)
+ CALL check("H5Pequal_f", error, total_error)
+ CALL verifylogical("H5Pequal_f", flag, .FALSE., total_error)
+
+ !/* Close parent class */
+ CALL H5Pclose_class_f(cid2, error)
+ CALL check("H5Pclose_class_f", error, total_error)
+
+
+ !/* Close class */
+ CALL H5Pclose_class_f(cid1, error)
+ CALL check("H5Pclose_class_f", error, total_error)
+
+END SUBROUTINE test_genprop_basic_class
+
+SUBROUTINE test_h5s_encode(cleanup, total_error)
+
+!/****************************************************************
+!**
+!** test_h5s_encode(): Test H5S (dataspace) encoding and decoding.
+!**
+!****************************************************************/
+
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+
+ INTEGER(hid_t) :: sid1, sid3! /* Dataspace ID */
+ INTEGER(hid_t) :: decoded_sid1, decoded_sid3
+ INTEGER :: rank !/* LOGICAL rank of dataspace */
+ INTEGER(size_t) :: sbuf_size=0, scalar_size=0
+
+! Make sure the size is large
+ CHARACTER(LEN=288) :: sbuf
+ CHARACTER(LEN=288) :: scalar_buf
+
+ INTEGER(hsize_t) :: n ! /* Number of dataspace elements */
+
+ INTEGER(hsize_t), DIMENSION(1:3) :: start = (/0, 0, 0/)
+ INTEGER(hsize_t), DIMENSION(1:3) :: stride = (/2, 5, 3/)
+ INTEGER(hsize_t), DIMENSION(1:3) :: count = (/2, 2, 2/)
+ INTEGER(hsize_t), DIMENSION(1:3) :: BLOCK = (/1, 3, 1/)
+
+ INTEGER :: space_type
+ !
+ ! Dataset dimensions
+ !
+ INTEGER, PARAMETER :: SPACE1_DIM1= 3, SPACE1_DIM2=15, SPACE1_DIM3=13
+
+ INTEGER(HSIZE_T), DIMENSION(1:3) :: dims1 = (/SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3/)
+ INTEGER :: SPACE1_RANK = 3
+ INTEGER :: error
+
+ !/*-------------------------------------------------------------------------
+ ! * Test encoding and decoding of simple dataspace and hyperslab selection.
+ ! *-------------------------------------------------------------------------
+ ! */
+
+ CALL H5Screate_simple_f(SPACE1_RANK, dims1, sid1, error)
+ CALL check("H5Screate_simple", error, total_error)
+
+ CALL h5sselect_hyperslab_f(sid1, H5S_SELECT_SET_F, &
+ start, count, error, stride=stride, BLOCK=BLOCK)
+ CALL check("h5sselect_hyperslab_f", error, total_error)
+
+
+ !/* Encode simple data space in a buffer */
+
+ ! First find the buffer size
+ CALL H5Sencode_f(sid1, sbuf, sbuf_size, error)
+ CALL check("H5Sencode", error, total_error)
+
+
+ ! /* Try decoding bogus buffer */
+
+ CALL H5Sdecode_f(sbuf, decoded_sid1, error)
+ CALL VERIFY("H5Sdecode", error, -1, total_error)
+
+ CALL H5Sencode_f(sid1, sbuf, sbuf_size, error)
+ CALL check("H5Sencode", error, total_error)
+
+ ! /* Decode from the dataspace buffer and return an object handle */
+ CALL H5Sdecode_f(sbuf, decoded_sid1, error)
+ CALL check("H5Sdecode", error, total_error)
+
+
+ ! /* Verify the decoded dataspace */
+ CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error)
+ CALL check("h5sget_simple_extent_npoints_f", error, total_error)
+ CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, &
+ total_error)
+
+ !
+ !Close the dataspace for the dataset.
+ !
+ CALL h5sclose_f(sid1, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ CALL h5sclose_f(decoded_sid1, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ ! /*-------------------------------------------------------------------------
+ ! * Test encoding and decoding of scalar dataspace.
+ ! *-------------------------------------------------------------------------
+ ! */
+ ! /* Create scalar dataspace */
+
+ CALL H5Screate_f(H5S_SCALAR_F, sid3, error)
+ CALL check("H5Screate_f",error, total_error)
+
+ ! /* Encode scalar data space in a buffer */
+
+ ! First find the buffer size
+ CALL H5Sencode_f(sid3, scalar_buf, scalar_size, error)
+ CALL check("H5Sencode_f", error, total_error)
+
+ ! encode
+
+ CALL H5Sencode_f(sid3, scalar_buf, scalar_size, error)
+ CALL check("H5Sencode_f", error, total_error)
+
+
+ ! /* Decode from the dataspace buffer and return an object handle */
+
+ CALL H5Sdecode_f(scalar_buf, decoded_sid3, error)
+ CALL check("H5Sdecode_f", error, total_error)
+
+
+ ! /* Verify extent type */
+
+ CALL H5Sget_simple_extent_type_f(decoded_sid3, space_type, error)
+ CALL check("H5Sget_simple_extent_type_f", error, total_error)
+ CALL VERIFY("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error)
+
+ ! /* Verify decoded dataspace */
+ CALL h5sget_simple_extent_npoints_f(decoded_sid3, n, error)
+ CALL check("h5sget_simple_extent_npoints_f", error, total_error)
+ CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), 1, total_error)
+
+ CALL H5Sget_simple_extent_ndims_f(decoded_sid3, rank, error)
+ CALL CHECK("H5Sget_simple_extent_ndims_f", error, total_error)
+ CALL VERIFY("H5Sget_simple_extent_ndims_f", rank, 0, total_error )
+
+ CALL h5sclose_f(sid3, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ CALL h5sclose_f(decoded_sid3, error)
+ CALL check("h5sclose_f", error, total_error)
+
+END SUBROUTINE test_h5s_encode
+
+!-------------------------------------------------------------------------
+! Function: test_scaleoffset
+!
+! Purpose: Tests the integer datatype for scaleoffset filter
+! with fill value set
+!
+! Return: Success: 0
+! Failure: >0
+!
+! Programmer: M. Scot Breitenfeld
+! Decemeber 11, 2010
+!
+! Modifications:
+!
+!-------------------------------------------------------------------------
+!
+
+SUBROUTINE test_scaleoffset(cleanup, total_error )
+
+ USE HDF5
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+ INTEGER(hid_t) :: file
+
+ INTEGER(hid_t) :: dataset, datatype, space, mspace, dc
+ INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2, 5/)
+ INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2, 5/)
+ INTEGER, DIMENSION(1:2,1:5) :: orig_data
+ INTEGER, DIMENSION(1:2,1:5) :: new_data
+ INTEGER(hsize_t), DIMENSION(1:2) :: start ! Start of hyperslab
+ INTEGER(hsize_t), DIMENSION(1:2) :: stride ! Stride of hyperslab
+ INTEGER(hsize_t), DIMENSION(1:2) :: count ! BLOCK count
+ INTEGER(hsize_t), DIMENSION(1:2) :: BLOCK ! BLOCK sizes
+ INTEGER :: fillval
+ INTEGER(size_t) :: j
+ REAL :: x
+ INTEGER :: error
+ LOGICAL :: status
+
+ ! check to see if filter is available
+ CALL H5Zfilter_avail_f(H5Z_FILTER_SCALEOFFSET_F, status, error)
+ IF(.NOT.status)THEN ! We don't have H5Z_FILTER_SCALEOFFSET_F filter
+ total_error = -1 ! so return
+ RETURN
+ ENDIF
+
+ CALL H5Fcreate_f("h5scaleoffset.h5", H5F_ACC_TRUNC_F, file, error)
+ CALL check("H5Fcreate_f", error, total_error)
+
+ CALL H5Tcopy_f(H5T_NATIVE_INTEGER, datatype, error)
+ CALL CHECK(" H5Tcopy_f", error, total_error)
+
+ ! Set order of dataset datatype
+ CALL H5Tset_order_f(datatype, H5T_ORDER_BE_F, error)
+ CALL CHECK(" H5Tset_order_f", error, total_error)
+
+ ! Create the data space for the dataset
+ CALL H5Screate_simple_f(2, dims, space, error)
+ CALL CHECK(" H5Screate_simple_f", error, total_error)
+
+ ! Create the dataset property list
+ CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error)
+ CALL CHECK(" H5Pcreate_f", error, total_error)
+
+ ! Set fill value
+ fillval = 10000
+ CALL H5Pset_fill_value_f(dc, H5T_NATIVE_INTEGER, fillval, error)
+ CALL CHECK(" H5Pset_fill_value_f", error, total_error)
+
+ ! Set up to use scaleoffset filter, let library calculate minbits
+ CALL H5Pset_chunk_f(dc, 2, chunk_dim, error)
+ CALL CHECK(" H5Pset_chunk_f", error, total_error)
+
+ CALL H5Pset_scaleoffset_f(dc, H5Z_SO_INT_F, H5Z_SO_INT_MINBITS_DEFAULT_F, error)
+ CALL CHECK(" H5Pset_scaleoffset_f", error, total_error)
+
+ ! Create the dataset
+ CALL H5Dcreate_f(file, "scaleoffset_int", datatype, &
+ space, dataset, error, dc)
+ CALL CHECK(" H5Dcreate_f", error, total_error)
+
+ ! Create the memory data space
+ CALL H5Screate_simple_f(2, dims, mspace, error)
+ CALL CHECK(" H5Screate_simple_f", error, total_error)
+
+ ! Select hyperslab for data to write, using 1x5 blocks,
+ ! (1,1) stride and (1,1) count starting at the position (0,0)
+
+ start(1:2) = (/0,0/)
+ stride(1:2) = (/1,1/)
+ COUNT(1:2) = (/1,1/)
+ BLOCK(1:2) = (/1,5/)
+
+ CALL H5Sselect_hyperslab_f(mspace, H5S_SELECT_SET_F, start, &
+ count, error, stride, BLOCK)
+ CALL CHECK(" H5Sselect_hyperslab_f", error, total_error)
+
+ CALL RANDOM_SEED()
+ ! Initialize data of hyperslab
+ DO j = 1, INT(dims(2))
+ CALL RANDOM_NUMBER(x)
+ orig_data(1,j) = INT(x*10000.)
+ IF(MOD(j,2_size_t).EQ.0)THEN
+ orig_data(1,j) = - orig_data(1,j)
+ ENDIF
+ ENDDO
+
+ !----------------------------------------------------------------------
+ ! STEP 1: Test scaleoffset by setting up a chunked dataset and writing
+ ! to it.
+ !----------------------------------------------------------------------
+
+ ! Only data in the hyperslab will be written, other value should be fill value
+ CALL H5Dwrite_f(dataset, H5T_NATIVE_INTEGER, orig_data, dims, error, mspace, mspace, H5P_DEFAULT_F)
+ CALL CHECK(" H5Dwrite_f", error, total_error)
+
+ !----------------------------------------------------------------------
+ ! STEP 2: Try to read the data we just wrote.
+ !----------------------------------------------------------------------
+
+ ! Read the dataset back
+
+ CALL H5Dread_f(dataset, H5T_NATIVE_INTEGER, new_data, dims, error, mspace, mspace, H5P_DEFAULT_F)
+ CALL CHECK(" H5Dread_f", error, total_error)
+
+ ! Check that the values read are the same as the values written
+ DO j = 1, INT(dims(2))
+ IF(new_data(1,j) .NE. orig_data(1,j))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" Read different values than written.")')
+ WRITE(*,'(" At index ", 2(1X,I0))') 1, j
+ EXIT
+ ENDIF
+ ENDDO
+ !----------------------------------------------------------------------
+ ! Cleanup
+ !----------------------------------------------------------------------
+ CALL H5Tclose_f(datatype, error)
+ CALL CHECK(" H5Tclose_f", error, total_error)
+ CALL H5Pclose_f(dc, error)
+ CALL CHECK(" H5Pclose_f", error, total_error)
+ CALL H5Sclose_f(space, error)
+ CALL CHECK(" H5Sclose_f", error, total_error)
+ CALL H5Dclose_f(dataset, error)
+ CALL CHECK(" H5Dclose_f", error, total_error)
+ CALL H5Fclose_f(file, error)
+ CALL CHECK(" H5Fclose_f", error, total_error)
+
+END SUBROUTINE test_scaleoffset
+
+END MODULE TH5MISC_1_8
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90
index ea91631..8672e3c 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.f90
@@ -26,13 +26,17 @@
! test_h5o, test_h5o_link, test_h5o_plist
!
!*****
+MODULE TH5O
+
+CONTAINS
SUBROUTINE test_h5o(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER :: error
CALL test_h5o_plist(total_error) ! Test object creation properties
@@ -54,9 +58,10 @@ END SUBROUTINE test_h5o
SUBROUTINE test_h5o_link(total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T) :: file_id
INTEGER(HID_T) :: group_id
@@ -66,7 +71,6 @@ SUBROUTINE test_h5o_link(total_error)
INTEGER(HID_T) :: fapl_id
INTEGER(HID_T) :: lcpl_id
INTEGER(HID_T) :: ocpypl_id
- INTEGER(HID_T) :: mem_space_id, file_space_id, xfer_prp
CHARACTER(LEN=11), PARAMETER :: TEST_FILENAME = 'TestFile.h5'
INTEGER, PARAMETER :: TEST6_DIM1 = 2, TEST6_DIM2 = 5
!EP INTEGER(HSIZE_T), DIMENSION(1:2), PARAMETER :: dims = (/TEST6_DIM1,TEST6_DIM2/)
@@ -74,11 +78,11 @@ SUBROUTINE test_h5o_link(total_error)
!EP INTEGER, DIMENSION(1:TEST6_DIM1,1:TEST6_DIM2) :: wdata, rdata
INTEGER, DIMENSION(TEST6_DIM1,TEST6_DIM2) :: wdata, rdata
- INTEGER, PARAMETER :: TRUE = 1, FALSE = 0
+ INTEGER, PARAMETER :: TRUE = 1
LOGICAL :: committed ! /* Whether the named datatype is committed
- INTEGER :: i, n, j
+ INTEGER :: i, j
INTEGER :: error ! /* Value returned from API calls
CHARACTER(LEN=14) :: NAME_DATATYPE_SIMPLE="H5T_NATIVE_INT"
@@ -91,8 +95,7 @@ SUBROUTINE test_h5o_link(total_error)
INTEGER , PARAMETER :: dim0 = 4
INTEGER(HSIZE_T), DIMENSION(1:1) :: dims2 = (/dim0/) ! size read/write buffer
- INTEGER , DIMENSION(1:dim0) :: wdata2, & ! Write buffer
- rdata2 ! Read buffer
+ INTEGER , DIMENSION(1:dim0) :: wdata2 ! Write buffer
LOGICAL :: link_exists
CHARACTER(LEN=8) :: chr_exact
CHARACTER(LEN=10) :: chr_lg
@@ -576,9 +579,10 @@ END SUBROUTINE test_h5o_link
SUBROUTINE test_h5o_plist(total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(hid_t) :: fid ! HDF5 File ID
INTEGER(hid_t) :: grp, dset, dtype, dspace ! Object identifiers
@@ -789,3 +793,5 @@ SUBROUTINE test_h5o_plist(total_error)
CALL check("H5Pclose_f", error, total_error)
END SUBROUTINE test_h5o_plist
+
+END MODULE TH5O
diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.f90
index f060a7d..598e83e 100644
--- a/fortran/test/tH5O_F03.f90
+++ b/fortran/test/tH5O_F03.f90
@@ -112,6 +112,10 @@ CONTAINS
END MODULE visit_cb
+
+MODULE TH5O_F03
+
+CONTAINS
!/****************************************************************
!**
!** test_h5o_refcount(): Test H5O refcounting functions.
@@ -121,6 +125,7 @@ END MODULE visit_cb
SUBROUTINE test_h5o_refcount(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -259,6 +264,7 @@ END SUBROUTINE test_h5o_refcount
SUBROUTINE obj_visit(total_error)
USE HDF5
+ USE TH5_MISC
USE visit_cb
USE ISO_C_BINDING
@@ -268,7 +274,6 @@ SUBROUTINE obj_visit(total_error)
TYPE(ovisit_ud_t), TARGET :: udata ! User-data for visiting
INTEGER(hid_t) :: fid = -1
- INTEGER(hid_t) :: gid = -1 ! Group ID
TYPE(C_PTR) :: f_ptr
TYPE(C_FUNPTR) :: fun_ptr
CHARACTER(LEN=180) :: object_name
@@ -344,6 +349,7 @@ END SUBROUTINE obj_visit
SUBROUTINE obj_info(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -356,7 +362,6 @@ SUBROUTINE obj_info(total_error)
TYPE(hobj_ref_t_f), TARGET :: wref ! Reference to write
TYPE(hobj_ref_t_f), TARGET :: rref ! Reference to read
TYPE(H5O_info_t) :: oinfo ! Object info struct
- INTEGER :: count = 0 ! Count within iterated group
INTEGER :: error
TYPE(C_PTR) :: f_ptr
@@ -477,6 +482,7 @@ END SUBROUTINE obj_info
SUBROUTINE build_visit_file(fid)
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
INTEGER(hid_t) :: fid ! File ID
@@ -545,3 +551,5 @@ SUBROUTINE build_visit_file(fid)
CALL H5Tclose_f(tid, error)
END SUBROUTINE build_visit_file
+
+END MODULE TH5O_F03
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90
index 4c78334..c94d564 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.f90
@@ -26,6 +26,9 @@
! external_test, multi_file_test
!
!*****
+MODULE TH5P
+
+CONTAINS
SUBROUTINE external_test(cleanup, total_error)
@@ -34,10 +37,11 @@ SUBROUTINE external_test(cleanup, total_error)
! h5pget_external_f
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=8), PARAMETER :: filename = "external"
CHARACTER(LEN=80) :: fix_filename
@@ -150,10 +154,11 @@ END SUBROUTINE external_test
SUBROUTINE multi_file_test(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name
CHARACTER(LEN=80) :: fix_filename
@@ -419,15 +424,15 @@ END SUBROUTINE multi_file_test
SUBROUTINE test_chunk_cache(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=14), PARAMETER :: filename="chunk_cache"
CHARACTER(LEN=80) :: fix_filename
INTEGER(hid_t) :: fid = -1 ! File ID
- INTEGER(hid_t) :: file
INTEGER(hid_t) :: fapl_local = -1 ! Local fapl
INTEGER(hid_t) :: fapl_def = -1 ! Default fapl
INTEGER(hid_t) :: dcpl = -1 ! Dataset creation property list ID
@@ -445,6 +450,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
INTEGER(size_t) rdcc_nelmts
INTEGER(size_t) rdcc_nbytes
REAL :: rdcc_w0
+ LOGICAL :: differ
CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
@@ -468,7 +474,8 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_1), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_1), INT(nbytes_4), total_error)
- IF(w0_1.NE.w0_4)THEN
+
+ IF( .NOT.dreal_eq( REAL(w0_1,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
@@ -526,7 +533,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error)
- IF(w0_2.NE.w0_4)THEN
+ IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
CALL H5Pclose_f(dapl2,error)
@@ -558,7 +565,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error)
- IF(w0_3.NE.w0_4)THEN
+ IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f4", .TRUE., .FALSE., total_error)
ENDIF
CALL H5Pclose_f(dapl2,error)
@@ -578,7 +585,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error)
- IF(w0_2.NE.w0_4)THEN
+ IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
CALL H5Pclose_f(dapl2,error)
@@ -598,7 +605,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error)
- IF(w0_2.NE.w0_4)THEN
+ IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
! Don't close dapl2, we will use it in the next section
@@ -635,7 +642,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error)
- IF(w0_2.NE.w0_4)THEN
+ IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
@@ -660,7 +667,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("H5Pget_chunk_cache_f", error, total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error)
CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error)
- IF(w0_3.NE.w0_4)THEN
+ IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
@@ -687,3 +694,5 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE test_chunk_cache
+
+END MODULE TH5P
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90
index 85bceb7..6039a52 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.f90
@@ -34,7 +34,6 @@
! *****************************************
! *** H 5 P T E S T S
! *****************************************
-
MODULE test_genprop_cls_cb1_mod
! Callback subroutine for test_genprop_class_callback
@@ -70,6 +69,10 @@ CONTAINS
END MODULE test_genprop_cls_cb1_mod
+MODULE TH5P_F03
+
+CONTAINS
+
!/*-------------------------------------------------------------------------
! * Function: test_create
! *
@@ -90,6 +93,7 @@ END MODULE test_genprop_cls_cb1_mod
SUBROUTINE test_create(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -97,8 +101,7 @@ SUBROUTINE test_create(total_error)
INTEGER(HID_T) :: fapl
INTEGER(hid_t) :: file=-1, space=-1, dcpl=-1, comp_type_id=-1
- INTEGER(hid_t) :: dset1=-1, dset2=-1, dset3=-1, dset4=-1, dset5=-1, &
- dset6=-1, dset7=-1, dset8=-1, dset9=-1
+ INTEGER(hid_t) :: dset9=-1
INTEGER(hsize_t), DIMENSION(1:5), PARAMETER :: cur_size = (/2, 8, 8, 4, 2/)
INTEGER(hsize_t), DIMENSION(1:5), PARAMETER :: ch_size= (/1, 1, 1, 4, 1/)
CHARACTER(LEN=14) :: filename ='test_create.h5'
@@ -112,15 +115,10 @@ SUBROUTINE test_create(total_error)
END TYPE comp_datatype
TYPE(comp_datatype), TARGET :: rd_c, fill_ctype
-
- INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype
- INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype
- INTEGER(SIZE_T) :: type_sized ! Size of the double datatype
- INTEGER(SIZE_T) :: type_sizec ! Size of the double datatype
- INTEGER(SIZE_T) :: sizeof_compound ! total size of compound
INTEGER :: error
INTEGER(SIZE_T) :: h5off
TYPE(C_PTR) :: f_ptr
+ LOGICAL :: differ1, differ2
!/*
! * Create a file.
@@ -166,7 +164,7 @@ SUBROUTINE test_create(total_error)
CALL H5Pget_fill_value_f(dcpl, comp_type_id, f_ptr, error)
CALL check("H5Pget_fill_value_f",error, total_error)
- fill_ctype%y = 4444.
+ fill_ctype%y = 4444.D0
fill_ctype%z = 'S'
fill_ctype%a = 5555.
fill_ctype%x = 55
@@ -207,10 +205,10 @@ SUBROUTINE test_create(total_error)
CALL H5Pget_fill_value_f(dcpl, comp_type_id, f_ptr, error)
CALL check("H5Pget_fill_value_f", error, total_error)
- IF( rd_c%a .NE. fill_ctype%a .OR. &
- rd_c%y .NE. fill_ctype%y .OR. &
- rd_c%x .NE. fill_ctype%x .OR. &
- rd_c%z .NE. fill_ctype%z )THEN
+ IF( .NOT.dreal_eq( REAL(rd_c%a,dp), REAL(fill_ctype%a, dp)) .OR. &
+ .NOT.dreal_eq( REAL(rd_c%y,dp), REAL(fill_ctype%y, dp)) .OR. &
+ rd_c%x .NE. fill_ctype%x .OR. &
+ rd_c%z .NE. fill_ctype%z )THEN
PRINT*,"***ERROR: Returned wrong fill value"
total_error = total_error + 1
@@ -242,6 +240,7 @@ SUBROUTINE test_genprop_class_callback(total_error)
!
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
USE test_genprop_cls_cb1_mod
IMPLICIT NONE
@@ -261,8 +260,8 @@ SUBROUTINE test_genprop_class_callback(total_error)
TYPE(cb_struct), TARGET :: crt_cb_struct, cls_cb_struct
CHARACTER(LEN=7) :: CLASS1_NAME = "Class 1"
- TYPE(C_FUNPTR) :: f1, f3, f5
- TYPE(C_PTR) :: f2, f4, f6
+ TYPE(C_FUNPTR) :: f1, f5
+ TYPE(C_PTR) :: f2, f6
CHARACTER(LEN=10) :: PROP1_NAME = "Property 1"
INTEGER(SIZE_T) :: PROP1_SIZE = 10
@@ -379,7 +378,8 @@ END SUBROUTINE test_genprop_class_callback
SUBROUTINE test_h5p_file_image(total_error)
USE HDF5
- USE ISO_C_BINDING
+ USE TH5_MISC
+ USE, INTRINSIC :: iso_c_binding
IMPLICIT NONE
INTEGER, INTENT(INOUT) :: total_error
INTEGER(hid_t) :: fapl_1 = -1
@@ -404,7 +404,7 @@ SUBROUTINE test_h5p_file_image(total_error)
CALL check("h5pcreate_f", error, total_error)
! Test with NULL ptr
- f_ptr2 = C_NULL_PTR
+ f_ptr2(1) = C_NULL_PTR
temp_size = 1
CALL h5pget_file_image_f(fapl_1, f_ptr2, temp_size, error)
CALL check("h5pget_file_image_f", error, total_error)
@@ -426,7 +426,7 @@ SUBROUTINE test_h5p_file_image(total_error)
CALL check("h5pget_file_image_f", error, total_error)
! Check that sizes are the same, and that the buffers are identical but separate
- CALL VERIFY("h5pget_file_image_f", temp_size, size, total_error)
+ CALL VERIFY("h5pget_file_image_f", INT(temp_size), INT(size), total_error)
! Verify the image data is correct
DO i = 1, count
@@ -451,10 +451,11 @@ END SUBROUTINE test_h5p_file_image
SUBROUTINE external_test_offset(cleanup,total_error)
USE ISO_C_BINDING
+ USE TH5_MISC
USE HDF5 ! This module contains all necessary modules
IMPLICIT NONE
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
LOGICAL, INTENT(IN) :: cleanup
INTEGER(hid_t) :: fapl=-1 ! file access property list
@@ -547,7 +548,7 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL h5sclose_f(hs_space, error)
CALL check("h5sclose_f", error, total_error)
- DO i = hs_start(1)+1, hs_start(1)+hs_count(1)
+ DO i = INT(hs_start(1))+1, INT(hs_start(1)+hs_count(1))
IF(whole(i) .NE. i-1)THEN
WRITE(*,*) "Incorrect value(s) read."
total_error = total_error + 1
@@ -575,3 +576,4 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE external_test_offset
+END MODULE TH5P_F03
diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90
index ac105fc..bd6264f 100644
--- a/fortran/test/tH5R.f90
+++ b/fortran/test/tH5R.f90
@@ -31,11 +31,16 @@
!
!*****
!
+MODULE TH5R
+
+CONTAINS
+
SUBROUTINE refobjtest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=9), PARAMETER :: filename = "reference"
CHARACTER(LEN=80) :: fix_filename
@@ -66,7 +71,6 @@ SUBROUTINE refobjtest(cleanup, total_error)
CHARACTER(LEN=7) :: buf ! buffer to hold the region name
CHARACTER(LEN=16) :: buf_big ! buffer bigger then needed
- CHARACTER(LEN=4) :: buf_small ! buffer smaller then needed
INTEGER(SIZE_T) :: buf_size ! returned size of the region buffer name
!
@@ -241,11 +245,12 @@ END SUBROUTINE refobjtest
!
SUBROUTINE refregtest(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
! use iso_c_binding ! NOTE: if this is uncommented, then need to move subroutine into another file.
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=6), PARAMETER :: filename = "Refreg"
CHARACTER(LEN=80) :: fix_filename
@@ -478,3 +483,4 @@ SUBROUTINE refregtest(cleanup, total_error)
END SUBROUTINE refregtest
+END MODULE TH5R
diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.f90
index e3a44ad..eaaf29a 100644
--- a/fortran/test/tH5S.f90
+++ b/fortran/test/tH5S.f90
@@ -33,14 +33,18 @@
! dataspace_basic_test
!
!*****
+MODULE TH5S
+
+CONTAINS
SUBROUTINE dataspace_basic_test(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=10), PARAMETER :: filename1 = "basicspace" ! File1 name
CHARACTER(LEN=9), PARAMETER :: filename2 = "copyspace" ! File2 name
@@ -289,3 +293,4 @@
RETURN
END SUBROUTINE dataspace_basic_test
+END MODULE TH5S
diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90
index 1cbabe8..ba68d62 100644
--- a/fortran/test/tH5Sselect.f90
+++ b/fortran/test/tH5Sselect.f90
@@ -36,14 +36,18 @@
!
!
!*****
+MODULE TH5SSELECT
+
+CONTAINS
SUBROUTINE test_select_hyperslab(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
CHARACTER(LEN=7), PARAMETER :: filename = "tselect"
CHARACTER(LEN=80) :: fix_filename
@@ -319,10 +323,11 @@
SUBROUTINE test_select_element(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
!
!the dataset1 is stored in file "copy1.h5"
@@ -695,10 +700,11 @@
SUBROUTINE test_basic_select(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
!
!the dataset is stored in file "testselect.h5"
@@ -805,8 +811,6 @@
INTEGER :: error
INTEGER(HSIZE_T), DIMENSION(3) :: data_dims
- INTEGER :: i
-
!
!initialize the coord array to give the selected points' position
!
@@ -1033,10 +1037,11 @@
SUBROUTINE test_select_point(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T) :: xfer_plist
INTEGER, PARAMETER :: SPACE1_DIM1=3
@@ -1073,10 +1078,10 @@ SUBROUTINE test_select_point(cleanup, total_error)
!!$ *tbuf; /* temporary buffer pointer */
INTEGER :: i,j; !/* Counters */
! struct pnt_iter pi; /* Custom Pointer iterator struct */
- INTEGER :: error !/* Generic return value */
+ INTEGER :: error !/* Generic return value */
CHARACTER(LEN=9) :: filename = 'h5s_hyper'
CHARACTER(LEN=80) :: fix_filename
- CHARACTER(LEN=1), DIMENSION(1:SPACE2_DIM1,1:SPACE2_DIM2) :: wbuf, rbuf
+ CHARACTER(LEN=1), DIMENSION(1:SPACE2_DIM1,1:SPACE2_DIM2) :: wbuf
CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
IF (error .NE. 0) THEN
@@ -1357,12 +1362,12 @@ END SUBROUTINE test_select_point
!**
!****************************************************************/
-SUBROUTINE test_select_combine(cleanup, total_error)
+SUBROUTINE test_select_combine(total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER, PARAMETER :: SPACE7_RANK = 2
INTEGER, PARAMETER :: SPACE7_DIM1 = 10
@@ -1779,12 +1784,12 @@ END SUBROUTINE test_select_combine
!**
!****************************************************************/
-SUBROUTINE test_select_bounds(cleanup, total_error)
+SUBROUTINE test_select_bounds(total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
+ INTEGER, INTENT(INOUT) :: total_error
INTEGER, PARAMETER :: SPACE11_RANK=2
INTEGER, PARAMETER :: SPACE11_DIM1=100
@@ -1860,8 +1865,8 @@ SUBROUTINE test_select_bounds(cleanup, total_error)
CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error)
CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error)
- CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1-4, total_error)
- CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2-4, total_error)
+ CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-4), total_error)
+ CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-4), total_error)
! /* Set bad offset for selection */
@@ -1884,8 +1889,8 @@ SUBROUTINE test_select_bounds(cleanup, total_error)
CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 5, total_error)
CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error)
- CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1-2, total_error)
- CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2-6, total_error)
+ CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-2), total_error)
+ CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-6), total_error)
! /* Reset offset for selection */
offset(1:2) = 0
@@ -1991,3 +1996,5 @@ SUBROUTINE test_select_bounds(cleanup, total_error)
CALL check("h5sclose_f", error, total_error)
END SUBROUTINE test_select_bounds
+
+END MODULE TH5SSELECT
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90
index b42a8e6..8ac91d2 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.f90
@@ -27,6 +27,10 @@
!
!*****
+MODULE TH5T
+
+CONTAINS
+
SUBROUTINE compoundtest(cleanup, total_error)
!
! This program creates a dataset that is one dimensional array of
@@ -43,8 +47,8 @@
! h5tget_class_f, h5tget_member_name_f, h5tget_member_offset_f, h5tget_member_type_f,
! h5tequal_f, h5tinsert_array_f, h5tcommit_f, h5tencode_f, h5tdecode_f
-
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -105,11 +109,10 @@
CHARACTER(LEN=1024) :: cmpd_buf
INTEGER(SIZE_T) :: cmpd_buf_size=0
- INTEGER(HID_T) :: decoded_sid1
INTEGER(HID_T) :: decoded_tid1
INTEGER(HID_T) :: fixed_str1, fixed_str2
- LOGICAL :: are_equal
+ LOGICAL :: are_equal, differ
INTEGER(SIZE_T), PARAMETER :: str_size = 10
INTEGER(SIZE_T) :: query_size
@@ -242,36 +245,6 @@
offset = offset + type_sized ! Offset of the last member is 14
CALL h5tinsert_f(dtype_id, "real_field", offset, H5T_NATIVE_REAL, error)
CALL check("h5tinsert_f", error, total_error)
-
-!!$ !/*-----------------------------------------------------------------------
-!!$ ! * Test encoding and decoding compound datatypes
-!!$ ! *-----------------------------------------------------------------------
-!!$ !*/
-!!$ ! /* Encode compound type in a buffer */
-!!$
-!!$ ! First find the buffer size
-!!$
-!!$ CALL H5Tencode_f(dtype_id, cmpd_buf, cmpd_buf_size, error)
-!!$ CALL check("H5Tencode_f", error, total_error)
-!!$
-!!$ ! /* Try decoding bogus buffer */
-!!$
-!!$ CALL H5Tdecode_f(cmpd_buf, decoded_tid1, error)
-!!$ CALL VERIFY("H5Tdecode_f", error, -1, total_error)
-!!$
-!!$ CALL H5Tencode_f(dtype_id, cmpd_buf, cmpd_buf_size, error)
-!!$ CALL check("H5Tencode_f", error, total_error)
-!!$
-!!$ ! /* Decode from the compound buffer and return an object handle */
-!!$ CALL H5Tdecode_f(cmpd_buf, decoded_tid1, error)
-!!$ CALL check("H5Tdecode_f", error, total_error)
-!!$
-!!$ ! /* Verify that the datatype was copied exactly */
-!!$
-!!$ CALL H5Tequal_f(decoded_tid1, dtype_id, flag, error)
-!!$ CALL check("H5Tequal_f", error, total_error)
-!!$ CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error)
-
!
! Create the dataset with compound datatype.
!
@@ -555,7 +528,7 @@
CALL h5dread_f(dset_id, dt3_id, double_member_out, data_dims, error)
CALL check("h5dread_f", error, total_error)
do i = 1, dimsize
- if (double_member_out(i) .ne. double_member(i)) then
+ IF( .NOT.dreal_eq( REAL(double_member_out(i),dp), REAL( double_member(i), dp)) ) THEN
write(*,*) " Wrong double precision data is read back "
total_error = total_error + 1
endif
@@ -572,12 +545,12 @@
!
CALL h5dread_f(dset_id, dt4_id, real_member_out, data_dims, error)
CALL check("h5dread_f", error, total_error)
- do i = 1, dimsize
- if (real_member_out(i) .ne. real_member(i)) then
- write(*,*) " Wrong real precision data is read back "
- total_error = total_error + 1
- endif
- enddo
+ DO i = 1, dimsize
+ IF( .NOT.dreal_eq( REAL(real_member_out(i),dp), REAL( real_member(i), dp)) ) THEN
+ WRITE(*,*) " Wrong real precision data is read back "
+ total_error = total_error + 1
+ ENDIF
+ ENDDO
!
! *-----------------------------------------------------------------------
! * Test encoding and decoding compound datatypes
@@ -632,7 +605,7 @@
- SUBROUTINE basic_data_type_test(cleanup, total_error)
+ SUBROUTINE basic_data_type_test(total_error)
! This subroutine tests following functionalities:
! H5tget_precision_f, H5tset_precision_f, H5tget_offset_f
@@ -642,9 +615,9 @@
! H5tset_cset_f, H5tget_strpad_f, H5tset_strpad_f
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
INTEGER(HID_T) :: dtype1_id, dtype2_id, dtype3_id, dtype4_id, dtype5_id
@@ -859,6 +832,7 @@
SUBROUTINE enumtest(cleanup, total_error)
USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -999,6 +973,7 @@
SUBROUTINE test_derived_flt(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -1181,3 +1156,5 @@ SUBROUTINE test_derived_flt(cleanup, total_error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE test_derived_flt
+
+END MODULE TH5T
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index a9a6487..fc3ebd0 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -41,15 +41,23 @@
!**
!****************************************************************/
!
+
+MODULE TH5T_F03
+
+ USE HDF5
+ USE ISO_C_BINDING
+
+CONTAINS
+
SUBROUTINE test_array_compound_atomic(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER, INTENT(INOUT) :: total_error
! 1-D dataset WITH fixed dimensions
- CHARACTER(LEN=6), PARAMETER :: SPACE1_NAME = "Space1"
INTEGER, PARAMETER :: SPACE1_RANK = 1
INTEGER, PARAMETER :: SPACE1_DIM1 = 4
! 1-D array datatype
@@ -63,11 +71,11 @@ SUBROUTINE test_array_compound_atomic(total_error)
END TYPE s1_t
TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write
TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in
- INTEGER(hid_t) :: fid1 ! HDF5 File IDs
- INTEGER(hid_t) :: dataset ! Dataset ID
- INTEGER(hid_t) :: sid1 ! Dataspace ID
- INTEGER(hid_t) :: tid1 ! Array Datatype ID
- INTEGER(hid_t) :: tid2 ! Compound Datatype ID
+ INTEGER(hid_t) :: fid1 ! HDF5 File IDs
+ INTEGER(hid_t) :: dataset ! Dataset ID
+ INTEGER(hid_t) :: sid1 ! Dataspace ID
+ INTEGER(hid_t) :: tid1 ! Array Datatype ID
+ INTEGER(hid_t) :: tid2 ! Compound Datatype ID
INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/)
INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/)
@@ -79,12 +87,8 @@ SUBROUTINE test_array_compound_atomic(total_error)
INTEGER(size_t) :: off ! Offset of compound field
INTEGER(hid_t) :: mtid ! Datatype ID for field
INTEGER :: i,j ! counting variables
- INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype
- INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype
- INTEGER(SIZE_T) :: sizeof_compound ! total size of compound
INTEGER :: error ! Generic RETURN value
- INTEGER(SIZE_T) :: offset ! Member's offset
INTEGER :: namelen
LOGICAL :: flag
@@ -254,7 +258,7 @@ SUBROUTINE test_array_compound_atomic(total_error)
PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF(wdata(i,j)%f.NE.rdata(i,j)%f)THEN
+ IF( .NOT.dreal_eq( REAL(wdata(i,j)%f,dp), REAL( rdata(i,j)%f, dp)) ) THEN
PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
@@ -285,6 +289,7 @@ END SUBROUTINE test_array_compound_atomic
SUBROUTINE test_array_compound_array(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -310,14 +315,13 @@ END SUBROUTINE test_array_compound_atomic
TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata
- INTEGER(hid_t) :: fid1 ! HDF5 File IDs
- INTEGER(hid_t) :: dataset ! Dataset ID
+ INTEGER(hid_t) :: fid1 ! HDF5 File IDs
+ INTEGER(hid_t) :: dataset ! Dataset ID
integer(hid_t) :: sid1 ! Dataspace ID
integer(hid_t) :: tid1 ! Array Datatype ID
integer(hid_t) :: tid2 ! Compound Datatype ID
integer(hid_t) :: tid3 ! Nested Array Datatype ID
integer(hid_t) :: tid4 ! Nested Array Datatype ID
- INTEGER(HID_T) :: dt5_id ! Memory datatype identifier
INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/)
INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/)
@@ -326,25 +330,18 @@ END SUBROUTINE test_array_compound_atomic
INTEGER ndims ! Array rank for reading
INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading
- INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading
INTEGER :: nmemb ! Number of compound members
CHARACTER(LEN=20) :: mname ! Name of compound field
INTEGER(size_t) :: off ! Offset of compound field
- INTEGER(size_t) :: offset ! Offset of compound field
INTEGER(hid_t) :: mtid ! Datatype ID for field
INTEGER(hid_t) :: mtid2 ! Datatype ID for field
- INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype
- INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype
- INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype
- INTEGER(SIZE_T) :: sizeof_compound ! total size of compound
INTEGER :: mclass ! Datatype class for field
INTEGER :: i,j,k ! counting variables
INTEGER :: error
CHARACTER(LEN=2) :: ichr2
- INTEGER(SIZE_T) :: sizechar
INTEGER :: namelen
LOGICAL :: flag
INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier
@@ -623,6 +620,7 @@ END SUBROUTINE test_array_compound_atomic
total_error = total_error + 1
ENDIF
DO k = 1, ARRAY2_DIM1
+
IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN
PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f '
total_error = total_error + 1
@@ -659,6 +657,7 @@ END SUBROUTINE test_array_compound_atomic
SUBROUTINE test_array_bkg(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -722,8 +721,6 @@ END SUBROUTINE test_array_compound_atomic
INTEGER :: error
TYPE(c_ptr) :: f_ptr
- TYPE(c_funptr) :: func
-
! Initialize the data
! -------------------
@@ -834,11 +831,11 @@ END SUBROUTINE test_array_compound_atomic
PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF( cf(i)%b(j) .NE. cfr(i)%b(j) )THEN
+ IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL( cfr(i)%b(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF( cf(i)%c(j) .NE. cfr(i)%c(j) )THEN
+ IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL( cfr(i)%c(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
@@ -901,7 +898,7 @@ END SUBROUTINE test_array_compound_atomic
DO i = 1, LENGTH
DO j = 1, ALEN
- IF( fld(i)%b(j) .NE. fldr(i)%b(j) )THEN
+ IF( .NOT.dreal_eq( REAL(fld(i)%b(j),dp), REAL( fldr(i)%b(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
@@ -932,11 +929,11 @@ END SUBROUTINE test_array_compound_atomic
PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF( cf(i)%b(j) .NE. cfr(i)%b(j) )THEN
+ IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF( cf(i)%c(j) .NE. cfr(i)%c(j) )THEN
+ IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
@@ -990,11 +987,11 @@ END SUBROUTINE test_array_compound_atomic
PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF( cf(i)%b(j) .NE. cfr(i)%b(j) )THEN
+ IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
- IF( cf(i)%c(j) .NE. cfr(i)%c(j) )THEN
+ IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN
PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f '
total_error = total_error + 1
ENDIF
@@ -1018,6 +1015,7 @@ END SUBROUTINE test_array_compound_atomic
USE ISO_C_BINDING
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
@@ -1050,12 +1048,10 @@ END SUBROUTINE test_array_compound_atomic
INTEGER(HID_T) :: dset_idr8 ! Dataset identifier
INTEGER :: error ! Error flag
- INTEGER :: i, j
+ INTEGER :: i
! Data buffers:
- INTEGER, DIMENSION(1:4) :: dset_data
-
INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1
INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4
INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8
@@ -1069,7 +1065,6 @@ END SUBROUTINE test_array_compound_atomic
INTEGER(HID_T) :: dspace_id ! Dataspace identifier
TYPE(C_PTR) :: f_ptr
- INTEGER(hid_t) :: datatype ! Common datatype ID
!
! Initialize the dset_data array.
@@ -1179,7 +1174,7 @@ END SUBROUTINE test_array_compound_atomic
CALL verify_Fortran_INTEGER_4("h5kind_to_type2",INT(dset_data_i4(i),int_kind_8),INT(data_out_i4(i),int_kind_8),total_error)
CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error)
CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error)
-
+
CALL verify_real_kind_7("h5kind_to_type5",REAL(dset_data_r(i),real_kind_7),REAL(data_out_r(i),real_kind_7),total_error)
CALL verify_real_kind_7("h5kind_to_type6",REAL(dset_data_r7(i),real_kind_7),REAL(data_out_r7(i),real_kind_7),total_error)
CALL verify_real_kind_7("h5kind_to_type7",REAL(dset_data_r15(i),real_kind_7),REAL(data_out_r15(i),real_kind_7),total_error)
@@ -1220,8 +1215,9 @@ END SUBROUTINE test_h5kind_to_type
!************************************************************
SUBROUTINE t_array(total_error)
- USE HDF5
USE ISO_C_BINDING
+ USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
@@ -1233,10 +1229,8 @@ SUBROUTINE t_array(total_error)
INTEGER , PARAMETER :: adim0 = 3
INTEGER , PARAMETER :: adim1 = 5
INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles
- INTEGER :: hdferr
INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/)
INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/)
- INTEGER(HSIZE_T), DIMENSION(1:3) :: bdims = (/dim0, adim0, adim1/)
INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims
INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer
INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer
@@ -1337,9 +1331,9 @@ SUBROUTINE t_array(total_error)
!
! Output the data to the screen.
!
- i_loop: DO i = 1, dims(1)
- DO j=1, adim0
- DO k = 1, adim1
+ i_loop: DO i = 1, INT(dims(1))
+ DO j=1, INT(adim0)
+ DO k = 1, INT(adim1)
CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error)
IF(total_error.NE.0) EXIT i_loop
ENDDO
@@ -1365,6 +1359,7 @@ END SUBROUTINE t_array
SUBROUTINE t_enum(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -1497,8 +1492,8 @@ SUBROUTINE t_enum(total_error)
!
! Output the data to the screen.
!
- i_loop: DO i = 1, dims(1)
- DO j = 1, dims(2)
+ i_loop: DO i = 1, INT(dims(1))
+ DO j = 1, INT(dims(2))
!
! Get the name of the enumeration member.
!
@@ -1527,6 +1522,7 @@ END SUBROUTINE t_enum
SUBROUTINE t_bit(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -1617,8 +1613,8 @@ SUBROUTINE t_bit(total_error)
!
! Output the data to the screen.
!
- i_loop: DO i = 1, dims(1)
- DO j = 1, dims(2)
+ i_loop: DO i = 1, INT(dims(1))
+ DO j = 1, INT(dims(2))
A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A"
B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B"
C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C"
@@ -1652,6 +1648,7 @@ END SUBROUTINE t_bit
SUBROUTINE t_opaque(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -1675,7 +1672,7 @@ SUBROUTINE t_opaque(total_error)
INTEGER :: taglen
INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims
- INTEGER :: i
+ INTEGER(hsize_t) :: i
CHARACTER(LEN=1) :: ichr
TYPE(C_PTR) :: f_ptr
INTEGER :: error
@@ -1799,6 +1796,7 @@ END SUBROUTINE t_opaque
SUBROUTINE t_objref(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -1905,7 +1903,7 @@ SUBROUTINE t_objref(total_error)
!
! Output the data to the screen.
!
- DO i = 1, maxdims(1)
+ DO i = 1, INT(maxdims(1))
!
! Open the referenced object, get its name and type.
!
@@ -1951,6 +1949,7 @@ END SUBROUTINE t_objref
SUBROUTINE t_regref(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -1984,7 +1983,7 @@ SUBROUTINE t_regref(total_error)
CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2
CHARACTER(LEN=80) :: name
- INTEGER :: i
+ INTEGER(hsize_t) :: i
TYPE(C_PTR) :: f_ptr
CHARACTER(LEN=ds2dim0) :: chrvar
CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct
@@ -2150,6 +2149,7 @@ END SUBROUTINE t_regref
SUBROUTINE t_vlen(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -2159,7 +2159,7 @@ SUBROUTINE t_vlen(total_error)
CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1"
INTEGER, PARAMETER :: LEN0 = 3
INTEGER, PARAMETER :: LEN1 = 12
- INTEGER :: dim0
+ INTEGER(hsize_t) :: dim0
INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles
INTEGER :: error
@@ -2266,7 +2266,7 @@ SUBROUTINE t_vlen(total_error)
dim0 = dims(1)
CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error)
CALL check("H5Sget_simple_extent_dims_f",error, total_error)
- CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error)
+ CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error)
!
! Create the memory datatype.
@@ -2281,7 +2281,7 @@ SUBROUTINE t_vlen(total_error)
CALL H5Dread_f(dset, memtype, f_ptr, error)
CALL check("H5Dread_f",error, total_error)
- DO i = 1, dims(1)
+ DO i = 1, INT(dims(1))
CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] )
DO j = 1, rdata(i)%len
CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error)
@@ -2307,6 +2307,7 @@ END SUBROUTINE t_vlen
SUBROUTINE t_vlstring(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -2328,7 +2329,7 @@ SUBROUTINE t_vlstring(total_error)
CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/)
INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/)
- INTEGER :: i
+ INTEGER(hsize_t) :: i
!
! Create a new file using the default properties.
@@ -2427,6 +2428,7 @@ SUBROUTINE t_vlstring_readwrite(total_error)
! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -2439,7 +2441,6 @@ SUBROUTINE t_vlstring_readwrite(total_error)
INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4
INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2
- INTEGER(SIZE_T) , PARAMETER :: sdim = 7
INTEGER(HID_T) :: file, filetype, space, dset ! Handles
INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/)
INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/)
@@ -2468,7 +2469,8 @@ SUBROUTINE t_vlstring_readwrite(total_error)
CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string
CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string
TYPE(C_PTR) :: f_ptr
- INTEGER :: i, j, len
+ INTEGER(hsize_t) :: i, j
+ INTEGER :: len
INTEGER :: error
! Initialize array of C pointers
@@ -2677,6 +2679,7 @@ END SUBROUTINE t_vlstring_readwrite
SUBROUTINE t_string(total_error)
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -2697,7 +2700,7 @@ SUBROUTINE t_string(total_error)
CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: &
wdata = (/"Parting", "is such", "sweet ", "sorrow."/)
CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata
- INTEGER :: i
+ INTEGER(hsize_t) :: i
INTEGER(SIZE_T) :: size
TYPE(C_PTR) :: f_ptr
!
@@ -2800,23 +2803,23 @@ SUBROUTINE t_string(total_error)
END SUBROUTINE t_string
-SUBROUTINE vl_test_special_char(cleanup, total_error)
+SUBROUTINE vl_test_special_char(total_error)
- USE hdf5
+ USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
- INTERFACE
- SUBROUTINE setup_buffer(data_in, line_lengths, char_type)
- USE hdf5
- USE ISO_C_BINDING
- IMPLICIT NONE
- CHARACTER(len=*), DIMENSION(:) :: data_in
- INTEGER(size_t), DIMENSION(:) :: line_lengths
- CHARACTER(KIND=C_CHAR,LEN=*) :: char_type
- END SUBROUTINE setup_buffer
- END INTERFACE
+! INTERFACE
+! SUBROUTINE setup_buffer(data_in, line_lengths, char_type)
+! USE HDF5
+! USE ISO_C_BINDING
+! IMPLICIT NONE
+! CHARACTER(len=*), DIMENSION(:) :: data_in
+! INTEGER(size_t), DIMENSION(:) :: line_lengths
+! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type
+! END SUBROUTINE setup_buffer
+! END INTERFACE
- LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5"
@@ -2967,14 +2970,14 @@ END SUBROUTINE setup_buffer
!-------------------------------------------------------------------------
!
-SUBROUTINE test_nbit(cleanup, total_error )
+SUBROUTINE test_nbit(total_error )
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
- LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(INOUT) :: total_error
INTEGER(hid_t) :: file
@@ -2991,7 +2994,7 @@ SUBROUTINE test_nbit(cleanup, total_error )
INTEGER(size_t) :: PRECISION, offset
INTEGER :: error
LOGICAL :: status
- INTEGER(size_t) :: i, j
+ INTEGER(hsize_t) :: i, j
TYPE(C_PTR) :: f_ptr
! check to see if filter is available
@@ -3065,7 +3068,7 @@ SUBROUTINE test_nbit(cleanup, total_error )
i_loop: DO i = 1, dims(1)
j_loop: DO j = 1, dims(2)
IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN
- IF(new_data(i,j) .NE. orig_data(i,j))THEN
+ IF( .NOT.dreal_eq( REAL(new_data(i,j),dp), REAL( orig_data(i,j), dp)) ) THEN
total_error = total_error + 1
WRITE(*,'(" Read different values than written.")')
WRITE(*,'(" At index ", 2(1X,I0))') i, j
@@ -3114,6 +3117,7 @@ SUBROUTINE t_enum_conv(total_error)
!-------------------------------------------------------------------------
!
USE HDF5
+ USE TH5_MISC
USE ISO_C_BINDING
IMPLICIT NONE
@@ -3125,7 +3129,7 @@ SUBROUTINE t_enum_conv(total_error)
INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
- INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1, memtype ! Handles
+ INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! Handles
INTEGER(hid_t) :: file ! Handles
! Enumerated type
@@ -3161,6 +3165,7 @@ SUBROUTINE t_enum_conv(total_error)
INTEGER(hsize_t), DIMENSION(1:1) :: ds_size = (/20/)
INTEGER(size_t) :: i
+ INTEGER(hsize_t) :: ih
INTEGER :: error
TYPE(C_PTR) :: f_ptr
INTEGER(HID_T) :: m_baset ! Memory base type
@@ -3223,10 +3228,10 @@ SUBROUTINE t_enum_conv(total_error)
CALL check(" h5dread_f", error, total_error)
! Check values
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. data2(i))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. data2(ih))THEN
total_error = total_error + 1
- WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') i, data1(i),i,data2(i)
+ WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih)
EXIT
ENDIF
ENDDO
@@ -3237,10 +3242,10 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
! Check values
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. data_short(i))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. data_short(ih))THEN
total_error = total_error + 1
- WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') i, data1(i),i,data_short(i)
+ WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih)
EXIT
ENDIF
ENDDO
@@ -3253,11 +3258,11 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
! Check values
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. INT(data_double(i)))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. INT(data_double(ih)))THEN
total_error = total_error + 1
WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') &
- i, INT(data1(i)), i, INT(data_double(i))
+ ih, INT(data1(ih)), ih, INT(data_double(ih))
EXIT
ENDIF
ENDDO
@@ -3270,11 +3275,11 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
! Check values
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. INT(data_i8(i)))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. INT(data_i8(ih)))THEN
total_error = total_error + 1
WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') &
- i, INT(data1(i)), i, INT(data_i8(i))
+ ih, INT(data1(ih)), i, INT(data_i8(ih))
EXIT
ENDIF
ENDDO
@@ -3287,11 +3292,11 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
! Check values
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. INT(data_i16(i)))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. INT(data_i16(ih)))THEN
total_error = total_error + 1
WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') &
- i, INT(data1(i)), i, INT(data_i16(i))
+ ih, INT(data1(ih)), i, INT(data_i16(ih))
EXIT
ENDIF
ENDDO
@@ -3304,11 +3309,11 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
! Check values
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. INT(data_r7(i)))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. INT(data_r7(ih)))THEN
total_error = total_error + 1
WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') &
- i, INT(data1(i)), i, INT(data_r7(i))
+ ih, INT(data1(ih)), i, INT(data_r7(ih))
EXIT
ENDIF
ENDDO
@@ -3335,10 +3340,10 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. data_int(i))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. data_int(ih))THEN
total_error = total_error + 1
- WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') i, data1(i),i,data_int(i)
+ WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih)
EXIT
ENDIF
ENDDO
@@ -3363,10 +3368,10 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. INT(data_double(i)))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. INT(data_double(ih)))THEN
total_error = total_error + 1
- WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') i, data1(i),i,INT(data_double(i))
+ WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih))
EXIT
ENDIF
ENDDO
@@ -3391,10 +3396,10 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. INT(data_r7(i)))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. INT(data_r7(ih)))THEN
total_error = total_error + 1
- WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') i, data1(i),i,INT(data_r7(i))
+ WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih))
EXIT
ENDIF
ENDDO
@@ -3420,10 +3425,10 @@ SUBROUTINE t_enum_conv(total_error)
CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
CALL check("h5dread_f", error, total_error)
- DO i = 1, ds_size(1)
- IF(data1(i) .NE. data_i16(i))THEN
+ DO ih = 1, ds_size(1)
+ IF(data1(ih) .NE. data_i16(ih))THEN
total_error = total_error + 1
- WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') i, data1(i),i,data_i16(i)
+ WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih)
EXIT
ENDIF
ENDDO
@@ -3444,3 +3449,4 @@ SUBROUTINE t_enum_conv(total_error)
END SUBROUTINE t_enum_conv
+END MODULE TH5T_F03
diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.f90
index 85feb2b..f063722 100644
--- a/fortran/test/tH5VL.f90
+++ b/fortran/test/tH5VL.f90
@@ -27,8 +27,13 @@
!
!*****
+MODULE TH5VL
+
+CONTAINS
+
SUBROUTINE vl_test_integer(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -54,6 +59,7 @@
INTEGER :: error ! Error flag
INTEGER :: i, j !general purpose integers
+ INTEGER(HSIZE_T) :: ih, jh !general purpose integers
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/5,6/)
INTEGER(SIZE_T) max_len
@@ -150,14 +156,14 @@
CALL h5dread_vl_f(dset_id, vltype_id, vl_int_data_out, data_dims, len_out, &
error, mem_space_id = dspace_id, file_space_id = dspace_id)
CALL check("h5dread_int_f", error, total_error)
- do i = 1, data_dims(2)
- do j = 1, len_out(i)
- if(vl_int_data(j,i) .ne. vl_int_data_out(j,i)) then
+ do ih = 1, data_dims(2)
+ do jh = 1, len_out(ih)
+ if(vl_int_data(jh,ih) .ne. vl_int_data_out(jh,ih)) then
total_error = total_error + 1
write(*,*) "h5dread_vl_f returned incorrect data"
endif
enddo
- if (len(i) .ne. len_out(i)) then
+ if (len(ih) .ne. len_out(ih)) then
total_error = total_error + 1
write(*,*) "h5dread_vl_f returned incorrect data"
endif
@@ -189,6 +195,7 @@
SUBROUTINE vl_test_real(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -214,10 +221,12 @@
INTEGER :: error ! Error flag
INTEGER :: i, j !general purpose integers
+ INTEGER(HSIZE_T) :: ih, jh !general purpose integers
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/5,6/)
INTEGER(SIZE_T) max_len
INTEGER(HID_T) :: vl_type_id
LOGICAL :: vl_flag
+ LOGICAL :: differ
!
! Initialize the vl_int_data array.
@@ -320,14 +329,14 @@
CALL h5dread_vl_f(dset_id, vltype_id, vl_real_data_out, data_dims, len_out, &
error, mem_space_id = dspace_id, file_space_id = dspace_id)
CALL check("h5dread_real_f", error, total_error)
- do i = 1, data_dims(2)
- do j = 1, len_out(i)
- if(vl_real_data(j,i) .ne. vl_real_data_out(j,i)) then
- total_error = total_error + 1
- write(*,*) "h5dread_vl_f returned incorrect data"
- endif
+ do ih = 1, data_dims(2)
+ do jh = 1, len_out(ih)
+ IF( .NOT.dreal_eq( REAL(vl_real_data(jh,ih),dp), REAL(vl_real_data_out(jh,ih), dp)) ) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5dread_vl_f returned incorrect data"
+ ENDIF
enddo
- if (len(i) .ne. len_out(i)) then
+ if (len(ih) .ne. len_out(ih)) then
total_error = total_error + 1
write(*,*) "h5dread_vl_f returned incorrect data"
endif
@@ -360,6 +369,7 @@
SUBROUTINE vl_test_string(cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
@@ -383,7 +393,7 @@
CHARACTER(LEN=10), DIMENSION(4) :: string_data_out ! Data buffers
INTEGER :: error ! Error flag
- INTEGER :: i !general purpose integers
+ INTEGER(HSIZE_T) :: ih !general purpose integers
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/10,4/)
INTEGER(HID_T) :: vl_type_id
LOGICAL :: vl_flag
@@ -474,13 +484,13 @@
CALL h5dread_vl_f(dset_id, H5T_STRING, string_data_out, data_dims, &
str_len_out, error)
CALL check("h5dread_string_f", error, total_error)
- do 100 i = 1, data_dims(2)
- if(str_len(i) .ne. str_len_out(i)) then
+ do 100 ih = 1, data_dims(2)
+ if(str_len(ih) .ne. str_len_out(ih)) then
total_error=total_error + 1
write(*,*) 'Returned string length is incorrect'
goto 100
endif
- if(string_data(1)(1:str_len(i)) .ne. string_data_out(1)(1:str_len(i))) then
+ if(string_data(1)(1:str_len(ih)) .ne. string_data_out(1)(1:str_len(ih))) then
write(*,*) ' Returned string is wrong'
total_error = total_error + 1
endif
@@ -506,4 +516,4 @@
RETURN
END SUBROUTINE vl_test_string
-
+END MODULE TH5VL
diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.f90
index cd6a343..4201960 100644
--- a/fortran/test/tH5Z.f90
+++ b/fortran/test/tH5Z.f90
@@ -26,15 +26,18 @@
! filters_test, szip_test
!
!*****
+MODULE TH5Z
- SUBROUTINE filters_test(cleanup, total_error)
+CONTAINS
+
+ SUBROUTINE filters_test(total_error)
! This subroutine tests following functionalities: h5zfilter_avail_f, h5zunregister_f
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
LOGICAL :: status
INTEGER(HID_T) :: crtpr_id, xfer_id
@@ -165,6 +168,7 @@
SUBROUTINE szip_test(szip_flag, cleanup, total_error)
USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
IMPLICIT NONE
LOGICAL, INTENT(OUT) :: szip_flag
@@ -412,3 +416,4 @@
RETURN
END SUBROUTINE szip_test
+END MODULE TH5Z
diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.f90
new file mode 100644
index 0000000..e73fed2
--- /dev/null
+++ b/fortran/test/tHDF5.f90
@@ -0,0 +1,45 @@
+!****h* ROBODoc/HDF5
+!
+! NAME
+! MODULE THDF5
+!
+! FILE
+! src/fortran/test/tHDF5.f90
+!
+! PURPOSE
+! This is the test module used for testing the Fortran90 HDF library APIs.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!*****
+
+MODULE THDF5
+ USE TH5_MISC
+ USE TH5A
+ USE TH5D
+ USE TH5E
+ USE TH5F
+ USE TH5G
+ USE TH5I
+ USE TH5P
+ USE TH5R
+ USE TH5S
+ USE TH5SSELECT
+ USE TH5T
+ USE TH5VL
+ USE TH5Z
+END MODULE THDF5
diff --git a/fortran/test/tHDF5_1_8.f90 b/fortran/test/tHDF5_1_8.f90
new file mode 100644
index 0000000..47eec16
--- /dev/null
+++ b/fortran/test/tHDF5_1_8.f90
@@ -0,0 +1,38 @@
+!****h* ROBODoc/HDF5
+!
+! NAME
+! MODULE THDF5_1_8
+!
+! FILE
+! src/fortran/test/tHDF5_1_8.f90
+!
+! PURPOSE
+! This is the test module used for testing the Fortran90 HDF library
+! 1.8.* APIs
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!*****
+
+MODULE THDF5_1_8
+ USE TH5_MISC
+ USE TH5MISC_1_8
+ USE TH5A_1_8
+ USE TH5G_1_8
+ USE TH5F
+ USE TH5O
+END MODULE THDF5_1_8
diff --git a/fortran/test/tHDF5_F03.f90 b/fortran/test/tHDF5_F03.f90
new file mode 100644
index 0000000..3dbec11
--- /dev/null
+++ b/fortran/test/tHDF5_F03.f90
@@ -0,0 +1,39 @@
+!****h* ROBODoc/HDF5
+!
+! NAME
+! MODULE THDF5_F03
+!
+! FILE
+! src/fortran/test/tHDF5_F03.f90
+!
+! PURPOSE
+! This is the test module used for testing the Fortran2003 HDF
+! library APIS.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!*****
+
+MODULE THDF5_F03
+ USE TH5_MISC
+ USE TH5E_F03
+ USE TH5F_F03
+ USE TH5L_F03
+ USE TH5O_F03
+ USE TH5P_F03
+ USE TH5T_F03
+END MODULE THDF5_F03
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 4f73fda..2964840 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -24,27 +24,44 @@
!
! CONTAINS SUBROUTINES
! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f,
-! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f
+! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv
!
!*****
+MODULE TH5_MISC
+
+ INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(15, 307)
+
+CONTAINS
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: dreal_eq
+!DEC$endif
+ LOGICAL FUNCTION dreal_eq(a,b)
+
+ ! Check if two double precision reals are equivalent
+ REAL(dp), INTENT (in):: a,b
+ REAL(dp), PARAMETER :: eps = 1.e-8
+ dreal_eq = ABS(a-b) .LT. eps
+
+ END FUNCTION dreal_eq
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verify_real_kind_7
!DEC$endif
-SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error)
- USE HDF5
-
- INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
- CHARACTER(LEN=*) :: string
- REAL(real_kind_7) :: value, correct_value
- INTEGER :: total_error
- IF (value .NE. correct_value) THEN
- total_error=total_error+1
- WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string
- ENDIF
- RETURN
-END SUBROUTINE verify_real_kind_7
+ SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error)
+ USE HDF5
+ INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
+ CHARACTER(LEN=*) :: string
+ REAL(real_kind_7) :: value, correct_value
+ INTEGER :: total_error
+ IF (.NOT.dreal_eq( REAL(value,dp), REAL(correct_value, dp)) ) THEN
+ total_error=total_error+1
+ WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string
+ ENDIF
+ RETURN
+ END SUBROUTINE verify_real_kind_7
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
@@ -52,7 +69,7 @@ END SUBROUTINE verify_real_kind_7
!DEC$endif
SUBROUTINE write_test_status( test_result, test_title, total_error)
-! Writes the results of the tests
+ ! Writes the results of the tests
IMPLICIT NONE
@@ -65,11 +82,11 @@ END SUBROUTINE verify_real_kind_7
! Controls the output style for reporting test results
- CHARACTER(LEN=8) :: error_string
- CHARACTER(LEN=8), PARAMETER :: success = ' PASSED '
- CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*'
- CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--'
-
+ CHARACTER(LEN=8) :: error_string
+ CHARACTER(LEN=8), PARAMETER :: success = ' PASSED '
+ CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*'
+ CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--'
+
error_string = failure
IF (test_result == 0) THEN
@@ -89,75 +106,76 @@ END SUBROUTINE verify_real_kind_7
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: check
!DEC$endif
-SUBROUTINE check(string,error,total_error)
- CHARACTER(LEN=*) :: string
- INTEGER :: error, total_error
- IF (error .LT. 0) THEN
- total_error=total_error+1
- WRITE(*,*) string, " FAILED"
- ENDIF
- RETURN
-END SUBROUTINE check
+ SUBROUTINE check(string,error,total_error)
+ CHARACTER(LEN=*) :: string
+ INTEGER :: error, total_error
+ IF (error .LT. 0) THEN
+ total_error=total_error+1
+ WRITE(*,*) string, " FAILED"
+ ENDIF
+ RETURN
+ END SUBROUTINE check
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verify
!DEC$endif
-SUBROUTINE verify(string,value,correct_value,total_error)
- CHARACTER(LEN=*) :: string
- INTEGER :: value, correct_value, total_error
- IF (value .NE. correct_value) THEN
- total_error=total_error+1
- WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
- ENDIF
- RETURN
-END SUBROUTINE verify
+ SUBROUTINE VERIFY(string,value,correct_value,total_error)
+ CHARACTER(LEN=*) :: string
+ INTEGER :: value, correct_value, total_error
+ IF (value .NE. correct_value) THEN
+ total_error=total_error+1
+ WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
+ ENDIF
+ RETURN
+ END SUBROUTINE verify
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verify_Fortran_INTEGER_4
!DEC$endif
-SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
- USE HDF5
- INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors
- CHARACTER(LEN=*) :: string
- INTEGER(int_kind_8) :: value, correct_value, total_error
- IF (value .NE. correct_value) THEN
- total_error=total_error+1
- WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
- ENDIF
- RETURN
-END SUBROUTINE verify_Fortran_INTEGER_4
+ SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
+ USE HDF5
+ INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors
+ CHARACTER(LEN=*) :: string
+ INTEGER(int_kind_8) :: value, correct_value
+ INTEGER :: total_error
+ IF (value .NE. correct_value) THEN
+ total_error=total_error+1
+ WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
+ ENDIF
+ RETURN
+ END SUBROUTINE verify_Fortran_INTEGER_4
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyLogical
!DEC$endif
-SUBROUTINE verifyLogical(string,value,correct_value,total_error)
- CHARACTER(LEN=*) :: string
- LOGICAL :: value, correct_value
- INTEGER :: total_error
- IF (value .NEQV. correct_value) THEN
- total_error = total_error + 1
- WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
- ENDIF
- RETURN
-END SUBROUTINE verifyLogical
-
+ SUBROUTINE verifyLogical(string,value,correct_value,total_error)
+ CHARACTER(LEN=*) :: string
+ LOGICAL :: value, correct_value
+ INTEGER :: total_error
+ IF (value .NEQV. correct_value) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
+ ENDIF
+ RETURN
+ END SUBROUTINE verifyLogical
+
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyString
!DEC$endif
-SUBROUTINE verifyString(string, value,correct_value,total_error)
- CHARACTER*(*) :: string
- CHARACTER*(*) :: value, correct_value
- INTEGER :: total_error
- IF (TRIM(value) .NE. TRIM(correct_value)) THEN
- total_error = total_error + 1
- WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
- ENDIF
- RETURN
-END SUBROUTINE verifyString
+ SUBROUTINE verifyString(string, value,correct_value,total_error)
+ CHARACTER*(*) :: string
+ CHARACTER*(*) :: value, correct_value
+ INTEGER :: total_error
+ IF (TRIM(value) .NE. TRIM(correct_value)) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
+ ENDIF
+ RETURN
+ END SUBROUTINE verifyString
!----------------------------------------------------------------------
@@ -180,46 +198,46 @@ END SUBROUTINE verifyString
!
!
!----------------------------------------------------------------------
-SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr)
+ SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: h5_fixname_f
!DEC$endif
- USE H5GLOBAL
- IMPLICIT NONE
- CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name
- CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list
-
- INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string
- INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string
+ USE H5GLOBAL
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name
+ CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list
+
+ INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string
+ INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string
! INTEGER(HID_T) :: fapl_default
- INTERFACE
- INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, &
- full_name, full_namelen)
- USE H5GLOBAL
- !DEC$ IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c
- !DEC$ ENDIF
- !DEC$ATTRIBUTES reference :: base_name
- !DEC$ATTRIBUTES reference :: full_name
- CHARACTER(LEN=*), INTENT(IN) :: base_name
- INTEGER(SIZE_T) :: base_namelen
- INTEGER(HID_T), INTENT(IN) :: fapl
- CHARACTER(LEN=*), INTENT(IN) :: full_name
- INTEGER(SIZE_T) :: full_namelen
- END FUNCTION h5_fixname_c
- END INTERFACE
-
- base_namelen = LEN(base_name)
- full_namelen = LEN(full_name)
- hdferr = h5_fixname_c(base_name, base_namelen, fapl, &
- full_name, full_namelen)
-
-END SUBROUTINE h5_fixname_f
+ INTERFACE
+ INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, &
+ full_name, full_namelen)
+ USE H5GLOBAL
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c
+ !DEC$ ENDIF
+ !DEC$ATTRIBUTES reference :: base_name
+ !DEC$ATTRIBUTES reference :: full_name
+ CHARACTER(LEN=*), INTENT(IN) :: base_name
+ INTEGER(SIZE_T) :: base_namelen
+ INTEGER(HID_T), INTENT(IN) :: fapl
+ CHARACTER(LEN=*), INTENT(IN) :: full_name
+ INTEGER(SIZE_T) :: full_namelen
+ END FUNCTION h5_fixname_c
+ END INTERFACE
+
+ base_namelen = LEN(base_name)
+ full_namelen = LEN(full_name)
+ hdferr = h5_fixname_c(base_name, base_namelen, fapl, &
+ full_name, full_namelen)
+
+ END SUBROUTINE h5_fixname_f
!----------------------------------------------------------------------
! Name: h5_cleanup_f
@@ -240,37 +258,37 @@ END SUBROUTINE h5_fixname_f
!
!
!----------------------------------------------------------------------
-SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr)
+ SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: h5_cleanup_f
!DEC$endif
- USE H5GLOBAL
- IMPLICIT NONE
- CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list
-
- INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string
-
- INTERFACE
- INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl)
- USE H5GLOBAL
- !DEC$ IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c
- !DEC$ ENDIF
- !DEC$ATTRIBUTES reference :: base_name
- CHARACTER(LEN=*), INTENT(IN) :: base_name
- INTEGER(SIZE_T) :: base_namelen
- INTEGER(HID_T), INTENT(IN) :: fapl
- END FUNCTION h5_cleanup_c
- END INTERFACE
-
- base_namelen = LEN(base_name)
- hdferr = h5_cleanup_c(base_name, base_namelen, fapl)
-
-END SUBROUTINE h5_cleanup_f
+ USE H5GLOBAL
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list
+
+ INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string
+
+ INTERFACE
+ INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl)
+ USE H5GLOBAL
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c
+ !DEC$ ENDIF
+ !DEC$ATTRIBUTES reference :: base_name
+ CHARACTER(LEN=*), INTENT(IN) :: base_name
+ INTEGER(SIZE_T) :: base_namelen
+ INTEGER(HID_T), INTENT(IN) :: fapl
+ END FUNCTION h5_cleanup_c
+ END INTERFACE
+
+ base_namelen = LEN(base_name)
+ hdferr = h5_cleanup_c(base_name, base_namelen, fapl)
+
+ END SUBROUTINE h5_cleanup_f
!----------------------------------------------------------------------
! Name: h5_exit_f
@@ -292,27 +310,27 @@ END SUBROUTINE h5_cleanup_f
!
!
!----------------------------------------------------------------------
-SUBROUTINE h5_exit_f(status)
+ SUBROUTINE h5_exit_f(status)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: h5_exit_f
!DEC$endif
- IMPLICIT NONE
- INTEGER, INTENT(IN) :: status ! Return code
-
- INTERFACE
- SUBROUTINE h5_exit_c(status)
- !DEC$ IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c
- !DEC$ ENDIF
- INTEGER, INTENT(IN) :: status
- END SUBROUTINE h5_exit_c
- END INTERFACE
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: status ! Return code
- CALL h5_exit_c(status)
+ INTERFACE
+ SUBROUTINE h5_exit_c(status)
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c
+ !DEC$ ENDIF
+ INTEGER, INTENT(IN) :: status
+ END SUBROUTINE h5_exit_c
+ END INTERFACE
+
+ CALL h5_exit_c(status)
-END SUBROUTINE h5_exit_f
+ END SUBROUTINE h5_exit_f
!----------------------------------------------------------------------
! Name: h5_env_nocleanup_f
@@ -329,31 +347,29 @@ END SUBROUTINE h5_exit_f
! September 30, 2008
!
!----------------------------------------------------------------------
-SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP)
+ SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: h5_env_nocleanup_f
!DEC$endif
- IMPLICIT NONE
- LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code
- INTEGER :: status
-
- INTERFACE
- SUBROUTINE h5_env_nocleanup_c(status)
- !DEC$ IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c
- !DEC$ ENDIF
- INTEGER :: status
- END SUBROUTINE h5_env_nocleanup_c
- END INTERFACE
-
- CALL h5_env_nocleanup_c(status)
-
- HDF5_NOCLEANUP = .FALSE.
- IF(status.EQ.1)THEN
- HDF5_NOCLEANUP = .TRUE.
- ENDIF
-
-END SUBROUTINE h5_env_nocleanup_f
-
+ IMPLICIT NONE
+ LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code
+ INTEGER :: status
+
+ INTERFACE
+ SUBROUTINE h5_env_nocleanup_c(status)
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c
+ !DEC$ ENDIF
+ INTEGER :: status
+ END SUBROUTINE h5_env_nocleanup_c
+ END INTERFACE
+
+ CALL h5_env_nocleanup_c(status)
+
+ HDF5_NOCLEANUP = .FALSE.
+ IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE.
+
+ END SUBROUTINE h5_env_nocleanup_f
+END MODULE TH5_MISC
diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am
index 2e85f3b..517a3c8 100644
--- a/fortran/testpar/Makefile.am
+++ b/fortran/testpar/Makefile.am
@@ -21,7 +21,8 @@
include $(top_srcdir)/config/commence.am
# Include files
-AM_FCFLAGS+=-I$(top_srcdir)/fortran/src -I$(top_srcdir)/fortran/test $(F9XMODFLAG)$(top_builddir)/fortran/src
+AM_FCFLAGS+=-I$(top_srcdir)/fortran/src -I$(top_srcdir)/fortran/test $(F9XMODFLAG)$(top_builddir)/fortran/src \
+ $(F9XMODFLAG)$(top_builddir)/fortran/test
# Some Fortran compilers can't build shared libraries, so sometimes we
# want to build a shared C library and a static Fortran library. If so,
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index e078c3a..989c626 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -399,7 +399,8 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
# Include files
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_srcdir)/fortran/src \
-I$(top_srcdir)/fortran/test \
- $(F9XMODFLAG)$(top_builddir)/fortran/src
+ $(F9XMODFLAG)$(top_builddir)/fortran/src \
+ $(F9XMODFLAG)$(top_builddir)/fortran/test
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -497,7 +498,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/fortran/testpar/hyper.f90 b/fortran/testpar/hyper.f90
index 1a580ca..a2e2e07 100644
--- a/fortran/testpar/hyper.f90
+++ b/fortran/testpar/hyper.f90
@@ -19,7 +19,8 @@
!//////////////////////////////////////////////////////////
SUBROUTINE hyper(length,do_collective,do_chunk, mpi_size, mpi_rank, nerrors)
- USE hdf5
+ USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
INCLUDE 'mpif.h'
diff --git a/fortran/testpar/mdset.f90 b/fortran/testpar/mdset.f90
index 9d14a50..7fe431b 100644
--- a/fortran/testpar/mdset.f90
+++ b/fortran/testpar/mdset.f90
@@ -19,7 +19,8 @@
!//////////////////////////////////////////////////////////
SUBROUTINE multiple_dset_write(length, do_collective, do_chunk, mpi_size, mpi_rank, nerrors)
- USE hdf5
+ USE HDF5
+ USE TH5_MISC
IMPLICIT NONE
INCLUDE 'mpif.h'
diff --git a/hl/Makefile.in b/hl/Makefile.in
index 204c93b..17a1ff0 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -502,7 +502,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index bf2d234..4b11ad8 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -498,7 +498,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am
index df15257..c8f0305 100644
--- a/hl/c++/examples/Makefile.am
+++ b/hl/c++/examples/Makefile.am
@@ -24,6 +24,7 @@ include $(top_srcdir)/config/commence.am
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
EXAMPLE_PROG=ptExampleFL
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# These are the example files to be installed
INSTALL_FILES=ptExampleFL.cpp
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index df7bc7a..3938a3b 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -445,7 +445,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -616,6 +615,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
EXAMPLE_PROG = ptExampleFL
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# These are the example files to be installed
INSTALL_FILES = ptExampleFL.cpp
@@ -1065,27 +1065,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am
index 03289c0..9751e94 100644
--- a/hl/c++/src/Makefile.am
+++ b/hl/c++/src/Makefile.am
@@ -40,11 +40,8 @@ endif
# At the moment, only the H5PT Packet Table has a C++ API.
libhdf5_hl_cpp_la_SOURCES=H5PacketTable.cpp
-# HDF5 HL C++ library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-if LT_ADD_LIBHDF5_DEPENDENCY
+# HDF5 HL C++ library depends on HDF5 Library.
libhdf5_hl_cpp_la_LIBADD=$(LIBH5_HL) $(LIBH5CPP)
-endif
# Public headers
include_HEADERS=H5PacketTable.h
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index b47850c..bb1a659 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -144,8 +144,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_hl_cpp_la_DEPENDENCIES = \
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@ $(LIBH5_HL) $(LIBH5CPP)
+libhdf5_hl_cpp_la_DEPENDENCIES = $(LIBH5_HL) $(LIBH5CPP)
am_libhdf5_hl_cpp_la_OBJECTS = H5PacketTable.lo
libhdf5_hl_cpp_la_OBJECTS = $(am_libhdf5_hl_cpp_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -505,7 +504,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -676,7 +674,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
# This is our main target
@@ -689,9 +687,8 @@ libhdf5_hl_cpp_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISIO
# At the moment, only the H5PT Packet Table has a C++ API.
libhdf5_hl_cpp_la_SOURCES = H5PacketTable.cpp
-# HDF5 HL C++ library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_hl_cpp_la_LIBADD = $(LIBH5_HL) $(LIBH5CPP)
+# HDF5 HL C++ library depends on HDF5 Library.
+libhdf5_hl_cpp_la_LIBADD = $(LIBH5_HL) $(LIBH5CPP)
# Public headers
include_HEADERS = H5PacketTable.h
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 8c052bc..cee963a 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -501,7 +501,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am
index 5108c5e..ba200ed 100644
--- a/hl/examples/Makefile.am
+++ b/hl/examples/Makefile.am
@@ -29,6 +29,8 @@ endif
# Note: no '/' after DESTDIR. Explanation in commence.am
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+INSTALL_SCRIPT_FILES = run-hlc-ex.sh
+INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
@@ -40,6 +42,7 @@ EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \
ex_table_05 ex_table_06 ex_table_07 ex_table_08 \
ex_table_09 ex_table_10 ex_table_11 ex_table_12 \
ex_ds1
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# Install files
# List all file that should be installed in examples directory
@@ -50,8 +53,6 @@ INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \
ex_table_09.c ex_table_10.c ex_table_11.c ex_table_12.c \
ex_ds1.c image24pixel.txt image8.txt pal_rgb.h
-INSTALL_SCRIPT_FILES = run-hlc-ex.sh
-INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
# Additional dependencies for each program are listed below.
if BUILD_PARALLEL_CONDITIONAL
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index ea3ff07..2bf5764 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -445,7 +445,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -618,6 +617,8 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# Note: no '/' after DESTDIR. Explanation in commence.am
EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+INSTALL_SCRIPT_FILES = run-hlc-ex.sh
+INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
@@ -630,6 +631,7 @@ EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \
ex_table_09 ex_table_10 ex_table_11 ex_table_12 \
ex_ds1
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# Install files
# List all file that should be installed in examples directory
@@ -640,8 +642,6 @@ INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \
ex_table_09.c ex_table_10.c ex_table_11.c ex_table_12.c \
ex_ds1.c image24pixel.txt image8.txt pal_rgb.h
-INSTALL_SCRIPT_FILES = run-hlc-ex.sh
-INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
@BUILD_SHARED_SZIP_CONDITIONAL_TRUE@LD_LIBRARY_PATH = $(LL_PATH)
# Assume that all tests in this directory are examples, and tell
@@ -1105,27 +1105,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 315c3a4..c2d6610 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -502,7 +502,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am
index f94f031..91cb7c5 100644
--- a/hl/fortran/examples/Makefile.am
+++ b/hl/fortran/examples/Makefile.am
@@ -32,6 +32,7 @@ endif
# We don't tell automake about these programs so that it doesn't try to
# compile them with the regular fortran compiler.
EXAMPLE_PROG=exlite ex_ds1
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# List files to be installed here
INSTALL_FILES= exlite.f90 ex_ds1.f90
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index a66b5b9..1eb9c9d 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -445,7 +445,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -622,6 +621,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# We don't tell automake about these programs so that it doesn't try to
# compile them with the regular fortran compiler.
EXAMPLE_PROG = exlite ex_ds1
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# List files to be installed here
INSTALL_FILES = exlite.f90 ex_ds1.f90
@@ -1068,27 +1068,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90
index 377a641..d77f8e0 100644
--- a/hl/fortran/examples/ex_ds1.f90
+++ b/hl/fortran/examples/ex_ds1.f90
@@ -86,7 +86,7 @@ PROGRAM example_ds
! Test if dimension Scale Attached
CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err)
- WRITE(*,'(/,5X 3(A,1X),I0,A,L1)') 'Is',TRIM(DS_1_NAME),&
+ WRITE(*,'(/,5X,3(A,1X),I0,A,L1)') 'Is',TRIM(DS_1_NAME),&
'attached to dimension',DIM1,' ... ',is_attached
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am
index 5195371..c8c4541 100644
--- a/hl/fortran/src/Makefile.am
+++ b/hl/fortran/src/Makefile.am
@@ -49,11 +49,8 @@ endif
libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \
H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90
-# HDF5 HL Fortran library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-if LT_ADD_LIBHDF5_DEPENDENCY
+# HDF5 HL Fortran library depends on HDF5 Library.
libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F)
-endif
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 196f72f..b1c6334 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -144,8 +144,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5hl_fortran_la_DEPENDENCIES = \
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@ $(LIBH5_HL) $(LIBH5F)
+libhdf5hl_fortran_la_DEPENDENCIES = $(LIBH5_HL) $(LIBH5F)
am_libhdf5hl_fortran_la_OBJECTS = H5DSfc.lo H5LTfc.lo H5IMfc.lo \
H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5IMff.lo H5TBff.lo
libhdf5hl_fortran_la_OBJECTS = $(am_libhdf5hl_fortran_la_OBJECTS)
@@ -520,7 +519,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -691,7 +689,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
# Our main target, the high-level fortran library
@@ -710,9 +708,8 @@ libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \
H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90
-# HDF5 HL Fortran library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F)
+# HDF5 HL Fortran library depends on HDF5 Library.
+libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F)
# Automake needs to be taught how to build lib, progs, and tests targets.
# These will be filled in automatically for the most part (e.g.,
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index d25ddb5..e142edf 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -510,7 +510,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index 560a8ce..31ec84f 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -809,7 +809,7 @@ char *yytext;
#line 17 "H5LTanalyze.l"
#include <stdlib.h>
#include <string.h>
-#include<hdf5.h>
+#include <hdf5.h>
#include "H5LTparse.h"
int my_yyinput(char *, int);
@@ -1453,7 +1453,7 @@ YY_RULE_SETUP
#line 174 "H5LTanalyze.l"
ECHO;
YY_BREAK
-#line 1432 "H5LTanalyze.c"
+#line 1457 "H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(TAG_STRING):
yyterminate();
@@ -2345,7 +2345,7 @@ int my_yyinput(char *buf, int max_size)
return ret;
}
-int H5LTyyerror(char *msg)
+int H5LTyyerror(const char *msg)
{
printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index 7407520..9682f78 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -16,7 +16,7 @@
%{
#include <stdlib.h>
#include <string.h>
-#include<hdf5.h>
+#include <hdf5.h>
#include "H5LTparse.h"
int my_yyinput(char *, int);
@@ -181,7 +181,7 @@ int my_yyinput(char *buf, int max_size)
return ret;
}
-int H5LTyyerror(char *msg)
+int H5LTyyerror(const char *msg)
{
printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index 41c4cec..4527a5f 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -58,12 +58,12 @@ static int yygrowstack();
#define yystacksize H5LTyystacksize
#define YYPREFIX "H5LTyy"
#line 17 "H5LTparse.y"
-#include<stdio.h>
-#include<string.h>
-#include<hdf5.h>
+#include <stdio.h>
+#include <string.h>
+#include <hdf5.h>
extern int yylex();
-extern int yyerror(char *);
+extern int yyerror(const char *);
#define STACK_SIZE 16
@@ -95,7 +95,7 @@ int asindex = -1; /*pointer to the top of array stack*/
hbool_t is_str_size = 0; /*flag to lexer for string size*/
hbool_t is_str_pad = 0; /*flag to lexer for string padding*/
-H5T_pad_t str_pad; /*variable for string padding*/
+H5T_str_t str_pad; /*variable for string padding*/
H5T_cset_t str_cset; /*variable for string character set*/
hbool_t is_variable = 0; /*variable for variable-length string*/
size_t str_size; /*variable for string size*/
@@ -113,7 +113,7 @@ typedef union {
int ival; /*for integer token*/
char *sval; /*for name string*/
} YYSTYPE;
-#line 99 "H5LTparse.c"
+#line 117 "H5LTparse.c"
#define YYERRCODE 256
#define H5T_STD_I8BE_TOKEN 257
#define H5T_STD_I8LE_TOKEN 258
@@ -1042,11 +1042,15 @@ case 91:
#line 330 "H5LTparse.y"
{
is_enum_memb = 1; /*indicate member of enum*/
- enum_memb_symbol = strdup(yylval.sval);
+#ifdef H5_HAVE_WIN32_API
+ enum_memb_symbol = _strdup(yylval.sval);
+#else /* H5_HAVE_WIN32_API */
+ enum_memb_symbol = strdup(yylval.sval);
+#endif /* H5_HAVE_WIN32_API */
}
break;
case 92:
-#line 335 "H5LTparse.y"
+#line 339 "H5LTparse.y"
{
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
@@ -1090,7 +1094,7 @@ case 92:
H5Tclose(native);
}
break;
-#line 1076 "H5LTparse.c"
+#line 1098 "H5LTparse.c"
}
yyssp -= yym;
yystate = *yyssp;
diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y
index b91e97e..d4c786c 100644
--- a/hl/src/H5LTparse.y
+++ b/hl/src/H5LTparse.y
@@ -14,12 +14,12 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
%{
-#include<stdio.h>
-#include<string.h>
-#include<hdf5.h>
+#include <stdio.h>
+#include <string.h>
+#include <hdf5.h>
extern int yylex();
-extern int yyerror(char *);
+extern int yyerror(const char *);
#define STACK_SIZE 16
@@ -51,7 +51,7 @@ int asindex = -1; /*pointer to the top of array stack*/
hbool_t is_str_size = 0; /*flag to lexer for string size*/
hbool_t is_str_pad = 0; /*flag to lexer for string padding*/
-H5T_pad_t str_pad; /*variable for string padding*/
+H5T_str_t str_pad; /*variable for string padding*/
H5T_cset_t str_cset; /*variable for string character set*/
hbool_t is_variable = 0; /*variable for variable-length string*/
size_t str_size; /*variable for string size*/
diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am
index 1565c51..c1e6810 100644
--- a/hl/src/Makefile.am
+++ b/hl/src/Makefile.am
@@ -33,11 +33,8 @@ libhdf5_hl_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(
# List sources to include in the HDF5 HL Library.
libhdf5_hl_la_SOURCES=H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c H5LD.c
-# HDF5 HL library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-if LT_ADD_LIBHDF5_DEPENDENCY
+# HDF5 HL library depends on HDF5 Library.
libhdf5_hl_la_LIBADD=$(LIBHDF5)
-endif
# Public header files (to be installed)
include_HEADERS=hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h H5LDpublic.h
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 0c853a0..be7034d 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -141,8 +141,7 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_hl_la_DEPENDENCIES = \
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@ $(LIBHDF5)
+libhdf5_hl_la_DEPENDENCIES = $(LIBHDF5)
am_libhdf5_hl_la_OBJECTS = H5DO.lo H5DS.lo H5IM.lo H5LT.lo \
H5LTanalyze.lo H5LTparse.lo H5PT.lo H5TB.lo H5LD.lo
libhdf5_hl_la_OBJECTS = $(am_libhdf5_hl_la_OBJECTS)
@@ -501,7 +500,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -672,7 +670,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
# This library is our main target.
@@ -684,9 +682,8 @@ libhdf5_hl_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$
# List sources to include in the HDF5 HL Library.
libhdf5_hl_la_SOURCES = H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c H5LD.c
-# HDF5 HL library depends on HDF5 Library. However, only add the dependency
-# if --enable-sharedlib-rpath is yes.
-@LT_ADD_LIBHDF5_DEPENDENCY_TRUE@libhdf5_hl_la_LIBADD = $(LIBHDF5)
+# HDF5 HL library depends on HDF5 Library.
+libhdf5_hl_la_LIBADD = $(LIBHDF5)
# Public header files (to be installed)
include_HEADERS = hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h H5LDpublic.h
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index 5772ef1..f7a47d0 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -551,7 +551,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index ef0bca6..6fa815a 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -499,7 +499,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index 9d59dd8..0652ddb 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -513,7 +513,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/hl/tools/h5watch/Makefile.in b/hl/tools/h5watch/Makefile.in
index 33af67f..499804e 100644
--- a/hl/tools/h5watch/Makefile.in
+++ b/hl/tools/h5watch/Makefile.in
@@ -510,7 +510,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/perform/Makefile.in b/perform/Makefile.in
index 31a789e..8698c46 100644
--- a/perform/Makefile.in
+++ b/perform/Makefile.in
@@ -540,7 +540,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 82d1bb8..3535fb4 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -437,7 +437,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
subdir = (user ? user : login);
if (subdir) {
- for (i = 0; i < size && prefix[i]; i++)
+ for (i = 0; i < size-1 && prefix[i]; i++)
fullname[i] = prefix[i];
fullname[i++] = '/';
diff --git a/perform/sio_engine.c b/perform/sio_engine.c
index dec2f98..07e6b16c 100644
--- a/perform/sio_engine.c
+++ b/perform/sio_engine.c
@@ -333,7 +333,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
subdir = (user ? user : login);
if (subdir) {
- for (i = 0; i < size && prefix[i]; i++)
+ for (i = 0; i < size-1 && prefix[i]; i++)
fullname[i] = prefix[i];
fullname[i++] = '/';
diff --git a/perform/sio_timer.c b/perform/sio_timer.c
index f233de3..4e42ee6 100644
--- a/perform/sio_timer.c
+++ b/perform/sio_timer.c
@@ -1,197 +1,197 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Purpose:
- *
- * This is a module of useful timing functions for performance testing.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "sio_timer.h"
-
-
-#include "sio_perf.h"
-
-/*
- * The number to divide the tv_usec field with to get a nice decimal to add to
- * the number of seconds.
- */
-#define MICROSECOND 1000000.0
-
-/* global variables */
-sio_time *timer_g; /* timer: global for stub functions */
-
-/*
- * Function: sub_time
- * Purpose: Struct two time values, and return the difference, in microseconds
- *
- * Note that the function assumes that a > b
- * Programmer: Leon Arber, 1/27/06
- */
-static double sub_time(struct timeval* a, struct timeval* b)
-{
- return (((double)a->tv_sec +
- ((double)a->tv_usec) / MICROSECOND) -
- ((double)b->tv_sec +
- ((double)b->tv_usec) / MICROSECOND));
-}
-
-
-/*
- * Function: sio_time_new
- * Purpose: Build us a brand, spankin', new performance time object.
- * The object is a black box to the user.
- * Return: Pointer to sio_time object
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-sio_time *
-sio_time_new(void)
-{
- sio_time *pt = (sio_time *)calloc(1, sizeof(struct sio_time_));
-
- /* set global timer variable */
- timer_g = pt;
-
- return pt;
-}
-
-/*
- * Function: sio_time_destroy
- * Purpose: Remove the memory allocated for the sio_time object. Only
- * need to call on a pointer allocated with the ``sio_time_new''
- * function.
- * Return: Nothing
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-void
-sio_time_destroy(sio_time *pt)
-{
- HDfree(pt);
- /* reset the global timer pointer too. */
- timer_g = NULL;
-}
-
-
-
-/*
- * Function: set_time
- * Purpose: Set the time in a ``sio_time'' object.
- * Return: Pointer to the passed in ``sio_time'' object.
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-sio_time *
-set_time(sio_time *pt, timer_type t, int start_stop)
-{
- if (pt) {
- if (start_stop == TSTART) {
- HDgettimeofday(&pt->sys_timer[t], NULL);
-
- /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
- * we compute the time it took to only open the file */
- if(t == HDF5_FINE_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
- else if(t == HDF5_FINE_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
-
-
- } else {
- struct timeval sys_t;
-
- HDgettimeofday(&sys_t, NULL);
- pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t]));
-
-/* ((double)sys_t.tv_sec +
- ((double)sys_t.tv_usec) / MICROSECOND) -
- ((double)pt->sys_timer[t].tv_sec +
- ((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/
-
- /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
- * we compute the time it took to close the file after the last read/write finished */
- if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
- else if(t == HDF5_GROSS_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
-
- }
-
- if (sio_debug_level >= 4) {
- const char *msg;
-
- switch (t) {
- case HDF5_FILE_OPENCLOSE:
- msg = "File Open/Close";
- break;
- case HDF5_DATASET_CREATE:
- msg = "Dataset Create";
- break;
- case HDF5_MPI_WRITE:
- msg = "MPI Write";
- break;
- case HDF5_MPI_READ:
- msg = "MPI Read";
- break;
- case HDF5_FINE_WRITE_FIXED_DIMS:
- msg = "Fine Write";
- break;
- case HDF5_FINE_READ_FIXED_DIMS:
- msg = "Fine Read";
- break;
- case HDF5_GROSS_WRITE_FIXED_DIMS:
- msg = "Gross Write";
- break;
- case HDF5_GROSS_READ_FIXED_DIMS:
- msg = "Gross Read";
- break;
- case HDF5_RAW_WRITE_FIXED_DIMS:
- msg = "Raw Write";
- break;
- case HDF5_RAW_READ_FIXED_DIMS:
- msg = "Raw Read";
- break;
- default:
- msg = "Unknown Timer";
- break;
- }
-
- fprintf(output, " %s %s: %.2f\n", msg,
- (start_stop == TSTART ? "Start" : "Stop"),
- pt->total_time[t]);
- }
- }
-
- return pt;
-}
-
-/*
- * Function: get_time
- * Purpose: Get the time from a ``sio_time'' object.
- * Return: The number of seconds as a DOUBLE.
- * Programmer: Bill Wendling, 01. October 2001
- * Modifications:
- */
-double
-get_time(sio_time *pt, timer_type t)
-{
- return pt->total_time[t];
-}
-#ifdef STANDALONE
-#include "sio_standalone.c"
-#endif
-
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose:
+ *
+ * This is a module of useful timing functions for performance testing.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "sio_timer.h"
+
+
+#include "sio_perf.h"
+
+/*
+ * The number to divide the tv_usec field with to get a nice decimal to add to
+ * the number of seconds.
+ */
+#define MICROSECOND 1000000.0
+
+/* global variables */
+sio_time *timer_g; /* timer: global for stub functions */
+
+/*
+ * Function: sub_time
+ * Purpose: Struct two time values, and return the difference, in microseconds
+ *
+ * Note that the function assumes that a > b
+ * Programmer: Leon Arber, 1/27/06
+ */
+static double sub_time(struct timeval* a, struct timeval* b)
+{
+ return (((double)a->tv_sec +
+ ((double)a->tv_usec) / MICROSECOND) -
+ ((double)b->tv_sec +
+ ((double)b->tv_usec) / MICROSECOND));
+}
+
+
+/*
+ * Function: sio_time_new
+ * Purpose: Build us a brand, spankin', new performance time object.
+ * The object is a black box to the user.
+ * Return: Pointer to sio_time object
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+sio_time *
+sio_time_new(void)
+{
+ sio_time *pt = (sio_time *)calloc(1, sizeof(struct sio_time_));
+
+ /* set global timer variable */
+ timer_g = pt;
+
+ return pt;
+}
+
+/*
+ * Function: sio_time_destroy
+ * Purpose: Remove the memory allocated for the sio_time object. Only
+ * need to call on a pointer allocated with the ``sio_time_new''
+ * function.
+ * Return: Nothing
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+void
+sio_time_destroy(sio_time *pt)
+{
+ HDfree(pt);
+ /* reset the global timer pointer too. */
+ timer_g = NULL;
+}
+
+
+
+/*
+ * Function: set_time
+ * Purpose: Set the time in a ``sio_time'' object.
+ * Return: Pointer to the passed in ``sio_time'' object.
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+sio_time *
+set_time(sio_time *pt, timer_type t, int start_stop)
+{
+ if (pt) {
+ if (start_stop == TSTART) {
+ HDgettimeofday(&pt->sys_timer[t], NULL);
+
+ /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
+ * we compute the time it took to only open the file */
+ if(t == HDF5_FINE_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
+ else if(t == HDF5_FINE_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
+
+
+ } else {
+ struct timeval sys_t;
+
+ HDgettimeofday(&sys_t, NULL);
+ pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t]));
+
+/* ((double)sys_t.tv_sec +
+ ((double)sys_t.tv_usec) / MICROSECOND) -
+ ((double)pt->sys_timer[t].tv_sec +
+ ((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/
+
+ /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
+ * we compute the time it took to close the file after the last read/write finished */
+ if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
+ else if(t == HDF5_GROSS_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
+
+ }
+
+ if (sio_debug_level >= 4) {
+ const char *msg;
+
+ switch (t) {
+ case HDF5_FILE_OPENCLOSE:
+ msg = "File Open/Close";
+ break;
+ case HDF5_DATASET_CREATE:
+ msg = "Dataset Create";
+ break;
+ case HDF5_MPI_WRITE:
+ msg = "MPI Write";
+ break;
+ case HDF5_MPI_READ:
+ msg = "MPI Read";
+ break;
+ case HDF5_FINE_WRITE_FIXED_DIMS:
+ msg = "Fine Write";
+ break;
+ case HDF5_FINE_READ_FIXED_DIMS:
+ msg = "Fine Read";
+ break;
+ case HDF5_GROSS_WRITE_FIXED_DIMS:
+ msg = "Gross Write";
+ break;
+ case HDF5_GROSS_READ_FIXED_DIMS:
+ msg = "Gross Read";
+ break;
+ case HDF5_RAW_WRITE_FIXED_DIMS:
+ msg = "Raw Write";
+ break;
+ case HDF5_RAW_READ_FIXED_DIMS:
+ msg = "Raw Read";
+ break;
+ default:
+ msg = "Unknown Timer";
+ break;
+ }
+
+ fprintf(output, " %s %s: %.2f\n", msg,
+ (start_stop == TSTART ? "Start" : "Stop"),
+ pt->total_time[t]);
+ }
+ }
+
+ return pt;
+}
+
+/*
+ * Function: get_time
+ * Purpose: Get the time from a ``sio_time'' object.
+ * Return: The number of seconds as a DOUBLE.
+ * Programmer: Bill Wendling, 01. October 2001
+ * Modifications:
+ */
+double
+get_time(sio_time *pt, timer_type t)
+{
+ return pt->total_time[t];
+}
+#ifdef STANDALONE
+#include "sio_standalone.c"
+#endif
+
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index b6c79c9..372698a 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -89,7 +89,7 @@ Notes: This short set of instructions is written for users who want to
c:\MyHDFstuff\hdf5\build
4. Configure the C library, tools and tests with this command:
- cmake -G "Visual Studio 10" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
+ cmake -G "Visual Studio 11" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
The two dots on the end of the command is the location of the source.
The CMAKE_BUILD_TYPE must match the configuration type.
@@ -103,7 +103,7 @@ Notes: This short set of instructions is written for users who want to
cpack -C Release CPackConfig.cmake
8. Install with this command:
- HDF5-1.8.12-win32.exe
+ HDF5-1.8.13-win32.exe
B. Linux Quick Step Building HDF5 Libraries with CMake Using GCC
@@ -133,7 +133,7 @@ Notes: This short set of instructions is written for users who want to
cpack -C Release CPackConfig.cmake
8. Install with this command:
- HDF5-1.8.12-Linux.sh
+ HDF5-1.8.13-Linux.sh
@@ -184,7 +184,7 @@ III. Preconditions
the settings for the developers' environment. Then the only options needed
on the command line are those options that are different. Example using HDF
default cache file:
- cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \
+ cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 11" \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
@@ -262,22 +262,15 @@ These five steps are described in detail below.
cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>" [-D<options>] <sourcepath>
Where <generator> is
- * Borland Makefiles
- * MSYS Makefiles
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
+ * Visual Studio 12
+ * Visual Studio 12 Win64
* Visual Studio 11
* Visual Studio 11 Win64
* Visual Studio 10
* Visual Studio 10 Win64
- * Visual Studio 6
- * Visual Studio 7
- * Visual Studio 7 .NET 2003
- * Visual Studio 8 2005
- * Visual Studio 8 2005 Win64
- * Visual Studio 9 2008
- * Visual Studio 9 2008 Win64
<options> is:
* SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
@@ -350,7 +343,7 @@ These five steps are described in detail below.
2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
- cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \
+ cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 11" \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
@@ -452,7 +445,7 @@ These five steps are described in detail below.
========================================================================
-V. All Options for HDF5 C/C++ Libraries with CMake
+V. More Options for HDF5 C/C++ Libraries with CMake
========================================================================
In the options listed below, there are three columns of information:
@@ -503,8 +496,6 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
HDF5_ENABLE_TRACE "Enable API tracing capability" ON
if (HDF5_TEST_VFD)
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
-if (WIN32 AND NOT CYGWIN)
- HDF_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" OFF
---------------- External Library Options ---------------------
HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO"
@@ -897,7 +888,7 @@ set(LOCAL_NO_PACKAGE "TRUE")
#set(LOCAL_UPDATE "TRUE")
set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
#uncomment to use a compressed source file *.zip
-#set(CTEST_USE_TAR_SOURCE "hdf5-1.8.12")
+#set(CTEST_USE_TAR_SOURCE "hdf5-1.8.13")
############################################
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 3e7d19a..6a170ce 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.176-swmr0 currently under development
+HDF5 version 1.9.178-swmr0 currently under development
INTRODUCTION
@@ -40,6 +40,9 @@ New Features
Configuration:
-------------
+ - 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
@@ -427,6 +430,11 @@ Bug Fixes since HDF5-1.8.0 release
Library
-------
+ - 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
@@ -677,11 +685,14 @@ Bug Fixes since HDF5-1.8.0 release
Configuration
-------------
- - 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
+ - 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)
@@ -753,6 +764,16 @@ Bug Fixes since HDF5-1.8.0 release
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
-------------
@@ -785,6 +806,10 @@ Bug Fixes since HDF5-1.8.0 release
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
@@ -1133,33 +1158,38 @@ Supported Platforms
Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP i686 i686 i386 compilers for 32-bit applications;
- (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-52)
- Version 4.6.3
+ (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-54)
+ Version 4.8.2
PGI C, Fortran, C++ Compilers for 32-bit
applications;
- Version 11.9-0
+ Version 13.7-0
Intel(R) C, C++, Fortran Compiler for 32-bit
applications;
- Version 12.1
- MPICH mpich2-1.4.1p1 compiled with
- gcc 4.1.2 and gfortran 4.1.2
-
- Linux 2.6.18-308.16.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++)
- #1 SMP x86_64 GNU/Linux compilers for 32-bit applications;
- (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52)
- Version 4.6.3
+ Version 14.0.2 (Build 20140120)
+
+ Linux 2.6.18-371.6.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++)
+ #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
PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 11.9-0
- Version 12.5-0
+ Version 13.7-0
Intel(R) C, C++, Fortran Compilers for
applications running on Intel(R) 64;
- Version 12.1 (Build 20110811)
- Version 12.1 (Build 20120212)
- MPICH mpich2-1.4.1p1 compiled with
- gcc 4.1.2 and gfortran 4.1.2
+ 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
+ x86-64;
+ Version 13.7-0
+ Intel(R) C (icc), C++ (icpc), Fortran (icc)
+ compilers:
+ Version 14.0.2 (Build 20140120)
- Linux 2.6.32-358.2.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ Linux 2.6.32-431.11.2.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
#1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
(ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
IBM XL C/C++ V11.1
@@ -1190,12 +1220,6 @@ Supported Platforms
Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 14 (cmake)
- Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- 64-bit gfortran GNU Fortran (GCC) 4.6.2
- (fred) Intel C (icc), Fortran (ifort), C++ (icpc)
- 12.1 Build 20120928
-
Mac OS X Lion 10.7.3 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.2.1
32- and 64-bit g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.2.1
(duck) gfortran GNU Fortran (GCC) 4.6.2
@@ -1230,18 +1254,20 @@ Windows 7 Cygwin n y/n n y y y
Windows 7 x64 Cygwin n y/n n y y y
Windows 8 y y/y n y y y
Windows 8 x64 y y/y n y y y
-Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y
Mac OS X Lion 10.7.3 32-bit n y/y n y y n
Mac OS X Lion 10.7.3 64-bit n y/y n y y y
-Mac OS X Mountain Lion 10.8.1 64-bit n y/n n y y n
-AIX 5.3 32- and 64-bit y y/n y y y y
-CentOS 5.5 Linux 2.6.18-308 i686 GNU y y/y y y y y
-CentOS 5.5 Linux 2.6.18-308 i686 Intel n y/y n y y y
-CentOS 5.5 Linux 2.6.18-308 i686 PGI n y/y n y y y
-CentOS 5.5 Linux 2.6.18 x86_64 GNU y y/y y y y y
-CentOS 5.5 Linux 2.6.18 x86_64 Intel n y/y n y y y
-CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y
-Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y
+Mac OS X Mountain Lion 10.8.1 64-bit n y/y n y y y
+Mac OS X Mavericks 10.9.1 64-bit n y/y n y y ?
+AIX 5.3 32- and 64-bit n y/n n y y y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y
+CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y
+CentOS 5.9 Linux 2.6.18 x86_64 GNU n y/y n y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y
+CentOS 6.4 Linux 2.6.32 x86_64 GNU y y/y y y y y
+CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y
+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-
@@ -1254,18 +1280,20 @@ 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 Snow Leopard 10.6.8 64-bit y n y n
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
-AIX 5.3 32- and 64-bit n n n y
-CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
-Linux 2.6.32-358.2.1.el6.ppc64 y y y n
+Mac OS X Mavericks 10.9.1 64-bit y n y y
+AIX 5.3 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
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -1275,6 +1303,14 @@ More Tested Platforms
=====================
The following platforms are not supported but have been tested for this release.
+ Linux 2.6.18-308.13.1.el5PAE MPICH mpich 3.1 compiled with
+ #1 SMP i686 i686 i386 gcc 4.8.2 and gfortran 4.8.2
+ (jam) g95 (GCC 4.0.3 (g95 0.94!)
+
+ Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1 compiled with
+ #1 SMP x86_64 GNU/Linux gcc 4.8.2 and gfortran 4.8.2
+ (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
g++ 4.6.1 20110422
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index 4dae021..299063f 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -1,81 +1,81 @@
-************************************************************************
-* Build and Test HDF5 Examples with CMake *
-************************************************************************
-
-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
- site, www.cmake.org.
-
- CMake uses the command line and these instructions use the script
- method of the ctest command.
-
-
-========================================================================
-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 2.8.10.
-
- 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
- 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.
-
-
-
-========================================================================
-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)
- 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, do NOT unzip.
- Copy HDF518_Examples.cmake to this directory.
- 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
-
-The script will uncompress the examples file HDF5Examples-0.1.1-Source.zip(.tar.gz),
- and create a build directory inside the HDF5Examples-0.1.1-Source directory.
- 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.
-
-
-========================================================================
-III. Common changes to the HDF518_Examples.cmake file
-========================================================================
-
-Line 8: change the INSTALLDIR to a different HDF5 install location.
-
-Line 14: uncomment to allow Mac machines to build shared examples.
-
-Line 15: uncomment to not build and test Fortran examples.
-
-Line 16: uncomment to build and test Fortran examples with F2003 option.
-
-Line 68: change the CTEST_7Z_COMMAND to a different unzip program.
-
+************************************************************************
+* Build and Test HDF5 Examples with CMake *
+************************************************************************
+
+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
+ site, www.cmake.org.
+
+ CMake uses the command line and these instructions use the script
+ method of the ctest command.
+
+
+========================================================================
+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 2.8.12.
+
+ 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
+ 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.
+
+
+
+========================================================================
+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)
+ 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, do NOT unzip.
+ Copy HDF518_Examples.cmake to this directory.
+ 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
+
+The script will uncompress the examples file HDF5Examples-0.1.1-Source.zip(.tar.gz),
+ and create a build directory inside the HDF5Examples-0.1.1-Source directory.
+ 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.
+
+
+========================================================================
+III. Common changes to the HDF518_Examples.cmake file
+========================================================================
+
+Line 8: change the INSTALLDIR to a different HDF5 install location.
+
+Line 14: uncomment to allow Mac machines to build shared examples.
+
+Line 15: uncomment to not build and test Fortran examples.
+
+Line 16: uncomment to build and test Fortran examples with F2003 option.
+
+Line 68: 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 a0aca41..926b297 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -95,22 +95,15 @@ These steps are described in more detail below.
cmake -G "<generator>" [-D<options>] <sourcepath>
Where <generator> is
- * Borland Makefiles
- * MSYS Makefiles
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
+ * Visual Studio 12
+ * Visual Studio 12 Win64
* Visual Studio 11
* Visual Studio 11 Win64
* Visual Studio 10
* Visual Studio 10 Win64
- * Visual Studio 6
- * Visual Studio 7
- * Visual Studio 7 .NET 2003
- * Visual Studio 8 2005
- * Visual Studio 8 2005 Win64
- * Visual Studio 9 2008
- * Visual Studio 9 2008 Win64
<options> is:
* BUILD_TESTING:BOOL=ON
@@ -138,7 +131,7 @@ These steps are described in more detail below.
2.2 Alternative command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
- cmake -G "Visual Studio 10" -DBUILD_TESTING:BOOL=ON -DUSE_SHARED_LIBS:BOOL=ON ..
+ cmake -G "Visual Studio 11" -DBUILD_TESTING:BOOL=ON -DUSE_SHARED_LIBS:BOOL=ON ..
3. Build HDF5 Applications
diff --git a/src/H5.c b/src/H5.c
index 1fb5baa..9ece760 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -151,13 +151,23 @@ H5_init_library(void)
#endif
/*
- * Install atexit() library cleanup routine unless the H5dont_atexit()
+ * Install atexit() library cleanup routines unless the H5dont_atexit()
* has been called. Once we add something to the atexit() list it stays
* there permanently, so we set H5_dont_atexit_g after we add it to prevent
* adding it again later if the library is cosed and reopened.
*/
if (!H5_dont_atexit_g) {
- (void)HDatexit(H5_term_library);
+
+#if defined(H5_HAVE_THREADSAFE) && defined(H5_HAVE_WIN_THREADS)
+ /* Clean up Win32 thread resources. Pthreads automatically cleans up.
+ * This must be entered before the library cleanup code so it's
+ * executed in LIFO order (i.e., last).
+ */
+ (void)HDatexit(H5TS_win32_process_exit);
+#endif /* H5_HAVE_THREADSAFE && H5_HAVE_WIN_THREADS */
+
+ /* Normal library termination code */
+ (void)HDatexit(H5_term_library);
H5_dont_atexit_g = TRUE;
} /* end if */
@@ -330,7 +340,7 @@ H5_term_library(void)
done:
#ifdef H5_HAVE_THREADSAFE
H5_API_UNLOCK
-#endif
+#endif /* H5_HAVE_THREADSAFE */
return;
} /* end H5_term_library() */
@@ -831,3 +841,60 @@ H5free_memory(void *mem)
FUNC_LEAVE_API(SUCCEED)
} /* end H5free_memory() */
+
+#ifdef H5_HAVE_WIN32_API
+/*-------------------------------------------------------------------------
+ * Function: DllMain
+ *
+ * Purpose: Handles various conditions in the library on Windows.
+ *
+ * NOTE: The main purpose of this is for handling Win32 thread cleanup
+ * on thread/process detach.
+ *
+ * Return: TRUE on success, FALSE on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+BOOL WINAPI
+DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
+{
+ /* Don't add our function enter/leave macros since this function will be
+ * called before the library is initialized.
+ *
+ * NOTE: Do NOT call any CRT functions in DllMain!
+ * This includes any functions that are called by from here!
+ */
+
+ BOOL fOkay = TRUE;
+
+ switch(fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ break;
+
+ case DLL_PROCESS_DETACH:
+ break;
+
+ case DLL_THREAD_ATTACH:
+#ifdef H5_HAVE_WIN_THREADS
+ if(H5TS_win32_thread_enter() < 0)
+ fOkay = FALSE;
+#endif /* H5_HAVE_WIN_THREADS */
+ break;
+
+ case DLL_THREAD_DETACH:
+#ifdef H5_HAVE_WIN_THREADS
+ if(H5TS_win32_thread_exit() < 0)
+ fOkay = FALSE;
+#endif /* H5_HAVE_WIN_THREADS */
+ break;
+
+ default:
+ /* Shouldn't get here */
+ fOkay = FALSE;
+ break;
+ }
+
+ return fOkay;
+}
+#endif /* H5_HAVE_WIN32_API */
diff --git a/src/H5A.c b/src/H5A.c
index edac156..20d39eb 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -184,6 +184,9 @@ H5A_term_interface(void)
if((n = H5I_nmembers(H5I_ATTR))>0) {
(void)H5I_clear_type(H5I_ATTR, FALSE, FALSE);
} else {
+ /* Close deprecated interface */
+ n += H5A__term_deprec_interface();
+
(void)H5I_dec_type_ref(H5I_ATTR);
H5_interface_initialize_g = 0;
n = 1;
@@ -1339,12 +1342,12 @@ H5Aget_create_plist(hid_t attr_id)
FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
- HDassert(H5P_LST_ATTRIBUTE_CREATE_g != -1);
+ HDassert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
/* Get attribute and default attribute creation property list*/
if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_g)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_ID_g)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL")
/* Create the property list object to return */
diff --git a/src/H5AC.c b/src/H5AC.c
index 1f3c8f5..7a5bf60 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -114,6 +114,7 @@ static hid_t H5AC_noblock_dxpl_id=(-1);
/* Dataset transfer property list for independent metadata I/O calls */
/* (just "library internal" set - i.e. independent transfer mode) */
/* (Global variable definition, declaration is in H5ACprivate.h also) */
+H5P_genplist_t *H5AC_ind_dxpl_g = NULL;
hid_t H5AC_ind_dxpl_id=(-1);
@@ -169,8 +170,7 @@ static herr_t H5AC_log_moved_entry(const H5F_t * f,
haddr_t old_addr,
haddr_t new_addr);
-static herr_t H5AC_log_inserted_entry(H5F_t * f,
- H5AC_t * cache_ptr,
+static herr_t H5AC_log_inserted_entry(H5AC_t * cache_ptr,
H5AC_info_t * entry_ptr);
static herr_t H5AC_propagate_and_apply_candidate_list(H5F_t * f,
@@ -260,30 +260,25 @@ static herr_t
H5AC_init_interface(void)
{
#ifdef H5_HAVE_PARALLEL
- H5P_genclass_t *xfer_pclass; /* Dataset transfer property list class object */
H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
unsigned block_before_meta_write; /* "block before meta write" property value */
unsigned coll_meta_write; /* "collective metadata write" property value */
- unsigned library_internal=1; /* "library internal" property value */
- H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
- herr_t ret_value=SUCCEED; /* Return value */
+ unsigned library_internal = 1; /* "library internal" property value */
+#endif /* H5_HAVE_PARALLEL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
+#ifdef H5_HAVE_PARALLEL
/* Sanity check */
- HDassert(H5P_CLS_DATASET_XFER_g!=(-1));
-
- /* Get the dataset transfer property list class object */
- if (NULL == (xfer_pclass = H5I_object(H5P_CLS_DATASET_XFER_g)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list class")
-
+ HDassert(H5P_CLS_DATASET_XFER_g != NULL);
/* Get an ID for the blocking, collective H5AC dxpl */
- if ((H5AC_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
+ if((H5AC_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if (NULL == (xfer_plist = H5I_object(H5AC_dxpl_id)))
+ if (NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(H5AC_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'block before metadata write' property */
@@ -305,11 +300,11 @@ H5AC_init_interface(void)
/* Get an ID for the non-blocking, collective H5AC dxpl */
- if ((H5AC_noblock_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
+ if((H5AC_noblock_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if (NULL == (xfer_plist = H5I_object(H5AC_noblock_dxpl_id)))
+ if (NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(H5AC_noblock_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'block before metadata write' property */
@@ -331,45 +326,45 @@ H5AC_init_interface(void)
/* Get an ID for the non-blocking, independent H5AC dxpl */
- if ((H5AC_ind_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
+ if((H5AC_ind_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if (NULL == (xfer_plist = H5I_object(H5AC_ind_dxpl_id)))
+ if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'block before metadata write' property */
block_before_meta_write=0;
- if(H5P_insert(xfer_plist,H5AC_BLOCK_BEFORE_META_WRITE_NAME,H5AC_BLOCK_BEFORE_META_WRITE_SIZE,&block_before_meta_write,
- NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ if(H5P_insert(H5AC_ind_dxpl_g, H5AC_BLOCK_BEFORE_META_WRITE_NAME, H5AC_BLOCK_BEFORE_META_WRITE_SIZE, &block_before_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
/* Insert 'library internal' property */
- if(H5P_insert(xfer_plist,H5AC_LIBRARY_INTERNAL_NAME,H5AC_LIBRARY_INTERNAL_SIZE,&library_internal,
- NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ if(H5P_insert(H5AC_ind_dxpl_g, H5AC_LIBRARY_INTERNAL_NAME, H5AC_LIBRARY_INTERNAL_SIZE, &library_internal,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
/* Insert 'collective metadata write' property */
coll_meta_write = 0;
- if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ if(H5P_insert(H5AC_ind_dxpl_g, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
#else /* H5_HAVE_PARALLEL */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
/* Sanity check */
- HDassert(H5P_LST_DATASET_XFER_g!=(-1));
+ HDassert(H5P_LST_DATASET_XFER_ID_g!=(-1));
H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT;
H5AC_noblock_dxpl_id = H5P_DATASET_XFER_DEFAULT;
H5AC_ind_dxpl_id = H5P_DATASET_XFER_DEFAULT;
- FUNC_LEAVE_NOAPI(SUCCEED)
+ /* Get the property list objects for the IDs */
+ if (NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list object")
#endif /* H5_HAVE_PARALLEL */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_init_interface() */
@@ -1024,7 +1019,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) {
/* Log the new entry */
- if(H5AC_log_inserted_entry(f, f->shared->cache, (H5AC_info_t *)thing) < 0)
+ if(H5AC_log_inserted_entry(f->shared->cache, (H5AC_info_t *)thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC_log_inserted_entry() failed")
/* Check if we should try to flush */
@@ -1655,7 +1650,6 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
hbool_t dirtied;
hbool_t deleted;
#ifdef H5_HAVE_PARALLEL
- hbool_t size_changed = FALSE;
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
#if H5AC__TRACE_FILE_ENABLED
@@ -1770,7 +1764,7 @@ H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
{
H5AC_aux_t * aux_ptr;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC));
@@ -1807,7 +1801,7 @@ H5AC_set_write_done_callback(H5C_t * cache_ptr,
{
H5AC_aux_t * aux_ptr;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC));
@@ -2655,7 +2649,6 @@ H5AC_broadcast_candidate_list(H5AC_t * cache_ptr,
int * num_entries_ptr,
haddr_t ** haddr_buf_ptr_ptr)
{
- herr_t result;
hbool_t success = FALSE;
H5AC_aux_t * aux_ptr = NULL;
haddr_t * haddr_buf_ptr = NULL;
@@ -2825,7 +2818,7 @@ H5AC_broadcast_clean_list(H5AC_t * cache_ptr)
*/
if ( aux_ptr->sync_point_done != NULL ) {
- addr_buf_ptr = H5MM_malloc((size_t)(num_entries * sizeof(haddr_t)));
+ addr_buf_ptr = H5MM_malloc((size_t)num_entries * sizeof(haddr_t));
if ( addr_buf_ptr == NULL ) {
@@ -2923,7 +2916,7 @@ done:
if(buf_ptr != NULL)
buf_ptr = (MPI_Offset *)H5MM_xfree((void *)buf_ptr);
if(addr_buf_ptr != NULL)
- addr_buf_ptr = (MPI_Offset *)H5MM_xfree((void *)addr_buf_ptr);
+ addr_buf_ptr = (haddr_t *)H5MM_xfree((void *)addr_buf_ptr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_broadcast_clean_list() */
@@ -3657,8 +3650,7 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_inserted_entry(H5F_t * f,
- H5AC_t * cache_ptr,
+H5AC_log_inserted_entry(H5AC_t * cache_ptr,
H5AC_info_t * entry_ptr)
{
H5AC_aux_t * aux_ptr;
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index 3060a70..ad768ef 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -70,8 +70,6 @@
#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t) \
(H5C__MAX_MAX_CACHE_SIZE / 4)
-#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
/****************************************************************************
*
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 5238b92..bee1b3e 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -34,6 +34,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5Cprivate.h" /* Cache */
#include "H5Fprivate.h" /* File access */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_METADATA_TRACE_FILE
#define H5AC__TRACE_FILE_ENABLED 1
@@ -227,6 +228,7 @@ extern hid_t H5AC_dxpl_id;
/* Dataset transfer property list for independent metadata I/O calls */
/* (just "library internal" set - i.e. independent transfer mode) */
/* (Global variable declaration, definition is in H5AC.c) */
+H5_DLLVAR H5P_genplist_t *H5AC_ind_dxpl_g;
H5_DLLVAR hid_t H5AC_ind_dxpl_id;
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 7202edf..10ee70b 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -105,6 +105,30 @@ H5A__init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5A_init())
} /* H5A__init_deprec_interface() */
+
+/*--------------------------------------------------------------------------
+NAME
+ H5A__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5A__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5A__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5A__term_deprec_interface() */
+
#ifndef H5_NO_DEPRECATED_SYMBOLS
/*--------------------------------------------------------------------------
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index c1d0c90..2f85b48 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -185,6 +185,7 @@ H5_DLLVAR const H5B2_class_t H5A_BT2_CORDER[1];
/* Function prototypes for H5A package scope */
H5_DLL herr_t H5A_init(void);
+H5_DLL herr_t H5A__term_deprec_interface(void);
H5_DLL hid_t H5A_create(const H5G_loc_t *loc, const char *name,
const H5T_t *type, const H5S_t *space, hid_t acpl_id, hid_t dxpl_id);
H5_DLL H5A_t * H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name,
diff --git a/src/H5C.c b/src/H5C.c
index a76dbc4..2664e56 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1248,8 +1248,8 @@ H5C_create(size_t max_cache_size,
(cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
(cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
- (cache_ptr->resize_ctl).flash_multiple = 1.0;
- (cache_ptr->resize_ctl).flash_threshold = 0.25;
+ (cache_ptr->resize_ctl).flash_multiple = 1.0f;
+ (cache_ptr->resize_ctl).flash_threshold = 0.25f;
(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
(cache_ptr->resize_ctl).upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
@@ -2347,7 +2347,7 @@ H5C_get_cache_hit_rate(H5C_t * cache_ptr,
} else {
- *hit_rate_ptr = 0.0;
+ *hit_rate_ptr = 0.0f;
}
done:
@@ -4241,8 +4241,8 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
break;
case H5C_incr__threshold:
- if ( ( config_ptr->lower_hr_threshold <= 0.0 ) ||
- ( config_ptr->increment <= 1.0 ) ||
+ if ( ( config_ptr->lower_hr_threshold <= (double)0.0f ) ||
+ ( config_ptr->increment <= (double)1.0f ) ||
( ( config_ptr->apply_max_increment ) &&
( config_ptr->max_increment <= 0 ) ) ) {
@@ -4266,8 +4266,8 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
break;
case H5C_decr__threshold:
- if ( ( config_ptr->upper_hr_threshold >= 1.0 ) ||
- ( config_ptr->decrement >= 1.0 ) ||
+ if ( ( config_ptr->upper_hr_threshold >= (double)1.0f ) ||
+ ( config_ptr->decrement >= (double)1.0f ) ||
( ( config_ptr->apply_max_decrement ) &&
( config_ptr->max_decrement <= 0 ) ) ) {
@@ -4277,7 +4277,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
case H5C_decr__age_out:
if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= 1.0 ) ) ||
+ ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
( ( config_ptr->apply_max_decrement ) &&
( config_ptr->max_decrement <= 0 ) ) ) {
@@ -4287,10 +4287,10 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
case H5C_decr__age_out_with_threshold:
if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= 1.0 ) ) ||
+ ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
( ( config_ptr->apply_max_decrement ) &&
( config_ptr->max_decrement <= 0 ) ) ||
- ( config_ptr->upper_hr_threshold >= 1.0 ) ) {
+ ( config_ptr->upper_hr_threshold >= (double)1.0f ) ) {
cache_ptr->size_decrease_possible = FALSE;
}
@@ -5807,8 +5807,8 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
"initial_size must be in the interval [min_size, max_size]");
}
- if ( ( config_ptr->min_clean_fraction < 0.0 ) ||
- ( config_ptr->min_clean_fraction > 1.0 ) ) {
+ if ( ( config_ptr->min_clean_fraction < (double)0.0f ) ||
+ ( config_ptr->min_clean_fraction > (double)1.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"min_clean_fraction must be in the interval [0.0, 1.0]");
@@ -5836,14 +5836,14 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->incr_mode == H5C_incr__threshold ) {
- if ( ( config_ptr->lower_hr_threshold < 0.0 ) ||
- ( config_ptr->lower_hr_threshold > 1.0 ) ) {
+ if ( ( config_ptr->lower_hr_threshold < (double)0.0f ) ||
+ ( config_ptr->lower_hr_threshold > (double)1.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"lower_hr_threshold must be in the range [0.0, 1.0]");
}
- if ( config_ptr->increment < 1.0 ) {
+ if ( config_ptr->increment < (double)1.0f ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"increment must be greater than or equal to 1.0");
@@ -5868,15 +5868,15 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
break;
case H5C_flash_incr__add_space:
- if ( ( config_ptr->flash_multiple < 0.1 ) ||
- ( config_ptr->flash_multiple > 10.0 ) ) {
+ if ( ( config_ptr->flash_multiple < (double)0.1f ) ||
+ ( config_ptr->flash_multiple > (double)10.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"flash_multiple must be in the range [0.1, 10.0]");
}
- if ( ( config_ptr->flash_threshold < 0.1 ) ||
- ( config_ptr->flash_threshold > 1.0 ) ) {
+ if ( ( config_ptr->flash_threshold < (double)0.1f ) ||
+ ( config_ptr->flash_threshold > (double)1.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"flash_threshold must be in the range [0.1, 1.0]");
@@ -5904,14 +5904,14 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->decr_mode == H5C_decr__threshold ) {
- if ( config_ptr->upper_hr_threshold > 1.0 ) {
+ if ( config_ptr->upper_hr_threshold > (double)1.0f ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"upper_hr_threshold must be <= 1.0");
}
- if ( ( config_ptr->decrement > 1.0 ) ||
- ( config_ptr->decrement < 0.0 ) ) {
+ if ( ( config_ptr->decrement > (double)1.0f ) ||
+ ( config_ptr->decrement < (double)0.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"decrement must be in the interval [0.0, 1.0]");
@@ -5946,8 +5946,8 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
}
if ( ( config_ptr->apply_empty_reserve ) &&
- ( ( config_ptr->empty_reserve > 1.0 ) ||
- ( config_ptr->empty_reserve < 0.0 ) ) ) {
+ ( ( config_ptr->empty_reserve > (double)1.0f ) ||
+ ( config_ptr->empty_reserve < (double)0.0f ) ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"empty_reserve must be in the interval [0.0, 1.0]");
@@ -5960,8 +5960,8 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold ) {
- if ( ( config_ptr->upper_hr_threshold > 1.0 ) ||
- ( config_ptr->upper_hr_threshold < 0.0 ) ) {
+ if ( ( config_ptr->upper_hr_threshold > (double)1.0f ) ||
+ ( config_ptr->upper_hr_threshold < (double)0.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"upper_hr_threshold must be in the interval [0.0, 1.0]");
@@ -6293,8 +6293,8 @@ H5C__auto_adjust_cache_size(H5F_t * f,
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->cache_accesses >=
(cache_ptr->resize_ctl).epoch_length );
- HDassert( 0.0 <= (cache_ptr->resize_ctl).min_clean_fraction );
- HDassert( (cache_ptr->resize_ctl).min_clean_fraction <= 100.0 );
+ HDassert( (double)0.0f <= (cache_ptr->resize_ctl).min_clean_fraction );
+ HDassert( (cache_ptr->resize_ctl).min_clean_fraction <= (double)100.0f );
if ( !cache_ptr->resize_enabled ) {
@@ -6309,7 +6309,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate.")
}
- HDassert( ( 0.0 <= hit_rate ) && ( hit_rate <= 1.0 ) );
+ HDassert( ( (double)0.0f <= hit_rate ) && ( hit_rate <= (double)1.0f ) );
switch ( (cache_ptr->resize_ctl).incr_mode )
{
diff --git a/src/H5CS.c b/src/H5CS.c
index 4ccd0f8..29182ce 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -83,12 +83,16 @@ H5CS_get_stack(void)
fstack = H5TS_get_thread_local_value(H5TS_funcstk_key_g);
if (!fstack) {
- /* no associated value with current thread - create one */
- fstack = (H5CS_t *)HDmalloc(sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
+ /* No associated value with current thread - create one */
+#ifdef H5_HAVE_WIN_THREADS
+ fstack = (H5CS_t *)LocalAlloc(LPTR, sizeof(H5CS_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
+#else
+ fstack = (H5CS_t *)HDmalloc(sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
+#endif /* H5_HAVE_WIN_THREADS */
HDassert(fstack);
/* Set the thread-specific info */
- fstack->nused=0;
+ fstack->nused=0;
/* (It's not necessary to release this in this API, it is
* released by the "key destructor" set up in the H5TS
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index b3aab86..e22c676 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -911,20 +911,20 @@ typedef struct H5C_cache_entry_t
#define H5C__MAX_EPOCH_MARKERS 10
-#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999
-#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9
+#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
+#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024))
#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5
-#define H5C__DEF_AR_INCREMENT 2.0
+#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
+#define H5C__DEF_AR_INCREMENT 2.0f
#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
-#define H5C__DEF_AR_FLASH_MULTIPLE 1.0
-#define H5C__DEV_AR_FLASH_THRESHOLD 0.25
-#define H5C__DEF_AR_DECREMENT 0.9
+#define H5C__DEF_AR_FLASH_MULTIPLE 1.0f
+#define H5C__DEV_AR_FLASH_THRESHOLD 0.25f
+#define H5C__DEF_AR_DECREMENT 0.9f
#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
#define H5C__DEF_AR_EPCHS_B4_EVICT 3
-#define H5C__DEF_AR_EMPTY_RESERVE 0.05
+#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
#define H5C__MIN_AR_EPOCH_LENGTH 100
#define H5C__DEF_AR_EPOCH_LENGTH 50000
#define H5C__MAX_AR_EPOCH_LENGTH 1000000
diff --git a/src/H5D.c b/src/H5D.c
index 0eff024..00ed040 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -94,6 +94,30 @@ H5D__init_pub_interface(void)
} /* H5D__init_pub_interface() */
+/*--------------------------------------------------------------------------
+NAME
+ H5D__term_pub_interface -- Terminate interface
+USAGE
+ herr_t H5D__term_pub_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5D__term_pub_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5D__term_pub_interface() */
+
+
/*-------------------------------------------------------------------------
* Function: H5Dcreate2
*
@@ -757,7 +781,7 @@ H5Dget_access_plist(hid_t dset_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Make a copy of the default dataset access property list */
- if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_g)))
+ if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if ((new_dapl_id = H5P_copy_plist(old_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy dataset access property list")
@@ -1031,7 +1055,6 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
H5S_t *mspace = NULL; /* Memory dataspace */
char bogus; /* bogus value to pass to H5Diterate() */
H5S_t *space; /* Dataspace for iteration */
- H5P_genclass_t *pclass; /* Property class */
H5P_genplist_t *plist; /* Property list */
herr_t ret_value; /* Return value */
@@ -1068,12 +1091,8 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
if(NULL == (vlen_bufsize.vl_tbuf = H5FL_BLK_MALLOC(vlen_vl_buf, (size_t)1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available")
- /* Get the pointer to the dataset transfer class */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object(H5P_CLS_DATASET_XFER_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
/* Change to the custom memory allocation routines for reading VL data */
- if((vlen_bufsize.xfer_pid = H5P_create_id(pclass, FALSE)) < 0)
+ if((vlen_bufsize.xfer_pid = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "no dataset xfer plists available")
/* Get the property list struct */
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index 1999550..04cf032 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -106,6 +106,30 @@ H5D__init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D__init_deprec_interface() */
+
+/*--------------------------------------------------------------------------
+NAME
+ H5D__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5D__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5D__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5D__term_deprec_interface() */
+
#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 7c1c0a8..2f8fe76 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -178,7 +178,7 @@ H5D__init_interface(void)
/* Get the default dataset creation property list values and initialize the
* default dataset with them.
*/
- if(NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_g)))
+ if(NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_ID_g)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get default dataset creation property list")
/* Get the default data storage layout */
@@ -253,6 +253,12 @@ H5D_term_interface(void)
*/
H5I_clear_type(H5I_DATASET, TRUE, FALSE);
} else {
+ /* Close public interface */
+ n += H5D__term_pub_interface();
+
+ /* Close deprecated interface */
+ n += H5D__term_deprec_interface();
+
H5I_dec_type_ref(H5I_DATASET);
H5_interface_initialize_g = 0;
n = 1; /*H5I*/
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 2687c5f..ab611aa 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -129,7 +129,6 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
H5D_t *dset = NULL;
const H5S_t *mem_space = NULL;
const H5S_t *file_space = NULL;
- char fake_char;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -168,15 +167,6 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
else
if(TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
- if(!buf && (NULL == file_space || H5S_GET_SELECT_NPOINTS(file_space) != 0))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
-
- /* If the buffer is nil, and 0 element is selected, make a fake buffer.
- * This is for some MPI package like ChaMPIon on NCSA's tungsten which
- * doesn't support this feature.
- */
- if(!buf)
- buf = &fake_char;
/* read raw data */
if(H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0)
@@ -331,7 +321,6 @@ H5D__pre_write(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
else { /* Normal write */
const H5S_t *mem_space = NULL;
const H5S_t *file_space = NULL;
- char fake_char;
if(mem_space_id < 0 || file_space_id < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
@@ -353,20 +342,10 @@ H5D__pre_write(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "file selection+offset not within extent")
} /* end if */
- if(!buf && (NULL == file_space || H5S_GET_SELECT_NPOINTS(file_space) != 0))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
-
- /* If the buffer is nil, and 0 element is selected, make a fake buffer.
- * This is for some MPI package like ChaMPIon on NCSA's tungsten which
- * doesn't support this feature.
- */
- if(!buf)
- buf = &fake_char;
-
/* write raw data */
if(H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
- }
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -416,6 +395,7 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ char fake_char; /* Temporary variable for NULL buffer pointers */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL)
@@ -451,6 +431,19 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes")
+ /* Check for a NULL buffer, after the H5S_ALL dataspace selection has been handled */
+ if(NULL == buf) {
+ /* Check for any elements selected (which is invalid) */
+ if(nelmts > 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
+
+ /* If the buffer is nil, and 0 element is selected, make a fake buffer.
+ * This is for some MPI package like ChaMPIon on NCSA's tungsten which
+ * doesn't support this feature.
+ */
+ buf = &fake_char;
+ } /* end if */
+
/* Make sure that both selections have their extents set */
if(!(H5S_has_extent(file_space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set")
@@ -618,6 +611,7 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ char fake_char; /* Temporary variable for NULL buffer pointers */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL)
@@ -683,6 +677,33 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
if(!mem_space)
mem_space = file_space;
+ if((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection")
+ H5_ASSIGN_OVERFLOW(nelmts, snelmts, hssize_t, hsize_t);
+
+ /* Make certain that the number of elements in each selection is the same */
+ if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes")
+
+ /* Check for a NULL buffer, after the H5S_ALL dataspace selection has been handled */
+ if(NULL == buf) {
+ /* Check for any elements selected (which is invalid) */
+ if(nelmts > 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
+
+ /* If the buffer is nil, and 0 element is selected, make a fake buffer.
+ * This is for some MPI package like ChaMPIon on NCSA's tungsten which
+ * doesn't support this feature.
+ */
+ buf = &fake_char;
+ } /* end if */
+
+ /* Make sure that both selections have their extents set */
+ if(!(H5S_has_extent(file_space)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set")
+ if(!(H5S_has_extent(mem_space)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set")
+
/* H5S_select_shape_same() has been modified to accept topologically
* identical selections with different rank as having the same shape
* (if the most rapidly changing coordinates match up), but the I/O
@@ -713,20 +734,6 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
buf = adj_buf;
} /* end if */
- if((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection")
- H5_ASSIGN_OVERFLOW(nelmts, snelmts, hssize_t, hsize_t);
-
- /* Make certain that the number of elements in each selection is the same */
- if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes")
-
- /* Make sure that both selections have their extents set */
- if(!(H5S_has_extent(file_space)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set")
- if(!(H5S_has_extent(mem_space)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set")
-
/* Retrieve dataset properties */
/* <none needed currently> */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 1da0834..0bb1def 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -585,6 +585,8 @@ H5_DLLVAR const H5B2_class_t H5D_BT2_FILT[1];
/* Package Private Prototypes */
/******************************/
+H5_DLL herr_t H5D__term_pub_interface(void);
+H5_DLL herr_t H5D__term_deprec_interface(void);
H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space,
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id);
H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name,
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index 44af139..9a5ccc4 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -30,9 +30,9 @@
/*****************/
/* Macros used to "unset" chunk cache configuration parameters */
-#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t) -1)
+#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t) -1)
#define H5D_CHUNK_CACHE_NBYTES_DEFAULT ((size_t) -1)
-#define H5D_CHUNK_CACHE_W0_DEFAULT -1.
+#define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0f)
/* Bit flags for the H5Pset_chunk_opts() and H5Pget_chunk_opts() */
#define H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS (0x0002u)
diff --git a/src/H5E.c b/src/H5E.c
index 3fc158c..177ec55 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -322,6 +322,9 @@ H5E_term_interface(void)
} /* end if */
} /* end if */
else {
+ /* Close deprecated interface */
+ n += H5E__term_deprec_interface();
+
/* Destroy the error class, message, and stack id groups */
H5I_dec_type_ref(H5I_ERROR_STACK);
H5I_dec_type_ref(H5I_ERROR_CLASS);
@@ -363,8 +366,12 @@ H5E_get_stack(void)
estack = (H5E_t *)H5TS_get_thread_local_value(H5TS_errstk_key_g);
if(!estack) {
- /* no associated value with current thread - create one */
+ /* No associated value with current thread - create one */
+#ifdef H5_HAVE_WIN_THREADS
+ estack = (H5E_t *)LocalAlloc(LPTR, sizeof(H5E_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
+#else
estack = (H5E_t *)H5FL_MALLOC(H5E_t);
+#endif /* H5_HAVE_WIN_THREADS */
HDassert(estack);
/* Set the thread-specific info */
diff --git a/src/H5EA.c b/src/H5EA.c
index 1fa6901..3fae72d 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -48,7 +48,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 0d3083b..3e9444b 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -34,7 +34,7 @@
#define H5E_PACKAGE /*suppress error about including H5Epkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5E_init_deprec_interface
+#define H5_INTERFACE_INIT_FUNC H5E__init_deprec_interface
/***********/
@@ -82,13 +82,12 @@
/*******************/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
/*--------------------------------------------------------------------------
NAME
- H5E_init_deprec_interface -- Initialize interface-specific information
+ H5E__init_deprec_interface -- Initialize interface-specific information
USAGE
- herr_t H5E_init_deprec_interface()
+ herr_t H5E__init_deprec_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -97,13 +96,38 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5E_init_deprec_interface(void)
+H5E__init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5E_init())
-} /* H5E_init_deprec_interface() */
+} /* H5E__init_deprec_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5E__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5E__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5E__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ FUNC_LEAVE_NOAPI(0)
+} /* H5E__term_deprec_interface() */
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: H5Eget_major
diff --git a/src/H5Epkg.h b/src/H5Epkg.h
index 9a1163a..bfaaf9d 100644
--- a/src/H5Epkg.h
+++ b/src/H5Epkg.h
@@ -132,6 +132,7 @@ H5_DLLVAR H5E_t H5E_stack_g[1];
/******************************/
/* Package Private Prototypes */
/******************************/
+H5_DLL herr_t H5E__term_deprec_interface(void);
#ifdef H5_HAVE_THREADSAFE
H5_DLL H5E_t *H5E_get_stack(void);
#endif /* H5_HAVE_THREADSAFE */
@@ -146,5 +147,5 @@ H5_DLL herr_t H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op,
void *client_data);
H5_DLL herr_t H5E_pop(H5E_t *err_stack, size_t count);
-#endif /* _H5HFpkg_H */
+#endif /* _H5Epkg_H */
diff --git a/src/H5F.c b/src/H5F.c
index 23cb560..66ffae6 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -204,6 +204,9 @@ H5F_term_interface(void)
/* Make certain we've cleaned up all the shared file objects */
H5F_sfile_assert_num(0);
+ /* Close deprecated interface */
+ n += H5F__term_deprec_interface();
+
H5I_dec_type_ref(H5I_FILE);
H5_interface_initialize_g = 0;
n = 1; /*H5I*/
@@ -335,7 +338,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
HDassert(f);
/* Make a copy of the default file access property list */
- if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_g)))
+ if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list")
@@ -847,7 +850,7 @@ H5Fis_hdf5(const char *name)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
/* The file is an hdf5 file if the hdf5 file signature can be found */
- if(H5F_locate_signature(file, H5AC_ind_dxpl_id, &sig_addr) < 0)
+ if(H5FD_locate_signature(file, H5AC_ind_dxpl_g, &sig_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
ret_value = (HADDR_UNDEF != sig_addr);
@@ -1066,6 +1069,8 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
HDassert(f->shared);
if(1 == f->shared->nrefs) {
+ H5F_io_info_t fio_info; /* I/O info for operation */
+
/* Flush at this point since the file will be closed.
* Only try to flush the file if it was opened with write access, and if
* the caller requested a flush.
@@ -1135,8 +1140,13 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
f->shared->root_grp = NULL;
} /* end if */
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Destroy other components of the file */
- if(H5F_accum_reset(f, dxpl_id, TRUE) < 0)
+ if(H5F__accum_reset(&fio_info, TRUE) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
if(H5FO_dest(f) < 0)
@@ -1759,6 +1769,7 @@ done:
herr_t
H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
{
+ H5F_io_info_t fio_info; /* I/O info for operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1786,8 +1797,13 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
/* Push error, but keep going*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Flush out the metadata accumulator */
- if(H5F_accum_flush(f, dxpl_id) < 0)
+ if(H5F__accum_flush(&fio_info) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator")
@@ -2785,7 +2801,7 @@ H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
/* read in the file image */
/* (Note compensation for base address addition in internal routine) */
- if(H5FD_read(fd_ptr, H5AC_ind_dxpl_id, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
+ if(H5FD_read(fd_ptr, H5AC_ind_dxpl_g, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed")
} /* end if */
diff --git a/src/H5FD.c b/src/H5FD.c
index e672a74..be7f307 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1652,15 +1652,14 @@ done:
* Programmer: Robb Matzke
* Thursday, July 29, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *buf/*out*/)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiazx", file, type, dxpl_id, addr, size, buf);
@@ -1678,9 +1677,13 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size
if(!buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null result buffer")
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Do the real work */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_read(file, dxpl_id, type, addr - file->base_addr, size, buf) < 0)
+ if(H5FD_read(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed")
done:
@@ -1703,15 +1706,14 @@ done:
* Programmer: Robb Matzke
* Thursday, July 29, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *buf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiaz*x", file, type, dxpl_id, addr, size, buf);
@@ -1728,9 +1730,13 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
if(!buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null buffer")
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* The real work */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_write(file, dxpl_id, type, addr - file->base_addr, size, buf) < 0)
+ if(H5FD_write(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed")
done:
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 559af82..d3be663 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -25,19 +25,26 @@
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5FD_core_init_interface
-
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
#include "H5FDcore.h" /* Core file driver */
+#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_CORE_g = 0;
+/* The skip list node type. Represents a region in the file. */
+typedef struct H5FD_core_region_t {
+ haddr_t start; /* Start address of the region */
+ haddr_t end; /* End address of the region */
+} H5FD_core_region_t;
+
/* The description of a file belonging to this driver. The 'eoa' and 'eof'
* determine the amount of hdf5 address space in use and the high-water mark
* of the file (the current size of the underlying memory).
@@ -50,6 +57,7 @@ typedef struct H5FD_core_t {
haddr_t eof; /* current allocated size */
size_t increment; /* multiples for mem allocation */
hbool_t backing_store; /* write to file name on flush */
+ size_t bstore_page_size; /* backing store page size */
int fd; /* backing store file descriptor */
/* Information for determining uniqueness of a file with a backing store */
#ifndef H5_HAVE_WIN32_API
@@ -88,6 +96,7 @@ typedef struct H5FD_core_t {
/* Information from file open flags, for SWMR access */
hbool_t swmr_read; /* Whether the file is open for SWMR read access */
+ H5SL_t *dirty_list; /* dirty parts of the file */
} H5FD_core_t;
/* Driver-specific file access properties */
@@ -99,6 +108,9 @@ typedef struct H5FD_core_fapl_t {
/* Allocate memory in multiples of this size by default */
#define H5FD_CORE_INCREMENT 8192
+/* Define the block size for aggregation */
+//#define H5FD_CORE_BLOCK_SIZE 524288 /* 512 K */
+
/* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
*
@@ -120,6 +132,9 @@ typedef struct H5FD_core_fapl_t {
(size_t)((A)+(Z))<(size_t)(A))
/* Prototypes */
+static herr_t H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end);
+static herr_t H5FD_core_destroy_dirty_list(H5FD_core_t *file);
+static herr_t H5FD_core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size);
static herr_t H5FD_core_term(void);
static void *H5FD_core_fapl_get(H5FD_t *_file);
static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
@@ -173,6 +188,256 @@ static const H5FD_class_t H5FD_core_g = {
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
+/* Define a free list to manage the region type */
+H5FL_DEFINE(H5FD_core_region_t);
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_core_add_dirty_region
+ *
+ * Purpose: Add a new dirty region to the list for later flushing
+ * to the backing store.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
+{
+ H5FD_core_region_t *b_item = NULL;
+ H5FD_core_region_t *a_item = NULL;
+ H5FD_core_region_t *item = NULL;
+ haddr_t b_addr = 0;
+ haddr_t a_addr = 0;
+ hbool_t create_new_node = TRUE;
+ herr_t ret_value = SUCCEED;
+#ifdef DER
+ hbool_t was_adjusted = FALSE;
+#endif
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(file);
+ HDassert(file->dirty_list);
+ HDassert(start <= end);
+
+#ifdef DER
+fprintf(stderr, "Add region: (%llu, %llu)\n", start, end);
+#endif
+
+// /* Adjust the dirty region to the nearest block boundaries */
+// if(start % H5FD_CORE_BLOCK_SIZE != 0) {
+// start = (start / H5FD_CORE_BLOCK_SIZE) * H5FD_CORE_BLOCK_SIZE;
+ /* Adjust the dirty region to the nearest block boundaries */
+ if(start % file->bstore_page_size != 0) {
+ start = (start / file->bstore_page_size) * file->bstore_page_size;
+#ifdef DER
+ was_adjusted = TRUE;
+#endif
+ }
+// if(end % H5FD_CORE_BLOCK_SIZE != (H5FD_CORE_BLOCK_SIZE - 1)) {
+// end = (((end / H5FD_CORE_BLOCK_SIZE) + 1) * H5FD_CORE_BLOCK_SIZE) - 1;
+ if(end % file->bstore_page_size != (file->bstore_page_size - 1)) {
+ end = (((end / file->bstore_page_size) + 1) * file->bstore_page_size) - 1;
+ if(end > file->eof){
+#ifdef DER
+fprintf(stderr, "Adjusted to EOF\n");
+#endif
+ end = file->eof - 1;
+ }
+#ifdef DER
+ was_adjusted = TRUE;
+#endif
+ }
+
+#ifdef DER
+if(was_adjusted)
+ fprintf(stderr, "Adjusted region: (%llu, %llu)\n", start, end);
+#endif
+
+ /* Get the regions before and after the intended insertion point */
+ b_addr = start +1;
+ a_addr = end + 2;
+ b_item = (H5FD_core_region_t *)H5SL_less(file->dirty_list, &b_addr);
+ a_item = (H5FD_core_region_t *)H5SL_less(file->dirty_list, &a_addr);
+
+ /* Check to see if we need to extend the upper end of the NEW region */
+ if(a_item) {
+ if(start < a_item->start && end < a_item->end) {
+
+ /* Extend the end of the NEW region to match the existing AFTER region */
+ end = a_item->end;
+ }
+ }
+ /* Attempt to extend the PREV region */
+ if(b_item) {
+ if(start <= b_item->end + 1) {
+
+ /* Need to set this for the delete algorithm */
+ start = b_item->start;
+
+ /* We won't need to insert a new node since we can
+ * just update an existing one instead.
+ */
+ create_new_node = FALSE;
+ }
+ }
+
+ /* Remove any old nodes that are no longer needed */
+ while(a_item && a_item->start > start) {
+
+ H5FD_core_region_t *less;
+ haddr_t key = a_item->start - 1;
+
+ /* Save the previous node before we trash this one */
+ less = (H5FD_core_region_t *)H5SL_less(file->dirty_list, &key);
+
+ /* Delete this node */
+ a_item = (H5FD_core_region_t *)H5SL_remove(file->dirty_list, &a_item->start);
+ a_item = H5FL_FREE(H5FD_core_region_t, a_item);
+
+ /* Set up to check the next node */
+ if(less)
+ a_item = less;
+ }
+
+ /* Insert the new node */
+ if(create_new_node) {
+ if(NULL == (item = (H5FD_core_region_t *)H5SL_search(file->dirty_list, &start))) {
+ /* Ok to insert. No pre-existing node with that key. */
+ item = (H5FD_core_region_t *)H5FL_CALLOC(H5FD_core_region_t);
+ item->start = start;
+ item->end = end;
+ if(H5SL_insert(file->dirty_list, item, &item->start) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't insert new dirty region: (%llu, %llu)\n", start, end)
+ }
+ else {
+ /* Store the new item endpoint if it's bigger */
+ item->end = (item->end < end) ? end : item->end;
+ }
+ }
+ else {
+ /* Update the size of the before region */
+ if(b_item->end < end)
+ b_item->end = end;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_core_add_dirty_region() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_core_destroy_dirty_list
+ *
+ * Purpose: Completely destroy the dirty list.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_core_destroy_dirty_list(H5FD_core_t *file)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(file);
+
+ /* Destroy the list, including any remaining list elements */
+ if(file->dirty_list) {
+ H5FD_core_region_t *region = NULL;
+
+#ifdef DER
+{
+size_t count = H5SL_count(file->dirty_list);
+if(count != 0)
+ fprintf(stderr, "LIST NOT EMPTY AT DESTROY\n");
+}
+#endif
+ while(NULL != (region = (H5FD_core_region_t *)H5SL_remove_first(file->dirty_list)))
+ region = H5FL_FREE(H5FD_core_region_t, region);
+
+ if(H5SL_close(file->dirty_list) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CLOSEERROR, FAIL, "can't close core vfd dirty list")
+ file->dirty_list = NULL;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_core_destroy_dirty_list() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_core_write_to_bstore
+ *
+ * Purpose: Write data to the backing store.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t H5FD_core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
+{
+ unsigned char *ptr = file->mem + addr; /* mutable pointer into the
+ * buffer (can't change mem)
+ */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(file);
+
+ /* Write to backing store */
+ if((off_t)addr != HDlseek(file->fd, (off_t)addr, SEEK_SET))
+ HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store")
+
+ while (size > 0) {
+
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
+
+ /* Trying to write more bytes than the return type can handle is
+ * undefined behavior in POSIX.
+ */
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
+ else
+ bytes_in = (h5_posix_io_t)size;
+
+#ifdef DER
+fprintf(stderr, "\nNEW\n");
+#endif
+ do {
+ bytes_wrote = HDwrite(file->fd, ptr, bytes_in);
+#ifdef DER
+fprintf(stderr, "bytes wrote: %lu\n", bytes_wrote);
+#endif
+ } while(-1 == bytes_wrote && EINTR == errno);
+
+ if(-1 == bytes_wrote) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
+ HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write to backing store failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', ptr = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), ptr, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
+ } /* end if */
+
+ HDassert(bytes_wrote > 0);
+ HDassert((size_t)bytes_wrote <= size);
+
+ size -= (size_t)bytes_wrote;
+ ptr = (unsigned char *)ptr + bytes_wrote;
+
+ } /* end while */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+
+} /* end H5FD_core_write_to_bstore() */
+
/*-------------------------------------------------------------------------
* Function: H5FD_core_init_interface
@@ -569,6 +834,40 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
} /* end if */
} /* end if */
+ /* Set up write tracking if the backing store is on */
+ file->dirty_list = NULL;
+ if(fa->backing_store) {
+ hbool_t write_tracking_flag = FALSE; /* what the user asked for */
+ hbool_t use_write_tracking = FALSE; /* what we're actually doing */
+
+ /* Get the write tracking flag */
+ if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, &write_tracking_flag) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get core VFD write tracking flag");
+
+ /* Get the page size */
+ if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, &(file->bstore_page_size)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get core VFD write tracking page size");
+
+ /* default is to have write tracking OFF for create (hence the check to see
+ * if the user explicitly set a page size) and ON with the default page size
+ * on open (when not read-only).
+ */
+ /* Only use write tracking if the file is open for writing */
+ use_write_tracking =
+ TRUE == write_tracking_flag /* user asked for write tracking */
+ && !(o_flags & O_RDONLY) /* file is open for writing (i.e. not read-only) */
+ && file->bstore_page_size != 0; /* page size is not zero */
+
+ /* initialize the dirty list */
+ if(use_write_tracking) {
+ if(NULL == (file->dirty_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, NULL, "can't create core vfd dirty region list");
+#ifdef DER
+fprintf(stderr, "\n");
+#endif
+ } /* end if */
+ } /* end if */
+
/* Check for SWMR reader access */
if(flags & H5F_ACC_SWMR_READ)
file->swmr_read = TRUE;
@@ -611,7 +910,12 @@ H5FD_core_close(H5FD_t *_file)
/* Flush any changed buffers */
if(H5FD_core_flush(_file, (hid_t)-1, TRUE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush core vfd backing store")
+
+ /* Destroy the dirty region list */
+ if(file->dirty_list)
+ if(H5FD_core_destroy_dirty_list(file) != SUCCEED)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free core vfd dirty region list")
/* Release resources */
if(file->fd >= 0)
@@ -1038,6 +1342,14 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
file->eof = new_eof;
} /* end if */
+ /* Add the buffer region to the dirty list if using that optimization */
+ if(file->dirty_list) {
+ haddr_t start = addr;
+ haddr_t end = addr + (haddr_t)size - 1;
+ if(H5FD_core_add_dirty_region(file, start, end) != SUCCEED)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINSERT, FAIL, "unable to add core VFD dirty region during write call - addresses: start=%llu end=%llu", start, end)
+ }
+
/* Write from BUF to memory */
HDmemcpy(file->mem + addr, buf, size);
@@ -1072,45 +1384,51 @@ H5FD_core_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
/* Write to backing store */
if (file->dirty && file->fd >= 0 && file->backing_store) {
- haddr_t size = file->eof;
- unsigned char *ptr = file->mem;
- if(0 != HDlseek(file->fd, (off_t)0, SEEK_SET))
- HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store")
-
- while (size > 0) {
+ /* Use the dirty list, if available */
+ if(file->dirty_list) {
+ H5FD_core_region_t *item = NULL;
+ size_t size;
- h5_posix_io_t bytes_in = 0; /* # of bytes to write */
- h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
+#ifdef DER
+ fprintf(stderr, "FLUSHING. DIRTY LIST:\n");
+#endif
+ while(NULL != (item = (H5FD_core_region_t *)H5SL_remove_first(file->dirty_list))) {
- /* Trying to write more bytes than the return type can handle is
- * undefined behavior in POSIX.
- */
- if(size > H5_POSIX_MAX_IO_BYTES)
- bytes_in = H5_POSIX_MAX_IO_BYTES;
- else
- bytes_in = (h5_posix_io_t)size;
-
- do {
- bytes_wrote = HDwrite(file->fd, ptr, bytes_in);
- } while(-1 == bytes_wrote && EINTR == errno);
-
- if(-1 == bytes_wrote) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
- HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
-
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write to backing store failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', ptr = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), ptr, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
- } /* end if */
-
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ /* The file may have been truncated, so check for that
+ * and skip or adjust as necessary.
+ */
+ if(item->start < file->eof) {
+ if(item->end >= file->eof)
+ item->end = file->eof - 1;
+
+
+ size = (size_t)((item->end - item->start) + 1);
+#ifdef DER
+fprintf(stderr, "(%llu, %llu : %lu)\n", item->start, item->end, size);
+#endif
+ if(H5FD_core_write_to_bstore(file, item->start, size) != SUCCEED)
+ HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store")
+ } /* end if */
+
+ item = H5FL_FREE(H5FD_core_region_t, item);
+ } /* end while */
+
+#ifdef DER
+fprintf(stderr, "EOF: %llu\n", file->eof);
+fprintf(stderr, "EOA: %llu\n", file->eoa);
+if(file->eoa > file->eof)
+ fprintf(stderr, "*** EOA BADNESS ***\n");
+fprintf(stderr, "\n");
+#endif
+ }
+ /* Otherwise, write the entire file out at once */
+ else {
+ if(H5FD_core_write_to_bstore(file, (haddr_t)0, (size_t)file->eof) != SUCCEED)
+ HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store")
- size -= (size_t)bytes_wrote;
- ptr = (unsigned char *)ptr + bytes_wrote;
-
} /* end while */
-
+
file->dirty = FALSE;
}
@@ -1234,6 +1552,10 @@ H5FD_core_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t closing)
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 */
+
+#ifdef DER
+fprintf(stderr, "OLD: Truncated to: %llu\n", file->eoa);
+#endif
} /* end if */
/* Update the eof value */
@@ -1244,3 +1566,4 @@ H5FD_core_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_truncate() */
+
diff --git a/src/H5FDint.c b/src/H5FDint.c
index c9e9a67..9f02a25 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -42,7 +42,6 @@
#include "H5Fprivate.h" /* File access */
#include "H5FDpkg.h" /* File Drivers */
#include "H5Iprivate.h" /* IDs */
-#include "H5Pprivate.h" /* Property lists */
/****************/
@@ -104,6 +103,70 @@ H5FD_int_init_interface(void)
/*-------------------------------------------------------------------------
+ * Function: H5FD_locate_signature
+ *
+ * Purpose: Finds the HDF5 superblock signature in a file. The
+ * signature can appear at address 0, or any power of two
+ * beginning with 512.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 7, 1997
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr)
+{
+ haddr_t addr, eoa;
+ uint8_t buf[H5F_SIGNATURE_LEN];
+ unsigned n, maxpow;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Find the least N such that 2^N is larger than the file size */
+ if(HADDR_UNDEF == (addr = H5FD_get_eof(file)) || HADDR_UNDEF == (eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER)))
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to obtain EOF/EOA value")
+ for(maxpow = 0; addr; maxpow++)
+ addr >>= 1;
+ maxpow = MAX(maxpow, 9);
+
+ /*
+ * Search for the file signature at format address zero followed by
+ * powers of two larger than 9.
+ */
+ for(n = 8; n < maxpow; n++) {
+ addr = (8 == n) ? 0 : (haddr_t)1 << n;
+ if(H5FD_set_eoa(file, H5FD_MEM_SUPER, addr + H5F_SIGNATURE_LEN) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
+ if(H5FD_read(file, dxpl, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
+ if(!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
+ break;
+ } /* end for */
+
+ /*
+ * If the signature was not found then reset the EOA value and return
+ * HADDR_UNDEF.
+ */
+ if(n >= maxpow) {
+ if(H5FD_set_eoa(file, H5FD_MEM_SUPER, eoa) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to reset EOA value")
+ *sig_addr = HADDR_UNDEF;
+ } /* end if */
+ else
+ /* Set return value */
+ *sig_addr = addr;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_locate_signature() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5FD_read
*
* Purpose: Private version of H5FDread()
@@ -117,7 +180,7 @@ H5FD_int_init_interface(void)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
+H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
size_t size, void *buf/*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -125,8 +188,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
- HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
- HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
+ HDassert(TRUE == H5P_class_isa(H5P_CLASS(dxpl), H5P_CLS_DATASET_XFER_g));
HDassert(buf);
#ifndef H5_HAVE_PARALLEL
@@ -138,7 +200,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
#endif /* H5_HAVE_PARALLEL */
/* Dispatch to driver */
- if((file->cls->read)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0)
+ if((file->cls->read)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed")
done:
@@ -160,7 +222,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
+H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
size_t size, const void *buf)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -168,8 +230,7 @@ H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
- HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
- HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
+ HDassert(TRUE == H5P_class_isa(H5P_CLASS(dxpl), H5P_CLS_DATASET_XFER_g));
HDassert(buf);
#ifndef H5_HAVE_PARALLEL
@@ -181,7 +242,7 @@ H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
#endif /* H5_HAVE_PARALLEL */
/* Dispatch to driver */
- if((file->cls->write)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0)
+ if((file->cls->write)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed")
done:
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 6e4df22..33332d7 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -24,6 +24,7 @@
#include "H5FDpublic.h"
/* Private headers needed by this file */
+#include "H5Pprivate.h" /* Property lists */
/*
* The MPI drivers are needed because there are
@@ -108,6 +109,7 @@ struct H5P_genplist_t;
struct H5F_t;
H5_DLL int H5FD_term_interface(void);
+H5_DLL herr_t H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr);
H5_DLL H5FD_class_t *H5FD_get_class(hid_t id);
H5_DLL hsize_t H5FD_sb_size(H5FD_t *file);
H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf);
@@ -132,9 +134,9 @@ H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file);
H5_DLL haddr_t H5FD_get_maxaddr(const H5FD_t *file);
H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags);
H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
-H5_DLL herr_t H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
haddr_t addr, size_t size, void *buf/*out*/);
-H5_DLL herr_t H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5FD_flush(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
H5_DLL herr_t H5FD_truncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 6f0e897..f84bef5 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -40,7 +40,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
@@ -94,7 +94,7 @@ H5FL_BLK_DEFINE_STATIC(meta_accum);
/*-------------------------------------------------------------------------
- * Function: H5F_accum_read
+ * Function: H5F__accum_read
*
* Purpose: Attempts to read some data from the metadata accumulator for
* a file into a buffer.
@@ -112,106 +112,111 @@ H5FL_BLK_DEFINE_STATIC(meta_accum);
*-------------------------------------------------------------------------
*/
herr_t
-H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
+H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
size_t size, void *buf/*out*/)
{
H5FD_mem_t map_type; /* Mapped memory type */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ HDassert(fio_info);
+ HDassert(fio_info->f);
+ HDassert(fio_info->dxpl);
HDassert(buf);
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
/* Check if this information is in the metadata accumulator */
- if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
+
+ /* Set up alias for file's metadata accumulator info */
+ accum = &fio_info->f->shared->accum;
+
if(size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
- HDassert(!f->shared->accum.buf || (f->shared->accum.alloc_size >= f->shared->accum.size));
+ HDassert(!accum->buf || (accum->alloc_size >= accum->size));
/* Current read adjoins or overlaps with metadata accumulator */
- if(H5F_addr_overlap(addr, size, f->shared->accum.loc, f->shared->accum.size)
- || ((addr + size) == f->shared->accum.loc)
- || (f->shared->accum.loc + f->shared->accum.size) == addr) {
+ if(H5F_addr_overlap(addr, size, accum->loc, accum->size)
+ || ((addr + size) == accum->loc)
+ || (accum->loc + accum->size) == addr) {
size_t amount_before; /* Amount to read before current accumulator */
haddr_t new_addr; /* New address of the accumulator buffer */
size_t new_size; /* New size of the accumulator buffer */
/* Compute new values for accumulator */
- new_addr = MIN(addr, f->shared->accum.loc);
- new_size = (size_t)(MAX((addr + size), (f->shared->accum.loc + f->shared->accum.size))
- - new_addr);
+ new_addr = MIN(addr, accum->loc);
+ new_size = (size_t)(MAX((addr + size), (accum->loc + accum->size)) - new_addr);
/* Check if we need more buffer space */
- if(new_size > f->shared->accum.alloc_size) {
+ if(new_size > accum->alloc_size) {
size_t new_alloc_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_alloc_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(new_size - 1)));
/* Reallocate the metadata accumulator buffer */
- if(NULL == (f->shared->accum.buf = H5FL_BLK_REALLOC(meta_accum, f->shared->accum.buf, new_alloc_size)))
+ if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
- f->shared->accum.alloc_size = new_alloc_size;
+ accum->alloc_size = new_alloc_size;
#ifdef H5_CLEAR_MEMORY
- HDmemset(f->shared->accum.buf + f->shared->accum.size, 0, (f->shared->accum.alloc_size - f->shared->accum.size));
+ HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
#endif /* H5_CLEAR_MEMORY */
} /* end if */
/* Read the part before the metadata accumulator */
- if(addr < f->shared->accum.loc) {
+ if(addr < accum->loc) {
/* Set the amount to read */
- H5_ASSIGN_OVERFLOW(amount_before, (f->shared->accum.loc - addr), hsize_t, size_t);
+ H5_ASSIGN_OVERFLOW(amount_before, (accum->loc - addr), hsize_t, size_t);
/* Make room for the metadata to read in */
- HDmemmove(f->shared->accum.buf + amount_before, f->shared->accum.buf, f->shared->accum.size);
+ HDmemmove(accum->buf + amount_before, accum->buf, accum->size);
/* Adjust dirty region tracking info, if present */
- if(f->shared->accum.dirty)
- f->shared->accum.dirty_off += amount_before;
+ if(accum->dirty)
+ accum->dirty_off += amount_before;
/* Dispatch to driver */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, amount_before, f->shared->accum.buf) < 0)
+ if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, amount_before, accum->buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end if */
else
amount_before = 0;
/* Read the part after the metadata accumulator */
- if((addr + size) > (f->shared->accum.loc + f->shared->accum.size)) {
+ if((addr + size) > (accum->loc + accum->size)) {
size_t amount_after; /* Amount to read at a time */
/* Set the amount to read */
- H5_ASSIGN_OVERFLOW(amount_after, ((addr + size) - (f->shared->accum.loc + f->shared->accum.size)), hsize_t, size_t);
+ H5_ASSIGN_OVERFLOW(amount_after, ((addr + size) - (accum->loc + accum->size)), hsize_t, size_t);
/* Dispatch to driver */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, (f->shared->accum.loc + f->shared->accum.size), amount_after, (f->shared->accum.buf + f->shared->accum.size + amount_before)) < 0)
+ if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, (accum->loc + accum->size), amount_after, (accum->buf + accum->size + amount_before)) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end if */
/* Copy the data out of the buffer */
- HDmemcpy(buf, f->shared->accum.buf + (addr - new_addr), size);
+ HDmemcpy(buf, accum->buf + (addr - new_addr), size);
/* Adjust the accumulator address & size */
- f->shared->accum.loc = new_addr;
- f->shared->accum.size = new_size;
+ accum->loc = new_addr;
+ accum->size = new_size;
} /* end if */
/* Current read doesn't overlap with metadata accumulator, read it from file */
else {
/* Dispatch to driver */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end else */
} /* end if */
else {
/* Read the data */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
/* Check for overlap w/dirty accumulator */
@@ -219,9 +224,9 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
* information in the accumulator with [some of] the information
* just read in. -QAK)
*/
- if(f->shared->accum.dirty &&
- H5F_addr_overlap(addr, size, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len)) {
- haddr_t dirty_loc = f->shared->accum.loc + f->shared->accum.dirty_off; /* File offset of dirty information */
+ if(accum->dirty &&
+ H5F_addr_overlap(addr, size, accum->loc + accum->dirty_off, accum->dirty_len)) {
+ haddr_t dirty_loc = accum->loc + accum->dirty_off; /* File offset of dirty information */
size_t buf_off; /* Offset of dirty region in buffer */
size_t dirty_off; /* Offset within dirty region */
size_t overlap_size; /* Size of overlap with dirty region */
@@ -235,36 +240,36 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
dirty_off = 0;
/* Check for read ending within dirty region */
- if(H5F_addr_lt(addr + size, dirty_loc + f->shared->accum.dirty_len))
+ if(H5F_addr_lt(addr + size, dirty_loc + accum->dirty_len))
overlap_size = (size_t)((addr + size) - buf_off);
else /* Access covers whole dirty region */
- overlap_size = f->shared->accum.dirty_len;
+ overlap_size = accum->dirty_len;
} /* end if */
else { /* Read starts after beginning of dirty region */
/* Compute dirty offset within buffer and overlap size */
buf_off = 0;
dirty_off = (size_t)(addr - dirty_loc);
- overlap_size = (size_t)((dirty_loc + f->shared->accum.dirty_len) - addr);
+ overlap_size = (size_t)((dirty_loc + accum->dirty_len) - addr);
} /* end else */
/* Copy the dirty region to buffer */
- HDmemcpy((unsigned char *)buf + buf_off, (unsigned char *)f->shared->accum.buf + f->shared->accum.dirty_off + dirty_off, overlap_size);
+ HDmemcpy((unsigned char *)buf + buf_off, (unsigned char *)accum->buf + accum->dirty_off + dirty_off, overlap_size);
} /* end if */
} /* end else */
} /* end if */
else {
/* Read the data */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_accum_read() */
+} /* end H5F__accum_read() */
/*-------------------------------------------------------------------------
- * Function: H5F_accum_adjust
+ * Function: H5F__accum_adjust
*
* Purpose: Adjust accumulator size, if necessary
*
@@ -277,15 +282,15 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
+H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info,
H5F_accum_adjust_t adjust, size_t size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(accum);
- HDassert(lf);
+ HDassert(fio_info);
HDassert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust);
HDassert(size > 0);
HDassert(size <= H5F_ACCUM_MAX_SIZE);
@@ -343,7 +348,7 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
/* Check if the dirty region overlaps the region to eliminate from the accumulator */
if((accum->size - shrink_size) < (accum->dirty_off + accum->dirty_len)) {
/* Write out the dirty region from the metadata accumulator, with dispatch to driver */
- if(H5FD_write(lf, dxpl_id, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -354,7 +359,7 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
/* Check if the dirty region overlaps the region to eliminate from the accumulator */
if(shrink_size > accum->dirty_off) {
/* Write out the dirty region from the metadata accumulator, with dispatch to driver */
- if(H5FD_write(lf, dxpl_id, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -398,11 +403,11 @@ HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size))
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_accum_adjust() */
+} /* end H5F__accum_adjust() */
/*-------------------------------------------------------------------------
- * Function: H5F_accum_write
+ * Function: H5F__accum_write
*
* Purpose: Attempts to write some data to the metadata accumulator for
* a file from a buffer.
@@ -421,7 +426,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_accum_write(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
+H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
size_t size, const void *buf)
{
H5FD_mem_t map_type; /* Mapped memory type */
@@ -429,361 +434,365 @@ H5F_accum_write(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ HDassert(fio_info);
+ HDassert(fio_info->f);
+ HDassert(H5F_INTENT(fio_info->f) & H5F_ACC_RDWR);
+ HDassert(fio_info->dxpl);
HDassert(buf);
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
/* Check for accumulating metadata */
- if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
+
+ /* Set up alias for file's metadata accumulator info */
+ accum = &fio_info->f->shared->accum;
+
if(size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
- HDassert(!f->shared->accum.buf || (f->shared->accum.alloc_size >= f->shared->accum.size));
+ HDassert(!accum->buf || (accum->alloc_size >= accum->size));
/* Check if there is already metadata in the accumulator */
- if(f->shared->accum.size > 0) {
+ if(accum->size > 0) {
/* Check if the new metadata adjoins the beginning of the current accumulator */
- if((addr + size) == f->shared->accum.loc) {
+ if((addr + size) == accum->loc) {
/* Check if we need to adjust accumulator size */
- if(H5F_accum_adjust(&f->shared->accum, f->shared->lf, dxpl_id, H5F_ACCUM_PREPEND, size) < 0)
+ if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_PREPEND, size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Move the existing metadata to the proper location */
- HDmemmove(f->shared->accum.buf + size, f->shared->accum.buf, f->shared->accum.size);
+ HDmemmove(accum->buf + size, accum->buf, accum->size);
/* Copy the new metadata at the front */
- HDmemcpy(f->shared->accum.buf, buf, size);
+ HDmemcpy(accum->buf, buf, size);
/* Set the new size & location of the metadata accumulator */
- f->shared->accum.loc = addr;
- f->shared->accum.size += size;
+ accum->loc = addr;
+ accum->size += size;
/* Adjust the dirty region and mark accumulator dirty */
- if(f->shared->accum.dirty)
- f->shared->accum.dirty_len = size + f->shared->accum.dirty_off
- + f->shared->accum.dirty_len;
+ if(accum->dirty)
+ accum->dirty_len = size + accum->dirty_off + accum->dirty_len;
else {
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
- f->shared->accum.dirty_off = 0;
+ accum->dirty_off = 0;
} /* end if */
/* Check if the new metadata adjoins the end of the current accumulator */
- else if(addr == (f->shared->accum.loc + f->shared->accum.size)) {
+ else if(addr == (accum->loc + accum->size)) {
/* Check if we need to adjust accumulator size */
- if(H5F_accum_adjust(&f->shared->accum, f->shared->lf, dxpl_id, H5F_ACCUM_APPEND, size) < 0)
+ if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_APPEND, size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Copy the new metadata to the end */
- HDmemcpy(f->shared->accum.buf + f->shared->accum.size, buf, size);
+ HDmemcpy(accum->buf + accum->size, buf, size);
/* Adjust the dirty region and mark accumulator dirty */
- if(f->shared->accum.dirty)
- f->shared->accum.dirty_len = size + (f->shared->accum.size -
- f->shared->accum.dirty_off);
+ if(accum->dirty)
+ accum->dirty_len = size + (accum->size - accum->dirty_off);
else {
- f->shared->accum.dirty_off = f->shared->accum.size;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = accum->size;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
/* Set the new size of the metadata accumulator */
- f->shared->accum.size += size;
+ accum->size += size;
} /* end if */
/* Check if the piece of metadata being written overlaps the metadata accumulator */
- else if(H5F_addr_overlap(addr, size, f->shared->accum.loc, f->shared->accum.size)) {
+ else if(H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
size_t add_size; /* New size of the accumulator buffer */
/* Check if the new metadata is entirely within the current accumulator */
- if(addr >= f->shared->accum.loc && (addr + size) <= (f->shared->accum.loc + f->shared->accum.size)) {
- size_t dirty_off = (size_t)(addr - f->shared->accum.loc);
+ if(addr >= accum->loc && (addr + size) <= (accum->loc + accum->size)) {
+ size_t dirty_off = (size_t)(addr - accum->loc);
/* Copy the new metadata to the proper location within the accumulator */
- HDmemcpy(f->shared->accum.buf + dirty_off, buf, size);
+ HDmemcpy(accum->buf + dirty_off, buf, size);
/* Adjust the dirty region and mark accumulator dirty */
- if(f->shared->accum.dirty) {
+ if(accum->dirty) {
/* Check for new metadata starting before current dirty region */
- if(dirty_off <= f->shared->accum.dirty_off) {
- if((dirty_off + size) <= (f->shared->accum.dirty_off + f->shared->accum.dirty_len))
- f->shared->accum.dirty_len = (f->shared->accum.dirty_off + f->shared->accum.dirty_len) - dirty_off;
+ if(dirty_off <= accum->dirty_off) {
+ if((dirty_off + size) <= (accum->dirty_off + accum->dirty_len))
+ accum->dirty_len = (accum->dirty_off + accum->dirty_len) - dirty_off;
else
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty_off = dirty_off;
+ accum->dirty_len = size;
+ accum->dirty_off = dirty_off;
} /* end if */
else {
- if((dirty_off + size) <= (f->shared->accum.dirty_off + f->shared->accum.dirty_len))
- ; /* f->shared->accum.dirty_len doesn't change */
+ if((dirty_off + size) <= (accum->dirty_off + accum->dirty_len))
+ ; /* accum->dirty_len doesn't change */
else
- f->shared->accum.dirty_len = (dirty_off + size) - f->shared->accum.dirty_off;
+ accum->dirty_len = (dirty_off + size) - accum->dirty_off;
} /* end else */
} /* end if */
else {
- f->shared->accum.dirty_off = dirty_off;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = dirty_off;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
} /* end if */
/* Check if the new metadata overlaps the beginning of the current accumulator */
- else if(addr < f->shared->accum.loc && (addr + size) <= (f->shared->accum.loc + f->shared->accum.size)) {
+ else if(addr < accum->loc && (addr + size) <= (accum->loc + accum->size)) {
size_t old_offset; /* Offset of old data within the accumulator buffer */
/* Calculate the amount we will need to add to the accumulator size, based on the amount of overlap */
- H5_ASSIGN_OVERFLOW(add_size, (f->shared->accum.loc - addr), hsize_t, size_t);
+ H5_ASSIGN_OVERFLOW(add_size, (accum->loc - addr), hsize_t, size_t);
/* Check if we need to adjust accumulator size */
- if(H5F_accum_adjust(&f->shared->accum, f->shared->lf, dxpl_id, H5F_ACCUM_PREPEND, add_size) < 0)
+ if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_PREPEND, add_size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Calculate the proper offset of the existing metadata */
- H5_ASSIGN_OVERFLOW(old_offset, (addr + size) - f->shared->accum.loc, hsize_t, size_t);
+ H5_ASSIGN_OVERFLOW(old_offset, (addr + size) - accum->loc, hsize_t, size_t);
/* Move the existing metadata to the proper location */
- HDmemmove(f->shared->accum.buf + size, f->shared->accum.buf + old_offset, (f->shared->accum.size - old_offset));
+ HDmemmove(accum->buf + size, accum->buf + old_offset, (accum->size - old_offset));
/* Copy the new metadata at the front */
- HDmemcpy(f->shared->accum.buf, buf, size);
+ HDmemcpy(accum->buf, buf, size);
/* Set the new size & location of the metadata accumulator */
- f->shared->accum.loc = addr;
- f->shared->accum.size += add_size;
+ accum->loc = addr;
+ accum->size += add_size;
/* Adjust the dirty region and mark accumulator dirty */
- if(f->shared->accum.dirty) {
- size_t curr_dirty_end = add_size + f->shared->accum.dirty_off + f->shared->accum.dirty_len;
+ if(accum->dirty) {
+ size_t curr_dirty_end = add_size + accum->dirty_off + accum->dirty_len;
- f->shared->accum.dirty_off = 0;
+ accum->dirty_off = 0;
if(size <= curr_dirty_end)
- f->shared->accum.dirty_len = curr_dirty_end;
+ accum->dirty_len = curr_dirty_end;
else
- f->shared->accum.dirty_len = size;
+ accum->dirty_len = size;
} /* end if */
else {
- f->shared->accum.dirty_off = 0;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = 0;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
} /* end if */
/* Check if the new metadata overlaps the end of the current accumulator */
- else if(addr >= f->shared->accum.loc && (addr + size) > (f->shared->accum.loc + f->shared->accum.size)) {
+ else if(addr >= accum->loc && (addr + size) > (accum->loc + accum->size)) {
size_t dirty_off; /* Offset of dirty region */
/* Calculate the amount we will need to add to the accumulator size, based on the amount of overlap */
- H5_ASSIGN_OVERFLOW(add_size, (addr + size) - (f->shared->accum.loc + f->shared->accum.size), hsize_t, size_t);
+ H5_ASSIGN_OVERFLOW(add_size, (addr + size) - (accum->loc + accum->size), hsize_t, size_t);
/* Check if we need to adjust accumulator size */
- if(H5F_accum_adjust(&f->shared->accum, f->shared->lf, dxpl_id, H5F_ACCUM_APPEND, add_size) < 0)
+ if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_APPEND, add_size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Compute offset of dirty region (after adjusting accumulator) */
- dirty_off = (size_t)(addr - f->shared->accum.loc);
+ dirty_off = (size_t)(addr - accum->loc);
/* Copy the new metadata to the end */
- HDmemcpy(f->shared->accum.buf + dirty_off, buf, size);
+ HDmemcpy(accum->buf + dirty_off, buf, size);
/* Set the new size of the metadata accumulator */
- f->shared->accum.size += add_size;
+ accum->size += add_size;
/* Adjust the dirty region and mark accumulator dirty */
- if(f->shared->accum.dirty) {
+ if(accum->dirty) {
/* Check for new metadata starting before current dirty region */
- if(dirty_off <= f->shared->accum.dirty_off) {
- f->shared->accum.dirty_off = dirty_off;
- f->shared->accum.dirty_len = size;
+ if(dirty_off <= accum->dirty_off) {
+ accum->dirty_off = dirty_off;
+ accum->dirty_len = size;
} /* end if */
else {
- f->shared->accum.dirty_len = (dirty_off + size) - f->shared->accum.dirty_off;
+ accum->dirty_len = (dirty_off + size) - accum->dirty_off;
} /* end else */
} /* end if */
else {
- f->shared->accum.dirty_off = dirty_off;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = dirty_off;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
} /* end if */
/* New metadata overlaps both ends of the current accumulator */
else {
/* Check if we need more buffer space */
- if(size > f->shared->accum.alloc_size) {
+ if(size > accum->alloc_size) {
size_t new_alloc_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_alloc_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
/* Reallocate the metadata accumulator buffer */
- if(NULL == (f->shared->accum.buf = H5FL_BLK_REALLOC(meta_accum, f->shared->accum.buf, new_alloc_size)))
+ if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
- f->shared->accum.alloc_size = new_alloc_size;
+ accum->alloc_size = new_alloc_size;
#ifdef H5_CLEAR_MEMORY
-HDmemset(f->shared->accum.buf + size, 0, (f->shared->accum.alloc_size - size));
+HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
#endif /* H5_CLEAR_MEMORY */
} /* end if */
/* Copy the new metadata to the buffer */
- HDmemcpy(f->shared->accum.buf, buf, size);
+ HDmemcpy(accum->buf, buf, size);
/* Set the new size & location of the metadata accumulator */
- f->shared->accum.loc = addr;
- f->shared->accum.size = size;
+ accum->loc = addr;
+ accum->size = size;
/* Adjust the dirty region and mark accumulator dirty */
- f->shared->accum.dirty_off = 0;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = 0;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
} /* end if */
/* New piece of metadata doesn't adjoin or overlap the existing accumulator */
else {
/* Write out the existing metadata accumulator, with dispatch to driver */
- if(f->shared->accum.dirty) {
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
+ if(accum->dirty) {
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, accum->loc + accum->dirty_off, accum->dirty_len, accum->buf + accum->dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
- f->shared->accum.dirty = FALSE;
+ accum->dirty = FALSE;
} /* end if */
/* Cache the new piece of metadata */
/* Check if we need to resize the buffer */
- if(size > f->shared->accum.alloc_size) {
+ if(size > accum->alloc_size) {
size_t new_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
/* Grow the metadata accumulator buffer */
- if(NULL == (f->shared->accum.buf = H5FL_BLK_REALLOC(meta_accum, f->shared->accum.buf, new_size)))
+ if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
- f->shared->accum.alloc_size = new_size;
+ accum->alloc_size = new_size;
#ifdef H5_CLEAR_MEMORY
{
-size_t clear_size = MAX(f->shared->accum.size, size);
-HDmemset(f->shared->accum.buf + clear_size, 0, (f->shared->accum.alloc_size - clear_size));
+size_t clear_size = MAX(accum->size, size);
+HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
}
#endif /* H5_CLEAR_MEMORY */
} /* end if */
else {
/* Check if we should shrink the accumulator buffer */
- if(size < (f->shared->accum.alloc_size / H5F_ACCUM_THROTTLE) &&
- f->shared->accum.alloc_size > H5F_ACCUM_THRESHOLD) {
- size_t tmp_size = (f->shared->accum.alloc_size / H5F_ACCUM_THROTTLE); /* New size of accumulator buffer */
+ if(size < (accum->alloc_size / H5F_ACCUM_THROTTLE) &&
+ accum->alloc_size > H5F_ACCUM_THRESHOLD) {
+ size_t tmp_size = (accum->alloc_size / H5F_ACCUM_THROTTLE); /* New size of accumulator buffer */
/* Shrink the accumulator buffer */
- if(NULL == (f->shared->accum.buf = H5FL_BLK_REALLOC(meta_accum, f->shared->accum.buf, tmp_size)))
+ if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, tmp_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
- f->shared->accum.alloc_size = tmp_size;
+ accum->alloc_size = tmp_size;
} /* end if */
} /* end else */
/* Update the metadata accumulator information */
- f->shared->accum.loc = addr;
- f->shared->accum.size = size;
+ accum->loc = addr;
+ accum->size = size;
/* Store the piece of metadata in the accumulator */
- HDmemcpy(f->shared->accum.buf, buf, size);
+ HDmemcpy(accum->buf, buf, size);
/* Adjust the dirty region and mark accumulator dirty */
- f->shared->accum.dirty_off = 0;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = 0;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
} /* end if */
/* No metadata in the accumulator, grab this piece and keep it */
else {
/* Check if we need to reallocate the buffer */
- if(size > f->shared->accum.alloc_size) {
+ if(size > accum->alloc_size) {
size_t new_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
/* Reallocate the metadata accumulator buffer */
- if(NULL == (f->shared->accum.buf = H5FL_BLK_REALLOC(meta_accum, f->shared->accum.buf, new_size)))
+ if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
- f->shared->accum.alloc_size = new_size;
+ accum->alloc_size = new_size;
#ifdef H5_CLEAR_MEMORY
-HDmemset(f->shared->accum.buf + size, 0, (f->shared->accum.alloc_size - size));
+HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
#endif /* H5_CLEAR_MEMORY */
} /* end if */
/* Update the metadata accumulator information */
- f->shared->accum.loc = addr;
- f->shared->accum.size = size;
+ accum->loc = addr;
+ accum->size = size;
/* Store the piece of metadata in the accumulator */
- HDmemcpy(f->shared->accum.buf, buf, size);
+ HDmemcpy(accum->buf, buf, size);
/* Adjust the dirty region and mark accumulator dirty */
- f->shared->accum.dirty_off = 0;
- f->shared->accum.dirty_len = size;
- f->shared->accum.dirty = TRUE;
+ accum->dirty_off = 0;
+ accum->dirty_len = size;
+ accum->dirty = TRUE;
} /* end else */
} /* end if */
else {
- if((H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) > 0) {
+ if((H5F_INTENT(fio_info->f) & H5F_ACC_SWMR_WRITE) > 0) {
/* Flush if dirty and reset accumulator */
- if(H5F_accum_reset(f, dxpl_id, TRUE) < 0)
+ if(H5F__accum_reset(fio_info, TRUE) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator")
}
/* Write the data */
- if(H5FD_write(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Check for overlap w/accumulator */
/* (Note that this could be improved by updating the accumulator
* with [some of] the information just read in. -QAK)
*/
- if(H5F_addr_overlap(addr, size, f->shared->accum.loc, f->shared->accum.size)) {
+ if(H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
/* Check for write starting before beginning of accumulator */
- if(H5F_addr_le(addr, f->shared->accum.loc)) {
+ if(H5F_addr_le(addr, accum->loc)) {
/* Check for write ending within accumulator */
- if(H5F_addr_le(addr + size, f->shared->accum.loc + f->shared->accum.size)) {
+ if(H5F_addr_le(addr + size, accum->loc + accum->size)) {
size_t overlap_size; /* Size of overlapping region */
/* Compute overlap size */
- overlap_size = (size_t)((addr + size) - f->shared->accum.loc);
+ overlap_size = (size_t)((addr + size) - accum->loc);
/* Check for dirty region */
- if(f->shared->accum.dirty) {
- haddr_t dirty_start = f->shared->accum.loc + f->shared->accum.dirty_off; /* File address of start of dirty region */
- haddr_t dirty_end = dirty_start + f->shared->accum.dirty_len; /* File address of end of dirty region */
+ if(accum->dirty) {
+ haddr_t dirty_start = accum->loc + accum->dirty_off; /* File address of start of dirty region */
+ haddr_t dirty_end = dirty_start + accum->dirty_len; /* File address of end of dirty region */
/* Check if entire dirty region is overwritten */
if(H5F_addr_le(dirty_end, addr + size)) {
- f->shared->accum.dirty = FALSE;
- f->shared->accum.dirty_len = 0;
+ accum->dirty = FALSE;
+ accum->dirty_len = 0;
} /* end if */
else {
/* Check for dirty region falling after write */
if(H5F_addr_le(addr + size, dirty_start))
- f->shared->accum.dirty_off = overlap_size;
+ accum->dirty_off = overlap_size;
else { /* Dirty region overlaps w/written region */
- f->shared->accum.dirty_off = 0;
- f->shared->accum.dirty_len -= (size_t)((addr + size) - dirty_start);
+ accum->dirty_off = 0;
+ accum->dirty_len -= (size_t)((addr + size) - dirty_start);
} /* end else */
} /* end if */
} /* end if */
/* Trim bottom of accumulator off */
- f->shared->accum.loc += overlap_size;
- f->shared->accum.size -= overlap_size;
- HDmemmove(f->shared->accum.buf, f->shared->accum.buf + overlap_size, f->shared->accum.size);
+ accum->loc += overlap_size;
+ accum->size -= overlap_size;
+ HDmemmove(accum->buf, accum->buf + overlap_size, accum->size);
} /* end if */
else { /* Access covers whole accumulator */
/* Reset accumulator, but don't flush */
- if(H5F_accum_reset(f, dxpl_id, FALSE) < 0)
+ if(H5F__accum_reset(fio_info, FALSE) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator")
} /* end else */
} /* end if */
@@ -791,49 +800,49 @@ HDmemset(f->shared->accum.buf + size, 0, (f->shared->accum.alloc_size - size));
size_t overlap_size; /* Size of overlapping region */
/* Sanity check */
- HDassert(H5F_addr_gt(addr + size, f->shared->accum.loc + f->shared->accum.size));
+ HDassert(H5F_addr_gt(addr + size, accum->loc + accum->size));
/* Compute overlap size */
- overlap_size = (size_t)((f->shared->accum.loc + f->shared->accum.size) - addr);
+ overlap_size = (size_t)((accum->loc + accum->size) - addr);
/* Check for dirty region */
- if(f->shared->accum.dirty) {
- haddr_t dirty_start = f->shared->accum.loc + f->shared->accum.dirty_off; /* File address of start of dirty region */
- haddr_t dirty_end = dirty_start + f->shared->accum.dirty_len; /* File address of end of dirty region */
+ if(accum->dirty) {
+ haddr_t dirty_start = accum->loc + accum->dirty_off; /* File address of start of dirty region */
+ haddr_t dirty_end = dirty_start + accum->dirty_len; /* File address of end of dirty region */
/* Check if entire dirty region is overwritten */
if(H5F_addr_ge(dirty_start, addr)) {
- f->shared->accum.dirty = FALSE;
- f->shared->accum.dirty_len = 0;
+ accum->dirty = FALSE;
+ accum->dirty_len = 0;
} /* end if */
else {
/* Check for dirty region falling before write */
if(H5F_addr_le(dirty_end, addr))
; /* noop */
else /* Dirty region overlaps w/written region */
- f->shared->accum.dirty_len = (size_t)(addr - dirty_start);
+ accum->dirty_len = (size_t)(addr - dirty_start);
} /* end if */
} /* end if */
/* Trim top of accumulator off */
- f->shared->accum.size -= overlap_size;
+ accum->size -= overlap_size;
} /* end else */
} /* end if */
} /* end else */
} /* end if */
else {
/* Write the data */
- if(H5FD_write(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_accum_write() */
+} /* end H5F__accum_write() */
/*-------------------------------------------------------------------------
- * Function: H5F_accum_free
+ * Function: H5F__accum_free
*
* Purpose: Check for free space invalidating [part of] a metadata
* accumulator.
@@ -847,19 +856,25 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
+H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t UNUSED type, haddr_t addr,
hsize_t size)
{
+ H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
+ HDassert(fio_info);
+ HDassert(fio_info->f);
+ HDassert(fio_info->dxpl);
+
+ /* Set up alias for file's metadata accumulator info */
+ accum = &fio_info->f->shared->accum;
/* Adjust the metadata accumulator to remove the freed block, if it overlaps */
- if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA)
- && H5F_addr_overlap(addr, size, f->shared->accum.loc, f->shared->accum.size)) {
+ if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA)
+ && H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
size_t overlap_size; /* Size of overlap with accumulator */
/* Sanity check */
@@ -868,57 +883,57 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
HDassert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */
/* Check for overlapping the beginning of the accumulator */
- if(H5F_addr_le(addr, f->shared->accum.loc)) {
+ if(H5F_addr_le(addr, accum->loc)) {
/* Check for completely overlapping the accumulator */
- if(H5F_addr_ge(addr + size, f->shared->accum.loc + f->shared->accum.size)) {
+ if(H5F_addr_ge(addr + size, accum->loc + accum->size)) {
/* Reset the accumulator, but don't free buffer */
- f->shared->accum.loc = HADDR_UNDEF;
- f->shared->accum.size = 0;
- f->shared->accum.dirty = FALSE;
+ accum->loc = HADDR_UNDEF;
+ accum->size = 0;
+ accum->dirty = FALSE;
} /* end if */
/* Block to free must end within the accumulator */
else {
size_t new_accum_size; /* Size of new accumulator buffer */
/* Calculate the size of the overlap with the accumulator, etc. */
- H5_ASSIGN_OVERFLOW(overlap_size, (addr + size) - f->shared->accum.loc, haddr_t, size_t);
- new_accum_size = f->shared->accum.size - overlap_size;
+ H5_ASSIGN_OVERFLOW(overlap_size, (addr + size) - accum->loc, haddr_t, size_t);
+ new_accum_size = accum->size - overlap_size;
/* Move the accumulator buffer information to eliminate the freed block */
- HDmemmove(f->shared->accum.buf, f->shared->accum.buf + overlap_size, new_accum_size);
+ HDmemmove(accum->buf, accum->buf + overlap_size, new_accum_size);
/* Adjust the accumulator information */
- f->shared->accum.loc += overlap_size;
- f->shared->accum.size = new_accum_size;
+ accum->loc += overlap_size;
+ accum->size = new_accum_size;
/* Adjust the dirty region and possibly mark accumulator clean */
- if(f->shared->accum.dirty) {
+ if(accum->dirty) {
/* Check if block freed is entirely before dirty region */
- if(overlap_size < f->shared->accum.dirty_off)
- f->shared->accum.dirty_off -= overlap_size;
+ if(overlap_size < accum->dirty_off)
+ accum->dirty_off -= overlap_size;
else {
/* Check if block freed ends within dirty region */
- if(overlap_size < (f->shared->accum.dirty_off + f->shared->accum.dirty_len)) {
- f->shared->accum.dirty_len = (f->shared->accum.dirty_off + f->shared->accum.dirty_len) - overlap_size;
- f->shared->accum.dirty_off = 0;
+ if(overlap_size < (accum->dirty_off + accum->dirty_len)) {
+ accum->dirty_len = (accum->dirty_off + accum->dirty_len) - overlap_size;
+ accum->dirty_off = 0;
} /* end if */
/* Block freed encompasses dirty region */
else
- f->shared->accum.dirty = FALSE;
+ accum->dirty = FALSE;
} /* end else */
} /* end if */
} /* end else */
} /* end if */
/* Block to free must start within the accumulator */
else {
- haddr_t dirty_end = f->shared->accum.loc + f->shared->accum.dirty_off + f->shared->accum.dirty_len;
- haddr_t dirty_start = f->shared->accum.loc + f->shared->accum.dirty_off;
+ haddr_t dirty_end = accum->loc + accum->dirty_off + accum->dirty_len;
+ haddr_t dirty_start = accum->loc + accum->dirty_off;
/* Calculate the size of the overlap with the accumulator */
- H5_ASSIGN_OVERFLOW(overlap_size, (f->shared->accum.loc + f->shared->accum.size) - addr, haddr_t, size_t);
+ H5_ASSIGN_OVERFLOW(overlap_size, (accum->loc + accum->size) - addr, haddr_t, size_t);
/* Check if block to free begins before end of dirty region */
- if(f->shared->accum.dirty && H5F_addr_lt(addr, dirty_end)) {
+ if(accum->dirty && H5F_addr_lt(addr, dirty_end)) {
haddr_t tail_addr;
/* Calculate the address of the tail to write */
@@ -929,7 +944,7 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
/* Check if block to free is entirely before dirty region */
if(H5F_addr_le(tail_addr, dirty_start)) {
/* Write out the entire dirty region of the accumulator */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, dirty_start, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start, accum->dirty_len, accum->buf + accum->dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
/* Block to free overlaps with some/all of dirty region */
@@ -939,17 +954,17 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
size_t dirty_delta;
write_size = (size_t)(dirty_end - tail_addr);
- dirty_delta = f->shared->accum.dirty_len - write_size;
+ dirty_delta = accum->dirty_len - write_size;
HDassert(write_size > 0);
/* Write out the unfreed dirty region of the accumulator */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, f->shared->accum.buf + f->shared->accum.dirty_off + dirty_delta) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, accum->buf + accum->dirty_off + dirty_delta) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
/* Reset dirty flag */
- f->shared->accum.dirty = FALSE;
+ accum->dirty = FALSE;
} /* end if */
/* Block to free begins at beginning of or in middle of dirty region */
else {
@@ -959,40 +974,40 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
size_t dirty_delta;
write_size = (size_t)(dirty_end - tail_addr);
- dirty_delta = f->shared->accum.dirty_len - write_size;
+ dirty_delta = accum->dirty_len - write_size;
HDassert(write_size > 0);
/* Write out the unfreed end of the dirty region of the accumulator */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, f->shared->accum.buf + f->shared->accum.dirty_off + dirty_delta) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, accum->buf + accum->dirty_off + dirty_delta) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
/* Check for block to free beginning at same location as dirty region */
if(H5F_addr_eq(addr, dirty_start)) {
/* Reset dirty flag */
- f->shared->accum.dirty = FALSE;
+ accum->dirty = FALSE;
} /* end if */
/* Block to free eliminates end of dirty region */
else {
- f->shared->accum.dirty_len = (size_t)(addr - dirty_start);
+ accum->dirty_len = (size_t)(addr - dirty_start);
} /* end else */
} /* end else */
} /* end if */
/* Adjust the accumulator information */
- f->shared->accum.size = f->shared->accum.size - overlap_size;
+ accum->size = accum->size - overlap_size;
} /* end else */
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_accum_free() */
+} /* end H5F__accum_free() */
/*-------------------------------------------------------------------------
- * Function: H5F_accum_flush
+ * Function: H5F__accum_flush
*
* Purpose: Flush the metadata accumulator to the file
*
@@ -1005,32 +1020,33 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_accum_flush(const H5F_t *f, hid_t dxpl_id)
+H5F__accum_flush(const H5F_io_info_t *fio_info)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ HDassert(fio_info);
+ HDassert(fio_info->f);
+ HDassert(fio_info->dxpl);
/* Check if we need to flush out the metadata accumulator */
- if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && f->shared->accum.dirty) {
+ if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && fio_info->f->shared->accum.dirty) {
/* Flush the metadata contents */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
+ if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, fio_info->f->shared->accum.loc + fio_info->f->shared->accum.dirty_off, fio_info->f->shared->accum.dirty_len, fio_info->f->shared->accum.buf + fio_info->f->shared->accum.dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset the dirty flag */
- f->shared->accum.dirty = FALSE;
+ fio_info->f->shared->accum.dirty = FALSE;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_accum_flush() */
+} /* end H5F__accum_flush() */
/*-------------------------------------------------------------------------
- * Function: H5F_accum_reset
+ * Function: H5F__accum_reset
*
* Purpose: Reset the metadata accumulator for the file
*
@@ -1043,37 +1059,38 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_accum_reset(const H5F_t *f, hid_t dxpl_id, hbool_t flush)
+H5F__accum_reset(const H5F_io_info_t *fio_info, hbool_t flush)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ HDassert(fio_info);
+ HDassert(fio_info->f);
+ HDassert(fio_info->dxpl);
/* Flush any dirty data in accumulator, if requested */
if(flush)
- if(H5F_accum_flush(f, dxpl_id) < 0)
+ if(H5F__accum_flush(fio_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "can't flush metadata accumulator")
/* Check if we need to reset the metadata accumulator information */
- if(f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) {
+ if(fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) {
/* Sanity check */
- HDassert(!f->closing || FALSE == f->shared->accum.dirty);
+ HDassert(!fio_info->f->closing || FALSE == fio_info->f->shared->accum.dirty);
/* Free the buffer */
- if(f->shared->accum.buf)
- f->shared->accum.buf = H5FL_BLK_FREE(meta_accum, f->shared->accum.buf);
+ if(fio_info->f->shared->accum.buf)
+ fio_info->f->shared->accum.buf = H5FL_BLK_FREE(meta_accum, fio_info->f->shared->accum.buf);
/* Reset the buffer sizes & location */
- f->shared->accum.alloc_size = f->shared->accum.size = 0;
- f->shared->accum.loc = HADDR_UNDEF;
- f->shared->accum.dirty = FALSE;
- f->shared->accum.dirty_len = 0;
+ fio_info->f->shared->accum.alloc_size = fio_info->f->shared->accum.size = 0;
+ fio_info->f->shared->accum.loc = HADDR_UNDEF;
+ fio_info->f->shared->accum.dirty = FALSE;
+ fio_info->f->shared->accum.dirty_len = 0;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_accum_reset() */
+} /* end H5F__accum_reset() */
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index e3945ff..c5a500a 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -34,7 +34,7 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5F_init_deprec_interface
+#define H5_INTERFACE_INIT_FUNC H5F__init_deprec_interface
/***********/
@@ -85,9 +85,9 @@
/*--------------------------------------------------------------------------
NAME
- H5F_init_deprec_interface -- Initialize interface-specific information
+ H5F__init_deprec_interface -- Initialize interface-specific information
USAGE
- herr_t H5F_init_deprec_interface()
+ herr_t H5F__init_deprec_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -96,12 +96,36 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5F_init_deprec_interface(void)
+H5F__init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5F_init())
-} /* H5F_init_deprec_interface() */
+} /* H5F__init_deprec_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5F__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5F__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5F__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5F__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 28c7c2b..cca0077 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -38,6 +38,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
/****************/
@@ -95,6 +96,7 @@ herr_t
H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
hid_t dxpl_id, void *buf/*out*/)
{
+ H5F_io_info_t fio_info; /* I/O info for operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -108,8 +110,13 @@ H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
if(H5F_addr_le(f->shared->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Pass through metadata accumulator layer */
- if(H5F_accum_read(f, dxpl_id, type, addr, size, buf) < 0)
+ if(H5F__accum_read(&fio_info, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through metadata accumulator failed")
done:
@@ -136,6 +143,7 @@ herr_t
H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
hid_t dxpl_id, const void *buf)
{
+ H5F_io_info_t fio_info; /* I/O info for operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -153,8 +161,13 @@ HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size);
if(H5F_addr_le(f->shared->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Pass through metadata accumulator layer */
- if(H5F_accum_write(f, dxpl_id, type, addr, size, buf) < 0)
+ if(H5F__accum_write(&fio_info, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through metadata accumulator failed")
done:
@@ -178,6 +191,7 @@ done:
herr_t
H5F_flush_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id)
{
+ H5F_io_info_t fio_info; /* I/O info for operation */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -185,9 +199,15 @@ H5F_flush_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id)
/* Use tag to search for and flush associated metadata */
if(H5AC_flush_tagged_metadata(f, tag, dxpl_id)<0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata")
+
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Flush out the metadata accumulator */
- if(H5F_accum_flush(f, dxpl_id) < 0)
+ if(H5F__accum_flush(&fio_info) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator")
/* Flush file buffers to disk. */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 4a1d3e6..a3a6e54 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -53,10 +53,6 @@
# undef H5F_DEBUG
#endif
-/* Define the HDF5 file signature */
-#define H5F_SIGNATURE "\211HDF\r\n\032\n"
-#define H5F_SIGNATURE_LEN 8
-
/* Superblock status flags */
#define H5F_SUPER_WRITE_ACCESS 0x01
#define H5F_SUPER_FILE_OK 0x02
@@ -295,7 +291,7 @@ H5_DLLVAR const H5AC_class_t H5AC_SUPERBLOCK[1];
/* General routines */
H5_DLL herr_t H5F_init(void);
-H5_DLL herr_t H5F_locate_signature(H5FD_t *file, hid_t dxpl_id, haddr_t *sig_addr);
+H5_DLL herr_t H5F__term_deprec_interface(void);
H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing);
/* File mount related routines */
@@ -317,14 +313,14 @@ H5_DLL herr_t H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id,
hbool_t was_created);
/* Metadata accumulator routines */
-H5_DLL herr_t H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type,
haddr_t addr, size_t size, void *buf);
-H5_DLL herr_t H5F_accum_write(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type,
haddr_t addr, size_t size, const void *buf);
-H5_DLL herr_t H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t type,
haddr_t addr, hsize_t size);
-H5_DLL herr_t H5F_accum_flush(const H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5F_accum_reset(const H5F_t *f, hid_t dxpl_id, hbool_t flush);
+H5_DLL herr_t H5F__accum_flush(const H5F_io_info_t *fio_info);
+H5_DLL herr_t H5F__accum_reset(const H5F_io_info_t *fio_info, hbool_t flush);
/* Shared file list related routines */
H5_DLL herr_t H5F_sfile_add(H5F_file_t *shared);
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index a512c2a..f65c033 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -30,17 +30,9 @@
#include "H5VMprivate.h" /* Vectors and arrays */
-/****************************/
-/* Library Private Typedefs */
-/****************************/
-
-/* Main file structure */
-typedef struct H5F_t H5F_t;
-typedef struct H5F_file_t H5F_file_t;
-
-/* Block aggregation structure */
-typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
-
+/**************************/
+/* Library Private Macros */
+/**************************/
/*
* Encode and decode macros for file meta-data.
@@ -462,6 +454,8 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
#define H5F_ACS_WANT_POSIX_FD_NAME "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address */
#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */
#define H5F_ACS_FILE_IMAGE_INFO_NAME "file_image_info" /* struct containing initial file image and callback info */
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME "core_write_tracking_flag" /* Whether or not core VFD backing store write tracking is enabled */
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME "core_write_tracking_page_size" /* The page size in kiB when core VFD write tracking is enabled */
/* ======================== File Mount properties ====================*/
#define H5F_MNT_SYM_LOCAL_NAME "local" /* Whether absolute symlinks local to file. */
@@ -472,6 +466,10 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
#define H5_PAR_META_WRITE 0
#endif /* H5_HAVE_PARALLEL */
+/* Define the HDF5 file signature */
+#define H5F_SIGNATURE "\211HDF\r\n\032\n"
+#define H5F_SIGNATURE_LEN 8
+
/* Version #'s of the major components of the file format */
#define HDF5_SUPERBLOCK_VERSION_DEF 0 /* The default super block format */
#define HDF5_SUPERBLOCK_VERSION_1 1 /* Version with non-default B-tree 'K' value */
@@ -547,11 +545,42 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
#define H5SM_LIST_MAGIC "SMLI" /* Shared Message List */
-/* Forward declarations for prototype arguments */
+/****************************/
+/* Library Private Typedefs */
+/****************************/
+
+/* Forward declarations (for prototypes & type definitions) */
struct H5B_class_t;
struct H5UC_t;
struct H5O_loc_t;
struct H5HG_heap_t;
+struct H5P_genplist_t;
+
+/* Forward declarations for anonymous H5F objects */
+
+/* Main file structures */
+typedef struct H5F_t H5F_t;
+typedef struct H5F_file_t H5F_file_t;
+
+/* Block aggregation structure */
+typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
+
+/* I/O Info for an operation */
+typedef struct H5F_io_info_t {
+ const H5F_t *f; /* File object */
+ const struct H5P_genplist_t *dxpl; /* DXPL object */
+} H5F_io_info_t;
+
+
+/*****************************/
+/* Library-private Variables */
+/*****************************/
+
+
+/***************************************/
+/* Library-private Function Prototypes */
+/***************************************/
+
/* Private functions */
H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id,
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index a1c67ec..dd80a46 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -100,70 +100,6 @@ H5F_init_super_interface(void)
/*-------------------------------------------------------------------------
- * Function: H5F_locate_signature
- *
- * Purpose: Finds the HDF5 superblock signature in a file. The
- * signature can appear at address 0, or any power of two
- * beginning with 512.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Robb Matzke
- * Friday, November 7, 1997
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5F_locate_signature(H5FD_t *file, hid_t dxpl_id, haddr_t *sig_addr)
-{
- haddr_t addr, eoa;
- uint8_t buf[H5F_SIGNATURE_LEN];
- unsigned n, maxpow;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- /* Find the least N such that 2^N is larger than the file size */
- if(HADDR_UNDEF == (addr = H5FD_get_eof(file)) || HADDR_UNDEF == (eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER)))
- HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to obtain EOF/EOA value")
- for(maxpow = 0; addr; maxpow++)
- addr >>= 1;
- maxpow = MAX(maxpow, 9);
-
- /*
- * Search for the file signature at format address zero followed by
- * powers of two larger than 9.
- */
- for(n = 8; n < maxpow; n++) {
- addr = (8 == n) ? 0 : (haddr_t)1 << n;
- if(H5FD_set_eoa(file, H5FD_MEM_SUPER, addr + H5F_SIGNATURE_LEN) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
- if(H5FD_read(file, dxpl_id, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
- if(!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
- break;
- } /* end for */
-
- /*
- * If the signature was not found then reset the EOA value and return
- * HADDR_UNDEF.
- */
- if(n >= maxpow) {
- if(H5FD_set_eoa(file, H5FD_MEM_SUPER, eoa) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to reset EOA value")
- *sig_addr = HADDR_UNDEF;
- } /* end if */
- else
- /* Set return value */
- *sig_addr = addr;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_locate_signature() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5F_super_ext_create
*
* Purpose: Create the superblock extension
@@ -320,6 +256,7 @@ done:
herr_t
H5F_super_read(H5F_t *f, hid_t dxpl_id)
{
+ H5P_genplist_t *dxpl; /* DXPL object */
H5F_super_t * sblock = NULL; /* superblock structure */
unsigned sblock_flags = H5AC__NO_FLAGS_SET; /* flags used in superblock unprotect call */
haddr_t super_addr; /* Absolute address of superblock */
@@ -329,8 +266,12 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Find the superblock */
- if(H5F_locate_signature(f->shared->lf, dxpl_id, &super_addr) < 0)
+ if(H5FD_locate_signature(f->shared->lf, dxpl, &super_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
if(HADDR_UNDEF == super_addr)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "file signature not found")
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index cc411d5..dd239b0 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -116,6 +116,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
H5F_super_t *sblock = NULL; /* File's superblock */
haddr_t base_addr = HADDR_UNDEF; /* Base address of file */
uint8_t sbuf[H5F_MAX_SUPERBLOCK_SIZE]; /* Buffer for superblock */
+ H5P_genplist_t *dxpl; /* DXPL object */
H5P_genplist_t *c_plist; /* File creation property list */
H5F_file_t *shared; /* shared part of `file' */
H5FD_t *lf; /* file driver part of `shared' */
@@ -159,12 +160,16 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
sblock->cache_info.flush_me_collectively = TRUE;
#endif
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list")
+
/* Read fixed-size portion of the superblock */
p = sbuf;
H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t);
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)fixed_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
/* Skip over signature (already checked when locating the superblock) */
@@ -191,7 +196,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
/* Read in variable-sized portion of superblock */
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)(fixed_size + variable_size)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read superblock")
/* Check for older version of superblock format */
@@ -345,7 +350,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
p = dbuf;
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read driver information block")
/* Version number */
@@ -377,7 +382,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
/* Read in variable-sized portion of driver info block */
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE, drv_variable_size, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE, drv_variable_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read file driver information")
/* Decode driver information */
@@ -661,11 +666,12 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
#endif
if(sblock->cache_info.is_dirty) {
+ H5P_genplist_t *dxpl; /* DXPL object */
uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE + H5F_MAX_DRVINFOBLOCK_SIZE]; /* Superblock & driver info blockencoding buffer */
- uint8_t *p; /* Ptr into encoding buffer */
- haddr_t rel_eoa; /* Relative EOA for file */
- size_t superblock_size; /* Size of superblock, in bytes */
- size_t driver_size; /* Size of driver info block (bytes)*/
+ uint8_t *p; /* Ptr into encoding buffer */
+ haddr_t rel_eoa; /* Relative EOA for file */
+ size_t superblock_size; /* Size of superblock, in bytes */
+ size_t driver_size; /* Size of driver info block (bytes)*/
/* Encode the common portion of the file superblock for all versions */
p = buf;
@@ -789,9 +795,13 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
/* Double check we didn't overrun the block (unlikely) */
HDassert(superblock_size <= sizeof(buf));
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Write superblock */
/* (always at relative address 0) */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write superblock")
/* Check for newer version of superblock format & superblock extension */
diff --git a/src/H5G.c b/src/H5G.c
index e16847d..419894d 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -224,16 +224,19 @@ H5G_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n = H5I_nmembers(H5I_GROUP)))
- H5I_clear_type(H5I_GROUP, FALSE, FALSE);
- else {
- /* Destroy the group object id group */
- H5I_dec_type_ref(H5I_GROUP);
-
- /* Mark closed */
- H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
- } /* end else */
+ if((n = H5I_nmembers(H5I_GROUP)))
+ H5I_clear_type(H5I_GROUP, FALSE, FALSE);
+ else {
+ /* Close deprecated interface */
+ n += H5G__term_deprec_interface();
+
+ /* Destroy the group object id group */
+ H5I_dec_type_ref(H5I_GROUP);
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ n = 1; /*H5I*/
+ } /* end else */
} /* end if */
FUNC_LEAVE_NOAPI(n)
@@ -543,7 +546,7 @@ H5G_get_create_plist(H5G_t *grp)
FUNC_ENTER_NOAPI(FAIL)
/* Copy the default group creation property list */
- if(NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_g)))
+ if(NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default group creation property list")
if((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to copy the creation property list")
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 9473011..17920ab 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -34,7 +34,7 @@
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5G_init_deprec_interface
+#define H5_INTERFACE_INIT_FUNC H5G__init_deprec_interface
/***********/
@@ -109,9 +109,9 @@ static H5G_obj_t H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx,
/*--------------------------------------------------------------------------
NAME
- H5G_init_deprec_interface -- Initialize interface-specific information
+ H5G__init_deprec_interface -- Initialize interface-specific information
USAGE
- herr_t H5G_init_deprec_interface()
+ herr_t H5G__init_deprec_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -120,12 +120,36 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5G_init_deprec_interface(void)
+H5G__init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5G__init())
-} /* H5G_init_deprec_interface() */
+} /* H5G__init_deprec_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5G__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5G__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5G__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5G__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 9f41cb9..9d56cab 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -352,6 +352,7 @@ H5_DLL herr_t H5G__traverse_special(const H5G_loc_t *grp_loc,
* Utility functions
*/
H5_DLL herr_t H5G__init(void);
+H5_DLL herr_t H5G__term_deprec_interface(void);
H5_DLL const char *H5G__component(const char *name, size_t *size_p);
/*
diff --git a/src/H5MF.c b/src/H5MF.c
index 956ec18..29e9ece 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -38,8 +38,9 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
+#include "H5Iprivate.h" /* IDs */
#include "H5MFpkg.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
@@ -600,6 +601,7 @@ herr_t
H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
hsize_t size)
{
+ H5F_io_info_t fio_info; /* I/O info for operation */
H5MF_free_section_t *node = NULL; /* Free space section pointer */
H5MF_sect_ud_t udata; /* User data for callback */
H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
@@ -620,8 +622,13 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN
if(H5F_addr_le(f->shared->tmp_addr, addr))
HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, FAIL, "attempting to free temporary file space")
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Check if the space to free intersects with the file's metadata accumulator */
- if(H5F_accum_free(f, dxpl_id, alloc_type, addr, size) < 0)
+ if(H5F__accum_free(&fio_info, alloc_type, addr, size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator")
/* Get free space type from allocation type */
@@ -843,7 +850,7 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si
hsize_t tot_fs_size = 0; /* Amount of all free space managed */
hsize_t tot_meta_size = 0; /* Amount of metadata for free space managers */
H5FD_mem_t type; /* Memory type for iteration */
- H5FD_mem_t fs_started[H5FD_MEM_NTYPES]; /* Indicate whether the free-space manager has been started */
+ hbool_t fs_started[H5FD_MEM_NTYPES]; /* Indicate whether the free-space manager has been started */
hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5P.c b/src/H5P.c
index 9489e49..e561385 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -25,7 +25,7 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5P_init_pub_interface
+#define H5_INTERFACE_INIT_FUNC H5P__init_pub_interface
/***********/
@@ -75,9 +75,9 @@ typedef struct {
/*--------------------------------------------------------------------------
NAME
- H5P_init_pub_interface -- Initialize interface-specific information
+ H5P__init_pub_interface -- Initialize interface-specific information
USAGE
- herr_t H5P_init_pub_interface()
+ herr_t H5P__init_pub_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -86,12 +86,36 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5P_init_pub_interface(void)
+H5P__init_pub_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5P_init())
-} /* H5P_init_pub_interface() */
+} /* H5P__init_pub_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5P__term_pub_interface -- Terminate interface
+USAGE
+ herr_t H5P__term_pub_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5P__term_pub_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5P__term_pub_interface() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Pacpl.c b/src/H5Pacpl.c
index b30bf1e..0a0641c 100644
--- a/src/H5Pacpl.c
+++ b/src/H5Pacpl.c
@@ -65,10 +65,13 @@
const H5P_libclass_t H5P_CLS_ACRT[1] = {{
"attribute create", /* Class name for debugging */
H5P_TYPE_ATTRIBUTE_CREATE, /* Class type */
- &H5P_CLS_STRING_CREATE_g, /* Parent class ID */
- &H5P_CLS_ATTRIBUTE_CREATE_g, /* Pointer to class ID */
- &H5P_LST_ATTRIBUTE_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_STRING_CREATE_g, /* Parent class */
+ &H5P_CLS_ATTRIBUTE_CREATE_g, /* Pointer to class */
+ &H5P_CLS_ATTRIBUTE_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_ATTRIBUTE_CREATE_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 5239fba..93d16bb 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -88,10 +88,13 @@ static herr_t H5P__dacc_reg_prop(H5P_genclass_t *pclass);
const H5P_libclass_t H5P_CLS_DACC[1] = {{
"dataset access", /* Class name for debugging */
H5P_TYPE_DATASET_ACCESS, /* Class type */
- &H5P_CLS_LINK_ACCESS_g, /* Parent class ID */
- &H5P_CLS_DATASET_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_DATASET_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_DATASET_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_DATASET_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATASET_ACCESS_ID_g, /* Pointer to default property list ID */
H5P__dacc_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -195,7 +198,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double
/* Check arguments. Note that we allow negative values - they are
* considered to "unset" the property. */
- if(rdcc_w0 > 1.0)
+ if(rdcc_w0 > (double)1.0f)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive, or H5D_CHUNK_CACHE_W0_DEFAULT");
/* Get the plist structure */
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 72c0cf8..13481f0 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -145,10 +145,13 @@ static int H5P__dcrt_ext_file_list_cmp(const void *value1, const void *value2, s
const H5P_libclass_t H5P_CLS_DCRT[1] = {{
"dataset create", /* Class name for debugging */
H5P_TYPE_DATASET_CREATE, /* Class type */
- &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
- &H5P_CLS_DATASET_CREATE_g, /* Pointer to class ID */
- &H5P_LST_DATASET_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_OBJECT_CREATE_g, /* Parent class */
+ &H5P_CLS_DATASET_CREATE_g, /* Pointer to class */
+ &H5P_CLS_DATASET_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATASET_CREATE_ID_g, /* Pointer to default property list ID */
H5P__dcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
H5P__dcrt_copy, /* Class copy callback */
@@ -2145,7 +2148,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5P_get_fill_value(H5P_genplist_t *plist, H5T_t *type, void *value/*out*/,
+H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value/*out*/,
hid_t dxpl_id)
{
H5O_fill_t fill; /* Fill value to retrieve */
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index cb5e10f..e4e91ac 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -34,7 +34,7 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5P_init_deprec_interface
+#define H5_INTERFACE_INIT_FUNC H5P__init_deprec_interface
/***********/
@@ -42,6 +42,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
@@ -84,9 +85,9 @@
/*--------------------------------------------------------------------------
NAME
- H5P_init_deprec_interface -- Initialize interface-specific information
+ H5P__init_deprec_interface -- Initialize interface-specific information
USAGE
- herr_t H5P_init_deprec_interface()
+ herr_t H5P__init_deprec_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -95,12 +96,36 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5P_init_deprec_interface(void)
+H5P__init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5P_init())
-} /* H5P_init_deprec_interface() */
+} /* H5P__init_deprec_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5P__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5P__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5P__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+
+ FUNC_LEAVE_NOAPI(0)
+} /* H5P__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index ae057f7..c6e71a6 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -214,10 +214,13 @@ static herr_t H5P__dxfr_xform_close(const char* name, size_t size, void* value);
const H5P_libclass_t H5P_CLS_DXFR[1] = {{
"data transfer", /* Class name for debugging */
H5P_TYPE_DATASET_XFER, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_DATASET_XFER_g, /* Pointer to class ID */
- &H5P_LST_DATASET_XFER_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_DATASET_XFER_g, /* Pointer to class */
+ &H5P_CLS_DATASET_XFER_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATASET_XFER_ID_g, /* Pointer to default property list ID */
H5P__dxfr_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 0c70c6c..3285ae3 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -24,8 +24,10 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+#ifdef NOT_YET
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5P_init_encdec_interface
+#endif /* NOT_YET */
/***********/
@@ -33,9 +35,11 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Ppkg.h" /* Property lists */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -78,6 +82,7 @@ typedef struct {
/*******************/
+#ifdef NOT_YET
/*--------------------------------------------------------------------------
NAME
@@ -98,6 +103,7 @@ H5P_init_encdec_interface(void)
FUNC_LEAVE_NOAPI(H5P_init())
} /* H5P_init_encdec_interface() */
+#endif /* NOT_YET */
/*-------------------------------------------------------------------------
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index a4c09e5..83e0a0f 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -37,17 +37,17 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
+#include "H5Fprivate.h" /* Files */
#include "H5FDprivate.h" /* File drivers */
#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory Management */
+#include "H5MMprivate.h" /* Memory Management */
#include "H5Ppkg.h" /* Property lists */
/* Includes needed to set as default file driver */
#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
#include "H5FDstdio.h" /* Standard C buffered I/O */
#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
+#include "H5FDwindows.h" /* Windows buffered I/O */
#endif
@@ -160,7 +160,16 @@
#define H5F_ACS_FILE_IMAGE_INFO_DEL H5P_file_image_info_del
#define H5F_ACS_FILE_IMAGE_INFO_COPY H5P_file_image_info_copy
#define H5F_ACS_FILE_IMAGE_INFO_CLOSE H5P_file_image_info_close
-
+/* Definition of core VFD write tracking flag */
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_SIZE sizeof(hbool_t)
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEF FALSE
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_ENC H5P__encode_hbool_t
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEC H5P__decode_hbool_t
+/* Definition of core VFD write tracking page size */
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_SIZE sizeof(size_t)
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEF 524288
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_ENC H5P__encode_size_t
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEC H5P__decode_size_t
/******************/
/* Local Typedefs */
@@ -204,10 +213,13 @@ static herr_t H5P__facc_multi_type_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_FACC[1] = {{
"file access", /* Class name for debugging */
H5P_TYPE_FILE_ACCESS, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_FILE_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_FILE_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_FILE_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_FILE_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_FILE_ACCESS_ID_g, /* Pointer to default property list ID */
H5P_facc_reg_prop, /* Default property registration routine */
+
H5P_facc_create, /* Class creation callback */
NULL, /* Class creation callback info */
H5P_facc_copy, /* Class copy callback */
@@ -246,8 +258,9 @@ static const H5FD_mem_t H5F_def_mem_type_g = H5F_ACS_MULTI_TYPE_DEF;
static const hbool_t H5F_def_latest_format_g = H5F_ACS_LATEST_FORMAT_DEF; /* Default setting for "use the latest version of the format" flag */
static const hbool_t H5F_def_want_posix_fd_g = H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */
static const unsigned H5F_def_efc_size_g = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */
-static const H5FD_file_image_info_t H5F_def_file_image_info_g = H5F_ACS_FILE_IMAGE_INFO_DEF; /* Default file image info and callbacks */
-
+static const H5FD_file_image_info_t H5F_def_file_image_info_g = H5F_ACS_FILE_IMAGE_INFO_DEF; /* Default file image info and callbacks */
+static const hbool_t H5F_def_core_write_tracking_flag_g = H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEF; /* Default setting for core VFD write tracking */
+static const size_t H5F_def_core_write_tracking_page_size_g = H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEF; /* Default core VFD write tracking page size */
/*-------------------------------------------------------------------------
@@ -397,6 +410,18 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass)
H5F_ACS_FILE_IMAGE_INFO_DEL, H5F_ACS_FILE_IMAGE_INFO_COPY, NULL, H5F_ACS_FILE_IMAGE_INFO_CLOSE) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ /* Register the core VFD backing store write tracking flag */
+ if(H5P_register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, H5F_ACS_CORE_WRITE_TRACKING_FLAG_SIZE, &H5F_def_core_write_tracking_flag_g ,
+ NULL, NULL, NULL, H5F_ACS_CORE_WRITE_TRACKING_FLAG_ENC, H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEC,
+ NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the size of the core VFD backing store page size */
+ if(H5P_register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_SIZE, &H5F_def_core_write_tracking_page_size_g ,
+ NULL, NULL, NULL, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_ENC, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEC,
+ NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_facc_reg_prop() */
@@ -1102,7 +1127,7 @@ H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts,
rdcc_w0);
/* Check arguments */
- if(rdcc_w0 < 0.0 || rdcc_w0 > 1.0)
+ if(rdcc_w0 < (double)0.0f || rdcc_w0 > (double)1.0f)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive")
/* Get the plist structure */
@@ -2980,3 +3005,76 @@ H5P__facc_multi_type_dec(const void **_pp, void *_value)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5P__facc_multi_type_dec() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pset_core_write_tracking
+ *
+ * Purpose: Enables/disables core VFD write tracking and page
+ * aggregation size.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE3("e", "ibz", plist_id, is_enabled, page_size);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Set values */
+ if(H5P_set(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, &is_enabled) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD write tracking flag")
+ if(H5P_set(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, &page_size) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD write tracking page size")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_core_write_tracking
+ *
+ * Purpose: Gets information about core VFD write tracking and page
+ * aggregation size.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled, size_t *page_size)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE3("e", "i*b*z", plist_id, is_enabled, page_size);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Get values */
+ if(is_enabled) {
+ if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, is_enabled) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core VFD write tracking flag")
+ } /* end if */
+
+ if(page_size) {
+ if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, page_size) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core VFD write tracking page size")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+}
+
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 3eb9c5b..aca589c 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -140,10 +140,13 @@ static herr_t H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_FCRT[1] = {{
"file create", /* Class name for debugging */
H5P_TYPE_FILE_CREATE, /* Class type */
- &H5P_CLS_GROUP_CREATE_g, /* Parent class ID */
- &H5P_CLS_FILE_CREATE_g, /* Pointer to class ID */
- &H5P_LST_FILE_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_GROUP_CREATE_g, /* Parent class */
+ &H5P_CLS_FILE_CREATE_g, /* Pointer to class */
+ &H5P_CLS_FILE_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_FILE_CREATE_ID_g, /* Pointer to default property list ID */
H5P_fcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c
index 1c4d3f4..875f101 100644
--- a/src/H5Pfmpl.c
+++ b/src/H5Pfmpl.c
@@ -35,6 +35,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
@@ -75,10 +76,13 @@ static herr_t H5P_fmnt_reg_prop(H5P_genclass_t *pclass);
const H5P_libclass_t H5P_CLS_FMNT[1] = {{
"file mount", /* Class name for debugging */
H5P_TYPE_FILE_MOUNT, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_FILE_MOUNT_g, /* Pointer to class ID */
- &H5P_LST_FILE_MOUNT_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_FILE_MOUNT_g, /* Pointer to class */
+ &H5P_CLS_FILE_MOUNT_ID_g, /* Pointer to class ID */
+ &H5P_LST_FILE_MOUNT_ID_g, /* Pointer to default property list ID */
H5P_fmnt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 0210700..b7d5106 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -34,7 +34,9 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Gprivate.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
+#include "H5Oprivate.h" /* Object headers */
#include "H5Ppkg.h" /* Property lists */
@@ -81,10 +83,13 @@ static herr_t H5P__gcrt_link_info_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_GCRT[1] = {{
"group create", /* Class name for debugging */
H5P_TYPE_GROUP_CREATE, /* Class type */
- &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
- &H5P_CLS_GROUP_CREATE_g, /* Pointer to class ID */
- &H5P_LST_GROUP_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_OBJECT_CREATE_g, /* Parent class */
+ &H5P_CLS_GROUP_CREATE_g, /* Pointer to class */
+ &H5P_CLS_GROUP_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_GROUP_CREATE_ID_g, /* Pointer to default property list ID */
H5P__gcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pint.c b/src/H5Pint.c
index c2a17ba..1545b6a 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -98,51 +98,71 @@ static int H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2);
* Predefined property list classes. These are initialized at runtime by
* H5P_init_interface() in this source file.
*/
-hid_t H5P_CLS_ROOT_g = FAIL;
-hid_t H5P_CLS_OBJECT_CREATE_g = FAIL;
-hid_t H5P_CLS_FILE_CREATE_g = FAIL;
-hid_t H5P_CLS_FILE_ACCESS_g = FAIL;
-hid_t H5P_CLS_DATASET_CREATE_g = FAIL;
-hid_t H5P_CLS_DATASET_ACCESS_g = FAIL;
-hid_t H5P_CLS_DATASET_XFER_g = FAIL;
-hid_t H5P_CLS_FILE_MOUNT_g = FAIL;
-hid_t H5P_CLS_GROUP_CREATE_g = FAIL;
-hid_t H5P_CLS_GROUP_ACCESS_g = FAIL;
-hid_t H5P_CLS_DATATYPE_CREATE_g = FAIL;
-hid_t H5P_CLS_DATATYPE_ACCESS_g = FAIL;
-hid_t H5P_CLS_ATTRIBUTE_CREATE_g = FAIL;
-hid_t H5P_CLS_OBJECT_COPY_g = FAIL;
-hid_t H5P_CLS_LINK_CREATE_g = FAIL;
-hid_t H5P_CLS_LINK_ACCESS_g = FAIL;
-hid_t H5P_CLS_STRING_CREATE_g = FAIL;
+hid_t H5P_CLS_ROOT_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_ROOT_g = NULL;
+hid_t H5P_CLS_OBJECT_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_OBJECT_CREATE_g = NULL;
+hid_t H5P_CLS_FILE_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_FILE_CREATE_g = NULL;
+hid_t H5P_CLS_FILE_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_FILE_ACCESS_g = NULL;
+hid_t H5P_CLS_DATASET_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATASET_CREATE_g = NULL;
+hid_t H5P_CLS_DATASET_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATASET_ACCESS_g = NULL;
+hid_t H5P_CLS_DATASET_XFER_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATASET_XFER_g = NULL;
+hid_t H5P_CLS_FILE_MOUNT_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_FILE_MOUNT_g = NULL;
+hid_t H5P_CLS_GROUP_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_GROUP_CREATE_g = NULL;
+hid_t H5P_CLS_GROUP_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g = NULL;
+hid_t H5P_CLS_DATATYPE_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g = NULL;
+hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g = NULL;
+hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g = NULL;
+hid_t H5P_CLS_OBJECT_COPY_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_OBJECT_COPY_g = NULL;
+hid_t H5P_CLS_LINK_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_LINK_CREATE_g = NULL;
+hid_t H5P_CLS_LINK_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_LINK_ACCESS_g = NULL;
+hid_t H5P_CLS_STRING_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_STRING_CREATE_g = NULL;
/*
* Predefined property lists for each predefined class. These are initialized
* at runtime by H5P_init_interface() in this source file.
*/
-hid_t H5P_LST_FILE_CREATE_g = FAIL;
-hid_t H5P_LST_FILE_ACCESS_g = FAIL;
-hid_t H5P_LST_DATASET_CREATE_g = FAIL;
-hid_t H5P_LST_DATASET_ACCESS_g = FAIL;
-hid_t H5P_LST_DATASET_XFER_g = FAIL;
-hid_t H5P_LST_FILE_MOUNT_g = FAIL;
-hid_t H5P_LST_GROUP_CREATE_g = FAIL;
-hid_t H5P_LST_GROUP_ACCESS_g = FAIL;
-hid_t H5P_LST_DATATYPE_CREATE_g = FAIL;
-hid_t H5P_LST_DATATYPE_ACCESS_g = FAIL;
-hid_t H5P_LST_ATTRIBUTE_CREATE_g = FAIL;
-hid_t H5P_LST_OBJECT_COPY_g = FAIL;
-hid_t H5P_LST_LINK_CREATE_g = FAIL;
-hid_t H5P_LST_LINK_ACCESS_g = FAIL;
+hid_t H5P_LST_FILE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_FILE_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_DATASET_CREATE_ID_g = FAIL;
+hid_t H5P_LST_DATASET_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_DATASET_XFER_ID_g = FAIL;
+hid_t H5P_LST_FILE_MOUNT_ID_g = FAIL;
+hid_t H5P_LST_GROUP_CREATE_ID_g = FAIL;
+hid_t H5P_LST_GROUP_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_DATATYPE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_DATATYPE_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_OBJECT_COPY_ID_g = FAIL;
+hid_t H5P_LST_LINK_CREATE_ID_g = FAIL;
+hid_t H5P_LST_LINK_ACCESS_ID_g = FAIL;
/* Root property list class library initialization object */
const H5P_libclass_t H5P_CLS_ROOT[1] = {{
"root", /* Class name for debugging */
H5P_TYPE_ROOT, /* Class type */
- NULL, /* Parent class ID */
- &H5P_CLS_ROOT_g, /* Pointer to class ID */
+
+ NULL, /* Parent class */
+ &H5P_CLS_ROOT_g, /* Pointer to class */
+ &H5P_CLS_ROOT_ID_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -156,10 +176,13 @@ const H5P_libclass_t H5P_CLS_ROOT[1] = {{
const H5P_libclass_t H5P_CLS_GACC[1] = {{
"group access", /* Class name for debugging */
H5P_TYPE_GROUP_ACCESS, /* Class type */
- &H5P_CLS_LINK_ACCESS_g, /* Parent class ID */
- &H5P_CLS_GROUP_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_GROUP_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_GROUP_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_GROUP_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_GROUP_ACCESS_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -173,10 +196,13 @@ const H5P_libclass_t H5P_CLS_GACC[1] = {{
const H5P_libclass_t H5P_CLS_TCRT[1] = {{
"datatype create", /* Class name for debugging */
H5P_TYPE_DATATYPE_CREATE, /* Class type */
- &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
- &H5P_CLS_DATATYPE_CREATE_g, /* Pointer to class ID */
- &H5P_LST_DATATYPE_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_OBJECT_CREATE_g, /* Parent class */
+ &H5P_CLS_DATATYPE_CREATE_g, /* Pointer to class */
+ &H5P_CLS_DATATYPE_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATATYPE_CREATE_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -190,10 +216,13 @@ const H5P_libclass_t H5P_CLS_TCRT[1] = {{
const H5P_libclass_t H5P_CLS_TACC[1] = {{
"datatype access", /* Class name for debugging */
H5P_TYPE_DATATYPE_ACCESS, /* Class type */
- &H5P_CLS_LINK_ACCESS_g, /* Parent class ID */
- &H5P_CLS_DATATYPE_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_DATATYPE_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_DATATYPE_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_DATATYPE_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATATYPE_ACCESS_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -425,37 +454,27 @@ H5P_init_interface(void)
/* Check if the current class hasn't been initialized and can be now */
HDassert(lib_class->class_id);
- if(*lib_class->class_id == (-1) && (lib_class->par_class_id == NULL
- || *lib_class->par_class_id > 0)) {
- H5P_genclass_t *par_pclass = NULL; /* Parent class of new class */
- H5P_genclass_t *new_pclass; /* New property list class created */
-
+ if(*lib_class->class_id == (-1) && (lib_class->par_pclass == NULL
+ || *lib_class->par_pclass != NULL)) {
/* Sanity check - only the root class is not allowed to have a parent class */
- HDassert(lib_class->par_class_id || lib_class == H5P_CLS_ROOT);
-
- /* Check for parent class */
- if(lib_class->par_class_id) {
- /* Get the pointer to the parent class */
- if(NULL == (par_pclass = (H5P_genclass_t *)H5I_object(*lib_class->par_class_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
- } /* end if */
+ HDassert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
/* Allocate the new class */
- if(NULL == (new_pclass = H5P_create_class(par_pclass, lib_class->name, lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data)))
+ if(NULL == (*lib_class->pclass = H5P_create_class(lib_class->par_pclass ? *lib_class->par_pclass : NULL, lib_class->name, lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "class initialization failed")
/* Call routine to register properties for class */
- if(lib_class->reg_prop_func && (*lib_class->reg_prop_func)(new_pclass) < 0)
+ if(lib_class->reg_prop_func && (*lib_class->reg_prop_func)(*lib_class->pclass) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register properties")
/* Register the new class */
- if((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, new_pclass, FALSE)) < 0)
+ if((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, *lib_class->pclass, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class")
/* Only register the default property list if it hasn't been created yet */
if(lib_class->def_plist_id && *lib_class->def_plist_id == (-1)) {
/* Register the default property list for the new class*/
- if((*lib_class->def_plist_id = H5P_create_id(new_pclass, FALSE)) < 0)
+ if((*lib_class->def_plist_id = H5P_create_id(*lib_class->pclass, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register default property list for class")
} /* end if */
@@ -516,20 +535,20 @@ H5P_term_interface(void)
/* Reset the default property lists, if they've been closed */
if(H5I_nmembers(H5I_GENPROP_LST)==0) {
- H5P_LST_FILE_CREATE_g =
- H5P_LST_FILE_ACCESS_g =
- H5P_LST_DATASET_CREATE_g =
- H5P_LST_DATASET_ACCESS_g =
- H5P_LST_DATASET_XFER_g =
- H5P_LST_GROUP_CREATE_g =
- H5P_LST_GROUP_ACCESS_g =
- H5P_LST_DATATYPE_CREATE_g =
- H5P_LST_DATATYPE_ACCESS_g =
- H5P_LST_ATTRIBUTE_CREATE_g =
- H5P_LST_OBJECT_COPY_g =
- H5P_LST_LINK_CREATE_g =
- H5P_LST_LINK_ACCESS_g =
- H5P_LST_FILE_MOUNT_g = (-1);
+ H5P_LST_FILE_CREATE_ID_g =
+ H5P_LST_FILE_ACCESS_ID_g =
+ H5P_LST_DATASET_CREATE_ID_g =
+ H5P_LST_DATASET_ACCESS_ID_g =
+ H5P_LST_DATASET_XFER_ID_g =
+ H5P_LST_GROUP_CREATE_ID_g =
+ H5P_LST_GROUP_ACCESS_ID_g =
+ H5P_LST_DATATYPE_CREATE_ID_g =
+ H5P_LST_DATATYPE_ACCESS_ID_g =
+ H5P_LST_ATTRIBUTE_CREATE_ID_g =
+ H5P_LST_OBJECT_COPY_ID_g =
+ H5P_LST_LINK_CREATE_ID_g =
+ H5P_LST_LINK_ACCESS_ID_g =
+ H5P_LST_FILE_MOUNT_ID_g = (-1);
} /* end if */
} /* end if */
@@ -555,10 +574,34 @@ H5P_term_interface(void)
H5P_CLS_OBJECT_COPY_g =
H5P_CLS_LINK_CREATE_g =
H5P_CLS_LINK_ACCESS_g =
- H5P_CLS_FILE_MOUNT_g = (-1);
+ H5P_CLS_FILE_MOUNT_g = NULL;
+
+ H5P_CLS_ROOT_ID_g =
+ H5P_CLS_OBJECT_CREATE_ID_g =
+ H5P_CLS_FILE_CREATE_ID_g =
+ H5P_CLS_FILE_ACCESS_ID_g =
+ H5P_CLS_DATASET_CREATE_ID_g =
+ H5P_CLS_DATASET_ACCESS_ID_g =
+ H5P_CLS_DATASET_XFER_ID_g =
+ H5P_CLS_GROUP_CREATE_ID_g =
+ H5P_CLS_GROUP_ACCESS_ID_g =
+ H5P_CLS_DATATYPE_CREATE_ID_g =
+ H5P_CLS_DATATYPE_ACCESS_ID_g =
+ H5P_CLS_STRING_CREATE_ID_g =
+ H5P_CLS_ATTRIBUTE_CREATE_ID_g =
+ H5P_CLS_OBJECT_COPY_ID_g =
+ H5P_CLS_LINK_CREATE_ID_g =
+ H5P_CLS_LINK_ACCESS_ID_g =
+ H5P_CLS_FILE_MOUNT_ID_g = (-1);
} /* end if */
} /* end if */
} else {
+ /* Close public interface */
+ n += H5P__term_pub_interface();
+
+ /* Close deprecated interface */
+ n += H5P__term_deprec_interface();
+
H5I_dec_type_ref(H5I_GENPROP_LST);
n++; /*H5I*/
H5I_dec_type_ref(H5I_GENPROP_CLS);
@@ -2882,41 +2925,6 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_get_class
- PURPOSE
- Internal routine to query the class of a generic property list
- USAGE
- H5P_genclass_t *H5P_get_class(plist)
- H5P_genplist_t *plist; IN: Property list to check
- RETURNS
- Success: Pointer to the class for a property list
- Failure: NULL
- DESCRIPTION
- This routine retrieves a pointer to the class for a property list.
-
- GLOBAL VARIABLES
- COMMENTS, BUGS, ASSUMPTIONS
- EXAMPLES
- REVISION LOG
---------------------------------------------------------------------------*/
-H5P_genclass_t *
-H5P_get_class(const H5P_genplist_t *plist)
-{
- H5P_genclass_t *ret_value; /* return value */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- HDassert(plist);
-
- /* Get property size */
- ret_value = plist->pclass;
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_class() */
-
-
-/*--------------------------------------------------------------------------
- NAME
H5P_get_nprops_plist
PURPOSE
Internal routine to query the number of properties in a property list
@@ -3347,12 +3355,12 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_isa_class_real
+ H5P_class_isa
PURPOSE
Internal routine to query whether a property class is the same as another
class.
USAGE
- htri_t H5P_isa_class_real(pclass1, pclass2)
+ htri_t H5P_class_isa(pclass1, pclass2)
H5P_genclass_t *pclass1; IN: Property class to check
H5P_genclass_t *pclass2; IN: Property class to compare with
RETURNS
@@ -3368,12 +3376,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static htri_t
-H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2)
+htri_t
+H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
{
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pclass1);
HDassert(pclass2);
@@ -3384,14 +3392,14 @@ H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2)
} else {
/* Check if the class is derived, and walk up the chain, if so */
if(pclass1->parent != NULL)
- ret_value = H5P_isa_class_real(pclass1->parent, pclass2);
+ ret_value = H5P_class_isa(pclass1->parent, pclass2);
else
HGOTO_DONE(FALSE);
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_isa_class_real() */
+} /* H5P_class_isa() */
/*--------------------------------------------------------------------------
@@ -3435,7 +3443,7 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class")
/* Compare the property list's class against the other class */
- if((ret_value = H5P_isa_class_real(plist->pclass, pclass)) < 0)
+ if((ret_value = H5P_class_isa(plist->pclass, pclass)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes")
done:
@@ -5015,67 +5023,67 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
/* Instantiate a property list of the proper type */
switch(type) {
case H5P_TYPE_OBJECT_CREATE:
- class_id = H5P_CLS_OBJECT_CREATE_g;
+ class_id = H5P_CLS_OBJECT_CREATE_ID_g;
break;
case H5P_TYPE_FILE_CREATE:
- class_id = H5P_CLS_FILE_CREATE_g;
+ class_id = H5P_CLS_FILE_CREATE_ID_g;
break;
case H5P_TYPE_FILE_ACCESS:
- class_id = H5P_CLS_FILE_ACCESS_g;
+ class_id = H5P_CLS_FILE_ACCESS_ID_g;
break;
case H5P_TYPE_DATASET_CREATE:
- class_id = H5P_CLS_DATASET_CREATE_g;
+ class_id = H5P_CLS_DATASET_CREATE_ID_g;
break;
case H5P_TYPE_DATASET_ACCESS:
- class_id = H5P_CLS_DATASET_ACCESS_g;
+ class_id = H5P_CLS_DATASET_ACCESS_ID_g;
break;
case H5P_TYPE_DATASET_XFER:
- class_id = H5P_CLS_DATASET_XFER_g;
+ class_id = H5P_CLS_DATASET_XFER_ID_g;
break;
case H5P_TYPE_FILE_MOUNT:
- class_id = H5P_CLS_FILE_MOUNT_g;
+ class_id = H5P_CLS_FILE_MOUNT_ID_g;
break;
case H5P_TYPE_GROUP_CREATE:
- class_id = H5P_CLS_GROUP_CREATE_g;
+ class_id = H5P_CLS_GROUP_CREATE_ID_g;
break;
case H5P_TYPE_GROUP_ACCESS:
- class_id = H5P_CLS_GROUP_ACCESS_g;
+ class_id = H5P_CLS_GROUP_ACCESS_ID_g;
break;
case H5P_TYPE_DATATYPE_CREATE:
- class_id = H5P_CLS_DATATYPE_CREATE_g;
+ class_id = H5P_CLS_DATATYPE_CREATE_ID_g;
break;
case H5P_TYPE_DATATYPE_ACCESS:
- class_id = H5P_CLS_DATATYPE_ACCESS_g;
+ class_id = H5P_CLS_DATATYPE_ACCESS_ID_g;
break;
case H5P_TYPE_STRING_CREATE:
- class_id = H5P_CLS_STRING_CREATE_g;
+ class_id = H5P_CLS_STRING_CREATE_ID_g;
break;
case H5P_TYPE_ATTRIBUTE_CREATE:
- class_id = H5P_CLS_ATTRIBUTE_CREATE_g;
+ class_id = H5P_CLS_ATTRIBUTE_CREATE_ID_g;
break;
case H5P_TYPE_OBJECT_COPY:
- class_id = H5P_CLS_OBJECT_COPY_g;
+ class_id = H5P_CLS_OBJECT_COPY_ID_g;
break;
case H5P_TYPE_LINK_CREATE:
- class_id = H5P_CLS_LINK_CREATE_g;
+ class_id = H5P_CLS_LINK_CREATE_ID_g;
break;
case H5P_TYPE_LINK_ACCESS:
- class_id = H5P_CLS_LINK_ACCESS_g;
+ class_id = H5P_CLS_LINK_ACCESS_ID_g;
break;
case H5P_TYPE_USER: /* shut compiler warnings up */
@@ -5097,3 +5105,59 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__new_plist_of_type() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5P_get_plist_id
+ *
+ * Purpose: Quick and dirty routine to retrieve property list ID from
+ * property list structure.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5P_genplist_t data structure)
+ *
+ * Return: Success: Non-negative ID of property list.
+ * Failure: negative.
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * April 22, 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5P_get_plist_id(const H5P_genplist_t *plist)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(plist);
+
+ FUNC_LEAVE_NOAPI(plist->plist_id)
+} /* end H5P_get_plist_id() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5P_get_class
+ *
+ * Purpose: Quick and dirty routine to retrieve property list class from
+ * property list structure.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5P_genplist_t data structure)
+ *
+ * Return: Success: Non-NULL class of property list.
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * April 22, 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+H5P_genclass_t *
+H5P_get_class(const H5P_genplist_t *plist)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(plist);
+
+ FUNC_LEAVE_NOAPI(plist->pclass)
+} /* end H5P_get_class() */
+
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 676b574..0d39b6c 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -123,10 +123,13 @@ static herr_t H5P_lacc_elink_fapl_close(const char* name, size_t size, void* val
const H5P_libclass_t H5P_CLS_LACC[1] = {{
"link access", /* Class name for debugging */
H5P_TYPE_LINK_ACCESS, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_LINK_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_LINK_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_LINK_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_LINK_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_LINK_ACCESS_ID_g, /* Pointer to default property list ID */
H5P_lacc_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index d81d55c..cde2035 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -77,10 +77,13 @@ static herr_t H5P_lcrt_reg_prop(H5P_genclass_t *pclass);
const H5P_libclass_t H5P_CLS_LCRT[1] = {{
"link create", /* Class name for debugging */
H5P_TYPE_LINK_CREATE, /* Class type */
- &H5P_CLS_STRING_CREATE_g, /* Parent class ID */
- &H5P_CLS_LINK_CREATE_g, /* Pointer to class ID */
- &H5P_LST_LINK_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_STRING_CREATE_g, /* Parent class */
+ &H5P_CLS_LINK_CREATE_g, /* Pointer to class */
+ &H5P_CLS_LINK_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_LINK_CREATE_ID_g, /* Pointer to default property list ID */
H5P_lcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index df4ebb6..37beb90 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -104,10 +104,13 @@ static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter,
const H5P_libclass_t H5P_CLS_OCRT[1] = {{
"object create", /* Class name for debugging */
H5P_TYPE_OBJECT_CREATE, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class */
+ &H5P_CLS_OBJECT_CREATE_ID_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
H5P__ocrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
H5P__ocrt_copy, /* Class copy callback */
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index e5e5f51..fd4d968 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -38,6 +38,7 @@
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* Object headers */
#include "H5Ppkg.h" /* Property lists */
@@ -100,10 +101,13 @@ static herr_t H5P__ocpy_merge_comm_dt_list_close(const char* name, size_t size,
const H5P_libclass_t H5P_CLS_OCPY[1] = {{
"object copy", /* Class name for debugging */
H5P_TYPE_OBJECT_COPY, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_OBJECT_COPY_g, /* Pointer to class ID */
- &H5P_LST_OBJECT_COPY_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_OBJECT_COPY_g, /* Pointer to class */
+ &H5P_CLS_OBJECT_COPY_ID_g, /* Pointer to class ID */
+ &H5P_LST_OBJECT_COPY_ID_g, /* Pointer to default property list ID */
H5P__ocpy_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 835b766..fb8b8e9 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -127,7 +127,8 @@ typedef struct H5P_libclass_t {
const char *name; /* Class name */
H5P_plist_type_t type; /* Class type */
- hid_t const * const par_class_id; /* Pointer to global parent class property list class ID */
+ H5P_genclass_t * * par_pclass; /* Pointer to global parent class property list class */
+ H5P_genclass_t * * pclass; /* Pointer to global property list class */
hid_t * const class_id; /* Pointer to global property list class ID */
hid_t * const def_plist_id; /* Pointer to global default property list ID */
H5P_reg_prop_func_t reg_prop_func; /* Register class's properties */
@@ -144,6 +145,9 @@ typedef struct H5P_libclass_t {
/* Property list/class iterator callback function pointer */
typedef int (*H5P_iterate_int_t)(H5P_genprop_t *prop, void *udata);
+/* Forward declarations (for prototypes & struct definitions) */
+struct H5Z_filter_info_t;
+
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -154,6 +158,8 @@ typedef int (*H5P_iterate_int_t)(H5P_genprop_t *prop, void *udata);
/******************************/
/* Private functions, not part of the publicly documented API */
+H5_DLL herr_t H5P__term_pub_interface(void);
+H5_DLL herr_t H5P__term_deprec_interface(void);
H5_DLL H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class,
const char *name, H5P_plist_type_t type,
H5P_cls_create_func_t cls_create, void *create_data,
@@ -181,7 +187,6 @@ H5_DLL herr_t H5P_get_size_plist(const H5P_genplist_t *plist, const char *name,
size_t *size);
H5_DLL herr_t H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name,
size_t *size);
-H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
H5_DLL herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops);
H5_DLL int H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
H5_DLL herr_t H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
@@ -197,9 +202,6 @@ H5_DLL char *H5P_get_class_path(H5P_genclass_t *pclass);
H5_DLL H5P_genclass_t *H5P_open_class_path(const char *path);
H5_DLL H5P_genclass_t *H5P_get_class_parent(const H5P_genclass_t *pclass);
H5_DLL herr_t H5P_close_class(void *_pclass);
-H5_DLL herr_t H5P_get_filter(const H5Z_filter_info_t *filter,
- unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
- size_t namelen, char name[], unsigned *filter_config);
H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name);
H5_DLL hid_t H5P__new_plist_of_type(H5P_plist_type_t type);
@@ -220,6 +222,11 @@ H5_DLL herr_t H5P__decode_uint8_t(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_hbool_t(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_double(const void **_pp, void *value);
+/* Private OCPL routines */
+H5_DLL herr_t H5P_get_filter(const struct H5Z_filter_info_t *filter,
+ unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
+ size_t namelen, char name[], unsigned *filter_config);
+
/* Testing functions */
#ifdef H5P_TESTING
H5_DLL char *H5P_get_class_path_test(hid_t pclass_id);
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 083619b..7233818 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -24,7 +24,6 @@
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
-#include "H5Oprivate.h" /* Object headers */
/**************************/
/* Library Private Macros */
@@ -33,11 +32,24 @@
/* ======== String creation property names ======== */
#define H5P_STRCRT_CHAR_ENCODING_NAME "character_encoding" /* Character set encoding for string */
+/* If the module using this macro is allowed access to the private variables, access them directly */
+#ifdef H5P_PACKAGE
+#define H5P_PLIST_ID(P) ((P)->plist_id)
+#define H5P_CLASS(P) ((P)->pclass)
+#else /* H5F_PACKAGE */
+#define H5P_PLIST_ID(P) (H5P_get_plist_id(P))
+#define H5P_CLASS(P) (H5P_get_class(P))
+#endif /* H5P_PACKAGE */
+
/****************************/
/* Library Private Typedefs */
/****************************/
+/* Forward declarations (for prototypes & type definitions) */
+struct H5O_fill_t;
+struct H5T_t;
+
/* Forward declarations for anonymous H5P objects */
typedef struct H5P_genplist_t H5P_genplist_t;
typedef struct H5P_genclass_t H5P_genclass_t;
@@ -68,6 +80,25 @@ typedef enum H5P_plist_type_t {
/* Library Private Variables */
/*****************************/
+/* Predefined property list classes. */
+H5_DLLVAR H5P_genclass_t *H5P_CLS_ROOT_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_OBJECT_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_FILE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_FILE_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATASET_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATASET_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATASET_XFER_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_FILE_MOUNT_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_OBJECT_COPY_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_STRING_CREATE_g;
+
/******************************/
/* Library Private Prototypes */
@@ -89,6 +120,7 @@ H5_DLL herr_t H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
H5_DLL herr_t H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name);
H5_DLL htri_t H5P_exist_plist(const H5P_genplist_t *plist, const char *name);
+H5_DLL htri_t H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass);
H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops,
hbool_t recurse);
@@ -99,7 +131,7 @@ H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id,
H5_DLL herr_t H5P_set_vlen_mem_manager(H5P_genplist_t *plist,
H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func,
void *free_info);
-H5_DLL herr_t H5P_is_fill_value_defined(const H5O_fill_t *fill,
+H5_DLL herr_t H5P_is_fill_value_defined(const struct H5O_fill_t *fill,
H5D_fill_value_t *status);
H5_DLL int H5P_fill_value_cmp(const void *value1, const void *value2,
size_t size);
@@ -110,6 +142,10 @@ H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id,
size_t namelen, char name[], unsigned *filter_config);
H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id);
+/* Query internal fields of the property list struct */
+H5_DLL hid_t H5P_get_plist_id(const H5P_genplist_t *plist);
+H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
+
/* *SPECIAL* Don't make more of these! -QAK */
H5_DLL htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id);
H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id);
@@ -123,7 +159,7 @@ H5_DLL size_t H5P_peek_size_t(H5P_genplist_t *plist, const char *name);
/* Private DCPL routines */
H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist,
H5D_fill_value_t *status);
-H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, H5T_t *type,
+H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, const struct H5T_t *type,
void *value, hid_t dxpl_id);
#endif /* _H5Pprivate_H */
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index b262db3..5e0db5d 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -52,41 +52,41 @@
* The library's property list classes
*/
-#define H5P_ROOT (H5OPEN H5P_CLS_ROOT_g)
-#define H5P_OBJECT_CREATE (H5OPEN H5P_CLS_OBJECT_CREATE_g)
-#define H5P_FILE_CREATE (H5OPEN H5P_CLS_FILE_CREATE_g)
-#define H5P_FILE_ACCESS (H5OPEN H5P_CLS_FILE_ACCESS_g)
-#define H5P_DATASET_CREATE (H5OPEN H5P_CLS_DATASET_CREATE_g)
-#define H5P_DATASET_ACCESS (H5OPEN H5P_CLS_DATASET_ACCESS_g)
-#define H5P_DATASET_XFER (H5OPEN H5P_CLS_DATASET_XFER_g)
-#define H5P_FILE_MOUNT (H5OPEN H5P_CLS_FILE_MOUNT_g)
-#define H5P_GROUP_CREATE (H5OPEN H5P_CLS_GROUP_CREATE_g)
-#define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_g)
-#define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_g)
-#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_g)
-#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_g)
-#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_g)
-#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_g)
-#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_g)
-#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_g)
+#define H5P_ROOT (H5OPEN H5P_CLS_ROOT_ID_g)
+#define H5P_OBJECT_CREATE (H5OPEN H5P_CLS_OBJECT_CREATE_ID_g)
+#define H5P_FILE_CREATE (H5OPEN H5P_CLS_FILE_CREATE_ID_g)
+#define H5P_FILE_ACCESS (H5OPEN H5P_CLS_FILE_ACCESS_ID_g)
+#define H5P_DATASET_CREATE (H5OPEN H5P_CLS_DATASET_CREATE_ID_g)
+#define H5P_DATASET_ACCESS (H5OPEN H5P_CLS_DATASET_ACCESS_ID_g)
+#define H5P_DATASET_XFER (H5OPEN H5P_CLS_DATASET_XFER_ID_g)
+#define H5P_FILE_MOUNT (H5OPEN H5P_CLS_FILE_MOUNT_ID_g)
+#define H5P_GROUP_CREATE (H5OPEN H5P_CLS_GROUP_CREATE_ID_g)
+#define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_ID_g)
+#define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_ID_g)
+#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_ID_g)
+#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_ID_g)
+#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_ID_g)
+#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_ID_g)
+#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_ID_g)
+#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_ID_g)
/*
* The library's default property lists
*/
-#define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_g)
-#define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_g)
-#define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_g)
-#define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_g)
-#define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_g)
-#define H5P_FILE_MOUNT_DEFAULT (H5OPEN H5P_LST_FILE_MOUNT_g)
-#define H5P_GROUP_CREATE_DEFAULT (H5OPEN H5P_LST_GROUP_CREATE_g)
-#define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_g)
-#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_g)
-#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_g)
-#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_g)
-#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_g)
-#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_g)
-#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_g)
+#define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_ID_g)
+#define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_ID_g)
+#define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_ID_g)
+#define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_ID_g)
+#define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_ID_g)
+#define H5P_FILE_MOUNT_DEFAULT (H5OPEN H5P_LST_FILE_MOUNT_ID_g)
+#define H5P_GROUP_CREATE_DEFAULT (H5OPEN H5P_LST_GROUP_CREATE_ID_g)
+#define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_ID_g)
+#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_ID_g)
+#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_ID_g)
+#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_ID_g)
+#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g)
+#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_ID_g)
+#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_ID_g)
/* Common creation order flags (for links in groups and attributes on objects) */
#define H5P_CRT_ORDER_TRACKED 0x0001
@@ -172,40 +172,40 @@ typedef enum H5D_mpio_no_collective_cause_t {
/* Property list class IDs */
/* (Internal to library, do not use! Use macros above) */
-H5_DLLVAR hid_t H5P_CLS_ROOT_g;
-H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_g;
-H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_g;
-H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_g;
+H5_DLLVAR hid_t H5P_CLS_ROOT_ID_g;
+H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_ID_g;
+H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_ID_g;
+H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_ID_g;
+H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_ID_g;
/* Default roperty list IDs */
/* (Internal to library, do not use! Use macros above) */
-H5_DLLVAR hid_t H5P_LST_FILE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_XFER_g;
-H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_g;
-H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_g;
-H5_DLLVAR hid_t H5P_LST_LINK_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_g;
+H5_DLLVAR hid_t H5P_LST_FILE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATASET_XFER_ID_g;
+H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_ID_g;
+H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g;
+H5_DLLVAR hid_t H5P_LST_LINK_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g;
/*********************/
/* Public Prototypes */
@@ -296,7 +296,6 @@ H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list
H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold);
H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold);
-
/* File access property list (FAPL) routines */
H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold,
hsize_t alignment);
@@ -344,6 +343,9 @@ H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id,
H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id,
H5FD_file_image_callbacks_t *callbacks_ptr);
+H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size);
+H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size);
+
/* Dataset creation property list (DCPL) routines */
H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id);
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index bedacb0..3ba625e 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -34,6 +34,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
@@ -80,10 +81,13 @@ static herr_t H5P__strcrt_char_encoding_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_STRCRT[1] = {{
"string create", /* Class name for debugging */
H5P_TYPE_STRING_CREATE, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_STRING_CREATE_g, /* Pointer to class ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_STRING_CREATE_g, /* Pointer to class */
+ &H5P_CLS_STRING_CREATE_ID_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
H5P__strcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5R.c b/src/H5R.c
index 95d8548..b453295 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -165,6 +165,9 @@ H5R_term_interface(void)
if ((n=H5I_nmembers(H5I_REFERENCE))) {
H5I_clear_type(H5I_REFERENCE, FALSE, FALSE);
} else {
+ /* Close deprecated interface */
+ n += H5R__term_deprec_interface();
+
H5I_dec_type_ref(H5I_REFERENCE);
H5_interface_initialize_g = 0;
n = 1; /*H5I*/
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index d0c79a8..ea30913 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -34,7 +34,7 @@
#define H5R_PACKAGE /*suppress error about including H5Rpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5R_init_deprec_interface
+#define H5_INTERFACE_INIT_FUNC H5R__init_deprec_interface
/***********/
@@ -48,7 +48,7 @@
#include "H5Rpkg.h" /* References */
#include "H5Ppublic.h" /* for using H5P_DATASET_ACCESS_DEFAULT */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
+
/****************/
/* Local Macros */
/****************/
@@ -87,9 +87,9 @@
/*--------------------------------------------------------------------------
NAME
- H5R_init_deprec_interface -- Initialize interface-specific information
+ H5R__init_deprec_interface -- Initialize interface-specific information
USAGE
- herr_t H5R_init_deprec_interface()
+ herr_t H5R__init_deprec_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -98,13 +98,38 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5R_init_deprec_interface(void)
+H5R__init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5R_init())
-} /* H5R_init_deprec_interface() */
+} /* H5R__init_deprec_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5R__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5R__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5R__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ FUNC_LEAVE_NOAPI(0)
+} /* H5R__term_deprec_interface() */
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index 8c66a90..fd16754 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -55,6 +55,7 @@
/* General functions */
H5_DLL herr_t H5R_init(void);
+H5_DLL herr_t H5R__term_deprec_interface(void);
H5_DLL herr_t H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type,
const void *_ref, H5O_type_t *obj_type);
H5_DLL hid_t H5R_dereference(H5F_t *file, hid_t dapl_id, hid_t dxpl_id, H5R_type_t ref_type,
diff --git a/src/H5T.c b/src/H5T.c
index d545c4e..83e8f24 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -770,7 +770,6 @@ H5T_init_interface(void)
hsize_t dim[1]={1}; /* Dimension info for array datatype */
herr_t status;
unsigned copied_dtype=1; /* Flag to indicate whether datatype was copied or allocated (for error cleanup) */
- H5P_genclass_t *crt_pclass; /* Property list class for datatype creation properties */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1347,21 +1346,17 @@ H5T_init_interface(void)
if (status<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)")
- /* ========== Datatype Creation Property Class Initialization ============*/
- HDassert(H5P_CLS_DATATYPE_CREATE_g!=-1);
-
- /* Get the pointer to group creation class */
- if(NULL == (crt_pclass = (H5P_genclass_t *)H5I_object(H5P_CLS_DATATYPE_CREATE_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
/* Register datatype creation property class properties here. See similar
* code in H5D_init_interface(), etc. for example.
*/
/* Only register the default property list if it hasn't been created yet */
- if(H5P_LST_DATATYPE_CREATE_g == (-1)) {
+ if(H5P_LST_DATATYPE_CREATE_ID_g == (-1)) {
+ /* ========== Datatype Creation Property Class Initialization ============*/
+ HDassert(H5P_CLS_DATATYPE_CREATE_g != NULL);
+
/* Register the default datatype creation property list */
- if((H5P_LST_DATATYPE_CREATE_g = H5P_create_id(crt_pclass, FALSE)) < 0)
+ if((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
} /* end if */
@@ -1487,6 +1482,10 @@ H5T_term_interface(void)
/* Unlock all datatypes, then free them */
/* note that we are ignoring the return value from H5I_iterate() */
H5I_iterate(H5I_DATATYPE, H5T_unlock_cb, NULL, FALSE);
+
+ /* Close deprecated interface */
+ n += H5T__term_deprec_interface();
+
H5I_dec_type_ref(H5I_DATATYPE);
/* Reset all the datatype IDs */
diff --git a/src/H5TS.c b/src/H5TS.c
index 6f661ad..b69bd4d 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -56,8 +56,6 @@ H5TS_key_t H5TS_cancel_key_g;
* PROGRAMMER: Quincey Koziol
* February 7, 2003
*
- * MODIFICATIONS:
- *
*--------------------------------------------------------------------------
*/
static void
@@ -68,39 +66,9 @@ H5TS_key_destructor(void *key_val)
HDfree(key_val);
}
-#ifdef H5_HAVE_WIN_THREADS
-/*--------------------------------------------------------------------------
- * NAME
- * H5TS_win32_first_thread_init
- *
- * USAGE
- * H5TS_win32_first_thread_init()
- *
- * RETURNS
- *
- * DESCRIPTION
- * Special function on windows needed to call the H5TS_first_thread_init
- * function.
- *
- * PROGRAMMER: Mike McGreevy
- * September 1, 2010
- *
- * MODIFICATIONS:
- *
- *--------------------------------------------------------------------------
- */
-BOOL CALLBACK
-H5TS_win32_first_thread_init(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex)
-{
- InitializeCriticalSection ( &H5_g.init_lock.CriticalSection );
- H5TS_errstk_key_g = TlsAlloc();
- H5TS_funcstk_key_g = TlsAlloc();
- H5TS_cancel_key_g = TlsAlloc();
+#ifndef H5_HAVE_WIN_THREADS
- return TRUE;
-} /* H5TS_win32_first_thread_init() */
-#else /* H5_HAVE_WIN_THREADS */
/*--------------------------------------------------------------------------
* NAME
* H5TS_pthread_first_thread_init
@@ -118,8 +86,6 @@ H5TS_win32_first_thread_init(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpCont
* PROGRAMMER: Chee Wai LEE
* May 2, 2000
*
- * MODIFICATIONS:
- *
*--------------------------------------------------------------------------
*/
void
@@ -149,6 +115,7 @@ H5TS_pthread_first_thread_init(void)
}
#endif /* H5_HAVE_WIN_THREADS */
+
/*--------------------------------------------------------------------------
* NAME
* H5TS_mutex_lock
@@ -167,11 +134,6 @@ H5TS_pthread_first_thread_init(void)
* PROGRAMMER: Chee Wai LEE
* May 2, 2000
*
- * MODIFICATIONS:
- *
- * 19 May 2000, Bill Wendling
- * Changed (*foo). form of accessing structure members to the -> form.
- *
*--------------------------------------------------------------------------
*/
herr_t
@@ -203,6 +165,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex)
#endif /* H5_HAVE_WIN_THREADS */
}
+
/*--------------------------------------------------------------------------
* NAME
* H5TS_mutex_unlock
@@ -221,12 +184,6 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex)
* PROGRAMMER: Chee Wai LEE
* May 2, 2000
*
- * MODIFICATIONS:
- *
- * 19 May 2000, Bill Wendling
- * Changed (*foo). form of accessing structure members to the -> form.
- * Also gave the function a return value.
- *
*--------------------------------------------------------------------------
*/
herr_t
@@ -258,6 +215,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex)
#endif /* H5_HAVE_WIN_THREADS */
} /* H5TS_mutex_unlock */
+
/*--------------------------------------------------------------------------
* NAME
* H5TS_cancel_count_inc
@@ -280,12 +238,6 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex)
* PROGRAMMER: Chee Wai LEE
* May 2, 2000
*
- * MODIFICATIONS:
- *
- * 19 May 2000, Bill Wendling
- * Changed function to return a value. Also changed the malloc() call to
- * the H5MM_malloc() call and checked the returned pointer.
- *
*--------------------------------------------------------------------------
*/
herr_t
@@ -328,6 +280,7 @@ H5TS_cancel_count_inc(void)
#endif /* H5_HAVE_WIN_THREADS */
}
+
/*--------------------------------------------------------------------------
* NAME
* H5TS_cancel_count_dec
@@ -348,11 +301,6 @@ H5TS_cancel_count_inc(void)
* PROGRAMMER: Chee Wai LEE
* May 2, 2000
*
- * MODIFICATIONS:
- *
- * 19 May 2000, Bill Wendling
- * Changed so that function returns a value. May be of limited usefulness.
- *
*--------------------------------------------------------------------------
*/
herr_t
@@ -377,6 +325,154 @@ H5TS_cancel_count_dec(void)
}
+#ifdef H5_HAVE_WIN_THREADS
+/*--------------------------------------------------------------------------
+ * NAME
+ * H5TS_win32_process_enter
+ *
+ * RETURNS
+ * SUCCEED/FAIL
+ *
+ * DESCRIPTION
+ * Per-process setup on Windows when using Win32 threads.
+ *
+ *--------------------------------------------------------------------------
+ */
+H5_DLL BOOL CALLBACK
+H5TS_win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex)
+{
+ BOOL ret_value = TRUE;
+
+ /* Initialize the critical section (can't fail) */
+ InitializeCriticalSection(&H5_g.init_lock.CriticalSection);
+
+ /* Set up thread local storage */
+ if(TLS_OUT_OF_INDEXES == (H5TS_errstk_key_g = TlsAlloc()))
+ ret_value = FALSE;
+
+#ifdef H5_HAVE_CODESTACK
+ if(TLS_OUT_OF_INDEXES == (H5TS_funcstk_key_g = TlsAlloc()))
+ ret_value = FALSE;
+#endif /* H5_HAVE_CODESTACK */
+
+ return ret_value;
+} /* H5TS_win32_process_enter() */
+#endif /* H5_HAVE_WIN_THREADS */
+
+
+#ifdef H5_HAVE_WIN_THREADS
+/*--------------------------------------------------------------------------
+ * NAME
+ * H5TS_win32_thread_enter
+ *
+ * RETURNS
+ * SUCCEED/FAIL
+ *
+ * DESCRIPTION
+ * Per-thread setup on Windows when using Win32 threads.
+ *
+ *--------------------------------------------------------------------------
+ */
+herr_t
+H5TS_win32_thread_enter(void)
+{
+ herr_t ret_value = SUCCEED;
+
+ /* Currently a placeholder function. TLS setup is performed
+ * elsewhere in the library.
+ *
+ * WARNING: Do NOT use C standard library functions here.
+ * CRT functions are not allowed in DllMain, which is where this code
+ * is used.
+ */
+
+ return ret_value;
+} /* H5TS_win32_thread_enter() */
+#endif /* H5_HAVE_WIN_THREADS */
+
+
+#ifdef H5_HAVE_WIN_THREADS
+/*--------------------------------------------------------------------------
+ * NAME
+ * H5TS_win32_process_exit
+ *
+ * RETURNS
+ * SUCCEED/FAIL
+ *
+ * DESCRIPTION
+ * Per-process cleanup on Windows when using Win32 threads.
+ *
+ *--------------------------------------------------------------------------
+ */
+void
+H5TS_win32_process_exit(void)
+{
+
+ /* Windows uses a different thread local storage mechanism which does
+ * not support auto-freeing like pthreads' keys.
+ *
+ * This function is currently registered via atexit() and is called
+ * AFTER H5_term_library().
+ */
+
+ /* Clean up critical section resources (can't fail) */
+ DeleteCriticalSection(&H5_g.init_lock.CriticalSection);
+
+ /* Clean up per-process thread local storage */
+ TlsFree(H5TS_errstk_key_g);
+
+#ifdef H5_HAVE_CODESTACK
+ TlsFree(H5TS_funcstk_key_g);
+#endif /* H5_HAVE_CODESTACK */
+
+ return;
+} /* H5TS_win32_process_exit() */
+#endif /* H5_HAVE_WIN_THREADS */
+
+
+#ifdef H5_HAVE_WIN_THREADS
+/*--------------------------------------------------------------------------
+ * NAME
+ * H5TS_win32_thread_exit
+ *
+ * RETURNS
+ * SUCCEED/FAIL
+ *
+ * DESCRIPTION
+ * Per-thread cleanup on Windows when using Win32 threads.
+ *
+ *--------------------------------------------------------------------------
+ */
+herr_t
+H5TS_win32_thread_exit(void)
+{
+ LPVOID lpvData;
+ herr_t ret_value = SUCCEED;
+
+ /* Windows uses a different thread local storage mechanism which does
+ * not support auto-freeing like pthreads' keys.
+ *
+ * WARNING: Do NOT use C standard library functions here.
+ * CRT functions are not allowed in DllMain, which is where this code
+ * is used.
+ */
+
+ /* Clean up per-thread thread local storage */
+ lpvData = TlsGetValue(H5TS_errstk_key_g);
+ if(lpvData)
+ LocalFree((HLOCAL)lpvData);
+
+#ifdef H5_HAVE_CODESTACK
+ lpvData = TlsGetValue(H5TS_funcstk_key_g);
+ if(lpvData)
+ LocalFree((HLOCAL)lpvData);
+#endif /* H5_HAVE_CODESTACK */
+
+ return ret_value;
+} /* H5TS_win32_thread_exit() */
+#endif /* H5_HAVE_WIN_THREADS */
+
+
/*--------------------------------------------------------------------------
* NAME
* H5TS_create_thread
@@ -399,16 +495,17 @@ H5TS_create_thread(void *func, H5TS_attr_t *attr, void *udata)
#ifdef H5_HAVE_WIN_THREADS
- /* When calling C runtime functions, you have to use _beginthread or
+ /* When calling C runtime functions, you should use _beginthread or
* _beginthreadex instead of CreateThread. Threads created with
- * CreateThread risk being killed in low-memory situations.
- * We use _beginthread instead of _begintheadex because the latter
- * requires a stdcall function (and we don't need the more advanced
- * features it exposes).
+ * CreateThread risk being killed in low-memory situations. Since we
+ * only create threads in our test code, this is unlikely to be an issue
+ * and we'll use the easier-to-deal-with CreateThread for now.
*
- * NOTE: No error checks here! ret_value will be -1L on errors.
+ * NOTE: _beginthread() auto-recycles its handle when execution completes
+ * so you can't wait on it, making it unsuitable for the existing
+ * test code.
*/
- ret_value = _beginthread(func, 0 /* stack size */, udata);
+ ret_value = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, udata, 0, NULL);
#else /* H5_HAVE_WIN_THREADS */
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 7f55f4f..cc22f96 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -51,6 +51,7 @@ typedef INIT_ONCE H5TS_once_t;
/* not used on windows side, but need to be defined to something */
#define H5TS_SCOPE_SYSTEM 0
#define H5TS_SCOPE_PROCESS 0
+#define H5TS_CALL_CONV WINAPI
/* Functions */
#define H5TS_get_thread_local_value(key) TlsGetValue( key )
@@ -63,8 +64,13 @@ typedef INIT_ONCE H5TS_once_t;
#define H5TS_mutex_lock_simple(mutex) EnterCriticalSection(mutex)
#define H5TS_mutex_unlock_simple(mutex) LeaveCriticalSection(mutex)
-H5_DLL BOOL CALLBACK
-H5TS_win32_first_thread_init(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex);
+/* Functions called from DllMain */
+H5_DLL BOOL CALLBACK H5TS_win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex);
+H5_DLL void H5TS_win32_process_exit(void);
+H5_DLL herr_t H5TS_win32_thread_enter(void);
+H5_DLL herr_t H5TS_win32_thread_exit(void);
+
+
#else /* H5_HAVE_WIN_THREADS */
@@ -86,6 +92,7 @@ typedef pthread_once_t H5TS_once_t;
/* Scope Definitions */
#define H5TS_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
#define H5TS_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
+#define H5TS_CALL_CONV /* unused - Windows only */
/* Functions */
#define H5TS_get_thread_local_value(key) pthread_getspecific( key )
@@ -117,8 +124,6 @@ H5_DLL herr_t H5TS_cancel_count_inc(void);
H5_DLL herr_t H5TS_cancel_count_dec(void);
H5_DLL H5TS_thread_t H5TS_create_thread(void * func, H5TS_attr_t * attr, void *udata);
-
-
#if defined c_plusplus || defined __cplusplus
}
#endif /* c_plusplus || __cplusplus */
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index bfae624..7359a56 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -651,7 +651,7 @@ H5Tget_create_plist(hid_t dtype_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Copy the default datatype creation property list */
- if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_g)))
+ if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default creation property list")
if((new_tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to copy the creation property list")
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 32080fe..a8881fb 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -34,7 +34,7 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5T_init_deprec_interface
+#define H5_INTERFACE_INIT_FUNC H5T__init_deprec_interface
/***********/
@@ -49,7 +49,6 @@
#include "H5Tpkg.h" /* Datatypes */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
/****************/
/* Local Macros */
/****************/
@@ -88,9 +87,9 @@
/*--------------------------------------------------------------------------
NAME
- H5T_init_deprec_interface -- Initialize interface-specific information
+ H5T__init_deprec_interface -- Initialize interface-specific information
USAGE
- herr_t H5T_init_deprec_interface()
+ herr_t H5T__init_deprec_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -99,13 +98,38 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t
-H5T_init_deprec_interface(void)
+H5T__init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
-} /* H5T_init_deprec_interface() */
+} /* H5T__init_deprec_interface() */
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5T__term_deprec_interface -- Terminate interface
+USAGE
+ herr_t H5T__term_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Terminates interface. (Just resets H5_interface_initialize_g
+ currently).
+
+--------------------------------------------------------------------------*/
+herr_t
+H5T__term_deprec_interface(void)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ FUNC_LEAVE_NOAPI(0)
+} /* H5T__term_deprec_interface() */
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: H5Tcommit1
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 8323e15..bd37829 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -508,6 +508,7 @@ H5FL_EXTERN(H5T_t);
H5FL_EXTERN(H5T_shared_t);
/* Common functions */
+H5_DLL herr_t H5T__term_deprec_interface(void);
H5_DLL H5T_t *H5T__create(H5T_class_t type, size_t size);
H5_DLL herr_t H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id);
H5_DLL herr_t H5T__commit_named(const H5G_loc_t *loc, const char *name,
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index bd5bef0..73d85ac 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -51,7 +51,7 @@
/****************************/
/* Structure to store information about each filter's parameters */
-typedef struct {
+typedef struct H5Z_filter_info_t {
H5Z_filter_t id; /*filter identification number */
unsigned flags; /*defn and invocation flags */
char _name[H5Z_COMMON_NAME_LEN]; /*internal filter name */
diff --git a/src/H5private.h b/src/H5private.h
index fc80bb7..7ed354a 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1735,7 +1735,7 @@ typedef struct H5_api_struct {
/* Macro for first thread initialization */
#ifdef H5_HAVE_WIN_THREADS
-#define H5_FIRST_THREAD_INIT InitOnceExecuteOnce(&H5TS_first_init_g, H5TS_win32_first_thread_init, NULL, NULL);
+#define H5_FIRST_THREAD_INIT InitOnceExecuteOnce(&H5TS_first_init_g, H5TS_win32_process_enter, NULL, NULL);
#else
#define H5_FIRST_THREAD_INIT pthread_once(&H5TS_first_init_g, H5TS_pthread_first_thread_init);
#endif
diff --git a/src/H5public.h b/src/H5public.h
index 124d381..694687e 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 176 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 178 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "swmr0" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.176-swmr0" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.178-swmr0" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.in b/src/Makefile.in
index 7106e6d..355c7a2 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -565,7 +565,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -736,7 +735,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 166
+LT_VERS_REVISION = 168
LT_VERS_AGE = 0
# Our main target, the HDF5 library
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 5c703c0..cf3c54b 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -253,7 +253,7 @@ foreach (test ${H5_TESTS})
set_tests_properties (H5TEST-${test} PROPERTIES DEPENDS H5TEST-clear-objects)
endforeach (test ${H5_TESTS})
-set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS flush1)
+set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS H5TEST-flush1)
##############################################################################
##############################################################################
diff --git a/test/Makefile.am b/test/Makefile.am
index 4730fa1..e0eb0e9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -110,7 +110,7 @@ LDADD=libh5test.la $(LIBHDF5)
ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
-VFD_LIST = sec2 stdio core split multi family
+VFD_LIST = sec2 stdio core core_paged split multi family
if DIRECT_VFD_CONDITIONAL
VFD_LIST += direct
endif
diff --git a/test/Makefile.in b/test/Makefile.in
index c2481b6..e976578 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -993,7 +993,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -1253,7 +1252,8 @@ LDADD = libh5test.la $(LIBHDF5)
ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
-VFD_LIST = sec2 stdio core split multi family $(am__append_4)
+VFD_LIST = sec2 stdio core core_paged split multi family \
+ $(am__append_4)
# Sources for testhdf5 executable
testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
diff --git a/test/accum.c b/test/accum.c
index fc7546d..ba0cea1 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -43,18 +43,18 @@
H5F_t * f = NULL;
/* Function Prototypes */
-unsigned test_write_read(void);
-unsigned test_write_read_nonacc_front(void);
-unsigned test_write_read_nonacc_end(void);
-unsigned test_accum_overlap(void);
-unsigned test_accum_overlap_clean(void);
-unsigned test_accum_overlap_size(void);
-unsigned test_accum_non_overlap_size(void);
-unsigned test_accum_adjust(void);
-unsigned test_read_after(void);
-unsigned test_free(void);
-unsigned test_big(void);
-unsigned test_random_write(void);
+unsigned test_write_read(const H5F_io_info_t *fio_info);
+unsigned test_write_read_nonacc_front(const H5F_io_info_t *fio_info);
+unsigned test_write_read_nonacc_end(const H5F_io_info_t *fio_info);
+unsigned test_accum_overlap(const H5F_io_info_t *fio_info);
+unsigned test_accum_overlap_clean(const H5F_io_info_t *fio_info);
+unsigned test_accum_overlap_size(const H5F_io_info_t *fio_info);
+unsigned test_accum_non_overlap_size(const H5F_io_info_t *fio_info);
+unsigned test_accum_adjust(const H5F_io_info_t *fio_info);
+unsigned test_read_after(const H5F_io_info_t *fio_info);
+unsigned test_free(const H5F_io_info_t *fio_info);
+unsigned test_big(const H5F_io_info_t *fio_info);
+unsigned test_random_write(const H5F_io_info_t *fio_info);
unsigned test_swmr_write_big(void);
/* Helper Function Prototypes */
@@ -63,9 +63,9 @@ void accum_printf(void);
/* Private Test H5Faccum Function Wrappers */
#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), H5P_DATASET_XFER_DEFAULT, (b))
#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), H5P_DATASET_XFER_DEFAULT, (b))
-#define accum_free(a,s) H5F_accum_free(f, H5P_DATASET_XFER_DEFAULT, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
-#define accum_flush() H5F_accum_flush(f, H5P_DATASET_XFER_DEFAULT)
-#define accum_reset() H5F_accum_reset(f, H5P_DATASET_XFER_DEFAULT, TRUE)
+#define accum_free(fio_info,a,s) H5F__accum_free(fio_info, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
+#define accum_flush(fio_info) H5F__accum_flush(fio_info)
+#define accum_reset(fio_info) H5F__accum_reset(fio_info, TRUE)
/* ================= */
/* Main Test Routine */
@@ -88,6 +88,7 @@ void accum_printf(void);
int
main(void)
{
+ H5F_io_info_t fio_info; /* I/O info for operation */
unsigned nerrors = 0; /* track errors */
hid_t fid = -1;
@@ -104,22 +105,26 @@ main(void)
file a ways. 10MB should do. */
if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_DEFAULT, (haddr_t)(1024*1024*10)) < 0) FAIL_STACK_ERROR
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(H5P_DATASET_XFER_DEFAULT))) FAIL_STACK_ERROR
+
/* Reset metadata accumulator for the file */
- if(accum_reset() < 0) FAIL_STACK_ERROR
+ if(accum_reset(&fio_info) < 0) FAIL_STACK_ERROR
/* Test Functions */
- nerrors += test_write_read();
- nerrors += test_write_read_nonacc_front();
- nerrors += test_write_read_nonacc_end();
- nerrors += test_accum_overlap();
- nerrors += test_accum_overlap_clean();
- nerrors += test_accum_overlap_size();
- nerrors += test_accum_non_overlap_size();
- nerrors += test_accum_adjust();
- nerrors += test_read_after();
- nerrors += test_free();
- nerrors += test_big();
- nerrors += test_random_write();
+ nerrors += test_write_read(&fio_info);
+ nerrors += test_write_read_nonacc_front(&fio_info);
+ nerrors += test_write_read_nonacc_end(&fio_info);
+ nerrors += test_accum_overlap(&fio_info);
+ nerrors += test_accum_overlap_clean(&fio_info);
+ nerrors += test_accum_overlap_size(&fio_info);
+ nerrors += test_accum_non_overlap_size(&fio_info);
+ nerrors += test_accum_adjust(&fio_info);
+ nerrors += test_read_after(&fio_info);
+ nerrors += test_free(&fio_info);
+ nerrors += test_big(&fio_info);
+ nerrors += test_random_write(&fio_info);
/* End of test code, close and delete file */
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -158,7 +163,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_write_read(void)
+test_write_read(const H5F_io_info_t *fio_info)
{
int i = 0;
int *write_buf, *read_buf;
@@ -181,7 +186,7 @@ test_write_read(void)
if(accum_read(0, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, (size_t)1024) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -214,7 +219,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_write_read_nonacc_front(void)
+test_write_read_nonacc_front(const H5F_io_info_t *fio_info)
{
int i = 0;
int *write_buf, *read_buf;
@@ -234,13 +239,13 @@ test_write_read_nonacc_front(void)
/* Do a simple write/read/verify of data */
/* Write 1KB at Address 0 */
if(accum_write(0, 1024, write_buf) < 0) FAIL_STACK_ERROR;
- if(accum_flush() < 0) FAIL_STACK_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(1024, 1024, write_buf) < 0) FAIL_STACK_ERROR;
if(accum_read(0, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, (size_t)1024) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -273,7 +278,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_write_read_nonacc_end(void)
+test_write_read_nonacc_end(const H5F_io_info_t *fio_info)
{
int i = 0;
int *write_buf, *read_buf;
@@ -293,13 +298,13 @@ test_write_read_nonacc_end(void)
/* Do a simple write/read/verify of data */
/* Write 1KB at Address 0 */
if(accum_write(1024, 1024, write_buf) < 0) FAIL_STACK_ERROR;
- if(accum_flush() < 0) FAIL_STACK_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(0, 1024, write_buf) < 0) FAIL_STACK_ERROR;
if(accum_read(1024, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, (size_t)1024) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -332,7 +337,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_free(void)
+test_free(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf = NULL;
@@ -355,38 +360,38 @@ test_free(void)
if(accum_write(0, 256 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
- if(accum_free(0, 256 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 0, 256 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Free an empty accumulator */
- if(accum_free(0, 256 * 1024 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 0, 256 * 1024 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Write second quarter of the accumulator */
if(accum_write(64 * sizeof(int32_t), 64 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
/* Free the second quarter of the accumulator, the requested area
* is bigger than the data region on the right side. */
- if(accum_free(64 * sizeof(int32_t), 65 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 64 * sizeof(int32_t), 65 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Write half of the accumulator. */
if(accum_write(0, 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
/* Free the first block of 4B */
- if(accum_free(0, sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 0, sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(1 * sizeof(int32_t), 127 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf + 1, rbuf, 127 * sizeof(int32_t)) != 0) TEST_ERROR;
/* Free the block of 4B at 127*4B */
- if(accum_free(127 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 127 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(1 * sizeof(int32_t), 126 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf + 1, rbuf, 126 * sizeof(int32_t)) != 0) TEST_ERROR;
/* Free the block of 4B at 2*4B */
- if(accum_free(2 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 2 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(1 * sizeof(int32_t), 1 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -399,10 +404,10 @@ test_free(void)
* entirely before dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(68 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
- if(accum_free(62 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 62 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(66 * sizeof(int32_t), 126 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -413,10 +418,10 @@ test_free(void)
* completely contains dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(68 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
- if(accum_free(62 * sizeof(int32_t), 16 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 62 * sizeof(int32_t), 16 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(78 * sizeof(int32_t), 114 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -427,10 +432,10 @@ test_free(void)
* before dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
- if(accum_free(66 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 66 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(70 * sizeof(int32_t), 122 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -441,10 +446,10 @@ test_free(void)
* dirty section, and ends in dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
- if(accum_free(70 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 70 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(74 * sizeof(int32_t), 118 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -455,10 +460,10 @@ test_free(void)
* contains dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
- if(accum_free(70 * sizeof(int32_t), 8 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 70 * sizeof(int32_t), 8 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(78 * sizeof(int32_t), 114 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -469,10 +474,10 @@ test_free(void)
* of dirty section, and ends in dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 8 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 8 * sizeof(int32_t));
- if(accum_free(72 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(fio_info, 72 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(76 * sizeof(int32_t), 116 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -485,7 +490,7 @@ test_free(void)
HDfree(expect);
expect = NULL;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -519,7 +524,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap(void)
+test_accum_overlap(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -655,7 +660,7 @@ test_accum_overlap(void)
if(accum_read(112, 6 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 6 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -691,7 +696,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap_clean(void)
+test_accum_overlap_clean(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -717,7 +722,7 @@ test_accum_overlap_clean(void)
/* Case 2: End of new piece aligns with start of clean accumulated data */
/* Write 5 2's at address 20 */
/* @0:| 222221111111111| */
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 5; i++)
wbuf[i] = 2;
if(accum_write(20, 5 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -757,7 +762,7 @@ test_accum_overlap_clean(void)
/* Case 6: New piece completely within clean accumulated data */
/* Write 3 6's at address 44 */
/* @0:| 333334666511111| */
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 3; i++)
wbuf[i] = 6;
if(accum_write(44, 3 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -767,7 +772,7 @@ test_accum_overlap_clean(void)
/* Case 7: New piece overlaps start of clean accumulated data */
/* Write 2 7's at address 16 */
/* @0:| 7733334666511111| */
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 2; i++)
wbuf[i] = 7;
if(accum_write(16, 2 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -787,7 +792,7 @@ test_accum_overlap_clean(void)
/* Case 9: Start of new piece aligns with end of clean accumulated data */
/* Write 3 9's at address 80 */
/* @0:| 88883334666511111999| */
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 3; i++)
wbuf[i] = 9;
if(accum_write(80, 3 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -797,7 +802,7 @@ test_accum_overlap_clean(void)
/* Case 10: New piece overlaps end of clean accumulated data */
/* Write 3 2's at address 88 */
/* @0:| 888833346665111119922| */
- if(accum_flush() < 0) FAIL_STACK_ERROR;
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 2; i++)
wbuf[i] = 2;
if(accum_write(88, 2 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -835,7 +840,7 @@ test_accum_overlap_clean(void)
if(accum_read(12, 22 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 22 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -870,7 +875,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_non_overlap_size(void)
+test_accum_non_overlap_size(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -902,7 +907,7 @@ test_accum_non_overlap_size(void)
if(accum_read(0, 20 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 20 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -937,7 +942,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap_size(void)
+test_accum_overlap_size(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -969,7 +974,7 @@ test_accum_overlap_size(void)
if(accum_read(60, 72 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 72 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1015,7 +1020,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_adjust(void)
+test_accum_adjust(const H5F_io_info_t *fio_info)
{
int i = 0;
int s = 1048576; /* size of buffer */
@@ -1061,7 +1066,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* ================================================================ */
/* Case 2: Prepending large block to large, fully dirty accumulator */
@@ -1090,7 +1095,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, (size_t)1048571) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* ========================================================= */
/* Case 3: Appending small block to large, clean accumulator */
@@ -1104,7 +1109,7 @@ test_accum_adjust(void)
/* Flush the accumulator -- we want to test the case when
accumulator contains clean data */
- if(accum_flush() < 0) FAIL_STACK_ERROR
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR
/* Write a small (1KB) block to the end of the accumulator */
/* ==> Accumulator will need more buffer space */
@@ -1125,7 +1130,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* ==================================================================== */
/* Case 4: Appending small block to large, partially dirty accumulator, */
@@ -1139,7 +1144,7 @@ test_accum_adjust(void)
if(accum_write(0, (1024 * 1024) - 5, wbuf) < 0) FAIL_STACK_ERROR;
/* Flush the accumulator to clean it */
- if(accum_flush() < 0) FAIL_STACK_ERROR
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR
/* write to part of the accumulator so just the start of it is dirty */
if(accum_write(0, 5, wbuf) < 0) FAIL_STACK_ERROR;
@@ -1165,7 +1170,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, (size_t)349523) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* ==================================================================== */
/* Case 5: Appending small block to large, partially dirty accumulator, */
@@ -1176,7 +1181,7 @@ test_accum_adjust(void)
if(accum_write(0, (1024 * 1024) - 5, wbuf) < 0) FAIL_STACK_ERROR;
/* Flush the accumulator to clean it */
- if(accum_flush() < 0) FAIL_STACK_ERROR
+ if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR
/* write to part of the accumulator so it's dirty, but not entirely dirty */
/* (just the begging few bytes will be clean) */
@@ -1202,7 +1207,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, (size_t)10) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* ================================================================= */
/* Case 6: Appending small block to large, fully dirty accumulator */
@@ -1233,7 +1238,7 @@ test_accum_adjust(void)
if(accum_read(1048571, 349523, rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, (size_t)349523) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1271,7 +1276,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_read_after(void)
+test_read_after(const H5F_io_info_t *fio_info)
{
int i = 0;
int s = 128; /* size of buffer */
@@ -1316,7 +1321,7 @@ test_read_after(void)
if(accum_read(512, 512, rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, (size_t)128) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1350,7 +1355,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_big(void)
+test_big(const H5F_io_info_t *fio_info)
{
uint8_t *wbuf, *wbuf2, *rbuf, *zbuf; /* Buffers for reading & writing, etc */
unsigned u; /* Local index variable */
@@ -1386,7 +1391,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to middle of accumulator */
@@ -1405,7 +1410,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(1024, 1024, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to overlap with end of "big" region */
@@ -1423,7 +1428,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(BIG_BUF_SIZE - 512, 1024, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to overlap with beginning of "big" region */
@@ -1441,7 +1446,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, 1024, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to middle of accumulator */
@@ -1463,7 +1468,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to overlap with end of "big" region */
@@ -1486,7 +1491,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE + 512, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to be past "big" region */
@@ -1514,7 +1519,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE + 1536, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1024));
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section to be past "big" region */
@@ -1542,7 +1547,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(1536, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section before "big" region */
@@ -1569,7 +1574,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(512, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section before "big" region */
@@ -1597,7 +1602,7 @@ test_big(void)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE + 1536, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
/* Write small section before "big" region */
@@ -1621,7 +1626,7 @@ test_big(void)
if(HDmemcmp(wbuf2, rbuf + 512, (size_t)BIG_BUF_SIZE) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1658,7 +1663,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_random_write(void)
+test_random_write(const H5F_io_info_t *fio_info)
{
uint8_t *wbuf, *rbuf; /* Buffers for reading & writing */
unsigned seed = 0; /* Random # seed */
@@ -1758,7 +1763,7 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
/* Verify data read back in */
if(HDmemcmp(wbuf, rbuf, (size_t)RANDOM_BUF_SIZE) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1810,6 +1815,7 @@ test_swmr_write_big(void)
unsigned u; /* Local index variable */
pid_t pid; /* Process ID */
int status; /* Status returned from child process */
+ H5F_io_info_t fio_info; /* I/O info for operation */
char *new_argv[] = {NULL};
char *new_envp[] = {NULL};
@@ -1838,13 +1844,16 @@ test_swmr_write_big(void)
/* Get H5F_t * to internal file structure */
if(NULL == (rf = (H5F_t *)H5I_object(fid))) FAIL_STACK_ERROR
+ /* Set up I/O info for operation */
+ fio_info.f = rf;
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(H5P_DATASET_XFER_DEFAULT))) FAIL_STACK_ERROR
+
/* We'll be writing lots of garbage data, so extend the
file a ways. 10MB should do. */
if(H5FD_set_eoa(rf->shared->lf, H5FD_MEM_DEFAULT, (haddr_t)(1024*1024*10)) < 0) FAIL_STACK_ERROR
/* Reset metadata accumulator for the file */
- if(H5F_accum_reset(rf, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
- FAIL_STACK_ERROR;
+ if(accum_reset(&fio_info) < 0) FAIL_STACK_ERROR;
/* Allocate space for the write & read buffers */
if((wbuf2 = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE)) == NULL)
@@ -1865,8 +1874,7 @@ test_swmr_write_big(void)
/* Verify the data read is correct */
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR;
/* Flush the data to disk */
- if(H5F_accum_reset(rf, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
- FAIL_STACK_ERROR;
+ if(accum_reset(&fio_info) < 0) FAIL_STACK_ERROR;
/* Initialize wbuf with all 1s */
for(u = 0; u < 1024; u++)
@@ -1913,8 +1921,7 @@ test_swmr_write_big(void)
/* Check if child process terminates normally and its return value */
if(WIFEXITED(status) && !WEXITSTATUS(status)) {
/* Flush the accumulator */
- if(H5F_accum_reset(rf, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
- FAIL_STACK_ERROR;
+ if(accum_reset(&fio_info) < 0) FAIL_STACK_ERROR;
/* Close the property list */
if(H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
diff --git a/test/dsets.c b/test/dsets.c
index a2f8e2b..768b268 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6788,8 +6788,17 @@ test_zero_dims(hid_t file)
} else if(idx_type != H5D_CHUNK_IDX_BTREE)
FAIL_PUTS_ERROR("should be using v1 B-tree as index");
- /* Just a no-op */
+ /* Various no-op writes */
if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
+
+ /* Various no-op reads */
+ if(H5Dread(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dread(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
+ if(H5Dread(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dread(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
if(H5Dclose(d) < 0) FAIL_STACK_ERROR
if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 2d0d732..4832767 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -18,6 +18,7 @@
*/
#include "h5test.h"
+#include "H5ACprivate.h"
#include "H5Pprivate.h"
static int
@@ -381,6 +382,8 @@ main(void)
FAIL_STACK_ERROR
if((H5Pset_mdc_config(fapl, &my_cache_config)) < 0)
FAIL_STACK_ERROR
+ if((H5Pset_core_write_tracking(fapl, TRUE, 1024 * 1024)) < 0)
+ FAIL_STACK_ERROR
/* Test encoding & decoding property list */
if(test_encode_decode(fapl) < 0)
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index 7456ae6..7d8d073 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -20,7 +20,7 @@
* Purpose: This program is run to generate an HDF5 data file with several
* datasets that have "bogus" messages in their object header.
*/
-
+
#include "H5private.h"
#include "hdf5.h"
#include "H5Oprivate.h"
diff --git a/test/gen_plist.c b/test/gen_plist.c
index b4da261..acc5f3e 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -327,6 +327,8 @@ main(void)
assert(ret > 0);
if((ret = H5Pset_mdc_config(fapl1, &my_cache_config)) < 0)
assert(ret > 0);
+ if((ret = H5Pset_core_write_tracking(fapl1, TRUE, (size_t)(1024 * 1024))) < 0)
+ assert(ret > 0);
if((ret = encode_plist(fapl1, little_endian, "testfiles/plist_files/fapl_le", "testfiles/plist_files/fapl_be")) < 0)
assert(ret > 0);
diff --git a/test/h5test.c b/test/h5test.c
index 9fe05ae..769e03f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -511,64 +511,71 @@ h5_fileaccess(void)
/* First use the environment variable, then the constant */
val = HDgetenv("HDF5_DRIVER");
#ifdef HDF5_DRIVER
- if (!val) val = HDF5_DRIVER;
+ if (!val)
+ val = HDF5_DRIVER;
#endif
- if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1;
- if (!val || !*val) return fapl; /*use default*/
+ if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
+ return -1;
+ if (!val || !*val)
+ return fapl; /*use default*/
HDstrncpy(s, val, sizeof s);
s[sizeof(s)-1] = '\0';
if (NULL==(name=HDstrtok(s, " \t\n\r"))) return fapl;
if (!HDstrcmp(name, "sec2")) {
- /* Unix read() and write() system calls */
- if (H5Pset_fapl_sec2(fapl)<0) return -1;
+ /* Unix read() and write() system calls */
+ if (H5Pset_fapl_sec2(fapl)<0) return -1;
} else if (!HDstrcmp(name, "stdio")) {
- /* Standard C fread() and fwrite() system calls */
- if (H5Pset_fapl_stdio(fapl)<0) return -1;
+ /* Standard C fread() and fwrite() system calls */
+ if (H5Pset_fapl_stdio(fapl)<0) return -1;
} else if (!HDstrcmp(name, "core")) {
- /* In-core temporary file with 1MB increment */
- if (H5Pset_fapl_core(fapl, (size_t)1, TRUE)<0) return -1;
- } else if (!HDstrcmp(name, "split")) {
- /* Split meta data and raw data each using default driver */
- if (H5Pset_fapl_split(fapl,
+ /* In-memory driver settings (backing store on, 1 MB increment) */
+ if (H5Pset_fapl_core(fapl, (size_t)1, TRUE)<0) return -1;
+ } else if (!HDstrcmp(name, "core_paged")) {
+ /* In-memory driver with write tracking and paging on */
+ if (H5Pset_fapl_core(fapl, (size_t)1, TRUE)<0) return -1;
+ if (H5Pset_core_write_tracking(fapl, TRUE, (size_t)4096)<0) return -1;
+ } else if (!HDstrcmp(name, "split")) {
+ /* Split meta data and raw data each using default driver */
+ if (H5Pset_fapl_split(fapl,
"-m.h5", H5P_DEFAULT,
"-r.h5", H5P_DEFAULT)<0)
- return -1;
+ return -1;
} else if (!HDstrcmp(name, "multi")) {
- /* Multi-file driver, general case of the split driver */
- H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
- hid_t memb_fapl[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- char sv[H5FD_MEM_NTYPES][1024];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
+ /* Multi-file driver, general case of the split driver */
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char sv[H5FD_MEM_NTYPES][1024];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
H5FD_mem_t mt;
- HDmemset(memb_map, 0, sizeof memb_map);
- HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
- HDmemset(memb_addr, 0, sizeof memb_addr);
-
- HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt)) {
- memb_fapl[mt] = H5P_DEFAULT;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
- memb_name[mt] = sv[mt];
- memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
- } /* end for */
-
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name,
- memb_addr, FALSE)<0) {
- return -1;
- }
+ HDmemset(memb_map, 0, sizeof memb_map);
+ HDmemset(memb_fapl, 0, sizeof memb_fapl);
+ HDmemset(memb_name, 0, sizeof memb_name);
+ HDmemset(memb_addr, 0, sizeof memb_addr);
+
+ HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt)) {
+ memb_fapl[mt] = H5P_DEFAULT;
+ sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ memb_name[mt] = sv[mt];
+ memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
+ } /* end for */
+
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name,
+ memb_addr, FALSE)<0) {
+ return -1;
+ }
} else if (!HDstrcmp(name, "family")) {
hsize_t fam_size = 100*1024*1024; /*100 MB*/
- /* Family of files, each 1MB and using the default driver */
- if ((val=HDstrtok(NULL, " \t\n\r")))
- fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024);
- if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0)
+ /* Family of files, each 1MB and using the default driver */
+ if ((val=HDstrtok(NULL, " \t\n\r")))
+ fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024);
+ if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0)
return -1;
} else if (!HDstrcmp(name, "log")) {
unsigned log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC;
@@ -578,20 +585,21 @@ h5_fileaccess(void)
log_flags = (unsigned)HDstrtol(val, NULL, 0);
if (H5Pset_fapl_log(fapl, NULL, log_flags, (size_t)0) < 0)
- return -1;
+ return -1;
} else if (!HDstrcmp(name, "direct")) {
#ifdef H5_HAVE_DIRECT
- /* Linux direct read() and write() system calls. Set memory boundary, file block size,
- * and copy buffer size to the default values. */
- if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0) return -1;
+ /* Linux direct read() and write() system calls. Set memory boundary, file block size,
+ * and copy buffer size to the default values. */
+ if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0)
+ return -1;
#endif
} else if(!HDstrcmp(name, "latest")) {
- /* use the latest format */
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ /* use the latest format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
} else {
- /* Unknown driver */
- return -1;
+ /* Unknown driver */
+ return -1;
}
return fapl;
diff --git a/test/testfiles/plist_files/fapl_be b/test/testfiles/plist_files/fapl_be
index 8fcefa2..0b050d0 100644
--- a/test/testfiles/plist_files/fapl_be
+++ b/test/testfiles/plist_files/fapl_be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_le b/test/testfiles/plist_files/fapl_le
index 8fcefa2..0b050d0 100644
--- a/test/testfiles/plist_files/fapl_le
+++ b/test/testfiles/plist_files/fapl_le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_be b/test/testfiles/plist_files/lapl_be
index 30f52a4..e58bfb4 100644
--- a/test/testfiles/plist_files/lapl_be
+++ b/test/testfiles/plist_files/lapl_be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_le b/test/testfiles/plist_files/lapl_le
index 30f52a4..e58bfb4 100644
--- a/test/testfiles/plist_files/lapl_le
+++ b/test/testfiles/plist_files/lapl_le
Binary files differ
diff --git a/test/tmisc.c b/test/tmisc.c
index 512d029..cac6b04 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -316,6 +316,15 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset
/* Definitions for misc. test #30 */
#define MISC30_FILE "tmisc30.h5"
+/* Definitions for misc. test #31 */
+#define MISC31_FILE "tmisc31.h5"
+#define MISC31_DSETNAME "dset"
+#define MISC31_ATTRNAME1 "attr1"
+#define MISC31_ATTRNAME2 "attr2"
+#define MISC31_GROUPNAME "group"
+#define MISC31_PROPNAME "misc31_prop"
+#define MISC31_DTYPENAME "dtype"
+
/****************************************************************
**
** test_misc1(): test unlinking a dataset from a group and immediately
@@ -5195,6 +5204,105 @@ test_misc30(void)
VERIFY(file_size[0], file_size[1], "test_misc30");
} /* end test_misc30() */
+
+/****************************************************************
+**
+** test_misc31(): Test reentering library through deprecated
+* routines that register an id after calling
+* H5close().
+**
+****************************************************************/
+static void
+test_misc31(void)
+{
+ hid_t file_id; /* File id */
+ hid_t space_id; /* Dataspace id */
+ hid_t dset_id; /* Dataset id */
+ hid_t attr_id; /* Attribute id */
+ hid_t group_id; /* Group id */
+ hid_t dtype_id; /* Datatype id */
+ herr_t ret; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Deprecated routines initialize after H5close()\n"));
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ file_id = H5Fcreate(MISC31_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(file_id, FAIL, "H5Fcreate");
+
+ /* Test dataset package */
+ space_id = H5Screate(H5S_SCALAR);
+ CHECK(space_id, FAIL, "H5Screate");
+ dset_id = H5Dcreate1(file_id, MISC31_DSETNAME, H5T_NATIVE_INT, space_id, H5P_DEFAULT);
+ CHECK(dset_id, FAIL, "H5Dcreate1");
+ ret = H5close();
+ CHECK(ret, FAIL, "H5close");
+ file_id = H5Fopen(MISC31_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(file_id, FAIL, "H5Fopen");
+ dset_id = H5Dopen1(file_id, MISC31_DSETNAME);
+ CHECK(dset_id, FAIL, "H5Dopen1");
+
+ /* Test attribute package */
+ space_id = H5Screate(H5S_SCALAR);
+ CHECK(space_id, FAIL, "H5Screate");
+ attr_id = H5Acreate1(dset_id, MISC31_ATTRNAME1, H5T_NATIVE_INT, space_id, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate1");
+ ret = H5close();
+ CHECK(ret, FAIL, "H5close");
+ file_id = H5Fopen(MISC31_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(file_id, FAIL, "H5Fopen");
+ dset_id = H5Dopen1(file_id, MISC31_DSETNAME);
+ CHECK(dset_id, FAIL, "H5Dopen1");
+ space_id = H5Screate(H5S_SCALAR);
+ CHECK(space_id, FAIL, "H5Screate");
+ attr_id = H5Acreate1(dset_id, MISC31_ATTRNAME2, H5T_NATIVE_INT, space_id, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate1");
+
+ /* Test group package */
+ group_id = H5Gcreate1(file_id, MISC31_GROUPNAME, 0);
+ CHECK(group_id, FAIL, "H5Gcreate1");
+ ret = H5close();
+ CHECK(ret, FAIL, "H5close");
+ file_id = H5Fopen(MISC31_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(file_id, FAIL, "H5Fopen");
+ group_id = H5Gopen1(file_id, MISC31_GROUPNAME);
+ CHECK(group_id, FAIL, "H5Gopen1");
+
+ /* Test property list package */
+ ret = H5Pregister1(H5P_OBJECT_CREATE, MISC31_PROPNAME, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK(ret, FAIL, "H5Pregister1");
+ ret = H5close();
+ CHECK(ret, FAIL, "H5close");
+ ret = H5Pregister1(H5P_OBJECT_CREATE, MISC31_PROPNAME, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK(ret, FAIL, "H5Pregister1");
+ ret = H5close();
+ CHECK(ret, FAIL, "H5close");
+
+ /* Test datatype package */
+ file_id = H5Fopen(MISC31_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(file_id, FAIL, "H5Fopen");
+ dtype_id = H5Tcopy(H5T_NATIVE_INT);
+ CHECK(dtype_id, FAIL, "H5Tcopy");
+ ret = H5Tcommit1(file_id, MISC31_DTYPENAME, dtype_id);
+ CHECK(ret, FAIL, "H5Tcommit1");
+ ret = H5close();
+ CHECK(ret, FAIL, "H5close");
+ file_id = H5Fopen(MISC31_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(file_id, FAIL, "H5Fopen");
+ dtype_id = H5Topen1(file_id, MISC31_DTYPENAME);
+ CHECK(ret, FAIL, "H5Topen1");
+ ret = H5Fclose(file_id);
+ CHECK(ret, FAIL, "H5Fclose");
+ ret = H5Tclose(dtype_id);
+ CHECK(ret, FAIL, "H5Tclose");
+
+#else /* H5_NO_DEPRECATED_SYMBOLS */
+ /* Output message about test being skipped */
+ MESSAGE(5, (" ...Skipped"));
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+} /* end test_misc31() */
+
+
/****************************************************************
**
** test_misc(): Main misc. test routine.
@@ -5240,6 +5348,7 @@ test_misc(void)
test_misc28(); /* Test that chunks are cached appropriately */
test_misc29(); /* Test that speculative metadata reads are handled correctly */
test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */
+ test_misc31(); /* Test Reentering library through deprecated routines after H5close() */
} /* test_misc() */
@@ -5296,5 +5405,6 @@ cleanup_misc(void)
HDremove(MISC28_FILE);
HDremove(MISC29_COPY_FILE);
HDremove(MISC30_FILE);
+ HDremove(MISC31_FILE);
}
diff --git a/test/tselect.c b/test/tselect.c
index fed405c..d5a1f4c 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -292,11 +292,15 @@ test_select_hyper(hid_t xfer_plist)
ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,wbuf);
CHECK(ret, FAIL, "H5Dwrite");
- /* Exercise check for NULL buffer and valid selection */
+ /* Exercise checks for NULL buffer and valid selection */
H5E_BEGIN_TRY {
ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,NULL);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Dwrite");
+ H5E_BEGIN_TRY {
+ ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,xfer_plist,NULL);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Dwrite");
/* Close memory dataspace */
ret = H5Sclose(sid2);
@@ -326,11 +330,15 @@ test_select_hyper(hid_t xfer_plist)
ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,rbuf);
CHECK(ret, FAIL, "H5Dread");
- /* Exercise check for NULL buffer and valid selection */
+ /* Exercise checks for NULL buffer and valid selection */
H5E_BEGIN_TRY {
ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,NULL);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Dread");
+ H5E_BEGIN_TRY {
+ ret=H5Dread(dataset,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,xfer_plist,NULL);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Dread");
/* Check that the values match with a dataset iterator */
tbuf=wbuf+(15*SPACE2_DIM2);
diff --git a/test/vfd.c b/test/vfd.c
index b85c054..4ece2ba 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -28,6 +28,7 @@
#define FAMILY_SIZE2 (5*KB)
#define MULTI_SIZE 128
#define CORE_INCREMENT (4*KB)
+#define CORE_PAGE_SIZE (1024 * 1024)
#define DSET1_NAME "dset1"
#define DSET1_DIM1 1024
#define DSET1_DIM2 32
@@ -376,6 +377,8 @@ test_core(void)
char filename[1024];
void *fhandle=NULL;
hsize_t file_size;
+ hbool_t use_write_tracking;
+ size_t write_tracking_page_size;
int *points = NULL, *check = NULL, *p1, *p2;
hid_t dset1=-1, space1=-1;
hsize_t dims1[2];
@@ -387,6 +390,8 @@ test_core(void)
fapl = h5_fileaccess();
if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
TEST_ERROR;
+ if(H5Pset_core_write_tracking(fapl, TRUE, CORE_PAGE_SIZE) < 0)
+ TEST_ERROR;
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -400,6 +405,14 @@ test_core(void)
if(H5FD_CORE != H5Pget_driver(access_fapl))
TEST_ERROR;
+ /* Check that the backing store write tracking info was saved */
+ if(H5Pget_core_write_tracking(fapl, &use_write_tracking, &write_tracking_page_size) < 0)
+ TEST_ERROR;
+ if(TRUE != use_write_tracking)
+ TEST_ERROR;
+ if(CORE_PAGE_SIZE != write_tracking_page_size)
+ TEST_ERROR;
+
/* ...and close the property list */
if (H5Pclose(access_fapl) < 0)
TEST_ERROR;
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 559606f..5a866fc 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -519,7 +519,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index f98febb..c588ad2 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -18,6 +18,7 @@
*/
#include "testphdf5.h"
+#include "H5ACprivate.h"
#include "H5Pprivate.h"
static int
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 749b6a2..c592973 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -499,7 +499,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index e5a1a9f..267d92b 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -37,9 +37,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index 552fbc0..fef0136 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -507,7 +507,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 5620968..35c55a4 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -55,9 +55,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index f012f67..08008d7 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -514,7 +514,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index 59cab0d..a371cc0 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -103,6 +103,13 @@ void parse_command_line(int argc,
/* NaNs are handled by default */
options->do_nans = 1;
+ /* not Listing objects that are not comparable */
+ options->m_list_not_cmp = 0;
+
+ /* initially no not-comparable. */
+ /**this is bad in mixing option with results**/
+ options->not_cmp=0;
+
/* init for exclude-path option */
exclude_head = NULL;
diff --git a/tools/h5diff/testfiles/h5diff_101w.txt b/tools/h5diff/testfiles/h5diff_101w.txt
index d1f49da..71f4e87 100644
--- a/tools/h5diff/testfiles/h5diff_101w.txt
+++ b/tools/h5diff/testfiles/h5diff_101w.txt
@@ -1,11 +1,11 @@
-dataset: </g1/d1> and </g1/d2>
-size: [3x2] [3x2]
-position d1 d2 difference
-------------------------------------------------------------
-[ 0 1 ] 1e-016 4e-016 3e-016
-[ 1 0 ] 1e-016 2e-016 1e-016
-[ 1 1 ] 0 1e-016 1e-016
-[ 2 0 ] 3.3e-016 1e-016 2.3e-016
-[ 2 1 ] 1e-016 0 1e-016
-5 differences found
-EXIT CODE: 1
+dataset: </g1/d1> and </g1/d2>
+size: [3x2] [3x2]
+position d1 d2 difference
+------------------------------------------------------------
+[ 0 1 ] 1e-016 4e-016 3e-016
+[ 1 0 ] 1e-016 2e-016 1e-016
+[ 1 1 ] 0 1e-016 1e-016
+[ 2 0 ] 3.3e-016 1e-016 2.3e-016
+[ 2 1 ] 1e-016 0 1e-016
+5 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_102w.txt b/tools/h5diff/testfiles/h5diff_102w.txt
index dda3581..19a097c 100644
--- a/tools/h5diff/testfiles/h5diff_102w.txt
+++ b/tools/h5diff/testfiles/h5diff_102w.txt
@@ -1,10 +1,10 @@
-dataset: </g1/fp1> and </g1/fp2>
-size: [3x2] [3x2]
-position fp1 fp2 difference
-------------------------------------------------------------
-[ 0 1 ] 1e-007 2e-007 1e-007
-[ 1 0 ] 1e-007 3e-007 2e-007
-[ 1 1 ] 2.2e-007 1e-007 1.2e-007
-[ 2 0 ] 1e-007 0 1e-007
-4 differences found
-EXIT CODE: 1
+dataset: </g1/fp1> and </g1/fp2>
+size: [3x2] [3x2]
+position fp1 fp2 difference
+------------------------------------------------------------
+[ 0 1 ] 1e-007 2e-007 1e-007
+[ 1 0 ] 1e-007 3e-007 2e-007
+[ 1 1 ] 2.2e-007 1e-007 1.2e-007
+[ 2 0 ] 1e-007 0 1e-007
+4 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_tmp1.txt b/tools/h5diff/testfiles/h5diff_tmp1.txt
new file mode 100644
index 0000000..40e3fb6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_tmp1.txt
@@ -0,0 +1,5 @@
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects.
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_tmp2.txt b/tools/h5diff/testfiles/h5diff_tmp2.txt
new file mode 100644
index 0000000..a2d6da6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_tmp2.txt
@@ -0,0 +1,13 @@
+dataset: </G/down/Data> and </G/down/Data>
+1599 differences found
+dataset: </G/down/Tail/array> and </G/down/Tail/array>
+8 differences found
+dataset: </G/up/Data> and </G/up/Data>
+1845 differences found
+dataset: </G/up/Tail/array> and </G/up/Tail/array>
+10 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5 b/tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5
new file mode 100644
index 0000000..bbcfb63
--- /dev/null
+++ b/tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 b/tools/h5diff/testfiles/tmpSingleSiteBethe.reference.h5
new file mode 100644
index 0000000..6b19ed7
--- /dev/null
+++ b/tools/h5diff/testfiles/tmpSingleSiteBethe.reference.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/tmptest.he5 b/tools/h5diff/testfiles/tmptest.he5
new file mode 100644
index 0000000..edcfcd2
--- /dev/null
+++ b/tools/h5diff/testfiles/tmptest.he5
Binary files differ
diff --git a/tools/h5diff/testfiles/tmptest2.he5 b/tools/h5diff/testfiles/tmptest2.he5
new file mode 100644
index 0000000..a6ab02b
--- /dev/null
+++ b/tools/h5diff/testfiles/tmptest2.he5
Binary files differ
diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in
index 549da49..ee8a09b 100644
--- a/tools/h5diff/testh5diff.sh.in
+++ b/tools/h5diff/testh5diff.sh.in
@@ -302,6 +302,12 @@ $SRC_H5DIFF_TESTFILES/h5diff_709.txt
$SRC_H5DIFF_TESTFILES/h5diff_710.txt
$SRC_H5DIFF_TESTFILES/h5diff_80.txt
$SRC_H5DIFF_TESTFILES/h5diff_90.txt
+$SRC_H5DIFF_TESTFILES/h5diff_tmp1.txt
+$SRC_H5DIFF_TESTFILES/h5diff_tmp2.txt
+$SRC_H5DIFF_TESTFILES/tmptest.he5
+$SRC_H5DIFF_TESTFILES/tmptest2.he5
+$SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.reference.h5
+$SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.output.h5
"
#
@@ -757,6 +763,10 @@ TOOLTEST h5diff_631.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h
# 7. attributes
# ##############################################################################
TOOLTEST h5diff_70.txt -v h5diff_attr1.h5 h5diff_attr2.h5
+# temporary test to verify HDF5-8625
+TOOLTEST h5diff_tmp1.txt tmptest2.he5 tmptest.he5
+# temporary test to verify HDF5-8639
+TOOLTEST h5diff_tmp2.txt tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.reference.h5
# ##################################################
# attrs with verbose option level
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 1a46586..584222e 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -48,9 +48,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index ea4cc4d..f479679 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -513,7 +513,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 36a3a9e..a18133f 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -38,9 +38,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index d630f6a..5cba138 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -507,7 +507,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index b0d5ac8..a8e3a7c 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -64,9 +64,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 147c4cb..a50a9c9 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -519,7 +519,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 5220087..f3749e3 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -31,9 +31,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 215fc6c..af9d170 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -499,7 +499,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 4d26c0c..4275e56 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -89,9 +89,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 80f8e39..44ffb9d 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -531,7 +531,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 82f0ffb..0658216 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -40,9 +40,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 1746adc..f0c2674 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -509,7 +509,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 1b97f12..5af2dfd 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -496,7 +496,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 44b623f..6474082 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -326,12 +326,16 @@ hsize_t diff_attr(hid_t loc1_id,
hid_t space2_id=-1; /* space ID */
hid_t ftype1_id=-1; /* file data type ID */
hid_t ftype2_id=-1; /* file data type ID */
+ int vstrtype1=0; /* ftype1 is a variable string */
+ int vstrtype2=0; /* ftype2 is a variable string */
hid_t mtype1_id=-1; /* memory data type ID */
hid_t mtype2_id=-1; /* memory data type ID */
size_t msize1; /* memory size of memory type */
size_t msize2; /* memory size of memory type */
void *buf1=NULL; /* data buffer */
void *buf2=NULL; /* data buffer */
+ int buf1hasdata=0; /* buffer has data */
+ int buf2hasdata=0; /* buffer has data */
hsize_t nelmts1; /* number of elements in dataset */
int rank1; /* rank of dataset */
int rank2; /* rank of dataset */
@@ -376,8 +380,19 @@ hsize_t diff_attr(hid_t loc1_id,
/* get the datatypes */
if((ftype1_id = H5Aget_type(attr1_id)) < 0)
goto error;
+ vstrtype1 = H5Tis_variable_str(ftype1_id);
if((ftype2_id = H5Aget_type(attr2_id)) < 0)
goto error;
+ vstrtype2 = H5Tis_variable_str(ftype2_id);
+ /* no compare if either one but not both are variable string type */
+ if (vstrtype1 != vstrtype2){
+ if ((options->m_verbose||options->m_list_not_cmp))
+ parallel_print("Not comparable: one of attribute <%s/%s> or <%s/%s> is of variable length type\n",
+ path1, name1, path2, name2);
+ options->not_cmp = 1;
+ return 0;
+ }
+
if((mtype1_id = h5tools_get_native_type(ftype1_id))<0)
goto error;
if((mtype2_id = h5tools_get_native_type(ftype2_id))<0)
@@ -449,14 +464,20 @@ hsize_t diff_attr(hid_t loc1_id,
buf1 = (void *)HDmalloc((size_t)(nelmts1 * msize1));
buf2 = (void *)HDmalloc((size_t)(nelmts1 * msize2));
- if(buf1 == NULL || buf2 == NULL) {
+ if(buf1 == NULL || buf2 == NULL){
parallel_print( "cannot read into memory\n" );
goto error;
}
- if(H5Aread(attr1_id,mtype1_id,buf1) < 0)
- goto error;
- if(H5Aread(attr2_id,mtype2_id,buf2) < 0)
- goto error;
+ if(H5Aread(attr1_id,mtype1_id,buf1) < 0){
+ parallel_print("Failed reading attribute1 %s/%s\n", path1, name1);
+ goto error;
+ }else
+ buf1hasdata = 1;
+ if(H5Aread(attr2_id,mtype2_id,buf2) < 0){
+ parallel_print("Failed reading attribute2 %s/%s\n", path2, name2);
+ goto error;
+ }else
+ buf2hasdata = 1;
/* format output string */
HDsnprintf(np1, sizeof(np1), "%s of <%s>", name1, path1);
@@ -504,8 +525,8 @@ hsize_t diff_attr(hid_t loc1_id,
if(TRUE == h5tools_detect_vlen(mtype1_id))
H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
-
buf1 = NULL;
+
if(TRUE == h5tools_detect_vlen(mtype2_id))
H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
@@ -539,12 +560,12 @@ hsize_t diff_attr(hid_t loc1_id,
error:
H5E_BEGIN_TRY {
if(buf1) {
- if(TRUE == h5tools_detect_vlen(mtype1_id))
+ if(buf1hasdata && TRUE == h5tools_detect_vlen(mtype1_id))
H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
} /* end if */
if(buf2) {
- if(TRUE == h5tools_detect_vlen(mtype2_id))
+ if(buf2hasdata && TRUE == h5tools_detect_vlen(mtype2_id))
H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
} /* end if */
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index ed8c315..8af05b4 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -69,9 +69,9 @@ endif (BUILD_TESTING)
##############################################################################
##############################################################################
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Rules for Installation of tools using make Install target
+#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR} toolsapplications)
#INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications)
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
index 468ff3a..0887fb6 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -190,7 +190,7 @@
# test the output files repartitioned above.
add_test (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
- set_tests_properties (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
+ set_tests_properties (H5REPART-h5repart_test PROPERTIES DEPENDS "H5REPART-clearall-objects;H5REPART-h5repart_20K;H5REPART-h5repart_5K;H5REPART-h5repart_sec2")
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
h5repart_test
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index b5cd99f..b0a7822 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -534,7 +534,6 @@ LIPO = @LIPO@
LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-LT_ADD_LIBHDF5_DEPENDENCY = @LT_ADD_LIBHDF5_DEPENDENCY@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
diff --git a/tools/misc/h5perf_gentest.c b/tools/misc/h5perf_gentest.c
index 6a080d0..6729ed4 100644
--- a/tools/misc/h5perf_gentest.c
+++ b/tools/misc/h5perf_gentest.c
@@ -1,598 +1,598 @@
-/*****************************************************************************
- This test generates attributes, groups, and datasets of many types. It
- creates a large number of attributes, groups, and datasets by specifying
- -a, -g, -d options respectively. Using "-h" option to see details.
-
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
- ****************************************************************************/
-
-#include "hdf5.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define FNAME "test_perf.h5"
-#define NGROUPS 20
-#define NDSETS 20
-#define NATTRS 20
-#define DIM0 40
-#define NROWS 100
-#define NTYPES 9
-#define MAXVLEN 10
-#define FIXED_LEN 8
-
-typedef enum { SOLID=0, LIQUID, GAS, PLASMA } phase_t;
-
-typedef struct {
- int i;
- unsigned long long l;
- float f;
- double d;
- char s[FIXED_LEN];
- phase_t e;
- float f_array[FIXED_LEN];
- hvl_t i_vlen;
- char *s_vlen;
-} test_comp_t;
-
-typedef struct {
- int zipcode;
- char *city;
-} zipcode_t;
-
-int add_attrs(hid_t oid, int idx);
-int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf) ;
-herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
- int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
- int compressed, int latest);
-
-int main (int argc, char *argv[])
-{
- char fname[32];
- int i, ngrps=NGROUPS, ndsets=NDSETS, nattrs=NATTRS, dim0=DIM0,
- chunk=DIM0/10+1, nrows=NROWS, vlen=MAXVLEN, l=0, z=0;
-
- memset(fname, 0, 32);
- for (i=1; i<argc; i++) {
- if (strcmp(argv[i], "-f")==0)
- strcpy(fname, argv[i+1]);
- else if (strcmp(argv[i], "-g")==0)
- ngrps = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-d")==0)
- ndsets = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-a")==0)
- nattrs = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-r")==0)
- nrows = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-s")==0)
- dim0 = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-c")==0)
- chunk = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-v")==0)
- vlen = atoi(argv[i+1]);
- else if (strcmp(argv[i], "-l")==0)
- l = 1;
- else if (strcmp(argv[i], "-z")==0)
- z = 1;
- else if (strcmp(argv[i], "-h")==0) {
- printf("\nOPTONS:\n");
- printf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
- printf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
- printf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
- printf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
- printf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
- printf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
- printf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0/10+1));
- printf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
- printf("\t-l:\tuse latest format (default: no).\n");
- printf("\t-z:\tuse gzip compression (default: no).\n");
- printf("\t-h:\tthis help information.\n");
- printf("Example:\n");
- printf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
- exit(0);
- }
- }
-
- if (strlen(fname)<=0)
- sprintf(fname, FNAME);
-
- create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows,
- (hsize_t)dim0, (hsize_t)chunk, vlen, z, l);
-
- return 0;
-}
-
-/*****************************************************************************
- This function generates attributes, groups, and datasets of many types.
-
- Parameters:
- fname: file_name.
- ngrps: number of top level groups.
- ndsets: number of datasets.
- attrs: number of attributes.
- nrow: number of rows in a dataset.
- chunk: chunk size (single number).
- vlen: max vlen size.
- comp: use latest format.
- latest: use gzip comnpression.
-
- Return: Non-negative on success/Negative on failure
-
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
- ****************************************************************************/
-herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
- int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
- int compressed, int latest)
-{
- int i, j, k;
- hid_t fid, sid_null, sid_scalar, sid_1d, sid_2d, did, aid, sid_2, sid_large,
- fapl=H5P_DEFAULT, dcpl=H5P_DEFAULT, gid1, gid2, cmp_tid, tid_str,
- tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s;
- char name[32], tmp_name1[32], tmp_name2[32], tmp_name3[32];
- hsize_t dims[1]={dim0}, dims2d[2]={dim0, (dim0/4+1)}, dims_array[1]={FIXED_LEN},
- dim1[1]={2};
- char *enum_names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"};
- test_comp_t *buf_comp=NULL, *buf_comp_large=NULL;
- int *buf_int=NULL;
- float (*buf_float_a)[FIXED_LEN]=NULL;
- double **buf_double2d=NULL;
- hvl_t *buf_vlen_i=NULL;
- char (*buf_str)[FIXED_LEN];
- char **buf_vlen_s=NULL;
- hobj_ref_t buf_ref[2];
- hdset_reg_ref_t buf_reg_ref[2];
- size_t offset, len;
- herr_t status;
- char *names[NTYPES] = { "int", "ulong", "float", "double", "fixed string",
- "enum", "fixed float array", "vlen int array", "vlen strings"};
- hid_t types[NTYPES] = { H5T_NATIVE_INT, H5T_NATIVE_UINT64, H5T_NATIVE_FLOAT,
- H5T_NATIVE_DOUBLE, tid_str, tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s};
- hsize_t coords[4][2] = { {0, 1}, {3, 5}, {1, 0}, {2, 4}}, start=0, stride=1, count=1;
-
- if (nrows < NROWS) nrows = NROWS;
- if (ngrps<NGROUPS) ngrps=NGROUPS;
- if (ndsets<NDSETS) ndsets=NDSETS;
- if (nattrs<NATTRS) nattrs=NATTRS;
- if (dim0<DIM0) dim0=DIM0;
- if (chunk>dim0) chunk=dim0/4;
- if (chunk<1) chunk = 1;
- if (vlen<1) vlen = MAXVLEN;
-
- /* create fixed string datatype */
- types[4] = tid_str = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid_str, FIXED_LEN);
-
- /* create enum datatype */
- types[5] = tid_enum = H5Tenum_create(H5T_NATIVE_INT);
- for (i = (int) SOLID; i <= (int) PLASMA; i++) {
- phase_t val = (phase_t) i;
- status = H5Tenum_insert (tid_enum, enum_names[i], &val);
- }
-
- /* create float array datatype */
- types[6] = tid_array_f = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims_array);
-
- /* create variable length integer datatypes */
- types[7] = tid_vlen_i = H5Tvlen_create (H5T_NATIVE_INT);
-
- /* create variable length string datatype */
- types[8] = tid_vlen_s = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid_vlen_s, H5T_VARIABLE);
-
- /* create compound datatypes */
- cmp_tid = H5Tcreate (H5T_COMPOUND, sizeof (test_comp_t));
- offset = 0;
- for (i=0; i<NTYPES-2; i++) {
- H5Tinsert(cmp_tid, names[i], offset, types[i]);
- offset += H5Tget_size(types[i]);
- }
-
- H5Tinsert(cmp_tid, names[7], offset, types[7]);
- offset += sizeof (hvl_t);
- H5Tinsert(cmp_tid, names[8], offset, types[8]);
-
- /* create dataspace */
- sid_1d = H5Screate_simple (1, dims, NULL);
- sid_2d = H5Screate_simple (2, dims2d, NULL);
- sid_2 = H5Screate_simple (1, dim1, NULL);
- sid_large = H5Screate_simple (1, &nrows, NULL);
- sid_null = H5Screate (H5S_NULL);
- sid_scalar = H5Screate (H5S_SCALAR);
-
- /* create fid access property */
- fapl = H5Pcreate (H5P_FILE_ACCESS);
- H5Pset_libver_bounds (fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
-
- /* create dataset creation property */
- dcpl = H5Pcreate (H5P_DATASET_CREATE);
-
- /* set dataset chunk */
- if (chunk>0) {
- H5Pset_chunk (dcpl, 1, &chunk);
- }
-
- /* set dataset compression */
- if (compressed) {
- if (chunk<=0) {
- chunk = dim0/10+1;;
- H5Pset_chunk (dcpl, 1, &chunk);
- }
- H5Pset_shuffle (dcpl);
- H5Pset_deflate (dcpl, 6);
- }
-
- /* allocate buffers */
- buf_comp = (test_comp_t *)calloc(dim0, sizeof(test_comp_t));
- buf_comp_large = (test_comp_t *)calloc(nrows, sizeof(test_comp_t));
- buf_int = (int *)calloc(dim0, sizeof(int));
- buf_float_a = malloc(dim0*sizeof(*buf_float_a));
- buf_vlen_i = (hvl_t *)calloc(dim0, sizeof (hvl_t));
- buf_vlen_s = (char **)calloc(dim0, sizeof(char *));
- buf_str = malloc(dim0*sizeof (*buf_str));
-
- /* allocate array of doulbe pointers */
- buf_double2d = (double **)calloc(dims2d[0],sizeof(double *));
- /* allocate a contigous chunk of memory for the data */
- buf_double2d[0] = (double *)calloc( dims2d[0]*dims2d[1],sizeof(double) );
- /* assign memory city to pointer array */
- for (i=1; i <dims2d[0]; i++) buf_double2d[i] = buf_double2d[0]+i*dims2d[1];
-
- /* fill buffer values */
- len = 1;
- for (i=0; i<dims[0]; i++) {
- buf_comp[i].i = buf_int[i] = i-2147483648;
- buf_comp[i].l = 0xffffffffffffffff-i;
- buf_comp[i].f = 1.0/(i+1.0);
- buf_comp[i].d = 987654321.0*i+1.0/(i+1.0);
- buf_comp[i].e = (phase_t) (i % (int) (PLASMA + 1));
-
- for (j=0; j<FIXED_LEN; j++) {
- buf_comp[i].f_array[j] = buf_float_a[i][j] = i*100+j;
- buf_str[i][j] = 'a' + (i%26);
- }
- buf_str[i][FIXED_LEN-1] = 0;
- strcpy(buf_comp[i].s, buf_str[i]);
-
- len = (1-cos(i/8.0))/2*vlen+1;
- if (!i) len = vlen;
- buf_vlen_i[i].len = len;
- buf_vlen_i[i].p = (int *)calloc(len, sizeof(int));
- for (j=0; j<len; j++) ((int*)(buf_vlen_i[i].p))[j] = i*100+j;
- buf_comp[i].i_vlen = buf_vlen_i[i];
-
- buf_vlen_s[i] = (char *)calloc(len, sizeof(char));
- for (j=0; j<len-1; j++)
- buf_vlen_s[i][j] = j%26+'A';
- buf_comp[i].s_vlen = buf_vlen_s[i];
-
- for (j=0; j<dims2d[1]; j++)
- buf_double2d[i][j] = i+j/10000.0;
- }
-
- for (i=0; i<nrows; i++) {
- buf_comp_large[i].i = i-2147483648;
- buf_comp_large[i].l = 0xffffffffffffffff-i;
- buf_comp_large[i].f = 1.0/(i+1.0);
- buf_comp_large[i].d = 987654321.0*i+1.0/(i+1.0);
- buf_comp_large[i].e = (phase_t) (i % (int) (PLASMA + 1));
- for (j=0; j<FIXED_LEN-1; j++) {
- buf_comp_large[i].f_array[j] = i*100+j;
- buf_comp_large[i].s[j] = 'a' + (i%26);
- }
- len = i%vlen+1;
- buf_comp_large[i].i_vlen.len = len;
- buf_comp_large[i].i_vlen.p = (int *)calloc(len, sizeof(int));
- for (j=0; j<len; j++) ((int*)(buf_comp_large[i].i_vlen.p))[j] = i*100+j;
- buf_comp_large[i].s_vlen = (char *)calloc(i+2, sizeof(char));
- for (j=0; j<i+1; j++) (buf_comp_large[i].s_vlen)[j] = j%26+'A';
- }
-
- /* create file */
- if (latest)
- fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- else
- fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- add_attrs(fid, 0);
-
- sprintf(name, "a cmp ds of %d rows", nrows);
- did = H5Dcreate (fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
- add_attrs(did, 0);
- H5Dclose(did);
-
- // /* add attributes*/
- gid1 = H5Gcreate (fid, "attributes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (nattrs<1) nattrs = 1;
- i=0;
- while (i<nattrs) i += add_attrs(gid1, i);
- H5Gclose(gid1);
-
- /* add many sub groups to a group*/
- gid1 = H5Gcreate (fid, "groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- add_attrs(gid1, 0);
- for (i=0; i<ngrps; i++) {
- /* create sub groups */
- sprintf(name, "g%02d", i);
- gid2 = H5Gcreate (gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (i<10) add_attrs(gid2, 0);
- H5Gclose(gid2);
- }
- H5Gclose(gid1);
-
- /* add many datasets to a group */
- gid1 = H5Gcreate (fid, "datasets", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- add_attrs(gid1, 0);
- for (j=0; j<ndsets; j+=12) {
- /* 1 add a null dataset */
- sprintf(name, "%05d null dataset", j);
- did = H5Dcreate (gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 2 add scalar int point */
- sprintf(name, "%05d scalar int point", j);
- did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 3 scalar vlen string */
- sprintf(name, "%05d scalar vlen string", j);
- did = H5Dcreate (gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 4 add fixed-length float array */
- sprintf(name, "%05d fixed-length float array", j);
- did = H5Dcreate (gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 5 add fixed-length strings */
- sprintf(name, "%05d fixed-length strings", j);
- did = H5Dcreate (gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 6 add compound data */
- sprintf(name, "%05d compund data", j);
- did = H5Dcreate (gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 7 add 2D double */
- sprintf(name, "%05d 2D double", j);
- strcpy (tmp_name1, name);
- did = H5Dcreate (gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 8 add 1D int array */
- sprintf(name, "%05d 1D int array", j);
- did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 9 add vlen int array */
- sprintf(name, "%05d vlen int array", j);
- strcpy (tmp_name2, name);
- did = H5Dcreate (gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 10 add vlen strings */
- sprintf(name, "%05d vlen strings", j);
- strcpy (tmp_name3, name);
- did = H5Dcreate (gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 11 add object refs */
- H5Rcreate(&buf_ref[0],gid1, ".", H5R_OBJECT, -1);
- H5Rcreate(&buf_ref[1],gid1, tmp_name3, H5R_OBJECT, -1);
- sprintf(name, "%05d obj refs", j);
- did = H5Dcreate (gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
-
- /* 12 add region refs */
- H5Sselect_elements (sid_2d, H5S_SELECT_SET, 4, coords[0]);
- H5Rcreate(&buf_reg_ref[0],gid1, tmp_name1, H5R_DATASET_REGION, sid_2d);
- H5Sselect_none(sid_2d);
- count = dims[0]/2+1;
- H5Sselect_hyperslab (sid_1d, H5S_SELECT_SET, &start, &stride, &count,NULL);
- H5Rcreate(&buf_reg_ref[1],gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
- H5Sselect_none(sid_1d);
- sprintf(name, "%05d region refs", j);
- did = H5Dcreate (gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite (did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
- if (!j) add_attrs(did, j);
- H5Dclose(did);
- }
- H5Gclose(gid1);
-
- H5Tclose (tid_array_f);
- H5Tclose (tid_vlen_i);
- H5Tclose (tid_vlen_s);
- H5Tclose (tid_enum);
- H5Tclose (tid_str);
- H5Tclose (cmp_tid);
- H5Pclose (dcpl);
- H5Pclose (fapl);
- H5Sclose (sid_1d);
- H5Sclose (sid_2d);
- H5Sclose (sid_2);
- H5Sclose (sid_large);
- H5Sclose (sid_null);
- H5Sclose (sid_scalar);
- H5Fclose (fid);
-
- for (i=0; i<dims[0]; i++) {
- if (buf_vlen_i[i].p) free(buf_vlen_i[i].p);
- if (buf_vlen_s[i]) free(buf_vlen_s[i]);
- }
-
- for (i=0; i<nrows; i++) {
- if (buf_comp_large[i].i_vlen.p) free(buf_comp_large[i].i_vlen.p);
- if (buf_comp_large[i].s_vlen) free(buf_comp_large[i].s_vlen);
- }
-
- free (buf_comp);
- free (buf_comp_large);
- free (buf_int);
- free (buf_float_a);
- free (buf_double2d[0]);
- free (buf_double2d);
- free (buf_str);
- free(buf_vlen_i);
- free(buf_vlen_s);
-
- return 0;
-}
-
-/* add a single attribute */
-int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf)
-{
- hid_t aid;
-
- aid = H5Acreate (oid, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- if (aid <0)
- return 0;
-
- H5Awrite(aid, tid, buf);
-
- H5Aclose(aid);
-
- return 1;
-}
-
-/*
- adds different types of attributes to an object.
-
- returns the number of attributes added to the objects.
- */
-int add_attrs(hid_t oid, int idx)
-{
- char name[32];
- int i0, i1, i2, j, nattrs=0;
- hid_t aid, tid, tid1, sid;
- hvl_t i_vlen[4];
- hobj_ref_t ref;
- zipcode_t cmp_data[4];
- unsigned int i = 0xffffffff;
- long long l = -2147483647;
- float f = 123456789.987654321;
- double d = 987654321.123456789;
- char *s[7] = {"Parting", "is such", "sweeter", "sorrow."};
- float f_array[4] = {1.0, 2.22, 3.333, 4.444};
- char *s_vlen[4] = {"Parting", "is such", "sweet", "sorrow."};
- hsize_t dims1[1]={1}, dims2[1]={4}, dims3[2]={3,5};
- int int3d[4][3][5];
- size_t offset = 0;
-
- for (i0=0; i0<4; i0++) {
- i_vlen[i0].len = (i0+1);
- i_vlen[i0].p = (int *)calloc(i_vlen[i0].len, sizeof(int));
- for (j=0; j<i_vlen[i0].len; j++)
- ((int *)i_vlen[i0].p)[j] = i0*100+j;
- for (i1=0; i1<3; i1++) {
- for (i2=0; i2<5; i2++)
- int3d[i0][i1][i2] = i0*i1-i1*i2+i0*i2;
- }
- }
-
- cmp_data[0].zipcode = 01001;
- cmp_data[0].city = "Agawam, Massachusetts";
- cmp_data[1].zipcode = 99950;
- cmp_data[1].city = "Ketchikan, Alaska";
- cmp_data[2].zipcode = 00501;
- cmp_data[2].city = "Holtsville, New York";
- cmp_data[3].zipcode = 61820;
- cmp_data[3].city = "Champaign, Illinois";
-
- /* 1 scalar point */
- sid = H5Screate (H5S_SCALAR);
- sprintf(name, "%05d scalar int", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
- sprintf(name, "%05d scalar ulong", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
- sprintf(name, "%05d scalar str", idx);
- tid = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid, H5T_VARIABLE);
- nattrs += add_attr(oid, name, tid, sid, &s[2]);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 4 single point */
- sid = H5Screate_simple (1, dims1, NULL);
- H5Rcreate(&ref, oid, ".", H5R_OBJECT, -1);
- sprintf(name, "%05d single float", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
- sprintf(name, "%05d single double", idx);
- nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
- sprintf(name, "%05d single obj_ref", idx);
- nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
- H5Sclose(sid);
-
- /* 7 fixed length 1D array */
- sid = H5Screate_simple (1, dims1, NULL);
- tid = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims2);
- sprintf(name, "%05d array float", idx);
- nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
- H5Tclose(tid);
- tid = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid, strlen(s[0])+1);
- tid1 = H5Tarray_create (tid, 1, dims2);
- sprintf(name, "%05d array str", idx);
- nattrs += add_attr(oid, name, tid1, sid, s);
- H5Tclose(tid1);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 9 fixed length 2D int arrays */
- sid = H5Screate_simple (1, dims2, NULL);
- tid = H5Tarray_create (H5T_NATIVE_INT, 2, dims3);
- sprintf(name, "%05d array int 2D", idx);
- nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 10 variable length arrays */
- sid = H5Screate_simple (1, dims2, NULL);
- tid = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid, H5T_VARIABLE);
- sprintf(name, "%05d vlen strings", idx);
- nattrs += add_attr(oid, name, tid, sid, s_vlen);
- H5Tclose(tid);
- tid = H5Tvlen_create (H5T_NATIVE_INT);;
- sprintf(name, "%05d vlen int array", idx);
- nattrs += add_attr(oid, name, tid, sid, i_vlen);
- H5Tclose(tid);
- H5Sclose(sid);
-
- /* 12 compound data */
- sid = H5Screate_simple (1, dims2, NULL);
- tid = H5Tcreate (H5T_COMPOUND, sizeof (zipcode_t));
- tid1 = H5Tcopy (H5T_C_S1);
- H5Tset_size (tid1, H5T_VARIABLE);
- H5Tinsert (tid, "zip code", 0, H5T_NATIVE_INT); offset += sizeof(H5T_NATIVE_INT);
- H5Tinsert (tid, "City", offset, tid1); offset += sizeof(char *);
- sprintf(name, "%05d compound data", idx);
- nattrs += add_attr(oid, name, tid, sid, cmp_data);
- H5Tclose(tid1);
- H5Tclose(tid);
- H5Sclose(sid);
-
- for (i0=0; i0<4; i0++)
- free(i_vlen[i0].p);
-
- return nattrs;
-}
+/*****************************************************************************
+ This test generates attributes, groups, and datasets of many types. It
+ creates a large number of attributes, groups, and datasets by specifying
+ -a, -g, -d options respectively. Using "-h" option to see details.
+
+ Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ ****************************************************************************/
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FNAME "test_perf.h5"
+#define NGROUPS 20
+#define NDSETS 20
+#define NATTRS 20
+#define DIM0 40
+#define NROWS 100
+#define NTYPES 9
+#define MAXVLEN 10
+#define FIXED_LEN 8
+
+typedef enum { SOLID=0, LIQUID, GAS, PLASMA } phase_t;
+
+typedef struct {
+ int i;
+ unsigned long long l;
+ float f;
+ double d;
+ char s[FIXED_LEN];
+ phase_t e;
+ float f_array[FIXED_LEN];
+ hvl_t i_vlen;
+ char *s_vlen;
+} test_comp_t;
+
+typedef struct {
+ int zipcode;
+ char *city;
+} zipcode_t;
+
+int add_attrs(hid_t oid, int idx);
+int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf) ;
+herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
+ int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
+ int compressed, int latest);
+
+int main (int argc, char *argv[])
+{
+ char fname[32];
+ int i, ngrps=NGROUPS, ndsets=NDSETS, nattrs=NATTRS, dim0=DIM0,
+ chunk=DIM0/10+1, nrows=NROWS, vlen=MAXVLEN, l=0, z=0;
+
+ memset(fname, 0, 32);
+ for (i=1; i<argc; i++) {
+ if (strcmp(argv[i], "-f")==0)
+ strcpy(fname, argv[i+1]);
+ else if (strcmp(argv[i], "-g")==0)
+ ngrps = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-d")==0)
+ ndsets = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-a")==0)
+ nattrs = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-r")==0)
+ nrows = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-s")==0)
+ dim0 = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-c")==0)
+ chunk = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-v")==0)
+ vlen = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-l")==0)
+ l = 1;
+ else if (strcmp(argv[i], "-z")==0)
+ z = 1;
+ else if (strcmp(argv[i], "-h")==0) {
+ printf("\nOPTONS:\n");
+ printf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
+ printf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
+ printf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
+ printf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
+ printf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
+ printf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
+ printf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0/10+1));
+ printf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
+ printf("\t-l:\tuse latest format (default: no).\n");
+ printf("\t-z:\tuse gzip compression (default: no).\n");
+ printf("\t-h:\tthis help information.\n");
+ printf("Example:\n");
+ printf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
+ exit(0);
+ }
+ }
+
+ if (strlen(fname)<=0)
+ sprintf(fname, FNAME);
+
+ create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows,
+ (hsize_t)dim0, (hsize_t)chunk, vlen, z, l);
+
+ return 0;
+}
+
+/*****************************************************************************
+ This function generates attributes, groups, and datasets of many types.
+
+ Parameters:
+ fname: file_name.
+ ngrps: number of top level groups.
+ ndsets: number of datasets.
+ attrs: number of attributes.
+ nrow: number of rows in a dataset.
+ chunk: chunk size (single number).
+ vlen: max vlen size.
+ comp: use latest format.
+ latest: use gzip comnpression.
+
+ Return: Non-negative on success/Negative on failure
+
+ Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ ****************************************************************************/
+herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
+ int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
+ int compressed, int latest)
+{
+ int i, j, k;
+ hid_t fid, sid_null, sid_scalar, sid_1d, sid_2d, did, aid, sid_2, sid_large,
+ fapl=H5P_DEFAULT, dcpl=H5P_DEFAULT, gid1, gid2, cmp_tid, tid_str,
+ tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s;
+ char name[32], tmp_name1[32], tmp_name2[32], tmp_name3[32];
+ hsize_t dims[1]={dim0}, dims2d[2]={dim0, (dim0/4+1)}, dims_array[1]={FIXED_LEN},
+ dim1[1]={2};
+ char *enum_names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"};
+ test_comp_t *buf_comp=NULL, *buf_comp_large=NULL;
+ int *buf_int=NULL;
+ float (*buf_float_a)[FIXED_LEN]=NULL;
+ double **buf_double2d=NULL;
+ hvl_t *buf_vlen_i=NULL;
+ char (*buf_str)[FIXED_LEN];
+ char **buf_vlen_s=NULL;
+ hobj_ref_t buf_ref[2];
+ hdset_reg_ref_t buf_reg_ref[2];
+ size_t offset, len;
+ herr_t status;
+ char *names[NTYPES] = { "int", "ulong", "float", "double", "fixed string",
+ "enum", "fixed float array", "vlen int array", "vlen strings"};
+ hid_t types[NTYPES] = { H5T_NATIVE_INT, H5T_NATIVE_UINT64, H5T_NATIVE_FLOAT,
+ H5T_NATIVE_DOUBLE, tid_str, tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s};
+ hsize_t coords[4][2] = { {0, 1}, {3, 5}, {1, 0}, {2, 4}}, start=0, stride=1, count=1;
+
+ if (nrows < NROWS) nrows = NROWS;
+ if (ngrps<NGROUPS) ngrps=NGROUPS;
+ if (ndsets<NDSETS) ndsets=NDSETS;
+ if (nattrs<NATTRS) nattrs=NATTRS;
+ if (dim0<DIM0) dim0=DIM0;
+ if (chunk>dim0) chunk=dim0/4;
+ if (chunk<1) chunk = 1;
+ if (vlen<1) vlen = MAXVLEN;
+
+ /* create fixed string datatype */
+ types[4] = tid_str = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid_str, FIXED_LEN);
+
+ /* create enum datatype */
+ types[5] = tid_enum = H5Tenum_create(H5T_NATIVE_INT);
+ for (i = (int) SOLID; i <= (int) PLASMA; i++) {
+ phase_t val = (phase_t) i;
+ status = H5Tenum_insert (tid_enum, enum_names[i], &val);
+ }
+
+ /* create float array datatype */
+ types[6] = tid_array_f = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims_array);
+
+ /* create variable length integer datatypes */
+ types[7] = tid_vlen_i = H5Tvlen_create (H5T_NATIVE_INT);
+
+ /* create variable length string datatype */
+ types[8] = tid_vlen_s = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid_vlen_s, H5T_VARIABLE);
+
+ /* create compound datatypes */
+ cmp_tid = H5Tcreate (H5T_COMPOUND, sizeof (test_comp_t));
+ offset = 0;
+ for (i=0; i<NTYPES-2; i++) {
+ H5Tinsert(cmp_tid, names[i], offset, types[i]);
+ offset += H5Tget_size(types[i]);
+ }
+
+ H5Tinsert(cmp_tid, names[7], offset, types[7]);
+ offset += sizeof (hvl_t);
+ H5Tinsert(cmp_tid, names[8], offset, types[8]);
+
+ /* create dataspace */
+ sid_1d = H5Screate_simple (1, dims, NULL);
+ sid_2d = H5Screate_simple (2, dims2d, NULL);
+ sid_2 = H5Screate_simple (1, dim1, NULL);
+ sid_large = H5Screate_simple (1, &nrows, NULL);
+ sid_null = H5Screate (H5S_NULL);
+ sid_scalar = H5Screate (H5S_SCALAR);
+
+ /* create fid access property */
+ fapl = H5Pcreate (H5P_FILE_ACCESS);
+ H5Pset_libver_bounds (fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+
+ /* create dataset creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* set dataset chunk */
+ if (chunk>0) {
+ H5Pset_chunk (dcpl, 1, &chunk);
+ }
+
+ /* set dataset compression */
+ if (compressed) {
+ if (chunk<=0) {
+ chunk = dim0/10+1;;
+ H5Pset_chunk (dcpl, 1, &chunk);
+ }
+ H5Pset_shuffle (dcpl);
+ H5Pset_deflate (dcpl, 6);
+ }
+
+ /* allocate buffers */
+ buf_comp = (test_comp_t *)calloc(dim0, sizeof(test_comp_t));
+ buf_comp_large = (test_comp_t *)calloc(nrows, sizeof(test_comp_t));
+ buf_int = (int *)calloc(dim0, sizeof(int));
+ buf_float_a = malloc(dim0*sizeof(*buf_float_a));
+ buf_vlen_i = (hvl_t *)calloc(dim0, sizeof (hvl_t));
+ buf_vlen_s = (char **)calloc(dim0, sizeof(char *));
+ buf_str = malloc(dim0*sizeof (*buf_str));
+
+ /* allocate array of doulbe pointers */
+ buf_double2d = (double **)calloc(dims2d[0],sizeof(double *));
+ /* allocate a contigous chunk of memory for the data */
+ buf_double2d[0] = (double *)calloc( dims2d[0]*dims2d[1],sizeof(double) );
+ /* assign memory city to pointer array */
+ for (i=1; i <dims2d[0]; i++) buf_double2d[i] = buf_double2d[0]+i*dims2d[1];
+
+ /* fill buffer values */
+ len = 1;
+ for (i=0; i<dims[0]; i++) {
+ buf_comp[i].i = buf_int[i] = i-2147483648;
+ buf_comp[i].l = 0xffffffffffffffff-i;
+ buf_comp[i].f = 1.0/(i+1.0);
+ buf_comp[i].d = 987654321.0*i+1.0/(i+1.0);
+ buf_comp[i].e = (phase_t) (i % (int) (PLASMA + 1));
+
+ for (j=0; j<FIXED_LEN; j++) {
+ buf_comp[i].f_array[j] = buf_float_a[i][j] = i*100+j;
+ buf_str[i][j] = 'a' + (i%26);
+ }
+ buf_str[i][FIXED_LEN-1] = 0;
+ strcpy(buf_comp[i].s, buf_str[i]);
+
+ len = (1-cos(i/8.0))/2*vlen+1;
+ if (!i) len = vlen;
+ buf_vlen_i[i].len = len;
+ buf_vlen_i[i].p = (int *)calloc(len, sizeof(int));
+ for (j=0; j<len; j++) ((int*)(buf_vlen_i[i].p))[j] = i*100+j;
+ buf_comp[i].i_vlen = buf_vlen_i[i];
+
+ buf_vlen_s[i] = (char *)calloc(len, sizeof(char));
+ for (j=0; j<len-1; j++)
+ buf_vlen_s[i][j] = j%26+'A';
+ buf_comp[i].s_vlen = buf_vlen_s[i];
+
+ for (j=0; j<dims2d[1]; j++)
+ buf_double2d[i][j] = i+j/10000.0;
+ }
+
+ for (i=0; i<nrows; i++) {
+ buf_comp_large[i].i = i-2147483648;
+ buf_comp_large[i].l = 0xffffffffffffffff-i;
+ buf_comp_large[i].f = 1.0/(i+1.0);
+ buf_comp_large[i].d = 987654321.0*i+1.0/(i+1.0);
+ buf_comp_large[i].e = (phase_t) (i % (int) (PLASMA + 1));
+ for (j=0; j<FIXED_LEN-1; j++) {
+ buf_comp_large[i].f_array[j] = i*100+j;
+ buf_comp_large[i].s[j] = 'a' + (i%26);
+ }
+ len = i%vlen+1;
+ buf_comp_large[i].i_vlen.len = len;
+ buf_comp_large[i].i_vlen.p = (int *)calloc(len, sizeof(int));
+ for (j=0; j<len; j++) ((int*)(buf_comp_large[i].i_vlen.p))[j] = i*100+j;
+ buf_comp_large[i].s_vlen = (char *)calloc(i+2, sizeof(char));
+ for (j=0; j<i+1; j++) (buf_comp_large[i].s_vlen)[j] = j%26+'A';
+ }
+
+ /* create file */
+ if (latest)
+ fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ else
+ fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(fid, 0);
+
+ sprintf(name, "a cmp ds of %d rows", nrows);
+ did = H5Dcreate (fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
+ add_attrs(did, 0);
+ H5Dclose(did);
+
+ // /* add attributes*/
+ gid1 = H5Gcreate (fid, "attributes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (nattrs<1) nattrs = 1;
+ i=0;
+ while (i<nattrs) i += add_attrs(gid1, i);
+ H5Gclose(gid1);
+
+ /* add many sub groups to a group*/
+ gid1 = H5Gcreate (fid, "groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(gid1, 0);
+ for (i=0; i<ngrps; i++) {
+ /* create sub groups */
+ sprintf(name, "g%02d", i);
+ gid2 = H5Gcreate (gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (i<10) add_attrs(gid2, 0);
+ H5Gclose(gid2);
+ }
+ H5Gclose(gid1);
+
+ /* add many datasets to a group */
+ gid1 = H5Gcreate (fid, "datasets", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(gid1, 0);
+ for (j=0; j<ndsets; j+=12) {
+ /* 1 add a null dataset */
+ sprintf(name, "%05d null dataset", j);
+ did = H5Dcreate (gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 2 add scalar int point */
+ sprintf(name, "%05d scalar int point", j);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 3 scalar vlen string */
+ sprintf(name, "%05d scalar vlen string", j);
+ did = H5Dcreate (gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 4 add fixed-length float array */
+ sprintf(name, "%05d fixed-length float array", j);
+ did = H5Dcreate (gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 5 add fixed-length strings */
+ sprintf(name, "%05d fixed-length strings", j);
+ did = H5Dcreate (gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 6 add compound data */
+ sprintf(name, "%05d compund data", j);
+ did = H5Dcreate (gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 7 add 2D double */
+ sprintf(name, "%05d 2D double", j);
+ strcpy (tmp_name1, name);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 8 add 1D int array */
+ sprintf(name, "%05d 1D int array", j);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 9 add vlen int array */
+ sprintf(name, "%05d vlen int array", j);
+ strcpy (tmp_name2, name);
+ did = H5Dcreate (gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 10 add vlen strings */
+ sprintf(name, "%05d vlen strings", j);
+ strcpy (tmp_name3, name);
+ did = H5Dcreate (gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 11 add object refs */
+ H5Rcreate(&buf_ref[0],gid1, ".", H5R_OBJECT, -1);
+ H5Rcreate(&buf_ref[1],gid1, tmp_name3, H5R_OBJECT, -1);
+ sprintf(name, "%05d obj refs", j);
+ did = H5Dcreate (gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 12 add region refs */
+ H5Sselect_elements (sid_2d, H5S_SELECT_SET, 4, coords[0]);
+ H5Rcreate(&buf_reg_ref[0],gid1, tmp_name1, H5R_DATASET_REGION, sid_2d);
+ H5Sselect_none(sid_2d);
+ count = dims[0]/2+1;
+ H5Sselect_hyperslab (sid_1d, H5S_SELECT_SET, &start, &stride, &count,NULL);
+ H5Rcreate(&buf_reg_ref[1],gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
+ H5Sselect_none(sid_1d);
+ sprintf(name, "%05d region refs", j);
+ did = H5Dcreate (gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+ }
+ H5Gclose(gid1);
+
+ H5Tclose (tid_array_f);
+ H5Tclose (tid_vlen_i);
+ H5Tclose (tid_vlen_s);
+ H5Tclose (tid_enum);
+ H5Tclose (tid_str);
+ H5Tclose (cmp_tid);
+ H5Pclose (dcpl);
+ H5Pclose (fapl);
+ H5Sclose (sid_1d);
+ H5Sclose (sid_2d);
+ H5Sclose (sid_2);
+ H5Sclose (sid_large);
+ H5Sclose (sid_null);
+ H5Sclose (sid_scalar);
+ H5Fclose (fid);
+
+ for (i=0; i<dims[0]; i++) {
+ if (buf_vlen_i[i].p) free(buf_vlen_i[i].p);
+ if (buf_vlen_s[i]) free(buf_vlen_s[i]);
+ }
+
+ for (i=0; i<nrows; i++) {
+ if (buf_comp_large[i].i_vlen.p) free(buf_comp_large[i].i_vlen.p);
+ if (buf_comp_large[i].s_vlen) free(buf_comp_large[i].s_vlen);
+ }
+
+ free (buf_comp);
+ free (buf_comp_large);
+ free (buf_int);
+ free (buf_float_a);
+ free (buf_double2d[0]);
+ free (buf_double2d);
+ free (buf_str);
+ free(buf_vlen_i);
+ free(buf_vlen_s);
+
+ return 0;
+}
+
+/* add a single attribute */
+int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf)
+{
+ hid_t aid;
+
+ aid = H5Acreate (oid, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ if (aid <0)
+ return 0;
+
+ H5Awrite(aid, tid, buf);
+
+ H5Aclose(aid);
+
+ return 1;
+}
+
+/*
+ adds different types of attributes to an object.
+
+ returns the number of attributes added to the objects.
+ */
+int add_attrs(hid_t oid, int idx)
+{
+ char name[32];
+ int i0, i1, i2, j, nattrs=0;
+ hid_t aid, tid, tid1, sid;
+ hvl_t i_vlen[4];
+ hobj_ref_t ref;
+ zipcode_t cmp_data[4];
+ unsigned int i = 0xffffffff;
+ long long l = -2147483647;
+ float f = 123456789.987654321;
+ double d = 987654321.123456789;
+ char *s[7] = {"Parting", "is such", "sweeter", "sorrow."};
+ float f_array[4] = {1.0, 2.22, 3.333, 4.444};
+ char *s_vlen[4] = {"Parting", "is such", "sweet", "sorrow."};
+ hsize_t dims1[1]={1}, dims2[1]={4}, dims3[2]={3,5};
+ int int3d[4][3][5];
+ size_t offset = 0;
+
+ for (i0=0; i0<4; i0++) {
+ i_vlen[i0].len = (i0+1);
+ i_vlen[i0].p = (int *)calloc(i_vlen[i0].len, sizeof(int));
+ for (j=0; j<i_vlen[i0].len; j++)
+ ((int *)i_vlen[i0].p)[j] = i0*100+j;
+ for (i1=0; i1<3; i1++) {
+ for (i2=0; i2<5; i2++)
+ int3d[i0][i1][i2] = i0*i1-i1*i2+i0*i2;
+ }
+ }
+
+ cmp_data[0].zipcode = 01001;
+ cmp_data[0].city = "Agawam, Massachusetts";
+ cmp_data[1].zipcode = 99950;
+ cmp_data[1].city = "Ketchikan, Alaska";
+ cmp_data[2].zipcode = 00501;
+ cmp_data[2].city = "Holtsville, New York";
+ cmp_data[3].zipcode = 61820;
+ cmp_data[3].city = "Champaign, Illinois";
+
+ /* 1 scalar point */
+ sid = H5Screate (H5S_SCALAR);
+ sprintf(name, "%05d scalar int", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
+ sprintf(name, "%05d scalar ulong", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
+ sprintf(name, "%05d scalar str", idx);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, H5T_VARIABLE);
+ nattrs += add_attr(oid, name, tid, sid, &s[2]);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 4 single point */
+ sid = H5Screate_simple (1, dims1, NULL);
+ H5Rcreate(&ref, oid, ".", H5R_OBJECT, -1);
+ sprintf(name, "%05d single float", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
+ sprintf(name, "%05d single double", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
+ sprintf(name, "%05d single obj_ref", idx);
+ nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
+ H5Sclose(sid);
+
+ /* 7 fixed length 1D array */
+ sid = H5Screate_simple (1, dims1, NULL);
+ tid = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims2);
+ sprintf(name, "%05d array float", idx);
+ nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
+ H5Tclose(tid);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, strlen(s[0])+1);
+ tid1 = H5Tarray_create (tid, 1, dims2);
+ sprintf(name, "%05d array str", idx);
+ nattrs += add_attr(oid, name, tid1, sid, s);
+ H5Tclose(tid1);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 9 fixed length 2D int arrays */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tarray_create (H5T_NATIVE_INT, 2, dims3);
+ sprintf(name, "%05d array int 2D", idx);
+ nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 10 variable length arrays */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, H5T_VARIABLE);
+ sprintf(name, "%05d vlen strings", idx);
+ nattrs += add_attr(oid, name, tid, sid, s_vlen);
+ H5Tclose(tid);
+ tid = H5Tvlen_create (H5T_NATIVE_INT);;
+ sprintf(name, "%05d vlen int array", idx);
+ nattrs += add_attr(oid, name, tid, sid, i_vlen);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 12 compound data */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tcreate (H5T_COMPOUND, sizeof (zipcode_t));
+ tid1 = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid1, H5T_VARIABLE);
+ H5Tinsert (tid, "zip code", 0, H5T_NATIVE_INT); offset += sizeof(H5T_NATIVE_INT);
+ H5Tinsert (tid, "City", offset, tid1); offset += sizeof(char *);
+ sprintf(name, "%05d compound data", idx);
+ nattrs += add_attr(oid, name, tid, sid, cmp_data);
+ H5Tclose(tid1);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ for (i0=0; i0<4; i0++)
+ free(i_vlen[i0].p);
+
+ return nattrs;
+}
diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h
index 0fdd3a0..39d7655 100644
--- a/vms/src/h5pubconf.h
+++ b/vms/src/h5pubconf.h
@@ -505,7 +505,7 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.176-swmr0"
+#define H5_PACKAGE_STRING "HDF5 1.9.178-swmr0"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
@@ -514,7 +514,7 @@
#define H5_PACKAGE_URL ""
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.176-swmr0"
+#define H5_PACKAGE_VERSION "1.9.178-swmr0"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "ll"
@@ -677,7 +677,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.176-swmr0"
+#define H5_VERSION "1.9.178-swmr0"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */
diff --git a/vms/test/H5srcdir_str.h b/vms/test/H5srcdir_str.h
index 9dfcf56..2eb1a39 100644
--- a/vms/test/H5srcdir_str.h
+++ b/vms/test/H5srcdir_str.h
@@ -1,22 +1,22 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* If you are reading this file and it has a '.h' suffix, it was automatically
- * generated from the '.in' version. Make changes there. But for OpenVMS, this
- * file is created by hand.
- */
-
-/* Set the 'srcdir' path from configure time */
-static const char *config_srcdir = "[-.test]";
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* If you are reading this file and it has a '.h' suffix, it was automatically
+ * generated from the '.in' version. Make changes there. But for OpenVMS, this
+ * file is created by hand.
+ */
+
+/* Set the 'srcdir' path from configure time */
+static const char *config_srcdir = "[-.test]";