summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-11 13:44:37 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-11 13:44:37 (GMT)
commit3e1e5f166a1316573ea81b96178bb6a4fa3654a2 (patch)
tree117c2d8a7a50c4b345784738bdc776ec540fc1db
parent72e8017eadf211257caceb43095b2aed76e81632 (diff)
parentd86717819242c706a34abf2d2bdb64baebfe1818 (diff)
downloadhdf5-3e1e5f166a1316573ea81b96178bb6a4fa3654a2.zip
hdf5-3e1e5f166a1316573ea81b96178bb6a4fa3654a2.tar.gz
hdf5-3e1e5f166a1316573ea81b96178bb6a4fa3654a2.tar.bz2
[svn-r25254] merge from trunk.
-rw-r--r--CMakeFilters.cmake6
-rw-r--r--CMakeInstallation.cmake163
-rw-r--r--CMakeLists.txt52
-rw-r--r--COPYING2
-rw-r--r--MANIFEST66
-rw-r--r--Makefile.in1
-rw-r--r--README.txt2
-rwxr-xr-xbin/cmakehdf510
-rwxr-xr-xbin/release108
-rwxr-xr-xbin/snapshot2
-rw-r--r--c++/CMakeLists.txt4
-rw-r--r--c++/Makefile.in1
-rw-r--r--c++/examples/CMakeTests.cmake34
-rw-r--r--c++/examples/Makefile.am4
-rw-r--r--c++/examples/Makefile.in25
-rw-r--r--c++/src/CMakeLists.txt2
-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_config2249
-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/CMakeTests.cmake14
-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/CPack.Info.plist.in32
-rw-r--r--config/cmake/CTestCustom.cmake36
-rw-r--r--config/cmake/CheckTypeSize.cmake48
-rw-r--r--config/cmake/ConfigureChecks.cmake768
-rw-r--r--config/cmake/FindHDF5.cmake.in172
-rw-r--r--config/cmake/FindMPI.cmake647
-rw-r--r--config/cmake/FindSZIP.cmake179
-rw-r--r--config/cmake/GetTimeOfDayTest.cpp15
-rw-r--r--config/cmake/H5pubconf.h.in3
-rw-r--r--config/cmake/HDF518_Examples.cmake.in233
-rw-r--r--config/cmake/HDF5CXXTests.cpp56
-rw-r--r--config/cmake/HDF5Tests.c479
-rw-r--r--config/cmake/HDF5UseFortran.cmake139
-rw-r--r--config/cmake/HDFLibMacros.cmake350
-rw-r--r--config/cmake/HDFMacros.cmake187
-rw-r--r--config/cmake/NSIS.InstallOptions.ini.in37
-rw-r--r--config/cmake/NSIS.template.in974
-rw-r--r--[-rwxr-xr-x]config/cmake/README.txt.cmake.in107
-rw-r--r--config/cmake/cacheinit.cmake156
-rw-r--r--config/cmake/grepTest.cmake64
-rw-r--r--config/cmake/hdf.bmpbin1254 -> 0 bytes
-rwxr-xr-xconfig/cmake/hdf.icnsbin2632 -> 0 bytes
-rw-r--r--config/cmake/hdf.icobin23558 -> 0 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.cmake163
-rw-r--r--config/cmake/prunTest.cmake145
-rw-r--r--config/cmake/runTest.cmake193
-rw-r--r--config/cmake/version.plist.in17
-rw-r--r--config/examples.am23
-rw-r--r--config/gnu-flags82
-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-xconfigure54
-rw-r--r--configure.ac19
-rw-r--r--examples/CMakeLists.txt2
-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/CMakeLists.txt12
-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/H5Pf.c16
-rw-r--r--fortran/src/H5Pff.f904
-rw-r--r--fortran/src/H5_f.c14
-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.txt10
-rw-r--r--fortran/test/CMakeTests.cmake18
-rw-r--r--fortran/test/Makefile.am29
-rw-r--r--fortran/test/Makefile.in139
-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.f90453
-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.f9047
-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.f9037
-rw-r--r--fortran/test/tHDF5_F03.f9039
-rw-r--r--fortran/test/tf.f90348
-rw-r--r--fortran/testpar/CMakeTests.cmake2
-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/CMakeLists.txt2
-rw-r--r--hl/Makefile.in1
-rw-r--r--hl/c++/Makefile.in1
-rw-r--r--hl/c++/examples/CMakeTests.cmake6
-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/CMakeTests.cmake2
-rw-r--r--hl/c++/test/Makefile.in1
-rw-r--r--hl/examples/CMakeTests.cmake12
-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/CMakeTests.cmake2
-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/CMakeLists.txt14
-rw-r--r--hl/fortran/src/Makefile.am5
-rw-r--r--hl/fortran/src/Makefile.in11
-rw-r--r--hl/fortran/test/CMakeTests.cmake14
-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/H5TB.c2998
-rw-r--r--hl/src/Makefile.am5
-rw-r--r--hl/src/Makefile.in11
-rw-r--r--hl/test/CMakeTests.cmake10
-rw-r--r--hl/test/Makefile.in1
-rw-r--r--hl/test/test_image.c4
-rw-r--r--hl/tools/Makefile.in1
-rw-r--r--hl/tools/gif2h5/Makefile.in1
-rw-r--r--perform/CMakeLists.txt2
-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_standalone.h1
-rw-r--r--perform/sio_timer.c394
-rw-r--r--release_docs/INSTALL_CMake.txt764
-rw-r--r--release_docs/INSTALL_Cygwin.txt2
-rw-r--r--release_docs/RELEASE.txt130
-rw-r--r--release_docs/USING_CMake_Examples.txt162
-rw-r--r--release_docs/USING_HDF5_CMake.txt17
-rw-r--r--src/CMakeLists.txt71
-rw-r--r--src/H5.c73
-rw-r--r--src/H5A.c8
-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/H5Aint.c2
-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.c32
-rw-r--r--src/H5Dchunk.c5
-rw-r--r--src/H5Ddeprec.c24
-rw-r--r--src/H5Dint.c22
-rw-r--r--src/H5Dio.c62
-rw-r--r--src/H5Dmpio.c2
-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.c6
-rw-r--r--src/H5FD.c22
-rw-r--r--src/H5FDcore.c387
-rw-r--r--src/H5FDint.c79
-rw-r--r--src/H5FDprivate.h6
-rw-r--r--src/H5Faccum.c519
-rw-r--r--src/H5Fdeprec.c36
-rw-r--r--src/H5Fint.c24
-rw-r--r--src/H5Fio.c17
-rw-r--r--src/H5Fpkg.h16
-rw-r--r--src/H5Fprivate.h52
-rw-r--r--src/H5Fsuper.c71
-rw-r--r--src/H5Fsuper_cache.c28
-rw-r--r--src/H5G.c23
-rw-r--r--src/H5Gdeprec.c36
-rw-r--r--src/H5Gint.c2
-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.c117
-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/H5VLnative.c44
-rw-r--r--src/H5Zprivate.h2
-rw-r--r--src/H5config.h.in3
-rw-r--r--src/H5private.h5
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in3
-rw-r--r--test/CMakeLists.txt6
-rw-r--r--test/CMakeTests.cmake107
-rw-r--r--test/Makefile.am2
-rw-r--r--test/Makefile.in4
-rw-r--r--test/accum.c199
-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/CMakeLists.txt2
-rw-r--r--testpar/CMakeTests.cmake9
-rw-r--r--testpar/Makefile.in1
-rw-r--r--testpar/t_prop.c1
-rw-r--r--tools/CMakeLists.txt2
-rw-r--r--tools/Makefile.in1
-rw-r--r--tools/h5copy/CMakeLists.txt6
-rw-r--r--tools/h5copy/CMakeTests.cmake2
-rw-r--r--tools/h5copy/Makefile.in1
-rw-r--r--tools/h5diff/CMakeLists.txt6
-rw-r--r--tools/h5diff/CMakeTests.cmake8
-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/CMakeTests.cmake36
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake2
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake2
-rw-r--r--tools/h5dump/Makefile.in1
-rw-r--r--tools/h5import/CMakeLists.txt6
-rw-r--r--tools/h5import/CMakeTests.cmake14
-rw-r--r--tools/h5import/Makefile.in1
-rw-r--r--tools/h5import/h5import.c9
-rw-r--r--tools/h5jam/CMakeLists.txt6
-rw-r--r--tools/h5jam/CMakeTests.cmake18
-rw-r--r--tools/h5jam/Makefile.in1
-rw-r--r--tools/h5ls/CMakeLists.txt6
-rw-r--r--tools/h5ls/CMakeTests.cmake2
-rw-r--r--tools/h5ls/Makefile.in1
-rw-r--r--tools/h5ls/h5ls.c9
-rw-r--r--tools/h5repack/CMakeLists.txt8
-rw-r--r--tools/h5repack/CMakeTests.cmake16
-rw-r--r--tools/h5repack/Makefile.in1
-rw-r--r--tools/h5stat/CMakeLists.txt6
-rw-r--r--tools/h5stat/CMakeTests.cmake2
-rw-r--r--tools/h5stat/Makefile.in1
-rw-r--r--tools/lib/CMakeLists.txt17
-rw-r--r--tools/lib/Makefile.in1
-rw-r--r--tools/lib/h5diff.c293
-rw-r--r--tools/lib/h5diff_attr.c37
-rw-r--r--tools/lib/h5diff_dset.c6
-rw-r--r--tools/misc/CMakeLists.txt6
-rw-r--r--tools/misc/CMakeTests.cmake6
-rw-r--r--tools/misc/Makefile.in1
-rw-r--r--tools/misc/h5perf_gentest.c1196
-rw-r--r--vms/src/h5pubconf.h9
-rw-r--r--vms/test/H5srcdir_str.h44
367 files changed, 12643 insertions, 12489 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 1a74460..f52b99b 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -17,7 +17,9 @@ HDF5_SETUP_FILTERS (NBIT)
HDF5_SETUP_FILTERS (SCALEOFFSET)
include (ExternalProject)
-option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
+#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
+set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
@@ -110,7 +112,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (SZIP_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
- INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
if (H5_HAVE_FILTER_SZIP)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 0631c61..4b132ca 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -26,7 +26,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- EXPORT (
+ export (
TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
)
@@ -39,12 +39,12 @@ set (HDF5_INCLUDES_BUILD_TIME
${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
)
-set (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@)
-set (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)
-set (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@)
+set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION})
+set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR})
+set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR})
configure_file (
- ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in
+ ${HDF_RESOURCES_DIR}/hdf5-config.cmake.build.in
${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
)
@@ -53,7 +53,7 @@ configure_file (
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
- ${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in
+ ${HDF_RESOURCES_DIR}/FindHDF5.cmake.in
${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
)
install (
@@ -68,7 +68,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
- ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in
+ ${HDF_RESOURCES_DIR}/hdf5-config.cmake.install.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
)
install (
@@ -83,7 +83,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
- ${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in
+ ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
)
install (
@@ -102,7 +102,7 @@ else (H5_WORDS_BIGENDIAN)
set (BYTESEX little-endian)
endif (H5_WORDS_BIGENDIAN)
configure_file (
- ${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in
+ ${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
)
install (
@@ -112,12 +112,30 @@ 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 (
+# ${HDF_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)
if (HDF5_PACK_EXAMPLES)
configure_file (
- ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in
+ ${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in
${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
)
install (
@@ -139,50 +157,7 @@ endif (HDF5_PACK_EXAMPLES)
#-----------------------------------------------------------------------------
# Configure the README.txt file for the binary package
#-----------------------------------------------------------------------------
-set (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
-set (BINARY_PLATFORM "${CMAKE_SYSTEM_NAME}")
-if (WIN32)
- set (BINARY_EXAMPLE_ENDING "zip")
- set (BINARY_INSTALL_ENDING "exe")
- if (CMAKE_CL_64)
- set (BINARY_SYSTEM_NAME "win64")
- else (CMAKE_CL_64)
- set (BINARY_SYSTEM_NAME "win32")
- endif (CMAKE_CL_64)
- if (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
- set (BINARY_PLATFORM "${BINARY_PLATFORM} 7")
- elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.2")
- set (BINARY_PLATFORM "${BINARY_PLATFORM} 8")
- endif (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
- set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
- if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
- else (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
- endif (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
-elseif (APPLE)
- set (BINARY_EXAMPLE_ENDING "tar.gz")
- set (BINARY_INSTALL_ENDING "dmg")
- set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
-else (WIN32)
- set (BINARY_EXAMPLE_ENDING "tar.gz")
- set (BINARY_INSTALL_ENDING "sh")
- set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
-endif (WIN32)
-if (HDF4_BUILD_FORTRAN)
- set (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
-endif (HDF4_BUILD_FORTRAN)
-
-configure_file (
- ${HDF5_RESOURCES_DIR}/README.txt.cmake.in
- ${HDF5_BINARY_DIR}/README.txt @ONLY
-)
+HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
@@ -200,12 +175,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 +189,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 +215,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
#-----------------------------------------------------------------------------
@@ -262,11 +249,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_RELOCATABLE TRUE)
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
- set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.bmp")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
set (CPACK_GENERATOR "TGZ")
if (WIN32)
- LIST (APPEND CPACK_GENERATOR "NSIS")
+ list (APPEND CPACK_GENERATOR "NSIS")
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)
# - "NSIS package/display name" (text used in the installer GUI)
@@ -281,29 +268,27 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
endif (CMAKE_CL_64)
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
- set (CPACK_NSIS_MUI_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
- set (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_EXT_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_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
+ 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}")
set (CPACK_NSIS_MODIFY_PATH ON)
elseif (APPLE)
- LIST (APPEND CPACK_GENERATOR "DragNDrop")
+ 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_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
- set (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
-
+ set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
+
if (HDF5_PACK_MACOSX_BUNDLE)
- LIST (APPEND CPACK_GENERATOR "Bundle")
+ list (APPEND CPACK_GENERATOR "Bundle")
set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
- set (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
+ set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.")
@@ -315,15 +300,15 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
# Configure the Info.plist file for the install bundle
#-----------------------------------------------------------------------------
configure_file (
- ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in
+ ${HDF_RESOURCES_EXT_DIR}/CPack.Info.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
)
configure_file (
- ${HDF5_RESOURCES_DIR}/PkgInfo.in
+ ${HDF_RESOURCES_DIR}/PkgInfo.in
${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
)
configure_file (
- ${HDF5_RESOURCES_DIR}/version.plist.in
+ ${HDF_RESOURCES_EXT_DIR}/version.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY
)
install (
@@ -331,16 +316,16 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
${HDF5_BINARY_DIR}/CMakeFiles/version.plist
DESTINATION ..
)
- ENDIF(HDF5_PACK_MACOSX_BUNDLE)
+ endif (HDF5_PACK_MACOSX_BUNDLE)
else (WIN32)
- LIST (APPEND CPACK_GENERATOR "STGZ")
+ list (APPEND CPACK_GENERATOR "STGZ")
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
-# LIST (APPEND CPACK_GENERATOR "RPM")
+# list (APPEND CPACK_GENERATOR "RPM")
set (CPACK_RPM_PACKAGE_RELEASE "1")
set (CPACK_RPM_COMPONENT_INSTALL ON)
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
@@ -375,8 +360,8 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
# By default, do not warn when built on machines using only VS Express:
if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
- ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
- INCLUDE(InstallRequiredSystemLibraries)
+ endif (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ include (InstallRequiredSystemLibraries)
set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b969b0e..dd0ae5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,7 +136,8 @@ set (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
#-----------------------------------------------------------------------------
# Define some CMake variables for use later in the project
#-----------------------------------------------------------------------------
-set (HDF5_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
+set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
+set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod)
set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
@@ -213,27 +214,11 @@ 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)
-include (${HDF5_RESOURCES_DIR}/HDFLibMacros.cmake)
-include (${HDF5_RESOURCES_DIR}/HDF5Macros.cmake)
+include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake)
+include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
+include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
#-----------------------------------------------------------------------------
# Setup output Directories
@@ -280,7 +265,7 @@ set (EXTERNAL_LIBRARYDLL_LIST "")
#-----------------------------------------------------------------------------
# Run all the CMake configuration tests for our build environment
#-----------------------------------------------------------------------------
-include (${HDF5_RESOURCES_DIR}/ConfigureChecks.cmake)
+include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake)
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
@@ -449,9 +434,9 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
endif (MSVC)
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
# Borland uses -w- to suppress warnings.
if (BORLAND)
set (HDF5_WARNINGS_BLOCKED 1)
@@ -648,7 +633,7 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_D
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
-set (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
+set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
if (HDF5_ENABLE_PARALLEL)
include (FindMPI)
@@ -726,18 +711,21 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
# Note: Currently CMake only allows configuring of threadsafe on
# non-Cygwin WINDOWS.
#-----------------------------------------------------------------------------
-if (WIN32 AND NOT CYGWIN)
+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)
@@ -750,7 +738,7 @@ if (WIN32 AND NOT CYGWIN)
endif (NOT H5_HAVE_PTHREAD_H)
endif (H5_HAVE_IOEO)
endif (HDF5_ENABLE_THREADSAFE)
-endif (WIN32 AND NOT CYGWIN)
+endif (WIN32)
# -----------------------------------------------------------------------
# wrapper script variables
@@ -806,7 +794,7 @@ if (BUILD_TESTING)
endif (HDF5_TEST_VFD)
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
- configure_file (${HDF5_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+ configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
@@ -824,7 +812,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
message (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
endif (BUILD_SHARED_LIBS AND APPLE)
option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF)
- include (${HDF5_RESOURCES_DIR}/HDF5UseFortran.cmake)
+ include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
if (HDF5_ENABLE_F2003)
if (NOT FORTRAN_HAVE_ISO_C_BINDING)
set (HDF5_ENABLE_F2003 OFF)
@@ -897,6 +885,6 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-configure_file (${HDF5_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
+configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
include (CMakeInstallation.cmake)
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 1d13386..652af90 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -364,6 +364,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
@@ -375,6 +376,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
@@ -486,6 +490,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
@@ -504,6 +510,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
@@ -2138,6 +2145,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
@@ -2424,42 +2437,45 @@
./vms/tools/testfiles/tperror.ddl
# CMake-specific Files
-./config/cmake/FindSZIP.cmake
+./config/cmake/cacheinit.cmake
./config/cmake/ConversionTests.c
-./config/cmake/GetTimeOfDayTest.cpp
-./config/cmake/HDF5CXXTests.cpp
-./config/cmake/HDF5Tests.c
-./config/cmake/CheckTypeSize.cmake
+./config/cmake/ConfigureChecks.cmake
+./config/cmake/CTestCustom.cmake
+./config/cmake/FindHDF5.cmake.in
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
-./config/cmake/FindHDF5.cmake.in
-./config/cmake/FindMPI.cmake
./config/cmake/hdf5-config.cmake.build.in
./config/cmake/hdf5-config.cmake.install.in
./config/cmake/hdf5-config-version.cmake.in
-./config/cmake/HDFMacros.cmake
-./config/cmake/HDFLibMacros.cmake
./config/cmake/HDF5Macros.cmake
-./config/cmake/HDF5UseFortran.cmake
./config/cmake/libhdf5.settings.cmake.in
-./config/cmake/cacheinit.cmake
./config/cmake/mccacheinit.cmake
-./config/cmake/grepTest.cmake
-./config/cmake/prunTest.cmake
-./config/cmake/runTest.cmake
-./config/cmake/userblockTest.cmake
-./config/cmake/vfdTest.cmake
-./config/cmake/CTestCustom.cmake
-./config/cmake/ConfigureChecks.cmake
-./config/cmake/CPack.Info.plist.in
-./config/cmake/hdf.bmp
-./config/cmake/hdf.icns
-./config/cmake/hdf.ico
./config/cmake/PkgInfo.in
-./config/cmake/version.plist.in
-./config/cmake/NSIS.template.in
-./config/cmake/NSIS.InstallOptions.ini.in
./config/cmake/README.txt.cmake.in
+./config/cmake/userblockTest.cmake
+./config/cmake/vfdTest.cmake
+
+./config/cmake_ext_mod/CheckTypeSize.cmake
+./config/cmake_ext_mod/ConfigureChecks.cmake
+./config/cmake_ext_mod/CPack.Info.plist.in
+./config/cmake_ext_mod/CTestCustom.cmake
+./config/cmake_ext_mod/FindMPI.cmake
+./config/cmake_ext_mod/FindSZIP.cmake
+./config/cmake_ext_mod/GetTimeOfDayTest.cpp
+./config/cmake_ext_mod/grepTest.cmake
+./config/cmake_ext_mod/hdf.bmp
+./config/cmake_ext_mod/hdf.icns
+./config/cmake_ext_mod/hdf.ico
+./config/cmake_ext_mod/HDFCXXTests.cpp
+./config/cmake_ext_mod/HDFLibMacros.cmake
+./config/cmake_ext_mod/HDFMacros.cmake
+./config/cmake_ext_mod/HDFTests.c
+./config/cmake_ext_mod/HDFUseFortran.cmake
+./config/cmake_ext_mod/NSIS.InstallOptions.ini.in
+./config/cmake_ext_mod/NSIS.template.in
+./config/cmake_ext_mod/prunTest.cmake
+./config/cmake_ext_mod/runTest.cmake
+./config/cmake_ext_mod/version.plist.in
# CMake-specific User Files
./config/cmake/UserMacros/Windows_MT.cmake
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 701d495..f0d6b0f 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.176 currently under development
+HDF5 version 1.9.184 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index 1150994..5da3cca 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -101,16 +101,16 @@ echo Running Cmake for HDF5-${version} ...
# 4. Configure the C library, tools and tests with this command:
STEP "Configure..." "cmake -G 'Unix Makefiles' -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5" $configlog
-# 3. Build the C library, tools and tests with this command:
+# 5. Build the C library, tools and tests with this command:
STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog
-# 4. Test the C library and tools with this command:
+# 6. Test the C library and tools with this command:
STEP "Test the library and tools..." "ctest . -C Release" $testlog
-# 5. Create an install image with this command:
+# 7. Create an install image with this command:
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
-# 6. Install with this command:
+# 8. Install with this command:
STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog
# save the last exit code
exit_code=$?
@@ -199,7 +199,7 @@ set (SITE_BUILDNAME_SUFFIX "cmakehdf5")
set (LOCAL_SKIP_UPDATE TRUE)
set (REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
# -- Standard build options
-set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
# Use multiple CPU cores to build
include(ProcessorCount)
diff --git a/bin/release b/bin/release
index be8eb14..68745ec 100755
--- a/bin/release
+++ b/bin/release
@@ -42,43 +42,113 @@ USAGE()
cat << EOF
Usage: $0 [--nocheck] [-d <dir>] [-h] <methods> ...
-d DIR The name of the directory where the releas(es) should be
- placed. By default, the directory is ./releases
+ placed.
--nocheck Ignore errors in MANIFEST file.
--private Make a private release with today's date in version information.
+This must be run at the top level of the source directory.
The other command-line options are the names of the programs to use
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.
Examples:
- $ release
- releases/hdf5-1.0.38.tar
- releases/hdf5-1.0.38.tar.md5
+ $ bin/release -d /tmp
+ /tmp/hdf5-1.8.13-RELEASE.txt
+ /tmp/hdf5-1.8.13.tar
+ /tmp/hdf5-1.8.13.tar.md5
- $ release gzip
- releases/hdf5-1.0.38.tar.gz
+ $ bin/release -d /tmp gzip
+ /tmp/hdf5-1.8.13-RELEASE.txt
+ /tmp/hdf5-1.8.13.tar.gz
- $ release -d /tmp tar compress gzip bzip2 md5
- /tmp/hdf5-1.0.38.tar
- /tmp/hdf5-1.0.38.tar.Z
- /tmp/hdf5-1.0.38.tar.gz
- /tmp/hdf5-1.0.38.tar.bz2
- /tmp/hdf5-1.0.38.tar.md5
+ $ bin/release -d /tmp tar gzip zip md5
+ /tmp/hdf5-1.8.13-RELEASE.txt
+ /tmp/hdf5-1.8.13.tar
+ /tmp/hdf5-1.8.13.tar.gz
+ /tmp/hdf5-1.8.13.tar.md5
+ /tmp/hdf5-1.8.13.tar.zip
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
+ ztmpdir=/tmp/tmpdir$$
+ mkdir -p $ztmpdir
+ version=$1
+ tarfile=$2
+ zipfile=$3
+
+ # step 1: untar tarball in ztmpdir
+ (cd $ztmpdir; tar xf -) < $tarfile
+ # sanity check
+ if [ ! -d $ztmpdir/$version ]; then
+ echo "untar did not create $ztmpdir/$version source dir"
+ # cleanup
+ rm -rf $ztmpdir
+ 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 $ztmpdir/$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 $ztmpdir; zip -9 -y -r -q $version.zip $version)
+ mv $ztmpdir/$version.zip $zipfile
+
+ # cleanup
+ rm -rf $ztmpdir
+}
+
# 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 +295,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 +303,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 +325,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++/CMakeLists.txt b/c++/CMakeLists.txt
index 89426c5..63fc083 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Shared/Static Libs
@@ -18,7 +18,7 @@ endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
-configure_file (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
+configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
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/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index 352b799..4db8c68 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -6,7 +6,7 @@
##############################################################################
# Remove any output file left over from previous test run
add_test (
- NAME cpp_ex-clear-objects
+ NAME CPP_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
Group.h5
@@ -16,23 +16,23 @@
Select.h5
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
- set (last_test "cpp_ex-clear-objects")
+ set (last_test "CPP_ex-clear-objects")
foreach (example ${examples})
- add_test (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
- set (last_test "cpp_ex_${example}")
+ set (last_test "CPP_ex_${example}")
endforeach (example ${examples})
#the following dependicies are handled by the order of the files
-# SET_TESTS_PROPERTIES(cpp_ex_readdata PROPERTIES DEPENDS cpp_ex_create)
-# SET_TESTS_PROPERTIES(cpp_ex_chunks PROPERTIES DEPENDS cpp_ex_extend_ds)
+# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
+# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
add_test (
- NAME cpp_ex_tutr-clear-objects
+ NAME CPP_ex_tutr-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
h5tutr_cmprss.h5
@@ -43,19 +43,19 @@
h5tutr_subset.h5
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (cpp_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
- set (last_test "cpp_ex_tutr-clear-objects")
+ set (last_test "CPP_ex_tutr-clear-objects")
foreach (example ${tutr_examples})
- add_test (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
- set (last_test "cpp_ex_${example}")
+ set (last_test "CPP_ex_${example}")
endforeach (example ${tutr_examples})
#the following dependicies are handled by the order of the files
-# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_crtatt PROPERTIES DEPENDS cpp_ex_h5tutr_crtdat)
-# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_rdwt PROPERTIES DEPENDS cpp_ex_h5tutr_crtdat)
-# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_crtgrpd PROPERTIES DEPENDS cpp_ex_h5tutr_crtgrpar)
+# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
+# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
+# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar)
\ No newline at end of file
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/CMakeLists.txt b/c++/src/CMakeLists.txt
index 7a48260..b07ab2b 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -11,7 +11,7 @@ endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
-configure_file (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
+configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
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..639b633 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
+ virtual 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 e23af14..b121243 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -447,7 +447,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);
@@ -459,6 +459,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.
@@ -498,19 +515,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
@@ -529,6 +533,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 847863f..c49fe51 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, can be accessed with the fapl
static bool isAccessible(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..ab95efe 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 = 174
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..f2caed2 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 = cpplus_RM
+
+# 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
+
+# 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 = .
+
+# 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/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index 2b05fea..1048ee7 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -6,7 +6,7 @@
##############################################################################
# Remove any output file left over from previous test run
add_test (
- NAME cpp_testhdf5-clear-objects
+ NAME CPP_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
tattr_basic.h5
@@ -17,8 +17,8 @@ add_test (
tfattrs.h5
)
-add_test (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
-set_tests_properties (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
+add_test (NAME CPP_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
+set_tests_properties (CPP_testhdf5 PROPERTIES DEPENDS CPP_testhdf5-clear-objects)
if (HDF5_TEST_VFD)
@@ -38,7 +38,7 @@ if (HDF5_TEST_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME VFD-${vfdname}-cpp_testhdf5-clear-objects
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
tattr_basic.h5
@@ -49,7 +49,7 @@ if (HDF5_TEST_VFD)
tfattrs.h5
)
add_test (
- NAME VFD-${vfdname}-cpp_testhdf5
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
@@ -57,9 +57,9 @@ if (HDF5_TEST_VFD)
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=cpp_testhdf5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- set_tests_properties (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
+ set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
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/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in
deleted file mode 100644
index 6cf2a94..0000000
--- a/config/cmake/CPack.Info.plist.in
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>@CPACK_PACKAGE_FILE_NAME@</string>
- <key>CFBundleIconFile</key>
- <string>@CPACK_BUNDLE_ICON@</string>
- <key>CFBundleIdentifier</key>
- <string>org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>@CPACK_PACKAGE_VERSIO@</string>
- <key>CFBundleShortVersionString</key>
- <string>@CPACK_SHORT_VERSION_STRING@</string>
- <key>CSResourcesFileMapped</key>
- <true/>
- <key>CFBundleName</key>
- <string>@CPACK_BUNDLE_NAME@</string>
- <key>CFBundleGetInfoString</key>
- <string>@CPACK_APPLE_GUI_INFO_STRING@</string>
- <key>NSHumanReadableCopyright</key>
- <string>@CPACK_APPLE_GUI_COPYRIGHT@</string>
-</dict>
-</plist>
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 6d3f0ee..41cb488 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -19,25 +19,25 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
set (CTEST_CUSTOM_MEMCHECK_IGNORE
${CTEST_CUSTOM_MEMCHECK_IGNORE}
- flush1 #designed to fail
- flush2 #designed to need flush1
- error_test #uses runTest.cmake
- err_compat #uses runTest.cmake
- links_env #uses runTest.cmake
- testlibinfo #uses grepTest.cmake
- h5test-clear-testhdf5-objects
- h5test-clear-objects
- h5test-clear-cache-objects
- h5test-clear-cache_api-objects
- h5test-clear-cache_tagging-objects
- h5test-clear-ttsafe-objects
- h5test-clear-err_compat-objects
- h5test-clear-error_test-objects
- h5test-clear-links_env-objects
+ H5TEST-flush1 #designed to fail
+ H5TEST-flush2 #designed to need flush1
+ H5TEST-error_test #uses runTest.cmake
+ H5TEST-err_compat #uses runTest.cmake
+ H5TEST-links_env #uses runTest.cmake
+ H5TEST-testlibinfo #uses grepTest.cmake
+ H5TEST-clear-testhdf5-objects
+ H5TEST-clear-objects
+ H5TEST-clear-cache-objects
+ H5TEST-clear-cache_api-objects
+ H5TEST-clear-cache_tagging-objects
+ H5TEST-clear-ttsafe-objects
+ H5TEST-clear-err_compat-objects
+ H5TEST-clear-error_test-objects
+ H5TEST-clear-links_env-objects
PERFORM_h5perform-clear-objects
HL_TOOLS-clear-objects
- hl_test-clear-objects
- hl_fortran_test-clear-objects
+ HL_test-clear-objects
+ HL_fortran_test-clear-objects
######### tools/h5copy #########
H5COPY-clearall-objects
######### tools/h5diff #########
@@ -211,5 +211,5 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5MKGRP-clearall-objects
######### examples #########
EXAMPLES-clear-objects
- cpp_ex-clear-objects
+ CPP_ex-clear-objects
)
diff --git a/config/cmake/CheckTypeSize.cmake b/config/cmake/CheckTypeSize.cmake
deleted file mode 100644
index 4af5741..0000000
--- a/config/cmake/CheckTypeSize.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Check if the type exists and determine size of type. if the type
-# exists, the size will be stored to the variable.
-#
-# CHECK_TYPE_SIZE - macro which checks the size of type
-# VARIABLE - variable to store size if the type exists.
-# HAVE_${VARIABLE} - does the variable exists or not
-#
-
-MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
- set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
- if ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- set (MACRO_CHECK_TYPE_SIZE_FLAGS
- "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}"
- )
- foreach (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H)
- if ("${def}")
- set (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
- ENDIF("${def}")
- endforeach (def)
-
- message (STATUS "Check size of ${TYPE}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_TYPE_SIZE_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
- )
- endif (CMAKE_REQUIRED_LIBRARIES)
- TRY_RUN (${VARIABLE} HAVE_${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/CheckTypeSize.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
- "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if (HAVE_${VARIABLE})
- message (STATUS "Check size of ${TYPE} - done")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
- "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n"
- )
- else (HAVE_${VARIABLE})
- message (STATUS "Check size of ${TYPE} - failed")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n"
- )
- endif (HAVE_${VARIABLE})
- endif ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
-ENDMACRO (HDF_CHECK_TYPE_SIZE)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 0a27f3b..87ca741 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -1,44 +1,11 @@
#-----------------------------------------------------------------------------
# Include all the necessary files for macros
#-----------------------------------------------------------------------------
-include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
-include (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
-include (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
-include (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
-include (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
-include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+set (HDF_PREFIX "H5")
+include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
#-----------------------------------------------------------------------------
-# APPLE/Darwin setup
-#-----------------------------------------------------------------------------
-if (APPLE)
- list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
- if (ARCH_LENGTH GREATER 1)
- set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE)
- message(FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
- "due to technical reasons. The best approach would be build each architecture in separate directories"
- "and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'"
- "variable has been set to a blank value which will build the default architecture for this system.")
- endif ()
- set (H5_AC_APPLE_UNIVERSAL_BUILD 0)
-endif (APPLE)
-
-# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set (H5_HAVE_DARWIN 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-
-# Check for Solaris
-if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set (H5_HAVE_SOLARIS 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
-
-#-----------------------------------------------------------------------------
# Option to Clear File Buffers before write --enable-clear-file-buffers
#-----------------------------------------------------------------------------
option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
@@ -98,7 +65,13 @@ if (HDF5_ENABLE_CODESTACK)
endif (HDF5_ENABLE_CODESTACK)
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
+#-----------------------------------------------------------------------------
+# Are we going to use HSIZE_T
+#-----------------------------------------------------------------------------
option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
+if (HDF5_ENABLE_HSIZET)
+ set (${HDF_PREFIX}_HAVE_LARGE_HSIZET 1)
+endif (HDF5_ENABLE_HSIZET)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
@@ -110,40 +83,6 @@ option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
# so far we have no check for this
set (H5_HAVE_TMPFILE 1)
-#-----------------------------------------------------------------------------
-# This MACRO checks IF the symbol exists in the library and IF it
-# does, it appends library to the list.
-#-----------------------------------------------------------------------------
-set (LINK_LIBS "")
-MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
- CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
- if (${VARIABLE})
- set (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
- endif (${VARIABLE})
-ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
-
-# ----------------------------------------------------------------------
-# WINDOWS Hard code Values
-# ----------------------------------------------------------------------
-
-set (WINDOWS)
-if (WIN32)
- if (MINGW)
- set (H5_HAVE_MINGW 1)
- set (WINDOWS 1) # MinGW tries to imitate Windows
- set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
- endif (MINGW)
- set (H5_HAVE_WIN32_API 1)
- set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
- if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- set (WINDOWS 1)
- set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
- if (MSVC)
- set (H5_HAVE_VISUAL_STUDIO 1)
- endif (MSVC)
- endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
-endif (WIN32)
-
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
@@ -169,30 +108,6 @@ endif (WINDOWS)
SET (H5_DEFAULT_VOL H5VL_NATIVE)
if (WINDOWS)
- set (H5_HAVE_STDDEF_H 1)
- set (H5_HAVE_SYS_STAT_H 1)
- set (H5_HAVE_SYS_TYPES_H 1)
- set (H5_HAVE_LIBM 1)
- set (H5_HAVE_STRDUP 1)
- set (H5_HAVE_SYSTEM 1)
- set (H5_HAVE_LONGJMP 1)
- if (NOT MINGW)
- set (H5_HAVE_GETHOSTNAME 1)
- endif (NOT MINGW)
- if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- set (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1)
- endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- set (H5_HAVE_FUNCTION 1)
- set (H5_GETTIMEOFDAY_GIVES_TZ 1)
- set (H5_HAVE_TIMEZONE 1)
- set (H5_HAVE_GETTIMEOFDAY 1)
- set (H5_LONE_COLON 0)
- if (MINGW)
- set (H5_HAVE_WINSOCK2_H 1)
- endif (MINGW)
- set (H5_HAVE_LIBWS2_32 1)
- set (H5_HAVE_LIBWSOCK32 1)
-
#-----------------------------------------------------------------------------
# These tests need to be manually SET for windows since there is currently
# something not quite correct with the actual test implementation. This affects
@@ -205,97 +120,6 @@ endif (WINDOWS)
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
-if (CYGWIN)
- set (H5_HAVE_LSEEK64 0)
-endif (CYGWIN)
-
-#-----------------------------------------------------------------------------
-# Check for the math library "m"
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
- CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM)
- CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
- CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
- CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
-endif (NOT WINDOWS)
-
-CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname H5_HAVE_LIBUCB)
-CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect H5_HAVE_LIBSOCKET)
-CHECK_LIBRARY_EXISTS ("c" gethostbyname "" NOT_NEED_LIBNSL)
-
-if (NOT NOT_NEED_LIBNSL)
- CHECK_LIBRARY_EXISTS_CONCAT ("nsl" gethostbyname H5_HAVE_LIBNSL)
-endif (NOT NOT_NEED_LIBNSL)
-
-# For other tests to use the same libraries
-set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
-
-set (USE_INCLUDES "")
-if (WINDOWS)
- set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
-endif (WINDOWS)
-
-if (NOT WINDOWS)
- TEST_BIG_ENDIAN (H5_WORDS_BIGENDIAN)
-endif (NOT WINDOWS)
-
-# For other specific tests, use this MACRO.
-MACRO (HDF5_FUNCTION_TEST OTHER_TEST)
- if ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif (CMAKE_REQUIRED_LIBRARIES)
-
- foreach (def ${HDF5_EXTRA_TEST_DEFINITIONS})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- endforeach (def)
-
- foreach (def
- HAVE_SYS_TIME_H
- HAVE_UNISTD_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_SOCKET_H
- )
- if ("${H5_${def}}")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ("${H5_${def}}")
- endforeach (def)
-
- if (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif (LARGEFILE)
-
- #message (STATUS "Performing ${OTHER_TEST}")
- TRY_COMPILE (${OTHER_TEST}
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if (${OTHER_TEST})
- set (H5_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
- message (STATUS "Performing Other Test ${OTHER_TEST} - Success")
- else (${OTHER_TEST})
- message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
- set (H5_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Performing Other Test ${OTHER_TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- )
- endif (${OTHER_TEST})
- endif ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
-ENDMACRO (HDF5_FUNCTION_TEST)
-
-#-----------------------------------------------------------------------------
-# Check for these functions before the time headers are checked
-#-----------------------------------------------------------------------------
-HDF5_FUNCTION_TEST (STDC_HEADERS)
-
CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME)
#CHECK_FUNCTION_EXISTS (gettimeofday H5_HAVE_GETTIMEOFDAY)
# Since gettimeofday is not defined any where standard, lets look in all the
@@ -304,7 +128,7 @@ if (NOT MSVC)
if ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$")
TRY_COMPILE (HAVE_TIME_GETTIMEOFDAY
${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp
+ ${HDF_RESOURCES_EXT_DIR}/GetTimeOfDayTest.cpp
COMPILE_DEFINITIONS -DTRY_TIME_H
OUTPUT_VARIABLE OUTPUT
)
@@ -317,7 +141,7 @@ if (NOT MSVC)
if ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$")
TRY_COMPILE (HAVE_SYS_TIME_GETTIMEOFDAY
${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp
+ ${HDF_RESOURCES_EXT_DIR}/GetTimeOfDayTest.cpp
COMPILE_DEFINITIONS -DTRY_SYS_TIME_H
OUTPUT_VARIABLE OUTPUT
)
@@ -355,426 +179,6 @@ endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# Check IF header file exists and add it to the list.
-#-----------------------------------------------------------------------------
-MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
- CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
- if (${VARIABLE})
- set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
- endif (${VARIABLE})
-ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
-
-#-----------------------------------------------------------------------------
-# Check for the existence of certain header files
-#-----------------------------------------------------------------------------
-CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" H5_HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" H5_HAVE_SYS_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("unistd.h" H5_HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" H5_HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" H5_HAVE_SYS_STAT_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" H5_HAVE_SYS_SOCKET_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H)
-CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
-CHECK_INCLUDE_FILE_CONCAT ("dirent.h" H5_HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H)
-
-# IF the c compiler found stdint, check the C++ as well. On some systems this
-# file will be found by C but not C++, only do this test IF the C++ compiler
-# has been initialized (e.g. the project also includes some c++)
-if (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
- CHECK_INCLUDE_FILE_CXX ("stdint.h" H5_HAVE_STDINT_H_CXX)
- if (NOT H5_HAVE_STDINT_H_CXX)
- set (H5_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
- set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
- endif (NOT H5_HAVE_STDINT_H_CXX)
-endif (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
-
-# Darwin
-CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" H5_HAVE_MACH_MACH_TIME_H)
-
-# Windows
-CHECK_INCLUDE_FILE_CONCAT ("io.h" H5_HAVE_IO_H)
-if (NOT CYGWIN)
- CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK2_H)
-endif (NOT CYGWIN)
-CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" H5_HAVE_SYS_TIMEB_H)
-
-if (CMAKE_SYSTEM_NAME MATCHES "OSF")
- CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" H5_HAVE_SYS_SYSINFO_H)
- CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" H5_HAVE_SYS_PROC_H)
-else (CMAKE_SYSTEM_NAME MATCHES "OSF")
- set (H5_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
- set (H5_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-endif (CMAKE_SYSTEM_NAME MATCHES "OSF")
-
-CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" H5_HAVE_GLOBUS_COMMON_H)
-CHECK_INCLUDE_FILE_CONCAT ("pdb.h" H5_HAVE_PDB_H)
-CHECK_INCLUDE_FILE_CONCAT ("pthread.h" H5_HAVE_PTHREAD_H)
-CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" H5_HAVE_SRBCLIENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("string.h" H5_HAVE_STRING_H)
-CHECK_INCLUDE_FILE_CONCAT ("strings.h" H5_HAVE_STRINGS_H)
-CHECK_INCLUDE_FILE_CONCAT ("time.h" H5_HAVE_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" H5_HAVE_STDLIB_H)
-CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H)
-CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H)
-CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H)
-
-#-----------------------------------------------------------------------------
-# Check for large file support
-#-----------------------------------------------------------------------------
-
-# The linux-lfs option is deprecated.
-set (LINUX_LFS 0)
-
-set (HDF5_EXTRA_C_FLAGS)
-set (HDF5_EXTRA_FLAGS)
-if (NOT WINDOWS)
- if (NOT H5_HAVE_SOLARIS)
- # Linux Specific flags
- # This was originally defined as _POSIX_SOURCE which was updated to
- # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
- # functionality so clock_gettime and CLOCK_MONOTONIC are defined
- # correctly.
- # POSIX feature information can be found in the gcc manual at:
- # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- set (HDF5_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=199506L)
- set (HDF5_EXTRA_FLAGS -D_BSD_SOURCE)
-
- option (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- if (HDF5_ENABLE_LARGE_FILE)
- set (msg "Performing TEST_LFS_WORKS")
- TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DTEST_LFS_WORKS
- OUTPUT_VARIABLE OUTPUT
- )
- if (TEST_LFS_WORKS_COMPILE)
- if (TEST_LFS_WORKS_RUN MATCHES 0)
- set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
- set (LARGEFILE 1)
- set (HDF5_EXTRA_FLAGS ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- message (STATUS "${msg}... yes")
- else (TEST_LFS_WORKS_RUN MATCHES 0)
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
- )
- endif (TEST_LFS_WORKS_RUN MATCHES 0)
- else (TEST_LFS_WORKS_COMPILE )
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
- )
- endif (TEST_LFS_WORKS_COMPILE)
- endif (HDF5_ENABLE_LARGE_FILE)
- set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF5_EXTRA_FLAGS})
- endif (NOT H5_HAVE_SOLARIS)
-endif (NOT WINDOWS)
-
-add_definitions (${HDF5_EXTRA_FLAGS})
-
-#-----------------------------------------------------------------------------
-# Check for HAVE_OFF64_T functionality
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS OR MINGW)
- HDF5_FUNCTION_TEST (HAVE_OFF64_T)
- if (H5_HAVE_OFF64_T)
- CHECK_FUNCTION_EXISTS (lseek64 H5_HAVE_LSEEK64)
- CHECK_FUNCTION_EXISTS (fseeko64 H5_HAVE_FSEEKO64)
- CHECK_FUNCTION_EXISTS (ftello64 H5_HAVE_FTELLO64)
- CHECK_FUNCTION_EXISTS (ftruncate64 H5_HAVE_FTRUNCATE64)
- endif (H5_HAVE_OFF64_T)
-
- CHECK_FUNCTION_EXISTS (fseeko H5_HAVE_FSEEKO)
- CHECK_FUNCTION_EXISTS (ftello H5_HAVE_FTELLO)
-
- HDF5_FUNCTION_TEST (HAVE_STAT64_STRUCT)
- if (HAVE_STAT64_STRUCT)
- CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64)
- CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64)
- endif (HAVE_STAT64_STRUCT)
-endif (NOT WINDOWS OR MINGW)
-
-#-----------------------------------------------------------------------------
-# Check the size in bytes of all the int and float types
-#-----------------------------------------------------------------------------
-MACRO (H5_CHECK_TYPE_SIZE type var)
- set (aType ${type})
- set (aVar ${var})
-# message (STATUS "Checking size of ${aType} and storing into ${aVar}")
- CHECK_TYPE_SIZE (${aType} ${aVar})
- if (NOT ${aVar})
- set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
-# message (STATUS "Size of ${aType} was NOT Found")
- endif (NOT ${aVar})
-ENDMACRO (H5_CHECK_TYPE_SIZE)
-
-H5_CHECK_TYPE_SIZE (char H5_SIZEOF_CHAR)
-H5_CHECK_TYPE_SIZE (short H5_SIZEOF_SHORT)
-H5_CHECK_TYPE_SIZE (int H5_SIZEOF_INT)
-H5_CHECK_TYPE_SIZE (unsigned H5_SIZEOF_UNSIGNED)
-if (NOT APPLE)
- H5_CHECK_TYPE_SIZE (long H5_SIZEOF_LONG)
-endif (NOT APPLE)
-H5_CHECK_TYPE_SIZE ("long long" H5_SIZEOF_LONG_LONG)
-H5_CHECK_TYPE_SIZE (__int64 H5_SIZEOF___INT64)
-if (NOT H5_SIZEOF___INT64)
- set (H5_SIZEOF___INT64 0)
-endif (NOT H5_SIZEOF___INT64)
-
-H5_CHECK_TYPE_SIZE (float H5_SIZEOF_FLOAT)
-H5_CHECK_TYPE_SIZE (double H5_SIZEOF_DOUBLE)
-H5_CHECK_TYPE_SIZE ("long double" H5_SIZEOF_LONG_DOUBLE)
-
-H5_CHECK_TYPE_SIZE (int8_t H5_SIZEOF_INT8_T)
-H5_CHECK_TYPE_SIZE (uint8_t H5_SIZEOF_UINT8_T)
-H5_CHECK_TYPE_SIZE (int_least8_t H5_SIZEOF_INT_LEAST8_T)
-H5_CHECK_TYPE_SIZE (uint_least8_t H5_SIZEOF_UINT_LEAST8_T)
-H5_CHECK_TYPE_SIZE (int_fast8_t H5_SIZEOF_INT_FAST8_T)
-H5_CHECK_TYPE_SIZE (uint_fast8_t H5_SIZEOF_UINT_FAST8_T)
-
-H5_CHECK_TYPE_SIZE (int16_t H5_SIZEOF_INT16_T)
-H5_CHECK_TYPE_SIZE (uint16_t H5_SIZEOF_UINT16_T)
-H5_CHECK_TYPE_SIZE (int_least16_t H5_SIZEOF_INT_LEAST16_T)
-H5_CHECK_TYPE_SIZE (uint_least16_t H5_SIZEOF_UINT_LEAST16_T)
-H5_CHECK_TYPE_SIZE (int_fast16_t H5_SIZEOF_INT_FAST16_T)
-H5_CHECK_TYPE_SIZE (uint_fast16_t H5_SIZEOF_UINT_FAST16_T)
-
-H5_CHECK_TYPE_SIZE (int32_t H5_SIZEOF_INT32_T)
-H5_CHECK_TYPE_SIZE (uint32_t H5_SIZEOF_UINT32_T)
-H5_CHECK_TYPE_SIZE (int_least32_t H5_SIZEOF_INT_LEAST32_T)
-H5_CHECK_TYPE_SIZE (uint_least32_t H5_SIZEOF_UINT_LEAST32_T)
-H5_CHECK_TYPE_SIZE (int_fast32_t H5_SIZEOF_INT_FAST32_T)
-H5_CHECK_TYPE_SIZE (uint_fast32_t H5_SIZEOF_UINT_FAST32_T)
-
-H5_CHECK_TYPE_SIZE (int64_t H5_SIZEOF_INT64_T)
-H5_CHECK_TYPE_SIZE (uint64_t H5_SIZEOF_UINT64_T)
-H5_CHECK_TYPE_SIZE (int_least64_t H5_SIZEOF_INT_LEAST64_T)
-H5_CHECK_TYPE_SIZE (uint_least64_t H5_SIZEOF_UINT_LEAST64_T)
-H5_CHECK_TYPE_SIZE (int_fast64_t H5_SIZEOF_INT_FAST64_T)
-H5_CHECK_TYPE_SIZE (uint_fast64_t H5_SIZEOF_UINT_FAST64_T)
-
-if (NOT APPLE)
- H5_CHECK_TYPE_SIZE (size_t H5_SIZEOF_SIZE_T)
- H5_CHECK_TYPE_SIZE (ssize_t H5_SIZEOF_SSIZE_T)
- if (NOT H5_SIZEOF_SSIZE_T)
- set (H5_SIZEOF_SSIZE_T 0)
- endif (NOT H5_SIZEOF_SSIZE_T)
- if (NOT WINDOWS)
- H5_CHECK_TYPE_SIZE (ptrdiff_t H5_SIZEOF_PTRDIFF_T)
- endif (NOT WINDOWS)
-endif (NOT APPLE)
-
-H5_CHECK_TYPE_SIZE (off_t H5_SIZEOF_OFF_T)
-H5_CHECK_TYPE_SIZE (off64_t H5_SIZEOF_OFF64_T)
-if (NOT H5_SIZEOF_OFF64_T)
- set (H5_SIZEOF_OFF64_T 0)
-endif (NOT H5_SIZEOF_OFF64_T)
-
-if (NOT WINDOWS)
- #-----------------------------------------------------------------------------
- # Check if the dev_t type is a scalar type
- #-----------------------------------------------------------------------------
- HDF5_FUNCTION_TEST (DEV_T_IS_SCALAR)
-
- # ----------------------------------------------------------------------
- # Check for MONOTONIC_TIMER support (used in clock_gettime). This has
- # to be done after any POSIX/BSD defines to ensure that the test gets
- # the correct POSIX level on linux.
- CHECK_VARIABLE_EXISTS (CLOCK_MONOTONIC HAVE_CLOCK_MONOTONIC)
-
- #-----------------------------------------------------------------------------
- # Check a bunch of time functions
- #-----------------------------------------------------------------------------
- foreach (test
- HAVE_TM_GMTOFF
- HAVE___TM_GMTOFF
-# HAVE_TIMEZONE
- HAVE_STRUCT_TIMEZONE
- GETTIMEOFDAY_GIVES_TZ
- TIME_WITH_SYS_TIME
- HAVE_TM_ZONE
- HAVE_STRUCT_TM_TM_ZONE
- )
- HDF5_FUNCTION_TEST (${test})
- endforeach (test)
- if (NOT CYGWIN AND NOT MINGW)
- HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
-# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
- endif (NOT CYGWIN AND NOT MINGW)
-
- # ----------------------------------------------------------------------
- # Does the struct stat have the st_blocks field? This field is not Posix.
- #
- HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
-
- # ----------------------------------------------------------------------
- # How do we figure out the width of a tty in characters?
- #
- CHECK_FUNCTION_EXISTS (ioctl H5_HAVE_IOCTL)
- HDF5_FUNCTION_TEST (HAVE_STRUCT_VIDEOCONFIG)
- HDF5_FUNCTION_TEST (HAVE_STRUCT_TEXT_INFO)
- CHECK_FUNCTION_EXISTS (_getvideoconfig H5_HAVE__GETVIDEOCONFIG)
- CHECK_FUNCTION_EXISTS (gettextinfo H5_HAVE_GETTEXTINFO)
- CHECK_FUNCTION_EXISTS (_scrsize H5_HAVE__SCRSIZE)
- if (NOT CYGWIN AND NOT MINGW)
- CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO)
- endif (NOT CYGWIN AND NOT MINGW)
- CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ)
- CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD)
-endif (NOT WINDOWS)
-
-#-----------------------------------------------------------------------------
-# Check for some functions that are used
-#
-CHECK_FUNCTION_EXISTS (alarm H5_HAVE_ALARM)
-#CHECK_FUNCTION_EXISTS (BSDgettimeofday H5_HAVE_BSDGETTIMEOFDAY)
-CHECK_FUNCTION_EXISTS (fork H5_HAVE_FORK)
-CHECK_FUNCTION_EXISTS (frexpf H5_HAVE_FREXPF)
-CHECK_FUNCTION_EXISTS (frexpl H5_HAVE_FREXPL)
-
-CHECK_FUNCTION_EXISTS (gethostname H5_HAVE_GETHOSTNAME)
-CHECK_FUNCTION_EXISTS (getpwuid H5_HAVE_GETPWUID)
-CHECK_FUNCTION_EXISTS (getrusage H5_HAVE_GETRUSAGE)
-CHECK_FUNCTION_EXISTS (lstat H5_HAVE_LSTAT)
-
-CHECK_FUNCTION_EXISTS (rand_r H5_HAVE_RAND_R)
-CHECK_FUNCTION_EXISTS (random H5_HAVE_RANDOM)
-CHECK_FUNCTION_EXISTS (setsysinfo H5_HAVE_SETSYSINFO)
-
-CHECK_FUNCTION_EXISTS (signal H5_HAVE_SIGNAL)
-CHECK_FUNCTION_EXISTS (longjmp H5_HAVE_LONGJMP)
-CHECK_FUNCTION_EXISTS (setjmp H5_HAVE_SETJMP)
-CHECK_FUNCTION_EXISTS (siglongjmp H5_HAVE_SIGLONGJMP)
-CHECK_FUNCTION_EXISTS (sigsetjmp H5_HAVE_SIGSETJMP)
-CHECK_FUNCTION_EXISTS (sigaction H5_HAVE_SIGACTION)
-CHECK_FUNCTION_EXISTS (sigprocmask H5_HAVE_SIGPROCMASK)
-
-CHECK_FUNCTION_EXISTS (snprintf H5_HAVE_SNPRINTF)
-CHECK_FUNCTION_EXISTS (srandom H5_HAVE_SRANDOM)
-CHECK_FUNCTION_EXISTS (strdup H5_HAVE_STRDUP)
-CHECK_FUNCTION_EXISTS (symlink H5_HAVE_SYMLINK)
-CHECK_FUNCTION_EXISTS (system H5_HAVE_SYSTEM)
-
-CHECK_FUNCTION_EXISTS (tmpfile H5_HAVE_TMPFILE)
-CHECK_FUNCTION_EXISTS (vasprintf H5_HAVE_VASPRINTF)
-CHECK_FUNCTION_EXISTS (waitpid H5_HAVE_WAITPID)
-
-CHECK_FUNCTION_EXISTS (vsnprintf H5_HAVE_VSNPRINTF)
-if (NOT WINDOWS)
- if (H5_HAVE_VSNPRINTF)
- HDF5_FUNCTION_TEST (VSNPRINTF_WORKS)
- endif (H5_HAVE_VSNPRINTF)
-endif (NOT WINDOWS)
-
-#-----------------------------------------------------------------------------
-# sigsetjmp is special; may actually be a macro
-#-----------------------------------------------------------------------------
-if (NOT H5_HAVE_SIGSETJMP)
- if (H5_HAVE_SETJMP_H)
- CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" H5_HAVE_MACRO_SIGSETJMP)
- if (H5_HAVE_MACRO_SIGSETJMP)
- set (H5_HAVE_SIGSETJMP 1)
- endif (H5_HAVE_MACRO_SIGSETJMP)
- endif (H5_HAVE_SETJMP_H)
-endif (NOT H5_HAVE_SIGSETJMP)
-
-#-----------------------------------------------------------------------------
-# Check for Symbols
-CHECK_SYMBOL_EXISTS (tzname "time.h" H5_HAVE_DECL_TZNAME)
-
-#-----------------------------------------------------------------------------
-# Check a bunch of other functions
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
- foreach (test
- LONE_COLON
- HAVE_ATTRIBUTE
- HAVE_C99_FUNC
- HAVE_FUNCTION
- HAVE_C99_DESIGNATED_INITIALIZER
- SYSTEM_SCOPE_THREADS
- HAVE_SOCKLEN_T
- CXX_HAVE_OFFSETOF
- )
- HDF5_FUNCTION_TEST (${test})
- endforeach (test)
-endif (NOT WINDOWS)
-
-# For other CXX specific tests, use this MACRO.
-MACRO (HDF5_CXX_FUNCTION_TEST OTHER_TEST)
- if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif (CMAKE_REQUIRED_LIBRARIES)
-
- foreach (def ${HDF5_EXTRA_TEST_DEFINITIONS})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- endforeach (def)
-
- foreach (def
- HAVE_SYS_TIME_H
- HAVE_UNISTD_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_SOCKET_H
- )
- if ("${H5_${def}}")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ("${H5_${def}}")
- endforeach (def)
-
- if (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif (LARGEFILE)
-
- #message (STATUS "Performing ${OTHER_TEST}")
- TRY_COMPILE (${OTHER_TEST}
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/HDF5CXXTests.cpp
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if ("${OTHER_TEST}" EQUAL 0)
- set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
- else ("${OTHER_TEST}" EQUAL 0)
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
- set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- )
- endif ("${OTHER_TEST}" EQUAL 0)
- endif ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
-ENDMACRO (HDF5_CXX_FUNCTION_TEST)
-
-#-----------------------------------------------------------------------------
-# Check a bunch of cxx functions
-#-----------------------------------------------------------------------------
-if (CMAKE_CXX_COMPILER_LOADED)
- foreach (test
- OLD_HEADER_FILENAME
- H5_NO_NAMESPACE
- H5_NO_STD
- BOOL_NOTDEFINED
- NO_STATIC_CAST
- )
- HDF5_CXX_FUNCTION_TEST (${test})
- endforeach (test)
-endif (CMAKE_CXX_COMPILER_LOADED)
-
-#-----------------------------------------------------------------------------
# Check if Direct I/O driver works
#-----------------------------------------------------------------------------
if (NOT WINDOWS)
@@ -783,14 +187,14 @@ if (NOT WINDOWS)
set (msg "Performing TEST_DIRECT_VFD_WORKS")
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}")
TRY_RUN (TEST_DIRECT_VFD_WORKS_RUN TEST_DIRECT_VFD_WORKS_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
OUTPUT_VARIABLE OUTPUT
)
if (TEST_DIRECT_VFD_WORKS_COMPILE)
if (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
- HDF5_FUNCTION_TEST (HAVE_DIRECT)
+ HDF_FUNCTION_TEST (HAVE_DIRECT)
set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
add_definitions ("-D_GNU_SOURCE")
else (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
@@ -810,148 +214,6 @@ if (NOT WINDOWS)
endif (HDF5_ENABLE_DIRECT_VFD)
endif (NOT WINDOWS)
-#-----------------------------------------------------------------------------
-# Check if InitOnceExecuteOnce is available
-#-----------------------------------------------------------------------------
-if (WINDOWS)
- if (NOT HDF5_NO_IOEO_TEST)
- message (STATUS "Checking for InitOnceExecuteOnce:")
- if ("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
- if (LARGEFILE)
- set (CMAKE_REQUIRED_DEFINITIONS
- "${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- endif (CMAKE_REQUIRED_LIBRARIES)
- if (CMAKE_REQUIRED_INCLUDES)
- set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- else (CMAKE_REQUIRED_INCLUDES)
- set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
- endif (CMAKE_REQUIRED_INCLUDES)
-
- TRY_RUN(HAVE_IOEO_EXITCODE HAVE_IOEO_COMPILED
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
- "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
- "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
- COMPILE_OUTPUT_VARIABLE OUTPUT)
- # if it did not compile make the return value fail code of 1
- if (NOT HAVE_IOEO_COMPILED)
- set (HAVE_IOEO_EXITCODE 1)
- endif (NOT HAVE_IOEO_COMPILED)
- # if the return value was 0 then it worked
- if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- set (H5_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
- message (STATUS "Performing Test InitOnceExecuteOnce - Success")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
- "${OUTPUT}\n"
- "Return value: ${HAVE_IOEO}\n")
- else ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- if (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
- set (H5_HAVE_IOEO "${HAVE_IOEO_EXITCODE}")
- else (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
- set (H5_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
- endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
-
- message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Performing InitOnceExecuteOnce Test failed with the following output:\n"
- "${OUTPUT}\n"
- "Return value: ${HAVE_IOEO_EXITCODE}\n")
- endif ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- endif ("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
- endif (NOT HDF5_NO_IOEO_TEST)
-endif (WINDOWS)
-
-#-----------------------------------------------------------------------------
-# Determine how 'inline' is used
-#-----------------------------------------------------------------------------
-set (HDF5_EXTRA_TEST_DEFINITIONS INLINE_TEST_INLINE)
-foreach (inline_test inline __inline__ __inline)
- set (INLINE_TEST_INLINE ${inline_test})
- HDF5_FUNCTION_TEST (INLINE_TEST_${inline_test})
-endforeach (inline_test)
-
-set (HDF5_EXTRA_TEST_DEFINITIONS)
-if (INLINE_TEST___inline__)
- set (H5_inline __inline__)
-else (INLINE_TEST___inline__)
- if (INLINE_TEST___inline)
- set (H5_inline __inline)
- else (INLINE_TEST___inline)
- if (INLINE_TEST_inline)
- set (H5_inline inline)
- endif (INLINE_TEST_inline)
- endif (INLINE_TEST___inline)
-endif (INLINE_TEST___inline__)
-
-#-----------------------------------------------------------------------------
-# Check how to print a Long Long integer
-#-----------------------------------------------------------------------------
-if (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
- set (PRINT_LL_FOUND 0)
- message (STATUS "Checking for appropriate format for 64 bit long:")
- foreach (HDF5_PRINTF_LL l64 l L q I64 ll)
- set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
- if (H5_SIZEOF_LONG_LONG)
- set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- endif (H5_SIZEOF_LONG_LONG)
- TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
- )
- if (HDF5_PRINTF_LL_TEST_COMPILE)
- if (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- set (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- set (PRINT_LL_FOUND 1)
- else (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- message ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
- endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- else (HDF5_PRINTF_LL_TEST_COMPILE)
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
- )
- endif (HDF5_PRINTF_LL_TEST_COMPILE)
- endforeach (HDF5_PRINTF_LL)
-
- if (PRINT_LL_FOUND)
- message (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
- else (PRINT_LL_FOUND)
- message (STATUS "Checking for apropriate format for 64 bit long: not found")
- set (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
- "Width for printf for type `long long' or `__int64', us. `ll"
- )
- endif (PRINT_LL_FOUND)
-endif (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
-
-# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can handle converting
-# denormalized floating-point values.
-# (This flag should be set for all machines, except for the Crays, where
-# the cache value is set in it's config file)
-#
-set (H5_CONVERT_DENORMAL_FLOAT 1)
-
-#-----------------------------------------------------------------------------
-# Are we going to use HSIZE_T
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_HSIZET)
- set (H5_HAVE_LARGE_HSIZET 1)
-endif (HDF5_ENABLE_HSIZET)
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
@@ -960,8 +222,8 @@ MACRO (H5ConversionTests TEST msg)
if ("${TEST}" MATCHES "^${TEST}$")
# message (STATUS "===> ${TEST}")
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/ConversionTests.c
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_DIR}/ConversionTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
OUTPUT_VARIABLE OUTPUT
)
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/FindMPI.cmake b/config/cmake/FindMPI.cmake
deleted file mode 100644
index 1b67a30..0000000
--- a/config/cmake/FindMPI.cmake
+++ /dev/null
@@ -1,647 +0,0 @@
-# - Find a Message Passing Interface (MPI) implementation
-# The Message Passing Interface (MPI) is a library used to write
-# high-performance distributed-memory parallel applications, and
-# is typically deployed on a cluster. MPI is a standard interface
-# (defined by the MPI forum) for which many implementations are
-# available. All of them have somewhat different include paths,
-# libraries to link against, etc., and this module tries to smooth
-# out those differences.
-#
-# === Variables ===
-#
-# This module will set the following variables per language in your project,
-# where <lang> is one of C, CXX, or Fortran:
-# MPI_<lang>_FOUND TRUE if FindMPI found MPI flags for <lang>
-# MPI_<lang>_COMPILER MPI Compiler wrapper for <lang>
-# MPI_<lang>_COMPILE_FLAGS Compilation flags for MPI programs
-# MPI_<lang>_INCLUDE_PATH Include path(s) for MPI header
-# MPI_<lang>_LINK_FLAGS Linking flags for MPI programs
-# MPI_<lang>_LIBRARIES All libraries to link MPI programs against
-# Additionally, FindMPI sets the following variables for running MPI
-# programs from the command line:
-# MPIEXEC Executable for running MPI programs
-# MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving
-# it the number of processors to run on
-# MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly
-# before the executable to run.
-# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags
-# === Usage ===
-#
-# To use this module, simply call FindMPI from a CMakeLists.txt file, or
-# run find_package(MPI), then run CMake. If you are happy with the auto-
-# detected configuration for your language, then you're done. If not, you
-# have two options:
-# 1. Set MPI_<lang>_COMPILER to the MPI wrapper (mpicc, etc.) of your
-# choice and reconfigure. FindMPI will attempt to determine all the
-# necessary variables using THAT compiler's compile and link flags.
-# 2. If this fails, or if your MPI implementation does not come with
-# a compiler wrapper, then set both MPI_<lang>_LIBRARIES and
-# MPI_<lang>_INCLUDE_PATH. You may also set any other variables
-# listed above, but these two are required. This will circumvent
-# autodetection entirely.
-# When configuration is successful, MPI_<lang>_COMPILER will be set to the
-# compiler wrapper for <lang>, if it was found. MPI_<lang>_FOUND and other
-# variables above will be set if any MPI implementation was found for <lang>,
-# regardless of whether a compiler was found.
-#
-# When using MPIEXEC to execute MPI applications, you should typically use
-# all of the MPIEXEC flags as follows:
-# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS
-# ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS
-# where PROCS is the number of processors on which to execute the program,
-# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
-# MPI program.
-#
-# === Backward Compatibility ===
-#
-# For backward compatibility with older versions of FindMPI, these
-# variables are set, but deprecated:
-# MPI_FOUND MPI_COMPILER MPI_LIBRARY
-# MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_EXTRA_LIBRARY
-# MPI_LINK_FLAGS MPI_LIBRARIES
-# In new projects, please use the MPI_<lang>_XXX equivalents.
-
-#=============================================================================
-# Copyright 2001-2011 Kitware, Inc.
-# Copyright 2010-2011 Todd Gamblin tgamblin@llnl.gov
-# Copyright 2001-2009 Dave Partyka
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# include this to handle the QUIETLY and REQUIRED arguments
-include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
-include(GetPrerequisites)
-
-#
-# This part detects MPI compilers, attempting to wade through the mess of compiler names in
-# a sensible way.
-#
-# The compilers are detected in this order:
-#
-# 1. Try to find the most generic available MPI compiler, as this is usually set up by
-# cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's
-# the right compiler.
-#
-# 2. If a generic mpicc is NOT found, then we attempt to find one that matches
-# CMAKE_<lang>_COMPILER_ID. e.g. if you are using XL compilers, we'll try to find mpixlc
-# and company, but not mpiicc. This hopefully prevents toolchain mismatches.
-#
-# If you want to force a particular MPI compiler other than what we autodetect (e.g. if you
-# want to compile regular stuff with GNU and parallel stuff with Intel), you can always set
-# your favorite MPI_<lang>_COMPILER explicitly and this stuff will be ignored.
-#
-
-# Start out with the generic MPI compiler names, as these are most commonly used.
-set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r)
-set(_MPI_CXX_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++
- mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r)
-set(_MPI_Fortran_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r
- mpif90 mpif90_r mpf90 mpf90_r
- mpif77 mpif77_r mpf77 mpf77_r)
-
-# GNU compiler names
-set(_MPI_GNU_C_COMPILER_NAMES mpigcc mpgcc mpigcc_r mpgcc_r)
-set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r)
-set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpgfortran_r
- mpig77 mpig77_r mpg77 mpg77_r)
-
-# Intel MPI compiler names
-set(_MPI_Intel_C_COMPILER_NAMES mpiicc)
-set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC)
-set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77)
-
-# PGI compiler names
-set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc)
-set(_MPI_PGI_CXX_COMPILER_NAMES mpipgCC mppgCC)
-set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77)
-
-# XLC MPI Compiler names
-set(_MPI_XL_C_COMPILER_NAMES mpxlc mpxlc_r mpixlc mpixlc_r)
-set(_MPI_XL_CXX_COMPILER_NAMES mpixlcxx mpixlC mpixlc++ mpxlcxx mpxlc++ mpixlc++ mpxlCC
- mpixlcxx_r mpixlC_r mpixlc++_r mpxlcxx_r mpxlc++_r mpixlc++_r mpxlCC_r)
-set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95_r
- mpixlf90 mpixlf90_r mpxlf90 mpxlf90_r
- mpixlf77 mpixlf77_r mpxlf77 mpxlf77_r
- mpixlf mpixlf_r mpxlf mpxlf_r)
-
-# append vendor-specific compilers to the list if we either don't know the compiler id,
-# or if we know it matches the regular compiler.
-foreach (lang C CXX Fortran)
- foreach (id GNU Intel PGI XL)
- if (NOT CMAKE_${lang}_COMPILER_ID OR "${CMAKE_${lang}_COMPILER_ID}" STREQUAL "${id}")
- list(APPEND _MPI_${lang}_COMPILER_NAMES ${_MPI_${id}_${lang}_COMPILER_NAMES})
- endif()
- unset(_MPI_${id}_${lang}_COMPILER_NAMES) # clean up the namespace here
- endforeach()
-endforeach()
-
-
-# Names to try for MPI exec
-set(_MPI_EXEC_NAMES mpiexec mpirun lamexec srun)
-
-# Grab the path to MPI from the registry if we're on windows.
-set(_MPI_PREFIX_PATH)
-if(WIN32)
- list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
- list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
- list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/")
-endif()
-
-# Build a list of prefixes to search for MPI.
-foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
- foreach(MpiPackageDir ${_MPI_PREFIX_PATH})
- if(EXISTS ${SystemPrefixDir}/${MpiPackageDir})
- list(APPEND _MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}")
- endif()
- endforeach()
-endforeach()
-
-
-#
-# interrogate_mpi_compiler(lang try_libs)
-#
-# Attempts to extract compiler and linker args from an MPI compiler. The arguments set
-# by this function are:
-#
-# MPI_<lang>_INCLUDE_PATH MPI_<lang>_LINK_FLAGS MPI_<lang>_FOUND
-# MPI_<lang>_COMPILE_FLAGS MPI_<lang>_LIBRARIES
-#
-# MPI_<lang>_COMPILER must be set beforehand to the absolute path to an MPI compiler for
-# <lang>. Additionally, MPI_<lang>_INCLUDE_PATH and MPI_<lang>_LIBRARIES may be set
-# to skip autodetection.
-#
-# If try_libs is TRUE, this will also attempt to find plain MPI libraries in the usual
-# way. In general, this is not as effective as interrogating the compilers, as it
-# ignores language-specific flags and libraries. However, some MPI implementations
-# (Windows implementations) do not have compiler wrappers, so this approach must be used.
-#
-function (interrogate_mpi_compiler lang try_libs)
- # MPI_${lang}_NO_INTERROGATE will be set to a compiler name when the *regular* compiler was
- # discovered to be the MPI compiler. This happens on machines like the Cray XE6 that use
- # modules to set cc, CC, and ftn to the MPI compilers. If the user force-sets another MPI
- # compiler, MPI_${lang}_COMPILER won't be equal to MPI_${lang}_NO_INTERROGATE, and we'll
- # inspect that compiler anew. This allows users to set new compilers w/o rm'ing cache.
- string(COMPARE NOTEQUAL "${MPI_${lang}_NO_INTERROGATE}" "${MPI_${lang}_COMPILER}" interrogate)
-
- # If MPI is set already in the cache, don't bother with interrogating the compiler.
- if (interrogate AND ((NOT MPI_${lang}_INCLUDE_PATH) OR (NOT MPI_${lang}_LIBRARIES)))
- if (MPI_${lang}_COMPILER)
- # Check whether the -showme:compile option works. This indicates that we have either OpenMPI
- # or a newer version of LAM-MPI, and implies that -showme:link will also work.
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:compile
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # If we appear to have -showme:compile, then we should
- # also have -showme:link. Try it.
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:link
- OUTPUT_VARIABLE MPI_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_LINK_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # We probably have -showme:incdirs and -showme:libdirs as well,
- # so grab that while we're at it.
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:incdirs
- OUTPUT_VARIABLE MPI_INCDIRS OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_INCDIRS ERROR_STRIP_TRAILING_WHITESPACE)
-
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:libdirs
- OUTPUT_VARIABLE MPI_LIBDIRS OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_LIBDIRS ERROR_STRIP_TRAILING_WHITESPACE)
-
- else()
- # reset things here if something went wrong.
- set(MPI_COMPILE_CMDLINE)
- set(MPI_LINK_CMDLINE)
- endif()
- endif ()
-
- # Older versions of LAM-MPI have "-showme". Try to find that.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
- endif()
-
- # MVAPICH uses -compile-info and -link-info. Try them.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -compile-info
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
-
- # If we have compile-info, also have link-info.
- if (MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -link-info
- OUTPUT_VARIABLE MPI_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_LINK_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
- endif()
-
- # make sure we got compile and link. Reset vars if something's wrong.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- set(MPI_COMPILE_CMDLINE)
- set(MPI_LINK_CMDLINE)
- endif()
- endif()
-
- # MPICH just uses "-show". Try it.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -show
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
- endif()
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE
- # into MPI_LINK_CMDLINE, if we didn't find the link line.
- if (NOT MPI_LINK_CMDLINE)
- set(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE})
- endif()
- else()
- message(STATUS "Unable to determine MPI from MPI driver ${MPI_${lang}_COMPILER}")
- set(MPI_COMPILE_CMDLINE)
- set(MPI_LINK_CMDLINE)
- endif()
-
- # Here, we're done with the interrogation part, and we'll try to extract args we care
- # about from what we learned from the compiler wrapper scripts.
-
- # If interrogation came back with something, extract our variable from the MPI command line
- if (MPI_COMPILE_CMDLINE OR MPI_LINK_CMDLINE)
- # Extract compile flags from the compile command line.
- string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
- set(MPI_COMPILE_FLAGS_WORK)
-
- foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
- if (MPI_COMPILE_FLAGS_WORK)
- set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
- else()
- set(MPI_COMPILE_FLAGS_WORK ${FLAG})
- endif()
- endforeach()
-
- # Extract include paths from compile command line
- string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
- foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
- string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
- string(REGEX REPLACE "//" "/" IPATH ${IPATH})
- list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
- endforeach()
-
- # try using showme:incdirs if extracting didn't work.
- if (NOT MPI_INCLUDE_PATH_WORK)
- set(MPI_INCLUDE_PATH_WORK ${MPI_INCDIRS})
- separate_arguments(MPI_INCLUDE_PATH_WORK)
- endif()
-
- # If all else fails, just search for mpi.h in the normal include paths.
- if (NOT MPI_INCLUDE_PATH_WORK)
- set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_path(MPI_HEADER_PATH mpi.h
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include)
- set(MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH})
- endif()
-
- # Extract linker paths from the link command line
- string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
- set(MPI_LINK_PATH)
- foreach(LPATH ${MPI_ALL_LINK_PATHS})
- string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
- string(REGEX REPLACE "//" "/" LPATH ${LPATH})
- list(APPEND MPI_LINK_PATH ${LPATH})
- endforeach()
-
- # try using showme:libdirs if extracting didn't work.
- if (NOT MPI_LINK_PATH)
- set(MPI_LINK_PATH ${MPI_LIBDIRS})
- separate_arguments(MPI_LINK_PATH)
- endif()
-
- # Extract linker flags from the link command line
- string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
- set(MPI_LINK_FLAGS_WORK)
- foreach(FLAG ${MPI_ALL_LINK_FLAGS})
- if (MPI_LINK_FLAGS_WORK)
- set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
- else()
- set(MPI_LINK_FLAGS_WORK ${FLAG})
- endif()
- endforeach()
-
- # Extract the set of libraries to link against from the link command
- # line
- string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
- # add the compiler implicit directories because some compilers
- # such as the intel compiler have libraries that show up
- # in the showme list that can only be found in the implicit
- # link directories of the compiler. Do this for C++ and C
- # compilers if the implicit link directories are defined.
- if (DEFINED CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES)
- set(MPI_LINK_PATH
- "${MPI_LINK_PATH};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}")
- endif ()
-
- if (DEFINED CMAKE_C_IMPLICIT_LINK_DIRECTORIES)
- set(MPI_LINK_PATH
- "${MPI_LINK_PATH};${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
- endif ()
-
- # Determine full path names for all of the libraries that one needs
- # to link against in an MPI program
- foreach(LIB ${MPI_LIBNAMES})
- string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
- # MPI_LIB is cached by find_library, but we don't want that. Clear it first.
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB NAMES ${LIB} HINTS ${MPI_LINK_PATH})
-
- if (MPI_LIB)
- list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
- elseif (NOT MPI_FIND_QUIETLY)
- message(WARNING "Unable to find MPI library ${LIB}")
- endif()
- endforeach()
-
- # Sanity check MPI_LIBRARIES to make sure there are enough libraries
- list(LENGTH MPI_LIBRARIES_WORK MPI_NUMLIBS)
- list(LENGTH MPI_LIBNAMES MPI_NUMLIBS_EXPECTED)
- if (NOT MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED)
- set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND")
- endif()
- endif()
-
- elseif(try_libs)
- # If we didn't have an MPI compiler script to interrogate, attempt to find everything
- # with plain old find functions. This is nasty because MPI implementations have LOTS of
- # different library names, so this section isn't going to be very generic. We need to
- # make sure it works for MS MPI, though, since there are no compiler wrappers for that.
- find_path(MPI_HEADER_PATH mpi.h
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include Inc)
- set(MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH})
-
- # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
- set(MS_MPI_ARCH_DIR amd64)
- else()
- set(MS_MPI_ARCH_DIR i386)
- endif()
-
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB
- NAMES mpi mpich mpich2 msmpi
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
- set(MPI_LIBRARIES_WORK ${MPI_LIB})
-
- # Right now, we only know about the extra libs for C++.
- # We could add Fortran here (as there is usually libfmpich, etc.), but
- # this really only has to work with MS MPI on Windows.
- # Assume that other MPI's are covered by the compiler wrappers.
- if (${lang} STREQUAL CXX)
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB
- NAMES mpi++ mpicxx cxx mpi_cxx
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib)
- if (MPI_LIBRARIES_WORK AND MPI_LIB)
- list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
- endif()
- endif()
-
- if (${lang} STREQUAL Fortran)
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB
- NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
- if (MPI_LIBRARIES_WORK AND MPI_LIB)
- list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
- endif()
- endif()
-
- if (NOT MPI_LIBRARIES_WORK)
- set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND")
- endif()
- endif()
-
- # If we found MPI, set up all of the appropriate cache entries
- set(MPI_${lang}_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI ${lang} compilation flags" FORCE)
- set(MPI_${lang}_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI ${lang} include path" FORCE)
- set(MPI_${lang}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${lang} linking flags" FORCE)
- set(MPI_${lang}_LIBRARIES ${MPI_LIBRARIES_WORK} CACHE STRING "MPI ${lang} libraries to link against" FORCE)
- mark_as_advanced(MPI_${lang}_COMPILE_FLAGS MPI_${lang}_INCLUDE_PATH MPI_${lang}_LINK_FLAGS MPI_${lang}_LIBRARIES)
-
- # clear out our temporary lib/header detectionv variable here.
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI lib detection" FORCE)
- set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI header detection" FORCE)
- endif()
-
- # finally set a found variable for each MPI language
- if (MPI_${lang}_INCLUDE_PATH AND MPI_${lang}_LIBRARIES)
- set(MPI_${lang}_FOUND TRUE PARENT_SCOPE)
- else()
- set(MPI_${lang}_FOUND FALSE PARENT_SCOPE)
- endif()
-endfunction()
-
-
-# This function attempts to compile with the regular compiler, to see if MPI programs
-# work with it. This is a last ditch attempt after we've tried interrogating mpicc and
-# friends, and after we've tried to find generic libraries. Works on machines like
-# Cray XE6, where the modules environment changes what MPI version cc, CC, and ftn use.
-function(try_regular_compiler lang success)
- set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
- if (${lang} STREQUAL Fortran)
- set(test_file ${scratch_directory}/cmake_mpi_test.f90)
- file(WRITE ${test_file}
- "program hello\n"
- "include 'mpif.h'\n"
- "integer ierror\n"
- "call MPI_INIT(ierror)\n"
- "call MPI_FINALIZE(ierror)\n"
- "end\n")
- else()
- if (${lang} STREQUAL CXX)
- set(test_file ${scratch_directory}/cmake_mpi_test.cpp)
- else()
- set(test_file ${scratch_directory}/cmake_mpi_test.c)
- endif()
- file(WRITE ${test_file}
- "#include <mpi.h>\n"
- "int main(int argc, char **argv) {\n"
- " MPI_Init(&argc, &argv);\n"
- " MPI_Finalize();\n"
- "}\n")
- endif()
- try_compile(compiler_has_mpi ${scratch_directory} ${test_file})
- if (compiler_has_mpi)
- set(MPI_${lang}_NO_INTERROGATE ${CMAKE_${lang}_COMPILER} CACHE STRING "Whether to interrogate MPI ${lang} compiler" FORCE)
- set(MPI_${lang}_COMPILER ${CMAKE_${lang}_COMPILER} CACHE STRING "MPI ${lang} compiler" FORCE)
- set(MPI_${lang}_COMPILE_FLAGS "" CACHE STRING "MPI ${lang} compilation flags" FORCE)
- set(MPI_${lang}_INCLUDE_PATH "" CACHE STRING "MPI ${lang} include path" FORCE)
- set(MPI_${lang}_LINK_FLAGS "" CACHE STRING "MPI ${lang} linking flags" FORCE)
- set(MPI_${lang}_LIBRARIES "" CACHE STRING "MPI ${lang} libraries to link against" FORCE)
- endif()
- set(${success} ${compiler_has_mpi} PARENT_SCOPE)
- unset(compiler_has_mpi CACHE)
-endfunction()
-
-# End definitions, commence real work here.
-
-# Most mpi distros have some form of mpiexec which gives us something we can reliably look for.
-find_program(MPIEXEC
- NAMES ${_MPI_EXEC_NAMES}
- PATHS ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES bin
- DOC "Executable for running MPI programs.")
-
-# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin).
-# This gives us a fairly reliable base directory to search for /bin /lib and /include from.
-get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH)
-get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH)
-
-set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
-set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
-set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
-set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
-mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
-
-
-#=============================================================================
-# Backward compatibility input hacks. Propagate the FindMPI hints to C and
-# CXX if the respective new versions are not defined. Translate the old
-# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${lang}_LIBRARIES.
-#
-# Once we find the new variables, we translate them back into their old
-# equivalents below.
-foreach (lang C CXX)
- # Old input variables.
- set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS)
-
- # Set new vars based on their old equivalents, if the new versions are not already set.
- foreach (var ${_MPI_OLD_INPUT_VARS})
- if (NOT MPI_${lang}_${var} AND MPI_${var})
- set(MPI_${lang}_${var} "${MPI_${var}}")
- endif()
- endforeach()
-
- # Special handling for MPI_LIBRARY and MPI_EXTRA_LIBRARY, which we nixed in the
- # new FindMPI. These need to be merged into MPI_<lang>_LIBRARIES
- if (NOT MPI_${lang}_LIBRARIES AND (MPI_LIBRARY OR MPI_EXTRA_LIBRARY))
- set(MPI_${lang}_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
- endif()
-endforeach()
-#=============================================================================
-
-
-# This loop finds the compilers and sends them off for interrogation.
-foreach (lang C CXX Fortran)
- if (CMAKE_${lang}_COMPILER_WORKS)
- # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler.
- if (MPI_${lang}_COMPILER)
- is_file_executable(MPI_${lang}_COMPILER MPI_COMPILER_IS_EXECUTABLE)
- if (NOT MPI_COMPILER_IS_EXECUTABLE)
- # Get rid of our default list of names and just search for the name the user wants.
- set(_MPI_${lang}_COMPILER_NAMES ${MPI_${lang}_COMPILER})
- set(MPI_${lang}_COMPILER "MPI_${lang}_COMPILER-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- # If the user specifies a compiler, we don't want to try to search libraries either.
- set(try_libs FALSE)
- endif()
- else()
- set(try_libs TRUE)
- endif()
-
- find_program(MPI_${lang}_COMPILER
- NAMES ${_MPI_${lang}_COMPILER_NAMES}
- PATHS "${MPI_HOME}/bin" "$ENV{MPI_HOME}/bin" ${_MPI_PREFIX_PATH})
- interrogate_mpi_compiler(${lang} ${try_libs})
- mark_as_advanced(MPI_${lang}_COMPILER)
-
- # last ditch try -- if nothing works so far, just try running the regular compiler and
- # see if we can create an MPI executable.
- set(regular_compiler_worked 0)
- if (NOT MPI_${lang}_LIBRARIES OR NOT MPI_${lang}_INCLUDE_PATH)
- try_regular_compiler(${lang} regular_compiler_worked)
- endif()
-
- set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY})
- set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED})
- set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION})
- set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
-
- if (regular_compiler_worked)
- find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
- else()
- find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH)
- endif()
- endif()
-endforeach()
-
-
-#=============================================================================
-# More backward compatibility stuff
-#
-# Bare MPI sans ${lang} vars are set to CXX then C, depending on what was found.
-# This mimics the behavior of the old language-oblivious FindMPI.
-set(_MPI_OLD_VARS FOUND COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES)
-if (MPI_CXX_FOUND)
- foreach (var ${_MPI_OLD_VARS})
- set(MPI_${var} ${MPI_CXX_${var}})
- endforeach()
-elseif (MPI_C_FOUND)
- foreach (var ${_MPI_OLD_VARS})
- set(MPI_${var} ${MPI_C_${var}})
- endforeach()
-else()
- # Note that we might still have found Fortran, but you'll need to use MPI_Fortran_FOUND
- set(MPI_FOUND FALSE)
-endif()
-
-# Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and MPI_EXTRA_LIBRARY, and set them in cache.
-if (MPI_LIBRARIES)
- list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK)
- set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE)
-else()
- set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE FILEPATH "MPI library to link against" FORCE)
-endif()
-
-list(LENGTH MPI_LIBRARIES MPI_NUMLIBS)
-if (MPI_NUMLIBS GREATER 1)
- set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES})
- list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0)
- set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE)
-else()
- set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE)
-endif()
-#=============================================================================
-
-# unset these vars to cleanup namespace
-unset(_MPI_OLD_VARS)
-unset(_MPI_PREFIX_PATH)
-unset(_MPI_BASE_DIR)
-foreach (lang C CXX Fortran)
- unset(_MPI_${lang}_COMPILER_NAMES)
-endforeach()
diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake
deleted file mode 100644
index f657cfa..0000000
--- a/config/cmake/FindSZIP.cmake
+++ /dev/null
@@ -1,179 +0,0 @@
-
-# - Find SZIP library
-# - Derived from the FindTiff.cmake that is included with cmake
-# Find the native SZIP includes and library
-# This module defines
-# SZIP_INCLUDE_DIRS, where to find tiff.h, etc.
-# SZIP_LIBRARIES, libraries to link against to use SZIP.
-# SZIP_FOUND, If false, do not try to use SZIP.
-# also defined, but not for general use are
-# SZIP_LIBRARY, where to find the SZIP library.
-# SZIP_LIBRARY_DEBUG - Debug version of SZIP library
-# SZIP_LIBRARY_RELEASE - Release Version of SZIP library
-
-# message (STATUS "Finding SZIP library and headers..." )
-
-############################################
-#
-# Check the existence of the libraries.
-#
-############################################
-# This macro was taken directly from the FindQt4.cmake file that is included
-# with the CMake distribution. This is NOT my work. All work was done by the
-# original authors of the FindQt4.cmake file. Only minor modifications were
-# made to remove references to Qt and make this file more generally applicable
-#########################################################################
-
-MACRO (SZIP_ADJUST_LIB_VARS basename)
- if (${basename}_INCLUDE_DIR)
-
- # if only the release version was found, set the debug variable also to the release version
- if (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
- set (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
- set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE})
- set (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE})
- endif (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
-
- # if only the debug version was found, set the release variable also to the debug version
- if (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- set (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
- set (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG})
- set (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG})
- endif (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
- set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
- endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- endif (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
-
- set (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
-
- if (${basename}_LIBRARY)
- set (${basename}_FOUND 1)
- endif (${basename}_LIBRARY)
-
- endif (${basename}_INCLUDE_DIR )
-
- # Make variables changeble to the advanced user
- MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR )
-ENDMACRO (SZIP_ADJUST_LIB_VARS)
-
-
-# Look for the header file.
-set (SZIP_INCLUDE_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/include
- $ENV{SZIP_INSTALL}/include/szip
- /usr/include
- /usr/include/szip
-)
-
-set (SZIP_LIB_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/lib
- /usr/lib
-)
-
-set (SZIP_BIN_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/bin
- /usr/bin
-)
-
-FIND_PATH (SZIP_INCLUDE_DIR
- NAMES szlib.h
- PATHS ${SZIP_INCLUDE_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-if (WIN32)
- set (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
- set (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
-else (WIN32)
- set (SZIP_SEARCH_DEBUG_NAMES "sz_d")
- set (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
-endif (WIN32)
-
-# Look for the library.
-FIND_LIBRARY (SZIP_LIBRARY_DEBUG
- NAMES ${SZIP_SEARCH_DEBUG_NAMES}
- PATHS ${SZIP_LIB_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-FIND_LIBRARY (SZIP_LIBRARY_RELEASE
- NAMES ${SZIP_SEARCH_RELEASE_NAMES}
- PATHS ${SZIP_LIB_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-SZIP_ADJUST_LIB_VARS (SZIP)
-
-if (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- set (SZIP_FOUND 1)
- set (SZIP_LIBRARIES ${SZIP_LIBRARY})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
- if (SZIP_LIBRARY_DEBUG)
- GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH)
- set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- elseif (SZIP_LIBRARY_RELEASE)
- GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH)
- set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- endif (SZIP_LIBRARY_DEBUG)
-
-else (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- set (SZIP_FOUND 0)
- set (SZIP_LIBRARIES)
- set (SZIP_INCLUDE_DIRS)
-endif (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
-
-# Report the results.
-if (NOT SZIP_FOUND)
- set (SZIP_DIR_MESSAGE
- "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable."
- )
- if (NOT SZIP_FIND_QUIETLY)
- message (STATUS "${SZIP_DIR_MESSAGE}")
- else (NOT SZIP_FIND_QUIETLY)
- if (SZIP_FIND_REQUIRED)
- message (FATAL_ERROR "SZip was NOT found and is Required by this project")
- endif (SZIP_FIND_REQUIRED)
- endif (NOT SZIP_FIND_QUIETLY)
-endif (NOT SZIP_FOUND)
-
-if (SZIP_FOUND)
- include (CheckSymbolExists)
- #############################################
- # Find out if SZIP was build using dll's
- #############################################
- # Save required variable
- set (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
- set (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
- # Add SZIP_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
- set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}")
-
- CHECK_SYMBOL_EXISTS (SZIP_BUILT_AS_DYNAMIC_LIB "SZconfig.h" HAVE_SZIP_DLL)
-
- if (HAVE_SZIP_DLL STREQUAL "TRUE")
- set (HAVE_SZIP_DLL "1")
- endif (HAVE_SZIP_DLL STREQUAL "TRUE")
-
- # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
- set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
- set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
- #
- #############################################
-endif (SZIP_FOUND)
-
-if (FIND_SZIP_DEBUG)
- message (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
- message (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
- message (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
- message (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
- message (STATUS "HAVE_SZIP_DLL: ${HAVE_SZIP_DLL}")
- message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-endif (FIND_SZIP_DEBUG)
diff --git a/config/cmake/GetTimeOfDayTest.cpp b/config/cmake/GetTimeOfDayTest.cpp
deleted file mode 100644
index 3b5bf60..0000000
--- a/config/cmake/GetTimeOfDayTest.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#if defined (TRY_SYS_TIME_H)
-#include <sys/time.h>
-/* #include <time.h> */
-#endif
-
-
-#if defined (TRY_TIME_H)
-#include <time.h>
-#endif
-
-int main(int argc, char **argv) {
- struct timeval t1;
- gettimeofday(&t1, 0x00);
- return 0;
-}
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index ca9e262..70dc206 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -460,6 +460,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine H5_HAVE_UNISTD_H @H5_HAVE_UNISTD_H@
+/* Define to 1 if you have the `asprintf' function. */
+#cmakedefine H5_HAVE_ASPRINTF @H5_HAVE_ASPRINTF@
+
/* Define to 1 if you have the `vasprintf' function. */
#cmakedefine H5_HAVE_VASPRINTF @H5_HAVE_VASPRINTF@
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/HDF5CXXTests.cpp b/config/cmake/HDF5CXXTests.cpp
deleted file mode 100644
index 7003cc8..0000000
--- a/config/cmake/HDF5CXXTests.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-
-#ifdef OLD_HEADER_FILENAME
-
-#include <iostream>
-
-int main(void) { return 0; }
-
-#endif
-
-
-#ifdef H5_NO_NAMESPACE
-
-namespace H5 {
-int fnord;
-}
-
-int main(void) {
- using namespace H5;
- fnord = 37;
- return 0;
-}
-
-#endif
-
-#ifdef H5_NO_STD
-
-#include <string>
-
-using namespace std;
-
-int main(void) {
- string myString("testing namespace std");
- return 0;
-}
-
-#endif
-
-#ifdef BOOL_NOTDEFINED
-int main(void) {
- bool flag;
- return 0;
-}
-
-#endif
-
-#ifdef NO_STATIC_CAST
-
-int main(void) {
- float test_float;
- int test_int;
- test_float = 37.0;
- test_int = static_cast <int> (test_float);
- return 0;
-}
-
-#endif
diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c
deleted file mode 100644
index 355c06f..0000000
--- a/config/cmake/HDF5Tests.c
+++ /dev/null
@@ -1,479 +0,0 @@
-#define SIMPLE_TEST(x) int main(){ x; return 0; }
-
-#ifdef HAVE_C99_DESIGNATED_INITIALIZER
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int
-main ()
-{
-
- typedef struct
- {
- int x;
- union
- {
- int i;
- double d;
- }u;
- }di_struct_t;
- di_struct_t x =
- { 0,
- { .d = 0.0}};
- ;
- return 0;
-}
-
-#endif
-
-#ifdef HAVE_C99_FUNC
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
- const char *fname = __func__;
- ;
- return 0;
-}
-
-#endif
-
-#ifdef VSNPRINTF_WORKS
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-int test_vsnprintf(const char *fmt,...)
-{
- va_list ap;
- char *s = malloc(16);
- int ret;
-
- va_start(ap, fmt);
- ret=vsnprintf(s,16,"%s",ap);
- va_end(ap);
-
- return(ret!=42 ? 1 : 0);
-}
-
-int main(void)
-{
- return(test_vsnprintf("%s","A string that is longer than 16 characters"));
-}
-#endif
-
-
-#ifdef TIME_WITH_SYS_TIME
-/* Time with sys/time test */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-
-#endif
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-int main() { return 0; }
-#endif /* STDC_HEADERS */
-
-#ifdef HAVE_TM_ZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_zone);
-
-#endif /* HAVE_TM_ZONE */
-
-#ifdef HAVE_STRUCT_TM_TM_ZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_zone);
-
-#endif /* HAVE_STRUCT_TM_TM_ZONE */
-
-#ifdef HAVE_ATTRIBUTE
-
-#if 0
-static void test int __attribute((unused)) var)
-{
- int __attribute__((unused)) x = var;
-}
-
-int main(void)
-{
- test(19);
-}
-
-#else
-int
-main ()
-{
-int __attribute__((unused)) x
- ;
- return 0;
-}
-#endif
-
-
-#endif /* HAVE_ATTRIBUTE */
-
-#ifdef HAVE_FUNCTION
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-(void)__FUNCTION__
- ;
- return 0;
-}
-
-#endif /* HAVE_FUNCTION */
-
-#ifdef HAVE_TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE___TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.__tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_TIMEZONE
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(timezone=0);
-
-#endif /* HAVE_TIMEZONE */
-
-#ifdef HAVE_STRUCT_TIMEZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct timezone tz; tz.tz_minuteswest=0);
-
-#endif /* HAVE_STRUCT_TIMEZONE */
-
-#ifdef HAVE_STAT_ST_BLOCKS
-
-#include <sys/stat.h>
-SIMPLE_TEST(struct stat sb; sb.st_blocks=0);
-
-#endif /* HAVE_STAT_ST_BLOCKS */
-
-#ifdef PRINTF_LL_WIDTH
-
-#ifdef HAVE_LONG_LONG
-# define LL_TYPE long long
-#else /* HAVE_LONG_LONG */
-# define LL_TYPE __int64
-#endif /* HAVE_LONG_LONG */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(void)
-{
- char *llwidthArgs[] = { "l64", "l", "L", "q", "ll", NULL };
- char *s = malloc(128);
- char **currentArg = NULL;
- LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
- for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++)
- {
- char formatString[64];
- sprintf(formatString, "%%%sd", *currentArg);
- sprintf(s, formatString, x);
- if (strcmp(s, "1099511627776") == 0)
- {
- printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg);
- return 0;
- }
- }
- return 1;
-}
-
-#endif /* PRINTF_LL_WIDTH */
-
-#ifdef SYSTEM_SCOPE_THREADS
-#include <stdlib.h>
-#include <pthread.h>
-
-int main(void)
-{
- pthread_attr_t attribute;
- int ret;
-
- pthread_attr_init(&attribute);
- ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
- if (ret==0)
- return 0;
- return 1;
-}
-
-#endif /* SYSTEM_SCOPE_THREADS */
-
-#ifdef HAVE_SOCKLEN_T
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-SIMPLE_TEST(socklen_t foo);
-
-#endif /* HAVE_SOCKLEN_T */
-
-#ifdef DEV_T_IS_SCALAR
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-int main ()
-{
- dev_t d1, d2;
- if(d1==d2)
- return 0;
- return 1;
-}
-
-#endif /* DEV_T_IS_SCALAR */
-
-#ifdef HAVE_OFF64_T
-#include <sys/types.h>
-int main()
-{
- off64_t n = 0;
- return (int)n;
-}
-#endif
-
-#ifdef HAVE_STAT64_STRUCT
-#include <sys/types.h>
-#include <sys/stat.h>],
-struct stat64 sb;
-int main()
-{
- return 0;
-}
-#endif
-
-#ifdef TEST_DIRECT_VFD_WORKS
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-int main(void)
-{
- int fid;
- if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0)
- return 1;
- close(fid);
- remove("tst_file");
- return 0;
-}
-#endif
-
-#ifdef HAVE_DIRECT
- SIMPLE_TEST(posix_memalign());
-#endif
-
-#ifdef TEST_LFS_WORKS
-/* Return 0 when LFS is available and 1 otherwise. */
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _LARGE_FILES
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <assert.h>
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
- /* check that off_t can hold 2^63 - 1 and perform basic operations... */
-#define OFF_T_64 (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- if (OFF_T_64 % 2147483647 != 1)
- return 1;
-
- /* stat breaks on SCO OpenServer */
- struct stat buf;
- stat( argv[0], &buf );
- if (!S_ISREG(buf.st_mode))
- return 2;
-
- FILE *file = fopen( argv[0], "r" );
- off_t offset = ftello( file );
- fseek( file, offset, SEEK_CUR );
- fclose( file );
- return 0;
-}
-#endif
-
-#ifdef GETTIMEOFDAY_GIVES_TZ
-#include <time.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-int main(void)
-{
- struct timeval tv;
- struct timezone tz;
- tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */
- tz.tz_dsttime = 7;
- gettimeofday(&tv, &tz);
- /* Check whether the function returned any value at all */
- if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7)
- return 1;
- else return 0;
-}
-#endif
-
-#ifdef LONE_COLON
-int main(int argc, char * argv)
-{
- return 0;
-}
-#endif
-
-#ifdef CXX_HAVE_OFFSETOF
-
-#include <stdio.h>
-#include <stddef.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int
-main ()
-{
-
- struct index_st
- {
- unsigned char type;
- unsigned char num;
- unsigned int len;
- };
- typedef struct index_st index_t;
- int x,y;
- x = offsetof(struct index_st, len);
- y = offsetof(index_t, num)
-
- ;
- return 0;
-}
-
-#endif
-
-#ifdef HAVE_IOEO
-
-#include <windows.h>
-typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
-int main ()
-{
- PGNSI pGNSI;
- pGNSI = (PGNSI) GetProcAddress(
- GetModuleHandle(TEXT("kernel32.dll")),
- "InitOnceExecuteOnce");
- if(NULL == pGNSI)
- return 1;
- else
- return 0;
-}
-
-#endif /* HAVE_IOEO */
-
-#ifdef HAVE_STRUCT_VIDEOCONFIG
-
-SIMPLE_TEST(struct videoconfig w; w.numtextcols=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_STRUCT_TEXT_INFO
-
-SIMPLE_TEST(struct text_info w; w.screenwidth=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-
-#if defined( INLINE_TEST_inline ) || defined( INLINE_TEST___inline__ ) || defined( INLINE_TEST___inline )
-#ifndef __cplusplus
-typedef int foo_t;
-static INLINE_TEST_INLINE foo_t static_foo () { return 0; }
-INLINE_TEST_INLINE foo_t foo () {return 0; }
-int main() { return 0; }
-#endif
-
-#endif /* INLINE_TEST */
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
deleted file mode 100644
index e65ea21..0000000
--- a/config/cmake/HDF5UseFortran.cmake
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-# This file provides functions for Fortran support.
-#
-#-------------------------------------------------------------------------------
-ENABLE_LANGUAGE (Fortran)
-
-#-----------------------------------------------------------------------------
-# Detect name mangling convention used between Fortran and C
-#-----------------------------------------------------------------------------
-include (FortranCInterface)
-FortranCInterface_HEADER (
- ${CMAKE_BINARY_DIR}/FCMangle.h
- MACRO_NAMESPACE "H5_FC_"
- SYMBOL_NAMESPACE "H5_FC_"
- SYMBOLS mysub mymod:my_sub
-)
-
-file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)")
-string (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
-set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}")
-
-file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)")
-string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
-set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
-
-#-----------------------------------------------------------------------------
-# The provided CMake Fortran macros don't provide a general check function
-# so this one is used for a sizeof test.
-#-----------------------------------------------------------------------------
-MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- if (NOT DEFINED ${VARIABLE})
- message (STATUS "Testing Fortran ${FUNCTION}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif (CMAKE_REQUIRED_LIBRARIES)
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
- "${CODE}"
- )
- TRY_COMPILE (${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
-
-# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# message ( "Test result ${OUTPUT}")
-# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-
- if (${VARIABLE})
- set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n"
- )
- else (${VARIABLE})
- message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- endif (${VARIABLE})
- endif (NOT DEFINED ${VARIABLE})
-ENDMACRO (CHECK_FORTRAN_FEATURE)
-
-#-----------------------------------------------------------------------------
-# Configure Checks which require Fortran compilation must go in here
-# not in the main ConfigureChecks.cmake files, because if the user has
-# no Fortran compiler, problems arise.
-#
-# Be careful with leading spaces here, do not remove them.
-#-----------------------------------------------------------------------------
-CHECK_FORTRAN_FEATURE(sizeof
- "
- PROGRAM main
- i = sizeof(x)
- END PROGRAM
- "
- FORTRAN_HAVE_SIZEOF
-)
-
-CHECK_FORTRAN_FEATURE(RealIsNotDouble
- "
- MODULE type_mod
- INTERFACE h5t
- MODULE PROCEDURE h5t_real
- MODULE PROCEDURE h5t_dble
- END INTERFACE
- CONTAINS
- SUBROUTINE h5t_real(r)
- REAL :: r
- END SUBROUTINE h5t_real
- SUBROUTINE h5t_dble(d)
- DOUBLE PRECISION :: d
- END SUBROUTINE h5t_dble
- END MODULE type_mod
- PROGRAM main
- USE type_mod
- REAL :: r
- DOUBLE PRECISION :: d
- CALL h5t(r)
- CALL h5t(d)
- END PROGRAM main
- "
- FORTRAN_DEFAULT_REAL_NOT_DOUBLE
-)
-
-#-----------------------------------------------------------------------------
-# Checks if the ISO_C_BINDING module meets all the requirements
-#-----------------------------------------------------------------------------
-CHECK_FORTRAN_FEATURE(iso_c_binding
- "
- PROGRAM main
- USE iso_c_binding
- IMPLICIT NONE
- TYPE(C_PTR) :: ptr
- TYPE(C_FUNPTR) :: funptr
- INTEGER(C_INT64_T) :: c_int64_type
- CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
- ptr = C_LOC(ichr(1:1))
- END PROGRAM
- "
- FORTRAN_HAVE_ISO_C_BINDING
-)
-
-#-----------------------------------------------------------------------------
-# Add debug information (intel Fortran : JB)
-#-----------------------------------------------------------------------------
-if (CMAKE_Fortran_COMPILER MATCHES ifort)
- if (WIN32)
- set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
- set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
- endif (WIN32)
-endif (CMAKE_Fortran_COMPILER MATCHES ifort)
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
deleted file mode 100644
index 505a9d5..0000000
--- a/config/cmake/HDFLibMacros.cmake
+++ /dev/null
@@ -1,350 +0,0 @@
-#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
- # May need to build JPEG with PIC on x64 machines with gcc
- # Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
-
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (JPEG
- SVN_REPOSITORY ${JPEG_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (JPEG
- URL ${JPEG_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
- endif (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_GET_PROPERTY (JPEG BINARY_DIR SOURCE_DIR)
-
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (JPEG_LIB_NAME "jpeg_D")
- else (WIN32)
- set (JPEG_LIB_NAME "jpeg_debug")
- endif (WIN32)
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- set (JPEG_LIB_NAME "jpeg")
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
-
- # Create imported target szip
- ADD_LIBRARY(jpeg ${libtype} IMPORTED)
- ADD_DEPENDENCIES (jpeg JPEG)
-
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- if (MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}.lib"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- endif (MINGW)
- else (WIN32)
- if (CYGWIN)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (CYGWIN)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${JPEG_VERSION_STRING}"
- SOVERSION "${JPEG_VERSION_STRING}"
- )
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- else (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
-
-# include (${BINARY_DIR}/JPEG-targets.cmake)
- set (JPEG_LIBRARY "jpeg")
-
- set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
- set (JPEG_FOUND 1)
- set (JPEG_LIBRARIES ${JPEG_LIBRARY})
- set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_JPEG_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (PACKAGE_JPEG_LIBRARY compress_type)
- ADD_CUSTOM_TARGET (JPEG-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${JPEG_INCLUDE_DIR_GEN}/jconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
- if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
- ADD_DEPENDENCIES (JPEG-GenHeader-Copy JPEG)
- endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_JPEG_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (SZIP
- SVN_REPOSITORY ${SZIP_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (SZIP
- URL ${SZIP_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
- endif (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_GET_PROPERTY (SZIP BINARY_DIR SOURCE_DIR)
-
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (SZIP_LIB_NAME "szip_D")
- else (WIN32)
- set (SZIP_LIB_NAME "szip_debug")
- endif (WIN32)
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- set (SZIP_LIB_NAME "szip")
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
-
- # Create imported target szip
- ADD_LIBRARY(szip ${libtype} IMPORTED)
- ADD_DEPENDENCIES (szip SZIP)
-
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- if (MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}.lib"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- endif (MINGW)
- else (WIN32)
- if (CYGWIN)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (CYGWIN)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${SZIP_VERSION_STRING}"
- SOVERSION "${SZIP_VERSION_STRING}"
- )
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- else (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
-
-# include (${BINARY_DIR}/SZIP-targets.cmake)
- set (SZIP_LIBRARY "szip")
-
- set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
- set (SZIP_FOUND 1)
- set (SZIP_LIBRARIES ${SZIP_LIBRARY})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_SZIP_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (PACKAGE_SZIP_LIBRARY compress_type)
- ADD_CUSTOM_TARGET (SZIP-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
- if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
- ADD_DEPENDENCIES (SZIP-GenHeader-Copy SZIP)
- endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_SZIP_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (ZLIB
- SVN_REPOSITORY ${ZLIB_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (ZLIB
- URL ${ZLIB_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
- endif (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR)
-
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (ZLIB_LIB_NAME "zlib_D")
- else (WIN32)
- set (ZLIB_LIB_NAME "z_debug")
- endif (WIN32)
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (ZLIB_LIB_NAME "zlib")
- else (WIN32)
- set (ZLIB_LIB_NAME "z")
- endif (WIN32)
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
-
- # Create imported target szip
- ADD_LIBRARY(zlib ${libtype} IMPORTED)
- ADD_DEPENDENCIES (zlib ZLIB)
-
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- if (MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}.lib"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- endif (MINGW)
- else (WIN32)
- if (CYGWIN)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (CYGWIN)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- IMPORTED_SONAME "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${ZLIB_VERSION_STRING}"
- SOVERSION "${ZLIB_VERSION_STRING}"
- )
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- else (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
-
-# include (${BINARY_DIR}/ZLIB-targets.cmake)
- set (ZLIB_LIBRARY "zlib")
-
- set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
- set (ZLIB_FOUND 1)
- set (ZLIB_LIBRARIES ${ZLIB_LIBRARY})
- set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_ZLIB_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (PACKAGE_ZLIB_LIBRARY compress_type)
- ADD_CUSTOM_TARGET (ZLIB-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
- if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
- ADD_DEPENDENCIES (ZLIB-GenHeader-Copy ZLIB)
- endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_ZLIB_LIBRARY)
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
deleted file mode 100644
index 56fdf83..0000000
--- a/config/cmake/HDFMacros.cmake
+++ /dev/null
@@ -1,187 +0,0 @@
-#-------------------------------------------------------------------------------
-MACRO (SET_GLOBAL_VARIABLE name value)
- set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE)
-ENDMACRO (SET_GLOBAL_VARIABLE)
-
-#-------------------------------------------------------------------------------
-MACRO (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
- #set(source_group_path "Source/AIM/${NAME}")
- string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH})
- source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
-
- #-- The following is needed if we ever start to use OS X Frameworks but only
- #-- works on CMake 2.6 and greater
- #set_property (SOURCE ${HEADERS}
- # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
- #)
-ENDMACRO (IDE_GENERATED_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
- # install (FILES ${HEADERS}
- # DESTINATION include/R3D/${NAME}
- # COMPONENT Headers
- # )
-
- string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} )
- source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
-
- #-- The following is needed if we ever start to use OS X Frameworks but only
- #-- works on CMake 2.6 and greater
- #set_property (SOURCE ${HEADERS}
- # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
- #)
-ENDMACRO (IDE_SOURCE_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_NAMING libtarget libtype)
- if (WIN32)
- if (${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}dll")
- endif (${libtype} MATCHES "SHARED")
- endif (WIN32)
-ENDMACRO (TARGET_NAMING)
-
-#-------------------------------------------------------------------------------
-MACRO (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
- if (WIN32 AND MSVC)
- get_target_property (target_name ${libtarget} RELWITHDEBINFO_OUTPUT_NAME)
- install (
- FILES
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb
- DESTINATION
- ${targetdestination}
- CONFIGURATIONS RelWithDebInfo
- COMPONENT ${targetcomponent}
- )
- endif (WIN32 AND MSVC)
-ENDMACRO (INSTALL_TARGET_PDB)
-
-#-------------------------------------------------------------------------------
-MACRO (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
- if (WIN32 AND MSVC)
- get_target_property (target_name ${progtarget} RELWITHDEBINFO_OUTPUT_NAME)
- get_target_property (target_prefix ${progtarget} PREFIX)
- install (
- FILES
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${target_prefix}${target_name}.pdb
- DESTINATION
- ${targetdestination}
- CONFIGURATIONS RelWithDebInfo
- COMPONENT ${targetcomponent}
- )
- endif (WIN32 AND MSVC)
-ENDMACRO (INSTALL_PROGRAM_PDB)
-
-#-------------------------------------------------------------------------------
-MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype)
- # message (STATUS "${libname} libtype: ${libtype}")
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}_D")
- else (WIN32)
- set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}_debug")
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32)
- set (LIB_RELEASE_NAME "lib${libname}")
- set (LIB_DEBUG_NAME "lib${libname}_D")
- else (WIN32)
- # if the generator supports configuration types or if the CMAKE_BUILD_TYPE has a value
- if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}_debug")
- else (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (LIB_RELEASE_NAME "lib${libname}")
- set (LIB_DEBUG_NAME "lib${libname}_debug")
- endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- endif (WIN32)
- endif (${libtype} MATCHES "SHARED")
-
- set_target_properties (${libtarget}
- PROPERTIES
- DEBUG_OUTPUT_NAME ${LIB_DEBUG_NAME}
- RELEASE_OUTPUT_NAME ${LIB_RELEASE_NAME}
- MINSIZEREL_OUTPUT_NAME ${LIB_RELEASE_NAME}
- RELWITHDEBINFO_OUTPUT_NAME ${LIB_RELEASE_NAME}
- )
-
- #----- Use MSVC Naming conventions for Shared Libraries
- if (MINGW AND ${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget}
- PROPERTIES
- IMPORT_SUFFIX ".lib"
- IMPORT_PREFIX ""
- PREFIX ""
- )
- endif (MINGW AND ${libtype} MATCHES "SHARED")
-
-ENDMACRO (HDF_SET_LIB_OPTIONS)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_C_PROPERTIES wintarget addcompileflags addlinkflags)
- if (MSVC)
- TARGET_MSVC_PROPERTIES (${wintarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- else (MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- else (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- endif (BUILD_SHARED_LIBS)
- endif (MSVC)
-ENDMACRO (TARGET_C_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_MSVC_PROPERTIES wintarget addcompileflags addlinkflags)
- if (MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- else (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- endif (BUILD_SHARED_LIBS)
- endif (MSVC)
-ENDMACRO (TARGET_MSVC_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_FORTRAN_PROPERTIES forttarget addcompileflags addlinkflags)
- if (WIN32)
- TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- endif (WIN32)
-ENDMACRO (TARGET_FORTRAN_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_FORTRAN_WIN_PROPERTIES forttarget addcompileflags addlinkflags)
- if (MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (${forttarget}
- PROPERTIES
- COMPILE_FLAGS "/dll ${addcompileflags}"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
- )
- else (BUILD_SHARED_LIBS)
- set_target_properties (${forttarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
- )
- endif (BUILD_SHARED_LIBS)
- endif (MSVC)
-ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES)
diff --git a/config/cmake/NSIS.InstallOptions.ini.in b/config/cmake/NSIS.InstallOptions.ini.in
deleted file mode 100644
index 83ca053..0000000
--- a/config/cmake/NSIS.InstallOptions.ini.in
+++ /dev/null
@@ -1,37 +0,0 @@
-[Settings]
-NumFields=5
-
-[Field 1]
-Type=label
-Text=By default @CPACK_PACKAGE_INSTALL_DIRECTORY@ does add its directory to the system PATH.
-Left=0
-Right=-1
-Top=0
-Bottom=20
-
-[Field 2]
-Type=radiobutton
-Text=Do not add @CPACK_PACKAGE_NAME@ to the system PATH
-Left=0
-Right=-1
-Top=30
-Bottom=40
-State=0
-
-[Field 3]
-Type=radiobutton
-Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for all users
-Left=0
-Right=-1
-Top=40
-Bottom=50
-State=1
-
-[Field 4]
-Type=radiobutton
-Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for current user
-Left=0
-Right=-1
-Top=50
-Bottom=60
-State=0
diff --git a/config/cmake/NSIS.template.in b/config/cmake/NSIS.template.in
deleted file mode 100644
index ecced05..0000000
--- a/config/cmake/NSIS.template.in
+++ /dev/null
@@ -1,974 +0,0 @@
-; CPack install script designed for a nmake build
-
-;--------------------------------
-; You must define these values
-
- !define VERSION "@CPACK_PACKAGE_VERSION@"
- !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
- !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
-
-;--------------------------------
-;Variables
-
- Var MUI_TEMP
- Var STARTMENU_FOLDER
- Var SV_ALLUSERS
- Var START_MENU
- Var DO_NOT_ADD_TO_PATH
- Var ADD_TO_PATH_ALL_USERS
- Var ADD_TO_PATH_CURRENT_USER
- Var INSTALL_DESKTOP
- Var IS_DEFAULT_INSTALLDIR
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
- ;Default installation folder
- InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "@CPACK_NSIS_PACKAGE_NAME@"
- OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
-
- ;Set compression
- SetCompressor @CPACK_NSIS_COMPRESSOR@
-
-@CPACK_NSIS_DEFINES@
-
- !include Sections.nsh
-
-;--- Component support macros: ---
-; The code for the add/remove functionality is from:
-; http://nsis.sourceforge.net/Add/Remove_Functionality
-; It has been modified slightly and extended to provide
-; inter-component dependencies.
-Var AR_SecFlags
-Var AR_RegFlags
-@CPACK_NSIS_SECTION_SELECTED_VARS@
-
-; Loads the "selected" flag for the section named SecName into the
-; variable VarName.
-!macro LoadSectionSelectedIntoVar SecName VarName
- SectionGetFlags ${${SecName}} $${VarName}
- IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
-!macroend
-
-; Loads the value of a variable... can we get around this?
-!macro LoadVar VarName
- IntOp $R0 0 + $${VarName}
-!macroend
-
-; Sets the value of a variable
-!macro StoreVar VarName IntValue
- IntOp $${VarName} 0 + ${IntValue}
-!macroend
-
-!macro InitSection SecName
- ; This macro reads component installed flag from the registry and
- ;changes checked state of the section on the components page.
- ;Input: section index constant name specified in Section command.
-
- ClearErrors
- ;Reading component status from registry
- ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed"
- IfErrors "default_${SecName}"
- ;Status will stay default if registry value not found
- ;(component was never installed)
- IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
- SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
- IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
- IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
-
- ; Note whether this component was installed before
- !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
- IntOp $R0 $AR_RegFlags & $AR_RegFlags
-
- ;Writing modified flags
- SectionSetFlags ${${SecName}} $AR_SecFlags
-
- "default_${SecName}:"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-!macroend
-
-!macro FinishSection SecName
- ; This macro reads section flag set by user and removes the section
- ;if it is not selected.
- ;Then it writes component installed flag to registry
- ;Input: section index constant name specified in Section command.
-
- SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
- ;Checking lowest bit:
- IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
- IntCmp $AR_SecFlags 1 "leave_${SecName}"
- ;Section is not selected:
- ;Calling Section uninstall macro and writing zero installed flag
- !insertmacro "Remove_${${SecName}}"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
- "Installed" 0
- Goto "exit_${SecName}"
-
- "leave_${SecName}:"
- ;Section is selected:
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
- "Installed" 1
-
- "exit_${SecName}:"
-!macroend
-
-!macro RemoveSection_CPack SecName
- ; This macro is used to call section's Remove_... macro
- ;from the uninstaller.
- ;Input: section index constant name specified in Section command.
-
- !insertmacro "Remove_${${SecName}}"
-!macroend
-
-; Determine whether the selection of SecName changed
-!macro MaybeSelectionChanged SecName
- !insertmacro LoadVar ${SecName}_selected
- SectionGetFlags ${${SecName}} $R1
- IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
-
- ; See if the status has changed:
- IntCmp $R0 $R1 "${SecName}_unchanged"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-
- IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
- !insertmacro "Deselect_required_by_${SecName}"
- goto "${SecName}_unchanged"
-
- "${SecName}_was_selected:"
- !insertmacro "Select_${SecName}_depends"
-
- "${SecName}_unchanged:"
-!macroend
-;--- End of Add/Remove macros ---
-
-;--------------------------------
-;Interface Settings
-
- !define MUI_HEADERIMAGE
- !define MUI_ABORTWARNING
-
-;--------------------------------
-; path functions
-
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-
-;----------------------------------------
-; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
-;----------------------------------------
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-;====================================================
-; get_NT_environment
-; Returns: the selected environment
-; Output : head of the stack
-;====================================================
-!macro select_NT_profile UN
-Function ${UN}select_NT_profile
- StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
- DetailPrint "Selected environment for all users"
- Push "all"
- Return
- environment_single:
- DetailPrint "Selected environment for current user only."
- Push "current"
- Return
-FunctionEnd
-!macroend
-!insertmacro select_NT_profile ""
-!insertmacro select_NT_profile "un."
-;----------------------------------------------------
-!define NT_current_env 'HKCU "Environment"'
-!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
-
-!ifndef WriteEnvStr_RegKey
- !ifdef ALL_USERS
- !define WriteEnvStr_RegKey \
- 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
- !else
- !define WriteEnvStr_RegKey 'HKCU "Environment"'
- !endif
-!endif
-
-; AddToPath - Adds the given dir to the search path.
-; Input - head of the stack
-; Note - Win9x systems requires reboot
-
-Function AddToPath
- Exch $0
- Push $1
- Push $2
- Push $3
-
- # don't add if the path doesn't exist
- IfFileExists "$0\*.*" "" AddToPath_done
-
- ReadEnvStr $1 PATH
- ; if the path is too long for a NSIS variable NSIS will return a 0
- ; length string. If we find that, then warn and skip any path
- ; modification as it will trash the existing path.
- StrLen $2 $1
- IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done
- CheckPathLength_ShowPathWarning:
- Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!"
- Goto AddToPath_done
- CheckPathLength_Done:
- Push "$1;"
- Push "$0;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$0\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- GetFullPathName /SHORT $3 $0
- Push "$1;"
- Push "$3;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$3\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
-
- Call IsNT
- Pop $1
- StrCmp $1 1 AddToPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" a
- FileSeek $1 -1 END
- FileReadByte $1 $2
- IntCmp $2 26 0 +2 +2 # DOS EOF
- FileSeek $1 -1 END # write over EOF
- FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
- FileClose $1
- SetRebootFlag true
- Goto AddToPath_done
-
- AddToPath_NT:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey
- ReadRegStr $1 ${NT_current_env} "PATH"
- Goto DoTrim
- ReadAllKey:
- ReadRegStr $1 ${NT_all_env} "PATH"
- DoTrim:
- StrCmp $1 "" AddToPath_NTdoIt
- Push $1
- Call Trim
- Pop $1
- StrCpy $0 "$1;$0"
- AddToPath_NTdoIt:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey
- WriteRegExpandStr ${NT_current_env} "PATH" $0
- Goto DoSend
- WriteAllKey:
- WriteRegExpandStr ${NT_all_env} "PATH" $0
- DoSend:
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- AddToPath_done:
- Pop $3
- Pop $2
- Pop $1
- Pop $0
-FunctionEnd
-
-
-; RemoveFromPath - Remove a given dir from the path
-; Input: head of the stack
-
-Function un.RemoveFromPath
- Exch $0
- Push $1
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
-
- IntFmt $6 "%c" 26 # DOS EOF
-
- Call un.IsNT
- Pop $1
- StrCmp $1 1 unRemoveFromPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" r
- GetTempFileName $4
- FileOpen $2 $4 w
- GetFullPathName /SHORT $0 $0
- StrCpy $0 "SET PATH=%PATH%;$0"
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoop:
- FileRead $1 $3
- StrCpy $5 $3 1 -1 # read last char
- StrCmp $5 $6 0 +2 # if DOS EOF
- StrCpy $3 $3 -1 # remove DOS EOF so we can compare
- StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "" unRemoveFromPath_dosLoopEnd
- FileWrite $2 $3
- Goto unRemoveFromPath_dosLoop
- unRemoveFromPath_dosLoopRemoveLine:
- SetRebootFlag true
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoopEnd:
- FileClose $2
- FileClose $1
- StrCpy $1 $WINDIR 2
- Delete "$1\autoexec.bat"
- CopyFiles /SILENT $4 "$1\autoexec.bat"
- Delete $4
- Goto unRemoveFromPath_done
-
- unRemoveFromPath_NT:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey
- ReadRegStr $1 ${NT_current_env} "PATH"
- Goto unDoTrim
- unReadAllKey:
- ReadRegStr $1 ${NT_all_env} "PATH"
- unDoTrim:
- StrCpy $5 $1 1 -1 # copy last char
- StrCmp $5 ";" +2 # if last char != ;
- StrCpy $1 "$1;" # append ;
- Push $1
- Push "$0;"
- Call un.StrStr ; Find `$0;` in $1
- Pop $2 ; pos of our dir
- StrCmp $2 "" unRemoveFromPath_done
- ; else, it is in path
- # $0 - path to add
- # $1 - path var
- StrLen $3 "$0;"
- StrLen $4 $2
- StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
- StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
- StrCpy $3 $5$6
-
- StrCpy $5 $3 1 -1 # copy last char
- StrCmp $5 ";" 0 +2 # if last char == ;
- StrCpy $3 $3 -1 # remove last char
-
- StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey
- WriteRegExpandStr ${NT_current_env} "PATH" $3
- Goto unDoSend
- unWriteAllKey:
- WriteRegExpandStr ${NT_all_env} "PATH" $3
- unDoSend:
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- unRemoveFromPath_done:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Uninstall sutff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-###########################################
-# Utility Functions #
-###########################################
-
-;====================================================
-; IsNT - Returns 1 if the current system is NT, 0
-; otherwise.
-; Output: head of the stack
-;====================================================
-; IsNT
-; no input
-; output, top of the stack = 1 if NT or 0 if not
-;
-; Usage:
-; Call IsNT
-; Pop $R0
-; ($R0 at this point is 1 or 0)
-
-!macro IsNT un
-Function ${un}IsNT
- Push $0
- ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
- StrCmp $0 "" 0 IsNT_yes
- ; we are not NT.
- Pop $0
- Push 0
- Return
-
- IsNT_yes:
- ; NT!!!
- Pop $0
- Push 1
-FunctionEnd
-!macroend
-!insertmacro IsNT ""
-!insertmacro IsNT "un."
-
-; StrStr
-; input, top of stack = string to search for
-; top of stack-1 = string to search in
-; output, top of stack (replaces with the portion of the string remaining)
-; modifies no other variables.
-;
-; Usage:
-; Push "this is a long ass string"
-; Push "ass"
-; Call StrStr
-; Pop $R0
-; ($R0 at this point is "ass string")
-
-!macro StrStr un
-Function ${un}StrStr
-Exch $R1 ; st=haystack,old$R1, $R1=needle
- Exch ; st=old$R1,haystack
- Exch $R2 ; st=old$R1,old$R2, $R2=haystack
- Push $R3
- Push $R4
- Push $R5
- StrLen $R3 $R1
- StrCpy $R4 0
- ; $R1=needle
- ; $R2=haystack
- ; $R3=len(needle)
- ; $R4=cnt
- ; $R5=tmp
- loop:
- StrCpy $R5 $R2 $R3 $R4
- StrCmp $R5 $R1 done
- StrCmp $R5 "" done
- IntOp $R4 $R4 + 1
- Goto loop
-done:
- StrCpy $R1 $R2 "" $R4
- Pop $R5
- Pop $R4
- Pop $R3
- Pop $R2
- Exch $R1
-FunctionEnd
-!macroend
-!insertmacro StrStr ""
-!insertmacro StrStr "un."
-
-Function Trim ; Added by Pelaca
- Exch $R1
- Push $R2
-Loop:
- StrCpy $R2 "$R1" 1 -1
- StrCmp "$R2" " " RTrim
- StrCmp "$R2" "$\n" RTrim
- StrCmp "$R2" "$\r" RTrim
- StrCmp "$R2" ";" RTrim
- GoTo Done
-RTrim:
- StrCpy $R1 "$R1" -1
- Goto Loop
-Done:
- Pop $R2
- Exch $R1
-FunctionEnd
-
-Function ConditionalAddToRegisty
- Pop $0
- Pop $1
- StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
- WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \
- "$1" "$0"
- ;MessageBox MB_OK "Set Registry: '$1' to '$0'"
- DetailPrint "Set install registry entry: '$1' to '$0'"
- ConditionalAddToRegisty_EmptyString:
-FunctionEnd
-
-;--------------------------------
-
-!ifdef CPACK_USES_DOWNLOAD
-Function DownloadFile
- IfFileExists $INSTDIR\* +2
- CreateDirectory $INSTDIR
- Pop $0
-
- ; Skip if already downloaded
- IfFileExists $INSTDIR\$0 0 +2
- Return
-
- StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
-
- try_again:
- NSISdl::download "$1/$0" "$INSTDIR\$0"
-
- Pop $1
- StrCmp $1 "success" success
- StrCmp $1 "Cancelled" cancel
- MessageBox MB_OK "Download failed: $1"
- cancel:
- Return
- success:
-FunctionEnd
-!endif
-
-;--------------------------------
-; Installation types
-@CPACK_NSIS_INSTALLATION_TYPES@
-
-;--------------------------------
-; Component sections
-@CPACK_NSIS_COMPONENT_SECTIONS@
-
-;--------------------------------
-; Define some macro setting for the gui
-@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
-@CPACK_NSIS_INSTALLER_ICON_CODE@
-@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
-@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
-
-;--------------------------------
-;Pages
- !insertmacro MUI_PAGE_WELCOME
-
- !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
- Page custom InstallOptionsPage
- !insertmacro MUI_PAGE_DIRECTORY
-
- ;Start Menu Folder Page Configuration
- !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
- !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
- !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
- !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
-
- @CPACK_NSIS_PAGE_COMPONENTS@
-
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_PAGE_FINISH
-
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Languages
-
- !insertmacro MUI_LANGUAGE "English" ;first language is the default language
- !insertmacro MUI_LANGUAGE "Albanian"
- !insertmacro MUI_LANGUAGE "Arabic"
- !insertmacro MUI_LANGUAGE "Basque"
- !insertmacro MUI_LANGUAGE "Belarusian"
- !insertmacro MUI_LANGUAGE "Bosnian"
- !insertmacro MUI_LANGUAGE "Breton"
- !insertmacro MUI_LANGUAGE "Bulgarian"
- !insertmacro MUI_LANGUAGE "Croatian"
- !insertmacro MUI_LANGUAGE "Czech"
- !insertmacro MUI_LANGUAGE "Danish"
- !insertmacro MUI_LANGUAGE "Dutch"
- !insertmacro MUI_LANGUAGE "Estonian"
- !insertmacro MUI_LANGUAGE "Farsi"
- !insertmacro MUI_LANGUAGE "Finnish"
- !insertmacro MUI_LANGUAGE "French"
- !insertmacro MUI_LANGUAGE "German"
- !insertmacro MUI_LANGUAGE "Greek"
- !insertmacro MUI_LANGUAGE "Hebrew"
- !insertmacro MUI_LANGUAGE "Hungarian"
- !insertmacro MUI_LANGUAGE "Icelandic"
- !insertmacro MUI_LANGUAGE "Indonesian"
- !insertmacro MUI_LANGUAGE "Irish"
- !insertmacro MUI_LANGUAGE "Italian"
- !insertmacro MUI_LANGUAGE "Japanese"
- !insertmacro MUI_LANGUAGE "Korean"
- !insertmacro MUI_LANGUAGE "Kurdish"
- !insertmacro MUI_LANGUAGE "Latvian"
- !insertmacro MUI_LANGUAGE "Lithuanian"
- !insertmacro MUI_LANGUAGE "Luxembourgish"
- !insertmacro MUI_LANGUAGE "Macedonian"
- !insertmacro MUI_LANGUAGE "Malay"
- !insertmacro MUI_LANGUAGE "Mongolian"
- !insertmacro MUI_LANGUAGE "Norwegian"
- !insertmacro MUI_LANGUAGE "Polish"
- !insertmacro MUI_LANGUAGE "Portuguese"
- !insertmacro MUI_LANGUAGE "PortugueseBR"
- !insertmacro MUI_LANGUAGE "Romanian"
- !insertmacro MUI_LANGUAGE "Russian"
- !insertmacro MUI_LANGUAGE "Serbian"
- !insertmacro MUI_LANGUAGE "SerbianLatin"
- !insertmacro MUI_LANGUAGE "SimpChinese"
- !insertmacro MUI_LANGUAGE "Slovak"
- !insertmacro MUI_LANGUAGE "Slovenian"
- !insertmacro MUI_LANGUAGE "Spanish"
- !insertmacro MUI_LANGUAGE "Swedish"
- !insertmacro MUI_LANGUAGE "Thai"
- !insertmacro MUI_LANGUAGE "TradChinese"
- !insertmacro MUI_LANGUAGE "Turkish"
- !insertmacro MUI_LANGUAGE "Ukrainian"
- !insertmacro MUI_LANGUAGE "Welsh"
-
-
-;--------------------------------
-;Reserve Files
-
- ;These files should be inserted before other files in the data block
- ;Keep these lines before any File command
- ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
-
- ReserveFile "NSIS.InstallOptions.ini"
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-;Installer Sections
-
-Section "-Core installation"
- ;Use the entire tree produced by the INSTALL target. Keep the
- ;list of directories here in sync with the RMDir commands below.
- SetOutPath "$INSTDIR"
- @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
- @CPACK_NSIS_FULL_INSTALL@
-
- ;Store installation folder
- WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
-
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- Push "DisplayName"
- Push "@CPACK_NSIS_DISPLAY_NAME@"
- Call ConditionalAddToRegisty
- Push "DisplayVersion"
- Push "@CPACK_PACKAGE_VERSION@"
- Call ConditionalAddToRegisty
- Push "Publisher"
- Push "@CPACK_PACKAGE_VENDOR@"
- Call ConditionalAddToRegisty
- Push "UninstallString"
- Push "$INSTDIR\Uninstall.exe"
- Call ConditionalAddToRegisty
- Push "NoRepair"
- Push "1"
- Call ConditionalAddToRegisty
-
- !ifdef CPACK_NSIS_ADD_REMOVE
- ;Create add/remove functionality
- Push "ModifyPath"
- Push "$INSTDIR\AddRemove.exe"
- Call ConditionalAddToRegisty
- !else
- Push "NoModify"
- Push "1"
- Call ConditionalAddToRegisty
- !endif
-
- ; Optional registration
- Push "DisplayIcon"
- Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
- Call ConditionalAddToRegisty
- Push "HelpLink"
- Push "@CPACK_NSIS_HELP_LINK@"
- Call ConditionalAddToRegisty
- Push "URLInfoAbout"
- Push "@CPACK_NSIS_URL_INFO_ABOUT@"
- Call ConditionalAddToRegisty
- Push "Contact"
- Push "@CPACK_NSIS_CONTACT@"
- Call ConditionalAddToRegisty
- !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State"
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
- ;Create shortcuts
- CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
-@CPACK_NSIS_CREATE_ICONS@
-@CPACK_NSIS_CREATE_ICONS_EXTRA@
- CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
-
- ;Read a value from an InstallOptions INI file
- !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
- !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"
- !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"
-
- ; Write special uninstall registry entries
- Push "StartMenu"
- Push "$STARTMENU_FOLDER"
- Call ConditionalAddToRegisty
- Push "DoNotAddToPath"
- Push "$DO_NOT_ADD_TO_PATH"
- Call ConditionalAddToRegisty
- Push "AddToPathAllUsers"
- Push "$ADD_TO_PATH_ALL_USERS"
- Call ConditionalAddToRegisty
- Push "AddToPathCurrentUser"
- Push "$ADD_TO_PATH_CURRENT_USER"
- Call ConditionalAddToRegisty
- Push "InstallToDesktop"
- Push "$INSTALL_DESKTOP"
- Call ConditionalAddToRegisty
-
- !insertmacro MUI_STARTMENU_WRITE_END
-
-@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
-
-SectionEnd
-
-Section "-Add to path"
- Push $INSTDIR\bin
- StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
- StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
- Call AddToPath
- doNotAddToPath:
-SectionEnd
-
-;--------------------------------
-; Create custom pages
-Function InstallOptionsPage
- !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
-
-FunctionEnd
-
-;--------------------------------
-; determine admin versus local install
-Function un.onInit
-
- ClearErrors
- UserInfo::GetName
- IfErrors noLM
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Admin group'
- Goto done
- StrCmp $1 "Power" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Power Users group'
- Goto done
-
- noLM:
- ;Get installation folder from registry if available
-
- done:
-
-FunctionEnd
-
-;--- Add/Remove callback functions: ---
-!macro SectionList MacroName
- ;This macro used to perform operation on multiple sections.
- ;List all of your components in following manner here.
-@CPACK_NSIS_COMPONENT_SECTION_LIST@
-!macroend
-
-Section -FinishComponents
- ;Removes unselected components and writes component status to registry
- !insertmacro SectionList "FinishSection"
-
-!ifdef CPACK_NSIS_ADD_REMOVE
- ; Get the name of the installer executable
- System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
- StrCpy $R3 $R0
-
- ; Strip off the last 13 characters, to see if we have AddRemove.exe
- StrLen $R1 $R0
- IntOp $R1 $R0 - 13
- StrCpy $R2 $R0 13 $R1
- StrCmp $R2 "AddRemove.exe" addremove_installed
-
- ; We're not running AddRemove.exe, so install it
- CopyFiles $R3 $INSTDIR\AddRemove.exe
-
- addremove_installed:
-!endif
-SectionEnd
-;--- End of Add/Remove callback functions ---
-
-;--------------------------------
-; Component dependencies
-Function .onSelChange
- !insertmacro SectionList MaybeSelectionChanged
-FunctionEnd
-
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
- ReadRegStr $START_MENU SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"
- ;MessageBox MB_OK "Start menu is in: $START_MENU"
- ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath"
- ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers"
- ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser"
- ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
- ReadRegStr $INSTALL_DESKTOP SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop"
- ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
-
-@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
-
- ;Remove files we installed.
- ;Keep the list of directories here in sync with the File commands above.
-@CPACK_NSIS_DELETE_FILES@
-@CPACK_NSIS_DELETE_DIRECTORIES@
-
-!ifdef CPACK_NSIS_ADD_REMOVE
- ;Remove the add/remove program
- Delete "$INSTDIR\AddRemove.exe"
-!endif
-
- ;Remove the uninstaller itself.
- Delete "$INSTDIR\Uninstall.exe"
- DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- ;Remove the installation directory if it is empty.
- RMDir "$INSTDIR"
-
- ; Remove the registry entries.
- DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- ; Removes all optional components
- !insertmacro SectionList "RemoveSection_CPack"
-
- !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS@
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- startMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors startMenuDeleteLoopDone
-
- StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
- startMenuDeleteLoopDone:
-
- ; If the user changed the shortcut, then untinstall may not work. This should
- ; try to fix it.
- StrCpy $MUI_TEMP "$START_MENU"
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- secondStartMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors secondStartMenuDeleteLoopDone
-
- StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
- secondStartMenuDeleteLoopDone:
-
- DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- Push $INSTDIR\bin
- StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
- Call un.RemoveFromPath
- doNotRemoveFromPath:
-SectionEnd
-
-;--------------------------------
-; determine admin versus local install
-; Is install for "AllUsers" or "JustMe"?
-; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
-; This function is used for the very first "custom page" of the installer.
-; This custom page does not show up visibly, but it executes prior to the
-; first visible page and sets up $INSTDIR properly...
-; Choose different default installation folder based on SV_ALLUSERS...
-; "Program Files" for AllUsers, "My Documents" for JustMe...
-
-Function .onInit
- StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst
-
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString"
- StrCmp $0 "" inst
-
- MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \
- "@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \
- IDYES uninst IDNO inst
- Abort
-
-;Run the uninstaller
-uninst:
- ClearErrors
- StrLen $2 "\Uninstall.exe"
- StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path
- ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file
-
- IfErrors uninst_failed inst
-uninst_failed:
- MessageBox MB_OK|MB_ICONSTOP "Uninstall failed."
- Abort
-
-
-inst:
- ; Reads components status for registry
- !insertmacro SectionList "InitSection"
-
- ; check to see if /D has been used to change
- ; the install directory by comparing it to the
- ; install directory that is expected to be the
- ; default
- StrCpy $IS_DEFAULT_INSTALLDIR 0
- StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
- StrCpy $IS_DEFAULT_INSTALLDIR 1
-
- StrCpy $SV_ALLUSERS "JustMe"
- ; if default install dir then change the default
- ; if it is installed for JustMe
- StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
- ClearErrors
- UserInfo::GetName
- IfErrors noLM
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" 0 +4
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Admin group'
- StrCpy $SV_ALLUSERS "AllUsers"
- Goto done
- StrCmp $1 "Power" 0 +4
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Power Users group'
- StrCpy $SV_ALLUSERS "AllUsers"
- Goto done
-
- noLM:
- StrCpy $SV_ALLUSERS "AllUsers"
- ;Get installation folder from registry if available
-
- done:
- StrCmp $SV_ALLUSERS "AllUsers" 0 +3
- StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
- StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
-
- noOptionsPage:
-FunctionEnd
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..e8a5029 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/grepTest.cmake b/config/cmake/grepTest.cmake
deleted file mode 100644
index 579d855..0000000
--- a/config/cmake/grepTest.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-# grepTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-
-# arguments checking
-if (NOT TEST_PROGRAM)
- message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
- message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
-if (NOT TEST_FILTER)
- message (STATUS "Require TEST_FILTER to be defined")
-endif (NOT TEST_FILTER)
-if (NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_REFERENCE)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
- WORKING_DIRECTORY ${TEST_FOLDER}
- RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_OUTPUT}
- ERROR_FILE ${TEST_OUTPUT}.err
- OUTPUT_VARIABLE TEST_ERROR
- ERROR_VARIABLE TEST_ERROR
-)
-
-message (STATUS "COMMAND Result: ${TEST_RESULT}")
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-# now grep the output with the reference
-file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-
-# TEST_REFERENCE should always be matched
-STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
-STRING(COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
-if (${TEST_RESULT} STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
-endif (${TEST_RESULT} STREQUAL "0")
-
-STRING(REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
-if (${TEST_EXPECT} STREQUAL "1")
- # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
- STRING(LENGTH "${TEST_MATCH}" TEST_RESULT)
- if (NOT ${TEST_RESULT} STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
- endif (NOT ${TEST_RESULT} STREQUAL "0")
-endif (${TEST_EXPECT} STREQUAL "1")
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matched")
-
diff --git a/config/cmake/hdf.bmp b/config/cmake/hdf.bmp
deleted file mode 100644
index 9e9e4aa..0000000
--- a/config/cmake/hdf.bmp
+++ /dev/null
Binary files differ
diff --git a/config/cmake/hdf.icns b/config/cmake/hdf.icns
deleted file mode 100755
index 22afa2e..0000000
--- a/config/cmake/hdf.icns
+++ /dev/null
Binary files differ
diff --git a/config/cmake/hdf.ico b/config/cmake/hdf.ico
deleted file mode 100644
index 26abc96..0000000
--- a/config/cmake/hdf.ico
+++ /dev/null
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..2913f32 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -1,81 +1,82 @@
-# 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 (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 (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/cmake/prunTest.cmake b/config/cmake/prunTest.cmake
deleted file mode 100644
index 3d5ec31..0000000
--- a/config/cmake/prunTest.cmake
+++ /dev/null
@@ -1,145 +0,0 @@
-# runTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-cmake_policy(SET CMP0007 NEW)
-
-# arguments checking
-if (NOT TEST_PROGRAM)
- message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
- message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
-#if (NOT TEST_FILTER)
-# message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-set (ERROR_APPEND 1)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-if (TEST_ENV_VAR)
- set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
- WORKING_DIRECTORY ${TEST_FOLDER}
- RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_OUTPUT}
- ERROR_FILE ${TEST_OUTPUT}.err
- OUTPUT_VARIABLE TEST_ERROR
- ERROR_VARIABLE TEST_ERROR
-)
-
-message (STATUS "COMMAND Result: ${TEST_RESULT}")
-
-file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
-file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-
-if (ERROR_APPEND)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND)
-
-if (TEST_APPEND)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
-endif (TEST_APPEND)
-
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-if (TEST_MASK)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK)
-
-if (TEST_MASK_MOD)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_MOD)
-
-if (TEST_MASK_ERROR)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_ERROR)
-
-if (TEST_FILTER)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_FILTER)
-
-#if (TEST_REF_FILTER)
-# message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
-# file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
-# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
-# file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-#endif (TEST_REF_FILTER)
-
-if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
- endif (WIN32 AND NOT MINGW)
-
- # now compare the output with the reference
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/P_${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT ${TEST_RESULT} STREQUAL 0)
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- LIST (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref)
- LIST (LENGTH test_ref len_ref)
- if (NOT ${len_act} STREQUAL "0")
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- LIST (GET test_act ${line} str_act)
- LIST (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif (NOT "${str_act}" STREQUAL "")
- endif (NOT "${str_act}" STREQUAL "${str_ref}")
- endforeach (line RANGE 0 ${_FP_LEN})
- endif (NOT ${len_act} STREQUAL "0")
- if (NOT ${len_act} STREQUAL ${len_ref})
- set (TEST_RESULT 1)
- endif (NOT ${len_act} STREQUAL ${len_ref})
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
- # again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match P_${TEST_REFERENCE}")
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-endif (NOT TEST_SKIP_COMPARE)
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches P_${TEST_REFERENCE}")
-
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
deleted file mode 100644
index 879426c..0000000
--- a/config/cmake/runTest.cmake
+++ /dev/null
@@ -1,193 +0,0 @@
-# runTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-cmake_policy(SET CMP0007 NEW)
-
-# arguments checking
-if (NOT TEST_PROGRAM)
- message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
- message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-if (NOT TEST_EXPECT)
- message (STATUS "Require TEST_EXPECT to be defined")
-endif (NOT TEST_EXPECT)
-#if (NOT TEST_FILTER)
-# message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-if (NOT TEST_ERRREF)
- set (ERROR_APPEND 1)
-endif (NOT TEST_ERRREF)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-if (TEST_ENV_VAR)
- set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
- WORKING_DIRECTORY ${TEST_FOLDER}
- RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_OUTPUT}
- ERROR_FILE ${TEST_OUTPUT}.err
- OUTPUT_VARIABLE TEST_ERROR
- ERROR_VARIABLE TEST_ERROR
-)
-
-message (STATUS "COMMAND Result: ${TEST_RESULT}")
-
-if (ERROR_APPEND)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND)
-
-if (TEST_APPEND)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
-endif (TEST_APPEND)
-
-# if the return value is !=${TEST_EXPECT} bail out
-if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
-endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-if (TEST_MASK)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK)
-
-if (TEST_MASK_MOD)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_MOD)
-
-if (TEST_MASK_ERROR)
- if (NOT TEST_ERRREF)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- else (NOT TEST_ERRREF)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- endif (NOT TEST_ERRREF)
- STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- if (NOT TEST_ERRREF)
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
- else (NOT TEST_ERRREF)
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
- endif (NOT TEST_ERRREF)
-endif (TEST_MASK_ERROR)
-
-if (TEST_FILTER)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_FILTER)
-
-if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- endif (WIN32 AND NOT MINGW)
-
- # now compare the output with the reference
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT ${TEST_RESULT} STREQUAL 0)
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- LIST (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
- LIST (LENGTH test_ref len_ref)
- if (NOT ${len_act} STREQUAL "0")
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- LIST (GET test_act ${line} str_act)
- LIST (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif (NOT "${str_act}" STREQUAL "")
- endif (NOT "${str_act}" STREQUAL "${str_ref}")
- endforeach (line RANGE 0 ${_FP_LEN})
- endif (NOT ${len_act} STREQUAL "0")
- if (NOT ${len_act} STREQUAL ${len_ref})
- set (TEST_RESULT 1)
- endif (NOT ${len_act} STREQUAL ${len_ref})
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
- # again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- if (TEST_ERRREF)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
- endif (WIN32 AND NOT MINGW)
-
- # now compare the error output with the error reference
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT ${TEST_RESULT} STREQUAL 0)
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
- LIST (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
- LIST (LENGTH test_ref len_ref)
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- if (NOT ${len_act} STREQUAL "0")
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- LIST (GET test_act ${line} str_act)
- LIST (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif (NOT "${str_act}" STREQUAL "")
- endif (NOT "${str_act}" STREQUAL "${str_ref}")
- endforeach (line RANGE 0 ${_FP_LEN})
- endif (NOT ${len_act} STREQUAL "0")
- if (NOT ${len_act} STREQUAL ${len_ref})
- set (TEST_RESULT 1)
- endif (NOT ${len_act} STREQUAL ${len_ref})
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
- # again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
- message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
- endif (NOT ${TEST_RESULT} STREQUAL 0)
- endif (TEST_ERRREF)
-endif (NOT TEST_SKIP_COMPARE)
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
diff --git a/config/cmake/version.plist.in b/config/cmake/version.plist.in
deleted file mode 100644
index 817d89e..0000000
--- a/config/cmake/version.plist.in
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-
-<plist version="1.0">
-<dict>
- <key>BuildVersion</key>
- <string>@CPACK_PACKAGE_VERSION_MAJOR@</string>
- <key>CFBundleShortVersionString</key>
- <string>@CPACK_APPLE_GUI_SHORT_VERSION_STRING@</string>
- <key>CFBundleVersion</key>
- <string>@CPACK_APPLE_GUI_SHORT_VERSION_STRING@</string>
- <key>ProjectName</key>
- <string>@CPACK_APPLE_GUI_BUNDLE_NAME@</string>
- <key>SourceVersion</key>
- <string>@CPACK_PACKAGE_VERSION_MINOR@</string>
-</dict>
-</plist>
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/gnu-flags b/config/gnu-flags
index b965bf0..5f36eaa 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -186,10 +186,86 @@ esac
# the information from the previous version and adding modifications to that.
case "$cc_vendor-$cc_version" in
-# Closer to the gcc 4.9 release, we should check for additional flags to
+# Closer to the gcc 4.10 release, we should check for additional flags to
# include and break it out into it's own section, like the other versions
# below. -QAK
- gcc-4.[89]*)
+ gcc-4.9*)
+ # Replace -ansi flag with -std=c99 flag
+ H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+
+ # Append warning flags
+ # Don't use the '-Wtraditional' flag, we're way past having K&R C code
+ # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
+ # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
+ # from GCC's assert macro
+ # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CFLAGS="$H5_CFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc4.0+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format"
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wdate-time -Wopenmp-simd"
+
+ # Try out the new "stack protector" feature in gcc 4.1
+ # (Strictly speaking this isn't really a "warning" flag, so it's added to
+ # the debugging flags)
+ #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
+ ;;
+
+ gcc-4.8*)
# Replace -ansi flag with -std=c99 flag
H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
@@ -617,7 +693,7 @@ case "$cc_vendor-$cc_version" in
#DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
;;
- gcc-4.1*)
+ gcc-4.1.*)
# Replace -ansi flag with -std=c99 flag
H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
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..5537f6f 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 = 174
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 db75e19..4d3d90e 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.
+# Generated by GNU Autoconf 2.69 for HDF5 1.9.184.
#
# 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'
-PACKAGE_STRING='HDF5 1.9.176'
+PACKAGE_VERSION='1.9.184'
+PACKAGE_STRING='HDF5 1.9.184'
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 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.184 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:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.184:";;
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
+HDF5 configure 1.9.184
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, which was
+It was created by HDF5 $as_me 1.9.184, 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'
+ VERSION='1.9.184'
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
@@ -27303,7 +27284,7 @@ _ACEOF
fi
done
-for ac_func in tmpfile vasprintf waitpid
+for ac_func in tmpfile asprintf vasprintf waitpid
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -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
+HDF5 config.lt 1.9.184
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, which was
+This file was extended by HDF5 $as_me 1.9.184, 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
+HDF5 config.status 1.9.184
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index d8d2215..a20173d 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], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.184], [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
@@ -2205,7 +2197,7 @@ AC_CHECK_FUNCS([gethostname getpwuid getrusage lstat])
AC_CHECK_FUNCS([rand_r random setsysinfo])
AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask])
AC_CHECK_FUNCS([snprintf srandom strdup symlink system])
-AC_CHECK_FUNCS([tmpfile vasprintf waitpid])
+AC_CHECK_FUNCS([tmpfile asprintf vasprintf waitpid])
## Check for vsnprintf() separately, so we can detect situations where it
## doesn't return the correct size for formatted strings that are too large
@@ -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/CMakeLists.txt b/examples/CMakeLists.txt
index 0765b7b..a97b982 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_EXAMPLES)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Define Sources
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 53d125a..85668e9 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.
@@ -35,7 +39,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 \
h5_external_log_native_vol
-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
@@ -47,10 +52,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
h5_ref2reg.c h5_shared_mesg.c ph5example.c \
h5_external_log_native_vol.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 4172af8..d3a5975 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,
@@ -626,7 +628,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg \
h5_external_log_native_vol
-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
@@ -638,9 +641,6 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
h5_ref2reg.c h5_shared_mesg.c ph5example.c \
h5_external_log_native_vol.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.
@@ -1134,27 +1134,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/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 6f11895..322ae35 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -42,12 +42,12 @@ foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f90_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (f90_ex_${example} " " " ")
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
set_property (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
target_link_libraries (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -61,11 +61,11 @@ if (HDF5_ENABLE_F2003)
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (f03_ex_${example} " " " ")
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
set_property (TARGET f03_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
target_link_libraries (f03_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -79,12 +79,12 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example " " " ")
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
set_property (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
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/H5Pf.c b/fortran/src/H5Pf.c
index 98e5ff6..cd354c7 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -418,18 +418,18 @@ nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
/****if* H5Pf/h5pset_fill_value_c
* NAME
- * h5pset_fill_value_c
+ * h5pset_fill_value_c
* PURPOSE
- * Call H5Pset_fill_value to set a fillvalue for a dataset
+ * Call H5Pset_fill_value to set a fillvalue for a dataset
* INPUTS
- * prp_id - property list identifier
- * type_id - datatype identifier (fill value is of type type_id)
- * fillvalue - fillvalue
+ * prp_id - property list identifier
+ * type_id - datatype identifier (fill value is of type type_id)
+ * fillvalue - fillvalue
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* Elena Pourmal
- * Saturday, August 14, 1999
+ * Saturday, August 14, 1999
* SOURCE
*/
int_f
@@ -445,7 +445,7 @@ nh5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
* Call H5Pset_fill_value function.
*/
c_prp_id = (hid_t)*prp_id;
- c_type_id = (int)*type_id;
+ c_type_id = (hid_t)*type_id;
ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);
if (ret < 0) return ret_value;
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/H5_f.c b/fortran/src/H5_f.c
index dcfcfc4..05e525d 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -460,13 +460,13 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
/*
* H5FD flags of type hid_t
*/
- h5fd_hid_flags[0] = (int_f)H5FD_CORE;
- h5fd_hid_flags[1] = (int_f)H5FD_FAMILY;
- h5fd_hid_flags[2] = (int_f)H5FD_LOG;
- h5fd_hid_flags[3] = (int_f)H5FD_MPIO;
- h5fd_hid_flags[4] = (int_f)H5FD_MULTI;
- h5fd_hid_flags[5] = (int_f)H5FD_SEC2;
- h5fd_hid_flags[6] = (int_f)H5FD_STDIO;
+ h5fd_hid_flags[0] = (hid_t_f)H5FD_CORE;
+ h5fd_hid_flags[1] = (hid_t_f)H5FD_FAMILY;
+ h5fd_hid_flags[2] = (hid_t_f)H5FD_LOG;
+ h5fd_hid_flags[3] = (hid_t_f)H5FD_MPIO;
+ h5fd_hid_flags[4] = (hid_t_f)H5FD_MULTI;
+ h5fd_hid_flags[5] = (hid_t_f)H5FD_SEC2;
+ h5fd_hid_flags[6] = (hid_t_f)H5FD_STDIO;
/*
* H5G flags
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..7fa1861 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 = 174
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 42614ba..28b2ae1 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -23,7 +23,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
set (SHARED_LINK_FLAGS " ")
-if (WIN32 AND NOT CYGWIN)
+if (WIN32)
if (BUILD_SHARED_LIBS)
set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL)
if (MSVC)
@@ -31,7 +31,7 @@ if (WIN32 AND NOT CYGWIN)
endif (MSVC)
endif (BUILD_SHARED_LIBS)
set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS)
-endif (WIN32 AND NOT CYGWIN)
+endif (WIN32)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
@@ -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 " " " ")
@@ -82,10 +83,11 @@ set_target_properties (testhdf5_fortran PROPERTIES FOLDER test/fortran)
#-- Adding test for testhdf5_fortran_1_8
add_executable (testhdf5_fortran_1_8
fortranlib_test_1_8.f90
- tH5F.f90
tH5O.f90
tH5A_1_8.f90
tH5G_1_8.f90
+ tH5MISC_1_8.f90
+ tHDF5_1_8.f90
)
TARGET_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 " " " ")
@@ -104,13 +106,13 @@ set_target_properties (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran)
if (HDF5_ENABLE_F2003)
add_executable (fortranlib_test_F03
fortranlib_test_F03.f90
- tH5F.f90
tH5E_F03.f90
tH5F_F03.f90
tH5L_F03.f90
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 5b674db..6a9c535 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -5,22 +5,22 @@
##############################################################################
##############################################################################
-add_test (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
-SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+add_test (NAME FORTRAN_testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
+set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
#-- Adding test for testhdf5_fortran_1_8
-add_test (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
-SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+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")
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
- add_test (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
- SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+ 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")
endif (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
-add_test (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
+add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
#-- Adding test for fflush2
-add_test (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
-SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1)
+add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
+set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index ea58b2d..c0b5395 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 = 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 = 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..89db8f4 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,25 @@ 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 = 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) \
-@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.$(OBJEXT) \
+am__fortranlib_test_F03_SOURCES_DIST = 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@ 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 +559,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 +726,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 +745,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 = 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 = 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 +901,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 +979,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 +1301,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 +1353,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 +1375,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 +1420,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..039dc6c 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
@@ -57,10 +58,10 @@ PROGRAM fortranlibtest
ENDIF
WRITE(*,*)
- ret_total_error = 0
- CALL file_space("file_space_1_8",cleanup, ret_total_error)
- CALL write_test_status(ret_total_error, &
- ' Testing file free space', &
+ CALL h5eset_auto_f(0, ret_total_error)
+ IF(ret_total_error.NE.0) &
+ CALL write_test_status(ret_total_error, &
+ ' h5eset_auto_f', &
total_error)
ret_total_error = 0
@@ -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 a7a1f70..6b62aea 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..efc350e
--- /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), INT(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 f5fd041..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
@@ -395,7 +395,6 @@ SUBROUTINE test_h5p_file_image(total_error)
TYPE(C_PTR), DIMENSION(1:1) :: f_ptr2
! Initialize file image buffer
-
DO i = 1, count
buffer(i) = i*10
ENDDO
@@ -405,11 +404,11 @@ 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)
- CALL verify("h5pget_file_image_f", temp_size, 0, total_error)
+ CALL verify("h5pget_file_image_f", INT(temp_size), 0, total_error)
! Set file image
f_ptr = C_LOC(buffer(1))
@@ -427,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
@@ -452,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
@@ -548,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
@@ -576,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..9d1c3ec
--- /dev/null
+++ b/fortran/test/tHDF5_1_8.f90
@@ -0,0 +1,37 @@
+!****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 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/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake
index f418e1a..61085e6 100644
--- a/fortran/testpar/CMakeTests.cmake
+++ b/fortran/testpar/CMakeTests.cmake
@@ -4,4 +4,4 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-add_test (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
+add_test (NAME FORT_parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
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/CMakeLists.txt b/hl/CMakeLists.txt
index 22c0770..e693dd7 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Shared Libs
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/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake
index dc279e5..bac9fdf 100644
--- a/hl/c++/examples/CMakeTests.cmake
+++ b/hl/c++/examples/CMakeTests.cmake
@@ -6,11 +6,11 @@
##############################################################################
# Remove any output file left over from previous test run
add_test (
- NAME cpp_hl_ex_ptExampleFL-clear-objects
+ NAME HL_CPP_ex_ptExampleFL-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
PTcppexampleFL.h5
)
-add_test (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
-set_tests_properties (cpp_hl_ex_ptExampleFL PROPERTIES DEPENDS cpp_hl_ex_ptExampleFL-clear-objects)
+add_test (NAME HL_CPP_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
+set_tests_properties (HL_CPP_ex_ptExampleFL PROPERTIES DEPENDS HL_CPP_ex_ptExampleFL-clear-objects)
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..a0b19aa 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 = 174
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/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake
index 5386624..e36b5aa 100644
--- a/hl/c++/test/CMakeTests.cmake
+++ b/hl/c++/test/CMakeTests.cmake
@@ -5,4 +5,4 @@
##############################################################################
##############################################################################
- add_test (NAME hl_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
+ add_test (NAME HL_CPP_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
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/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index bc51183..8cf74d9 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -23,7 +23,7 @@ endforeach (h5_file ${HDF5_TEST_FILES})
# Remove any output file left over from previous test run
add_test (
- NAME hl_ex-clear-objects
+ NAME HL_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
ex_lite1.h5
@@ -47,14 +47,14 @@ endforeach (h5_file ${HDF5_TEST_FILES})
ex_ds1.h5
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (hl_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (HL_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
- set (last_test "hl_ex-clear-objects")
+ set (last_test "HL_ex-clear-objects")
foreach (example ${examples})
- add_test (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (hl_ex_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
- set (last_test "hl_ex_${example}")
+ set (last_test "HL_ex_${example}")
endforeach (example ${examples})
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/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 1784041..954a01b 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -6,5 +6,5 @@
##############################################################################
foreach (example ${examples})
- add_test (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
+ add_test (NAME HL_FORTRAN_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
endforeach (example ${examples})
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/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index a95873b..c5b2d57 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -49,7 +49,7 @@ set (HDF5_HL_F90_F_SRCS
add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
if (BUILD_SHARED_LIBS)
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
@@ -57,14 +57,14 @@ if (BUILD_SHARED_LIBS)
if (MSVC)
set (SHARED_LINK_FLAGS "/DLL")
endif (MSVC)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
endif (BUILD_SHARED_LIBS)
-if (WIN32 AND NOT CYGWIN)
+if (WIN32)
set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-endif (WIN32 AND NOT CYGWIN)
+endif (WIN32)
TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
@@ -78,7 +78,7 @@ set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-if (WIN32 AND NOT CYGWIN)
+if (WIN32)
install (
FILES
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5ds.mod
@@ -90,7 +90,7 @@ if (WIN32 AND NOT CYGWIN)
COMPONENT
fortheaders
)
-else (WIN32 AND NOT CYGWIN)
+else (WIN32)
install (
FILES
${CMAKE_Fortran_MODULE_DIRECTORY}/h5ds.mod
@@ -102,7 +102,7 @@ else (WIN32 AND NOT CYGWIN)
COMPONENT
fortheaders
)
-endif (WIN32 AND NOT CYGWIN)
+endif (WIN32)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
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..0431cef 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 = 174
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/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 94bb385..3676d24 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -7,7 +7,7 @@
# Remove any output file left over from previous test run
add_test (
- NAME hl_fortran_test-clear-objects
+ NAME HL_FORTRAN_test-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
dsetf1.h5
@@ -20,10 +20,14 @@ add_test (
tstds.h5
)
-add_test (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
+add_test (NAME HL_FORTRAN_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
+set_tests_properties (HL_FORTRAN_f90_tstds PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-add_test (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
+add_test (NAME HL_FORTRAN_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
+set_tests_properties (HL_FORTRAN_f90_tstlite PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-add_test (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
+add_test (NAME HL_FORTRAN_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
+set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-add_test (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
+add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
+set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
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/H5TB.c b/hl/src/H5TB.c
index 99860b8..2ed379a 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -27,14 +27,14 @@
*-------------------------------------------------------------------------
*/
-static int H5TB_find_field(const char *field,
+static hbool_t H5TB_find_field(const char *field,
const char *field_list);
static herr_t H5TB_attach_attributes(const char *table_title,
hid_t loc_id,
const char *dset_name,
hsize_t nfields,
- hid_t tid );
+ hid_t tid);
static hid_t H5TB_create_type(hid_t loc_id,
const char *dset_name,
@@ -64,13 +64,9 @@ static hid_t H5TB_create_type(hid_t loc_id,
*
* Comments:
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBmake_table( const char *table_title,
+herr_t H5TBmake_table(const char *table_title,
hid_t loc_id,
const char *dset_name,
hsize_t nfields,
@@ -82,86 +78,80 @@ herr_t H5TBmake_table( const char *table_title,
hsize_t chunk_size,
void *fill_data,
int compress,
- const void *buf )
+ const void *buf)
{
-
- hid_t did;
- hid_t sid;
- hid_t mem_type_id;
- hid_t plist_id;
+ hid_t did = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t plist_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
hsize_t dims[1];
hsize_t dims_chunk[1];
- hsize_t maxdims[1] = { H5S_UNLIMITED };
+ hsize_t maxdims[1] = {H5S_UNLIMITED};
char attr_name[255];
- char *member_name;
- hid_t attr_id;
- char aux[255];
+ char *member_name = NULL;
+ unsigned char *tmp_buf = NULL;
hsize_t i;
- unsigned char *tmp_buf;
+ herr_t ret_val = -1;
dims[0] = nrecords;
dims_chunk[0] = chunk_size;
/* create the memory data type. */
- if ((mem_type_id = H5Tcreate (H5T_COMPOUND, type_size )) < 0)
- return -1;
+ if((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ goto out;
/* insert fields. */
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++)
if(H5Tinsert(mem_type_id, field_names[i], field_offset[i], field_types[i] ) < 0)
- return -1;
- }
+ goto out;
/* create a simple data space with unlimited size */
- if ((sid = H5Screate_simple( 1, dims, maxdims )) < 0)
- return -1;
+ if((sid = H5Screate_simple(1, dims, maxdims)) < 0)
+ goto out;
/* modify dataset creation properties, i.e. enable chunking */
- plist_id = H5Pcreate(H5P_DATASET_CREATE);
- if (H5Pset_chunk(plist_id, 1, dims_chunk) < 0)
- return -1;
+ if((plist_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto out;
+ if(H5Pset_chunk(plist_id, 1, dims_chunk) < 0)
+ goto out;
/* set the fill value using a struct as the data type. */
- if (fill_data)
- {
+ if(fill_data)
if(H5Pset_fill_value(plist_id, mem_type_id, fill_data) < 0)
- return -1;
- }
+ goto out;
/*
dataset creation property list is modified to use
GZIP compression with the compression effort set to 6.
*/
- if (compress)
- {
+ if(compress)
if(H5Pset_deflate(plist_id, 6) < 0)
- return -1;
- }
+ goto out;
/* create the dataset. */
- if ((did = H5Dcreate2(loc_id, dset_name, mem_type_id, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT)) < 0)
+ if((did = H5Dcreate2(loc_id, dset_name, mem_type_id, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT)) < 0)
goto out;
/* only write if there is something to write */
- if (buf)
- {
- /* Write data to the dataset. */
- if (H5Dwrite( did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf ) < 0)
+ if(buf)
+ if(H5Dwrite(did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
- }
/* terminate access to the data space. */
- if (H5Sclose(sid) < 0)
+ if(H5Sclose(sid) < 0)
goto out;
+ sid = H5I_BADID;
/* end access to the dataset */
- if (H5Dclose(did) < 0)
+ if(H5Dclose(did) < 0)
goto out;
+ did = H5I_BADID;
/* end access to the property list */
- if (H5Pclose(plist_id) < 0)
+ if(H5Pclose(plist_id) < 0)
goto out;
+ plist_id = H5I_BADID;
/*-------------------------------------------------------------------------
* set the conforming table attributes
@@ -169,100 +159,97 @@ herr_t H5TBmake_table( const char *table_title,
*/
/* attach the CLASS attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, "CLASS", TABLE_CLASS ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, "CLASS", TABLE_CLASS) < 0)
goto out;
/* attach the VERSION attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, "VERSION", TABLE_VERSION ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, "VERSION", TABLE_VERSION) < 0)
goto out;
/* attach the TITLE attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, "TITLE", table_title ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, "TITLE", table_title) < 0)
goto out;
/* attach the FIELD_ name attribute */
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name( mem_type_id,(unsigned) i );
+ if(NULL == (member_name = H5Tget_member_name(mem_type_id, (unsigned)i)))
+ goto out;
- strcpy( attr_name, "FIELD_" );
- sprintf( aux, "%d", (int)i );
- strcat( attr_name, aux );
- sprintf( aux, "%s", "_NAME" );
- strcat( attr_name, aux );
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_NAME", (int)i);
/* attach the attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, attr_name, member_name ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, attr_name, member_name) < 0)
goto out;
- H5free_memory( member_name );
-
- }
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/* attach the FIELD_ fill value attribute */
- if (fill_data )
- {
-
- tmp_buf = (unsigned char *) fill_data;
+ if(fill_data) {
+ tmp_buf = (unsigned char *)fill_data;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
-
- if (( sid = H5Screate(H5S_SCALAR)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
- for ( i = 0; i < nfields; i++)
- {
-
- /* get the member name */
- member_name = H5Tget_member_name(mem_type_id, (unsigned)i);
+ if((sid = H5Screate(H5S_SCALAR)) < 0)
+ goto out;
- strcpy(attr_name, "FIELD_");
- sprintf(aux, "%d", (int)i);
- strcat(attr_name, aux);
- sprintf(aux, "%s", "_FILL");
- strcat(attr_name, aux);
+ for(i = 0; i < nfields; i++) {
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if ((attr_id = H5Acreate2(did, attr_name, field_types[i], sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr_id = H5Acreate2(did, attr_name, field_types[i], sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if (H5Awrite(attr_id, field_types[i], tmp_buf+field_offset[i]) < 0)
+ if(H5Awrite(attr_id, field_types[i], tmp_buf + field_offset[i]) < 0)
goto out;
- if (H5Aclose(attr_id) < 0)
+ if(H5Aclose(attr_id) < 0)
goto out;
-
- H5free_memory(member_name);
- }
+ attr_id = H5I_BADID;
+ } /* end for */
/* terminate access to the data space. */
- if (H5Sclose(sid) < 0)
+ if(H5Sclose(sid) < 0)
goto out;
+ sid = H5I_BADID;
/* end access to the dataset */
- if (H5Dclose(did) < 0)
+ if(H5Dclose(did) < 0)
goto out;
- }
+ did = H5I_BADID;
+ } /* end if */
/* release the datatype. */
- if (H5Tclose( mem_type_id ) < 0)
- return -1;
+ if(H5Tclose(mem_type_id) < 0)
+ goto out;
+ mem_type_id = H5I_BADID;
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY {
- H5Dclose(did);
- H5Sclose(sid);
- H5Pclose(plist_id);
- H5Tclose(mem_type_id);
- } H5E_END_TRY;
- return -1;
+ if(member_name)
+ H5free_memory(member_name);
+ if(attr_id > 0)
+ if(H5Aclose(attr_id) < 0)
+ ret_val = -1;
+ if(plist_id > 0)
+ if(H5Pclose(plist_id) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
-}
+ return ret_val;
+} /* end H5TBmake_table() */
/*-------------------------------------------------------------------------
*
@@ -286,70 +273,57 @@ out:
*
* Comments: Uses memory offsets
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define the memory type ID
-* returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBappend_records( hid_t loc_id,
+herr_t H5TBappend_records(hid_t loc_id,
const char *dset_name,
hsize_t nrecords,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- const void *buf )
+ const void *buf)
{
- hid_t did;
- hid_t tid=-1;
- hid_t mem_type_id=-1;
- hid_t sid=-1;
- hid_t m_sid=-1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
hsize_t nrecords_orig;
hsize_t nfields;
+ herr_t ret_val = -1;
/* get the original number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords_orig ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords_orig) < 0)
+ goto out;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatypes */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid)) < 0)
+ if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
goto out;
/* append the records */
- if ((H5TB_common_append_records(did, mem_type_id, (size_t)nrecords, nrecords_orig, buf)) < 0)
- goto out;
-
- /* close */
- if (H5Tclose( tid ) < 0)
- return -1;
- if (H5Tclose( mem_type_id ) < 0)
- goto out;
- if (H5Dclose( did ) < 0)
+ if((H5TB_common_append_records(did, mem_type_id, (size_t)nrecords, nrecords_orig, buf)) < 0)
goto out;
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Tclose(mem_type_id);
- H5Tclose(tid);
- H5Sclose(m_sid);
- H5Sclose(sid);
- } H5E_END_TRY;
- return -1;
-}
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBappend_records() */
/*-------------------------------------------------------------------------
* Function: H5TBwrite_records
@@ -364,96 +338,85 @@ out:
*
* Comments: Uses memory offsets
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define the memory type ID
-* returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBwrite_records( hid_t loc_id,
+herr_t H5TBwrite_records(hid_t loc_id,
const char *dset_name,
hsize_t start,
hsize_t nrecords,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- const void *buf )
+ const void *buf)
{
-
- hid_t did;
- hid_t tid;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
hsize_t count[1];
hsize_t offset[1];
- hid_t sid=-1;
- hid_t m_sid=-1;
hsize_t mem_size[1];
hsize_t dims[1];
- hid_t mem_type_id=-1;
+ herr_t ret_val = -1;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid)) < 0)
+ if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
goto out;
/* get the dataspace handle */
- if ((sid = H5Dget_space( did )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* get records */
- if (H5Sget_simple_extent_dims( sid, dims, NULL) < 0)
+ if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
- if (start + nrecords > dims[0] )
+ if(start + nrecords > dims[0])
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0)
- goto out;
-
- if (H5Dwrite( did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf ) < 0)
+ if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- /* close */
- if (H5Sclose( m_sid ) < 0)
- goto out;
- if (H5Sclose( sid ) < 0)
+ if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- if (H5Tclose( tid ) < 0)
- goto out;
- if (H5Tclose( mem_type_id ) < 0)
- return -1;
- if (H5Dclose( did ) < 0)
- return -1;
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Tclose(mem_type_id);
- H5Tclose(tid);
- H5Sclose(m_sid);
- H5Sclose(sid);
- } H5E_END_TRY;
- return -1;
-}
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBwrite_records() */
/*-------------------------------------------------------------------------
* Function: H5TBwrite_fields_name
@@ -468,12 +431,9 @@ out:
*
* Comments:
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define a memory type ID
-*
*-------------------------------------------------------------------------
*/
-herr_t H5TBwrite_fields_name( hid_t loc_id,
+herr_t H5TBwrite_fields_name(hid_t loc_id,
const char *dset_name,
const char *field_names,
hsize_t start,
@@ -481,147 +441,139 @@ herr_t H5TBwrite_fields_name( hid_t loc_id,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- const void *buf )
+ const void *buf)
{
- hid_t did;
- hid_t tid=-1;
- hid_t write_type_id=-1;
- hid_t member_type_id;
- hid_t nmtype_id;
- hsize_t count[1];
- hsize_t offset[1];
- hid_t m_sid=-1;
- hid_t file_space_id=-1;
- char *member_name;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t file_space_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
hssize_t nfields;
hssize_t i, j;
- hid_t preserve_id;
+ hsize_t count[1];
+ hsize_t offset[1];
+ char *member_name = NULL;
size_t size_native;
+ herr_t ret_val = -1;
/* create xfer properties to preserve initialized data */
- if ((preserve_id = H5Pcreate (H5P_DATASET_XFER)) < 0)
- return -1;
- if (H5Pset_preserve (preserve_id, 1) < 0)
- return -1;
+ if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto out;
+ if(H5Pset_preserve(preserve_id, 1) < 0)
+ goto out;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* get the number of fields */
- if (( nfields = H5Tget_nmembers( tid )) < 0)
+ if((nfields = H5Tget_nmembers(tid)) < 0)
goto out;
/* create a write id */
- if (( write_type_id = H5Tcreate( H5T_COMPOUND, type_size )) < 0)
+ if((write_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
j = 0;
- /* iterate tru the members */
- for ( i = 0; i < nfields; i++)
- {
+ /* iterate though the members */
+ for(i = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name( tid, (unsigned)i );
-
- if(H5TB_find_field( member_name, field_names ) > 0 )
- {
+ if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
+ goto out;
+ if(H5TB_find_field(member_name, field_names)) {
/* get the member type */
- if(( member_type_id = H5Tget_member_type( tid,(unsigned) i )) < 0)
+ if((member_type_id = H5Tget_member_type(tid, (unsigned)i)) < 0)
goto out;
/* convert to native type */
- if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
+ if((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- size_native=H5Tget_size(nmtype_id);
+ if(0 == (size_native = H5Tget_size(nmtype_id)))
+ goto out;
/* adjust, if necessary */
- if (field_sizes[j]!=size_native)
- {
- if (H5Tset_size(nmtype_id, field_sizes[j]) < 0)
+ if(field_sizes[j] != size_native)
+ if(H5Tset_size(nmtype_id, field_sizes[j]) < 0)
goto out;
- }
/* the field in the file is found by its name */
- if (field_offset )
- {
- if (H5Tinsert( write_type_id, member_name, field_offset[j], nmtype_id ) < 0)
+ if(field_offset) {
+ if(H5Tinsert(write_type_id, member_name, field_offset[j], nmtype_id) < 0)
goto out;
- }
+ } /* end if */
/* only one field */
- else
- {
- if (H5Tinsert( write_type_id, member_name, (size_t)0, nmtype_id ) < 0)
+ else {
+ if(H5Tinsert(write_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
- }
+ } /* end else */
j++;
/* close */
- if(H5Tclose( member_type_id ) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
- if(H5Tclose( nmtype_id ) < 0)
+ member_type_id = H5I_BADID;
+ if(H5Tclose(nmtype_id) < 0)
goto out;
- }
-
- H5free_memory( member_name );
+ nmtype_id = H5I_BADID;
+ } /* end if */
- }
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/* get the dataspace handle */
- if ((file_space_id = H5Dget_space( did )) < 0)
+ if((file_space_id = H5Dget_space(did)) < 0)
goto out;
- if ((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
+ if((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* write */
- if (H5Dwrite( did, write_type_id, m_sid, file_space_id, preserve_id, buf ) < 0)
+ if(H5Dwrite(did, write_type_id, m_sid, file_space_id, preserve_id, buf) < 0)
goto out;
- /* close */
- if(H5Tclose( write_type_id ) )
- goto out;
- if(H5Tclose( tid ) < 0)
- return -1;
- if(H5Dclose( did ) < 0)
- return -1;
- if(H5Pclose( preserve_id ) < 0)
- return -1;
- if(H5Sclose( file_space_id ) < 0)
- return -1;
- if(H5Sclose( m_sid ) < 0)
- return -1;
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Pclose(preserve_id);
- H5Dclose(did);
- H5Sclose(file_space_id);
- H5Sclose(m_sid);
- H5Tclose(write_type_id);
- H5Tclose(tid);
- } H5E_END_TRY;
- return -1;
-
-}
-
+ if(member_name)
+ H5free_memory(member_name);
+ if(preserve_id > 0)
+ if(H5Pclose(preserve_id) < 0)
+ ret_val = -1;
+ if(write_type_id > 0)
+ if(H5Tclose(write_type_id) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(file_space_id > 0)
+ if(H5Sclose(file_space_id) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+ return ret_val;
+} /* end H5TBwrite_fields_name() */
/*-------------------------------------------------------------------------
* Function: H5TBwrite_fields_index
@@ -636,14 +588,9 @@ out:
*
* Comments: Uses memory offsets
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define a memory type ID
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBwrite_fields_index( hid_t loc_id,
+herr_t H5TBwrite_fields_index(hid_t loc_id,
const char *dset_name,
hsize_t nfields,
const int *field_index,
@@ -652,43 +599,43 @@ herr_t H5TBwrite_fields_index( hid_t loc_id,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- const void *buf )
+ const void *buf)
{
- hid_t did;
- hid_t tid=-1;
- hid_t write_type_id=-1;
- hid_t member_type_id;
- hid_t nmtype_id;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t file_space_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
hsize_t count[1];
hsize_t offset[1];
- hid_t m_sid=-1;
- hid_t file_space_id=-1;
- char *member_name;
hsize_t i;
- hid_t preserve_id;
size_t size_native;
+ char *member_name = NULL;
+ herr_t ret_val = -1;
/* create xfer properties to preserve initialized data */
- if ((preserve_id = H5Pcreate (H5P_DATASET_XFER)) < 0)
- return -1;
- if (H5Pset_preserve (preserve_id, 1) < 0)
- return -1;
+ if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto out;
+ if(H5Pset_preserve(preserve_id, 1) < 0)
+ goto out;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* create a write id */
- if (( write_type_id = H5Tcreate( H5T_COMPOUND, type_size )) < 0)
+ if((write_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* iterate tru the members */
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++) {
unsigned j;
/* Range check value */
@@ -698,91 +645,95 @@ herr_t H5TBwrite_fields_index( hid_t loc_id,
j = (unsigned)field_index[i];
/* get the member name */
- member_name = H5Tget_member_name( tid, j );
+ if(NULL == (member_name = H5Tget_member_name(tid, j)))
+ goto out;
/* get the member type */
- if (( member_type_id = H5Tget_member_type( tid, j )) < 0)
+ if((member_type_id = H5Tget_member_type(tid, j)) < 0)
goto out;
/* convert to native type */
- if ((nmtype_id = H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
+ if((nmtype_id = H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
goto out;
- size_native = H5Tget_size(nmtype_id);
+ if(0 == (size_native = H5Tget_size(nmtype_id)))
+ goto out;
- if (field_sizes[i]!=size_native)
- {
- if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
+ if(field_sizes[i] != size_native)
+ if(H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
- }
/* the field in the file is found by its name */
- if ( field_offset )
- {
- if (H5Tinsert( write_type_id, member_name, field_offset[ i ], nmtype_id ) < 0)
+ if(field_offset) {
+ if(H5Tinsert(write_type_id, member_name, field_offset[i], nmtype_id) < 0)
goto out;
- }
+ } /* end if */
/* only one field */
- else
- {
- if (H5Tinsert( write_type_id, member_name, (size_t)0, nmtype_id ) < 0)
+ else {
+ if(H5Tinsert(write_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
- }
+ } /* end else */
+
/* close */
- if(H5Tclose( member_type_id ) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
- if(H5Tclose( nmtype_id ) < 0)
+ member_type_id = H5I_BADID;
+ if(H5Tclose(nmtype_id) < 0)
goto out;
+ nmtype_id = H5I_BADID;
- H5free_memory( member_name );
-
- }
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/* get the dataspace handles */
- if ((file_space_id = H5Dget_space( did )) < 0)
+ if((file_space_id = H5Dget_space(did)) < 0)
goto out;
- if ((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
+ if((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* write */
- if (H5Dwrite( did, write_type_id, m_sid, file_space_id, preserve_id, buf ) < 0)
+ if(H5Dwrite(did, write_type_id, m_sid, file_space_id, preserve_id, buf) < 0)
goto out;
- /* close */
- if (H5Tclose( write_type_id ) )
- goto out;
- if (H5Tclose( tid ) < 0)
- return -1;
- if (H5Dclose( did ) < 0)
- return -1;
- if (H5Pclose( preserve_id ) < 0)
- return -1;
- if (H5Sclose( file_space_id ) < 0)
- return -1;
- if (H5Sclose( m_sid ) < 0)
- return -1;
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Pclose(preserve_id);
- H5Dclose(did);
- H5Sclose(file_space_id);
- H5Sclose(m_sid);
- H5Tclose(write_type_id);
- H5Tclose(tid);
- } H5E_END_TRY;
- return -1;
-}
+ if(member_name)
+ H5free_memory(member_name);
+ if(preserve_id > 0)
+ if(H5Pclose(preserve_id) < 0)
+ ret_val = -1;
+ if(write_type_id > 0)
+ if(H5Tclose(write_type_id) < 0)
+ ret_val = -1;
+ if(member_type_id > 0)
+ if(H5Tclose(member_type_id) < 0)
+ ret_val = -1;
+ if(nmtype_id > 0)
+ if(H5Tclose(nmtype_id) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(file_space_id > 0)
+ if(H5Sclose(file_space_id) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBwrite_fields_index() */
/*-------------------------------------------------------------------------
@@ -806,71 +757,63 @@ out:
*
* Comments:
*
-* Modifications: April 1, 2004
-* used a memory type ID returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBread_table( hid_t loc_id,
+herr_t H5TBread_table(hid_t loc_id,
const char *dset_name,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- void *dst_buf )
+ void *dst_buf)
{
- hid_t did;
- hid_t ftype_id=-1;
- hid_t mem_type_id=-1;
- hid_t sid;
+ hid_t did = H5I_BADID;
+ hid_t ftype_id = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
hsize_t dims[1];
+ herr_t ret_val = -1;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get the dataspace handle */
- if ((sid = H5Dget_space( did )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* get dimensions */
- if (H5Sget_simple_extent_dims( sid, dims, NULL) < 0)
+ if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* get the datatypes */
- if ((ftype_id=H5Dget_type (did)) < 0)
+ if((ftype_id = H5Dget_type (did)) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,ftype_id)) < 0)
+ if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, ftype_id)) < 0)
goto out;
/* read */
- if (H5Dread( did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, dst_buf) < 0)
- goto out;
-
- /* close */
- if (H5Tclose( ftype_id ) < 0)
- goto out;
- if (H5Tclose( mem_type_id ) < 0)
- goto out;
- if (H5Sclose( sid ) < 0)
+ if(H5Dread(did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, dst_buf) < 0)
goto out;
- if (H5Dclose( did ) < 0)
- return -1;
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Tclose(mem_type_id);
- H5Tclose(ftype_id);
- H5Sclose(sid);
- } H5E_END_TRY;
- return -1;
-}
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(ftype_id > 0)
+ if(H5Tclose(ftype_id) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBread_table() */
/*-------------------------------------------------------------------------
* Function: H5TBread_records
@@ -885,74 +828,58 @@ out:
*
* Comments:
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define the memory type ID
-* returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBread_records( hid_t loc_id,
+herr_t H5TBread_records(hid_t loc_id,
const char *dset_name,
hsize_t start,
hsize_t nrecords,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- void *buf )
+ void *buf)
{
-
- hid_t did;
- hid_t ftype_id;
- hid_t mem_type_id=-1;
- hid_t sid=-1;
- hid_t m_sid=-1;
+ hid_t did = H5I_BADID;
+ hid_t ftype_id = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
hsize_t nrecords_orig;
hsize_t nfields;
+ herr_t ret_val = -1;
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords_orig ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords_orig) < 0)
+ goto out;
/* open the dataset */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get the datatypes */
- if ((ftype_id = H5Dget_type( did )) < 0)
+ if((ftype_id = H5Dget_type(did)) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,ftype_id)) < 0)
+ if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, ftype_id)) < 0)
goto out;
/* read the records */
- if ((H5TB_common_read_records(did, mem_type_id, start, (size_t)nrecords, nrecords_orig, buf)) < 0)
+ if((H5TB_common_read_records(did, mem_type_id, start, (size_t)nrecords, nrecords_orig, buf)) < 0)
goto out;
- /* close */
- if (H5Tclose( ftype_id ) < 0)
- return -1;
- if (H5Tclose( mem_type_id ) < 0)
- return -1;
- if (H5Dclose( did ) < 0)
- return -1;
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY {
- H5Dclose(did);
- H5Tclose(mem_type_id);
- H5Tclose(ftype_id);
- H5Sclose(m_sid);
- H5Sclose(sid);
- } H5E_END_TRY;
- return -1;
-
-}
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(ftype_id > 0)
+ if(H5Tclose(ftype_id) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+ return ret_val;
+} /* end H5TBread_records() */
/*-------------------------------------------------------------------------
* Function: H5TBread_fields_name
@@ -967,15 +894,9 @@ out:
*
* Comments:
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define the memory type ID
-* returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBread_fields_name( hid_t loc_id,
+herr_t H5TBread_fields_name(hid_t loc_id,
const char *dset_name,
const char *field_names,
hsize_t start,
@@ -983,132 +904,134 @@ herr_t H5TBread_fields_name( hid_t loc_id,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- void *buf )
+ void *buf)
{
-
- hid_t did;
- hid_t ftype_id=-1;
- hid_t mem_type_id=-1;
- hid_t mtype_id;
- hid_t nmtype_id;
- char *member_name;
+ hid_t did = H5I_BADID;
+ hid_t ftype_id = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t mtype_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
hssize_t nfields;
hsize_t count[1];
hsize_t offset[1];
- hid_t sid=-1;
- hid_t m_sid=-1;
hsize_t mem_size[1];
size_t size_native;
+ char *member_name = NULL;
hssize_t i, j;
+ herr_t ret_val = -1;
/* open the dataset */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if ((ftype_id = H5Dget_type( did )) < 0)
+ if((ftype_id = H5Dget_type(did)) < 0)
goto out;
/* get the number of fields */
- if (( nfields = H5Tget_nmembers( ftype_id )) < 0)
+ if((nfields = H5Tget_nmembers(ftype_id)) < 0)
goto out;
/* create a memory read id */
- if (( mem_type_id = H5Tcreate( H5T_COMPOUND, type_size )) < 0)
+ if((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* iterate tru the members */
- for ( i=0,j=0; i<nfields; i++)
- {
+ for(i = 0, j = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name( ftype_id, (unsigned)i );
+ if(NULL == (member_name = H5Tget_member_name(ftype_id, (unsigned)i)))
+ goto out;
- if(H5TB_find_field( member_name, field_names ) > 0 )
- {
+ if(H5TB_find_field(member_name, field_names)) {
/* get the member type */
- if (( mtype_id = H5Tget_member_type( ftype_id, (unsigned) i )) < 0)
+ if((mtype_id = H5Tget_member_type(ftype_id, (unsigned)i)) < 0)
goto out;
/* convert to native type */
- if ((nmtype_id=H5Tget_native_type(mtype_id,H5T_DIR_DEFAULT)) < 0)
+ if((nmtype_id = H5Tget_native_type(mtype_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- size_native=H5Tget_size(nmtype_id);
+ if(0 == (size_native = H5Tget_size(nmtype_id)))
+ goto out;
- if (field_sizes[j]!=size_native)
- {
- if (H5Tset_size(nmtype_id, field_sizes[j]) < 0)
+ if(field_sizes[j] != size_native)
+ if(H5Tset_size(nmtype_id, field_sizes[j]) < 0)
goto out;
- }
+
/* the field in the file is found by its name */
- if(field_offset )
- {
- if(H5Tinsert( mem_type_id, member_name, field_offset[j], nmtype_id ) < 0)
+ if(field_offset) {
+ if(H5Tinsert(mem_type_id, member_name, field_offset[j], nmtype_id) < 0)
goto out;
- }
- else
- {
- if(H5Tinsert( mem_type_id, member_name, (size_t)0, nmtype_id ) < 0)
+ } /* end if */
+ else {
+ if(H5Tinsert(mem_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
- }
+ } /* end else */
/* close */
- if(H5Tclose( mtype_id ) < 0)
+ if(H5Tclose(mtype_id) < 0)
goto out;
- if(H5Tclose( nmtype_id ) < 0)
+ mtype_id = H5I_BADID;
+ if(H5Tclose(nmtype_id) < 0)
goto out;
+ nmtype_id = H5I_BADID;
j++;
- }
- H5free_memory( member_name );
- }
+ } /* end if */
+
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/* get the dataspace handle */
- if ((sid = H5Dget_space( did )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0)
+ if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
/* read */
- if (H5Dread( did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf ) < 0)
+ if(H5Dread(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- /* close */
- if (H5Tclose( mem_type_id ) )
- goto out;
- if (H5Tclose( ftype_id ) < 0)
- return -1;
- if (H5Sclose( sid ) < 0)
- goto out;
- if (H5Sclose( m_sid ) < 0)
- goto out;
- if (H5Dclose( did ) < 0)
- return -1;
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Tclose(mem_type_id);
- H5Tclose(ftype_id);
- H5Sclose(m_sid);
- H5Sclose(sid);
- } H5E_END_TRY;
- return -1;
-
-}
+ if(member_name)
+ H5free_memory(member_name);
+ if(mtype_id > 0)
+ if(H5Tclose(mtype_id) < 0)
+ ret_val = -1;
+ if(nmtype_id > 0)
+ if(H5Tclose(nmtype_id) < 0)
+ ret_val = -1;
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(ftype_id > 0)
+ if(H5Tclose(ftype_id) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+ return ret_val;
+} /* end H5TBread_fields_name() */
/*-------------------------------------------------------------------------
* Function: H5TBread_fields_index
@@ -1123,15 +1046,9 @@ out:
*
* Comments:
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define the memory type ID
-* returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBread_fields_index( hid_t loc_id,
+herr_t H5TBread_fields_index(hid_t loc_id,
const char *dset_name,
hsize_t nfields,
const int *field_index,
@@ -1140,38 +1057,37 @@ herr_t H5TBread_fields_index( hid_t loc_id,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- void *buf )
+ void *buf)
{
-
- hid_t did;
- hid_t tid=-1;
- hid_t read_type_id=-1;
- hid_t member_type_id;
- hid_t nmtype_id;
- char *member_name;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t read_type_id = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
hsize_t count[1];
- hsize_t offset[1];
- hid_t sid=-1;
- hid_t m_sid=-1;
+ hsize_t offset[1];
hsize_t mem_size[1];
- size_t size_native;
hsize_t i;
+ size_t size_native;
+ char *member_name = NULL;
+ herr_t ret_val = -1;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* create a read id */
- if (( read_type_id = H5Tcreate( H5T_COMPOUND, type_size )) < 0)
+ if((read_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* iterate tru the members */
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++) {
unsigned j;
/* Range check */
@@ -1181,95 +1097,94 @@ herr_t H5TBread_fields_index( hid_t loc_id,
j = (unsigned)field_index[i];
/* get the member name */
- member_name = H5Tget_member_name( tid, j );
-
- /* get the member type */
- if (( member_type_id = H5Tget_member_type( tid, j )) < 0)
+ if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)j)))
goto out;
- /* get the member size */
- if (H5Tget_size( member_type_id ) == 0 )
+ /* get the member type */
+ if((member_type_id = H5Tget_member_type(tid, (unsigned)j)) < 0)
goto out;
/* convert to native type */
- if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
+ if((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- size_native=H5Tget_size(nmtype_id);
+ if(0 == (size_native = H5Tget_size(nmtype_id)))
+ goto out;
- if (field_sizes[i]!=size_native)
- {
- if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
+ if(field_sizes[i] != size_native)
+ if(H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
- }
/* the field in the file is found by its name */
- if (field_offset )
- {
- if(H5Tinsert( read_type_id, member_name, field_offset[i], nmtype_id ) < 0)
+ if(field_offset) {
+ if(H5Tinsert(read_type_id, member_name, field_offset[i], nmtype_id) < 0)
goto out;
- }
- else
- {
- if(H5Tinsert( read_type_id, member_name, (size_t)0, nmtype_id ) < 0)
+ } /* end if */
+ else {
+ if(H5Tinsert(read_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
- }
+ } /* end else */
/* close the member type */
- if (H5Tclose( member_type_id ) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
- if (H5Tclose( nmtype_id ) < 0)
+ member_type_id = H5I_BADID;
+ if(H5Tclose(nmtype_id) < 0)
goto out;
+ nmtype_id = H5I_BADID;
- H5free_memory( member_name );
- }
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/* get the dataspace handle */
- if ((sid = H5Dget_space( did )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0)
+ if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
/* read */
- if (H5Dread( did, read_type_id, m_sid, sid, H5P_DEFAULT, buf ) < 0)
- goto out;
-
- /* close */
- if (H5Sclose( sid ) < 0)
- goto out;
- if (H5Sclose( m_sid ) < 0)
+ if(H5Dread( did, read_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- if (H5Tclose( read_type_id ) )
- goto out;
- if (H5Tclose( tid ) < 0)
- return -1;
- if (H5Dclose( did ) < 0)
- return -1;
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Tclose(read_type_id);
- H5Tclose(tid);
- H5Sclose(m_sid);
- H5Sclose(sid);
- } H5E_END_TRY;
- return -1;
+ if(member_name)
+ H5free_memory(member_name);
+ if(read_type_id > 0)
+ if(H5Tclose(read_type_id) < 0)
+ ret_val = -1;
+ if(member_type_id > 0)
+ if(H5Tclose(member_type_id) < 0)
+ ret_val = -1;
+ if(nmtype_id > 0)
+ if(H5Tclose(nmtype_id) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
-}
+ return ret_val;
+} /* end H5TBread_fields_index() */
/*-------------------------------------------------------------------------
@@ -1290,34 +1205,31 @@ out:
*
* Date: November 26, 2001
*
-* Modifications: April 29, 2003
-*
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBdelete_record( hid_t loc_id,
+herr_t H5TBdelete_record(hid_t loc_id,
const char *dset_name,
hsize_t start,
- hsize_t nrecords )
+ hsize_t nrecords)
{
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
hsize_t nfields;
hsize_t ntotal_records;
hsize_t read_start;
hsize_t read_nrecords;
- hid_t did=-1;
- hid_t tid=-1;
- hid_t sid=-1;
- hid_t m_sid=-1;
- hid_t mem_type_id=-1;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
- unsigned char *tmp_buf=NULL;
- size_t src_size;
- size_t *src_offset = NULL;
- size_t *src_sizes = NULL;
hsize_t dims[1];
+ size_t src_size;
+ size_t *src_offset = NULL;
+ size_t *src_sizes = NULL;
+ unsigned char *tmp_buf = NULL;
+ herr_t ret_val = -1;
/*-------------------------------------------------------------------------
* first we get information about type size and offsets on disk
@@ -1325,7 +1237,7 @@ herr_t H5TBdelete_record( hid_t loc_id,
*/
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &ntotal_records ) < 0)
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
goto out;
if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
@@ -1334,11 +1246,11 @@ herr_t H5TBdelete_record( hid_t loc_id,
goto out;
/* get field info */
- if (H5TBget_field_info( loc_id, dset_name, NULL, src_sizes, src_offset, &src_size ) < 0)
+ if(H5TBget_field_info(loc_id, dset_name, NULL, src_sizes, src_offset, &src_size) < 0)
goto out;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1349,13 +1261,12 @@ herr_t H5TBdelete_record( hid_t loc_id,
read_start = start + nrecords;
read_nrecords = ntotal_records - read_start;
- if ( read_nrecords )
- {
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t) read_nrecords, src_size )))
+ if(read_nrecords) {
+ if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, src_size)))
goto out;
/* read the records after the deleted one(s) */
- if (H5TBread_records( loc_id, dset_name, read_start, read_nrecords, src_size, src_offset, src_sizes, tmp_buf ) < 0)
+ if(H5TBread_records(loc_id, dset_name, read_start, read_nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1364,66 +1275,56 @@ herr_t H5TBdelete_record( hid_t loc_id,
*/
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* get the dataspace handle */
- if ((sid = H5Dget_space( did )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* create the memory data type. */
- if ((mem_type_id=H5TB_create_type( loc_id, dset_name, src_size, src_offset, src_sizes, tid)) < 0)
+ if((mem_type_id = H5TB_create_type( loc_id, dset_name, src_size, src_offset, src_sizes, tid)) < 0)
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start;
count[0] = read_nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0)
+ if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if (H5Dwrite( did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf ) < 0)
+ if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/* close */
- if (H5Sclose( m_sid ) < 0)
+ if(H5Sclose(m_sid) < 0)
goto out;
- if (H5Tclose( mem_type_id ) < 0)
+ m_sid = H5I_BADID;
+ if(H5Tclose(mem_type_id) < 0)
goto out;
- if (H5Sclose( sid ) < 0)
+ mem_type_id = H5I_BADID;
+ if(H5Sclose(sid) < 0)
goto out;
- if (H5Tclose( tid ) < 0)
+ sid = H5I_BADID;
+ if(H5Tclose(tid) < 0)
goto out;
-
+ tid = H5I_BADID;
} /* read_nrecords */
-
/*-------------------------------------------------------------------------
* change the dataset dimension
*-------------------------------------------------------------------------
*/
dims[0] = ntotal_records - nrecords;
- if (H5Dset_extent( did, dims ) < 0)
- goto out;
-
- /* close dataset */
- if (H5Dclose( did ) < 0)
+ if(H5Dset_extent(did, dims) < 0)
goto out;
- if(tmp_buf)
- HDfree(tmp_buf);
- if(src_offset)
- HDfree(src_offset);
- if(src_sizes)
- HDfree(src_sizes);
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
if(tmp_buf)
HDfree(tmp_buf);
@@ -1431,16 +1332,24 @@ out:
HDfree(src_offset);
if(src_sizes)
HDfree(src_sizes);
- H5E_BEGIN_TRY
- {
- H5Tclose(mem_type_id);
- H5Dclose(did);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Sclose(m_sid);
- } H5E_END_TRY;
- return -1;
-}
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBdelete_record() */
/*-------------------------------------------------------------------------
* Function: H5TBinsert_record
@@ -1455,37 +1364,31 @@ out:
*
* Comments: Uses memory offsets
*
-* Modifications: April 1, 2004
-* the FIELD_SIZES parameter is used to define the memory type ID
-* returned by H5TB_create_type
-*
*-------------------------------------------------------------------------
*/
-
-
-herr_t H5TBinsert_record( hid_t loc_id,
+herr_t H5TBinsert_record(hid_t loc_id,
const char *dset_name,
hsize_t start,
hsize_t nrecords,
size_t type_size,
const size_t *field_offset,
const size_t *field_sizes,
- void *buf )
+ void *buf)
{
-
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
hsize_t nfields;
hsize_t ntotal_records;
hsize_t read_nrecords;
- hid_t did;
- hid_t tid=-1;
- hid_t mem_type_id=-1;
hsize_t count[1];
hsize_t offset[1];
- hid_t sid=-1;
- hid_t m_sid=-1;
hsize_t dims[1];
hsize_t mem_dims[1];
- unsigned char *tmp_buf;
+ unsigned char *tmp_buf = NULL;
+ herr_t ret_val = -1;
/*-------------------------------------------------------------------------
* read the records after the inserted one(s)
@@ -1493,32 +1396,33 @@ herr_t H5TBinsert_record( hid_t loc_id,
*/
/* get the dimensions */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &ntotal_records ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
+ goto out;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* create the memory data type. */
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid)) < 0)
+ if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
goto out;
read_nrecords = ntotal_records - start;
- tmp_buf = (unsigned char *)HDcalloc((size_t) read_nrecords, type_size);
+ if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t) read_nrecords, type_size)))
+ goto out;
/* read the records after the inserted one(s) */
- if (H5TBread_records( loc_id, dset_name, start, read_nrecords, type_size, field_offset, field_sizes, tmp_buf ) < 0)
- return -1;
+ if(H5TBread_records(loc_id, dset_name, start, read_nrecords, type_size, field_offset, field_sizes, tmp_buf) < 0)
+ goto out;
/* extend the dataset */
dims[0] = ntotal_records + nrecords;
- if (H5Dset_extent(did, dims) < 0)
+ if(H5Dset_extent(did, dims) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1528,27 +1432,29 @@ herr_t H5TBinsert_record( hid_t loc_id,
/* create a simple memory data space */
mem_dims[0] = nrecords;
- if ((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
- return -1;
+ if((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
+ goto out;
/* get the file data space */
- if ((sid = H5Dget_space( did )) < 0)
- return -1;
+ if((sid = H5Dget_space(did)) < 0)
+ goto out;
/* define a hyperslab in the dataset to write the new data */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
- if (H5Dwrite( did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf ) < 0)
+ if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
/* terminate access to the dataspace */
- if (H5Sclose( m_sid ) < 0)
+ if(H5Sclose(m_sid) < 0)
goto out;
- if (H5Sclose( sid ) < 0)
+ m_sid = H5I_BADID;
+ if(H5Sclose(sid) < 0)
goto out;
+ sid = H5I_BADID;
/*-------------------------------------------------------------------------
* write the "pushed down" records
@@ -1556,51 +1462,46 @@ herr_t H5TBinsert_record( hid_t loc_id,
*/
/* create a simple memory data space */
- mem_dims[0]=read_nrecords;
- if ((m_sid = H5Screate_simple( 1, mem_dims, NULL )) < 0)
- return -1;
+ mem_dims[0] = read_nrecords;
+ if((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
+ goto out;
/* get the file data space */
- if ((sid = H5Dget_space( did )) < 0)
- return -1;
+ if((sid = H5Dget_space(did)) < 0)
+ goto out;
/* define a hyperslab in the dataset to write the new data */
offset[0] = start + nrecords;
count[0] = read_nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
- if (H5Dwrite( did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf ) < 0)
+ if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
goto out;
- /* close */
- if (H5Sclose( m_sid ) < 0)
- goto out;
- if (H5Sclose( sid ) < 0)
- goto out;
- if (H5Tclose( tid ) < 0)
- return -1;
- if (H5Tclose( mem_type_id ) < 0)
- return -1;
- if (H5Dclose( did ) < 0)
- return -1;
-
- HDfree( tmp_buf );
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Sclose(sid);
- H5Sclose(m_sid);
- H5Tclose(mem_type_id);
- H5Tclose(tid);
- } H5E_END_TRY;
- return -1;
-}
+ if(tmp_buf)
+ HDfree(tmp_buf);
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(mem_type_id > 0)
+ if(H5Tclose(mem_type_id) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBinsert_record() */
/*-------------------------------------------------------------------------
* Function: H5TBadd_records_from
@@ -1615,33 +1516,30 @@ out:
*
* Comments:
*
-* Modifications:
-*
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBadd_records_from( hid_t loc_id,
+herr_t H5TBadd_records_from(hid_t loc_id,
const char *dset_name1,
hsize_t start1,
hsize_t nrecords,
const char *dset_name2,
- hsize_t start2 )
+ hsize_t start2)
{
- hid_t did_1;
- hid_t tid_1;
- hid_t sid_1=-1;
- hid_t msid_1=-1;
- size_t type_size1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
hsize_t nfields;
hsize_t ntotal_records;
- unsigned char *tmp_buf = NULL;
+ size_t type_size1;
size_t src_size;
- size_t *src_offset = NULL;
- size_t *src_sizes = NULL;
+ size_t *src_offset = NULL;
+ size_t *src_sizes = NULL;
+ unsigned char *tmp_buf = NULL;
+ herr_t ret_val = -1;
/*-------------------------------------------------------------------------
* first we get information about type size and offsets on disk
@@ -1649,7 +1547,7 @@ herr_t H5TBadd_records_from( hid_t loc_id,
*/
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name1, &nfields, &ntotal_records ) < 0)
+ if(H5TBget_table_info(loc_id, dset_name1, &nfields, &ntotal_records) < 0)
goto out;
if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
@@ -1658,7 +1556,7 @@ herr_t H5TBadd_records_from( hid_t loc_id,
goto out;
/* get field info */
- if (H5TBget_field_info( loc_id, dset_name1, NULL, src_sizes, src_offset, &src_size ) < 0)
+ if(H5TBget_field_info(loc_id, dset_name1, NULL, src_sizes, src_offset, &src_size) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1667,69 +1565,47 @@ herr_t H5TBadd_records_from( hid_t loc_id,
*/
/* open the 1st dataset. */
- if ((did_1 = H5Dopen2(loc_id, dset_name1, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name1, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if ((tid_1 = H5Dget_type( did_1 )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* get the dataspace handle */
- if ((sid_1 = H5Dget_space( did_1 )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* get the size of the datatype */
- if (( type_size1 = H5Tget_size( tid_1 )) == 0 )
+ if(0 == (type_size1 = H5Tget_size(tid)))
goto out;
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size1 )))
+ if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size1)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start1;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((msid_1 = H5Screate_simple( 1, mem_size, NULL )) < 0)
+ if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if (H5Dread( did_1, tid_1, msid_1, sid_1, H5P_DEFAULT, tmp_buf ) < 0)
+ if(H5Dread(did, tid, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
* add to the second table
*-------------------------------------------------------------------------
*/
- if (H5TBinsert_record(loc_id,dset_name2,start2,nrecords,src_size,src_offset,src_sizes,tmp_buf ) < 0)
- goto out;
-
- /*-------------------------------------------------------------------------
- * close resources for table 1
- *-------------------------------------------------------------------------
- */
-
- if (H5Sclose( msid_1 ) < 0)
- goto out;
- if (H5Sclose( sid_1 ) < 0)
- goto out;
- if (H5Tclose( tid_1 ) < 0)
- goto out;
- if (H5Dclose( did_1 ) < 0)
+ if(H5TBinsert_record(loc_id, dset_name2, start2, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
goto out;
- if(tmp_buf)
- HDfree(tmp_buf);
- if(src_offset)
- HDfree(src_offset);
- if(src_sizes)
- HDfree(src_sizes);
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
if(tmp_buf)
HDfree(tmp_buf);
@@ -1737,16 +1613,21 @@ out:
HDfree(src_offset);
if(src_sizes)
HDfree(src_sizes);
- H5E_BEGIN_TRY
- {
- H5Dclose(did_1);
- H5Sclose(sid_1);
- H5Sclose(msid_1);
- H5Tclose(tid_1);
- } H5E_END_TRY;
- return -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
-}
+ return ret_val;
+} /* end H5TBadd_records_from() */
/*-------------------------------------------------------------------------
* Function: H5TBcombine_tables
@@ -1761,9 +1642,6 @@ out:
*
* Comments:
*
-* Modifications:
-*
-*
*-------------------------------------------------------------------------
*/
herr_t H5TBcombine_tables(hid_t loc_id1,
@@ -1805,11 +1683,10 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
size_t *src_offset = NULL;
size_t *src_sizes = NULL;
char attr_name[255];
- char aux[255];
unsigned char *tmp_buf = NULL;
unsigned char *tmp_fill_buf = NULL;
htri_t has_fill;
- int ret_val = -1;
+ herr_t ret_val = -1;
/*-------------------------------------------------------------------------
* first we get information about type size and offsets on disk
@@ -1893,7 +1770,8 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
* get attributes
*-------------------------------------------------------------------------
*/
- type_size = H5Tget_size(tid_3);
+ if(0 == (type_size = H5Tget_size(tid_3)))
+ goto out;
/* alloc fill value attribute buffer */
if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(type_size)))
@@ -1908,7 +1786,6 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
*-------------------------------------------------------------------------
*/
if(has_fill) {
-
if((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
@@ -1920,11 +1797,7 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
/* get the member offset */
member_offset = H5Tget_member_offset(tid_3, (unsigned)i);
- HDstrncpy(attr_name, "FIELD_", 6);
- HDsnprintf(aux, 12, "%d", (int)i);
- HDstrncat(attr_name, aux, 12);
- HDsnprintf(aux, 6, "%s", "_FILL");
- HDstrncat(attr_name, aux, 7);
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
@@ -1939,13 +1812,13 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
if(H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
- }
+ } /* end for */
/* close data space. */
if(H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
- }
+ } /* end if */
/*-------------------------------------------------------------------------
* read data from 1st table
@@ -1978,26 +1851,12 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
goto out;
/*-------------------------------------------------------------------------
- * release resources from 1st table
+ * release temporary resources
*-------------------------------------------------------------------------
*/
if(H5Sclose(m_sid) < 0)
goto out;
m_sid = H5I_BADID;
- if(H5Sclose(sid_1) < 0)
- goto out;
- sid_1 = H5I_BADID;
- if(H5Tclose(tid_1) < 0)
- goto out;
- tid_1 = H5I_BADID;
- if(H5Pclose(pid_1) < 0)
- goto out;
- pid_1 = H5I_BADID;
- if(H5Dclose(did_1) < 0)
- goto out;
- did_1 = H5I_BADID;
-
- /* Release resources. */
HDfree(tmp_buf);
tmp_buf = NULL;
@@ -2057,45 +1916,6 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
if(H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
goto out;
- /*-------------------------------------------------------------------------
- * release resources from 2nd table
- *-------------------------------------------------------------------------
- */
-
- if(H5Sclose(m_sid) < 0)
- goto out;
- m_sid = H5I_BADID;
- if(H5Sclose(sid_2) < 0)
- goto out;
- sid_2 = H5I_BADID;
- if(H5Tclose(tid_2) < 0)
- goto out;
- tid_2 = H5I_BADID;
- if(H5Pclose(pid_2) < 0)
- goto out;
- pid_2 = H5I_BADID;
- if(H5Dclose(did_2) < 0)
- goto out;
- did_2 = H5I_BADID;
-
- /*-------------------------------------------------------------------------
- * release resources from 3rd table
- *-------------------------------------------------------------------------
- */
-
- if(H5Sclose(sid_3) < 0)
- goto out;
- sid_3 = H5I_BADID;
- if(H5Tclose(tid_3) < 0)
- goto out;
- tid_3 = H5I_BADID;
- if(H5Pclose(pid_3) < 0)
- goto out;
- pid_3 = H5I_BADID;
- if(H5Dclose(did_3) < 0)
- goto out;
- did_3 = H5I_BADID;
-
ret_val = 0;
out:
@@ -2107,44 +1927,57 @@ out:
HDfree(src_offset);
if(src_sizes)
HDfree(src_sizes);
-
- H5E_BEGIN_TRY {
- if(member_type_id > 0)
- H5Tclose(member_type_id);
- if(attr_id > 0)
- H5Aclose(attr_id);
- if(sid > 0)
- H5Sclose(sid);
- if(m_sid > 0)
- H5Sclose(m_sid);
- if(pid_1 > 0)
- H5Pclose(pid_1);
- if(tid_1 > 0)
- H5Tclose(tid_1);
- if(sid_1 > 0)
- H5Sclose(sid_1);
- if(did_1 > 0)
- H5Dclose(did_1);
- if(pid_2 > 0)
- H5Pclose(pid_2);
- if(tid_2 > 0)
- H5Tclose(tid_2);
- if(sid_2 > 0)
- H5Sclose(sid_2);
- if(did_2 > 0)
- H5Dclose(did_2);
- if(pid_3 > 0)
- H5Pclose(pid_3);
- if(tid_3 > 0)
- H5Tclose(tid_3);
- if(sid_3 > 0)
- H5Sclose(sid_3);
- if(did_3 > 0)
- H5Dclose(did_3);
- } H5E_END_TRY;
+ if(member_type_id > 0)
+ if(H5Tclose(member_type_id) < 0)
+ ret_val = -1;
+ if(attr_id > 0)
+ if(H5Aclose(attr_id) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid_1 > 0)
+ if(H5Sclose(sid_1) < 0)
+ ret_val = -1;
+ if(tid_1 > 0)
+ if(H5Tclose(tid_1) < 0)
+ ret_val = -1;
+ if(pid_1 > 0)
+ if(H5Pclose(pid_1) < 0)
+ ret_val = -1;
+ if(did_1 > 0)
+ if(H5Dclose(did_1) < 0)
+ ret_val = -1;
+ if(sid_2 > 0)
+ if(H5Sclose(sid_2) < 0)
+ ret_val = -1;
+ if(tid_2 > 0)
+ if(H5Tclose(tid_2) < 0)
+ ret_val = -1;
+ if(pid_2 > 0)
+ if(H5Pclose(pid_2) < 0)
+ ret_val = -1;
+ if(did_2 > 0)
+ if(H5Dclose(did_2) < 0)
+ ret_val = -1;
+ if(sid_3 > 0)
+ if(H5Sclose(sid_3) < 0)
+ ret_val = -1;
+ if(tid_3 > 0)
+ if(H5Tclose(tid_3) < 0)
+ ret_val = -1;
+ if(pid_3 > 0)
+ if(H5Pclose(pid_3) < 0)
+ ret_val = -1;
+ if(did_3 > 0)
+ if(H5Dclose(did_3) < 0)
+ ret_val = -1;
return ret_val;
-}
+} /* end H5TBcombine_tables() */
/*-------------------------------------------------------------------------
* Function: H5TBinsert_field
@@ -2159,36 +1992,40 @@ out:
*
* Comments:
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBinsert_field( hid_t loc_id,
+herr_t H5TBinsert_field(hid_t loc_id,
const char *dset_name,
const char *field_name,
hid_t field_type,
hsize_t position,
const void *fill_data,
- const void *buf )
+ const void *buf)
{
/* identifiers for the 1st, original dataset */
- hid_t did_1;
- hid_t tid_1;
- hid_t sid_1;
- hid_t pid_1;
- hid_t msid_1;
+ hid_t did_1 = H5I_BADID;
+ hid_t tid_1 = H5I_BADID;
+ hid_t sid_1 = H5I_BADID;
+ hid_t pid_1 = H5I_BADID;
+ hid_t msid_1 = H5I_BADID;
/* identifiers for the 2nd, new dataset */
- hid_t did_2;
- hid_t tid_2;
- hid_t sid_2;
- hid_t pid_2;
- hid_t msid_2;
- hid_t member_type_id;
+ hid_t did_2 = H5I_BADID;
+ hid_t tid_2 = H5I_BADID;
+ hid_t sid_2 = H5I_BADID;
+ hid_t pid_2 = H5I_BADID;
+ hid_t msid_2 = H5I_BADID;
+ /* identifiers for the 3rd, final dataset */
+ hid_t did_3 = H5I_BADID;
+ hid_t tid_3 = H5I_BADID;
+ hid_t sid_3 = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
size_t member_size;
size_t new_member_size = 0;
- char *member_name;
size_t total_size;
+ size_t curr_offset;
hsize_t nfields;
hsize_t nrecords;
hsize_t dims_chunk[1];
@@ -2197,388 +2034,366 @@ herr_t H5TBinsert_field( hid_t loc_id,
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
- hid_t write_type_id;
- hid_t preserve_id;
- size_t curr_offset;
- int inserted;
- hsize_t idx;
+ hsize_t i;
char table_title[255];
- size_t member_offset;
char attr_name[255];
- hid_t attr_id;
- char aux[255];
- unsigned char *tmp_buf;
- unsigned char *tmp_fill_buf;
- hsize_t i;
+ char *member_name = NULL;
+ unsigned char *tmp_buf = NULL;
+ unsigned char *tmp_fill_buf = NULL;
+ hbool_t inserted;
+ herr_t ret_val = -1;
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ goto out;
/*-------------------------------------------------------------------------
- * get information about the old data type
- *-------------------------------------------------------------------------
- */
+ * get information about the old data type
+ *-------------------------------------------------------------------------
+ */
/* open the dataset. */
- if ((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get creation properties list */
- if ((pid_1 = H5Dget_create_plist( did_1 )) < 0)
+ if((pid_1 = H5Dget_create_plist(did_1)) < 0)
goto out;
/* get the datatype */
- if ((tid_1 = H5Dget_type( did_1 )) < 0)
+ if((tid_1 = H5Dget_type(did_1)) < 0)
goto out;
/* get the size of the datatype */
- if (( total_size = H5Tget_size( tid_1 )) == 0 )
+ if(0 == (total_size = H5Tget_size(tid_1)))
goto out;
/* get the dataspace handle */
- if ((sid_1 = H5Dget_space( did_1 )) < 0)
+ if((sid_1 = H5Dget_space(did_1)) < 0)
goto out;
/* get dimension */
- if (H5Sget_simple_extent_dims( sid_1, dims, NULL) < 0)
+ if(H5Sget_simple_extent_dims(sid_1, dims, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get attributes
- *-------------------------------------------------------------------------
- */
+ * get attributes
+ *-------------------------------------------------------------------------
+ */
/* get the table title */
- if ((H5TBAget_title( did_1, table_title )) < 0)
+ if((H5TBAget_title(did_1, table_title)) < 0)
goto out;
/* alloc fill value attribute buffer */
- tmp_fill_buf = (unsigned char *)HDmalloc(total_size );
+ if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(total_size)))
+ goto out;
/* get the fill value attributes */
- if ((H5TBAget_fill( loc_id, dset_name, did_1, tmp_fill_buf )) < 0)
+ if((H5TBAget_fill(loc_id, dset_name, did_1, tmp_fill_buf)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a new data type
- *-------------------------------------------------------------------------
- */
+ * create a new data type
+ *-------------------------------------------------------------------------
+ */
/* get the new member size */
- member_size = H5Tget_size( field_type );
+ if(0 == (member_size = H5Tget_size(field_type)))
+ goto out;
/* create the data type. */
- if (( tid_2 = H5Tcreate (H5T_COMPOUND,(size_t)(total_size + member_size) )) < 0)
+ if((tid_2 = H5Tcreate(H5T_COMPOUND, (size_t)(total_size + member_size))) < 0)
goto out;
curr_offset = 0;
- inserted = 0;
+ inserted = FALSE;
/* insert the old fields, counting with the new one */
- for ( i = 0; i < nfields + 1; i++)
- {
+ for(i = 0; i < nfields + 1; i++) {
+ hsize_t idx;
+
idx = i;
- if (inserted )
+ if(inserted)
idx = i - 1;
- if (i == position )
- {
+ if(i == position) {
/* get the new member size */
- new_member_size = H5Tget_size( field_type );
+ if(0 == (new_member_size = H5Tget_size(field_type)))
+ goto out;
/* insert the new field type */
- if (H5Tinsert( tid_2, field_name, curr_offset, field_type ) < 0)
+ if(H5Tinsert(tid_2, field_name, curr_offset, field_type) < 0)
goto out;
curr_offset += new_member_size;
- inserted = 1;
-
- continue;
- }
-
- /* get the member name */
- member_name = H5Tget_member_name( tid_1, (unsigned)idx );
-
- /* get the member type */
- if (( member_type_id = H5Tget_member_type( tid_1,(unsigned)idx )) < 0)
- goto out;
+ inserted = TRUE;
+ } /* end if */
+ else {
+ /* get the member name */
+ if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)idx)))
+ goto out;
- /* get the member size */
- member_size = H5Tget_size( member_type_id );
+ /* get the member type */
+ if((member_type_id = H5Tget_member_type(tid_1, (unsigned)idx)) < 0)
+ goto out;
- /* insert it into the new type */
- if (H5Tinsert( tid_2, member_name, curr_offset, member_type_id ) < 0)
- goto out;
+ /* get the member size */
+ if(0 == (member_size = H5Tget_size(member_type_id)))
+ goto out;
- curr_offset += member_size;
+ /* insert it into the new type */
+ if(H5Tinsert(tid_2, member_name, curr_offset, member_type_id) < 0)
+ goto out;
- H5free_memory( member_name );
+ curr_offset += member_size;
- /* close the member type */
- if(H5Tclose( member_type_id ) < 0)
- goto out;
+ H5free_memory(member_name);
+ member_name = NULL;
- } /* i */
+ /* close the member type */
+ if(H5Tclose(member_type_id) < 0)
+ goto out;
+ member_type_id = H5I_BADID;
+ } /* end else */
+ } /* end for */
/*-------------------------------------------------------------------------
- * create a new temporary dataset
- *-------------------------------------------------------------------------
- */
+ * create a new temporary dataset
+ *-------------------------------------------------------------------------
+ */
/* retrieve the size of chunk */
- if (H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
+ if(H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
goto out;
/* create a new simple data space with unlimited size, using the dimension */
- if ((sid_2 = H5Screate_simple( 1, dims, maxdims)) < 0)
- return -1;
+ if((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
+ goto out;
/* modify dataset creation properties, i.e. enable chunking */
- pid_2 = H5Pcreate(H5P_DATASET_CREATE);
- if (H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
- return -1;
+ if((pid_2 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto out;
+ if(H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
+ goto out;
/* create the dataset. */
- if ((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
+ if((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * read data from 1st table
- *-------------------------------------------------------------------------
- */
+ * read data from 1st table
+ *-------------------------------------------------------------------------
+ */
- tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, (size_t)total_size);
+ if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, (size_t)total_size)))
+ goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = 0;
count[0] = nrecords;
- if (H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((msid_1 = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if((msid_1 = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if (H5Dread(did_1, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
+ if(H5Dread(did_1, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * save data from 1st table into new table, using the 1st type id
- *-------------------------------------------------------------------------
- */
+ * save data from 1st table into new table, using the 1st type id
+ *-------------------------------------------------------------------------
+ */
/* write */
- if (H5Dwrite( did_2, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf ) < 0)
+ if(H5Dwrite(did_2, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * save the function supplied data of the new field
- *-------------------------------------------------------------------------
- */
+ * save the function supplied data of the new field
+ *-------------------------------------------------------------------------
+ */
/* create a write id */
- if (( write_type_id = H5Tcreate( H5T_COMPOUND, (size_t)new_member_size )) < 0)
+ if((write_type_id = H5Tcreate(H5T_COMPOUND, (size_t)new_member_size)) < 0)
goto out;
/* the field in the file is found by its name */
- if (H5Tinsert( write_type_id, field_name, (size_t)0, field_type ) < 0)
+ if(H5Tinsert(write_type_id, field_name, (size_t)0, field_type) < 0)
goto out;
/* create xfer properties to preserve initialized data */
- if ((preserve_id = H5Pcreate (H5P_DATASET_XFER)) < 0)
+ if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto out;
- if (H5Pset_preserve (preserve_id, 1) < 0)
+ if(H5Pset_preserve(preserve_id, 1) < 0)
goto out;
/* only write if there is something to write */
- if ( buf )
- {
+ if(buf) {
/* create a memory dataspace handle */
- if ((msid_2 = H5Screate_simple( 1, mem_size, NULL )) < 0)
+ if((msid_2 = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
/* write */
- if (H5Dwrite( did_2, write_type_id, msid_2, sid_2, preserve_id, buf ) < 0)
- goto out;
-
- /* terminate access to the memory dataspace */
- if (H5Sclose( msid_2 ) < 0)
+ if(H5Dwrite(did_2, write_type_id, msid_2, sid_2, preserve_id, buf) < 0)
goto out;
- }
-
- /* end access to the property list */
- if (H5Pclose( preserve_id ) < 0)
- goto out;
+ } /* end if */
/*-------------------------------------------------------------------------
- * release resources from 1st table
- *-------------------------------------------------------------------------
- */
-
- if (H5Sclose( msid_1 ) < 0)
- goto out;
- if (H5Tclose( tid_1 ) < 0)
- goto out;
- if (H5Pclose( pid_1 ) < 0)
- goto out;
- if (H5Sclose( sid_1 ) < 0)
+ * delete 1st table
+ *-------------------------------------------------------------------------
+ */
+ if(H5Ldelete(loc_id, dset_name, H5P_DEFAULT) < 0)
goto out;
- if (H5Dclose( did_1 ) < 0)
- goto out;
-
/*-------------------------------------------------------------------------
- * release resources from 2nd table
- *-------------------------------------------------------------------------
- */
-
- if (H5Sclose( sid_2 ) < 0)
- goto out;
- if (H5Tclose( tid_2 ) < 0)
- goto out;
- if (H5Pclose( pid_2 ) < 0)
+ * rename 2nd table
+ *-------------------------------------------------------------------------
+ */
+ if(H5Lmove(loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto out;
- if (H5Dclose( did_2 ) < 0)
- goto out;
-
- /*-------------------------------------------------------------------------
- * delete 1st table
- *-------------------------------------------------------------------------
- */
- if (H5Ldelete( loc_id, dset_name, H5P_DEFAULT ) < 0)
- return -1;
/*-------------------------------------------------------------------------
- * rename 2nd table
- *-------------------------------------------------------------------------
- */
-
- if (H5Lmove( loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT ) < 0)
- return -1;
-
- /*-------------------------------------------------------------------------
- * attach the conforming table attributes
- *-------------------------------------------------------------------------
- */
+ * attach the conforming table attributes
+ *-------------------------------------------------------------------------
+ */
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ goto out;
/* open the dataset. */
- if ((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did_3 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get the datatype */
- if ((tid_1 = H5Dget_type( did_1 )) < 0)
+ if((tid_3 = H5Dget_type(did_3)) < 0)
goto out;
/* set the attributes */
- if (H5TB_attach_attributes( table_title, loc_id, dset_name,(hsize_t) nfields, tid_1 ) < 0)
- return -1;
+ if(H5TB_attach_attributes(table_title, loc_id, dset_name, (hsize_t)nfields, tid_3) < 0)
+ goto out;
/*-------------------------------------------------------------------------
- * attach the fill attributes from previous table
- *-------------------------------------------------------------------------
- */
-
- if (( sid_1 = H5Screate(H5S_SCALAR)) < 0)
+ * attach the fill attributes from previous table
+ *-------------------------------------------------------------------------
+ */
+ if((sid_3 = H5Screate(H5S_SCALAR)) < 0)
goto out;
- for ( i = 0; i < nfields-1; i++)
- {
+ for(i = 0; i < (nfields - 1); i++) {
+ size_t member_offset;
+
/* get the member type */
- if(( member_type_id = H5Tget_member_type( tid_1, (unsigned) i )) < 0)
+ if((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
goto out;
/* get the member offset */
- member_offset = H5Tget_member_offset(tid_1, (unsigned)i);
+ member_offset = H5Tget_member_offset(tid_3, (unsigned)i);
- strcpy(attr_name, "FIELD_");
- sprintf(aux, "%d", (int)i);
- strcat(attr_name, aux);
- sprintf(aux, "%s", "_FILL");
- strcat(attr_name, aux);
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if ((attr_id = H5Acreate2(did_1, attr_name, member_type_id, sid_1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_3, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if (H5Awrite(attr_id, member_type_id, tmp_fill_buf+member_offset) < 0)
+ if(H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
goto out;
- if (H5Aclose(attr_id) < 0)
+ if(H5Aclose(attr_id) < 0)
goto out;
+ attr_id = H5I_BADID;
/* close the member type */
- if (H5Tclose(member_type_id) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
- }
+ member_type_id = H5I_BADID;
+ } /* end for */
/*-------------------------------------------------------------------------
- * attach the fill attribute from the new field, if present
- *-------------------------------------------------------------------------
- */
- if (fill_data)
- {
-
- strcpy(attr_name, "FIELD_");
- sprintf(aux, "%d",(int)(nfields - 1));
- strcat(attr_name, aux);
- sprintf(aux, "%s", "_FILL");
- strcat(attr_name, aux);
+ * attach the fill attribute from the new field, if present
+ *-------------------------------------------------------------------------
+ */
+ if(fill_data) {
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)(nfields - 1));
/* get the member type */
- if ((member_type_id = H5Tget_member_type(tid_1, (unsigned)nfields - 1)) < 0)
+ if((member_type_id = H5Tget_member_type(tid_3, (unsigned)nfields - 1)) < 0)
goto out;
- if ((attr_id = H5Acreate2(did_1, attr_name, member_type_id, sid_1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_3, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if (H5Awrite(attr_id, member_type_id, fill_data) < 0)
+ if(H5Awrite(attr_id, member_type_id, fill_data) < 0)
goto out;
- if (H5Aclose(attr_id) < 0)
+ if(H5Aclose(attr_id) < 0)
goto out;
+ attr_id = H5I_BADID;
- if (H5Tclose(member_type_id) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
+ member_type_id = H5I_BADID;
+ } /* end fill_data */
- }
-
- /* close */
- if (H5Sclose( sid_1 ) < 0)
- goto out;
- if (H5Tclose( tid_1 ) < 0)
- goto out;
- if (H5Dclose( did_1 ) < 0)
- goto out;
-
- /* release resources. */
- HDfree ( tmp_buf );
- HDfree ( tmp_fill_buf );
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did_1);
- H5Sclose(sid_1);
- H5Tclose(tid_1);
- H5Pclose(pid_1);
- H5Dclose(did_2);
- H5Sclose(sid_2);
- H5Tclose(tid_2);
- H5Pclose(pid_2);
-
- } H5E_END_TRY;
- return -1;
+ if(member_name)
+ H5free_memory(member_name);
+ if(tmp_buf)
+ HDfree(tmp_buf);
+ if(tmp_fill_buf)
+ HDfree(tmp_fill_buf);
+ if(preserve_id > 0)
+ if(H5Pclose(preserve_id) < 0)
+ ret_val = -1;
+ if(msid_1 > 0)
+ if(H5Sclose(msid_1) < 0)
+ ret_val = -1;
+ if(tid_1 > 0)
+ if(H5Tclose(tid_1) < 0)
+ ret_val = -1;
+ if(pid_1 > 0)
+ if(H5Pclose(pid_1) < 0)
+ ret_val = -1;
+ if(sid_1 > 0)
+ if(H5Sclose(sid_1) < 0)
+ ret_val = -1;
+ if(did_1 > 0)
+ if(H5Dclose(did_1) < 0)
+ ret_val = -1;
+ if(msid_2 > 0)
+ if(H5Sclose(msid_2) < 0)
+ ret_val = -1;
+ if(sid_2 > 0)
+ if(H5Sclose(sid_2) < 0)
+ ret_val = -1;
+ if(tid_2 > 0)
+ if(H5Tclose(tid_2) < 0)
+ ret_val = -1;
+ if(pid_2 > 0)
+ if(H5Pclose(pid_2) < 0)
+ ret_val = -1;
+ if(did_2 > 0)
+ if(H5Dclose(did_2) < 0)
+ ret_val = -1;
+ if(sid_3 > 0)
+ if(H5Sclose(sid_3) < 0)
+ ret_val = -1;
+ if(tid_3 > 0)
+ if(H5Tclose(tid_3) < 0)
+ ret_val = -1;
+ if(did_3 > 0)
+ if(H5Dclose(did_3) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBinsert_field() */
-}
/*-------------------------------------------------------------------------
* Function: H5TBdelete_field
*
@@ -2592,54 +2407,53 @@ out:
*
* Comments:
*
-* Modifications:
-*
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBdelete_field( hid_t loc_id,
+herr_t H5TBdelete_field(hid_t loc_id,
const char *dset_name,
- const char *field_name )
+ const char *field_name)
{
/* identifiers for the 1st original dataset */
- hid_t did_1;
- hid_t tid_1;
- hid_t sid_1;
- hid_t pid_1;
+ hid_t did_1 = H5I_BADID;
+ hid_t tid_1 = H5I_BADID;
+ hid_t sid_1 = H5I_BADID;
+ hid_t pid_1 = H5I_BADID;
/* identifiers for the 2nd new dataset */
- hid_t did_2;
- hid_t tid_2;
- hid_t sid_2;
- hid_t pid_2;
- hid_t member_type_id;
+ hid_t did_2 = H5I_BADID;
+ hid_t tid_2 = H5I_BADID;
+ hid_t sid_2 = H5I_BADID;
+ hid_t pid_2 = H5I_BADID;
+ /* identifiers for the 3rd final dataset */
+ hid_t did_3 = H5I_BADID;
+ hid_t tid_3 = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
+ hid_t read_type_id = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
size_t member_size;
- char *member_name;
size_t type_size1;
size_t type_size2;
+ size_t curr_offset;
+ size_t delete_member_size = 0;
+ size_t member_offset;
hsize_t nfields;
hsize_t nrecords;
hsize_t dims_chunk[1];
hsize_t dims[1];
hsize_t maxdims[1] = { H5S_UNLIMITED };
- hid_t preserve_id;
- size_t curr_offset;
- size_t delete_member_size = 0;
- hid_t read_type_id;
- hid_t write_type_id;
- unsigned char *tmp_buf;
- unsigned char *tmp_fill_buf;
+ hsize_t i;
char attr_name[255];
- char aux[255];
char table_title[255];
- size_t member_offset;
- hid_t attr_id;
- hsize_t i;
- htri_t has_fill = 0;
+ char *member_name = NULL;
+ unsigned char *tmp_buf = NULL;
+ unsigned char *tmp_fill_buf = NULL;
+ htri_t has_fill = FALSE;
+ herr_t ret_val = -1;
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ goto out;
/*-------------------------------------------------------------------------
* get information about the old data type
@@ -2647,26 +2461,27 @@ herr_t H5TBdelete_field( hid_t loc_id,
*/
/* open the dataset. */
- if ((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get creation properties list */
- if ((pid_1 = H5Dget_create_plist( did_1 )) < 0)
+ if((pid_1 = H5Dget_create_plist(did_1)) < 0)
goto out;
/* get the datatype */
- if ((tid_1 = H5Dget_type( did_1 )) < 0)
+ if((tid_1 = H5Dget_type(did_1)) < 0)
goto out;
/* get the size of the datatype */
- type_size1 = H5Tget_size( tid_1 );
+ if(0 == (type_size1 = H5Tget_size(tid_1)))
+ goto out;
/* get the dataspace handle */
- if ((sid_1 = H5Dget_space( did_1 )) < 0)
+ if((sid_1 = H5Dget_space(did_1)) < 0)
goto out;
/* get dimension */
- if (H5Sget_simple_extent_dims( sid_1, dims, NULL) < 0)
+ if(H5Sget_simple_extent_dims(sid_1, dims, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2675,37 +2490,38 @@ herr_t H5TBdelete_field( hid_t loc_id,
*/
/* check out the field */
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name( tid_1,(unsigned) i );
+ if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
+ goto out;
/* we want to find the field to delete */
- if (H5TB_find_field( member_name, field_name ) > 0 )
- {
+ if(H5TB_find_field(member_name, field_name)) {
/* get the member type */
- if (( member_type_id = H5Tget_member_type( tid_1,(unsigned) i )) < 0)
+ if((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
goto out;
/* get the member size */
- delete_member_size = H5Tget_size( member_type_id );
+ if(0 == (delete_member_size = H5Tget_size(member_type_id)))
+ goto out;
/* close the member type */
- if (H5Tclose( member_type_id ) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
+ member_type_id = H5I_BADID;
- H5free_memory( member_name );
+ H5free_memory(member_name);
+ member_name = NULL;
break;
+ } /* end if */
- }
-
- H5free_memory( member_name );
-
- } /* i */
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/* no field to delete was found */
- if (delete_member_size == 0 )
+ if(delete_member_size == 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2716,13 +2532,14 @@ herr_t H5TBdelete_field( hid_t loc_id,
type_size2 = type_size1 - delete_member_size;
/* create the data type. */
- if (( tid_2 = H5Tcreate (H5T_COMPOUND, type_size2 )) < 0)
+ if((tid_2 = H5Tcreate (H5T_COMPOUND, type_size2)) < 0)
goto out;
curr_offset = 0;
/* alloc fill value attribute buffer */
- tmp_fill_buf = (unsigned char *)HDmalloc((size_t) type_size2 );
+ if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc((size_t)type_size2)))
+ goto out;
/*-------------------------------------------------------------------------
* get attributes from previous table in the process
@@ -2730,62 +2547,56 @@ herr_t H5TBdelete_field( hid_t loc_id,
*/
/* get the table title */
- if ((H5TBAget_title( did_1, table_title )) < 0)
+ if((H5TBAget_title(did_1, table_title)) < 0)
goto out;
/* insert the old fields except the one to delete */
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name( tid_1, (unsigned) i );
+ if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
+ goto out;
/* we want to skip the field to delete */
- if (H5TB_find_field( member_name, field_name ) > 0 )
- {
- H5free_memory( member_name );
- continue;
- }
+ if(!H5TB_find_field(member_name, field_name)) {
+ /* get the member type */
+ if((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
+ goto out;
- /* get the member type */
- if (( member_type_id = H5Tget_member_type( tid_1, (unsigned)i )) < 0)
- goto out;
+ /* get the member size */
+ if(0 == (member_size = H5Tget_size(member_type_id)))
+ goto out;
- /* get the member size */
- member_size = H5Tget_size( member_type_id );
+ /* insert it into the new type */
+ if(H5Tinsert(tid_2, member_name, curr_offset, member_type_id) < 0)
+ goto out;
- /* insert it into the new type */
- if (H5Tinsert( tid_2, member_name, curr_offset, member_type_id ) < 0)
- goto out;
+ /*-------------------------------------------------------------------------
+ * get the fill value information
+ *-------------------------------------------------------------------------
+ */
- /*-------------------------------------------------------------------------
- * get the fill value information
- *-------------------------------------------------------------------------
- */
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- strcpy( attr_name, "FIELD_" );
- sprintf( aux, "%d", (int)i );
- strcat( attr_name, aux );
- sprintf( aux, "%s", "_FILL" );
- strcat( attr_name, aux );
+ /* check if we have the _FILL attribute */
+ if((has_fill = H5LT_find_attribute(did_1, attr_name)) < 0)
+ goto out;
- /* check if we have the _FILL attribute */
- has_fill = H5LT_find_attribute( did_1, attr_name );
+ /* get it */
+ if(has_fill)
+ if(H5LT_get_attribute_disk(did_1, attr_name, tmp_fill_buf + curr_offset) < 0)
+ goto out;
- /* get it */
- if (has_fill == 1 )
- {
- if(H5LT_get_attribute_disk( did_1, attr_name, tmp_fill_buf+curr_offset ) < 0)
- goto out;
- }
+ curr_offset += member_size;
- curr_offset += member_size;
+ /* close the member type */
+ if(H5Tclose(member_type_id) < 0)
+ goto out;
+ member_type_id = H5I_BADID;
+ } /* end if */
H5free_memory(member_name);
-
- /* close the member type */
- if (H5Tclose(member_type_id) < 0)
- goto out;
- } /* i */
+ member_name = NULL;
+ } /* end for */
/*-------------------------------------------------------------------------
* create a new temporary dataset
@@ -2793,143 +2604,116 @@ herr_t H5TBdelete_field( hid_t loc_id,
*/
/* retrieve the size of chunk */
- if (H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
+ if(H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
goto out;
/* create a new simple data space with unlimited size, using the dimension */
- if ((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
- return -1;
+ if((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
+ goto out;
/* modify dataset creation properties, i.e. enable chunking */
pid_2 = H5Pcreate(H5P_DATASET_CREATE);
- if (H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
- return -1;
+ if(H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
+ goto out;
/* create the dataset. */
- if ((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
+ if((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
* we have to read field by field of the old dataset and save it into the new one
*-------------------------------------------------------------------------
*/
- for ( i = 0; i < nfields; i++)
- {
+ for(i = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name(tid_1, (unsigned)i);
+ if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
+ goto out;
/* skip the field to delete */
- if (H5TB_find_field(member_name, field_name) > 0)
- {
- H5free_memory(member_name);
- continue;
- }
+ if(!H5TB_find_field(member_name, field_name) > 0) {
+ /* get the member type */
+ if((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
+ goto out;
- /* get the member type */
- if ((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
- goto out;
+ /* get the member size */
+ if(0 == (member_size = H5Tget_size(member_type_id)))
+ goto out;
- /* get the member size */
- member_size = H5Tget_size(member_type_id);
+ /* create a read id */
+ if((read_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
+ goto out;
- /* create a read id */
- if ((read_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
- goto out;
+ /* insert it into the new type */
+ if(H5Tinsert(read_type_id, member_name, (size_t)0, member_type_id) < 0)
+ goto out;
- /* insert it into the new type */
- if (H5Tinsert( read_type_id, member_name, (size_t)0, member_type_id ) < 0)
- goto out;
+ if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, member_size)))
+ goto out;
- tmp_buf = (unsigned char *)HDcalloc((size_t) nrecords, member_size );
+ /* read */
+ if(H5Dread(did_1, read_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
+ goto out;
- /* read */
- if (H5Dread( did_1, read_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp_buf ) < 0)
- goto out;
+ /* create a write id */
+ if((write_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
+ goto out;
- /* create a write id */
- if (( write_type_id = H5Tcreate( H5T_COMPOUND, member_size )) < 0)
- goto out;
+ /* the field in the file is found by its name */
+ if(H5Tinsert(write_type_id, member_name, (size_t)0, member_type_id) < 0)
+ goto out;
- /* the field in the file is found by its name */
- if (H5Tinsert( write_type_id, member_name, (size_t)0, member_type_id ) < 0)
- goto out;
+ /* create xfer properties to preserve initialized data */
+ if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto out;
+ if(H5Pset_preserve(preserve_id, 1) < 0)
+ goto out;
- /* create xfer properties to preserve initialized data */
- if ((preserve_id = H5Pcreate (H5P_DATASET_XFER)) < 0)
- goto out;
- if (H5Pset_preserve (preserve_id, 1) < 0)
- goto out;
+ /* write */
+ if(H5Dwrite(did_2, write_type_id, H5S_ALL, H5S_ALL, preserve_id, tmp_buf) < 0)
+ goto out;
- /* write */
- if(H5Dwrite( did_2, write_type_id, H5S_ALL, H5S_ALL, preserve_id, tmp_buf ) < 0)
- goto out;
+ /* end access to the property list */
+ if(H5Pclose(preserve_id) < 0)
+ goto out;
+ preserve_id = H5I_BADID;
- /* end access to the property list */
- if (H5Pclose( preserve_id ) < 0)
- goto out;
+ /* close the member type */
+ if(H5Tclose(member_type_id) < 0)
+ goto out;
+ member_type_id = H5I_BADID;
- /* close the member type */
- if (H5Tclose( member_type_id ) < 0)
- goto out;
+ /* close the read type */
+ if(H5Tclose(read_type_id) < 0)
+ goto out;
+ read_type_id = H5I_BADID;
- /* close the read type */
- if (H5Tclose( read_type_id ) < 0)
- goto out;
+ /* close the write type */
+ if(H5Tclose(write_type_id) < 0)
+ goto out;
+ write_type_id = H5I_BADID;
- /* close the write type */
- if (H5Tclose( write_type_id ) < 0)
- goto out;
+ HDfree(tmp_buf);
+ tmp_buf = NULL;
+ } /* end if */
/* release resources. */
- H5free_memory( member_name );
- HDfree ( tmp_buf );
-
- } /* i */
-
- /*-------------------------------------------------------------------------
- * release resources from 1st table
- *-------------------------------------------------------------------------
- */
-
- if (H5Tclose( tid_1 ) < 0)
- goto out;
- if (H5Pclose( pid_1 ) < 0)
- goto out;
- if (H5Sclose( sid_1 ) < 0)
- goto out;
- if (H5Dclose( did_1 ) < 0)
- goto out;
-
-
- /*-------------------------------------------------------------------------
- * release resources from 2nd table
- *-------------------------------------------------------------------------
- */
-
- if (H5Sclose( sid_2 ) < 0)
- goto out;
- if (H5Tclose( tid_2 ) < 0)
- goto out;
- if (H5Pclose( pid_2 ) < 0)
- goto out;
- if (H5Dclose( did_2 ) < 0)
- goto out;
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
/*-------------------------------------------------------------------------
* delete 1st table
*-------------------------------------------------------------------------
*/
-
- if (H5Ldelete( loc_id, dset_name, H5P_DEFAULT ) < 0)
- return -1;
+ if(H5Ldelete(loc_id, dset_name, H5P_DEFAULT) < 0)
+ goto out;
/*-------------------------------------------------------------------------
* rename 2nd table
*-------------------------------------------------------------------------
*/
-
- if (H5Lmove( loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT ) < 0)
- return -1;
+ if(H5Lmove(loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
/*-------------------------------------------------------------------------
* attach the conforming table attributes
@@ -2937,97 +2721,119 @@ herr_t H5TBdelete_field( hid_t loc_id,
*/
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords ) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ goto out;
/* open the dataset. */
- if ((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did_3 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get the datatype */
- if ((tid_1 = H5Dget_type( did_1 )) < 0)
+ if((tid_3 = H5Dget_type(did_3)) < 0)
goto out;
/* set the attributes */
- if (H5TB_attach_attributes( table_title, loc_id, dset_name, nfields, tid_1 ) < 0)
- return -1;
+ if(H5TB_attach_attributes(table_title, loc_id, dset_name, nfields, tid_3) < 0)
+ goto out;
/*-------------------------------------------------------------------------
* attach the fill attributes from previous table
*-------------------------------------------------------------------------
*/
-
- if (has_fill == 1)
- {
+ if(has_fill) {
if((sid_1 = H5Screate(H5S_SCALAR)) < 0)
goto out;
- for(i = 0; i < nfields; i++)
- {
-
+ for(i = 0; i < nfields; i++) {
/* get the member type */
- if (( member_type_id = H5Tget_member_type( tid_1, (unsigned)i )) < 0)
+ if((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
goto out;
/* get the member offset */
- member_offset = H5Tget_member_offset(tid_1, (unsigned)i);
+ member_offset = H5Tget_member_offset(tid_3, (unsigned)i);
- strcpy(attr_name, "FIELD_");
- sprintf(aux, "%d", (int)i);
- strcat(attr_name, aux);
- sprintf(aux, "%s", "_FILL");
- strcat(attr_name, aux);
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if ((attr_id = H5Acreate2(did_1, attr_name, member_type_id, sid_1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if (H5Awrite(attr_id, member_type_id, tmp_fill_buf+member_offset) < 0)
+ if(H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
goto out;
- if (H5Aclose(attr_id) < 0)
+ if(H5Aclose(attr_id) < 0)
goto out;
+ attr_id = H5I_BADID;
/* close the member type */
- if (H5Tclose(member_type_id) < 0)
+ if(H5Tclose(member_type_id) < 0)
goto out;
- }
+ member_type_id = H5I_BADID;
+ } /* end for */
/* close data space. */
- if (H5Sclose(sid_1) < 0)
+ if(H5Sclose(sid_1) < 0)
goto out;
+ sid_1 = H5I_BADID;
+ } /* end if */
- } /*has_fill*/
-
- /* release the datatype. */
- if (H5Tclose( tid_1 ) < 0)
- goto out;
-
- /* end access to the dataset */
- if (H5Dclose( did_1 ) < 0)
- goto out;
-
- /* Release resources. */
- HDfree ( tmp_fill_buf );
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did_1);
- H5Sclose(sid_1);
- H5Tclose(tid_1);
- H5Pclose(pid_1);
- H5Dclose(did_2);
- H5Sclose(sid_2);
- H5Tclose(tid_2);
- H5Pclose(pid_2);
-
- } H5E_END_TRY;
- return -1;
+ if(member_name)
+ H5free_memory(member_name);
+ if(tmp_fill_buf)
+ HDfree(tmp_fill_buf);
+ if(tmp_buf)
+ HDfree(tmp_buf);
+ if(attr_id > 0)
+ if(H5Aclose(attr_id) < 0)
+ ret_val = -1;
+ if(preserve_id > 0)
+ if(H5Pclose(preserve_id) < 0)
+ ret_val = -1;
+ if(member_type_id > 0)
+ if(H5Tclose(member_type_id) < 0)
+ ret_val = -1;
+ if(read_type_id > 0)
+ if(H5Tclose(read_type_id) < 0)
+ ret_val = -1;
+ if(write_type_id > 0)
+ if(H5Tclose(write_type_id) < 0)
+ ret_val = -1;
+ if(tid_1 > 0)
+ if(H5Tclose(tid_1) < 0)
+ ret_val = -1;
+ if(pid_1 > 0)
+ if(H5Pclose(pid_1) < 0)
+ ret_val = -1;
+ if(sid_1 > 0)
+ if(H5Sclose(sid_1) < 0)
+ ret_val = -1;
+ if(did_1 > 0)
+ if(H5Dclose(did_1) < 0)
+ ret_val = -1;
+ if(sid_2 > 0)
+ if(H5Sclose(sid_2) < 0)
+ ret_val = -1;
+ if(tid_2 > 0)
+ if(H5Tclose(tid_2) < 0)
+ ret_val = -1;
+ if(pid_2 > 0)
+ if(H5Pclose(pid_2) < 0)
+ ret_val = -1;
+ if(did_2 > 0)
+ if(H5Dclose(did_2) < 0)
+ ret_val = -1;
+ if(tid_3 > 0)
+ if(H5Tclose(tid_3) < 0)
+ ret_val = -1;
+ if(did_3 > 0)
+ if(H5Dclose(did_3) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TBdelete_field() */
-}
/*-------------------------------------------------------------------------
*
* Table attribute functions
@@ -3048,22 +2854,16 @@ out:
*
* Comments:
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBAget_title( hid_t loc_id,
- char *table_title )
+herr_t H5TBAget_title(hid_t loc_id,
+ char *table_title)
{
-
/* Get the TITLE attribute */
- if(H5LT_get_attribute_disk( loc_id, "TITLE", table_title ) < 0)
+ if(H5LT_get_attribute_disk(loc_id, "TITLE", table_title) < 0)
return -1;
-
return 0;
-
}
/*-------------------------------------------------------------------------
@@ -3079,8 +2879,6 @@ herr_t H5TBAget_title( hid_t loc_id,
*
* Comments:
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
htri_t H5TBAget_fill(hid_t loc_id,
@@ -3088,57 +2886,46 @@ htri_t H5TBAget_fill(hid_t loc_id,
hid_t dset_id,
unsigned char *dst_buf)
{
-
- hsize_t nfields;
- hsize_t nrecords;
- char attr_name[255];
- char aux[255];
- hsize_t i;
- size_t *src_offset;
- int has_fill=0;
+ hsize_t nfields;
+ hsize_t nrecords;
+ hsize_t i;
+ size_t *src_offset = NULL;
+ char attr_name[255];
+ htri_t has_fill = FALSE;
+ htri_t ret_val = -1;
/* get the number of records and fields */
- if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords ) < 0)
- return -1;
-
- src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t));
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ goto out;
- if (src_offset == NULL )
- return -1;
+ if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ goto out;
/* get field info */
- if (H5TBget_field_info( loc_id, dset_name, NULL, NULL, src_offset, NULL ) < 0)
+ if(H5TBget_field_info(loc_id, dset_name, NULL, NULL, src_offset, NULL) < 0)
goto out;
- for ( i = 0; i < nfields; i++)
- {
- strcpy( attr_name, "FIELD_" );
- sprintf( aux, "%d", (int)i );
- strcat( attr_name, aux );
- sprintf( aux, "%s", "_FILL" );
- strcat( attr_name, aux );
+ for(i = 0; i < nfields; i++) {
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
/* check if we have the _FILL attribute */
- has_fill = H5LT_find_attribute( dset_id, attr_name );
+ if((has_fill = H5LT_find_attribute(dset_id, attr_name)) < 0)
+ goto out;
/* get it */
- if (has_fill == 1 )
- {
- if(H5LT_get_attribute_disk( dset_id, attr_name, dst_buf+src_offset[i] ) < 0)
+ if(has_fill)
+ if(H5LT_get_attribute_disk(dset_id, attr_name, dst_buf + src_offset[i]) < 0)
goto out;
- }
-
- }
-
- HDfree( src_offset );
+ } /* end for */
- return has_fill;
+ ret_val = has_fill;
out:
- HDfree( src_offset );
- return -1;
-
-}
+ if(src_offset)
+ HDfree(src_offset);
+
+ return ret_val;
+} /* end H5TBAget_fill() */
/*-------------------------------------------------------------------------
@@ -3161,90 +2948,75 @@ out:
*
* Comments:
*
-* Modifications:
-* May 08, 2003
-* In version 2.0 of Table, the number of records is stored as an
-* attribute "NROWS"
-* November 24, 2008
-* In version 3.0 of Table, "NROWS" was deprecated
-*
-*
*-------------------------------------------------------------------------
*/
-
-herr_t H5TBget_table_info ( hid_t loc_id,
+herr_t H5TBget_table_info(hid_t loc_id,
const char *dset_name,
hsize_t *nfields,
- hsize_t *nrecords )
+ hsize_t *nrecords)
{
- hid_t tid=-1;
- hid_t sid=-1;
- hid_t did=-1;
- int num_members;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t did = H5I_BADID;
hsize_t dims[1];
+ int num_members;
+ herr_t ret_val = -1;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- return -1;
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto out;
/* get the datatype */
- if ((tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
/* get the number of members */
- if ((num_members = H5Tget_nmembers( tid )) < 0)
+ if((num_members = H5Tget_nmembers(tid)) < 0)
goto out;
/*-------------------------------------------------------------------------
* get number of nfields
*-------------------------------------------------------------------------
*/
-
- if (nfields)
+ if(nfields)
*nfields = (hsize_t)num_members;
-
/*-------------------------------------------------------------------------
* get number of records
*-------------------------------------------------------------------------
*/
-
- if (nrecords)
- {
+ if(nrecords) {
/* get the dataspace handle */
- if ((sid = H5Dget_space( did )) < 0)
+ if((sid = H5Dget_space(did)) < 0)
goto out;
/* get dimension */
- if (H5Sget_simple_extent_dims( sid, dims, NULL) < 0)
+ if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* terminate access to the dataspace */
- if (H5Sclose( sid ) < 0)
+ if(H5Sclose(sid) < 0)
goto out;
+ sid = H5I_BADID;
*nrecords = dims[0];
- }
-
- /* close */
- if (H5Tclose( tid ) < 0)
- goto out;
- if (H5Dclose( did ) < 0)
- return -1;
+ } /* end if */
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Sclose(sid);
- H5Tclose(tid);
- } H5E_END_TRY;
- return -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
-}
+ return ret_val;
+} /* end H5TBget_table_info() */
/*-------------------------------------------------------------------------
* Function: H5TBget_field_info
@@ -3259,100 +3031,101 @@ out:
*
* Comments:
*
-* Modifications:
-*
-*
*-------------------------------------------------------------------------
*/
-herr_t H5TBget_field_info( hid_t loc_id,
+herr_t H5TBget_field_info(hid_t loc_id,
const char *dset_name,
char *field_names[],
size_t *field_sizes,
size_t *field_offsets,
- size_t *type_size )
+ size_t *type_size)
{
- hid_t did = -1; /* dataset ID */
- hid_t tid = -1; /* file type ID */
- hid_t n_tid = -1; /* native type ID */
- hid_t m_tid = -1; /* member type ID */
- hid_t nm_tid = -1; /* native member ID */
- hssize_t nfields;
- hssize_t i;
+ hid_t did = H5I_BADID; /* dataset ID */
+ hid_t tid = H5I_BADID; /* file type ID */
+ hid_t n_tid = H5I_BADID; /* native type ID */
+ hid_t m_tid = H5I_BADID; /* member type ID */
+ hid_t nm_tid = H5I_BADID; /* native member ID */
+ hssize_t nfields;
+ hssize_t i;
+ herr_t ret_val = -1;
/* open the dataset. */
- if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if (( tid = H5Dget_type( did )) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
- if ((n_tid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0)
+ if((n_tid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0)
goto out;
/* get the type size */
if(type_size)
- *type_size = H5Tget_size(n_tid);
+ if(0 == (*type_size = H5Tget_size(n_tid)))
+ goto out;
/* get the number of members */
- if (( nfields = H5Tget_nmembers( tid )) < 0)
+ if((nfields = H5Tget_nmembers(tid)) < 0)
goto out;
/* iterate tru the members */
- for ( i = 0; i < nfields; i++) {
+ for(i = 0; i < nfields; i++) {
/* get the member name */
if(field_names) {
- char *member_name;
+ char *member_name;
- member_name = H5Tget_member_name(tid, (unsigned)i);
+ if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
+ goto out;
strcpy(field_names[i], member_name);
H5free_memory(member_name);
} /* end if */
/* get the member type */
- if(( m_tid = H5Tget_member_type( tid,(unsigned) i )) < 0)
+ if((m_tid = H5Tget_member_type(tid, (unsigned)i)) < 0)
goto out;
- if((nm_tid = H5Tget_native_type(m_tid,H5T_DIR_DEFAULT)) < 0)
+ if((nm_tid = H5Tget_native_type(m_tid, H5T_DIR_DEFAULT)) < 0)
goto out;
/* get the member size */
if(field_sizes)
- field_sizes[i] = H5Tget_size(nm_tid);
+ if(0 == (field_sizes[i] = H5Tget_size(nm_tid)))
+ goto out;
/* get the member offset */
if(field_offsets)
field_offsets[i] = H5Tget_member_offset(n_tid, (unsigned) i);
/* close the member types */
- if (H5Tclose( m_tid ) < 0)
+ if(H5Tclose(m_tid) < 0)
goto out;
- if (H5Tclose( nm_tid ) < 0)
+ m_tid = H5I_BADID;
+ if(H5Tclose(nm_tid) < 0)
goto out;
- } /* i */
+ nm_tid = H5I_BADID;
+ } /* end for */
- /* close */
- if (H5Tclose( tid ) < 0)
- goto out;
- if (H5Tclose( n_tid ) < 0)
- goto out;
- if (H5Dclose( did ) < 0)
- return -1;
-
- return 0;
+ ret_val = 0;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Dclose(did);
- H5Tclose(tid);
- H5Tclose(n_tid);
- H5Tclose(m_tid);
- H5Tclose(nm_tid);
- } H5E_END_TRY;
- return -1;
+ if(tid > 0)
+ if(H5Tclose(tid) < 0)
+ ret_val = -1;
+ if(n_tid > 0)
+ if(H5Tclose(n_tid) < 0)
+ ret_val = -1;
+ if(m_tid > 0)
+ if(H5Tclose(m_tid) < 0)
+ ret_val = -1;
+ if(nm_tid > 0)
+ if(H5Tclose(nm_tid) < 0)
+ ret_val = -1;
+ if(did > 0)
+ if(H5Dclose(did) < 0)
+ ret_val = -1;
-}
+ return ret_val;
+} /* end H5TBget_field_info() */
/*-------------------------------------------------------------------------
*
@@ -3366,7 +3139,7 @@ out:
*
* Purpose: Find a string field
*
-* Return: Success: 0, Failure: -1
+* Return: Success: TRUE/FALSE, Failure: N/A
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -3374,28 +3147,25 @@ out:
*
*-------------------------------------------------------------------------
*/
-
static
-int H5TB_find_field( const char *field, const char *field_list )
+hbool_t H5TB_find_field(const char *field, const char *field_list)
{
const char *start = field_list;
const char *end;
- while ( (end = HDstrstr( start, "," )) != 0 )
- {
+ while((end = HDstrstr(start, ",")) != 0) {
ptrdiff_t count = end - start;
- if(HDstrncmp(start, field, (size_t)count) == 0 && (size_t)count == HDstrlen(field) )
- return 1;
+ if(HDstrncmp(start, field, (size_t)count) == 0 && (size_t)count == HDstrlen(field))
+ return TRUE;
start = end + 1;
- }
-
- if(HDstrcmp( start, field ) == 0 )
- return 1;
+ } /* end while */
- return -1;
-}
+ if(HDstrcmp(start, field) == 0)
+ return TRUE;
+ return FALSE;
+} /* end H5TB_find_field() */
/*-------------------------------------------------------------------------
* Function: H5TB_attach_attributes
@@ -3412,63 +3182,56 @@ int H5TB_find_field( const char *field, const char *field_list )
*
* Comments:
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
-
static
-herr_t H5TB_attach_attributes( const char *table_title,
+herr_t H5TB_attach_attributes(const char *table_title,
hid_t loc_id,
const char *dset_name,
hsize_t nfields,
- hid_t tid )
+ hid_t tid)
{
-
- char attr_name[255];
- char *member_name;
- char aux[255];
- hsize_t i;
+ char attr_name[255];
+ char *member_name = NULL;
+ hsize_t i;
+ herr_t ret_val = -1;
/* attach the CLASS attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, "CLASS", TABLE_CLASS ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, "CLASS", TABLE_CLASS) < 0)
goto out;
/* attach the VERSION attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, "VERSION", TABLE_VERSION ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, "VERSION", TABLE_VERSION) < 0)
goto out;
/* attach the TITLE attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, "TITLE", table_title ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, "TITLE", table_title) < 0)
goto out;
/* attach the FIELD_ name attribute */
- for ( i = 0; i < nfields; i++)
- {
-
+ for(i = 0; i < nfields; i++) {
/* get the member name */
- member_name = H5Tget_member_name( tid, (unsigned)i );
+ if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
+ goto out;
- strcpy( attr_name, "FIELD_" );
- sprintf( aux, "%d", (int)i );
- strcat( attr_name, aux );
- sprintf( aux, "%s", "_NAME" );
- strcat( attr_name, aux );
+ HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_NAME", (int)i);
/* attach the attribute */
- if (H5LTset_attribute_string( loc_id, dset_name, attr_name, member_name ) < 0)
+ if(H5LTset_attribute_string(loc_id, dset_name, attr_name, member_name) < 0)
goto out;
- H5free_memory( member_name );
-
- }
+ H5free_memory(member_name);
+ member_name = NULL;
+ } /* end for */
- return 0;
+ ret_val = 0;
out:
- return -1;
+ if(member_name)
+ H5free_memory(member_name);
-}
+ return ret_val;
+} /* end H5TB_attach_attributes() */
/*-------------------------------------------------------------------------
* Function: H5TB_create_type
@@ -3483,11 +3246,8 @@ out:
*
* Comments:
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
-
static
hid_t H5TB_create_type(hid_t loc_id,
const char *dset_name,
@@ -3496,85 +3256,75 @@ hid_t H5TB_create_type(hid_t loc_id,
const size_t *field_sizes,
hid_t ftype_id)
{
- hid_t mem_type_id;
- hid_t mtype_id=-1;
- hid_t nmtype_id=-1;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t mtype_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
size_t size_native;
- hsize_t nfields;
- char **fnames;
+ hsize_t nfields = 0;
+ char **fnames = NULL;
unsigned i;
+ herr_t ret_val = -1;
/* get the number of fields */
- if (H5TBget_table_info(loc_id,dset_name,&nfields,NULL) < 0)
- return -1;
+ if(H5TBget_table_info(loc_id, dset_name, &nfields, NULL) < 0)
+ goto out;
- if ((fnames = (char**) HDmalloc(sizeof(char*)*(size_t)nfields))==NULL)
- return -1;
+ if(NULL == (fnames = (char**)HDcalloc(sizeof(char*), (size_t)nfields)))
+ goto out;
- for ( i = 0; i < nfields; i++)
- {
- if ((fnames[i] = (char*) HDmalloc(sizeof(char)*HLTB_MAX_FIELD_LEN))==NULL)
- {
- HDfree(fnames);
- return -1;
- }
- }
+ for(i = 0; i < nfields; i++)
+ if(NULL == (fnames[i] = (char*)HDmalloc(HLTB_MAX_FIELD_LEN)))
+ goto out;
/* get field info */
- if (H5TBget_field_info(loc_id,dset_name,fnames,NULL,NULL,NULL) < 0)
+ if(H5TBget_field_info(loc_id, dset_name, fnames, NULL, NULL, NULL) < 0)
goto out;
/* create the memory data type */
- if ((mem_type_id=H5Tcreate(H5T_COMPOUND,type_size)) < 0)
+ if ((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* get each field ID and adjust its size, if necessary */
- for ( i = 0; i < nfields; i++)
- {
- if ((mtype_id = H5Tget_member_type(ftype_id,i)) < 0)
+ for(i = 0; i < nfields; i++) {
+ if((mtype_id = H5Tget_member_type(ftype_id, i)) < 0)
goto out;
- if ((nmtype_id = H5Tget_native_type(mtype_id,H5T_DIR_DEFAULT)) < 0)
+ if((nmtype_id = H5Tget_native_type(mtype_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- size_native = H5Tget_size(nmtype_id);
- if (field_sizes[i]!=size_native)
- {
- if (H5Tset_size(nmtype_id,field_sizes[i]) < 0)
+ if(0 == (size_native = H5Tget_size(nmtype_id)))
+ goto out;
+ if(field_sizes[i] != size_native)
+ if(H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
- }
- if (H5Tinsert(mem_type_id,fnames[i],field_offset[i],nmtype_id) < 0)
+ if(H5Tinsert(mem_type_id, fnames[i], field_offset[i], nmtype_id) < 0)
goto out;
- if (H5Tclose(mtype_id) < 0)
+ if(H5Tclose(mtype_id) < 0)
goto out;
- if (H5Tclose(nmtype_id) < 0)
+ mtype_id = H5I_BADID;
+ if(H5Tclose(nmtype_id) < 0)
goto out;
- }
-
- for ( i=0; i<nfields; i++)
- {
- HDfree (fnames[i]);
- }
- HDfree (fnames);
+ nmtype_id = H5I_BADID;
+ } /* end for */
- return mem_type_id;
+ ret_val = mem_type_id;
- /* error zone */
out:
- H5E_BEGIN_TRY
- {
- H5Tclose(mtype_id);
- H5Tclose(nmtype_id);
- } H5E_END_TRY;
- for ( i=0; i<nfields; i++)
- {
- if (fnames[i])
- HDfree (fnames[i]);
- }
- if (fnames)
- HDfree (fnames);
- return -1;
-
-}
+ if(fnames) {
+ for(i = 0; i < nfields; i++)
+ if(fnames[i])
+ HDfree(fnames[i]);
+ HDfree(fnames);
+ } /* end if */
+ if(mtype_id > 0)
+ if(H5Tclose(mtype_id) < 0)
+ ret_val = -1;
+ if(nmtype_id > 0)
+ if(H5Tclose(nmtype_id) < 0)
+ ret_val = -1;
+ if(ret_val < 0 && mem_type_id > 0)
+ H5Tclose(mem_type_id);
+ return ret_val;
+} /* end H5TB_create_type() */
/*-------------------------------------------------------------------------
*
@@ -3597,26 +3347,25 @@ out:
*
* Comments: Called by H5TBappend_records and H5PTappend_records
*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
-herr_t H5TB_common_append_records( hid_t dataset_id,
+herr_t H5TB_common_append_records(hid_t dataset_id,
hid_t mem_type_id,
size_t nrecords,
hsize_t orig_table_size,
- const void * buf)
+ const void *buf)
{
- hsize_t count[1];
- hsize_t offset[1];
hid_t sid = H5I_BADID;
hid_t m_sid = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
hsize_t dims[1];
hsize_t mem_dims[1];
+ herr_t ret_val = -1;
/* extend the dataset */
dims[0] = nrecords + orig_table_size;
- if (H5Dset_extent(dataset_id, dims) < 0)
+ if(H5Dset_extent(dataset_id, dims) < 0)
goto out;
/* create a simple memory data space */
@@ -3625,37 +3374,31 @@ herr_t H5TB_common_append_records( hid_t dataset_id,
goto out;
/* get a copy of the new file data space for writing */
- if ((sid = H5Dget_space(dataset_id)) < 0)
+ if((sid = H5Dget_space(dataset_id)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = orig_table_size;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* write the records */
- if (H5Dwrite( dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf ) < 0)
- goto out;
-
- /* close */
- if (H5Sclose( m_sid ) < 0)
- goto out;
- if (H5Sclose( sid ) < 0)
+ if(H5Dwrite(dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- return 0;
+ ret_val = 0;
out:
- H5E_BEGIN_TRY
- {
- H5Sclose(m_sid);
- H5Sclose(sid);
- }
- H5E_END_TRY;
- return -1;
-}
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+ return ret_val;
+} /* end H5TB_common_append_records() */
/*-------------------------------------------------------------------------
* Function: H5TB_common_read_records
@@ -3671,60 +3414,53 @@ out:
*
* Comments: Called by H5TBread_records and H5PTread_records
*
-* Modifications:
-*
-*
*-------------------------------------------------------------------------
*/
-herr_t H5TB_common_read_records( hid_t dataset_id,
+herr_t H5TB_common_read_records(hid_t dataset_id,
hid_t mem_type_id,
hsize_t start,
size_t nrecords,
hsize_t table_size,
void *buf)
{
- hsize_t count[1];
- hsize_t offset[1];
hid_t sid = H5I_BADID;
hid_t m_sid = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
hsize_t mem_size[1];
+ herr_t ret_val = -1;
/* make sure the read request is in bounds */
- if (start + nrecords > table_size )
+ if(start + nrecords > table_size)
goto out;
/* get the dataspace handle */
- if ((sid = H5Dget_space( dataset_id )) < 0)
+ if((sid = H5Dget_space(dataset_id)) < 0)
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start;
count[0] = nrecords;
- if (H5Sselect_hyperslab( sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0)
- goto out;
- if ((H5Dread( dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf)) < 0)
- goto out;
-
- /* close */
- if (H5Sclose( m_sid ) < 0)
+ if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if (H5Sclose( sid ) < 0)
+ if((H5Dread(dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf)) < 0)
goto out;
- return 0;
+ ret_val = 0;
out:
- H5E_BEGIN_TRY
- {
- H5Sclose(sid);
- H5Sclose(m_sid);
- }
- H5E_END_TRY;
- return -1;
-}
+ if(m_sid > 0)
+ if(H5Sclose(m_sid) < 0)
+ ret_val = -1;
+ if(sid > 0)
+ if(H5Sclose(sid) < 0)
+ ret_val = -1;
+
+ return ret_val;
+} /* end H5TB_common_read_records() */
diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am
index 34245ee..1e781a9 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
-# 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
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 91ca7de..dc575e1 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
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 = 174
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
-# 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
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index fda388a..7d632cc 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -9,9 +9,9 @@
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_TEST hl_name files)
- add_test (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ add_test (NAME HL_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
# --------------------------------------------------------------------
@@ -32,7 +32,7 @@ ENDMACRO (HL_ADD_TEST)
# Remove any output file left over from previous test run
add_test (
- NAME hl_test-clear-objects
+ NAME HL_test-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
combine_tables1.h5
@@ -61,9 +61,9 @@ add_test (
test_table.h5
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (HL_test-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
-set (last_test "hl_test-clear-objects")
+set (last_test "HL_test-clear-objects")
HL_add_test (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
HL_add_test (test_dset_opt "")
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index baa7748..0bb4abe 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -537,7 +537,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/test/test_image.c b/hl/test/test_image.c
index 814b351..5d68eeb 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -771,9 +771,9 @@ out:
*-------------------------------------------------------------------------
*/
-static int read_data( const char* fname, /*IN*/
+static int read_data(const char* fname, /*IN*/
hsize_t *width, /*OUT*/
- hsize_t *height /*OUT*/ )
+ hsize_t *height /*OUT*/)
{
int i, n;
int color_planes;
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index 1ae1227..5247b54 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/perform/CMakeLists.txt b/perform/CMakeLists.txt
index df7526e..6887c60 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_PERFORM )
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Setup include Directories
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_standalone.h b/perform/sio_standalone.h
index b407ecb..b2f8220 100644
--- a/perform/sio_standalone.h
+++ b/perform/sio_standalone.h
@@ -79,6 +79,7 @@
#endif /* H5_HAVE_ALARM */
#define HDasctime(T) asctime(T)
#define HDasin(X) asin(X)
+#define HDasprintf asprintf /*varargs*/
#define HDassert(X) assert(X)
#define HDatan(X) atan(X)
#define HDatan2(X,Y) atan2(X,Y)
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..31e3917 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -1,154 +1,244 @@
************************************************************************
-* Build and Install HDF5 C/C++ Library with CMake *
+* Build and Install HDF5 C, C++, Fortran and High-Level Libraries *
+* and tools with CMake *
************************************************************************
Table of Contents
-Section I: Quick Step Building HDF5 Libraries with CMake Script Mode
-Section II: Quick Step Building HDF5 Libraries with CMake Command Mode
-Section III: Preconditions
-Section IV: Building HDF5 C/C++ Libraries with CMake
-Section V: All Options for HDF5 C/C++ Libraries with CMake
-Section VI: User Defined Options for HDF5 Libraries with CMake
-Section VII: APPENDIX
+Section I: Preconditions
+Section II: Quick Step Building HDF5 Libraries with CMake Script Mode
+Section III: Quick Step Building HDF5 Libraries with CMake Command Mode
+Section IV: Further considerations
+Section V: Options for building HDF5 Libraries with CMake command line
+Section VI: CMake option defaults for HDF5
+Section VII: User Defined Options for HDF5 Libraries with CMake
+Section VIII: Options for platform configuration files
************************************************************************
+========================================================================
+I. Preconditions
+========================================================================
+Obtaining HDF5 source code
+ 1. Create a directory for your development; for example, "myhdfstuff".
+
+ 2. Obtain compressed (*.tar or *.zip) HDF5 source from
+ http://www.hdfgroup.org/ftp/HDF5/current/src/
+ and put it in "myhdfstuff".
+ Do not uncompress.
+
+CMake version
+ 1. We suggest you obtain the latest CMake from the Kitware web site.
+ The HDF5 1.8."X" product requires a minimum CMake version 2.8.12,
+ where "X" is the current HDF5 release version.
+
========================================================================
-I. Quick Step Building HDF5 Libraries with CMake Script Mode
+II. Quick Step Building HDF5 Libraries with CMake Script Mode
========================================================================
This short set of instructions is written for users who want to quickly
-build the HDF5 Library and tools from the HDF5 source code package
-using the CMake tools. HDF Group recommends using a ctest script to build
-HDF5.
+build the HDF5 C, C++, Fortran, and High-level shared libraries and tools
+from the HDF5 source code package using the CMake tools. This procedure
+will use the default settings in the config/cmake/cacheinit.cmake file.
+HDF Group recommends using the ctest script mode to build HDF5.
-To build HDF5 with the SZIP and ZLIB external libraries you will need to:
+The following files referenced below are available at the HDF web site:
+ http://www.hdfgroup.org/HDF5/release/cmakebuild.html
+
+CMake build script:
+ CTestScript.cmake
- 1. Create a directory for your development; myhdfstuff.
+External compression szip and zlib libraries:
+ SZip.tar.gz
+ ZLib.tar.gz
- 2. Create a directory for the HDF5 source; hdf5-1.8 in myhdfstuff.
+Platform configuration files:
+ HDF518Windows64CMake.cmake
+ HDF518Windows32CMake.cmake
+ HDF518LinuxCMake.cmake
+ HDF518MacCMake.cmake
- 3. Download the SZip.tar.gz and ZLib.tar.gz to your development directory,
- (See Section VII: APPENDIX for instructions). Both are needed if
- building with external libraries; do not uncompress them.
+To build HDF5 with the SZIP and ZLIB external libraries you will need to:
+
+ 1. Change to the development directory "myhdfstuff".
+
+ 2. Download the SZip.tar.gz and ZLib.tar.gz to "myhdfstuff".
+ Do not uncompress the files.
- 4. Download or create the CTestScript.cmake file in your development
- directory, (See Section VII: APPENDIX for instructions and an example).
-
- 5. Download or create a platform configuration file in your development
- directory, (See Section VII: APPENDIX for instructions and an example).
- This file calls CTestScript.cmake; the platform configuration file can
- be modified. CTestScript.cmake file should not be modified.
+ 3. Download the CTestScript.cmake file to "myhdfstuff".
+ CTestScript.cmake file should not be modified.
+
+ 4. Download a platform configuration file to "myhdfstuff".
+ Do not modify the file unless you want to change default build
+ environment.
- 6. From your development directory execute the CTest Script with the
- following options:
+ 5. From the "myhdfstuff" directory execute the CTest Script with the
+ following options:
- ctest -S <configuration file>,<hdf5src> -C RelWithDebInfo -VV -O hdf5.log
+ ctest -S <configuration file> -C Release -VV -O hdf5.log
- 7. This will create an install package in the myhdfstuff/hdf5-1.8/build folder.
+ The command above will configure, build, test, and create an install
+ package in the myhdfstuff/hdf5-1.8/build folder.
- Where:
- "configuration file" is the platform configuration file from step6;
- HDF518WindowsRWDICMake.cmake, HDF518LinuxRWDICMake.cmake, or
- HDF518MacRWDICMake.cmake can be downloaded from the HDF Group website.
- "hdf5src" is the uncompressed HDF5 source code directory. No path
- should be specified.
-
- The -S option uses the script version of ctest.
+ The -S option uses the script version of ctest.
- The value for the -C option (as shown above, "-C RelWithDebInfo") must
- match the setting for CTEST_BUILD_CONFIGURATION in the platform
- configuration file.
+ The value for the -C option (as shown above, "-C Release") must
+ match the setting for CTEST_BUILD_CONFIGURATION in the platform
+ configuration file.
- The -VV option is for verbose; Use -V for less verbose.
+ The -VV option is for verbose; use -V for less verbose.
- The "-O hdf5.log" option saves the output to a log file hdf5.log.
+ The "-O hdf5.log" option saves the output to a log file hdf5.log.
+ 6. To install, "X" is the current release version
+
+ On Windows, execute:
+ HDF5-1.8."X"-win32.exe or HDF5-1.8."X"-win64.exe
+ By default this program will install the hdf5 library into the
+ "C:\Program Files" directory and will create the following
+ directory structure:
+ HDF_Group
+ --HDF5
+ ----1.8."X"
+ ------bin
+ ------include
+ ------lib
+ ------cmake
+
+ On Linux, change to the install destination directory
+ (create it if doesn't exist) and execute:
+ <path-to>/myhdfstuff/hdf5-1.8/build/HDF5-1.8."X"-Linux.sh
+ After accepting the license, the script will prompt:
+ By default the HDF5 will be installed in:
+ "<current directory>/HDF5-1.8."X"-Linux"
+ Do you want to include the subdirectory HDF5-1.8."X"-Linux?
+ Saying no will install in: "<current directory>" [Yn]:
+ Note that the script will create the following directory structure
+ relative to the install point:
+ HDF_Group
+ --HDF5
+ ----1.8."X"
+ ------bin
+ ------include
+ ------lib
+ ------share
+
+ On Mac you will find HDF5-1.8."X"-Darwin.dmg in the build folder. Click
+ on the dmg file to proceed with installation. After accepting the license,
+ there will be a folder with the following structure:
+ HDF_Group
+ --HDF5
+ ----1.8."X"
+ ------bin
+ ------include
+ ------lib
+ ------share
+
+ By default the installation will create the bin, include, lib and cmake
+ folders in the <install destination directory>/HDF_Group/HDF5/1.8.
========================================================================
-II. Quick Step Building HDF5 Libraries with CMake
+III. Quick Step Building HDF5 C Static Libraries and Tools with CMake
========================================================================
Notes: This short set of instructions is written for users who want to
- quickly build the HDF5 Library and tools from the HDF5 source code
- package using the CMake command line tools.
+ quickly build the just the HDF5 C static library and tools from
+ the HDF5 source code package using the CMake command line tools.
- A. Windows Quick Step Building HDF5 Libraries with CMake Using VS2010
+ Go through these steps:
- Go through these steps:
+ 1. Change to the development directory "myhdfstuff".
- 1. Locate the source files in:
- c:\MyHDFstuff\hdf5
-
- 2. Create a build folder at:
- c:\MyHDFstuff\hdf5\build
-
- 3. Open a command prompt at:
- 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 ..
- The two dots on the end of the command is the location of the source.
- The CMAKE_BUILD_TYPE must match the configuration type.
+ 2. Uncompress the HDF5 source file
- 5. Build the C library, tools and tests with this command:
- cmake --build . --config Release
+ 3. Create a folder "build" in the "myhdfstuff" directory.
- 6. Test the C library and tools with this command:
- ctest . -C Release
+ 4. Change into the "build" folder.
- 7. Create an install image with this command:
- cpack -C Release CPackConfig.cmake
-
- 8. Install with this command:
- HDF5-1.8.12-win32.exe
-
- B. Linux Quick Step Building HDF5 Libraries with CMake Using GCC
+ 5. Configure the C library, tools and tests with one of the following commands:
- Go through these steps:
+ On Windows 32 bit
+ cmake -G "Visual Studio 11" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
- 1. Locate the source files in:
- ~/MyHDFstuff/hdf5
-
- 2. Create a build folder at:
- ~/MyHDFstuff/hdf5/build
-
- 3. Open a command prompt at:
- ~/MyHDFstuff/hdf5/build
-
- 4. Configure the C library, tools and tests with this command:
- cmake -G "Unix Makefiles" -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.
-
- 5. Build the C library, tools and tests with this command:
- cmake --build . --config Release
+ On Windows 64 bit
+ cmake -G "Visual Studio 11 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
- 6. Test the C library and tools with this command:
- ctest . -C Release
+ On Linux and Mac
+ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.8."X"
+
+ where "X" is the current release version.
+
+ 6. Build the C library, tools and tests with this command:
+ cmake --build . --config Release
- 7. Create an install image with this command:
- cpack -C Release CPackConfig.cmake
+ 7. Test the C library and tools with this command:
+ ctest . -C Release
- 8. Install with this command:
- HDF5-1.8.12-Linux.sh
+ 8. Create an install image with this command:
+ cpack -C Release CPackConfig.cmake
-
+ 9. To install
+ On Windows, execute:
+ HDF5-1.8."X"-win32.exe or HDF5-1.8."X"-win64.exe
+ By default this program will install the hdf5 library into the
+ "C:\Program Files" directory and will create the following
+ directory structure:
+ HDF_Group
+ --HDF5
+ ----1.8."X"
+ ------bin
+ ------include
+ ------lib
+ ------cmake
+
+ On Linux, change to the install destination directory
+ (create if doesn't exist) and execute:
+ <path-to>/myhdfstuff/build/HDF5-1.8."X"-Linux.sh
+ After accepting the license, the script will prompt:
+ By default the HDF5 will be installed in:
+ "<current directory>/HDF5-1.8."X"-Linux"
+ Do you want to include the subdirectory HDF5-1.8."X"-Linux?
+ Saying no will install in: "<current directory>" [Yn]:
+ Note that the script will create the following directory structure
+ relative to the install point:
+ HDF_Group
+ --HDF5
+ ----1.8."X"
+ ------bin
+ ------include
+ ------lib
+ ------share
+
+ On Mac you will find HDF5-1.8."X"-Darwin.dmg in the build folder. Click
+ on the dmg file to proceed with installation. After accepting the license,
+ there will be a folder with the following structure:
+ HDF_Group
+ --HDF5
+ ----1.8."X"
+ ------bin
+ ------include
+ ------lib
+ ------share
========================================================================
-III. Preconditions
+IV. Further considerations
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires a minimum CMake version 2.8.12.
+ web site. The HDF5 1.8."X" product requires a minimum CMake version 2.8.12.
2. If you plan to use Zlib or Szip:
A. Download the binary packages and install them in a central location.
For example on Windows, create a folder extlibs and install the
- packages there.
+ packages there. Add the following CMake options:
+ -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib
+ -DZLIB_INCLUDE_DIR:PATH=some_location/include
+ -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib
+ -DSZIP_INCLUDE_DIR:PATH=some_location/include
+ where "some_location" is the full path to the extlibs folder.
+
B. Use source packages from an SVN server by adding the following CMake
options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
@@ -156,6 +246,7 @@ III. Preconditions
SZIP_SVN_URL:STRING="http://some_location/szip/trunk"
where "some_location" is the URL to the SVN repository. Also set
CMAKE_BUILD_TYPE to the configuration type.
+
C. Use source packages from a compressed file by adding the following
CMake options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
@@ -168,10 +259,10 @@ III. Preconditions
3. If you are building on Apple Darwin platforms, you should add the
following options:
- Compiler choice - use xcode by setting the ENV variables of CC and CXX
- Shared fortran is not supported, build static:
+ Compiler choice - use xcode by setting the ENV variables of CC and CXX
+ Shared fortran is not supported, build static:
BUILD_SHARED_LIBS:BOOL=OFF
- Additional options:
+ Additional options:
CMAKE_ANSI_CFLAGS:STRING=-fPIC
CTEST_USE_LAUNCHERS:BOOL=ON
CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
@@ -184,7 +275,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 ..
@@ -213,25 +304,24 @@ Notes: CMake and HDF5
Notes: CMake in General
1. More information about using CMake can be found at the KitWare site at
- www.cmake.org.
+ www.cmake.org.
2. CMake uses the command line; however, the visual CMake tool is
available for the configuration step. The steps are similar for
all the operating systems supported by CMake.
-
========================================================================
-IV. Building HDF5 C/C++ Libraries with CMake
+V. Options for Building HDF5 Libraries with the CMake Command Line
========================================================================
-To build the HDF5 C/C++ Libraries with CMake, go through these five steps:
+To build the HDF5 Libraries with CMake, go through these five steps:
1. Run CMake
2. Configure the cache settings
3. Build HDF5
4. Test HDF5
- 5. Packaging HDF5 (create install image)
+ 5. Package HDF5 (create install image)
These five steps are described in detail below.
@@ -255,29 +345,22 @@ These five steps are described in detail below.
RECOMMENDED:
Users can perform the configuration step without using the visual
cmake-gui program. We use the file cacheinit.cmake in the
- config/cmake folder for our testing. This file enables all the
+ config/cmake source folder for our testing. This file enables all of the
basic options and we turn specific options on or off for testing
using the following command line within the build directory:
cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>" [-D<options>] <sourcepath>
Where <generator> is
- * 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>
@@ -316,11 +399,11 @@ These five steps are described in detail below.
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" 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)
@@ -332,7 +415,7 @@ These five steps are described in detail below.
2.1 Visual CMake users, click the Configure button. If this is the first time you are
running cmake-gui in this directory, you will be prompted for the
- generator you wish to use (for example on Windows, Visual Studio 9 2008).
+ generator you wish to use (for example on Windows, Visual Studio 11).
CMake will read in the CMakeLists.txt files from the source directory and
display options for the HDF5 project. After the first configure you
can adjust the cache settings and/or specify the locations of other programs.
@@ -350,7 +433,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 ..
@@ -439,7 +522,7 @@ These five steps are described in detail below.
installation and needs.
7. More information about using CMake can be found at the KitWare site,
- www.cmake.org.
+ www.cmake.org.
8. Nullsoft Scriptable Install System
The Nullsoft Scriptable Install System (NSIS) is an open source installation
@@ -452,11 +535,12 @@ These five steps are described in detail below.
========================================================================
-V. All Options for HDF5 C/C++ Libraries with CMake
+VI. CMake Option Defaults for HDF5
========================================================================
In the options listed below, there are three columns of information:
-Option Name, Option Description, and Option Default.
+Option Name, Option Description, and Option Default.
+The config/cmake/cacheinit.cmake file overrides the following values.
---------------- General Build Options ---------------------
BUILD_SHARED_LIBS "Build Shared Libraries" OFF
@@ -492,7 +576,6 @@ HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries"
HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
-HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
@@ -503,8 +586,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"
@@ -527,7 +608,7 @@ endif (WINDOWS)
========================================================================
-VI. User Defined Options for HDF5 Libraries with CMake
+VII. User Defined Options for HDF5 Libraries with CMake
========================================================================
Support for User Defined macros and options has been added. The file
@@ -540,384 +621,125 @@ UserMacros.cmake file. Then enable the option to the CMake configuration,
build and test process.
========================================================================
-VII. APPENDIX
+VIII. Options for Platform Configuration Files
========================================================================
-Below are examples of the ctest scripts used by The HDF Group.
-See the script, cmakehdf5, in the bin folder for a smaller and limited
-function shell script version of the following general scripts.
+Below is the HDF518LinuxCmake.cmake ctest script with extra comments.
The example is for a linux machine, but the same scripts can be used on
a Windows machine by adjusting the CTEST_CMAKE_GENERATOR option in the
-product specific script.
-
-NOTE: these files are available at the HDF web site:
- http://www.hdfgroup.org/HDF5/release/cmakebuild.html
-
- CTestScript.cmake
- SZip.tar.gz
- ZLib.tar.gz
-
- HDF518WindowsRWDICMake.cmake
- HDF518LinuxRWDICMake.cmake
-
-
-========================================================================
-CTestScript.cmake
-========================================================================
-
-The CTestScript.cmake script, shown below, is a common ctest script that
-is used to build, test, and package HDF5 Library files.
-
-
-
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
-########################################################
-# This dashboard is maintained by The HDF Group
-# For any comments please contact cdashhelp@hdfgroup.org
-#
-########################################################
-# -----------------------------------------------------------
-# -- Get environment
-# -----------------------------------------------------------
-if(NOT SITE_OS_NAME)
- ## machine name not provided - attempt to discover with uname
- ## -- set hostname
- ## --------------------------
- find_program(HOSTNAME_CMD NAMES hostname)
- exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
- set(CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
- find_program(UNAME NAMES uname)
- macro(getuname name flag)
- exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
- endmacro(getuname)
-
- getuname(osname -s)
- getuname(osrel -r)
- getuname(cpu -m)
- message("Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
-
- set(CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if(USE_AUTOTOOLS)
- set(CTEST_BUILD_NAME "AT-${CTEST_BUILD_NAME}")
- endif(USE_AUTOTOOLS)
- if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
- endif(SITE_BUILDNAME_SUFFIX)
- set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
-else(NOT SITE_OS_NAME)
- ## machine name provided
- ## --------------------------
- if(CMAKE_HOST_UNIX)
- set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
- else(CMAKE_HOST_UNIX)
- set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
- endif(CMAKE_HOST_UNIX)
- if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME ${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX})
- endif(SITE_BUILDNAME_SUFFIX)
- set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
-endif(NOT SITE_OS_NAME)
-
-#-----------------------------------------------------------------------------
-# 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)
-
-#-----------------------------------------------------------------------------
-## cygwin does not handle the find_package() call
-## --------------------------
-if(NOT SITE_CYGWIN})
- find_package (Subversion)
- set(CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
-else(NOT SITE_CYGWIN})
- set(CTEST_UPDATE_COMMAND "/usr/bin/svn")
-endif(NOT SITE_CYGWIN})
-
-#-----------------------------------------------------------------------------
-set(NEED_REPOSITORY_CHECKOUT 0)
-set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-if(CTEST_USE_TAR_SOURCE)
- ## Uncompress source if tar file provided
- ## --------------------------
- if(WIN32)
- set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe")
- message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else(WIN32)
- message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND tar -xvf ${CTEST_USE_TAR_SOURCE}.tar 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_USE_TAR_SOURCE} failed")
- endif(NOT rv EQUAL 0)
-
- file(RENAME ${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
- set(LOCAL_SKIP_UPDATE "TRUE")
-else(CTEST_USE_TAR_SOURCE)
- ## use subversion to get source
- ## --------------------------
- if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set(NEED_REPOSITORY_CHECKOUT 1)
- endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-
- if(${NEED_REPOSITORY_CHECKOUT})
- set(CTEST_CHECKOUT_COMMAND
- "${CTEST_UPDATE_COMMAND} co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r HEAD")
- else(${NEED_REPOSITORY_CHECKOUT})
- set(CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} update")
- endif(${NEED_REPOSITORY_CHECKOUT})
-endif(CTEST_USE_TAR_SOURCE)
-
-#-----------------------------------------------------------------------------
-## Clear the build directory
-## --------------------------
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-#include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
-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()
-
-#-----------------------------------------------------------------------------
-# Send the main script as a note.
-if(USE_AUTOTOOLS)
- ## autotools builds need to use make and does not use the cacheinit.cmake file
- ## -- make command
- ## -----------------
- find_program(MAKE NAMES make)
-
- list(APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- )
-else(USE_AUTOTOOLS)
- list(APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
- )
-endif(USE_AUTOTOOLS)
-
-#-----------------------------------------------------------------------------
-# Check for required variables.
-# --------------------------
-foreach(req
- CTEST_CMAKE_GENERATOR
- CTEST_SITE
- CTEST_BUILD_NAME
- )
- if(NOT DEFINED ${req})
- message(FATAL_ERROR "The containing script must set ${req}")
- endif(NOT DEFINED ${req})
-endforeach(req)
-
-#-----------------------------------------------------------------------------
-# Initialize the CTEST commands
-#------------------------------
-if(USE_AUTOTOOLS)
- set(CTEST_CONFIGURE_COMMAND "${CTEST_SOURCE_DIRECTORY}/configure ${ADD_BUILD_OPTIONS}")
- set(CTEST_BUILD_COMMAND "${MAKE} ${CTEST_BUILD_FLAGS}")
- ## -- CTest Config
- #configure_file($ENV{HOME}/CTestConfiguration/CTestConfig.cmake ${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
- ## -- CTest Testfile
-# configure_file(${CTEST_SCRIPT_DIRECTORY}/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
- file(WRITE ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake "ADD_TEST(makecheck \"${MAKE}\" \"${CTEST_BUILD_FLAGS}\" \"-i\" \"check\")")
-else(USE_AUTOTOOLS)
- if(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
- else(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
- 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}\""
- )
- endif(LOCAL_MEMCHECK_TEST)
-endif(USE_AUTOTOOLS)
-
-#-----------------------------------------------------------------------------
-## -- set output to english
-set($ENV{LC_MESSAGES} "en_EN")
-
-# Print summary information.
-foreach(v
- CTEST_SITE
- CTEST_BUILD_NAME
- CTEST_SOURCE_DIRECTORY
- CTEST_BINARY_DIRECTORY
- CTEST_CMAKE_GENERATOR
- CTEST_BUILD_CONFIGURATION
- CTEST_GIT_COMMAND
- CTEST_CHECKOUT_COMMAND
- CTEST_CONFIGURE_COMMAND
- CTEST_SCRIPT_DIRECTORY
- CTEST_USE_LAUNCHERS
- )
- set(vars "${vars} ${v}=[${${v}}]\n")
-endforeach(v)
-message("Dashboard script configuration:\n${vars}\n")
-
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
- ## NORMAL process
- ## -- LOCAL_UPDATE updates the source folder from svn
- ## -- LOCAL_SUBMIT reports to CDash server
- ## -- LOCAL_SKIP_TEST skips the test process (only builds)
- ## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
- ## -- LOCAL_COVERAGE_TEST executes code coverage process
- ## --------------------------
- CTEST_START (${MODEL} TRACK ${MODEL})
- if(LOCAL_UPDATE)
- CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
- endif(LOCAL_UPDATE)
- CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
- CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
- if(LOCAL_SUBMIT)
- CTEST_SUBMIT (PARTS Update Configure Notes)
- endif(LOCAL_SUBMIT)
- CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if(LOCAL_SUBMIT)
- CTEST_SUBMIT (PARTS Build)
- endif(LOCAL_SUBMIT)
- if(NOT LOCAL_SKIP_TEST)
- if(NOT LOCAL_MEMCHECK_TEST)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
- if(LOCAL_SUBMIT)
- CTEST_SUBMIT (PARTS Test)
- endif(LOCAL_SUBMIT)
- if(res GREATER 0)
- message(FATAL_ERROR "Failed tests: ${res}\n")
- endif(res GREATER 0)
- else(NOT LOCAL_MEMCHECK_TEST)
- CTEST_MEMCHECK (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if(LOCAL_SUBMIT)
- CTEST_SUBMIT (PARTS MemCheck)
- endif(LOCAL_SUBMIT)
- endif(NOT LOCAL_MEMCHECK_TEST)
- if(LOCAL_COVERAGE_TEST)
- CTEST_COVERAGE (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if(LOCAL_SUBMIT)
- CTEST_SUBMIT (PARTS Coverage)
- endif(LOCAL_SUBMIT)
- endif(LOCAL_COVERAGE_TEST)
- endif(NOT LOCAL_SKIP_TEST)
- if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
- ##-----------------------------------------------
- ## Package the product
- ##-----------------------------------------------
- execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
- RESULT_VARIABLE cpackResult
- OUTPUT_VARIABLE cpackLog
- ERROR_VARIABLE cpackLog.err
- )
- file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- if(cpackResult GREATER 0)
- message(FATAL_ERROR "Failed packaging: ${cpackResult}\n")
- endif(cpackResult GREATER 0)
- endif(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
-#-----------------------------------------------------------------------------
-
-message("DONE:CTestScript")
-
-
-========================================================================
-ctest
-========================================================================
-
-Below is an example of the ctest script used by The HDF Group. The
-CTestScript.cmake file used by this script is shown above. Adjust the values
-as necessary. Note that the source folder is entered on the command line
-and the build folder is created as a sub-folder.
-
+platform configuration script.
############################################################################
-# Product specific script, HDF518Static.cmake, that uses the
-# CTestScript.cmake file (see above). Usage:
-# "ctest -S HDF518Static.cmake,hdf518 -C Release -O hdf518static.log"
-# where hdf518 is the source folder relative to the location of these scripts
+# Product specific script, HDF518LinuxCmake.cmake, that uses the
+# CTestScript.cmake file. Usage:
+# "ctest -S HDF518LinuxCmake.cmake -C Release -O hdf518shared.log"
############################################################################
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+
+# this is the location of the source hardcoded to hdf5-1.8.13
+set(CTEST_SOURCE_NAME hdf5-1.8.13)
+# this is the location of the source with ctest parameter hdf5src
+# "ctest -S HDF518LinuxCmake.cmake,hdf5src -C Release -O hdf518static.log"
set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
+
+# this is the location of the build directory
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
+
+# this is the directory the script is executed from
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
+
+# this is the full path of the source directory
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+
+# this is the full path of the build directory
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-set(MODEL "Experimental")
-####### Following Line is one of [Release, RelWithDebInfo, Debug] #############
-set(CTEST_BUILD_CONFIGURATION "RelWithDebInfo")
-######### Following describes computer ############
-set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+###################################################################
+### Following Line is one of [Release, RelWithDebInfo, Debug] #####
+set(CTEST_BUILD_CONFIGURATION "Release")
+###################################################################
+
+###################################################################
+######### Following describes compiler ############
+# this is for linux
+set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+# this is for windows 32 bit
+#set(CTEST_CMAKE_GENERATOR "Visual Studio 11")
+# this is for windows 64 bit
+#set(CTEST_CMAKE_GENERATOR "Visual Studio 11 Win64")
+# Visual Studio 2013 is 12, Visual Studio 2012 is 11, Visual Studio 2010 is 10
+###################################################################
+
+###################################################################
+######### Following is for submission to CDash ############
+###################################################################
+set(MODEL "Experimental")
+######### Following describes computer ############
## Set the following to unique id your computer ##
set(CTEST_SITE "LINUX.XXXX")
-## following is optional to describe build ##
-set(SITE_BUILDNAME_SUFFIX "RWDI-SHARED")
-####################################################
+## following is optional to describe build ##
+set(SITE_BUILDNAME_SUFFIX "SHARED")
-##### Following controls CDash submission #####
+######### Following controls CDash submission ##########
#set(LOCAL_SUBMIT "TRUE")
-##### Following controls test process #####
+######### Following controls test process ##########
#set(LOCAL_SKIP_TEST "TRUE")
#set(LOCAL_MEMCHECK_TEST "TRUE")
#set(LOCAL_COVERAGE_TEST "TRUE")
-##### Following controls cpack command #####
-set(LOCAL_NO_PACKAGE "TRUE")
-##### Following controls source update #####
+######### Following controls cpack command ##########
+#set(LOCAL_NO_PACKAGE "TRUE")
+######### Following controls source update ##########
#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")
-############################################
+######### Following controls source repository ##########
+#set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
+#comment to use a uncompressed source folder
+set(CTEST_USE_TAR_SOURCE "hdf5-1.8.13")
+###################################################################
+###################################################################
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-### uncomment and change the following line for more configuration options
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:XXX=XXX")
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
+
+### uncomment/comment and change the following lines for configuration options
+
### uncomment the following line to build static libraries
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+
+#### ext libraries ####
+### ext libs from tgz
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
### ext libs from svn
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=SVN")
-### ext libs from tgz for 1.8.12 and after
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
-### ext libs from tgz for 1.8.11 and before
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS}-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZ_PATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
+### ext libs on system
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
+
+#### fortran ####
+### enable Fortran 2003
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
+### disable Fortran
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+
### Create install package with external libraries (szip, zlib)
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+
### disable test program builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+
### disable packaging
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
-############################################
+
+### disable building examples
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_EXAMPLES:BOOL=OFF")
+
+### disable building tests
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+
+### change install prefix
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=install")
+###################################################################
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
diff --git a/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt
index d78cd85..a7e5f67 100644
--- a/release_docs/INSTALL_Cygwin.txt
+++ b/release_docs/INSTALL_Cygwin.txt
@@ -234,7 +234,7 @@ Install HDF5 on Cygwin
8. Known Problems
dt_arith tests may fail due to the use of fork. This is a known issue
- with cygwin on windows.
+ with cygwin on Windows.
-----------------------------------------------------------------------
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 005b793..95cd578 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.176 currently under development
+HDF5 version 1.9.184 currently under development
================================================================================
@@ -41,6 +41,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
@@ -428,6 +431,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
@@ -678,11 +686,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)
@@ -754,6 +765,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
-------------
@@ -786,6 +807,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
@@ -1134,33 +1159,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
@@ -1191,12 +1221,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
@@ -1231,18 +1255,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-
@@ -1255,18 +1281,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.
@@ -1276,6 +1304,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..8d09b22 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
@@ -182,8 +175,8 @@ These steps are described in more detail below.
III. Minimum C Project Files for CMake
========================================================================
- 6. Create a CMakeLists.txt file at the source root. Include the
- following text in the file:
+Create a CMakeLists.txt file at the source root. Include the
+following text in the file:
##########################################################
cmake_minimum_required (VERSION 2.8.12)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 565e030..2a31609 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# List Source Files
@@ -783,8 +783,16 @@ set (H5_PRIVATE_HEADERS
# Setup the H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
-add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
-TARGET_C_PROPERTIES (H5detect " " " ")
+#add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
+#TARGET_C_PROPERTIES (H5detect " " " ")
+IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ SET (LOCAL_OPT_FLAG "-O0")
+ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ SET (LOCAL_OPT_FLAG " ")
+ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
+TARGET_C_PROPERTIES (H5detect ${LOCAL_OPT_FLAG} " ")
+
if (MSVC OR MINGW)
target_link_libraries (H5detect "ws2_32.lib")
endif (MSVC OR MINGW)
@@ -812,26 +820,43 @@ add_custom_command (
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
-add_custom_command (
- TARGET ${HDF5_BINARY_DIR}/H5Edefin.h
- PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt
- COMMENT " Creating err headers"
-)
-
-add_custom_command (
- TARGET ${HDF5_BINARY_DIR}/H5version.h
- PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt
- COMMENT " Creating API version macro"
-)
-
-add_custom_command (
- TARGET ${HDF5_BINARY_DIR}/H5overflow.h
- PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt
- COMMENT " Creating Assignment overflow macro"
-)
+if (GENERATE_ERROR_HEADERS)
+ find_pacakge (Perl)
+ if (PERL_FOUND)
+ add_custom_command (
+ OUTPUT ${HDF5_BINARY_DIR}/H5Edefin.h
+ PRE_BUILD
+ COMMAND ${PERL_EXECUTABLE}
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt
+ DEPENDS ${HDF5_SOURCE_DIR}/src/H5err.txt
+ COMMENT " Creating err header"
+ )
+
+ add_custom_command (
+ OUTPUT ${HDF5_BINARY_DIR}/H5version.h
+ PRE_BUILD
+ COMMAND ${PERL_EXECUTABLE}
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt
+ DEPENDS ${HDF5_SOURCE_DIR}/src/H5vers.txt
+ COMMENT " Creating API version macro"
+ )
+
+ add_custom_command (
+ OUTPUT ${HDF5_BINARY_DIR}/H5overflow.h
+ PRE_BUILD
+ COMMAND ${PERL_EXECUTABLE}
+ ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt
+ DEPENDS ${HDF5_SOURCE_DIR}/src/H5overflow.txt
+ COMMENT " Creating Assignment overflow macro"
+ )
+
+ add_custom_target(run_perl_scripts ALL
+ DEPENDS ${HDF5_BINARY_DIR}/H5Edefin.h ${HDF5_BINARY_DIR}/H5version.h ${HDF5_BINARY_DIR}/H5overflow.h
+ )
+ else (PERL_FOUND)
+ message (STATUS "Cannot generate headers - perl not found")
+ endif (PERL_FOUND)
+endif (GENERATE_ERROR_HEADERS)
#-----------------------------------------------------------------------------
# Add H5Tinit source to build - generated by H5Detect/CMake at configure time
diff --git a/src/H5.c b/src/H5.c
index f6bf87c..856aad5 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -152,13 +152,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 */
@@ -333,7 +343,7 @@ H5_term_library(void)
done:
#ifdef H5_HAVE_THREADSAFE
H5_API_UNLOCK
-#endif
+#endif /* H5_HAVE_THREADSAFE */
return;
} /* end H5_term_library() */
@@ -834,3 +844,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 cf4bc4d..0447e14 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -183,6 +183,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;
@@ -810,7 +813,7 @@ 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 the plugin pointer */
if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(attr_id)))
@@ -820,7 +823,8 @@ H5Aget_create_plist(hid_t attr_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid attribute identifier")
/* get the acpl through the VOL */
- if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_ACPL, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value) < 0)
+ if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_ACPL, H5AC_dxpl_id,
+ H5_EVENT_STACK_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get acpl")
done:
diff --git a/src/H5AC.c b/src/H5AC.c
index 1a7d27b..d03cc88 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);
@@ -165,8 +166,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,
@@ -256,30 +256,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 */
@@ -301,11 +296,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 */
@@ -327,45 +322,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() */
@@ -1013,7 +1008,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 */
@@ -1631,7 +1626,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
@@ -1746,7 +1740,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));
@@ -1783,7 +1777,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));
@@ -2631,7 +2625,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;
@@ -2801,7 +2794,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 ) {
@@ -2899,7 +2892,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() */
@@ -3633,8 +3626,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 a2224af..ca6dcbf 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
@@ -222,6 +223,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 e36ca69..45e5e05 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -106,6 +106,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/H5Aint.c b/src/H5Aint.c
index ba900d9..e78376d 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -820,7 +820,7 @@ H5A_get_create_plist(H5A_t* attr)
hid_t ret_value;
FUNC_ENTER_NOAPI_NOINIT
- 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/H5Apkg.h b/src/H5Apkg.h
index c9411d5..4fd8c6e 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -187,6 +187,7 @@ H5_DLLVAR const H5B2_class_t H5A_BT2_CORDER[1];
H5_DLL herr_t H5A_init(void);
H5_DLL H5A_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 herr_t H5A__term_deprec_interface(void);
H5_DLL H5A_t *H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name,
const char *attr_name, hid_t lapl_id, hid_t dxpl_id);
H5_DLL H5A_t *H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name,
diff --git a/src/H5C.c b/src/H5C.c
index a63f98e..445e4bf 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1240,8 +1240,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;
@@ -2392,7 +2392,7 @@ H5C_get_cache_hit_rate(H5C_t * cache_ptr,
} else {
- *hit_rate_ptr = 0.0;
+ *hit_rate_ptr = 0.0f;
}
done:
@@ -4273,8 +4273,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 ) ) ) {
@@ -4298,8 +4298,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 ) ) ) {
@@ -4309,7 +4309,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 ) ) ) {
@@ -4319,10 +4319,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;
}
@@ -5814,8 +5814,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]");
@@ -5843,14 +5843,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");
@@ -5875,15 +5875,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]");
@@ -5911,14 +5911,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]");
@@ -5953,8 +5953,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]");
@@ -5967,8 +5967,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]");
@@ -6399,8 +6399,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 ) {
@@ -6415,7 +6415,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 7fde69b..433411f 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -905,20 +905,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 c502dfc..3461b87 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -104,6 +104,30 @@ done:
} /* 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
*
@@ -645,6 +669,7 @@ H5Dget_access_plist(hid_t dset_id)
if(H5VL_dataset_get(dset, vol_plugin, H5VL_DATASET_GET_DAPL, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get dataset access properties")
+
done:
FUNC_LEAVE_API(ret_value)
@@ -905,7 +930,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 */
@@ -952,12 +976,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/H5Dchunk.c b/src/H5Dchunk.c
index 92db446..e93d627 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -385,10 +385,9 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz
if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, data_size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
-
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-}
+} /* end H5D__chunk_direct_write() */
/*-------------------------------------------------------------------------
@@ -2798,7 +2797,7 @@ void *
H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
hbool_t relax)
{
- const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
+ const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info - always equal to the pline passed to H5D__chunk_alloc */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index a972eca..1a4d0e6 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 c55609a..12ae05b 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -181,7 +181,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 */
@@ -256,6 +256,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*/
@@ -2603,17 +2609,17 @@ H5D_get_access_plist(H5D_t *dset)
{
H5P_genplist_t *old_plist; /* Default DAPL */
H5P_genplist_t *new_plist; /* New DAPL */
- hid_t new_id = FAIL;
+ hid_t new_dapl_id = FAIL;
hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT
/* 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_id = H5P_copy_plist(old_plist, TRUE)) < 0)
+ 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")
- if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_id)))
+ if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* If the dataset is chunked then copy the rdcc parameters */
@@ -2627,12 +2633,12 @@ H5D_get_access_plist(H5D_t *dset)
} /* end if */
/* Set the return value */
- ret_value = new_id;
+ ret_value = new_dapl_id;
done:
if(ret_value < 0) {
- if(new_id > 0)
- if(H5I_dec_app_ref(new_id) < 0)
+ if(new_dapl_id > 0)
+ if(H5I_dec_app_ref(new_dapl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't free")
} /* end if */
diff --git a/src/H5Dio.c b/src/H5Dio.c
index b717ee0..b83ed88 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -120,8 +120,8 @@ herr_t
H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
hid_t file_space_id, hid_t plist_id, void *buf/*out*/)
{
- H5VL_t *vol_plugin;
- void *dset;
+ H5VL_t *vol_plugin = NULL;
+ void *dset = NULL;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -312,7 +312,7 @@ H5D__pre_write(H5D_t *dset, hid_t mem_type_id, const H5S_t *mem_space,
/* 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)
@@ -362,6 +362,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)
@@ -397,6 +398,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")
@@ -564,6 +578,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)
@@ -629,6 +644,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
@@ -659,20 +701,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/H5Dmpio.c b/src/H5Dmpio.c
index c294e42..a5e8903 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -1308,8 +1308,6 @@ done:
} /* end H5D__multi_chunk_collective_io */
-
-
/*-------------------------------------------------------------------------
* Function: H5D__inter_collective_io
*
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 6e8ca09..5713ee3 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -525,6 +525,8 @@ H5_DLLVAR const H5D_chunk_ops_t H5D_COPS_BTREE[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 4309d64..e7ae3ae 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)
/* Property names for H5LTDdirect_chunk_write */
#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME "direct_chunk_flag"
diff --git a/src/H5E.c b/src/H5E.c
index cbb0ba5..6af5e44 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -325,6 +325,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);
@@ -366,8 +369,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 c967517..b790590 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 e961681..ec6501b 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -171,6 +171,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*/
@@ -289,6 +292,7 @@ H5F_get_all_count_cb(void UNUSED *obj_ptr, hid_t UNUSED obj_id, void *key)
*(udata->obj_count) = *(udata->obj_count)+1;
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_get_all_count_cb */
@@ -553,7 +557,7 @@ H5Fis_accessible(const char *name, hid_t fapl_id)
if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
- if(H5VL_file_misc(NULL, NULL, H5VL_FILE_IS_ACCESSIBLE, H5AC_dxpl_id, H5_EVENT_STACK_NULL,
+ if(H5VL_file_misc(NULL, NULL, H5VL_FILE_IS_ACCESSIBLE, H5AC_ind_dxpl_g, H5_EVENT_STACK_NULL,
fapl_id, name, &ret_value) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get file handle")
diff --git a/src/H5FD.c b/src/H5FD.c
index f7ad96d..46df5e0 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1653,15 +1653,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);
@@ -1679,9 +1678,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:
@@ -1704,15 +1707,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);
@@ -1729,9 +1731,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 74aeed3..d1d4337 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
@@ -85,6 +93,7 @@ typedef struct H5FD_core_t {
#endif /* H5_HAVE_WIN32_API */
hbool_t dirty; /* changes not saved? */
H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */
+ H5SL_t *dirty_list; /* dirty parts of the file */
} H5FD_core_t;
/* Driver-specific file access properties */
@@ -117,6 +126,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,
@@ -170,6 +182,251 @@ 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 % file->bstore_page_size != 0) {
+ start = (start / file->bstore_page_size) * file->bstore_page_size;
+#ifdef DER
+ was_adjusted = TRUE;
+#endif
+ }
+ 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
@@ -566,6 +823,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 */
+
/* Set return value */
ret_value = (H5FD_t *)file;
@@ -604,7 +895,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)
@@ -1025,6 +1321,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);
@@ -1059,45 +1363,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;
}
@@ -1221,6 +1531,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 */
@@ -1231,3 +1545,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 037c085..7eb75bd 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.
@@ -416,7 +421,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 */
@@ -424,355 +429,359 @@ 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 {
/* 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 */
@@ -780,49 +789,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.
@@ -836,19 +845,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 */
@@ -857,57 +872,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 */
@@ -918,7 +933,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 */
@@ -928,17 +943,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 {
@@ -948,40 +963,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
*
@@ -994,32 +1009,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
*
@@ -1032,37 +1048,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 ef28e13..258f5fb 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/H5Fint.c b/src/H5Fint.c
index c8cb425..c6f68cb 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -130,7 +130,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")
@@ -606,7 +606,7 @@ H5F_is_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);
@@ -825,6 +825,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.
@@ -894,8 +896,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)
@@ -1211,6 +1218,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)
@@ -1238,8 +1246,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")
@@ -1932,7 +1945,6 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
if(HDstrcmp(fd_ptr->cls->name, "family") == 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Not supported for family file driver.")
-
/* Go get the actual file size */
if(HADDR_UNDEF == (eoa = H5FD_get_eoa(file->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
@@ -1952,7 +1964,7 @@ H5F_get_file_image(H5F_t *file, 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/H5Fio.c b/src/H5Fio.c
index d494488..1d05cd0 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:
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 7b62d01..e543015 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -54,10 +54,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
@@ -296,7 +292,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 */
@@ -320,14 +316,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 a8c8ee4..b459476 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -29,16 +29,9 @@
/* Private headers needed by this file */
#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 */
+/**************************/
/* User data for traversal routine to get ID counts */
typedef struct {
@@ -476,6 +469,8 @@ typedef struct {
#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. */
@@ -486,6 +481,10 @@ typedef struct {
#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 */
@@ -561,12 +560,43 @@ typedef struct {
#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 H5VL_class_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 48fd139..45fad37 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 */
@@ -655,11 +660,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;
@@ -783,9 +789,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 62c9235..838ebcf 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -226,16 +226,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)
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index e4fed3e..285c823 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
/***********/
@@ -105,9 +105,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
@@ -116,12 +116,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/H5Gint.c b/src/H5Gint.c
index 5531cc5..d31737a 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -1216,7 +1216,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/H5Gpkg.h b/src/H5Gpkg.h
index e2180c0..b194adb 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 df972b2..180c877 100644
--- a/src/H5Pacpl.c
+++ b/src/H5Pacpl.c
@@ -71,10 +71,13 @@ static herr_t H5P_acrt_reg_prop(H5P_genclass_t *pclass);
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 */
H5P_acrt_reg_prop, /* 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 acd48af..c510843 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -144,10 +144,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 */
@@ -2024,7 +2027,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 472700a..ab96c4e 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 59c0a2e..6181b88 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -36,11 +36,11 @@
#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 "H5VLprivate.h" /* VOL plugins */
#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 */
@@ -51,7 +51,7 @@
#include "H5VLnative.h" /* Native H5 VOL plugin */
#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
+#include "H5FDwindows.h" /* Windows buffered I/O */
#endif
/****************/
@@ -171,6 +171,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 */
@@ -214,10 +224,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 */
@@ -256,8 +269,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 */
/*-------------------------------------------------------------------------
@@ -419,6 +433,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() */
@@ -1170,7 +1196,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 */
@@ -3212,3 +3238,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 1d7d184..6de7a42 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 8837363..4ad8ca0 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 */
@@ -428,37 +457,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 */
@@ -519,20 +538,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 */
@@ -558,10 +577,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);
@@ -2885,41 +2928,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
@@ -3350,12 +3358,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
@@ -3371,12 +3379,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);
@@ -3387,14 +3395,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() */
/*--------------------------------------------------------------------------
@@ -3438,7 +3446,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:
@@ -5018,67 +5026,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 */
@@ -5100,3 +5108,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 a16a005..72f5b6b 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -102,10 +102,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 9d48c60..2942a4d 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 0c3b5aa..a0ede84 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -26,7 +26,6 @@
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
-#include "H5Oprivate.h" /* Object headers */
/**************************/
/* Library Private Macros */
@@ -35,11 +34,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;
@@ -70,6 +82,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 */
@@ -91,6 +122,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);
@@ -103,7 +135,7 @@ H5_DLL void * H5P_get_vol_info(H5P_genplist_t *plist);
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);
@@ -114,6 +146,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);
@@ -127,7 +163,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 4d60c5c..f13f70d 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);
@@ -352,6 +351,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 111edcd..ef1a123 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -161,6 +161,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 86dbca7..763b553 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
/***********/
@@ -50,7 +50,7 @@
#include "H5Ppublic.h" /* for using H5P_DATASET_ACCESS_DEFAULT */
#include "H5VLprivate.h" /* VOL plugins */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
+
/****************/
/* Local Macros */
/****************/
@@ -89,9 +89,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
@@ -100,13 +100,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 26a2d02..f2e9e1a 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -56,6 +56,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 479a0a2..a366a95 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -772,7 +772,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
@@ -1349,21 +1348,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 */
@@ -1489,6 +1484,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 a483df7..3986a5c 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -679,7 +679,7 @@ H5Tget_create_plist(hid_t dtype_id)
creation property list and return that. */
if(FALSE == status) {
/* 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((ret_value = 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 267852b..0b6ff5a 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 */
#include "H5VLprivate.h" /* VOL plugins */
-#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 0553d19..adc70a6 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -509,6 +509,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/H5VLnative.c b/src/H5VLnative.c
index 0343f53..9df9eb9 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -1273,7 +1273,7 @@ H5VL_native_datatype_get(void *obj, H5VL_datatype_get_t get_type,
hid_t tcpl_id;
/* 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((tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to copy the creation property list")
@@ -1488,7 +1488,6 @@ H5VL_native_dataset_read(void *obj, hid_t mem_type_id, hid_t mem_space_id,
H5D_t *dset = (H5D_t *)obj;
const H5S_t *mem_space = NULL;
const H5S_t *file_space = NULL;
- char fake_char;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1497,6 +1496,9 @@ H5VL_native_dataset_read(void *obj, hid_t mem_type_id, hid_t mem_space_id,
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if(mem_space_id < 0 || file_space_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+
if(H5S_ALL != mem_space_id) {
if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
@@ -1514,16 +1516,6 @@ H5VL_native_dataset_read(void *obj, hid_t mem_type_id, hid_t mem_space_id,
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "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;
-
/* read raw data */
if(H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data")
@@ -1553,7 +1545,6 @@ H5VL_native_dataset_write(void *obj, hid_t mem_type_id, hid_t mem_space_id,
H5D_t *dset = (H5D_t *)obj;
const H5S_t *mem_space = NULL;
const H5S_t *file_space = NULL;
- char fake_char;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1562,33 +1553,26 @@ H5VL_native_dataset_write(void *obj, hid_t mem_type_id, hid_t mem_space_id,
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if(mem_space_id < 0 || file_space_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+
if(H5S_ALL != mem_space_id) {
- if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+ if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
- /* Check for valid selection */
+ /* Check for valid selection */
if(H5S_SELECT_VALID(mem_space) != TRUE)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "memory selection+offset not within extent")
} /* end if */
if(H5S_ALL != file_space_id) {
- if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+ if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
if(H5S_SELECT_VALID(file_space) != TRUE)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
+ 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;
-
if(H5D__pre_write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't prepare for writing data")
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/H5config.h.in b/src/H5config.h.in
index 76de6c6..82925bf 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -58,6 +58,9 @@
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
+/* Define to 1 if you have the `asprintf' function. */
+#undef HAVE_ASPRINTF
+
/* Define if the __attribute__(()) extension is present */
#undef HAVE_ATTRIBUTE
diff --git a/src/H5private.h b/src/H5private.h
index 89bff47..5eae84b 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -542,6 +542,9 @@ typedef struct {
#ifndef HDasin
#define HDasin(X) asin(X)
#endif /* HDasin */
+#ifndef HDasprintf
+ #define HDasprintf asprintf /*varargs*/
+#endif /* HDasprintf */
#ifndef HDassert
#define HDassert(X) assert(X)
#endif /* HDassert */
@@ -1741,7 +1744,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 9312f15..2465639 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 184 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.176" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.184" /* 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 5e002b4..728f315 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -563,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@
@@ -734,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 = 174
LT_VERS_AGE = 0
# Our main target, the HDF5 library
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index dcbe9d4..b99447a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_TEST)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
@@ -64,7 +64,7 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
set (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
set (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF5_EXTRA_C_FLAGS})
+ add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
@@ -95,7 +95,7 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
set (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
set (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF5_EXTRA_C_FLAGS})
+ add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 33fbff6..23cc8eb 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -138,7 +138,7 @@ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
# Remove any output file left over from previous test run
add_test (
- NAME h5test-clear-testhdf5-objects
+ NAME H5TEST-clear-testhdf5-objects
COMMAND ${CMAKE_COMMAND}
-E remove
coord.h5
@@ -161,21 +161,21 @@ add_test (
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
- set_tests_properties (testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- set_tests_properties (testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- add_test (NAME testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
- set_tests_properties (testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- set_tests_properties (testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- add_test (NAME testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
- set_tests_properties (testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- set_tests_properties (testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- add_test (NAME testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
- set_tests_properties (testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- set_tests_properties (testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
+ set_tests_properties (H5TEST-testhdf5-base PROPERTIES DEPENDS H5TEST-clear-testhdf5-objects)
+ set_tests_properties (H5TEST-testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
+ set_tests_properties (H5TEST-testhdf5-heap PROPERTIES DEPENDS H5TEST-clear-testhdf5-objects)
+ set_tests_properties (H5TEST-testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
+ set_tests_properties (H5TEST-testhdf5-file PROPERTIES DEPENDS H5TEST-clear-testhdf5-objects)
+ set_tests_properties (H5TEST-testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
+ set_tests_properties (H5TEST-testhdf5-select PROPERTIES DEPENDS H5TEST-clear-testhdf5-objects)
+ set_tests_properties (H5TEST-testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
else (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
- set_tests_properties (testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ add_test (NAME H5TEST-testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
+ set_tests_properties (H5TEST-testhdf5 PROPERTIES DEPENDS H5TEST-clear-testhdf5-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
##############################################################################
@@ -186,7 +186,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
- NAME h5test-clear-objects
+ NAME H5TEST-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
dt_arith1.h5
@@ -249,11 +249,11 @@ add_test (
)
foreach (test ${H5_TESTS})
- add_test (NAME ${test} COMMAND $<TARGET_FILE:${test}>)
- set_tests_properties (${test} PROPERTIES DEPENDS h5test-clear-objects)
+ add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
+ set_tests_properties (H5TEST-${test} PROPERTIES DEPENDS H5TEST-clear-objects)
endforeach (test ${H5_TESTS})
-set_tests_properties (flush2 PROPERTIES DEPENDS flush1)
+set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS H5TEST-flush1)
##############################################################################
##############################################################################
@@ -263,38 +263,38 @@ set_tests_properties (flush2 PROPERTIES DEPENDS flush1)
#-- Adding test for cache
add_test (
- NAME h5test-clear-cache-objects
+ NAME H5TEST-clear-cache-objects
COMMAND ${CMAKE_COMMAND}
-E remove
cache_test.h5
)
-add_test (NAME cache COMMAND $<TARGET_FILE:cache>)
-set_tests_properties (cache PROPERTIES DEPENDS h5test-clear-cache-objects)
+add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>)
+set_tests_properties (H5TEST-cache PROPERTIES DEPENDS H5TEST-clear-cache-objects)
#-- Adding test for cache_api
add_test (
- NAME h5test-clear-cache_api-objects
+ NAME H5TEST-clear-cache_api-objects
COMMAND ${CMAKE_COMMAND}
-E remove
cache_api_test.h5
)
-add_test (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
-set_tests_properties (cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects)
+add_test (NAME H5TEST-cache_api COMMAND $<TARGET_FILE:cache_api>)
+set_tests_properties (H5TEST-cache_api PROPERTIES DEPENDS H5TEST-clear-cache_api-objects)
#-- Adding test for cache_tagging
add_test (
- NAME h5test-clear-cache_tagging-objects
+ NAME H5TEST-clear-cache_tagging-objects
COMMAND ${CMAKE_COMMAND}
-E remove
tagging_test.h5
tagging_ext_test.h5
)
-add_test (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
-set_tests_properties (cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects)
+add_test (NAME H5TEST-cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
+set_tests_properties (H5TEST-cache_tagging PROPERTIES DEPENDS H5TEST-clear-cache_tagging-objects)
#-- Adding test for ttsafe
add_test (
- NAME h5test-clear-ttsafe-objects
+ NAME H5TEST-clear-ttsafe-objects
COMMAND ${CMAKE_COMMAND}
-E remove
ttsafe_error.h5
@@ -302,19 +302,19 @@ add_test (
ttsafe_cancel.h5
ttsafe_acreate.h5
)
-add_test (NAME ttsafe COMMAND $<TARGET_FILE:ttsafe>)
-set_tests_properties (ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects)
+add_test (NAME H5TEST-ttsafe COMMAND $<TARGET_FILE:ttsafe>)
+set_tests_properties (H5TEST-ttsafe PROPERTIES DEPENDS H5TEST-clear-ttsafe-objects)
#-- Adding test for err_compat
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_test (
- NAME h5test-clear-err_compat-objects
+ NAME H5TEST-clear-err_compat-objects
COMMAND ${CMAKE_COMMAND}
-E remove
err_compat.txt
err_compat.txt.err
)
- add_test (NAME err_compat COMMAND "${CMAKE_COMMAND}"
+ add_test (NAME H5TEST-err_compat COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:err_compat>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -322,20 +322,20 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
-D "TEST_OUTPUT=err_compat.txt"
-D "TEST_REFERENCE=err_compat_1"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects)
+ set_tests_properties (H5TEST-err_compat PROPERTIES DEPENDS H5TEST-clear-err_compat-objects)
endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-- Adding test for error_test
add_test (
- NAME h5test-clear-error_test-objects
+ NAME H5TEST-clear-error_test-objects
COMMAND ${CMAKE_COMMAND}
-E remove
error_test.txt
error_test.txt.err
)
-add_test (NAME error_test COMMAND "${CMAKE_COMMAND}"
+add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:error_test>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -343,14 +343,14 @@ add_test (NAME error_test COMMAND "${CMAKE_COMMAND}"
-D "TEST_OUTPUT=error_test.txt"
-D "TEST_REFERENCE=error_test_1"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
-set_tests_properties (error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
-set_tests_properties (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
+set_tests_properties (H5TEST-error_test PROPERTIES DEPENDS H5TEST-clear-error_test-objects)
+set_tests_properties (H5TEST-error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
#-- Adding test for links_env
add_test (
- NAME h5test-clear-links_env-objects
+ NAME H5TEST-clear-links_env-objects
COMMAND ${CMAKE_COMMAND}
-E remove
links_env.txt
@@ -359,7 +359,7 @@ add_test (
extlinks_env1.h5
tmp/extlinks_env1.h5
)
-add_test (NAME links_env COMMAND "${CMAKE_COMMAND}"
+add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
-D "TEST_ARGS:STRING="
-D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
@@ -368,23 +368,23 @@ add_test (NAME links_env COMMAND "${CMAKE_COMMAND}"
-D "TEST_OUTPUT=links_env.txt"
-D "TEST_REFERENCE=links_env.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
-set_tests_properties (links_env PROPERTIES DEPENDS h5test-clear-links_env-objects)
+set_tests_properties (H5TEST-links_env PROPERTIES DEPENDS H5TEST-clear-links_env-objects)
#-- Adding test for libinfo
-add_test (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
+add_test (NAME H5TEST-testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
##############################################################################
### P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
set (CMAKE_SEP "\;")
- else (WIN32 AND NOT CYGWIN)
+ else (WIN32)
set (CMAKE_SEP ":")
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
add_test (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
set_tests_properties (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
@@ -438,7 +438,7 @@ if (HDF5_TEST_VFD)
objcopy
links
unlink
- big
+# big
mtime
fillval
mount
@@ -467,7 +467,10 @@ if (HDF5_TEST_VFD)
testmeta
links_env
unregister
-)
+ )
+ if (NOT CYGWIN)
+ set (H5_VFD_TESTS ${H5_VFD_TESTS} big)
+ endif (NOT CYGWIN)
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
@@ -484,7 +487,7 @@ if (HDF5_TEST_VFD)
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${test}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
endforeach (test ${H5_VFD_TESTS})
if (HDF5_TEST_FHEAP_VFD)
@@ -497,7 +500,7 @@ if (HDF5_TEST_VFD)
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=fheap"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
endif (HDF5_TEST_FHEAP_VFD)
ENDMACRO (ADD_VFD_TEST)
diff --git a/test/Makefile.am b/test/Makefile.am
index df8c4a2..3187d2c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -104,7 +104,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 8e243d5..2ac76fe 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -905,7 +905,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@
@@ -1156,7 +1155,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 351ed88..88af44b 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -38,18 +38,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);
/* Helper Function Prototypes */
void accum_printf(void);
@@ -57,9 +57,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 */
@@ -82,6 +82,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;
@@ -98,22 +99,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
@@ -149,7 +154,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;
@@ -172,7 +177,7 @@ test_write_read(void)
if(accum_read(0, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, 1024) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -205,7 +210,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;
@@ -225,13 +230,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, 1024) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -264,7 +269,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;
@@ -284,13 +289,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, 1024) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -323,7 +328,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_free(void)
+test_free(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf = NULL;
@@ -346,38 +351,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;
@@ -390,10 +395,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;
@@ -404,10 +409,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;
@@ -418,10 +423,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;
@@ -432,10 +437,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;
@@ -446,10 +451,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;
@@ -460,10 +465,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;
@@ -476,7 +481,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();
@@ -510,7 +515,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap(void)
+test_accum_overlap(const H5F_io_info_t *fio_info)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -646,7 +651,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();
@@ -682,7 +687,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;
@@ -708,7 +713,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;
@@ -748,7 +753,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;
@@ -758,7 +763,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;
@@ -778,7 +783,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;
@@ -788,7 +793,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;
@@ -826,7 +831,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();
@@ -861,7 +866,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;
@@ -893,7 +898,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();
@@ -928,7 +933,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;
@@ -960,7 +965,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();
@@ -1006,7 +1011,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 */
@@ -1052,7 +1057,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, 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 */
@@ -1081,7 +1086,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, 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 */
@@ -1095,7 +1100,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 */
@@ -1116,7 +1121,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, 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, */
@@ -1130,7 +1135,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;
@@ -1156,7 +1161,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, 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, */
@@ -1167,7 +1172,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) */
@@ -1193,7 +1198,7 @@ test_accum_adjust(void)
if(HDmemcmp(wbuf, rbuf, 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 */
@@ -1224,7 +1229,7 @@ test_accum_adjust(void)
if(accum_read(1048571, 349523, rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 349523) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1262,7 +1267,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 */
@@ -1307,7 +1312,7 @@ test_read_after(void)
if(accum_read(512, 512, rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 128) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1341,7 +1346,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 */
@@ -1377,7 +1382,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, 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 */
@@ -1396,7 +1401,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, 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 */
@@ -1414,7 +1419,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, 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 */
@@ -1432,7 +1437,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, 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 */
@@ -1454,7 +1459,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, 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 */
@@ -1477,7 +1482,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, 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 */
@@ -1505,7 +1510,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, 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 */
@@ -1533,7 +1538,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, 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 */
@@ -1560,7 +1565,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, 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 */
@@ -1588,7 +1593,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, 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 */
@@ -1612,7 +1617,7 @@ test_big(void)
if(HDmemcmp(wbuf2, rbuf + 512, BIG_BUF_SIZE) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1649,7 +1654,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 */
@@ -1749,7 +1754,7 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
/* Verify data read back in */
if(HDmemcmp(wbuf, rbuf, RANDOM_BUF_SIZE) != 0) TEST_ERROR;
- if(accum_reset() < 0) FAIL_STACK_ERROR;
+ if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
PASSED();
diff --git a/test/dsets.c b/test/dsets.c
index 5f44ce2..3cd303f 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6677,8 +6677,17 @@ test_zero_dims(hid_t file)
if(H5Pset_chunk(dcpl, 1, &csize) < 0) FAIL_STACK_ERROR
if((d = H5Dcreate2(file, ZERODIM_DATASET, H5T_NATIVE_INT, s, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- /* 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 486bdba..f1e5daf 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/CMakeLists.txt b/testpar/CMakeLists.txt
index 6d4f4d4..7f3fe7f 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_TEST_PAR)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index 5ac96e6..3716ee6 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -11,7 +11,10 @@ foreach (testp ${H5P_TESTS})
add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>)
endforeach (testp ${H5P_TESTS})
-SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
+# The following will only be correct on windows shared
+#set_tests_properties (TEST_PAR_t_pflush1 PROPERTIES WILL_FAIL "true")
+set_property (TEST TEST_PAR_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
+set_tests_properties (TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
if (HDF5_TEST_VFD)
@@ -37,7 +40,7 @@ if (HDF5_TEST_VFD)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
foreach (test ${H5P_VFD_TESTS})
add_test (
- NAME VFD-${vfdname}-${test}
+ NAME TEST_PAR_VFD-${vfdname}-${test}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
-D "TEST_ARGS:STRING="
@@ -45,7 +48,7 @@ if (HDF5_TEST_VFD)
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${test}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
endforeach (test ${H5P_VFD_TESTS})
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
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/CMakeLists.txt b/tools/CMakeLists.txt
index 27820ae..a9a8c49 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_TOOLS)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Setup include Directories
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/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index 77399a8..9002e5a 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -230,7 +230,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=./testfiles/${testname}.out"
-D "TEST_MASK=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
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/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index 19a5fe4..686803b 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -255,7 +255,7 @@
#
# Overwrite system dependent files (Windows)
#
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
add_custom_command (
TARGET h5diff
POST_BUILD
@@ -282,7 +282,7 @@
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
##############################################################################
##############################################################################
@@ -317,7 +317,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.txt"
-D "TEST_APPEND=EXIT CODE:"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -355,7 +355,7 @@
# -D "TEST_APPEND=EXIT CODE: [0-9]"
# -D "TEST_REF_FILTER=EXIT CODE: 0"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/prunTest.cmake"
)
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
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/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index bb2a37e..f9ebc32 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -313,7 +313,7 @@
# copy test files from source dir to test dir
#
foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
+ get_filename_component (fname "${tst_h5_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
#message (STATUS " Copying ${tst_h5_file}")
add_custom_command (
@@ -325,21 +325,21 @@
endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
- else (WIN32 AND NOT CYGWIN)
+ else (WIN32)
add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
foreach (tst_other_file ${HDF5_REFERENCE_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
+ get_filename_component (fname "${tst_other_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
#message (STATUS " Copying ${tst_other_file}")
add_custom_command (
@@ -351,7 +351,7 @@
endforeach (tst_other_file ${HDF5_REFERENCE_FILES})
foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
+ get_filename_component (fname "${tst_error_file}" NAME)
set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
#message (STATUS " Copying ${tst_error_file}")
add_custom_command (
@@ -372,17 +372,17 @@
ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
)
- if (WIN32 AND NOT CYGWIN)
+ if (WIN32)
file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
- else (WIN32 AND NOT CYGWIN)
+ else (WIN32)
add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
)
- endif (WIN32 AND NOT CYGWIN)
+ endif (WIN32)
##############################################################################
##############################################################################
@@ -415,7 +415,7 @@
-D "TEST_OUTPUT=h5dump-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=h5dump-${testname}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -461,7 +461,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -494,7 +494,7 @@
-D "TEST_OUTPUT=${resultfile}-N.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -527,7 +527,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
add_test (
@@ -567,7 +567,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
add_test (
@@ -629,7 +629,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-D "TEST_MASK_ERROR=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -654,7 +654,7 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-D "TEST_ERRREF=${resultfile}.err"
-D "TEST_MASK_ERROR=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -681,7 +681,7 @@
-D "TEST_MASK_ERROR=true"
-D "TEST_ENV_VAR:STRING=${envvar}"
-D "TEST_ENV_VALUE:STRING=${envval}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -705,7 +705,7 @@
-D "TEST_OUTPUT=${conffile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${conffile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index a920198..421e020 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -155,7 +155,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index ffc1cae..0d4e0f4 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -196,7 +196,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.xml"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index 9eaacc3..9cf0a5d 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/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/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/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 5c5b4de..6986aee 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -133,7 +133,7 @@
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname})
add_test (
@@ -146,7 +146,7 @@
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
-D "TEST_REFERENCE=${testfile}.new"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -180,7 +180,7 @@
-D "TEST_OUTPUT=d${testfile}.dmp"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
else ("${ARGN}" STREQUAL "BINARY")
add_test (
@@ -192,7 +192,7 @@
-D "TEST_OUTPUT=d${testfile}.dmp"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ("${ARGN}" STREQUAL "BINARY")
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
@@ -206,7 +206,7 @@
-D "TEST_OUTPUT=d${testfile}.imp"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP")
@@ -214,13 +214,13 @@
NAME H5IMPORT-DUMP-${testname}-H5DFF
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
- -D "TEST_ARGS:STRING=-v;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
+ -D "TEST_ARGS:STRING=-r;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dff"
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(Warning)[^\n]*)"
-D "TEST_REFERENCE=testfiles/d${testfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
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/h5import/h5import.c b/tools/h5import/h5import.c
index 74c67b9..96fb6f9 100644
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -874,12 +874,9 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
- while (!HDfeof(strm)) {
- c = HDfgetc(strm);
-
+ while(EOF != (c = HDfgetc(strm)))
if (c == 10) /* eol */
nlines++;
- }
if (!nlines)
return 0;
@@ -940,9 +937,7 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id)
line = 0;
- while (!HDfeof(strm)) {
- c = HDfgetc(strm);
-
+ while(EOF != (c = HDfgetc(strm))) {
str[i] = (char)c;
i++;
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/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
index fb64313..b5dc256 100644
--- a/tools/h5jam/CMakeTests.cmake
+++ b/tools/h5jam/CMakeTests.cmake
@@ -77,7 +77,7 @@
-D "TEST_OUTPUT=${expectfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -111,7 +111,7 @@
-D "TEST_OUTPUT=${expectfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -140,7 +140,7 @@
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
add_test (
@@ -153,7 +153,7 @@
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
-D "TEST_REFERENCE=${actual}.new"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -200,7 +200,7 @@
-D "TEST_OUTPUT=${outfile}.ufile.txt"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
set (compare_test "${outfile}.ufile.txt")
@@ -231,7 +231,7 @@
-D "TEST_UFILE=${compare_test}"
-D "TEST_EXPECT=0"
-D "TEST_OFILE="
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
)
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
endif (NOT "${compare_test}" STREQUAL "")
@@ -247,7 +247,7 @@
-D "TEST_EXPECT=0"
-D "TEST_UFILE=NULL"
-D "TEST_OFILE=NULL"
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
)
if (NOT "${compare_test}" STREQUAL "")
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
@@ -295,7 +295,7 @@
-D "TEST_UFILE=testfiles/${jamfile}"
-D "TEST_EXPECT=0"
-D "TEST_OFILE=${compare_orig}"
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
)
set_tests_properties (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile})
@@ -350,7 +350,7 @@
-D "TEST_UFILE=testfiles/${jamfile}"
-D "TEST_EXPECT=0"
-D "TEST_OFILE=${compare_orig}"
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
)
set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile})
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/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index b739130..a42fa17 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -140,7 +140,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ls"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
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/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 33fc17a..2030221 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -816,8 +816,6 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
* Programmer: Robb Matzke
* Thursday, November 5, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static hbool_t
@@ -832,8 +830,7 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
if(H5T_COMPOUND != H5Tget_class(type))
return FALSE;
- nmembs = H5Tget_nmembers(type);
- if(nmembs <= 0)
+ if((nmembs = H5Tget_nmembers(type)) < 0)
return FALSE;
h5tools_str_append(buffer, "struct {");
@@ -855,6 +852,7 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
size = H5Tget_size(type);
h5tools_str_append(buffer, "\n%*s} %lu byte%s",
ind, "", (unsigned long)size, 1==size?"":"s");
+
return TRUE;
}
@@ -883,8 +881,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
if(H5T_ENUM != H5Tget_class(type))
return FALSE;
- nmembs = H5Tget_nmembers(type);
- if(nmembs < 0)
+ if((nmembs = H5Tget_nmembers(type)) < 0)
return FALSE;
super = H5Tget_super(type);
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 4d26c0c..cb8720e 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -51,7 +51,7 @@ if (BUILD_TESTING)
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF5_EXTRA_C_FLAGS})
+ add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} dynlib_rpk.c)
@@ -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/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 430defc..220c871 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -29,7 +29,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=h5repacktest"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
@@ -136,7 +136,7 @@
-D "TEST_OUTPUT=h5repack-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=h5repack-${testname}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS "H5REPACK-h5repack-${testname}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -215,7 +215,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${resultfile}.tst"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
@@ -250,7 +250,7 @@
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${testname}.${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -290,7 +290,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
- -P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
else (${resultcode} STREQUAL "0")
@@ -313,7 +313,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${nottestfilter}"
-D "TEST_REFERENCE=${testfilter}"
- -P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
endif (${resultcode} STREQUAL "0")
@@ -365,7 +365,7 @@
-D "TEST_REFERENCE=${testname}.${resultfile}.tst"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects)
add_test (
@@ -379,7 +379,7 @@
-D "TEST_REFERENCE=${resultfile}-${testname}.ddl"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
endif (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
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/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index b803dff..4175eb2 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -101,7 +101,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
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/CMakeLists.txt b/tools/lib/CMakeLists.txt
index c3b8294..e65673a 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_TOOLS_LIB)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-add_definitions (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Define Sources
@@ -71,21 +71,6 @@ install (
)
#-----------------------------------------------------------------------------
-# Because tools are installed into bin/tools we need to make sure the hdf5tools
-# library will be installed into the proper location.
-#-----------------------------------------------------------------------------
-if (APPLE)
- option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
- if (HDF5_BUILD_WITH_INSTALL_NAME)
- SET_TARGET_PROPERTIES(${HDF5_TOOLS_LIB_TARGET} PROPERTIES
- LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}"
- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
- BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
- )
- endif (HDF5_BUILD_WITH_INSTALL_NAME)
-endif (APPLE)
-
-#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
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.c b/tools/lib/h5diff.c
index 884a85d..13cea23 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -470,75 +470,81 @@ static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo,
switch(linfo->type)
{
- case H5L_TYPE_SOFT:
- ret = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links);
- /* error */
- if (ret < 0)
- goto done;
- /* no dangling link option given and detect dangling link */
- else if (ret == 0)
- {
- tinfo->symlink_visited.dangle_link = TRUE;
- trav_info_visit_lnk(path, linfo, tinfo);
- if (opts->no_dangle_links)
- opts->err_stat = 1; /* make dgangling link is error */
- goto done;
- }
+ case H5L_TYPE_SOFT:
+ ret = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links);
+ /* error */
+ if (ret < 0)
+ goto done;
+ /* no dangling link option given and detect dangling link */
+ else if (ret == 0)
+ {
+ tinfo->symlink_visited.dangle_link = TRUE;
+ trav_info_visit_lnk(path, linfo, tinfo);
+ if (opts->no_dangle_links)
+ opts->err_stat = 1; /* make dgangling link is error */
+ goto done;
+ }
- /* check if already visit the target object */
- if(symlink_is_visited( &(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path))
- goto done;
+ /* check if already visit the target object */
+ if(symlink_is_visited( &(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path))
+ goto done;
- /* add this link as visited link */
- if(symlink_visit_add( &(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path) < 0)
- goto done;
-
- if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo) < 0)
- {
- parallel_print("Error: Could not get file contents\n");
- opts->err_stat = 1;
- goto done;
- }
- break;
-
- case H5L_TYPE_EXTERNAL:
- ret = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links);
- /* error */
- if (ret < 0)
- goto done;
- /* no dangling link option given and detect dangling link */
- else if (ret == 0)
- {
- tinfo->symlink_visited.dangle_link = TRUE;
- trav_info_visit_lnk(path, linfo, tinfo);
- if (opts->no_dangle_links)
- opts->err_stat = 1; /* make dgangling link is error */
- goto done;
- }
+ /* add this link as visited link */
+ if(symlink_visit_add( &(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path) < 0)
+ goto done;
+
+ if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
+ trav_grp_objs,trav_grp_symlinks, tinfo) < 0)
+ {
+ parallel_print("Error: Could not get file contents\n");
+ opts->err_stat = 1;
+ goto done;
+ }
+ break;
+
+ case H5L_TYPE_EXTERNAL:
+ ret = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links);
+ /* error */
+ if (ret < 0)
+ goto done;
+ /* no dangling link option given and detect dangling link */
+ else if (ret == 0)
+ {
+ tinfo->symlink_visited.dangle_link = TRUE;
+ trav_info_visit_lnk(path, linfo, tinfo);
+ if (opts->no_dangle_links)
+ opts->err_stat = 1; /* make dgangling link is error */
+ goto done;
+ }
- if(H5Lunpack_elink_val(lnk_info.trg_path, linfo->u.val_size, NULL, &ext_fname, &ext_path) < 0)
- goto done;
+ if(H5Lunpack_elink_val(lnk_info.trg_path, linfo->u.val_size, NULL, &ext_fname, &ext_path) < 0)
+ goto done;
- /* check if already visit the target object */
- if(symlink_is_visited( &(tinfo->symlink_visited), linfo->type, ext_fname, ext_path))
- goto done;
+ /* check if already visit the target object */
+ if(symlink_is_visited( &(tinfo->symlink_visited), linfo->type, ext_fname, ext_path))
+ goto done;
- /* add this link as visited link */
- if(symlink_visit_add( &(tinfo->symlink_visited), linfo->type, ext_fname, ext_path) < 0)
- goto done;
-
- if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo) < 0)
- {
- parallel_print("Error: Could not get file contents\n");
+ /* add this link as visited link */
+ if(symlink_visit_add( &(tinfo->symlink_visited), linfo->type, ext_fname, ext_path) < 0)
+ goto done;
+
+ if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
+ trav_grp_objs,trav_grp_symlinks, tinfo) < 0)
+ {
+ parallel_print("Error: Could not get file contents\n");
+ opts->err_stat = 1;
+ goto done;
+ }
+ break;
+
+ case H5L_TYPE_HARD:
+ case H5L_TYPE_MAX:
+ case H5L_TYPE_ERROR:
+ default:
+ parallel_print("Error: Invalid link type\n");
opts->err_stat = 1;
goto done;
- }
- break;
- default:
- ;
- break;
+ break;
} /* end of switch */
done:
@@ -572,7 +578,6 @@ hsize_t h5diff(const char *fname1,
hid_t file2_id = (-1);
char filenames[2][MAX_FILENAME];
hsize_t nfound = 0;
- int i;
int l_ret1 = -1;
int l_ret2 = -1;
char * obj1fullname = NULL;
@@ -653,27 +658,37 @@ hsize_t h5diff(const char *fname1,
/* if any object is specified */
if (objname1)
{
- /* malloc 2 more for "/" and end-of-line */
- obj1fullname = (char*)HDcalloc(HDstrlen(objname1) + 2, sizeof(char));
- obj2fullname = (char*)HDcalloc(HDstrlen(objname2) + 2, sizeof(char));
-
/* make the given object1 fullpath, start with "/" */
if (HDstrncmp(objname1, "/", 1))
{
+#ifdef H5_HAVE_ASPRINTF
+ /* Use the asprintf() routine, since it does what we're trying to do below */
+ HDasprintf(&obj1fullname, "/%s", objname1);
+#else /* H5_HAVE_ASPRINTF */
+ /* (malloc 2 more for "/" and end-of-line) */
+ obj1fullname = (char*)HDmalloc(HDstrlen(objname1) + 2);
HDstrcpy(obj1fullname, "/");
HDstrcat(obj1fullname, objname1);
+#endif /* H5_HAVE_ASPRINTF */
}
else
- HDstrcpy(obj1fullname, objname1);
+ obj1fullname = HDstrdup(objname1);
/* make the given object2 fullpath, start with "/" */
if (HDstrncmp(objname2, "/", 1))
{
+#ifdef H5_HAVE_ASPRINTF
+ /* Use the asprintf() routine, since it does what we're trying to do below */
+ HDasprintf(&obj2fullname, "/%s", objname2);
+#else /* H5_HAVE_ASPRINTF */
+ /* (malloc 2 more for "/" and end-of-line) */
+ obj2fullname = (char*)HDmalloc(HDstrlen(objname2) + 2);
HDstrcpy(obj2fullname, "/");
HDstrcat(obj2fullname, objname2);
+#endif /* H5_HAVE_ASPRINTF */
}
else
- HDstrcpy(obj2fullname, objname2);
+ obj2fullname = HDstrdup(objname2);
/*----------------------------------------------------------
* check if obj1 is root, group, single object or symlink
@@ -706,7 +721,8 @@ hsize_t h5diff(const char *fname1,
*/
if(src_linfo1.type == H5L_TYPE_HARD)
{
- int idx = 0;
+ size_t idx;
+
/* optional data pass */
info1_obj->opts = (diff_opt_t*)options;
@@ -716,7 +732,7 @@ hsize_t h5diff(const char *fname1,
options->err_stat = 1;
goto out;
}
- obj1type = oinfo1.type;
+ obj1type = (h5trav_type_t)oinfo1.type;
trav_info_add(info1_obj, obj1fullname, obj1type);
idx = info1_obj->nused - 1;
info1_obj->paths[idx].objno = oinfo1.addr;
@@ -765,7 +781,8 @@ hsize_t h5diff(const char *fname1,
*/
if(src_linfo2.type == H5L_TYPE_HARD)
{
- int idx = 0;
+ size_t idx;
+
/* optional data pass */
info2_obj->opts = (diff_opt_t*)options;
@@ -775,7 +792,7 @@ hsize_t h5diff(const char *fname1,
options->err_stat = 1;
goto out;
}
- obj2type = oinfo2.type;
+ obj2type = (h5trav_type_t)oinfo2.type;
trav_info_add(info2_obj, obj2fullname, obj2type);
idx = info2_obj->nused - 1;
info2_obj->paths[idx].objno = oinfo2.addr;
@@ -798,11 +815,9 @@ hsize_t h5diff(const char *fname1,
{
h5difftrace("h5diff no object specified\n");
/* set root group */
- obj1fullname = (char*)HDcalloc((size_t)2, sizeof(char));
- HDstrcat(obj1fullname, "/");
+ obj1fullname = (char*)HDstrdup("/");
obj1type = H5TRAV_TYPE_GROUP;
- obj2fullname = (char*)HDcalloc((size_t)2, sizeof(char));
- HDstrcat(obj2fullname, "/");
+ obj2fullname = (char*)HDstrdup("/");
obj2type = H5TRAV_TYPE_GROUP;
}
@@ -856,12 +871,13 @@ hsize_t h5diff(const char *fname1,
}
else if(l_ret1 != 2) /* symbolic link */
{
- obj1type = trg_linfo1.trg_type;
+ obj1type = (h5trav_type_t)trg_linfo1.trg_type;
h5difftrace("h5diff ... ... trg_linfo1.trg_type == H5L_TYPE_HARD\n");
if (info1_lp != NULL) {
- int idx = info1_lp->nused - 1;
+ size_t idx = info1_lp->nused - 1;
+
h5difftrace("h5diff ... ... ... info1_obj not null\n");
- info1_lp->paths[idx].type = trg_linfo1.trg_type;
+ info1_lp->paths[idx].type = (h5trav_type_t)trg_linfo1.trg_type;
info1_lp->paths[idx].objno = trg_linfo1.objno;
info1_lp->paths[idx].fileno = trg_linfo1.fileno;
}
@@ -904,11 +920,12 @@ hsize_t h5diff(const char *fname1,
}
else if(l_ret2 != 2) /* symbolic link */
{
- obj2type = trg_linfo2.trg_type;
+ obj2type = (h5trav_type_t)trg_linfo2.trg_type;
if (info2_lp != NULL) {
- int idx = info2_lp->nused - 1;
+ size_t idx = info2_lp->nused - 1;
+
h5difftrace("h5diff ... ... ... info2_obj not null\n");
- info2_lp->paths[idx].type = trg_linfo2.trg_type;
+ info2_lp->paths[idx].type = (h5trav_type_t)trg_linfo2.trg_type;
info2_lp->paths[idx].objno = trg_linfo2.objno;
info2_lp->paths[idx].fileno = trg_linfo2.fileno;
}
@@ -972,6 +989,8 @@ hsize_t h5diff(const char *fname1,
#ifdef H5_HAVE_PARALLEL
if(g_Parallel)
{
+ int i;
+
if((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME))
{
HDfprintf(stderr, "The parallel diff only supports path names up to %d characters\n", MAX_FILENAME);
@@ -997,6 +1016,8 @@ hsize_t h5diff(const char *fname1,
*/
if(options->m_verbose)
{
+ unsigned u;
+
parallel_print("\n");
/* if given objects is group under root */
if (HDstrcmp (obj1fullname,"/") || HDstrcmp (obj2fullname,"/"))
@@ -1004,12 +1025,12 @@ hsize_t h5diff(const char *fname1,
else
parallel_print("file1 file2\n");
parallel_print("---------------------------------------\n");
- for(i = 0; i < match_list->nobjs; i++)
+ for(u = 0; u < match_list->nobjs; u++)
{
char c1, c2;
- c1 = (match_list->objs[i].flags[0]) ? 'x' : ' ';
- c2 = (match_list->objs[i].flags[1]) ? 'x' : ' ';
- parallel_print("%5c %6c %-15s\n", c1, c2, match_list->objs[i].name);
+ c1 = (match_list->objs[u].flags[0]) ? 'x' : ' ';
+ c2 = (match_list->objs[u].flags[1]) ? 'x' : ' ';
+ parallel_print("%5c %6c %-15s\n", c1, c2, match_list->objs[u].name);
} /* end for */
parallel_print ("\n");
} /* end if */
@@ -1092,8 +1113,8 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
hsize_t nfound = 0;
unsigned i;
- char * grp1_path = "";
- char * grp2_path = "";
+ const char * grp1_path = "";
+ const char * grp2_path = "";
char * obj1_fullpath = NULL;
char * obj2_fullpath = NULL;
diff_args_t argdata;
@@ -1106,10 +1127,10 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
* if not root, prepare object name to be pre-appended to group path to
* make full path
*/
- if (HDstrcmp (grp1, "/"))
- grp1_path = (char *)grp1;
- if (HDstrcmp (grp2, "/"))
- grp2_path = (char *)grp2;
+ if(HDstrcmp(grp1, "/"))
+ grp1_path = grp1;
+ if(HDstrcmp(grp2, "/"))
+ grp2_path = grp2;
/*-------------------------------------------------------------------------
* regarding the return value of h5diff (0, no difference in files, 1 difference )
@@ -1163,22 +1184,32 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
if( table->objs[i].flags[0] && table->objs[i].flags[1])
{
/* make full path for obj1 */
- obj1_fullpath = (char*)HDcalloc (HDstrlen(grp1_path) + strlen (table->objs[i].name) + 1, sizeof (char));
+#ifdef H5_HAVE_ASPRINTF
+ /* Use the asprintf() routine, since it does what we're trying to do below */
+ HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name);
+#else /* H5_HAVE_ASPRINTF */
+ obj1_fullpath = (char*)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1);
HDstrcpy(obj1_fullpath, grp1_path);
HDstrcat(obj1_fullpath, table->objs[i].name);
+#endif /* H5_HAVE_ASPRINTF */
/* make full path for obj2 */
- obj2_fullpath = (char*)HDcalloc (HDstrlen(grp2_path) + strlen (table->objs[i].name) + 1, sizeof (char));
+#ifdef H5_HAVE_ASPRINTF
+ /* Use the asprintf() routine, since it does what we're trying to do below */
+ HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name);
+#else /* H5_HAVE_ASPRINTF */
+ obj2_fullpath = (char*)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1);
HDstrcpy(obj2_fullpath, grp2_path);
HDstrcat(obj2_fullpath, table->objs[i].name);
+#endif /* H5_HAVE_ASPRINTF */
/* get index to figure out type of the object in file1 */
- while ( info1->paths[idx1].path &&
- (HDstrcmp (obj1_fullpath, info1->paths[idx1].path) != 0) )
+ while(info1->paths[idx1].path &&
+ (HDstrcmp(obj1_fullpath, info1->paths[idx1].path) != 0))
idx1++;
/* get index to figure out type of the object in file2 */
- while ( info2->paths[idx2].path &&
- (HDstrcmp (obj2_fullpath, info2->paths[idx2].path) != 0) )
+ while(info2->paths[idx2].path &&
+ (HDstrcmp(obj2_fullpath, info2->paths[idx2].path) != 0))
idx2++;
/* Set argdata to pass other args into diff() */
@@ -1363,10 +1394,10 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
} /* end if */
} /* end else */
#endif /* H5_HAVE_PARALLEL */
- if (obj1_fullpath)
- HDfree (obj1_fullpath);
- if (obj2_fullpath)
- HDfree (obj2_fullpath);
+ if(obj1_fullpath)
+ HDfree(obj1_fullpath);
+ if(obj2_fullpath)
+ HDfree(obj2_fullpath);
} /* end if */
} /* end for */
h5difftrace("done with for loop\n");
@@ -1586,12 +1617,12 @@ hsize_t diff(hid_t file1_id,
if (options->follow_links)
{
if (linkinfo1.linfo.type == H5L_TYPE_SOFT ||
- linkinfo1.linfo.type == H5L_TYPE_EXTERNAL)
- argdata->type[0] = linkinfo1.trg_type;
+ linkinfo1.linfo.type == H5L_TYPE_EXTERNAL)
+ argdata->type[0] = (h5trav_type_t)linkinfo1.trg_type;
if (linkinfo2.linfo.type == H5L_TYPE_SOFT ||
- linkinfo2.linfo.type == H5L_TYPE_EXTERNAL)
- argdata->type[1] = linkinfo2.trg_type;
+ linkinfo2.linfo.type == H5L_TYPE_EXTERNAL)
+ argdata->type[1] = (h5trav_type_t)linkinfo2.trg_type;
}
}
/* if objects are not the same type */
@@ -1633,29 +1664,30 @@ hsize_t diff(hid_t file1_id,
{
switch(object_type)
{
- case H5TRAV_TYPE_DATASET:
- do_print_objname("dataset", path1, path2, options);
- break;
- case H5TRAV_TYPE_NAMED_DATATYPE:
- do_print_objname("datatype", path1, path2, options);
- break;
- case H5TRAV_TYPE_GROUP:
- do_print_objname("group", path1, path2, options);
- break;
- case H5TRAV_TYPE_LINK:
- do_print_objname("link", path1, path2, options);
- break;
- case H5TRAV_TYPE_UDLINK:
- if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL)
- do_print_objname("external link", path1, path2, options);
- else
- do_print_objname ("user defined link", path1, path2, options);
- break;
- default:
- parallel_print("Comparison not supported: <%s> and <%s> are of type %s\n",
- path1, path2, get_type(object_type) );
- options->not_cmp = 1;
- break;
+ case H5TRAV_TYPE_DATASET:
+ do_print_objname("dataset", path1, path2, options);
+ break;
+ case H5TRAV_TYPE_NAMED_DATATYPE:
+ do_print_objname("datatype", path1, path2, options);
+ break;
+ case H5TRAV_TYPE_GROUP:
+ do_print_objname("group", path1, path2, options);
+ break;
+ case H5TRAV_TYPE_LINK:
+ do_print_objname("link", path1, path2, options);
+ break;
+ case H5TRAV_TYPE_UDLINK:
+ if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL)
+ do_print_objname("external link", path1, path2, options);
+ else
+ do_print_objname ("user defined link", path1, path2, options);
+ break;
+ case H5TRAV_TYPE_UNKNOWN:
+ default:
+ parallel_print("Comparison not supported: <%s> and <%s> are of type %s\n",
+ path1, path2, get_type(object_type) );
+ options->not_cmp = 1;
+ break;
} /* switch(type)*/
print_found(nfound);
@@ -1862,6 +1894,7 @@ hsize_t diff(hid_t file1_id,
}
break;
+ case H5TRAV_TYPE_UNKNOWN:
default:
if(options->m_verbose)
parallel_print("Comparison not supported: <%s> and <%s> are of type %s\n",
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/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index f6e6329..d7c5639 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -441,13 +441,13 @@ hsize_t diff_datasetid( hid_t did1,
HDassert(sm_nbytes > 0);
} /* end for */
- /* malloc return code should be verified.
+ /* malloc return code should be verified.
* If fail, need to handle the error.
* This else branch should be recoded as a separate function.
* Note that there are many "goto error" within this branch
* that fails to address freeing other objects created here.
- * E.g., sm_space.
- */
+ * E.g., sm_space.
+ */
sm_buf1 = HDmalloc((size_t)sm_nbytes);
HDassert(sm_buf1);
sm_buf2 = HDmalloc((size_t)sm_nbytes);
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..d28b744 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -119,7 +119,7 @@
-D "TEST_EXPECT=${resultcode}"
-D "TEST_MASK_MOD=true"
-D "TEST_REFERENCE=${resultfile}.ls"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -147,7 +147,7 @@
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -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 6c7ff41..746a85e 100644
--- a/vms/src/h5pubconf.h
+++ b/vms/src/h5pubconf.h
@@ -408,6 +408,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#define H5_HAVE_UNISTD_H 1
+/* Define to 1 if you have the `asprintf' function. */
+/* #undef H5_HAVE_ASPRINTF */
+
/* Define to 1 if you have the `vasprintf' function. */
/* #undef H5_HAVE_VASPRINTF */
@@ -508,7 +511,7 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.176"
+#define H5_PACKAGE_STRING "HDF5 1.9.184"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
@@ -517,7 +520,7 @@
#define H5_PACKAGE_URL ""
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.176"
+#define H5_PACKAGE_VERSION "1.9.184"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "ll"
@@ -680,7 +683,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.176"
+#define H5_VERSION "1.9.184"
/* 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]";