diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-03-23 13:48:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 13:48:05 (GMT) |
commit | fbb532cd633e216f47ce846493b38af02cfbb43a (patch) | |
tree | 1ef7bc9f25ec0832f8b25bb8ea4be34d53bd144d | |
parent | 78375882485a99a81caa933928ed08d7a38ef88b (diff) | |
download | hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.zip hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.gz hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.bz2 |
VFD SWMR: Normalization with develop (#1506)
* Brought over plugin and test script changes
* Removes remaining register keywords (#1481)
* Fixed warnings in the aux process code
* Minor fixes from develop
* Minor changes from develop, fixed format warnings
* Formatted source
* Added HD prefix to timespec_get
* Cleanup in new files
* Removes the MANIFEST file and unused release files (#1497)
* Removes the MANIFEST file and unused release files
* Updated tar command
* checkposix corrections
* More checkposix fixes
* Ripped out unused instrumentation functionality
* Brought over cache tagging changes from develop
* Changes to tagged metadata expulsion iteration
* Fixed typo
* Brought over H5O__free() changes from develop
* Brings (unused) parallel page buffer test in line with develop
* Moved the functionality in supervise.subr to test_vfd_swmr.sh
* Tools VFD parameter updates
* Committing clang-format changes
* H5F VFD SWMR refactoring
* Committing clang-format changes
* Misc changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
126 files changed, 3109 insertions, 9566 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3ed6b2..dc31de6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -184,7 +184,6 @@ jobs: if: matrix.generator == 'autogen' run: | sh ./autogen.sh - sh ./bin/chkmanifest mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 33608b5..6fc2f48 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -179,7 +179,6 @@ jobs: if: matrix.generator == 'autogen' run: | sh ./autogen.sh - sh ./bin/chkmanifest mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index a31e52c..0000000 --- a/MANIFEST +++ /dev/null @@ -1,3954 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -#------------------------------------------------------------------------------ -# This is the list of files that are part of HDF5 source distribution. -# All files have a `./' prefix and appear in lexicographic order. -# Lines that end with _DO_NOT_DISTRIBUTE_ will not be included in a -# release. Blank lines and comments are ignored. Comments must start -# in column one with a '#'. -#------------------------------------------------------------------------------ - -./.gitattributes _DO_NOT_DISTRIBUTE_ -./.gitignore _DO_NOT_DISTRIBUTE_ -./.autom4te.cfg _DO_NOT_DISTRIBUTE_ -./.h5chkright.ini _DO_NOT_DISTRIBUTE_ -./ACKNOWLEDGMENTS -./COPYING -./COPYING_AKADIO -./COPYING_LBNL_HDF5 -./MANIFEST -./Makefile.dist -./Makefile.am -./README.md -./acsite.m4 -./autogen.sh -./configure.ac - -./.clang-format -./.github/CODEOWNERS _DO_NOT_DISTRIBUTE_ -./.github/workflows/clang-format-fix.yml _DO_NOT_DISTRIBUTE_ -./.github/workflows/clang-format-check.yml _DO_NOT_DISTRIBUTE_ -./.github/workflows/main.yml _DO_NOT_DISTRIBUTE_ -./.github/workflows/pr-check.yml _DO_NOT_DISTRIBUTE_ -./.github/workflows/codespell.yml _DO_NOT_DISTRIBUTE_ -./.github/FUNDING.yml _DO_NOT_DISTRIBUTE_ - -./m4/aclocal_fc.m4 -./m4/aclocal_fc.f90 -./m4/ax_check_class.m4 -./m4/ax_check_classpath.m4 -./m4/ax_check_java_home.m4 -./m4/ax_check_junit.m4 -./m4/ax_check_rqrd_class.m4 -./m4/ax_java_check_class.m4 -./m4/ax_java_options.m4 -./m4/ax_jni_include_dir.m4 -./m4/ax_prog_doxygen.m4 -./m4/ax_prog_jar.m4 -./m4/ax_prog_java_cc.m4 -./m4/ax_prog_java_works.m4 -./m4/ax_prog_java.m4 -./m4/ax_prog_javac_works.m4 -./m4/ax_prog_javac.m4 -./m4/ax_prog_javadoc.m4 -./m4/ax_prog_javah.m4 -./m4/ax_try_compile_java.m4 -./m4/ax_try_run_java.m4 - -./bin/bbrelease _DO_NOT_DISTRIBUTE_ -./bin/buildhdf5 -./bin/checkapi _DO_NOT_DISTRIBUTE_ -./bin/checkposix _DO_NOT_DISTRIBUTE_ -./bin/chkconfigure _DO_NOT_DISTRIBUTE_ -./bin/chkcopyright _DO_NOT_DISTRIBUTE_ -./bin/chkmanifest -./bin/cmakehdf5 -./bin/debug-ohdr _DO_NOT_DISTRIBUTE_ -./bin/dependencies -./bin/deploy -./bin/distdep -./bin/errors _DO_NOT_DISTRIBUTE_ -./bin/format_source -./bin/format_source_patch -./bin/genparser -./bin/gcov_script _DO_NOT_DISTRIBUTE_ -./bin/h5cc.in -./bin/h5redeploy.in -./bin/h5vers -./bin/iostats -./bin/locate_sw -./bin/make_err -./bin/make_overflow -./bin/make_vers -./bin/Makefile.am -./bin/makehelp -./bin/mkdirs -./bin/newer -./bin/output_filter.sh -./bin/README _DO_NOT_DISTRIBUTE_ -./bin/release -./bin/restore.sh -./bin/runtest _DO_NOT_DISTRIBUTE_ -./bin/runbkgprog _DO_NOT_DISTRIBUTE_ -./bin/snapshot -./bin/snapshot_version _DO_NOT_DISTRIBUTE_ -./bin/switch_maint_mode _DO_NOT_DISTRIBUTE_ -./bin/timekeeper _DO_NOT_DISTRIBUTE_ -./bin/trace -./bin/warnhist _DO_NOT_DISTRIBUTE_ -./bin/yodconfigure -./bin/batch/ctestP.lsf.in.cmake -./bin/batch/ctestP.sl.in.cmake -./bin/batch/ctestS.lsf.in.cmake -./bin/batch/ctestS.sl.in.cmake -./bin/batch/knl_ctestP.sl.in.cmake -./bin/batch/knl_ctestS.sl.in.cmake -./bin/batch/knl_H5detect.sl.in.cmake -./bin/batch/ctest.qsub.in.cmake -./bin/batch/ray_ctestP.lsf.in.cmake -./bin/batch/ray_ctestS.lsf.in.cmake -./bin/batch/raybsub -./bin/pkgscrpts/h5rmflags _DO_NOT_DISTRIBUTE_ -./bin/pkgscrpts/makeHDF5BinaryTarfiles.pl _DO_NOT_DISTRIBUTE_ -./bin/pkgscrpts/makeInternalREADME.pl _DO_NOT_DISTRIBUTE_ -./bin/pkgscrpts/makeOuterREADME.pl _DO_NOT_DISTRIBUTE_ - -./config/BlankForm -./config/apple -./config/cce-fflags -./config/cce-flags -./config/commence.am -./config/conclude.am -./config/conclude_fc.am -./config/examples.am -./config/freebsd -./config/gnu-cxxflags -./config/gnu-fflags -./config/gnu-flags -./config/cygwin -./config/ibm-aix -./config/ibm-flags -./config/intel-cxxflags -./config/intel-fflags -./config/intel-flags -./config/libhdf5.pc.in -./config/linux-gnu -./config/linux-gnuaout -./config/linux-gnueabihf -./config/linux-gnulibc1 -./config/linux-gnulibc2 -./config/lt_vers.am -./config/Makefile.am.blank -./config/netbsd -./config/pgi-cxxflags -./config/pgi-fflags -./config/pgi-flags -./config/solaris - -#warnings files for both autotools and CMake -./config/clang-cxxflags -./config/clang-flags -./config/clang-warnings/developer-general -./config/clang-warnings/error-general -./config/clang-warnings/general -./config/clang-warnings/no-developer-general -./config/gnu-warnings/4.8-4.last -./config/gnu-warnings/4.8 -./config/gnu-warnings/4.9 -./config/gnu-warnings/5 -./config/gnu-warnings/6 -./config/gnu-warnings/7 -./config/gnu-warnings/8 -./config/gnu-warnings/9 -./config/gnu-warnings/9.3 -./config/gnu-warnings/cxx-general -./config/gnu-warnings/cxx-4.8 -./config/gnu-warnings/cxx-4.9 -./config/gnu-warnings/cxx-5 -./config/gnu-warnings/cxx-9 -./config/gnu-warnings/cxx-developer-4.8 -./config/gnu-warnings/cxx-error-5 -./config/gnu-warnings/cxx-error-general -./config/gnu-warnings/developer-4.8 -./config/gnu-warnings/developer-7 -./config/gnu-warnings/developer-8 -./config/gnu-warnings/developer-10 -./config/gnu-warnings/developer-general -./config/gnu-warnings/error-5 -./config/gnu-warnings/error-8 -./config/gnu-warnings/error-general -./config/gnu-warnings/general -./config/gnu-warnings/gfort-general -./config/gnu-warnings/gfort-4.8 -./config/gnu-warnings/developer-gfort-5 -./config/gnu-warnings/gfort-6 -./config/gnu-warnings/gfort-8 -./config/gnu-warnings/no-cxx-developer-4.8 -./config/gnu-warnings/no-developer-4.8 -./config/gnu-warnings/no-developer-8 -./config/gnu-warnings/no-developer-general -./config/intel-warnings/15 -./config/intel-warnings/18 -./config/intel-warnings/developer-general -./config/intel-warnings/general -./config/intel-warnings/win-developer-general -./config/intel-warnings/win-general -./config/intel-warnings/ifort-general - -./config/cmake/FindMFU.cmake -./config/cmake/FindDTCMP.cmake -./config/cmake/FindCIRCLE.cmake - -./config/site-specific/BlankForm - -./doc/branches-explained.md -./doc/SWMR_Example.png -./doc/SWMRdataflow.png -./doc/VFD_SWMR_Punch_List.md -./doc/VFD_SWMR_RFC_200916.docx -./doc/VFD_SWMR_RFC_200916.pdf -./doc/VFD_SWMR_RFC_2020-02-03.docx -./doc/vfd-swmr-user-guide.md -./doc/code-conventions.md -./doc/contributing.md -./doc/library-init-shutdown.md -./doxygen/aliases -./doxygen/CMakeLists.txt -./doxygen/Doxyfile.in -./doxygen/dox/APIVersions.dox -./doxygen/dox/About.dox -./doxygen/dox/Cookbook.dox -./doxygen/dox/DDLBNF110.dox -./doxygen/dox/DDLBNF112.dox -./doxygen/dox/FTS.dox -./doxygen/dox/GettingStarted.dox -./doxygen/dox/Glossary.dox -./doxygen/dox/H5AC_cache_config_t.dox -./doxygen/dox/MetadataCachingInHDF5.dox -./doxygen/dox/Overview.dox -./doxygen/dox/ReferenceManual.dox -./doxygen/dox/RFC.dox -./doxygen/dox/Specifications.dox -./doxygen/dox/TechnicalNotes.dox -./doxygen/dox/api-compat-macros.dox -./doxygen/dox/maybe_metadata_reads.dox -./doxygen/dox/rm-template.dox -./doxygen/dox/cookbook/Accessibility.c -./doxygen/dox/cookbook/Accessibility.dox -./doxygen/dox/cookbook/Attributes.c -./doxygen/dox/cookbook/Attributes.dox -./doxygen/dox/cookbook/Files.c -./doxygen/dox/cookbook/Files.dox -./doxygen/dox/cookbook/Performance.dox -./doxygen/examples/DebuggingHDF5Applications.html -./doxygen/examples/FF-IH_FileGroup.gif -./doxygen/examples/FF-IH_FileObject.gif -./doxygen/examples/FileFormat.html -./doxygen/examples/FileFormatSpecChunkDiagram.jpg -./doxygen/examples/Filters.html -./doxygen/examples/H5Pset_metadata_read_attempts.c -./doxygen/examples/H5Pset_object_flush_cb.c -./doxygen/examples/H5.format.1.0.html -./doxygen/examples/H5.format.1.1.html -./doxygen/examples/H5.format.2.0.html -./doxygen/examples/H5.format.html -./doxygen/examples/H5A_examples.c -./doxygen/examples/H5D_examples.c -./doxygen/examples/H5E_examples.c -./doxygen/examples/H5Fclose.c -./doxygen/examples/H5Fcreate.c -./doxygen/examples/H5F_examples.c -./doxygen/examples/H5G_examples.c -./doxygen/examples/H5I_examples.c -./doxygen/examples/H5L_examples.c -./doxygen/examples/H5O_examples.c -./doxygen/examples/H5PL_examples.c -./doxygen/examples/H5Pget_metadata_read_attempts.1.c -./doxygen/examples/H5Pget_metadata_read_attempts.2.c -./doxygen/examples/H5Pget_metadata_read_attempts.3.c -./doxygen/examples/H5Pget_object_flush_cb.c -./doxygen/examples/H5P_examples.c -./doxygen/examples/H5R_examples.c -./doxygen/examples/H5S_examples.c -./doxygen/examples/H5T_examples.c -./doxygen/examples/H5Z_examples.c -./doxygen/examples/H5_examples.c -./doxygen/examples/ImageSpec.html -./doxygen/examples/IOFlow.html -./doxygen/examples/PaletteExample1.gif -./doxygen/examples/Palettes.fm.anc.gif -./doxygen/examples/TableSpec.html -./doxygen/examples/ThreadSafeLibrary.html -./doxygen/examples/VFL.html -./doxygen/examples/hello_hdf5.c -./doxygen/hdf5_footer.html -./doxygen/hdf5_header.html -./doxygen/hdf5_navtree_hacks.js -./doxygen/hdf5doxy.css -./doxygen/hdf5doxy_layout.xml -./doxygen/img/FF-IH_FileGroup.gif -./doxygen/img/FF-IH_FileObject.gif -./doxygen/img/FileFormatSpecChunkDiagram.jpg -./doxygen/img/HDF5.png -./doxygen/img/HDFG-logo.png -./doxygen/img/IOFlow.gif -./doxygen/img/IOFlow2.gif -./doxygen/img/IOFlow3.gif -./doxygen/img/PaletteExample1.gif -./doxygen/img/Palettes.fm.anc.gif -./doxygen/img/ftv2node.png -./doxygen/img/ftv2pnode.png - -./examples/Attributes.txt -./examples/Makefile.am -./examples/credel.c -./examples/gaussians.c -./examples/h5_chunk_read.c -./examples/h5_compound.c -./examples/h5_crtgrpd.c -./examples/h5_debug_trace.c -./examples/h5_subset.c -./examples/h5_cmprss.c -./examples/h5_rdwt.c -./examples/h5_crtgrpar.c -./examples/h5_extend.c -./examples/h5_crtatt.c -./examples/h5_crtgrp.c -./examples/h5_crtdat.c -./examples/h5_drivers.c -./examples/h5_dtransform.c -./examples/h5_elink_unix2win.c -./examples/h5_extend_write.c -./examples/h5_extlink.c -./examples/h5_group.c -./examples/h5_interm_group.c -./examples/h5_read.c -./examples/h5_write.c -./examples/h5_select.c -./examples/h5_attribute.c -./examples/h5_mount.c -./examples/h5_ref_compat.c -./examples/h5_ref_extern.c -./examples/h5_reference_deprec.c -./examples/h5_ref2reg_deprec.c -./examples/h5_shared_mesg.c -./examples/ph5example.c -./examples/ph5_filtered_writes.c -./examples/ph5_filtered_writes_no_sel.c -./examples/h5_vds.c -./examples/h5_vds-exc.c -./examples/h5_vds-exclim.c -./examples/h5_vds-eiger.c -./examples/h5_vds-simpleIO.c -./examples/h5_vds-percival.c -./examples/h5_vds-percival-unlim.c -./examples/h5_vds-percival-unlim-maxmin.c -./examples/nbcompat.c -./examples/nbcompat.h -./examples/testh5cc.sh.in -./examples/README - - -#------------------------------------------------------------------------------ -# -# Begin Fortran interface -# -#------------------------------------------------------------------------------ - -./fortran/Makefile.am -./fortran/robodoc.rc - -./fortran/examples/Makefile.am -./fortran/examples/compound.f90 -./fortran/examples/compound_fortran2003.f90 -./fortran/examples/compound_complex_fortran2003.f90 -./fortran/examples/h5_cmprss.f90 -./fortran/examples/h5_crtatt.f90 -./fortran/examples/h5_crtdat.f90 -./fortran/examples/h5_crtgrp.f90 -./fortran/examples/h5_crtgrpar.f90 -./fortran/examples/h5_crtgrpd.f90 -./hl/fortran/examples/exlite.f90 -./fortran/examples/h5_extend.f90 -./hl/fortran/examples/ex_ds1.f90 -./fortran/examples/h5_rdwt.f90 -./fortran/examples/h5_subset.f90 -./fortran/examples/hyperslab.f90 -./fortran/examples/mountexample.f90 -./fortran/examples/ph5example.f90 -./fortran/examples/refobjexample.f90 -./fortran/examples/refregexample.f90 -./fortran/examples/run-fortran-ex.sh.in -./fortran/examples/selectele.f90 -./fortran/examples/testh5fc.sh.in -./fortran/examples/nested_derived_type.f90 -./fortran/examples/rwdset_fortran2003.f90 - -./fortran/src/H5_buildiface.F90 -./fortran/src/H5_f.c -./fortran/src/H5_ff.F90 -./fortran/src/H5Af.c -./fortran/src/H5Aff.F90 -./fortran/src/H5Df.c -./fortran/src/H5Dff.F90 -./fortran/src/H5Ef.c -./fortran/src/H5Eff.F90 -./fortran/src/H5Ff.c -./fortran/src/H5Fff.F90 -./fortran/src/H5Gf.c -./fortran/src/H5Gff.F90 -./fortran/src/H5If.c -./fortran/src/H5Iff.F90 -./fortran/src/H5Lf.c -./fortran/src/H5Lff.F90 -./fortran/src/H5Of.c -./fortran/src/H5Off.F90 -./fortran/src/H5Pf.c -./fortran/src/H5Pff.F90 -./fortran/src/H5Rf.c -./fortran/src/H5Rff.F90 -./fortran/src/H5Sf.c -./fortran/src/H5Sff.F90 -./fortran/src/H5Tf.c -./fortran/src/H5Tff.F90 -./fortran/src/H5VLff.F90 -./fortran/src/H5Zf.c -./fortran/src/H5Zff.F90 -./fortran/src/H5config_f.inc.cmake -./fortran/src/H5config_f.inc.in -./fortran/src/H5fort_type_defines.h.cmake -./fortran/src/H5fort_type_defines.h.in -./fortran/src/H5f90.h -./fortran/src/H5f90global.F90 -./fortran/src/H5f90i.h -./fortran/src/H5f90kit.c -./fortran/src/H5fortkit.F90 -./fortran/src/H5f90proto.h -./fortran/src/H5match_types.c -./fortran/src/HDF5.F90 -./fortran/src/Makefile.am -./fortran/src/README -./fortran/src/h5fc.in -./fortran/src/hdf5_fortrandll.def.in - -./fortran/test/Makefile.am -./fortran/test/vol_connector.F90 -./fortran/test/fflush1.F90 -./fortran/test/fflush2.F90 -./fortran/test/fortranlib_test.F90 -./fortran/test/fortranlib_test_1_8.F90 -./fortran/test/fortranlib_test_F03.F90 -./fortran/test/t.c -./fortran/test/t.h -./fortran/test/tf.F90 -./fortran/test/tH5A.F90 -./fortran/test/tH5A_1_8.F90 -./fortran/test/tH5D.F90 -./fortran/test/tH5E_F03.F90 -./fortran/test/tH5E.F90 -./fortran/test/tH5F.F90 -./fortran/test/tH5F_F03.F90 -./fortran/test/tH5G.F90 -./fortran/test/tH5G_1_8.F90 -./fortran/test/tH5I.F90 -./fortran/test/tH5L_F03.F90 -./fortran/test/tH5MISC_1_8.F90 -./fortran/test/tH5O.F90 -./fortran/test/tH5O_F03.F90 -./fortran/test/tH5P_F03.F90 -./fortran/test/tH5P.F90 -./fortran/test/tH5R.F90 -./fortran/test/tH5S.F90 -./fortran/test/tH5Sselect.F90 -./fortran/test/tH5T_F03.F90 -./fortran/test/tH5T.F90 -./fortran/test/tH5VL.F90 -./fortran/test/tH5Z.F90 -./fortran/test/tHDF5_1_8.F90 -./fortran/test/tHDF5_F03.F90 -./fortran/test/tHDF5.F90 -./fortran/test/H5_test_buildiface.F90 - -./fortran/testpar/Makefile.am -./fortran/testpar/ptest.f90 -./fortran/testpar/hyper.f90 -./fortran/testpar/mdset.f90 - -#------------------------------------------------------------------------------ -# -# End Fortran interface -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# -# Begin C++ interface -# -#------------------------------------------------------------------------------ - -./c++/Makefile.am - -./c++/examples/chunks.cpp -./c++/examples/compound.cpp -./c++/examples/create.cpp -./c++/examples/expected.out -./c++/examples/extend_ds.cpp -./c++/examples/h5group.cpp -./c++/examples/h5tutr_cmprss.cpp -./c++/examples/h5tutr_crtatt.cpp -./c++/examples/h5tutr_crtdat.cpp -./c++/examples/h5tutr_crtgrpar.cpp -./c++/examples/h5tutr_crtgrp.cpp -./c++/examples/h5tutr_crtgrpd.cpp -./c++/examples/h5tutr_extend.cpp -./c++/examples/h5tutr_rdwt.cpp -./c++/examples/h5tutr_subset.cpp -./c++/examples/readdata.cpp -./c++/examples/testh5c++.sh.in -./c++/examples/writedata.cpp -./c++/examples/Makefile.am -./c++/examples/run-c++-ex.sh.in - -./c++/src/H5AbstractDs.cpp -./c++/src/H5AbstractDs.h -./c++/src/H5Alltypes.h -./c++/src/H5ArrayType.cpp -./c++/src/H5ArrayType.h -./c++/src/H5AtomType.cpp -./c++/src/H5AtomType.h -./c++/src/H5Attribute.cpp -./c++/src/H5Attribute.h -./c++/src/H5Classes.h -./c++/src/H5CommonFG.cpp -./c++/src/H5CommonFG.h -./c++/src/H5CompType.cpp -./c++/src/H5CompType.h -./c++/src/H5Cpp.h -./c++/src/H5CppDoc.h -./c++/src/H5DataSet.cpp -./c++/src/H5DataSet.h -./c++/src/H5DataSpace.cpp -./c++/src/H5DataSpace.h -./c++/src/H5DataType.cpp -./c++/src/H5DataType.h -./c++/src/H5DaccProp.cpp -./c++/src/H5DaccProp.h -./c++/src/H5DcreatProp.cpp -./c++/src/H5DcreatProp.h -./c++/src/H5DxferProp.cpp -./c++/src/H5DxferProp.h -./c++/src/H5EnumType.cpp -./c++/src/H5EnumType.h -./c++/src/H5Exception.cpp -./c++/src/H5Exception.h -./c++/src/H5FaccProp.cpp -./c++/src/H5FaccProp.h -./c++/src/H5FcreatProp.cpp -./c++/src/H5FcreatProp.h -./c++/src/H5File.cpp -./c++/src/H5File.h -./c++/src/H5FloatType.cpp -./c++/src/H5FloatType.h -./c++/src/H5Group.cpp -./c++/src/H5Group.h -./c++/src/H5IdComponent.cpp -./c++/src/H5IdComponent.h -./c++/src/H5Include.h -./c++/src/H5IntType.cpp -./c++/src/H5IntType.h -./c++/src/H5LaccProp.cpp -./c++/src/H5LaccProp.h -./c++/src/H5LcreatProp.cpp -./c++/src/H5LcreatProp.h -./c++/src/H5Library.cpp -./c++/src/H5Library.h -./c++/src/H5Location.cpp -./c++/src/H5Location.h -./c++/src/H5Object.cpp -./c++/src/H5Object.h -./c++/src/H5OcreatProp.cpp -./c++/src/H5OcreatProp.h -./c++/src/H5PredType.cpp -./c++/src/H5PredType.h -./c++/src/H5PropList.cpp -./c++/src/H5PropList.h -./c++/src/H5StrType.cpp -./c++/src/H5StrType.h -./c++/src/H5VarLenType.cpp -./c++/src/H5VarLenType.h -./c++/src/Makefile.am -./c++/src/RM_stylesheet.css -./c++/src/C2Cppfunction_map.htm -./c++/src/cpp_doc_config -./c++/src/h5c++.in -./c++/src/footer.html -./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 - -./c++/test/H5srcdir_str.h.in -./c++/test/Makefile.am -./c++/test/dsets.cpp -./c++/test/h5cpputil.cpp -./c++/test/h5cpputil.h -./c++/test/tarray.cpp -./c++/test/tattr.cpp -./c++/test/tcompound.cpp -./c++/test/tdspl.cpp -./c++/test/testhdf5.cpp -./c++/test/tfile.cpp -./c++/test/tfilter.cpp -./c++/test/th5s.cpp -./c++/test/th5s.h5 -./c++/test/titerate.cpp -./c++/test/tlinks.cpp -./c++/test/tobject.cpp -./c++/test/ttypes.cpp -./c++/test/trefer.cpp -./c++/test/tvlstr.cpp - -#------------------------------------------------------------------------------ -# -# End C++ interface -# -#------------------------------------------------------------------------------ - -./release_docs/HISTORY-1_0-1_8_0_rc3.txt -./release_docs/HISTORY-1_8_0-1_10_0.txt -./release_docs/HISTORY-1_10_0-1_12_0.txt -./release_docs/HISTORY-1_8.txt -./release_docs/HISTORY-1_10.txt -./release_docs/HISTORY-1_12.txt -./release_docs/HISTORY-1_13.txt -./release_docs/INSTALL -./release_docs/INSTALL_CMake.txt -./release_docs/INSTALL_Cygwin.txt -./release_docs/INSTALL_parallel -./release_docs/INSTALL_Warnings.txt -./release_docs/INSTALL_Windows.txt -./release_docs/README_HDF5_CMake -./release_docs/README_HPC -./release_docs/RELEASE.txt -./release_docs/USING_HDF5_CMake.txt -./release_docs/USING_HDF5_VS.txt - -./src/.indent.pro _DO_NOT_DISTRIBUTE_ -./src/hdf5.lnt _DO_NOT_DISTRIBUTE_ -./src/hdf5-win.lnt _DO_NOT_DISTRIBUTE_ -./src/hdf5-lin.lnt _DO_NOT_DISTRIBUTE_ -./src/H5.c -./src/H5checksum.c -./src/H5dbg.c -./src/H5api_adpt.h -./src/H5err.txt -./src/H5detect.c -./src/H5make_libsettings.c -./src/H5module.h -./src/H5mpi.c -./src/H5overflow.txt -./src/H5private.h -./src/H5public.h -./src/H5system.c -./src/H5timer.c -./src/H5trace.c -./src/H5vers.txt -./src/H5A.c -./src/H5Abtree2.c -./src/H5Adense.c -./src/H5Adeprec.c -./src/H5Aint.c -./src/H5Amodule.h -./src/H5Atest.c -./src/H5Apkg.h -./src/H5Aprivate.h -./src/H5Apublic.h -./src/H5AC.c -./src/H5ACdbg.c -./src/H5ACmodule.h -./src/H5ACmpio.c -./src/H5ACpkg.h -./src/H5ACprivate.h -./src/H5ACpublic.h -./src/H5ACproxy_entry.c -./src/H5B.c -./src/H5Bcache.c -./src/H5Bdbg.c -./src/H5Bmodule.h -./src/H5Bpkg.h -./src/H5Bprivate.h -./src/H5B2.c -./src/H5B2cache.c -./src/H5B2dbg.c -./src/H5B2hdr.c -./src/H5B2int.c -./src/H5B2internal.c -./src/H5B2leaf.c -./src/H5B2module.h -./src/H5B2pkg.h -./src/H5B2private.h -./src/H5B2stat.c -./src/H5B2test.c -./src/H5C.c -./src/H5Cdbg.c -./src/H5Cepoch.c -./src/H5Cimage.c -./src/H5Clog.c -./src/H5Clog.h -./src/H5Clog_json.c -./src/H5Clog_trace.c -./src/H5Cmodule.h -./src/H5Cmpio.c -./src/H5Cpkg.h -./src/H5Cprefetched.c -./src/H5Cprivate.h -./src/H5Cpublic.h -./src/H5Cquery.c -./src/H5Ctag.c -./src/H5Ctest.c -./src/H5CS.c -./src/H5CSprivate.h -./src/H5CX.c -./src/H5CXmodule.h -./src/H5CXprivate.h -./src/H5D.c -./src/H5Dbtree.c -./src/H5Dbtree2.c -./src/H5Dchunk.c -./src/H5Dcompact.c -./src/H5Dcontig.c -./src/H5Ddbg.c -./src/H5Ddeprec.c -./src/H5Dearray.c -./src/H5Defl.c -./src/H5Dfarray.c -./src/H5Dfill.c -./src/H5Dint.c -./src/H5Dio.c -./src/H5Dlayout.c -./src/H5Dmodule.h -./src/H5Dmpio.c -./src/H5Dnone.c -./src/H5Doh.c -./src/H5Dpkg.h -./src/H5Dprivate.h -./src/H5Dpublic.h -./src/H5Dscatgath.c -./src/H5Dselect.c -./src/H5Dsingle.c -./src/H5Dtest.c -./src/H5Dvirtual.c -./src/H5E.c -./src/H5Edeprec.c -./src/H5Eint.c -./src/H5Emodule.h -./src/H5Epkg.h -./src/H5Eprivate.h -./src/H5Epublic.h -./src/H5EA.c -./src/H5EAcache.c -./src/H5EAdbg.c -./src/H5EAdblkpage.c -./src/H5EAdblock.c -./src/H5EAhdr.c -./src/H5EAiblock.c -./src/H5EAint.c -./src/H5EAmodule.h -./src/H5EApkg.h -./src/H5EAprivate.h -./src/H5EAsblock.c -./src/H5EAstat.c -./src/H5EAtest.c -./src/H5ES.c -./src/H5ESdevelop.h -./src/H5ESevent.c -./src/H5ESint.c -./src/H5ESlist.c -./src/H5ESmodule.h -./src/H5ESpkg.h -./src/H5ESprivate.h -./src/H5ESpublic.h -./src/H5F.c -./src/H5Faccum.c -./src/H5Fcwfs.c -./src/H5Fdbg.c -./src/H5Fdeprec.c -./src/H5Fefc.c -./src/H5Ffake.c -./src/H5Fint.c -./src/H5Fio.c -./src/H5Fmodule.h -./src/H5Fmount.c -./src/H5Fmpi.c -./src/H5Fquery.c -./src/H5Fsfile.c -./src/H5Fspace.c -./src/H5Fsuper.c -./src/H5Fsuper_cache.c -./src/H5Fpkg.h -./src/H5Fprivate.h -./src/H5Fpublic.h -./src/H5Ftest.c -./src/H5Fvfd_swmr.c -./src/H5FA.c -./src/H5FAcache.c -./src/H5FAdbg.c -./src/H5FAdblkpage.c -./src/H5FAdblock.c -./src/H5FAhdr.c -./src/H5FAint.c -./src/H5FAmodule.h -./src/H5FApkg.h -./src/H5FAprivate.h -./src/H5FAstat.c -./src/H5FAtest.c -./src/H5FD.c -./src/H5FDcore.c -./src/H5FDcore.h -./src/H5FDdevelop.h -./src/H5FDdirect.c -./src/H5FDdirect.h -./src/H5FDdrvr_module.h -./src/H5FDfamily.c -./src/H5FDfamily.h -./src/H5FDhdfs.c -./src/H5FDhdfs.h -./src/H5FDint.c -./src/H5FDlog.c -./src/H5FDlog.h -./src/H5FDmirror.c -./src/H5FDmirror.h -./src/H5FDmirror_priv.h -./src/H5FDmodule.h -./src/H5FDmpi.c -./src/H5FDmpi.h -./src/H5FDmpio.c -./src/H5FDmpio.h -./src/H5FDmulti.c -./src/H5FDmulti.h -./src/H5FDperform.c -./src/H5FDros3.c -./src/H5FDros3.h -./src/H5FDpkg.h -./src/H5FDprivate.h -./src/H5FDpublic.h -./src/H5FDs3comms.h -./src/H5FDs3comms.c -./src/H5FDsec2.c -./src/H5FDsec2.h -./src/H5FDspace.c -./src/H5FDsplitter.c -./src/H5FDsplitter.h -./src/H5FDstdio.c -./src/H5FDstdio.h -./src/H5FDtest.c -./src/H5FDvfd_swmr_instr.c -./src/H5FDvfd_swmr_private.h -./src/H5FDvfd_swmr.c -./src/H5FDvfd_swmr.h -./src/H5FDwindows.c -./src/H5FDwindows.h -./src/H5FL.c -./src/H5FLmodule.h -./src/H5FLprivate.h -./src/H5FO.c -./src/H5FOprivate.h -./src/H5FS.c -./src/H5FScache.c -./src/H5FSdbg.c -./src/H5FSint.c -./src/H5FSmodule.h -./src/H5FSpkg.h -./src/H5FSprivate.h -./src/H5FSsection.c -./src/H5FSstat.c -./src/H5FStest.c -./src/H5G.c -./src/H5Gbtree2.c -./src/H5Gcache.c -./src/H5Gcompact.c -./src/H5Gdense.c -./src/H5Gdeprec.c -./src/H5Gent.c -./src/H5Gint.c -./src/H5Glink.c -./src/H5Gloc.c -./src/H5Gmodule.h -./src/H5Gname.c -./src/H5Gnode.c -./src/H5Gobj.c -./src/H5Goh.c -./src/H5Gpkg.h -./src/H5Gprivate.h -./src/H5Gpublic.h -./src/H5Groot.c -./src/H5Gstab.c -./src/H5Gtest.c -./src/H5Gtraverse.c -./src/H5HF.c -./src/H5HFbtree2.c -./src/H5HFcache.c -./src/H5HFdbg.c -./src/H5HFdblock.c -./src/H5HFdtable.c -./src/H5HFhdr.c -./src/H5HFhuge.c -./src/H5HFiblock.c -./src/H5HFiter.c -./src/H5HFman.c -./src/H5HFmodule.h -./src/H5HFpkg.h -./src/H5HFprivate.h -./src/H5HFsection.c -./src/H5HFspace.c -./src/H5HFstat.c -./src/H5HFtest.c -./src/H5HFtiny.c -./src/H5HG.c -./src/H5HGcache.c -./src/H5HGdbg.c -./src/H5HGmodule.h -./src/H5HGpkg.h -./src/H5HGprivate.h -./src/H5HGquery.c -./src/H5HL.c -./src/H5HLcache.c -./src/H5HLdbg.c -./src/H5HLdblk.c -./src/H5HLint.c -./src/H5HLmodule.h -./src/H5HLpkg.h -./src/H5HLprfx.c -./src/H5HLprivate.h -./src/H5HP.c -./src/H5HPprivate.h -./src/H5I.c -./src/H5Idbg.c -./src/H5Idevelop.h -./src/H5Iint.c -./src/H5Imodule.h -./src/H5Ipkg.h -./src/H5Iprivate.h -./src/H5Ipublic.h -./src/H5Itest.c -./src/H5L.c -./src/H5Ldeprec.c -./src/H5Ldevelop.h -./src/H5Lexternal.c -./src/H5Lint.c -./src/H5Lmodule.h -./src/H5Lpkg.h -./src/H5Lprivate.h -./src/H5Lpublic.h -./src/H5M.c -./src/H5Mmodule.h -./src/H5Mpkg.h -./src/H5Mprivate.h -./src/H5Mpublic.h -./src/H5MF.c -./src/H5MFaggr.c -./src/H5MFdbg.c -./src/H5MFmodule.h -./src/H5MFsection.c -./src/H5MFpkg.h -./src/H5MFprivate.h -./src/H5MM.c -./src/H5MMprivate.h -./src/H5MMpublic.h -./src/H5MP.c -./src/H5MPmodule.h -./src/H5MPpkg.h -./src/H5MPprivate.h -./src/H5MPtest.c -./src/H5MV.c -./src/H5MVmodule.h -./src/H5MVsection.c -./src/H5MVpkg.h -./src/H5MVprivate.h -./src/H5O.c -./src/H5Oainfo.c -./src/H5Oalloc.c -./src/H5Oattr.c -./src/H5Oattribute.c -./src/H5Obogus.c -./src/H5Obtreek.c -./src/H5Ocache.c -./src/H5Ocache_image.c -./src/H5Ochunk.c -./src/H5Ocont.c -./src/H5Ocopy.c -./src/H5Ocopy_ref.c -./src/H5Odbg.c -./src/H5Odeprec.c -./src/H5Odrvinfo.c -./src/H5Odtype.c -./src/H5Oefl.c -./src/H5Ofill.c -./src/H5Oflush.c -./src/H5Ofsinfo.c -./src/H5Oginfo.c -./src/H5Oint.c -./src/H5Olayout.c -./src/H5Olinfo.c -./src/H5Olink.c -./src/H5Omessage.c -./src/H5Omodule.h -./src/H5Omtime.c -./src/H5Oname.c -./src/H5Onull.c -./src/H5Opkg.h -./src/H5Opline.c -./src/H5Oprivate.h -./src/H5Opublic.h -./src/H5Orefcount.c -./src/H5Osdspace.c -./src/H5Oshared.c -./src/H5Oshared.h -./src/H5Oshmesg.c -./src/H5Ostab.c -./src/H5Otest.c -./src/H5Ounknown.c -./src/H5P.c -./src/H5Pacpl.c -./src/H5Pdapl.c -./src/H5Pdcpl.c -./src/H5Pdeprec.c -./src/H5Pdxpl.c -./src/H5Pencdec.c -./src/H5Pfapl.c -./src/H5Pfcpl.c -./src/H5Pfmpl.c -./src/H5Pgcpl.c -./src/H5Pint.c -./src/H5Plapl.c -./src/H5Plcpl.c -./src/H5Pmapl.c -./src/H5Pmcpl.c -./src/H5Pmodule.h -./src/H5Pocpl.c -./src/H5Pocpypl.c -./src/H5Ppkg.h -./src/H5Pprivate.h -./src/H5Ppublic.h -./src/H5Pstrcpl.c -./src/H5Ptest.c -./src/H5PB.c -./src/H5PBmodule.h -./src/H5PBpkg.h -./src/H5PBprivate.h -./src/H5PL.c -./src/H5PLint.c -./src/H5PLmodule.h -./src/H5PLpath.c -./src/H5PLpkg.h -./src/H5PLplugin_cache.c -./src/H5PLprivate.h -./src/H5PLpublic.h -./src/H5PLextern.h -./src/H5R.c -./src/H5Rdeprec.c -./src/H5Rint.c -./src/H5Rmodule.h -./src/H5Rpkg.h -./src/H5Rprivate.h -./src/H5Rpublic.h -./src/H5RS.c -./src/H5RSmodule.h -./src/H5RSprivate.h -./src/H5S.c -./src/H5Sall.c -./src/H5Sdbg.c -./src/H5Sdeprec.c -./src/H5Shyper.c -./src/H5Smodule.h -./src/H5Smpio.c -./src/H5Snone.c -./src/H5Spkg.h -./src/H5Spoint.c -./src/H5Sprivate.h -./src/H5Spublic.h -./src/H5Sselect.c -./src/H5Stest.c -./src/H5SL.c -./src/H5SLmodule.h -./src/H5SLprivate.h -./src/H5SM.c -./src/H5SMbtree2.c -./src/H5SMcache.c -./src/H5SMmessage.c -./src/H5SMmodule.h -./src/H5SMpkg.h -./src/H5SMprivate.h -./src/H5SMtest.c -./src/H5T.c -./src/H5Tarray.c -./src/H5Tbit.c -./src/H5Tcommit.c -./src/H5Tcompound.c -./src/H5Tconv.c -./src/H5Tcset.c -./src/H5Tdbg.c -./src/H5Tdeprec.c -./src/H5Tdevelop.h -./src/H5Tenum.c -./src/H5Tfields.c -./src/H5Tfixed.c -./src/H5Tfloat.c -./src/H5Tmodule.h -./src/H5Tnative.c -./src/H5Toffset.c -./src/H5Topaque.c -./src/H5Torder.c -./src/H5Toh.c -./src/H5Tpad.c -./src/H5Tpkg.h -./src/H5Tprecis.c -./src/H5Tprivate.h -./src/H5Tpublic.h -./src/H5Tref.c -./src/H5Tstrpad.c -./src/H5Tvisit.c -./src/H5Tvlen.c -./src/H5TS.c -./src/H5TSdevelop.h -./src/H5TSprivate.h -./src/H5UC.c -./src/H5UCprivate.h -./src/H5VL.c -./src/H5VLcallback.c -./src/H5VLconnector.h -./src/H5VLconnector_passthru.h -./src/H5VLdyn_ops.c -./src/H5VLint.c -./src/H5VLmodule.h -./src/H5VLnative.c -./src/H5VLnative.h -./src/H5VLnative_attr.c -./src/H5VLnative_blob.c -./src/H5VLnative_dataset.c -./src/H5VLnative_datatype.c -./src/H5VLnative_file.c -./src/H5VLnative_group.c -./src/H5VLnative_link.c -./src/H5VLnative_introspect.c -./src/H5VLnative_object.c -./src/H5VLnative_token.c -./src/H5VLnative_private.h -./src/H5VLpassthru.c -./src/H5VLpassthru.h -./src/H5VLpkg.h -./src/H5VLprivate.h -./src/H5VLpublic.h -./src/H5VLtest.c -./src/H5VM.c -./src/H5VMprivate.h -./src/H5WB.c -./src/H5WBprivate.h -./src/H5Z.c -./src/H5Zdeflate.c -./src/H5Zdevelop.h -./src/H5Zfletcher32.c -./src/H5Zmodule.h -./src/H5Znbit.c -./src/H5Zpkg.h -./src/H5Zprivate.h -./src/H5Zpublic.h -./src/H5Zscaleoffset.c -./src/H5Zshuffle.c -./src/H5Zszip.c -./src/H5Ztrans.c -./src/H5queue.h -./src/H5retry_private.h -./src/Makefile.am -./src/hdf5.h -./src/libhdf5.settings.in -./src/H5win32defs.h -./src/uthash.h - -./test/AtomicWriterReader.txt -./test/H5srcdir.h -./test/H5srcdir_str.h.in -./test/Makefile.am -./test/POSIX_Order_Write_Test_Report.docx -./test/POSIX_Order_Write_Test_Report.pdf -./test/SWMR_POSIX_Order_UG.txt -./test/SWMR_UseCase_UG.txt -./test/accum.c -./test/accum_swmr_reader.c -./test/aggr.h5 -./test/app_ref.c -./test/atomic_reader.c -./test/atomic_writer.c -./test/bad_compound.h5 -./test/bad_offset.h5 -./test/be_data.h5 -./test/be_extlink1.h5 -./test/be_extlink2.h5 -./test/big.c -./test/bittests.c -./test/btree2.c -./test/btree_idx_1_6.h5 -./test/btree_idx_1_8.h5 -./test/cache.c -./test/cache_api.c -./test/cache_common.c -./test/cache_common.h -./test/cache_image.c -./test/cache_logging.c -./test/cache_tagging.c -./test/chunk_info.c -./test/cmpd_dset.c -./test/cmpd_dtransform.c -./test/cork.c -./test/corrupt_stab_msg.h5 -./test/cross_read.c -./test/cve_2020_10810.h5 -./test/dangle.c -./test/deflate.h5 -./test/del_many_dense_attrs.c -./test/direct_chunk.c -./test/dsets.c -./test/dt_arith.c -./test/dtransform.c -./test/dtypes.c -./test/earray.c -./test/efc.c -./test/enc_dec_plist.c -./test/enc_dec_plist_cross_platform.c -./test/enum.c -./test/err_compat.c -./test/error_test.c -./test/event_set.c -./test/evict_on_close.c -./test/extend.c -./test/external.c -./test/external_common.c -./test/external_common.h -./test/external_env.c -./test/external_fname.h -./test/family_v16-000000.h5 -./test/family_v16-000001.h5 -./test/family_v16-000002.h5 -./test/family_v16-000003.h5 -./test/farray.c -./test/fheap.c -./test/file_image.c -./test/file_image_core_test.h5 -./test/filenotclosed.c -./test/filespace_1_6.h5 -./test/filespace_1_8.h5 -./test/fill18.h5 -./test/fill_old.h5 -./test/fillval.c -./test/filter_error.h5 -./test/filter_fail.c -./test/filter_plugin.c -./test/filter_plugin1_dsets.c -./test/filter_plugin2_dsets.c -./test/filter_plugin3_dsets.c -./test/filter_plugin4_groups.c -./test/flush1.c -./test/flush2.c -./test/flushrefresh.c -./test/freespace.c -./test/fsm_aggr_nopersist.h5 -./test/fsm_aggr_persist.h5 -./test/gen_bad_compound.c -./test/gen_bad_offset.c -./test/gen_bad_ohdr.c -./test/gen_bogus.c -./test/gen_bounds.c -./test/gen_cross.c -./test/gen_deflate.c -./test/gen_file_image.c -./test/gen_filespace.c -./test/gen_filters.c -./test/gen_mergemsg.c -./test/gen_new_array.c -./test/gen_new_fill.c -./test/gen_new_group.c -./test/gen_new_mtime.c -./test/gen_new_super.c -./test/gen_noencoder.c -./test/gen_nullspace.c -./test/gen_old_array.c -./test/gen_old_group.c -./test/gen_old_layout.c -./test/gen_old_mtime.c -./test/gen_plist.c -./test/gen_sizes_lheap.c -./test/gen_specmetaread.c -./test/gen_udlinks.c -./test/genall5.c -./test/genall5.h -./test/getname.c -./test/gheap.c -./test/group_old.h5 -./test/h5fc_ext1_f.h5 -./test/h5fc_ext1_i.h5 -./test/h5fc_ext2_if.h5 -./test/h5fc_ext2_sf.h5 -./test/h5fc_ext3_isf.h5 -./test/h5fc_ext_none.h5 -./test/h5test.c -./test/h5test.h -./test/hdfs.c -./test/hyperslab.c -./test/istore.c -./test/le_data.h5 -./test/le_extlink1.h5 -./test/le_extlink2.h5 -./test/lheap.c -./test/links.c -./test/links_env.c -./test/memleak_H5O_dtype_decode_helper_H5Odtype.h5 -./test/mergemsg.h5 -./test/mf.c -./test/mirror_vfd.c -./test/mount.c -./test/mtime.c -./test/multi_file_v16-r.h5 -./test/multi_file_v16-s.h5 -./test/noencoder.h5 -./test/none.h5 -./test/ntypes.c -./test/null_vol_connector.c -./test/null_vol_connector.h -./test/null_vfd_plugin.c -./test/null_vfd_plugin.h -./test/objcopy.c -./test/objcopy_ref.c -./test/ohdr.c -./test/page_buffer.c -./test/paged_nopersist.h5 -./test/paged_persist.h5 -./test/pool.c -./test/reserved.c -./test/ros3.c -./test/s3comms.c -./test/set_extent.c -# ====distribute this for now. See HDFFV-8236==== -./test/space_overflow.c -# ====end distribute this for now. See HDFFV-8236==== -./test/specmetaread.h5 -./test/stab.c -./test/stubs.c -./test/supervise.subr -./test/swmr.c -./test/swmr_addrem_writer.c -./test/swmr_common.c -./test/swmr_common.h -./test/swmr_generator.c -./test/swmr_reader.c -./test/swmr_remove_reader.c -./test/swmr_remove_writer.c -./test/swmr_sparse_reader.c -./test/swmr_sparse_writer.c -./test/swmr_start_write.c -./test/swmr_writer.c -./test/tarray.c -./test/tarrold.h5 -./test/tattr.c -./test/tbad_msg_count.h5 -./test/tbogus.h5 -./test/tcheck_version.c -./test/tchecksum.c -./test/tconfig.c -./test/tcoords.c -./test/test_filter_plugin.sh.in -./test/test_filters_be.h5 -./test/test_filters_le.h5 -./test/test_usecases.sh.in -./test/test_vol_plugin.sh.in -./test/testabort_fail.sh.in -./test/testcheck_version.sh.in -./test/testerror.sh.in -./test/testexternal_env.sh.in -./test/testflushrefresh.sh.in -./test/testframe.c -./test/testhdf5.c -./test/testhdf5.h -./test/testlibinfo.sh.in -./test/testlinks_env.sh.in -./test/testmeta.c -./test/test_mirror.sh.in -./test/testswmr.pwsh.in -./test/testswmr.sh.in -./test/testvds_env.sh.in -./test/testvdsswmr.pwsh.in -./test/testvdsswmr.sh.in -./test/testvfdswmr.sh.in -./test/tfile.c -./test/tgenprop.c -./test/th5o.c -./test/th5s.c -./test/th5s.h5 -./test/theap.c -./test/thread_id.c -./test/tid.c -./test/timer.c -./test/titerate.c -./test/tlayouto.h5 -./test/tmeta.c -./test/tmisc.c -./test/tmtimen.h5 -./test/tmtimeo.h5 -./test/trefer.c -./test/trefer_deprec.c -./test/trefer_shutdown.c -./test/trefstr.c -./test/tselect.c -./test/tsizeslheap.h5 -./test/tskiplist.c -./test/tsohm.c -./test/ttime.c -./test/ttsafe.c -./test/ttsafe.h -./test/ttsafe_acreate.c -./test/ttsafe_attr_vlen.c -./test/ttsafe_cancel.c -./test/ttsafe_dcreate.c -./test/ttsafe_error.c -./test/tunicode.c -./test/tvlstr.c -./test/tvltypes.c -./test/twriteorder.c -./test/unlink.c -./test/unregister.c -./test/use.h -./test/use_append_chunk.c -./test/use_append_chunk_mirror.c -./test/use_append_mchunks.c -./test/use_common.c -./test/use_disable_mdc_flushes.c -./test/vds.c -./test/vds_env.c -./test/vds_swmr.h -./test/vds_swmr_gen.c -./test/vds_swmr_reader.c -./test/vds_swmr_writer.c -./test/vfd_swmr.c -./test/vfd_swmr_addrem_writer.c -./test/vfd_swmr_attrdset_writer.c -./test/vfd_swmr_dsetops_writer.c -./test/vfd_swmr_dsetchks_writer.c -./test/vfd_swmr_bigset_writer.c -./test/vfd_swmr_common.c -./test/vfd_swmr_common.h -./test/vfd_swmr_generator.c -./test/vfd_swmr_group_writer.c -./test/vfd_swmr_gperf_writer.c -./test/vfd_swmr_gfail_writer.c -./test/vfd_swmr_indep_rw_writer.c -./test/vfd_swmr_reader.c -./test/vfd_swmr_remove_reader.c -./test/vfd_swmr_remove_writer.c -./test/vfd_swmr_sparse_reader.c -./test/vfd_swmr_sparse_writer.c -./test/vfd_swmr_vlstr_reader.c -./test/vfd_swmr_vlstr_writer.c -./test/vfd_swmr_writer.c -./test/vfd_swmr_zoo_writer.c -./test/vfd.c -./test/vfd_plugin.c -./test/vol.c -./test/vol_plugin.c - -./test/testfiles/err_compat_1 -./test/testfiles/err_compat_2 -./test/testfiles/error_test_1 -./test/testfiles/error_test_2 -./test/testfiles/links_env.out -./test/testfiles/plist_files/acpl_32be -./test/testfiles/plist_files/acpl_32le -./test/testfiles/plist_files/acpl_64be -./test/testfiles/plist_files/acpl_64le -./test/testfiles/plist_files/dapl_32be -./test/testfiles/plist_files/dapl_32le -./test/testfiles/plist_files/dapl_64be -./test/testfiles/plist_files/dapl_64le -./test/testfiles/plist_files/dcpl_32be -./test/testfiles/plist_files/dcpl_32le -./test/testfiles/plist_files/dcpl_64be -./test/testfiles/plist_files/dcpl_64le -./test/testfiles/plist_files/def_acpl_32be -./test/testfiles/plist_files/def_acpl_32le -./test/testfiles/plist_files/def_acpl_64be -./test/testfiles/plist_files/def_acpl_64le -./test/testfiles/plist_files/def_dapl_32be -./test/testfiles/plist_files/def_dapl_32le -./test/testfiles/plist_files/def_dapl_64be -./test/testfiles/plist_files/def_dapl_64le -./test/testfiles/plist_files/def_dcpl_32be -./test/testfiles/plist_files/def_dcpl_32le -./test/testfiles/plist_files/def_dcpl_64be -./test/testfiles/plist_files/def_dcpl_64le -./test/testfiles/plist_files/def_dxpl_32be -./test/testfiles/plist_files/def_dxpl_32le -./test/testfiles/plist_files/def_dxpl_64be -./test/testfiles/plist_files/def_dxpl_64le -./test/testfiles/plist_files/def_fapl_32be -./test/testfiles/plist_files/def_fapl_32le -./test/testfiles/plist_files/def_fapl_64be -./test/testfiles/plist_files/def_fapl_64le -./test/testfiles/plist_files/def_fcpl_32be -./test/testfiles/plist_files/def_fcpl_32le -./test/testfiles/plist_files/def_fcpl_64be -./test/testfiles/plist_files/def_fcpl_64le -./test/testfiles/plist_files/def_gcpl_32be -./test/testfiles/plist_files/def_gcpl_32le -./test/testfiles/plist_files/def_gcpl_64be -./test/testfiles/plist_files/def_gcpl_64le -./test/testfiles/plist_files/def_lapl_32be -./test/testfiles/plist_files/def_lapl_32le -./test/testfiles/plist_files/def_lapl_64be -./test/testfiles/plist_files/def_lapl_64le -./test/testfiles/plist_files/def_lcpl_32be -./test/testfiles/plist_files/def_lcpl_32le -./test/testfiles/plist_files/def_lcpl_64be -./test/testfiles/plist_files/def_lcpl_64le -./test/testfiles/plist_files/def_ocpl_32be -./test/testfiles/plist_files/def_ocpl_32le -./test/testfiles/plist_files/def_ocpl_64be -./test/testfiles/plist_files/def_ocpl_64le -./test/testfiles/plist_files/def_ocpypl_32be -./test/testfiles/plist_files/def_ocpypl_32le -./test/testfiles/plist_files/def_ocpypl_64be -./test/testfiles/plist_files/def_ocpypl_64le -./test/testfiles/plist_files/def_strcpl_32be -./test/testfiles/plist_files/def_strcpl_32le -./test/testfiles/plist_files/def_strcpl_64be -./test/testfiles/plist_files/def_strcpl_64le -./test/testfiles/plist_files/dxpl_32be -./test/testfiles/plist_files/dxpl_32le -./test/testfiles/plist_files/dxpl_64be -./test/testfiles/plist_files/dxpl_64le -./test/testfiles/plist_files/fapl_32be -./test/testfiles/plist_files/fapl_32le -./test/testfiles/plist_files/fapl_64be -./test/testfiles/plist_files/fapl_64le -./test/testfiles/plist_files/fcpl_32be -./test/testfiles/plist_files/fcpl_32le -./test/testfiles/plist_files/fcpl_64be -./test/testfiles/plist_files/fcpl_64le -./test/testfiles/plist_files/gcpl_32be -./test/testfiles/plist_files/gcpl_32le -./test/testfiles/plist_files/gcpl_64be -./test/testfiles/plist_files/gcpl_64le -./test/testfiles/plist_files/lapl_32be -./test/testfiles/plist_files/lapl_32le -./test/testfiles/plist_files/lapl_64be -./test/testfiles/plist_files/lapl_64le -./test/testfiles/plist_files/lcpl_32be -./test/testfiles/plist_files/lcpl_32le -./test/testfiles/plist_files/lcpl_64be -./test/testfiles/plist_files/lcpl_64le -./test/testfiles/plist_files/ocpl_32be -./test/testfiles/plist_files/ocpl_32le -./test/testfiles/plist_files/ocpl_64be -./test/testfiles/plist_files/ocpl_64le -./test/testfiles/plist_files/ocpypl_32be -./test/testfiles/plist_files/ocpypl_32le -./test/testfiles/plist_files/ocpypl_64be -./test/testfiles/plist_files/ocpypl_64le -./test/testfiles/plist_files/strcpl_32be -./test/testfiles/plist_files/strcpl_32le -./test/testfiles/plist_files/strcpl_64be -./test/testfiles/plist_files/strcpl_64le - -./testpar/Makefile.am -./testpar/t_bigio.c -./testpar/t_cache.c -./testpar/t_cache_image.c -./testpar/t_chunk_alloc.c -./testpar/t_coll_chunk.c -./testpar/t_coll_md_read.c -./testpar/t_dset.c -./testpar/t_file.c -./testpar/t_file_image.c -./testpar/t_filter_read.c -./testpar/t_filters_parallel.c -./testpar/t_filters_parallel.h -./testpar/t_mdset.c -./testpar/t_mpi.c -./testpar/t_ph5basic.c -./testpar/t_pflush1.c -./testpar/t_pflush2.c -./testpar/t_pread.c -./testpar/t_prop.c -./testpar/t_shapesame.c -./testpar/t_pshutdown.c -./testpar/t_prestart.c -./testpar/t_span_tree.c -./testpar/t_init_term.c -./testpar/t_2Gio.c -./testpar/testpar.h -./testpar/testpflush.sh.in -./testpar/testphdf5.c -./testpar/testphdf5.h - -./tools/Makefile.am -./tools/src/Makefile.am -./tools/test/Makefile.am - -./tools/src/h5dump/Makefile.am -./tools/src/h5dump/h5dump.c -./tools/src/h5dump/h5dump.h -./tools/src/h5dump/h5dump_defines.h -./tools/src/h5dump/h5dump_extern.h -./tools/src/h5dump/h5dump_ddl.c -./tools/src/h5dump/h5dump_ddl.h -./tools/src/h5dump/h5dump_xml.c -./tools/src/h5dump/h5dump_xml.h -./tools/test/h5dump/Makefile.am -./tools/test/h5dump/dynlib_dump.c -./tools/test/h5dump/h5dumpgentest.c -./tools/test/h5dump/h5dump_plugin.sh.in -./tools/test/h5dump/testh5dump.sh.in -./tools/test/h5dump/testh5dumppbits.sh.in -./tools/test/h5dump/testh5dumpxml.sh.in -./tools/test/h5dump/testh5dumpvds.sh.in -./tools/test/h5dump/binread.c - -./tools/src/h5import/Makefile.am -./tools/src/h5import/h5import.h -./tools/src/h5import/h5import.c -./tools/test/h5import/Makefile.am -./tools/test/h5import/h5importtest.c -./tools/test/h5import/h5importtestutil.sh.in - -# testfiles for h5import -./tools/test/h5import/testfiles/binfp64.h5 -./tools/test/h5import/testfiles/binin16.h5 -./tools/test/h5import/testfiles/binin32.h5 -./tools/test/h5import/testfiles/binin8.h5 -./tools/test/h5import/testfiles/binin8w.h5 -./tools/test/h5import/testfiles/binuin16.h5 -./tools/test/h5import/testfiles/binuin32.h5 -./tools/test/h5import/testfiles/tall_fp32.ddl -./tools/test/h5import/testfiles/tall_i32.ddl -./tools/test/h5import/testfiles/tintsattrs_u32.ddl -./tools/test/h5import/testfiles/textpfe.conf -./tools/test/h5import/testfiles/textpfe.h5 -./tools/test/h5import/testfiles/textpfe64.txt -./tools/test/h5import/testfiles/txtfp32.conf -./tools/test/h5import/testfiles/txtfp32.h5 -./tools/test/h5import/testfiles/txtfp32.txt -./tools/test/h5import/testfiles/txtfp64.conf -./tools/test/h5import/testfiles/txtfp64.h5 -./tools/test/h5import/testfiles/txtfp64.txt -./tools/test/h5import/testfiles/txtin16.conf -./tools/test/h5import/testfiles/txtin16.h5 -./tools/test/h5import/testfiles/txtin16.txt -./tools/test/h5import/testfiles/txtin32.conf -./tools/test/h5import/testfiles/txtin32.h5 -./tools/test/h5import/testfiles/txtin32.txt -./tools/test/h5import/testfiles/txtin8.conf -./tools/test/h5import/testfiles/txtin8.h5 -./tools/test/h5import/testfiles/txtin8.txt -./tools/test/h5import/testfiles/txtuin16.conf -./tools/test/h5import/testfiles/txtuin16.h5 -./tools/test/h5import/testfiles/txtuin16.txt -./tools/test/h5import/testfiles/txtuin32.conf -./tools/test/h5import/testfiles/txtuin32.h5 -./tools/test/h5import/testfiles/txtuin32.txt -./tools/test/h5import/testfiles/txtstr.conf -./tools/test/h5import/testfiles/txtstr.h5 -./tools/test/h5import/testfiles/txtstr.txt -./tools/test/h5import/testfiles/dbinfp64.h5.txt -./tools/test/h5import/testfiles/dbinin8.h5.txt -./tools/test/h5import/testfiles/dbinin8w.h5.txt -./tools/test/h5import/testfiles/dbinin16.h5.txt -./tools/test/h5import/testfiles/dbinin32.h5.txt -./tools/test/h5import/testfiles/dbinuin16.h5.txt -./tools/test/h5import/testfiles/dbinuin32.h5.txt -./tools/test/h5import/testfiles/dtxtstr.h5.txt - -# h5diff sources -./tools/src/h5diff/Makefile.am -./tools/src/h5diff/h5diff_common.c -./tools/src/h5diff/h5diff_common.h -./tools/src/h5diff/h5diff_main.c -./tools/src/h5diff/ph5diff_main.c -./tools/test/h5diff/Makefile.am -./tools/test/h5diff/dynlib_diff.c -./tools/test/h5diff/h5diffgentest.c -./tools/test/h5diff/h5diff_plugin.sh.in -./tools/test/h5diff/testh5diff.sh.in -./tools/test/h5diff/testph5diff.sh.in - -# h5format_convert sources -./tools/src/h5format_convert/Makefile.am -./tools/src/h5format_convert/h5format_convert.c -./tools/test/h5format_convert/Makefile.am -./tools/test/h5format_convert/h5fc_chk_idx.c -./tools/test/h5format_convert/h5fc_gentest.c -./tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl -./tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl -./tools/test/h5format_convert/testfiles/h5fc_v_err.ddl -./tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err -./tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl -./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl -./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err -./tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl -./tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl -./tools/test/h5format_convert/testfiles/h5fc_dname.ddl -./tools/test/h5format_convert/testfiles/h5fc_dname.err -./tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl.err -./tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err -./tools/test/h5format_convert/testfiles/h5fc_help.ddl -./tools/test/h5format_convert/testfiles/h5fc_v_all.ddl -./tools/test/h5format_convert/testfiles/h5fc_nooption.ddl -./tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl -./tools/test/h5format_convert/testfiles/h5fc_non_v3.h5 -./tools/test/h5format_convert/testfiles/h5fc_edge_v3.h5 -./tools/test/h5format_convert/testfiles/h5fc_err_level.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext1_f.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext1_i.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext1_s.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext2_if.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext2_is.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext2_sf.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext3_isf.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext_none.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.h5 -./tools/test/h5format_convert/testfiles/old_h5fc_ext_none.h5 -./tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl -./tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl -./tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl -./tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl -./tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl -./tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl -./tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl -./tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl -./tools/test/h5format_convert/testh5fc.sh.in - -# h5repack sources -./tools/src/h5repack/Makefile.am -./tools/src/h5repack/h5repack.c -./tools/src/h5repack/h5repack.h -./tools/src/h5repack/h5repack_copy.c -./tools/src/h5repack/h5repack_refs.c -./tools/src/h5repack/h5repack_filters.c -./tools/src/h5repack/h5repack_main.c -./tools/src/h5repack/h5repack_opttable.c -./tools/src/h5repack/h5repack_parse.c -./tools/src/h5repack/h5repack_verify.c -./tools/test/h5repack/Makefile.am -./tools/test/h5repack/dynlib_rpk.c -./tools/test/h5repack/dynlib_vrpk.c -./tools/test/h5repack/h5repack.sh.in -./tools/test/h5repack/h5repackgentest.c -./tools/test/h5repack/h5repack_plugin.sh.in -./tools/test/h5repack/h5repacktst.c -./tools/test/h5repack/testh5repack_detect_szip.c - -# h5ls sources -./tools/src/h5ls/Makefile.am -./tools/src/h5ls/h5ls.c -./tools/test/h5ls/Makefile.am -./tools/test/h5ls/dynlib_ls.c -./tools/test/h5ls/h5ls_plugin.sh.in -./tools/test/h5ls/testh5ls.sh.in -./tools/test/h5ls/testh5lsvds.sh.in -./tools/test/h5ls/vds_prefix/tvds-1.ls -./tools/test/h5ls/vds_prefix/tvds-2.ls -./tools/test/h5ls/vds_prefix/tvds-3_1.ls -./tools/test/h5ls/vds_prefix/tvds-3_2.ls -./tools/test/h5ls/vds_prefix/tvds-4.ls -./tools/test/h5ls/vds_prefix/tvds-5.ls - -# h5ls test error files -./tools/test/h5ls/errfiles/nosuchfile.err -./tools/test/h5ls/errfiles/textlinksrc-nodangle-1.err -./tools/test/h5ls/errfiles/tgroup-1.err - -# h5copy sources -./tools/src/h5copy/Makefile.am -./tools/src/h5copy/h5copy.c -./tools/test/h5copy/Makefile.am -./tools/test/h5copy/h5copygentest.c -./tools/test/h5copy/testh5copy.sh.in -./tools/test/h5copy/dynlib_copy.c - - -./tools/lib/Makefile.am -./tools/lib/h5diff.c -./tools/lib/h5diff.h -./tools/lib/h5diff_array.c -./tools/lib/h5diff_attr.c -./tools/lib/h5diff_dset.c -./tools/lib/h5diff_util.c -./tools/lib/h5trav.c -./tools/lib/h5trav.h -./tools/lib/h5tools.c -./tools/lib/h5tools.h -./tools/lib/h5tools_dump.c -./tools/lib/h5tools_dump.h -./tools/lib/h5tools_filters.c -./tools/lib/h5tools_str.c -./tools/lib/h5tools_str.h -./tools/lib/h5tools_utils.c -./tools/lib/h5tools_utils.h -./tools/lib/h5tools_ref.c -./tools/lib/h5tools_ref.h -./tools/lib/h5tools_type.c -./tools/lib/ph5diff.h -./tools/lib/h5tools_error.h -./tools/lib/io_timer.c -./tools/lib/io_timer.h - -./tools/libtest/Makefile.am -./tools/libtest/h5tools_test_utils.c - -./tools/src/misc/Makefile.am -./tools/src/misc/h5clear.c -./tools/src/misc/h5debug.c -./tools/src/misc/h5delete.c -./tools/src/misc/h5mkgrp.c -./tools/src/misc/h5repart.c -./tools/test/misc/Makefile.am -./tools/test/misc/h5repart_gentest.c -./tools/test/misc/repart_test.c -./tools/test/misc/testh5mkgrp.sh.in -./tools/test/misc/testh5repart.sh.in -./tools/test/misc/talign.c -./tools/test/misc/testfiles/h5clear_equal_after_size.ddl -./tools/test/misc/testfiles/h5clear_equal_before_size.ddl -./tools/test/misc/testfiles/h5clear_greater_after_size.ddl -./tools/test/misc/testfiles/h5clear_greater_before_size.ddl -./tools/test/misc/testfiles/h5clear_less_after_size.ddl -./tools/test/misc/testfiles/h5clear_less_before_size.ddl -./tools/test/misc/testfiles/h5clear_missing_file.ddl -./tools/test/misc/testfiles/h5clear_missing_file.err -./tools/test/misc/testfiles/h5clear_noclose_after_size.ddl -./tools/test/misc/testfiles/h5clear_noclose_before_size.ddl -./tools/test/misc/testfiles/h5clear_no_mdc_image.err -./tools/test/misc/testfiles/h5clear_open_fail.err -./tools/test/misc/testfiles/h5clear_status_noclose_after_size.ddl -./tools/test/misc/testfiles/h5clear_usage.ddl -./tools/test/misc/testfiles/h5clear_user_equal_after_size.ddl -./tools/test/misc/testfiles/h5clear_user_equal_before_size.ddl -./tools/test/misc/testfiles/h5clear_user_greater_after_size.ddl -./tools/test/misc/testfiles/h5clear_user_greater_before_size.ddl -./tools/test/misc/testfiles/h5clear_user_less_after_size.ddl -./tools/test/misc/testfiles/h5clear_user_less_before_size.ddl -./tools/test/misc/testfiles/h5clear_fsm_persist_equal.h5 -./tools/test/misc/testfiles/h5clear_fsm_persist_greater.h5 -./tools/test/misc/testfiles/h5clear_fsm_persist_less.h5 -./tools/test/misc/testfiles/h5clear_fsm_persist_noclose.h5 -./tools/test/misc/testfiles/h5clear_fsm_persist_user_equal.h5 -./tools/test/misc/testfiles/h5clear_fsm_persist_user_greater.h5 -./tools/test/misc/testfiles/h5clear_fsm_persist_user_less.h5 -./tools/test/misc/testfiles/h5clear_log_v3.h5 -./tools/test/misc/testfiles/h5clear_mdc_image.h5 -./tools/test/misc/testfiles/h5clear_sec2_v0.h5 -./tools/test/misc/testfiles/h5clear_sec2_v2.h5 -./tools/test/misc/testfiles/h5clear_sec2_v3.h5 -./tools/test/misc/testfiles/h5clear_status_noclose.h5 -./tools/test/misc/testfiles/latest_h5clear_log_v3.h5 -./tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 -./tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 -./tools/test/misc/testfiles/h5mkgrp_help.txt -./tools/test/misc/testfiles/h5mkgrp_version.txt.in -./tools/test/misc/h5perf_gentest.c -./tools/test/misc/vds/Makefile.am -./tools/test/misc/vds/UC_1.h -./tools/test/misc/vds/UC_1_one_dim_gen.c -./tools/test/misc/vds/UC_2.h -./tools/test/misc/vds/UC_2_two_dims_gen.c -./tools/test/misc/vds/UC_3.h -./tools/test/misc/vds/UC_3_gaps_gen.c -./tools/test/misc/vds/UC_4.h -./tools/test/misc/vds/UC_4_printf_gen.c -./tools/test/misc/vds/UC_5.h -./tools/test/misc/vds/UC_5_stride_gen.c -./tools/test/misc/vds/UC_common.h -./tools/test/misc/h5clear_gentest.c -./tools/test/misc/clear_open_chk.c -./tools/test/misc/testh5clear.sh.in - -# h5stat sources -./tools/src/h5stat/Makefile.am -./tools/src/h5stat/h5stat.c - -# h5stat test files -./tools/test/h5stat/Makefile.am -./tools/test/h5stat/h5stat_gentest.c -./tools/test/h5stat/testh5stat.sh.in -./tools/test/h5stat/testfiles/h5stat_dims1.ddl -./tools/test/h5stat/testfiles/h5stat_dims2.ddl -./tools/test/h5stat/testfiles/h5stat_err_old_fill.h5 -./tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl -./tools/test/h5stat/testfiles/h5stat_err_old_layout.h5 -./tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl -./tools/test/h5stat/testfiles/h5stat_err_refcount.h5 -./tools/test/h5stat/testfiles/h5stat_err_refcount.ddl -./tools/test/h5stat/testfiles/h5stat_filters.ddl -./tools/test/h5stat/testfiles/h5stat_filters-d.ddl -./tools/test/h5stat/testfiles/h5stat_filters-dT.ddl -./tools/test/h5stat/testfiles/h5stat_filters-F.ddl -./tools/test/h5stat/testfiles/h5stat_filters-file.ddl -./tools/test/h5stat/testfiles/h5stat_filters-g.ddl -./tools/test/h5stat/testfiles/h5stat_filters-UD.ddl -./tools/test/h5stat/testfiles/h5stat_filters-UT.ddl -./tools/test/h5stat/testfiles/h5stat_filters.h5 -./tools/test/h5stat/testfiles/h5stat_help1.ddl -./tools/test/h5stat/testfiles/h5stat_help2.ddl -./tools/test/h5stat/testfiles/h5stat_idx.h5 -./tools/test/h5stat/testfiles/h5stat_idx.ddl -./tools/test/h5stat/testfiles/h5stat_links1.ddl -./tools/test/h5stat/testfiles/h5stat_links2.ddl -./tools/test/h5stat/testfiles/h5stat_links3.ddl -./tools/test/h5stat/testfiles/h5stat_links4.ddl -./tools/test/h5stat/testfiles/h5stat_links5.ddl -./tools/test/h5stat/testfiles/h5stat_newgrat.ddl -./tools/test/h5stat/testfiles/h5stat_newgrat-UA.ddl -./tools/test/h5stat/testfiles/h5stat_newgrat-UG.ddl -./tools/test/h5stat/testfiles/h5stat_newgrat.h5 -./tools/test/h5stat/testfiles/h5stat_nofile.ddl -./tools/test/h5stat/testfiles/h5stat_notexist.ddl -./tools/test/h5stat/testfiles/h5stat_numattrs1.ddl -./tools/test/h5stat/testfiles/h5stat_numattrs2.ddl -./tools/test/h5stat/testfiles/h5stat_numattrs3.ddl -./tools/test/h5stat/testfiles/h5stat_numattrs4.ddl -./tools/test/h5stat/testfiles/h5stat_threshold.h5 -./tools/test/h5stat/testfiles/h5stat_tsohm.ddl -./tools/test/h5stat/testfiles/h5stat_tsohm.h5 -./tools/test/h5stat/testfiles/h5stat_err_refcount.err -./tools/test/h5stat/testfiles/h5stat_err_old_layout.err -./tools/test/h5stat/testfiles/h5stat_err_old_fill.err -./tools/test/h5stat/testfiles/h5stat_err1_dims.err -./tools/test/h5stat/testfiles/h5stat_err1_links.err -./tools/test/h5stat/testfiles/h5stat_err1_numattrs.err -./tools/test/h5stat/testfiles/h5stat_err2_numattrs.err -./tools/test/h5stat/testfiles/h5stat_notexist.err -./tools/test/h5stat/testfiles/h5stat_nofile.err - -# h5dump test files -./tools/testfiles/charsets.h5 -./tools/testfiles/charsets.ddl -./tools/testfiles/err_attr_dspace.h5 -./tools/testfiles/err_attr_dspace.ddl -./tools/testfiles/family_file00000.h5 -./tools/testfiles/family_file00001.h5 -./tools/testfiles/family_file00002.h5 -./tools/testfiles/family_file00003.h5 -./tools/testfiles/family_file00004.h5 -./tools/testfiles/family_file00005.h5 -./tools/testfiles/family_file00006.h5 -./tools/testfiles/family_file00007.h5 -./tools/testfiles/family_file00008.h5 -./tools/testfiles/family_file00009.h5 -./tools/testfiles/family_file00010.h5 -./tools/testfiles/family_file00011.h5 -./tools/testfiles/family_file00012.h5 -./tools/testfiles/family_file00013.h5 -./tools/testfiles/family_file00014.h5 -./tools/testfiles/family_file00015.h5 -./tools/testfiles/family_file00016.h5 -./tools/testfiles/family_file00017.h5 -./tools/testfiles/file_space.h5 -./tools/testfiles/file_space.ddl -./tools/testfiles/filter_fail.h5 -./tools/testfiles/filter_fail.ddl -./tools/testfiles/h5dump-help.txt -./tools/testfiles/non_existing.ddl -./tools/testfiles/packedbits.ddl -./tools/testfiles/t128bit_float.h5 -./tools/testfiles/taindices.h5 -./tools/testfiles/tall-1.ddl -./tools/testfiles/tall-2.ddl -./tools/testfiles/tall-2A.ddl -./tools/testfiles/tall-2A0.ddl -./tools/testfiles/tall-2B.ddl -./tools/testfiles/tall-3.ddl -./tools/testfiles/tall-4s.ddl -./tools/testfiles/tall-5s.ddl -./tools/testfiles/tall-6.ddl -./tools/testfiles/tall-6.exp -./tools/testfiles/tall-7.ddl -./tools/testfiles/tall-7N.ddl -./tools/testfiles/tall.h5 -./tools/testfiles/tallfilters.ddl -./tools/testfiles/tarray1.ddl -./tools/testfiles/tarray1.h5 -./tools/testfiles/tarray1_big.ddl -./tools/testfiles/tarray1_big.h5 -./tools/testfiles/tarray2.ddl -./tools/testfiles/tarray2.h5 -./tools/testfiles/tarray3.ddl -./tools/testfiles/tarray3.h5 -./tools/testfiles/tarray4.ddl -./tools/testfiles/tarray4.h5 -./tools/testfiles/tarray5.ddl -./tools/testfiles/tarray5.h5 -./tools/testfiles/tarray6.ddl -./tools/testfiles/tarray6.h5 -./tools/testfiles/tarray7.ddl -./tools/testfiles/tarray7.h5 -./tools/testfiles/tarray8.ddl -./tools/testfiles/tarray8.h5 -./tools/testfiles/tattr.h5 -./tools/testfiles/tattr-1.ddl -./tools/testfiles/tattr-2.ddl -./tools/testfiles/tattr-3.ddl -./tools/testfiles/tattr-4_be.ddl -./tools/testfiles/tattr2.h5 -./tools/testfiles/tattr4_be.h5 -./tools/testfiles/tattrcontents1.ddl -./tools/testfiles/tattrcontents2.ddl -./tools/testfiles/tattrintsize.ddl -./tools/testfiles/tattrintsize.h5 -./tools/testfiles/tattrreg.h5 -./tools/testfiles/tattrreg.ddl -./tools/testfiles/tattrregR.ddl -./tools/testfiles/tbigdims.ddl -./tools/testfiles/tbigdims.h5 -./tools/testfiles/tbinary.h5 -./tools/testfiles/tbin1.ddl -./tools/testfiles/tbin2.ddl -./tools/testfiles/tbin3.ddl -./tools/testfiles/tbin4.ddl -./tools/testfiles/tbinregR.exp -./tools/testfiles/tbinregR.ddl -./tools/testfiles/tbitfields.h5 -./tools/testfiles/tbitnopaque_be.ddl -./tools/testfiles/tbitnopaque_le.ddl -./tools/testfiles/tbitnopaque.h5 -./tools/testfiles/tboot1.ddl -./tools/testfiles/tboot2.ddl -./tools/testfiles/tboot2A.ddl -./tools/testfiles/tboot2B.ddl -./tools/testfiles/tchar.h5 -./tools/testfiles/tchar1.ddl -./tools/testfiles/tchunked.ddl -./tools/testfiles/tcompact.ddl -./tools/testfiles/tcontents.ddl -./tools/testfiles/tcontiguos.ddl -./tools/testfiles/tcmpdattrintsize.ddl -./tools/testfiles/tcmpdintarray.ddl -./tools/testfiles/tcmpdints.ddl -./tools/testfiles/tcmpdintsize.ddl -./tools/testfiles/tcmpdattrintsize.h5 -./tools/testfiles/tcmpdintarray.h5 -./tools/testfiles/tcmpdints.h5 -./tools/testfiles/tcmpdintsize.h5 -./tools/testfiles/tcomp-1.ddl -./tools/testfiles/tcomp-2.ddl -./tools/testfiles/tcomp-3.ddl -./tools/testfiles/tcomp-4.ddl -./tools/testfiles/tcompound.h5 -./tools/testfiles/tcompound2.h5 -./tools/testfiles/tcompound_complex.h5 -./tools/testfiles/tcompound_complex2.h5 -./tools/testfiles/tcompound_complex2.ddl -./tools/testfiles/tdatareg.h5 -./tools/testfiles/tdatareg.ddl -./tools/testfiles/tdataregR.ddl -./tools/testfiles/tdeflate.ddl -./tools/testfiles/tdset-1.ddl -./tools/testfiles/tdset-2.ddl -./tools/testfiles/tdset-3s.ddl -./tools/testfiles/tdset.h5 -./tools/testfiles/tdset2.h5 -./tools/testfiles/tdset_idx.ls -./tools/testfiles/tdset_idx.h5 -./tools/testfiles/tempty.ddl -./tools/testfiles/tempty.h5 -./tools/testfiles/tenum.h5 -./tools/testfiles/texceedsubblock.ddl -./tools/testfiles/texceedsubcount.ddl -./tools/testfiles/texceedsubstart.ddl -./tools/testfiles/texceedsubstride.ddl -./tools/testfiles/texternal.ddl -./tools/testfiles/textlink.h5 -./tools/testfiles/textlink.h5.xml -./tools/testfiles/textlink.ddl -./tools/testfiles/textlinkfar.ddl -./tools/testfiles/textlinkfar.h5 -./tools/testfiles/textlinksrc.ddl -./tools/testfiles/textlinksrc.h5 -./tools/testfiles/textlinktar.h5 -./tools/testfiles/tfamily.ddl -./tools/testfiles/tfamily00000.h5 -./tools/testfiles/tfamily00001.h5 -./tools/testfiles/tfamily00002.h5 -./tools/testfiles/tfamily00003.h5 -./tools/testfiles/tfamily00004.h5 -./tools/testfiles/tfamily00005.h5 -./tools/testfiles/tfamily00006.h5 -./tools/testfiles/tfamily00007.h5 -./tools/testfiles/tfamily00008.h5 -./tools/testfiles/tfamily00009.h5 -./tools/testfiles/tfamily00010.h5 -./tools/testfiles/tfcontents1.h5 -./tools/testfiles/tfcontents2.h5 -./tools/testfiles/tfill.ddl -./tools/testfiles/tfilters.h5 -./tools/testfiles/tfletcher32.ddl -./tools/testfiles/tfloatsattrs.ddl -./tools/testfiles/tfloatsattrs.h5 -./tools/testfiles/tfloatsattrs.wddl -./tools/testfiles/tfvalues.h5 -./tools/testfiles/tgroup-1.ddl -./tools/testfiles/tgroup-2.ddl -./tools/testfiles/tgroup.h5 -./tools/testfiles/tgrp_comments.ls -./tools/testfiles/tgrp_comments.ddl -./tools/testfiles/tgrp_comments.h5 -./tools/testfiles/tgrpnullspace.h5 -./tools/testfiles/tgrpnullspace.ddl -./tools/testfiles/tgrpnullspace.ls -./tools/testfiles/thlink-1.ddl -./tools/testfiles/thlink-2.ddl -./tools/testfiles/thlink-3.ddl -./tools/testfiles/thlink-4.ddl -./tools/testfiles/thlink-5.ddl -./tools/testfiles/thlink.h5 -./tools/testfiles/thyperslab.ddl -./tools/testfiles/thyperslab.h5 -./tools/testfiles/tindicesyes.ddl -./tools/testfiles/tindicesno.ddl -./tools/testfiles/tindicessub2.ddl -./tools/testfiles/tindicessub3.ddl -./tools/testfiles/tindicessub4.ddl -./tools/testfiles/tindicessub1.ddl -./tools/testfiles/tints4dims.ddl -./tools/testfiles/tints4dimsBlock2.ddl -./tools/testfiles/tints4dimsBlockEq.ddl -./tools/testfiles/tints4dimsCount2.ddl -./tools/testfiles/tints4dimsCountEq.ddl -./tools/testfiles/tints4dimsStride2.ddl -./tools/testfiles/tints4dims.h5 -./tools/testfiles/tintsattrs.ddl -./tools/testfiles/tintsattrs.h5 -./tools/testfiles/tintsnodata.ddl -./tools/testfiles/tintsnodata.h5 -./tools/testfiles/tlarge_objname.ddl -./tools/testfiles/tlarge_objname.h5 -./tools/testfiles/tldouble.ddl -./tools/testfiles/tldouble.h5 -./tools/testfiles/tldouble_scalar.ddl -./tools/testfiles/tldouble_scalar.h5 -./tools/testfiles/tlonglinks.ddl -./tools/testfiles/tlonglinks.h5 -./tools/testfiles/tloop-1.ddl -./tools/testfiles/tloop.h5 -./tools/testfiles/tloop2.h5 -./tools/testfiles/tmany.h5 -./tools/testfiles/tmulti-b.h5 -./tools/testfiles/tmulti.ddl -./tools/testfiles/tmulti-g.h5 -./tools/testfiles/tmulti-l.h5 -./tools/testfiles/tmulti-o.h5 -./tools/testfiles/tmulti-r.h5 -./tools/testfiles/tmulti-s.h5 -./tools/testfiles/tmultifile.ls -./tools/testfiles/tmultifile.ddl -./tools/testfiles/tnbit.ddl -./tools/testfiles/tnestcomp-1.ddl -./tools/testfiles/tnestedcomp.h5 -./tools/testfiles/tnestedcmpddt.ddl -./tools/testfiles/tnestedcmpddt.h5 -./tools/testfiles/tnoattrdata.ddl -./tools/testfiles/tnoattrddl.ddl -./tools/testfiles/tnodata.ddl -./tools/testfiles/tnoddl.ddl -./tools/testfiles/tnoddlfile.ddl -./tools/testfiles/tnoddlfile.exp -./tools/testfiles/tno-subset.h5 -./tools/testfiles/tno-subset.ddl -./tools/testfiles/tnullspace.h5 -./tools/testfiles/tnullspace.h5.xml -./tools/testfiles/tnullspace.ddl -./tools/testfiles/tobjref.h5 -./tools/testfiles/topaque.h5 -./tools/testfiles/tordercontents1.ddl -./tools/testfiles/tordercontents2.ddl -./tools/testfiles/torderlinks1.ddl -./tools/testfiles/torderlinks2.ddl -./tools/testfiles/tperror.ddl -./tools/testfiles/tqmarkfile.ddl -./tools/testfiles/trawdatafile.ddl -./tools/testfiles/trawdatafile.exp -./tools/testfiles/trawssetfile.ddl -./tools/testfiles/trawssetfile.exp -./tools/testfiles/treadfilter.ddl -./tools/testfiles/treadintfilter.ddl -./tools/testfiles/treference.ddl -./tools/testfiles/tsaf.ddl -./tools/testfiles/tsaf.h5 -./tools/testfiles/tscalarattrintsize.ddl -./tools/testfiles/tscalarattrintsize.h5 -./tools/testfiles/tscalarintattrsize.ddl -./tools/testfiles/tscalarintattrsize.h5 -./tools/testfiles/tscalarintsize.ddl -./tools/testfiles/tscalarintsize.h5 -./tools/testfiles/tscalarstring.ddl -./tools/testfiles/tscalarstring.h5 -./tools/testfiles/tscaleoffset.ddl -./tools/testfiles/tshuffle.ddl -./tools/testfiles/tslink-1.ddl -./tools/testfiles/tslink-2.ddl -./tools/testfiles/tslink-D.ddl -./tools/testfiles/tslink.h5 -./tools/testfiles/tsoftlinks.h5 -./tools/testfiles/tsplit_file-m.h5 -./tools/testfiles/tsplit_file-r.h5 -./tools/testfiles/tsplit_file.ddl -./tools/testfiles/tstarfile.ddl -./tools/testfiles/tstr.h5 -./tools/testfiles/tstr2.h5 -./tools/testfiles/tstr3.h5 -./tools/testfiles/tstr-1.ddl -./tools/testfiles/tstr-2.ddl -./tools/testfiles/tstr2bin2.exp -./tools/testfiles/tstr2bin6.exp -./tools/testfiles/tstring.ddl -./tools/testfiles/tstring2.ddl -./tools/testfiles/tstringe.ddl -./tools/testfiles/tszip.ddl -./tools/testfiles/tudfilter.ddl -./tools/testfiles/tudfilter.h5 -./tools/testfiles/tudfilter.ls -./tools/testfiles/tudlink.h5 -./tools/testfiles/tudlink.h5.xml -./tools/testfiles/tudlink-1.ddl -./tools/testfiles/tudlink-2.ddl -./tools/testfiles/tuserfilter.ddl -./tools/testfiles/tvldtypes1.ddl -./tools/testfiles/tvldtypes1.h5 -./tools/testfiles/tvldtypes2.ddl -./tools/testfiles/tvldtypes2.h5 -./tools/testfiles/tvldtypes3.ddl -./tools/testfiles/tvldtypes3.h5 -./tools/testfiles/tvldtypes4.ddl -./tools/testfiles/tvldtypes4.h5 -./tools/testfiles/tvldtypes5.ddl -./tools/testfiles/tvldtypes5.h5 -./tools/testfiles/tvlenstr_array.ddl -./tools/testfiles/tvlenstr_array.h5 -./tools/testfiles/tvlstr.h5 -./tools/testfiles/tvlstr.ddl -./tools/testfiles/tvms.ddl -./tools/testfiles/tvms.h5 -./tools/testfiles/twidedisplay.ddl -./tools/testfiles/twithddl.exp -./tools/testfiles/twithddlfile.ddl -./tools/testfiles/twithddlfile.exp -./tools/testfiles/tCVE_2018_11206_fill_old.h5 -./tools/testfiles/tCVE_2018_11206_fill_new.h5 - -# h5dump test error files -./tools/test/h5dump/errfiles/filter_fail.err -./tools/test/h5dump/errfiles/non_existing.err -./tools/test/h5dump/errfiles/tall-1.err -./tools/test/h5dump/errfiles/tall-2A.err -./tools/test/h5dump/errfiles/tall-2A0.err -./tools/test/h5dump/errfiles/tall-2B.err -./tools/test/h5dump/errfiles/tarray1_big.err -./tools/test/h5dump/errfiles/tattr-3.err -./tools/test/h5dump/errfiles/tattrregR.err -./tools/test/h5dump/errfiles/tcomp-3.err -./tools/test/h5dump/errfiles/tdataregR.err -./tools/test/h5dump/errfiles/tdset-2.err -./tools/test/h5dump/errfiles/texceedsubblock.err -./tools/test/h5dump/errfiles/texceedsubcount.err -./tools/test/h5dump/errfiles/texceedsubstart.err -./tools/test/h5dump/errfiles/texceedsubstride.err -./tools/test/h5dump/errfiles/textlink.err -./tools/test/h5dump/errfiles/textlinkfar.err -./tools/test/h5dump/errfiles/textlinksrc.err -./tools/test/h5dump/errfiles/tgroup-2.err -./tools/test/h5dump/errfiles/tnofilename-with-packed-bits.err -./tools/test/h5dump/errfiles/torderlinks1.err -./tools/test/h5dump/errfiles/torderlinks2.err -./tools/test/h5dump/errfiles/tpbitsCharLengthExceeded.err -./tools/test/h5dump/errfiles/tpbitsCharOffsetExceeded.err -./tools/test/h5dump/errfiles/tpbitsIncomplete.err -./tools/test/h5dump/errfiles/tpbitsIntLengthExceeded.err -./tools/test/h5dump/errfiles/tpbitsIntOffsetExceeded.err -./tools/test/h5dump/errfiles/tpbitsLengthExceeded.err -./tools/test/h5dump/errfiles/tpbitsLengthPositive.err -./tools/test/h5dump/errfiles/tpbitsLongLengthExceeded.err -./tools/test/h5dump/errfiles/tpbitsLongOffsetExceeded.err -./tools/test/h5dump/errfiles/tpbitsMaxExceeded.err -./tools/test/h5dump/errfiles/tpbitsOffsetExceeded.err -./tools/test/h5dump/errfiles/tpbitsOffsetNegative.err -./tools/test/h5dump/errfiles/tperror.err -./tools/test/h5dump/errfiles/tqmarkfile.err -./tools/test/h5dump/errfiles/tslink-D.err - -# h5dump packed bits validation -./tools/testfiles/pbits/tnofilename-with-packed-bits.ddl -./tools/testfiles/pbits/tpbitsLengthPositive.ddl -./tools/testfiles/pbits/tpbitsMaxExceeded.ddl -./tools/testfiles/pbits/tpbitsSigned.ddl -./tools/testfiles/pbits/tpbitsSigned2.ddl -./tools/testfiles/pbits/tpbitsSigned4.ddl -./tools/testfiles/pbits/tpbitsSignedWhole.ddl -./tools/testfiles/pbits/tpbitsSignedInt.ddl -./tools/testfiles/pbits/tpbitsSignedInt4.ddl -./tools/testfiles/pbits/tpbitsSignedInt8.ddl -./tools/testfiles/pbits/tpbitsSignedIntWhole.ddl -./tools/testfiles/pbits/tpbitsSignedLong.ddl -./tools/testfiles/pbits/tpbitsSignedLong8.ddl -./tools/testfiles/pbits/tpbitsSignedLong16.ddl -./tools/testfiles/pbits/tpbitsSignedLongWhole.ddl -./tools/testfiles/pbits/tpbitsSignedLongLong.ddl -./tools/testfiles/pbits/tpbitsSignedLongLong16.ddl -./tools/testfiles/pbits/tpbitsSignedLongLong32.ddl -./tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl -./tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl -./tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl -./tools/testfiles/pbits/tpbitsOffsetNegative.ddl -./tools/testfiles/pbits/tpbitsUnsigned.ddl -./tools/testfiles/pbits/tpbitsUnsigned2.ddl -./tools/testfiles/pbits/tpbitsUnsigned4.ddl -./tools/testfiles/pbits/tpbitsUnsignedWhole.ddl -./tools/testfiles/pbits/tpbitsUnsignedInt.ddl -./tools/testfiles/pbits/tpbitsUnsignedInt4.ddl -./tools/testfiles/pbits/tpbitsUnsignedInt8.ddl -./tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl -./tools/testfiles/pbits/tpbitsUnsignedLong.ddl -./tools/testfiles/pbits/tpbitsUnsignedLong8.ddl -./tools/testfiles/pbits/tpbitsUnsignedLong16.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl -./tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl -./tools/testfiles/pbits/tpbitsMax.ddl -./tools/testfiles/pbits/tpbitsArray.ddl -./tools/testfiles/pbits/tpbitsCompound.ddl -./tools/testfiles/pbits/tpbitsIncomplete.ddl -./tools/testfiles/pbits/tpbitsLengthExceeded.ddl -./tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl -./tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl -./tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl -./tools/testfiles/pbits/tpbitsOffsetExceeded.ddl -./tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl -./tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl -./tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl -./tools/testfiles/pbits/tpbitsOverlapped.ddl -./tools/testfiles/packedbits.h5 - -# h5dump vds validation -./tools/testfiles/vds/tvds-1.ddl -./tools/testfiles/vds/tvds-2.ddl -./tools/testfiles/vds/tvds-3_1.ddl -./tools/testfiles/vds/tvds-3_2.ddl -./tools/testfiles/vds/tvds-4.ddl -./tools/testfiles/vds/tvds-5.ddl -./tools/testfiles/vds/tvds_layout-1.ddl -./tools/testfiles/vds/tvds_layout-2.ddl -./tools/testfiles/vds/tvds_layout-3_1.ddl -./tools/testfiles/vds/tvds_layout-3_2.ddl -./tools/testfiles/vds/tvds_layout-4.ddl -./tools/testfiles/vds/tvds_layout-5.ddl -./tools/testfiles/vds/vds-first.ddl -./tools/testfiles/vds/vds-gap1.ddl -./tools/testfiles/vds/vds-gap2.ddl -./tools/testfiles/vds/vds_layout-eiger.ddl -./tools/testfiles/vds/vds_layout-maxmin.ddl -./tools/testfiles/vds/1_a.h5 -./tools/testfiles/vds/1_b.h5 -./tools/testfiles/vds/1_c.h5 -./tools/testfiles/vds/1_d.h5 -./tools/testfiles/vds/1_e.h5 -./tools/testfiles/vds/1_f.h5 -./tools/testfiles/vds/1_vds.h5 -./tools/testfiles/vds/2_a.h5 -./tools/testfiles/vds/2_b.h5 -./tools/testfiles/vds/2_c.h5 -./tools/testfiles/vds/2_d.h5 -./tools/testfiles/vds/2_e.h5 -./tools/testfiles/vds/2_vds.h5 -./tools/testfiles/vds/3_1_vds.h5 -./tools/testfiles/vds/3_2_vds.h5 -./tools/testfiles/vds/4_0.h5 -./tools/testfiles/vds/4_1.h5 -./tools/testfiles/vds/4_2.h5 -./tools/testfiles/vds/4_vds.h5 -./tools/testfiles/vds/5_a.h5 -./tools/testfiles/vds/5_b.h5 -./tools/testfiles/vds/5_c.h5 -./tools/testfiles/vds/5_vds.h5 -./tools/testfiles/vds/a.h5 -./tools/testfiles/vds/b.h5 -./tools/testfiles/vds/c.h5 -./tools/testfiles/vds/d.h5 -./tools/testfiles/vds/vds-percival-unlim-maxmin.h5 -./tools/testfiles/vds/f-0.h5 -./tools/testfiles/vds/f-3.h5 -./tools/testfiles/vds/vds-eiger.h5 - -# h5dump h5import validation -./tools/testfiles/out3.h5import -./tools/testfiles/tordergr.h5 -./tools/testfiles/tordergr3.ddl -./tools/testfiles/tordergr4.ddl -./tools/testfiles/tordergr1.ddl -./tools/testfiles/tordergr5.ddl -./tools/testfiles/tordergr2.ddl -./tools/testfiles/torderattr1.ddl -./tools/testfiles/torderattr2.ddl -./tools/testfiles/torderattr3.ddl -./tools/testfiles/torderattr4.ddl -./tools/testfiles/torderattr.h5 -./tools/testfiles/tfpformat.ddl -./tools/testfiles/tfpformat.h5 - -# h5dump h5repack validation -./tools/testfiles/zerodim.ddl -./tools/testfiles/zerodim.h5 - -# h5dump new reference validation -./tools/testfiles/trefer_attrR.ddl -./tools/testfiles/trefer_compatR.ddl -./tools/testfiles/trefer_extR.ddl -./tools/testfiles/trefer_grpR.ddl -./tools/testfiles/trefer_obj_delR.ddl -./tools/testfiles/trefer_objR.ddl -./tools/testfiles/trefer_paramR.ddl -./tools/testfiles/trefer_reg_1dR.ddl -./tools/testfiles/trefer_regR.ddl -# h5dump and h5diff new reference files -./tools/testfiles/trefer_attr.h5 -./tools/testfiles/trefer_compat.h5 -./tools/testfiles/trefer_ext1.h5 -./tools/testfiles/trefer_ext2.h5 -./tools/testfiles/trefer_grp.h5 -./tools/testfiles/trefer_obj_del.h5 -./tools/testfiles/trefer_obj.h5 -./tools/testfiles/trefer_param.h5 -./tools/testfiles/trefer_reg_1d.h5 -./tools/testfiles/trefer_reg.h5 - -# Expected output from h5ls tests -./tools/testfiles/nosuchfile.ls -./tools/testfiles/help-1.ls -./tools/testfiles/help-2.ls -./tools/testfiles/help-3.ls -./tools/testfiles/tall-1.ls -./tools/testfiles/tall-2.ls -./tools/testfiles/tcomp-1.ls -./tools/testfiles/tdset-1.ls -./tools/testfiles/tgroup-1.ls -./tools/testfiles/tgroup-2.ls -./tools/testfiles/tgroup-3.ls -./tools/testfiles/tgroup.ls -./tools/testfiles/tloop-1.ls -./tools/testfiles/tnestcomp-1.ls -./tools/testfiles/tnestcomp-2.ls -./tools/testfiles/tnestcomp-3.ls -./tools/testfiles/tnestcomp-4.ls -./tools/testfiles/tsaf.ls -./tools/testfiles/tstr-1.ls -./tools/testfiles/tattr2.ls -./tools/testfiles/tattrreg_le.ls -./tools/testfiles/tattrreg_be.ls -./tools/testfiles/tvldtypes1.ls -./tools/testfiles/tvldtypes2le.ls -./tools/testfiles/tvldtypes2be.ls -./tools/testfiles/tdataregle.ls -./tools/testfiles/tdataregbe.ls -./tools/testfiles/tarray1.ls -./tools/testfiles/tempty.ls -./tools/testfiles/thlink-1.ls -./tools/testfiles/tslink-1.ls -./tools/testfiles/textlink-1.ls -./tools/testfiles/textlinksrc-1.ls -./tools/testfiles/textlinksrc-2.ls -./tools/testfiles/textlinksrc-3.ls -./tools/testfiles/textlinksrc-4.ls -./tools/testfiles/textlinksrc-5.ls -./tools/testfiles/textlinksrc-6.ls -./tools/testfiles/textlinksrc-7.ls -./tools/testfiles/textlinksrc-1-old.ls -./tools/testfiles/textlinksrc-2-old.ls -./tools/testfiles/textlinksrc-3-old.ls -./tools/testfiles/textlinksrc-6-old.ls -./tools/testfiles/textlinksrc-7-old.ls -./tools/testfiles/tsoftlinks-1.ls -./tools/testfiles/tsoftlinks-2.ls -./tools/testfiles/tsoftlinks-3.ls -./tools/testfiles/tsoftlinks-4.ls -./tools/testfiles/tsoftlinks-5.ls -./tools/testfiles/textlinksrc-nodangle-1.ls -./tools/testfiles/textlinksrc-nodangle-2.ls -./tools/testfiles/tsoftlinks-nodangle-1.ls -./tools/testfiles/thlinks-nodangle-1.ls -./tools/testfiles/tudlink-1.ls - -# h5ls vds validation -./tools/testfiles/vds/tvds-1.ls -./tools/testfiles/vds/tvds-2.ls -./tools/testfiles/vds/tvds-3_1.ls -./tools/testfiles/vds/tvds-3_2.ls -./tools/testfiles/vds/tvds-4.ls -./tools/testfiles/vds/tvds-5.ls - -#additional test input and output for h5dump XML -./tools/testfiles/tall.h5.xml -./tools/testfiles/tarray1.h5.xml -./tools/testfiles/tarray2.h5.xml -./tools/testfiles/tarray3.h5.xml -./tools/testfiles/tarray6.h5.xml -./tools/testfiles/tarray7.h5.xml -./tools/testfiles/tattr.h5.xml -./tools/testfiles/tbitfields_be.h5.xml -./tools/testfiles/tbitfields_le.h5.xml -./tools/testfiles/tcompound.h5.xml -./tools/testfiles/tcompound2.h5.xml -./tools/testfiles/tcompound_complex.h5.xml -./tools/testfiles/tdatareg.h5.xml -./tools/testfiles/tdset.h5.xml -./tools/testfiles/tdset2.h5.xml -./tools/testfiles/tempty.h5.xml -./tools/testfiles/tenum.h5.xml -./tools/testfiles/test35.nc -./tools/testfiles/test35.nc.xml -./tools/testfiles/tfpformat.h5.xml -./tools/testfiles/tgroup.h5.xml -./tools/testfiles/thlink.h5.xml -./tools/testfiles/tloop.h5.xml -./tools/testfiles/tloop2.h5.xml -./tools/testfiles/tmany.h5.xml -./tools/testfiles/tname-amp.h5 -./tools/testfiles/tname-amp.h5.xml -./tools/testfiles/tname-apos.h5 -./tools/testfiles/tname-apos.h5.xml -./tools/testfiles/tname-gt.h5 -./tools/testfiles/tname-gt.h5.xml -./tools/testfiles/tname-lt.h5 -./tools/testfiles/tname-lt.h5.xml -./tools/testfiles/tname-quot.h5 -./tools/testfiles/tname-quot.h5.xml -./tools/testfiles/tname-sp.h5 -./tools/testfiles/tname-sp.h5.xml -./tools/testfiles/tnamed_dtype_attr.ddl -./tools/testfiles/tnamed_dtype_attr.h5 -./tools/testfiles/tnamed_dtype_attr.h5.xml -./tools/testfiles/tnestedcomp.h5.xml -./tools/testfiles/tnodata.h5 -./tools/testfiles/tnodata.h5.xml -./tools/testfiles/tobjref.h5.xml -./tools/testfiles/topaque.h5.xml -./tools/testfiles/tref-escapes-at.h5 -./tools/testfiles/tref-escapes-at.h5.xml -./tools/testfiles/tref-escapes.h5 -./tools/testfiles/tref-escapes.h5.xml -./tools/testfiles/tref.h5 -./tools/testfiles/tref.h5.xml -./tools/testfiles/tsaf.h5.xml -./tools/testfiles/tslink.h5.xml -./tools/testfiles/tstr.h5.xml -./tools/testfiles/tstr2.h5.xml -./tools/testfiles/tstring-at.h5 -./tools/testfiles/tstring-at.h5.xml -./tools/testfiles/tstring.h5 -./tools/testfiles/tstring.h5.xml -./tools/testfiles/tvldtypes1.h5.xml -./tools/testfiles/tvldtypes2.h5.xml -./tools/testfiles/tvldtypes3.h5.xml -./tools/testfiles/tvldtypes4.h5.xml -./tools/testfiles/tvldtypes5.h5.xml -./tools/testfiles/tvlstr.h5.xml -./tools/testfiles/tempty-dtd.h5.xml -./tools/testfiles/tempty-dtd-uri.h5.xml -./tools/testfiles/tempty-nons.h5.xml -./tools/testfiles/tempty-nons-uri.h5.xml -./tools/testfiles/tempty-ns.h5.xml -./tools/testfiles/tempty-dtd-2.h5.xml -./tools/testfiles/tempty-nons-2.h5.xml -./tools/testfiles/tempty-ns-2.h5.xml -./tools/testfiles/tall-2A.h5.xml -./tools/testfiles/torderattr4.h5.xml -./tools/testfiles/torderattr2.h5.xml -./tools/testfiles/torderattr3.h5.xml -./tools/testfiles/torderattr1.h5.xml - - -#test files for h5diff -./tools/test/h5diff/testfiles/h5diff_10.txt -./tools/test/h5diff/testfiles/h5diff_11.txt -./tools/test/h5diff/testfiles/h5diff_12.txt -./tools/test/h5diff/testfiles/h5diff_13.txt -./tools/test/h5diff/testfiles/h5diff_14.txt -./tools/test/h5diff/testfiles/h5diff_15.txt -./tools/test/h5diff/testfiles/h5diff_16_1.txt -./tools/test/h5diff/testfiles/h5diff_16_2.txt -./tools/test/h5diff/testfiles/h5diff_16_3.txt -./tools/test/h5diff/testfiles/h5diff_17.txt -./tools/test/h5diff/testfiles/h5diff_171.txt -./tools/test/h5diff/testfiles/h5diff_172.txt -./tools/test/h5diff/testfiles/h5diff_18.txt -./tools/test/h5diff/testfiles/h5diff_18_1.txt -./tools/test/h5diff/testfiles/h5diff_19.txt -./tools/test/h5diff/testfiles/h5diff_20.txt -./tools/test/h5diff/testfiles/h5diff_21.txt -./tools/test/h5diff/testfiles/h5diff_22.txt -./tools/test/h5diff/testfiles/h5diff_23.txt -./tools/test/h5diff/testfiles/h5diff_24.txt -./tools/test/h5diff/testfiles/h5diff_25.txt -./tools/test/h5diff/testfiles/h5diff_26.txt -./tools/test/h5diff/testfiles/h5diff_27.txt -./tools/test/h5diff/testfiles/h5diff_28.txt -./tools/test/h5diff/testfiles/h5diff_30.txt -./tools/test/h5diff/testfiles/h5diff_50.txt -./tools/test/h5diff/testfiles/h5diff_51.txt -./tools/test/h5diff/testfiles/h5diff_52.txt -./tools/test/h5diff/testfiles/h5diff_53.txt -./tools/test/h5diff/testfiles/h5diff_54.txt -./tools/test/h5diff/testfiles/h5diff_55.txt -./tools/test/h5diff/testfiles/h5diff_56.txt -./tools/test/h5diff/testfiles/h5diff_57.txt -./tools/test/h5diff/testfiles/h5diff_58.txt -./tools/test/h5diff/testfiles/h5diff_58_ref.txt -./tools/test/h5diff/testfiles/h5diff_59.txt -./tools/test/h5diff/testfiles/h5diff_60.txt -./tools/test/h5diff/testfiles/h5diff_61.txt -./tools/test/h5diff/testfiles/h5diff_62.txt -./tools/test/h5diff/testfiles/h5diff_63.txt -./tools/test/h5diff/testfiles/h5diff_600.txt -./tools/test/h5diff/testfiles/h5diff_601.txt -./tools/test/h5diff/testfiles/h5diff_601_ERR.err -./tools/test/h5diff/testfiles/h5diff_603.txt -./tools/test/h5diff/testfiles/h5diff_604.txt -./tools/test/h5diff/testfiles/h5diff_605.txt -./tools/test/h5diff/testfiles/h5diff_606.txt -./tools/test/h5diff/testfiles/h5diff_607.txt -./tools/test/h5diff/testfiles/h5diff_608.txt -./tools/test/h5diff/testfiles/h5diff_609.txt -./tools/test/h5diff/testfiles/h5diff_610.txt -./tools/test/h5diff/testfiles/h5diff_612.txt -./tools/test/h5diff/testfiles/h5diff_613.txt -./tools/test/h5diff/testfiles/h5diff_614.txt -./tools/test/h5diff/testfiles/h5diff_615.txt -./tools/test/h5diff/testfiles/h5diff_616.txt -./tools/test/h5diff/testfiles/h5diff_617.txt -./tools/test/h5diff/testfiles/h5diff_618.txt -./tools/test/h5diff/testfiles/h5diff_619.txt -./tools/test/h5diff/testfiles/h5diff_621.txt -./tools/test/h5diff/testfiles/h5diff_622.txt -./tools/test/h5diff/testfiles/h5diff_623.txt -./tools/test/h5diff/testfiles/h5diff_624.txt -./tools/test/h5diff/testfiles/h5diff_625.txt -./tools/test/h5diff/testfiles/h5diff_626.txt -./tools/test/h5diff/testfiles/h5diff_627.txt -./tools/test/h5diff/testfiles/h5diff_628.txt -./tools/test/h5diff/testfiles/h5diff_629.txt -./tools/test/h5diff/testfiles/h5diff_630.txt -./tools/test/h5diff/testfiles/h5diff_631.txt -./tools/test/h5diff/testfiles/h5diff_640.txt -./tools/test/h5diff/testfiles/h5diff_641.txt -./tools/test/h5diff/testfiles/h5diff_642.txt -./tools/test/h5diff/testfiles/h5diff_643.txt -./tools/test/h5diff/testfiles/h5diff_644.txt -./tools/test/h5diff/testfiles/h5diff_645.txt -./tools/test/h5diff/testfiles/h5diff_646.txt -./tools/test/h5diff/testfiles/h5diff_70.txt -./tools/test/h5diff/testfiles/h5diff_700.txt -./tools/test/h5diff/testfiles/h5diff_701.txt -./tools/test/h5diff/testfiles/h5diff_702.txt -./tools/test/h5diff/testfiles/h5diff_703.txt -./tools/test/h5diff/testfiles/h5diff_704.txt -./tools/test/h5diff/testfiles/h5diff_705.txt -./tools/test/h5diff/testfiles/h5diff_706.txt -./tools/test/h5diff/testfiles/h5diff_707.txt -./tools/test/h5diff/testfiles/h5diff_708.txt -./tools/test/h5diff/testfiles/h5diff_709.txt -./tools/test/h5diff/testfiles/h5diff_710.txt -./tools/test/h5diff/testfiles/h5diff_80.txt -./tools/test/h5diff/testfiles/h5diff_800.txt -./tools/test/h5diff/testfiles/h5diff_801.txt -./tools/test/h5diff/testfiles/h5diff_830.txt -./tools/test/h5diff/testfiles/h5diff_90.txt -./tools/test/h5diff/testfiles/h5diff_100.txt -./tools/test/h5diff/testfiles/h5diff_101.txt -./tools/test/h5diff/testfiles/h5diff_102.txt -./tools/test/h5diff/testfiles/h5diff_103.txt -./tools/test/h5diff/testfiles/h5diff_104.txt -# w for Windows-specific -./tools/test/h5diff/testfiles/h5diff_101w.txt -./tools/test/h5diff/testfiles/h5diff_102w.txt -./tools/test/h5diff/testfiles/h5diff_103w.txt -./tools/test/h5diff/testfiles/h5diff_104w.txt -./tools/test/h5diff/testfiles/h5diff_200.txt -./tools/test/h5diff/testfiles/h5diff_201.txt -./tools/test/h5diff/testfiles/h5diff_202.txt -./tools/test/h5diff/testfiles/h5diff_203.txt -./tools/test/h5diff/testfiles/h5diff_204.txt -./tools/test/h5diff/testfiles/h5diff_205.txt -./tools/test/h5diff/testfiles/h5diff_206.txt -./tools/test/h5diff/testfiles/h5diff_207.txt -./tools/test/h5diff/testfiles/h5diff_208.txt -./tools/test/h5diff/testfiles/h5diff_220.txt -./tools/test/h5diff/testfiles/h5diff_221.txt -./tools/test/h5diff/testfiles/h5diff_222.txt -./tools/test/h5diff/testfiles/h5diff_223.txt -./tools/test/h5diff/testfiles/h5diff_224.txt -./tools/test/h5diff/testfiles/h5diff_300.txt -./tools/test/h5diff/testfiles/h5diff_400.txt -./tools/test/h5diff/testfiles/h5diff_401.txt -./tools/test/h5diff/testfiles/h5diff_402.txt -./tools/test/h5diff/testfiles/h5diff_403.txt -./tools/test/h5diff/testfiles/h5diff_404.txt -./tools/test/h5diff/testfiles/h5diff_405.txt -./tools/test/h5diff/testfiles/h5diff_406.txt -./tools/test/h5diff/testfiles/h5diff_407.txt -./tools/test/h5diff/testfiles/h5diff_408.txt -./tools/test/h5diff/testfiles/h5diff_409.txt -./tools/test/h5diff/testfiles/h5diff_410.txt -./tools/test/h5diff/testfiles/h5diff_411.txt -./tools/test/h5diff/testfiles/h5diff_412.txt -./tools/test/h5diff/testfiles/h5diff_413.txt -./tools/test/h5diff/testfiles/h5diff_414.txt -./tools/test/h5diff/testfiles/h5diff_415.txt -./tools/test/h5diff/testfiles/h5diff_416.txt -./tools/test/h5diff/testfiles/h5diff_417.txt -./tools/test/h5diff/testfiles/h5diff_418.txt -./tools/test/h5diff/testfiles/h5diff_419.txt -./tools/test/h5diff/testfiles/h5diff_420.txt -./tools/test/h5diff/testfiles/h5diff_421.txt -./tools/test/h5diff/testfiles/h5diff_422.txt -./tools/test/h5diff/testfiles/h5diff_423.txt -./tools/test/h5diff/testfiles/h5diff_424.txt -./tools/test/h5diff/testfiles/h5diff_425.txt -./tools/test/h5diff/testfiles/h5diff_450.txt -./tools/test/h5diff/testfiles/h5diff_451.txt -./tools/test/h5diff/testfiles/h5diff_452.txt -./tools/test/h5diff/testfiles/h5diff_453.txt -./tools/test/h5diff/testfiles/h5diff_454.txt -./tools/test/h5diff/testfiles/dangling_link.err -./tools/test/h5diff/testfiles/h5diff_455.txt -./tools/test/h5diff/testfiles/h5diff_456.txt -./tools/test/h5diff/testfiles/h5diff_457.txt -./tools/test/h5diff/testfiles/h5diff_458.txt -./tools/test/h5diff/testfiles/h5diff_459.txt -./tools/test/h5diff/testfiles/h5diff_465.txt -./tools/test/h5diff/testfiles/h5diff_466.txt -./tools/test/h5diff/testfiles/h5diff_467.txt -./tools/test/h5diff/testfiles/h5diff_468.txt -./tools/test/h5diff/testfiles/h5diff_469.txt -./tools/test/h5diff/testfiles/h5diff_471.txt -./tools/test/h5diff/testfiles/h5diff_472.txt -./tools/test/h5diff/testfiles/h5diff_473.txt -./tools/test/h5diff/testfiles/h5diff_474.txt -./tools/test/h5diff/testfiles/h5diff_475.txt -./tools/test/h5diff/testfiles/h5diff_480.txt -./tools/test/h5diff/testfiles/h5diff_481.txt -./tools/test/h5diff/testfiles/h5diff_482.txt -./tools/test/h5diff/testfiles/h5diff_483.txt -./tools/test/h5diff/testfiles/h5diff_484.txt -./tools/test/h5diff/testfiles/h5diff_485.txt -./tools/test/h5diff/testfiles/h5diff_486.txt -./tools/test/h5diff/testfiles/h5diff_487.txt -./tools/test/h5diff/testfiles/h5diff_500.txt -./tools/test/h5diff/testfiles/h5diff_501.txt -./tools/test/h5diff/testfiles/h5diff_502.txt -./tools/test/h5diff/testfiles/h5diff_503.txt -./tools/test/h5diff/testfiles/h5diff_504.txt -./tools/test/h5diff/testfiles/h5diff_505.txt -./tools/test/h5diff/testfiles/h5diff_506.txt -./tools/test/h5diff/testfiles/h5diff_507.txt -./tools/test/h5diff/testfiles/h5diff_508.txt -./tools/test/h5diff/testfiles/h5diff_509.txt -./tools/test/h5diff/testfiles/h5diff_510.txt -./tools/test/h5diff/testfiles/h5diff_511.txt -./tools/test/h5diff/testfiles/h5diff_512.txt -./tools/test/h5diff/testfiles/h5diff_513.txt -./tools/test/h5diff/testfiles/h5diff_514.txt -./tools/test/h5diff/testfiles/h5diff_515.txt -./tools/test/h5diff/testfiles/h5diff_516.txt -./tools/test/h5diff/testfiles/h5diff_517.txt -./tools/test/h5diff/testfiles/h5diff_518.txt -./tools/test/h5diff/testfiles/h5diff_530.txt -./tools/test/h5diff/testfiles/h5diff_540.txt - -./tools/test/h5diff/testfiles/h5diff_attr1.h5 -./tools/test/h5diff/testfiles/h5diff_attr2.h5 -./tools/test/h5diff/testfiles/h5diff_attr3.h5 -./tools/test/h5diff/testfiles/h5diff_attr_v_level1.h5 -./tools/test/h5diff/testfiles/h5diff_attr_v_level2.h5 -./tools/test/h5diff/testfiles/h5diff_basic1.h5 -./tools/test/h5diff/testfiles/h5diff_basic2.h5 -./tools/test/h5diff/testfiles/h5diff_dset1.h5 -./tools/test/h5diff/testfiles/h5diff_dset2.h5 -./tools/test/h5diff/testfiles/h5diff_dset3.h5 -./tools/test/h5diff/testfiles/h5diff_dtypes.h5 -./tools/test/h5diff/testfiles/h5diff_empty.h5 -./tools/test/h5diff/testfiles/h5diff_eps1.h5 -./tools/test/h5diff/testfiles/h5diff_eps2.h5 -./tools/test/h5diff/testfiles/h5diff_hyper1.h5 -./tools/test/h5diff/testfiles/h5diff_hyper2.h5 -./tools/test/h5diff/testfiles/h5diff_types.h5 -./tools/test/h5diff/testfiles/h5diff_links.h5 -./tools/test/h5diff/testfiles/h5diff_ext2softlink_src.h5 -./tools/test/h5diff/testfiles/h5diff_ext2softlink_trg.h5 -./tools/test/h5diff/testfiles/h5diff_extlink_src.h5 -./tools/test/h5diff/testfiles/h5diff_extlink_trg.h5 -./tools/test/h5diff/testfiles/h5diff_linked_softlink.h5 -./tools/test/h5diff/testfiles/h5diff_softlinks.h5 -./tools/test/h5diff/testfiles/h5diff_danglelinks1.h5 -./tools/test/h5diff/testfiles/h5diff_danglelinks2.h5 -./tools/test/h5diff/testfiles/h5diff_grp_recurse1.h5 -./tools/test/h5diff/testfiles/h5diff_grp_recurse2.h5 -./tools/test/h5diff/testfiles/h5diff_grp_recurse_ext1.h5 -./tools/test/h5diff/testfiles/h5diff_grp_recurse_ext2-1.h5 -./tools/test/h5diff/testfiles/h5diff_grp_recurse_ext2-2.h5 -./tools/test/h5diff/testfiles/h5diff_grp_recurse_ext2-3.h5 -./tools/test/h5diff/testfiles/h5diff_exclude1-1.h5 -./tools/test/h5diff/testfiles/h5diff_exclude1-2.h5 -./tools/test/h5diff/testfiles/h5diff_exclude2-1.h5 -./tools/test/h5diff/testfiles/h5diff_exclude2-2.h5 -./tools/test/h5diff/testfiles/h5diff_exclude3-1.h5 -./tools/test/h5diff/testfiles/h5diff_exclude3-2.h5 -./tools/test/h5diff/testfiles/h5diff_comp_vl_strs.h5 -./tools/test/h5diff/testfiles/h5diff_dset_zero_dim_size1.h5 -./tools/test/h5diff/testfiles/h5diff_dset_zero_dim_size2.h5 -./tools/test/h5diff/testfiles/h5diff_enum_invalid_values.h5 -./tools/test/h5diff/testfiles/h5diff_eps.txt -./tools/test/h5diff/testfiles/compounds_array_vlen1.h5 -./tools/test/h5diff/testfiles/compounds_array_vlen2.h5 -./tools/test/h5diff/testfiles/non_comparables1.h5 -./tools/test/h5diff/testfiles/non_comparables2.h5 -./tools/test/h5diff/testfiles/h5diff_8625.txt -./tools/test/h5diff/testfiles/h5diff_8639.txt -./tools/test/h5diff/testfiles/tudfilter.h5 -./tools/test/h5diff/testfiles/tudfilter2.h5 -./tools/test/h5diff/testfiles/h5diff_ud.txt -./tools/test/h5diff/testfiles/h5diff_udfail.err -./tools/test/h5diff/testfiles/h5diff_udfail.txt -./tools/test/h5diff/testfiles/h5diff_strings1.h5 -./tools/test/h5diff/testfiles/h5diff_strings2.h5 -./tools/test/h5diff/testfiles/h5diff_vlstr.txt -#vds -./tools/test/h5diff/testfiles/h5diff_v1.txt -./tools/test/h5diff/testfiles/h5diff_v2.txt -./tools/test/h5diff/testfiles/h5diff_v3.txt -#reg_ref -./tools/test/h5diff/testfiles/h5diff_reg.txt - -#test files for h5repack -./tools/test/h5repack/testfiles/README -./tools/test/h5repack/testfiles/bounds_latest_latest.h5 -./tools/test/h5repack/testfiles/h5copy_extlinks_src.h5 -./tools/test/h5repack/testfiles/h5repack_aggr.h5 -./tools/test/h5repack/testfiles/h5repack_attr.h5 -./tools/test/h5repack/testfiles/h5repack_attr_refs.h5 -./tools/test/h5repack/testfiles/h5repack_deflate.h5 -./tools/test/h5repack/testfiles/h5repack_early.h5 -./tools/test/h5repack/testfiles/h5repack_ext.bin -./tools/test/h5repack/testfiles/h5repack_ext.h5 -./tools/test/h5repack/testfiles/h5repack_f32le.h5 -./tools/test/h5repack/testfiles/h5repack_f32le_ex-0.dat -./tools/test/h5repack/testfiles/h5repack_f32le_ex.h5 -./tools/test/h5repack/testfiles/h5repack_fill.h5 -./tools/test/h5repack/testfiles/h5repack_filters.h5 -./tools/test/h5repack/testfiles/h5repack_fletcher.h5 -./tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 -./tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 -./tools/test/h5repack/testfiles/h5repack_hlink.h5 -./tools/test/h5repack/testfiles/h5repack_int32le_1d.h5 -./tools/test/h5repack/testfiles/h5repack_int32le_1d_ex-0.dat -./tools/test/h5repack/testfiles/h5repack_int32le_1d_ex-1.dat -./tools/test/h5repack/testfiles/h5repack_int32le_1d_ex.h5 -./tools/test/h5repack/testfiles/h5repack_int32le_2d.h5 -./tools/test/h5repack/testfiles/h5repack_int32le_2d_ex-0.dat -./tools/test/h5repack/testfiles/h5repack_int32le_2d_ex.h5 -./tools/test/h5repack/testfiles/h5repack_int32le_3d.h5 -./tools/test/h5repack/testfiles/h5repack_int32le_3d_ex-0.dat -./tools/test/h5repack/testfiles/h5repack_int32le_3d_ex.h5 -./tools/test/h5repack/testfiles/h5repack.info -./tools/test/h5repack/testfiles/h5repack_layout.h5 -./tools/test/h5repack/testfiles/h5repack_layouto.h5 -./tools/test/h5repack/testfiles/h5repack_layout2.h5 -./tools/test/h5repack/testfiles/h5repack_layout3.h5 -./tools/test/h5repack/testfiles/h5repack_layout.UD.h5 -./tools/test/h5repack/testfiles/h5repack_named_dtypes.h5 -./tools/test/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 -./tools/test/h5repack/testfiles/h5repack_nested_8bit_enum.h5 -./tools/test/h5repack/testfiles/h5repack_nbit.h5 -./tools/test/h5repack/testfiles/h5repack_none.h5 -./tools/test/h5repack/testfiles/h5repack_objs.h5 -./tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 -./tools/test/h5repack/testfiles/h5repack_paged_persist.h5 -./tools/test/h5repack/testfiles/h5repack_refs.h5 -./tools/test/h5repack/testfiles/h5repack_shuffle.h5 -./tools/test/h5repack/testfiles/h5repack_soffset.h5 -./tools/test/h5repack/testfiles/h5repack_szip.h5 -./tools/test/h5repack/testfiles/h5repack_uint8be.h5 -./tools/test/h5repack/testfiles/h5repack_uint8be_ex-0.dat -./tools/test/h5repack/testfiles/h5repack_uint8be_ex-1.dat -./tools/test/h5repack/testfiles/h5repack_uint8be_ex-2.dat -./tools/test/h5repack/testfiles/h5repack_uint8be_ex-3.dat -./tools/test/h5repack/testfiles/h5repack_uint8be_ex.h5 -./tools/test/h5repack/testfiles/ublock.bin -./tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl -./tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl -./tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst -./tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst -./tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst -./tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst -./tools/test/h5repack/testfiles/h5repack-help.txt -./tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst -./tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst -./tools/test/h5repack/testfiles/h5repack_layout.h5.ddl -./tools/test/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl -./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl -./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl -./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl -./tools/test/h5repack/testfiles/h5repack_CVE-2018-17432.h5 -./tools/test/h5repack/testfiles/h5repack_CVE-2018-14460.h5 -./tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl -./tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl -./tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl -./tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl -./tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl -./tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl -./tools/test/h5repack/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl -./tools/test/h5repack/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl -./tools/test/h5repack/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl -./tools/test/h5repack/testfiles/4_vds.h5-vds_conti-v.ddl -./tools/test/h5repack/testfiles/4_vds.h5-vds_compa-v.ddl -./tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl -./tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl -./tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl -./tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst -./tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl -./tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl -./tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl -./tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst -./tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl -./tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl -./tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl -./tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst -./tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl -./tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl -./tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl -./tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst -./tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl -./tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl -./tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl -./tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst -./tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl -./tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl -./tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl -./tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst -./tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl -./tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl -./tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5 - -# jam utility and tests -./tools/src/h5jam/Makefile.am -./tools/src/h5jam/h5jam.c -./tools/src/h5jam/h5unjam.c -./tools/test/h5jam/Makefile.am -./tools/test/h5jam/h5jamgentest.c -./tools/test/h5jam/testh5jam.sh.in -./tools/test/h5jam/tellub.c -./tools/test/h5jam/getub.c - -# test files for jam -./tools/test/h5jam/testfiles/h5jam-help.txt -./tools/test/h5jam/testfiles/h5unjam-help.txt -./tools/test/h5jam/testfiles/tall.h5 -./tools/test/h5jam/testfiles/twithub.h5 -./tools/test/h5jam/testfiles/twithub513.h5 -./tools/test/h5jam/testfiles/u10.txt -./tools/test/h5jam/testfiles/u511.txt -./tools/test/h5jam/testfiles/u512.txt -./tools/test/h5jam/testfiles/u513.txt -./tools/test/h5jam/testfiles/h5jam-ub-nohdf5.txt - -# test files for h5copy -./tools/test/h5copy/testfiles/h5copytst.h5 -./tools/test/h5copy/testfiles/h5copytst.out.ls -./tools/test/h5copy/testfiles/h5copy_ref.h5 -./tools/test/h5copy/testfiles/h5copy_ref.out.ls -./tools/test/h5copy/testfiles/h5copy_extlinks_src.h5 -./tools/test/h5copy/testfiles/h5copy_extlinks_trg.h5 -./tools/test/h5copy/testfiles/h5copy_extlinks_src.out.ls -./tools/test/h5copy/testfiles/h5copy_misc1.err -./tools/test/h5copy/testfiles/h5copy_misc1.out -./tools/test/h5copy/testfiles/h5copytst_new.h5 -./tools/test/h5copy/testfiles/h5copytst_new.out.ls -./tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt -./tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt -./tools/test/h5copy/testfiles/tudfilter.h5 -./tools/test/h5copy/testfiles/tudfilter2.h5 -./tools/test/h5copy/testfiles/tudfilter.h5.txt -./tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt - -# test files for h5mkgrp -./tools/testfiles/h5mkgrp_nested_p.ls -./tools/testfiles/h5mkgrp_nested_lp.ls -./tools/testfiles/h5mkgrp_nested_mult_p.ls -./tools/testfiles/h5mkgrp_nested_mult_lp.ls -./tools/testfiles/h5mkgrp_several.ls -./tools/testfiles/h5mkgrp_several_v.ls -./tools/testfiles/h5mkgrp_several_p.ls -./tools/testfiles/h5mkgrp_several_l.ls -./tools/testfiles/h5mkgrp_single.ls -./tools/testfiles/h5mkgrp_single_v.ls -./tools/testfiles/h5mkgrp_single_p.ls -./tools/testfiles/h5mkgrp_single_l.ls - -./tools/src/h5perf/Makefile.am -./tools/src/h5perf/perf.c -./tools/src/h5perf/pio_engine.c -./tools/src/h5perf/pio_perf.c -./tools/src/h5perf/pio_perf.h -./tools/src/h5perf/sio_engine.c -./tools/src/h5perf/sio_perf.c -./tools/src/h5perf/sio_perf.h - -./tools/test/perform/Makefile.am -./tools/test/perform/build_h5perf_alone.sh -./tools/test/perform/build_h5perf_serial_alone.sh -./tools/test/perform/chunk.c -./tools/test/perform/chunk_cache.c -./tools/test/perform/direct_write_perf.c -./tools/test/perform/gen_report.pl -./tools/test/perform/iopipe.c -./tools/test/perform/overhead.c -./tools/test/perform/perf_meta.c -./tools/test/perform/pio_standalone.c -./tools/test/perform/pio_standalone.h -./tools/test/perform/sio_standalone.c -./tools/test/perform/sio_standalone.h -./tools/test/perform/zip_perf.c - -# Utils directory -./utils/Makefile.am - -# Mirror VFD utilities -./utils/mirror_vfd/Makefile.am -./utils/mirror_vfd/mirror_remote.c -./utils/mirror_vfd/mirror_remote.h -./utils/mirror_vfd/mirror_server.c -./utils/mirror_vfd/mirror_server_stop.c -./utils/mirror_vfd/mirror_writer.c - -# test utilities -./utils/test/Makefile.am -./utils/test/swmr_check_compat_vfd.c - -# parallel tools (h5dwalk) and tests -./utils/tools/CMakeLists.txt -./utils/tools/Makefile.am -./utils/tools/h5dwalk/CMakeLists.txt -./utils/tools/h5dwalk/Makefile.am -./utils/tools/h5dwalk/h5dwalk.1 -./utils/tools/h5dwalk/h5dwalk.c -./utils/tools/test/CMakeLists.txt -./utils/tools/test/Makefile.am -./utils/tools/test/h5dwalk/CMakeLists.txt -./utils/tools/test/h5dwalk/CMakeTests.cmake -./utils/tools/test/h5dwalk/Makefile.am -./utils/tools/test/h5dwalk/copy_demo_files.sh.in -./utils/tools/test/h5dwalk/help.h5dwalk -./utils/tools/test/h5dwalk/testh5dwalk.sh.in - -# VFD SWMR utilities -./utils/vfd_swmr/README.md -./utils/vfd_swmr/Makefile.am -./utils/vfd_swmr/aux_process.c - -# high level libraries -./hl/Makefile.am -./hl/examples/Makefile.am -./hl/examples/ex_ds1.c -./hl/examples/ex_lite1.c -./hl/examples/ex_lite2.c -./hl/examples/ex_lite3.c -./hl/examples/ex_image1.c -./hl/examples/ex_image2.c -./hl/examples/ex_table_01.c -./hl/examples/ex_table_02.c -./hl/examples/ex_table_03.c -./hl/examples/ex_table_04.c -./hl/examples/ex_table_05.c -./hl/examples/ex_table_06.c -./hl/examples/ex_table_07.c -./hl/examples/ex_table_08.c -./hl/examples/ex_table_09.c -./hl/examples/ex_table_10.c -./hl/examples/ex_table_11.c -./hl/examples/ex_table_12.c -./hl/examples/image24pixel.txt -./hl/examples/image8.txt -./hl/examples/pal_rgb.h -./hl/examples/ptExampleFL.c -./hl/examples/run-hl-ex.sh -./hl/examples/run-hlc-ex.sh.in -./hl/src/Makefile.am -./hl/src/H5DO.c -./hl/src/H5DOpublic.h -./hl/src/H5DS.c -./hl/src/H5DSprivate.h -./hl/src/H5DSpublic.h -./hl/src/H5HLprivate2.h -./hl/src/H5IM.c -./hl/src/H5IMprivate.h -./hl/src/H5IMpublic.h -./hl/src/H5LD.c -./hl/src/H5LDprivate.h -./hl/src/H5LDpublic.h -./hl/src/H5LT.c -./hl/src/H5LTanalyze.c -./hl/src/H5LTanalyze.l -./hl/src/H5LTparse.c -./hl/src/H5LTparse.h -./hl/src/H5LTparse.y -./hl/src/H5LTprivate.h -./hl/src/H5LTpublic.h -./hl/src/H5PT.c -./hl/src/H5PTprivate.h -./hl/src/H5PTpublic.h -./hl/src/H5TB.c -./hl/src/H5TBprivate.h -./hl/src/H5TBpublic.h -./hl/src/hdf5_hl.h -./hl/test/H5srcdir_str.h.in -./hl/test/Makefile.am -./hl/test/dsdata.txt -./hl/test/dslat.txt -./hl/test/dslon.txt -./hl/test/dtype_file.txt -./hl/test/dtype_file_readable.txt -./hl/test/earth.pal -./hl/test/gen_test_ds.c -./hl/test/gen_test_ld.c -./hl/test/h5hltest.h -./hl/test/image24pixel.txt -./hl/test/image24plane.txt -./hl/test/image8.txt -./hl/test/pal_rgb.h -./hl/test/sepia.pal -./hl/test/test_ds.c -./hl/test/test_ds_be.h5 -./hl/test/test_ds_be_new_ref.h5 -./hl/test/test_ds_be_new_ref-32bit.h5 -./hl/test/test_ds_le.h5 -./hl/test/test_ds_le_new_ref.h5 -./hl/test/test_dset_append.c -./hl/test/test_file_image.c -./hl/test/test_h5do_compat.c -./hl/test/test_image.c -./hl/test/test_ld.c -./hl/test/test_ld.h5 -./hl/test/test_lite.c -./hl/test/test_packet.c -./hl/test/test_packet_vlen.c -./hl/test/test_table.c -./hl/test/test_table_be.h5 -./hl/test/test_table_cray.h5 -./hl/test/test_table_le.h5 -./hl/test/usa.wri - -# tools -./hl/tools/Makefile.am -./hl/tools/gif2h5/Makefile.am -./hl/tools/gif2h5/decompress.c -./hl/tools/gif2h5/gif.h -./hl/tools/gif2h5/gif2hdf.c -./hl/tools/gif2h5/gif2mem.c -./hl/tools/gif2h5/gifread.c -./hl/tools/gif2h5/hdf2gif.c -./hl/tools/gif2h5/hdfgifwr.c -./hl/tools/gif2h5/writehdf.c -./hl/tools/gif2h5/h52gifgentst.c -./hl/tools/gif2h5/h52giftest.sh.in -./hl/tools/gif2h5/testfiles/README -./hl/tools/gif2h5/testfiles/ex_image2.h5 -./hl/tools/gif2h5/testfiles/image1.gif -./hl/tools/gif2h5/testfiles/h52giftst.h5 -# -./hl/tools/h5watch/Makefile.am -./hl/tools/h5watch/extend_dset.c -./hl/tools/h5watch/h5watch.c -./hl/tools/h5watch/h5watchgentest.c -./hl/tools/h5watch/testh5watch.sh.in - -# expected test output from testing h5watch -# -./hl/tools/testfiles/w-err-std.ddl -./hl/tools/testfiles/w-err-cmpd1.err -./hl/tools/testfiles/w-err-cmpd2.err -./hl/tools/testfiles/w-err-cmpd3.err -./hl/tools/testfiles/w-err-cmpd4.err -./hl/tools/testfiles/w-err-cmpd5.err -./hl/tools/testfiles/w-err-dset1.err -./hl/tools/testfiles/w-err-dset2.err -./hl/tools/testfiles/w-err-dset-nomax.err -./hl/tools/testfiles/w-err-dset-none.err -./hl/tools/testfiles/w-err-file.err -./hl/tools/testfiles/w-err-poll0.ddl -./hl/tools/testfiles/w-err-poll.ddl -./hl/tools/testfiles/w-err-width.ddl -./hl/tools/testfiles/w-ext-cmpd.ddl -./hl/tools/testfiles/w-ext-cmpd-esc.ddl -./hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl -./hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl -./hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl -./hl/tools/testfiles/w-ext-cmpd-f1.ddl -./hl/tools/testfiles/w-ext-cmpd-f2.ddl -./hl/tools/testfiles/w-ext-cmpd-ff3.ddl -./hl/tools/testfiles/w-ext-cmpd-label.ddl -./hl/tools/testfiles/w-ext-cmpd-two.ddl -./hl/tools/testfiles/w-ext-cmpd-two-f1.ddl -./hl/tools/testfiles/w-ext-cmpd-two-f3.ddl -./hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl -./hl/tools/testfiles/w-ext-early.ddl -./hl/tools/testfiles/w-ext-late.ddl -./hl/tools/testfiles/w-ext-one-d.ddl -./hl/tools/testfiles/w-ext-one.ddl -./hl/tools/testfiles/w-ext-one-simple.ddl -./hl/tools/testfiles/w-ext-two-d.ddl -./hl/tools/testfiles/w-ext-two.ddl -./hl/tools/testfiles/w-ext-two-width.ddl -./hl/tools/testfiles/w-help1.ddl - -# hl fortran -./hl/fortran/Makefile.am -./hl/fortran/examples/Makefile.am -./hl/fortran/examples/run-hlfortran-ex.sh.in -./hl/fortran/src/hdf5_hl_fortrandll.def.in -./hl/fortran/src/H5DSfc.c -./hl/fortran/src/H5DSff.F90 -./hl/fortran/src/H5HL_buildiface.F90 -./hl/fortran/src/H5IMcc.c -./hl/fortran/src/H5IMcc.h -./hl/fortran/src/H5IMfc.c -./hl/fortran/src/H5IMff.F90 -./hl/fortran/src/H5LTf90proto.h -./hl/fortran/src/H5LTfc.c -./hl/fortran/src/H5LTff.F90 -./hl/fortran/src/H5TBfc.c -./hl/fortran/src/H5TBff.F90 -./hl/fortran/src/Makefile.am -./hl/fortran/test/Makefile.am -./hl/fortran/test/tstds.F90 -./hl/fortran/test/tstimage.F90 -./hl/fortran/test/tstlite.F90 -./hl/fortran/test/tsttable.F90 - -# hl c++ -./hl/c++/Makefile.am -./hl/c++/examples/Makefile.am -./hl/c++/examples/ptExampleFL.cpp -./hl/c++/examples/run-hlc++-ex.sh.in -./hl/c++/src/H5PacketTable.h -./hl/c++/src/H5PacketTable.cpp -./hl/c++/src/Makefile.am -./hl/c++/test/ptableTest.h -./hl/c++/test/ptableTest.cpp -./hl/c++/test/Makefile.am - -# java -./java/Makefile.am -./java/CMakeLists.txt - -./java/src/Makefile.am -./java/src/CMakeLists.txt -./java/src/jni/Makefile.am -./java/src/jni/CMakeLists.txt -./java/src/jni/exceptionImp.c -./java/src/jni/exceptionImp.h -./java/src/jni/h5Constants.c -./java/src/jni/nativeData.c -./java/src/jni/nativeData.h -./java/src/jni/h5jni.h -./java/src/jni/h5util.c -./java/src/jni/h5util.h -./java/src/jni/h5Imp.c -./java/src/jni/h5Imp.h -./java/src/jni/h5aImp.c -./java/src/jni/h5aImp.h -./java/src/jni/h5dImp.c -./java/src/jni/h5dImp.h -./java/src/jni/h5eImp.c -./java/src/jni/h5eImp.h -./java/src/jni/h5fImp.c -./java/src/jni/h5fImp.h -./java/src/jni/h5gImp.c -./java/src/jni/h5gImp.h -./java/src/jni/h5iImp.c -./java/src/jni/h5iImp.h -./java/src/jni/h5lImp.c -./java/src/jni/h5lImp.h -./java/src/jni/h5oImp.c -./java/src/jni/h5oImp.h -./java/src/jni/h5pImp.c -./java/src/jni/h5pImp.h -./java/src/jni/h5pACPLImp.c -./java/src/jni/h5pACPLImp.h -./java/src/jni/h5pDAPLImp.c -./java/src/jni/h5pDAPLImp.h -./java/src/jni/h5pDCPLImp.c -./java/src/jni/h5pDCPLImp.h -./java/src/jni/h5pDXPLImp.c -./java/src/jni/h5pDXPLImp.h -./java/src/jni/h5pFAPLImp.c -./java/src/jni/h5pFAPLImp.h -./java/src/jni/h5pFCPLImp.c -./java/src/jni/h5pFCPLImp.h -./java/src/jni/h5pGAPLImp.c -./java/src/jni/h5pGAPLImp.h -./java/src/jni/h5pGCPLImp.c -./java/src/jni/h5pGCPLImp.h -./java/src/jni/h5pLAPLImp.c -./java/src/jni/h5pLAPLImp.h -./java/src/jni/h5pLCPLImp.c -./java/src/jni/h5pLCPLImp.h -./java/src/jni/h5pOCPLImp.c -./java/src/jni/h5pOCPLImp.h -./java/src/jni/h5pOCpyPLImp.c -./java/src/jni/h5pOCpyPLImp.h -./java/src/jni/h5pStrCPLImp.c -./java/src/jni/h5pStrCPLImp.h -./java/src/jni/h5plImp.c -./java/src/jni/h5plImp.h -./java/src/jni/h5rImp.c -./java/src/jni/h5rImp.h -./java/src/jni/h5sImp.c -./java/src/jni/h5sImp.h -./java/src/jni/h5tImp.c -./java/src/jni/h5tImp.h -./java/src/jni/h5vlImp.c -./java/src/jni/h5vlImp.h -./java/src/jni/h5zImp.c -./java/src/jni/h5zImp.h - -./java/src/hdf/CMakeLists.txt -./java/src/hdf/overview.html -./java/src/hdf/hdf5lib/CMakeLists.txt - -./java/src/hdf/hdf5lib/callbacks/Callbacks.java -./java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java -./java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java -./java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java -./java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java -./java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java -./java/src/hdf/hdf5lib/callbacks/H5D_append_t.java -./java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java -./java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java -./java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java -./java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java -./java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java -./java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java -./java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java -./java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java -./java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java -./java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java -./java/src/hdf/hdf5lib/callbacks/package-info.java - -./java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java -./java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java -./java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java -./java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java -./java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java -./java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java -./java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java -./java/src/hdf/hdf5lib/exceptions/HDF5Exception.java -./java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java -./java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java -./java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java -./java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java -./java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java -./java/src/hdf/hdf5lib/exceptions/HDF5IdException.java -./java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java -./java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java -./java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java -./java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java -./java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java -./java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java -./java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java -./java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java -./java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java -./java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java -./java/src/hdf/hdf5lib/exceptions/package-info.java - -./java/src/hdf/hdf5lib/structs/H5_ih_info_t.java -./java/src/hdf/hdf5lib/structs/H5A_info_t.java -./java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java -./java/src/hdf/hdf5lib/structs/H5E_error2_t.java -./java/src/hdf/hdf5lib/structs/H5F_info2_t.java -./java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java -./java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java -./java/src/hdf/hdf5lib/structs/H5G_info_t.java -./java/src/hdf/hdf5lib/structs/H5L_info_t.java -./java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java -./java/src/hdf/hdf5lib/structs/H5O_info_t.java -./java/src/hdf/hdf5lib/structs/H5O_native_info_t.java -./java/src/hdf/hdf5lib/structs/H5O_token_t.java -./java/src/hdf/hdf5lib/structs/package-info.java - -./java/src/hdf/hdf5lib/H5.java -./java/src/hdf/hdf5lib/HDF5Constants.java -./java/src/hdf/hdf5lib/HDF5GroupInfo.java -./java/src/hdf/hdf5lib/HDFArray.java -./java/src/hdf/hdf5lib/HDFNativeData.java -./java/src/hdf/hdf5lib/package-info.java - -./java/examples/Makefile.am -./java/examples/CMakeLists.txt - -./java/examples/intro/Makefile.am -./java/examples/intro/CMakeLists.txt -./java/examples/intro/JavaIntroExample.sh.in -./java/examples/intro/H5_CreateAttribute.java -./java/examples/intro/H5_CreateDataset.java -./java/examples/intro/H5_CreateFile.java -./java/examples/intro/H5_CreateGroup.java -./java/examples/intro/H5_CreateGroupAbsoluteRelative.java -./java/examples/intro/H5_CreateGroupDataset.java -./java/examples/intro/H5_ReadWrite.java - -./java/examples/groups/Makefile.am -./java/examples/groups/CMakeLists.txt -./java/examples/groups/JavaGroupExample.sh.in -./java/examples/groups/H5Ex_G_Create.java -./java/examples/groups/H5Ex_G_Iterate.java -./java/examples/groups/H5Ex_G_Compact.java -./java/examples/groups/H5Ex_G_Corder.java -./java/examples/groups/H5Ex_G_Intermediate.java -./java/examples/groups/H5Ex_G_Phase.java -./java/examples/groups/H5Ex_G_Traverse.java -./java/examples/groups/H5Ex_G_Visit.java -./java/examples/groups/h5ex_g_iterate.h5 -./java/examples/groups/h5ex_g_visit.h5 - -./java/examples/datasets/Makefile.am -./java/examples/datasets/CMakeLists.txt -./java/examples/datasets/JavaDatasetExample.sh.in -./java/examples/datasets/H5Ex_D_Alloc.java -./java/examples/datasets/H5Ex_D_Checksum.java -./java/examples/datasets/H5Ex_D_Chunk.java -./java/examples/datasets/H5Ex_D_Compact.java -./java/examples/datasets/H5Ex_D_External.java -./java/examples/datasets/H5Ex_D_FillValue.java -./java/examples/datasets/H5Ex_D_Gzip.java -./java/examples/datasets/H5Ex_D_Hyperslab.java -./java/examples/datasets/H5Ex_D_ReadWrite.java -./java/examples/datasets/H5Ex_D_Shuffle.java -./java/examples/datasets/H5Ex_D_Szip.java -./java/examples/datasets/H5Ex_D_UnlimitedAdd.java -./java/examples/datasets/H5Ex_D_UnlimitedGzip.java -./java/examples/datasets/H5Ex_D_UnlimitedMod.java -./java/examples/datasets/H5Ex_D_Nbit.java -./java/examples/datasets/H5Ex_D_Transform.java -./java/examples/datasets/H5Ex_D_Sofloat.java -./java/examples/datasets/H5Ex_D_Soint.java - -./java/examples/datatypes/Makefile.am -./java/examples/datatypes/CMakeLists.txt -./java/examples/datatypes/JavaDatatypeExample.sh.in -./java/examples/datatypes/H5Ex_T_Array.java -./java/examples/datatypes/H5Ex_T_ArrayAttribute.java -./java/examples/datatypes/H5Ex_T_Bit.java -./java/examples/datatypes/H5Ex_T_BitAttribute.java -./java/examples/datatypes/H5Ex_T_Commit.java -./java/examples/datatypes/H5Ex_T_Compound.java -./java/examples/datatypes/H5Ex_T_CompoundAttribute.java -./java/examples/datatypes/H5Ex_T_Float.java -./java/examples/datatypes/H5Ex_T_FloatAttribute.java -./java/examples/datatypes/H5Ex_T_Integer.java -./java/examples/datatypes/H5Ex_T_IntegerAttribute.java -./java/examples/datatypes/H5Ex_T_ObjectReference.java -./java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java -./java/examples/datatypes/H5Ex_T_Opaque.java -./java/examples/datatypes/H5Ex_T_OpaqueAttribute.java -./java/examples/datatypes/H5Ex_T_String.java -./java/examples/datatypes/H5Ex_T_StringAttribute.java -./java/examples/datatypes/H5Ex_T_VLString.java - -./java/examples/testfiles/examples.intro.H5_CreateAttribute.txt -./java/examples/testfiles/examples.intro.H5_CreateDataset.txt -./java/examples/testfiles/examples.intro.H5_CreateFile.txt -./java/examples/testfiles/examples.intro.H5_CreateGroup.txt -./java/examples/testfiles/examples.intro.H5_CreateGroupAbsoluteRelative.txt -./java/examples/testfiles/examples.intro.H5_CreateGroupDataset.txt -./java/examples/testfiles/examples.intro.H5_ReadWrite.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Create.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Iterate.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Compact.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Corder.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Intermediate.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Phase.txt -./java/examples/testfiles/examples.groups.H5Ex_G_Visit.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Alloc.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Checksum.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Chunk.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Compact.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_External.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_FillValue.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Gzip.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Hyperslab.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_ReadWrite.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Shuffle.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Szip.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_UnlimitedAdd.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_UnlimitedGzip.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_UnlimitedMod.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Nbit.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Transform.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt -./java/examples/testfiles/examples.datasets.H5Ex_D_Soint.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Array.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_ArrayAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Bit.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_BitAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Commit.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Compound.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_CompoundAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Float.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_FloatAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Integer.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_IntegerAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_ObjectReference.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_Opaque.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_OpaqueAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_String.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_StringAttribute.txt -./java/examples/testfiles/examples.datatypes.H5Ex_T_VLString.txt - -./java/test/Makefile.am -./java/test/CMakeLists.txt -./java/test/junit.sh.in -./java/test/testfiles/JUnit-TestH5.txt -./java/test/testfiles/JUnit-TestH5A.txt -./java/test/testfiles/JUnit-TestH5Arw.txt -./java/test/testfiles/JUnit-TestH5Dparams.txt -./java/test/testfiles/JUnit-TestH5D.txt -./java/test/testfiles/JUnit-TestH5Dplist.txt -./java/test/testfiles/JUnit-TestH5Drw.txt -./java/test/testfiles/JUnit-TestH5E.txt -./java/test/testfiles/JUnit-TestH5Edefault.txt -./java/test/testfiles/JUnit-TestH5Eparams.txt -./java/test/testfiles/JUnit-TestH5Eregister.txt -./java/test/testfiles/JUnit-TestH5Fparams.txt -./java/test/testfiles/JUnit-TestH5Fbasic.txt -./java/test/testfiles/JUnit-TestH5F.txt -./java/test/testfiles/JUnit-TestH5Fswmr.txt -./java/test/testfiles/JUnit-TestH5Gbasic.txt -./java/test/testfiles/JUnit-TestH5G.txt -./java/test/testfiles/JUnit-TestH5Giterate.txt -./java/test/testfiles/JUnit-TestH5Lparams.txt -./java/test/testfiles/JUnit-TestH5Lbasic.txt -./java/test/testfiles/JUnit-TestH5Lcreate.txt -./java/test/testfiles/JUnit-TestH5Oparams.txt -./java/test/testfiles/JUnit-TestH5Obasic.txt -./java/test/testfiles/JUnit-TestH5Ocreate.txt -./java/test/testfiles/JUnit-TestH5Ocopy.txt -./java/test/testfiles/JUnit-TestH5OcopyOld.txt -./java/test/testfiles/JUnit-TestH5P.txt -./java/test/testfiles/JUnit-TestH5PData.txt -./java/test/testfiles/JUnit-TestH5Pfapl.txt -./java/test/testfiles/JUnit-TestH5Pfaplhdfs.txt -./java/test/testfiles/JUnit-TestH5Pfapls3.txt -./java/test/testfiles/JUnit-TestH5Plist.txt -./java/test/testfiles/JUnit-TestH5Pvirtual.txt -./java/test/testfiles/JUnit-TestH5PL.txt -./java/test/testfiles/JUnit-TestH5R.txt -./java/test/testfiles/JUnit-TestH5Rref.txt -./java/test/testfiles/JUnit-TestH5Sbasic.txt -./java/test/testfiles/JUnit-TestH5S.txt -./java/test/testfiles/JUnit-TestH5Tparams.txt -./java/test/testfiles/JUnit-TestH5Tbasic.txt -./java/test/testfiles/JUnit-TestH5T.txt -./java/test/testfiles/JUnit-TestH5VL.txt -./java/test/testfiles/JUnit-TestH5Z.txt -./java/test/h5ex_g_iterate.orig -./java/test/TestH5.java -./java/test/TestH5A.java -./java/test/TestH5Arw.java -./java/test/TestH5Dparams.java -./java/test/TestH5D.java -./java/test/TestH5Dplist.java -./java/test/TestH5Drw.java -./java/test/TestH5E.java -./java/test/TestH5Edefault.java -./java/test/TestH5Eparams.java -./java/test/TestH5Eregister.java -./java/test/TestH5Fparams.java -./java/test/TestH5Fbasic.java -./java/test/TestH5F.java -./java/test/TestH5Fswmr.java -./java/test/TestH5Gbasic.java -./java/test/TestH5G.java -./java/test/TestH5Giterate.java -./java/test/TestH5Lparams.java -./java/test/TestH5Lbasic.java -./java/test/TestH5Lcreate.java -./java/test/TestH5Oparams.java -./java/test/TestH5Obasic.java -./java/test/TestH5Ocreate.java -./java/test/TestH5Ocopy.java -./java/test/TestH5OcopyOld.java -./java/test/TestH5P.java -./java/test/TestH5PData.java -./java/test/TestH5Pfapl.java -./java/test/TestH5Pfaplhdfs.java -./java/test/TestH5Pfapls3.java -./java/test/TestH5Plist.java -./java/test/TestH5Pvirtual.java -./java/test/TestH5PL.java -./java/test/TestH5R.java -./java/test/TestH5Rref.java -./java/test/TestH5Sbasic.java -./java/test/TestH5S.java -./java/test/TestH5Tparams.java -./java/test/TestH5Tbasic.java -./java/test/TestH5T.java -./java/test/TestH5VL.java -./java/test/TestH5Z.java -./java/test/TestAll.java - -./java/lib/hamcrest-core.jar -./java/lib/junit.jar -./java/lib/simplelogger.properties -./java/lib/slf4j-api-1.7.33.jar -./java/lib/ext/slf4j-nop-1.7.33.jar -./java/lib/ext/slf4j-simple-1.7.33.jar - -# CMake-specific Files -./config/toolchain/build32.cmake -./config/toolchain/clang.cmake -./config/toolchain/crayle.cmake -./config/toolchain/GCC.cmake -./config/toolchain/intel.cmake -./config/toolchain/mingw64.cmake -./config/toolchain/PGI.cmake - -./config/cmake/cacheinit.cmake -./config/cmake/CMakeFindJavaCommon.cmake -./config/cmake/ConversionTests.c -./config/cmake/ConfigureChecks.cmake -./config/cmake/CPack.Info.plist.in -./config/cmake/CTestCustom.cmake -./config/cmake/fileCompareTest.cmake -./config/cmake/FindHDFS.cmake -./config/cmake/H5pubconf.h.in -./config/cmake/hdf5-config.cmake.in -./config/cmake/hdf5-config-version.cmake.in -./config/cmake/HDFCompilerFlags.cmake -./config/cmake/HDFCXXCompilerFlags.cmake -./config/cmake/HDFFortranCompilerFlags.cmake -./config/cmake/HDF5Macros.cmake -./config/cmake/HDF5PluginMacros.cmake -./config/cmake/HDF5PluginCache.cmake -./config/cmake/HDF5UseFortran.cmake -./config/cmake/javaTargets.cmake.in -./config/cmake/jrunTest.cmake -./config/cmake/libh5cc.in -./config/cmake/libhdf5.settings.cmake.in -./config/cmake/mccacheinit.cmake -./config/cmake/patch.xml -./config/cmake/PkgInfo.in -./config/cmake/README.md.cmake.in -./config/cmake/UseJava.cmake -./config/cmake/UseJavaClassFilelist.cmake -./config/cmake/UseJavaSymlinks.cmake -./config/cmake/userblockTest.cmake -./config/cmake/vfdTest.cmake -./config/cmake/volTest.cmake -./config/cmake/wait_H5Tinit.cmake - -./config/cmake_ext_mod/ConfigureChecks.cmake -./config/cmake_ext_mod/CTestCustom.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/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/runTest.cmake -./config/cmake_ext_mod/version.plist.in - -# CMake-specific User Files -./config/cmake/UserMacros/Windows_MT.cmake - -# CMake-specific Examples Files -./config/cmake/HDF5_Examples.cmake.in -./release_docs/USING_CMake_Examples.txt - -./CMakeLists.txt -./CMakeFilters.cmake -./CMakeInstallation.cmake -./CMakePlugins.cmake -./CTestConfig.cmake -./UserMacros.cmake -./c++/CMakeLists.txt -./c++/examples/CMakeLists.txt -./c++/examples/CMakeTests.cmake -./c++/src/CMakeLists.txt -./c++/test/CMakeLists.txt -./c++/test/CMakeTests.cmake -./c++/test/CMakeVFDTests.cmake -./examples/CMakeLists.txt -./examples/CMakeTests.cmake -./examples/run-all-ex.sh -./examples/run-c-ex.sh.in -./fortran/CMakeLists.txt -./fortran/examples/CMakeLists.txt -./fortran/examples/CMakeTests.cmake -./fortran/src/CMakeLists.txt -./fortran/test/CMakeLists.txt -./fortran/test/CMakeTests.cmake -./fortran/testpar/CMakeLists.txt -./fortran/testpar/CMakeTests.cmake -./hl/CMakeLists.txt -./hl/c++/CMakeLists.txt -./hl/c++/examples/CMakeLists.txt -./hl/c++/examples/CMakeTests.cmake -./hl/c++/src/CMakeLists.txt -./hl/c++/test/CMakeLists.txt -./hl/c++/test/CMakeTests.cmake -./hl/examples/CMakeLists.txt -./hl/examples/CMakeTests.cmake -./hl/fortran/CMakeLists.txt -./hl/fortran/examples/CMakeLists.txt -./hl/fortran/examples/CMakeTests.cmake -./hl/fortran/src/CMakeLists.txt -./hl/fortran/test/CMakeLists.txt -./hl/fortran/test/CMakeTests.cmake -./hl/src/CMakeLists.txt -./hl/test/CMakeLists.txt -./hl/test/CMakeTests.cmake -./hl/tools/CMakeLists.txt -./hl/tools/gif2h5/CMakeLists.txt -./hl/tools/gif2h5/CMakeTests.cmake -./hl/tools/h5watch/CMakeLists.txt -./hl/tools/h5watch/CMakeTests.cmake -./src/CMakeLists.txt -./test/CMakeLists.txt -./test/CMakePassthroughVOLTests.cmake -./test/CMakeTests.cmake -./test/CMakeVFDTests.cmake -./test/flushrefreshTest.cmake -./test/ShellTests.cmake -./testpar/CMakeLists.txt -./testpar/CMakeTests.cmake -./testpar/CMakeVFDTests.cmake -./tools/CMakeLists.txt -./tools/lib/CMakeLists.txt -./tools/libtest/CMakeLists.txt -./tools/libtest/CMakeTests.cmake -./tools/src/CMakeLists.txt -./tools/test/CMakeLists.txt -./tools/src/h5copy/CMakeLists.txt -./tools/test/h5copy/CMakeLists.txt -./tools/test/h5copy/CMakeTests.cmake -./tools/src/h5diff/CMakeLists.txt -./tools/test/h5diff/CMakeLists.txt -./tools/test/h5diff/CMakeTests.cmake -./tools/src/h5dump/CMakeLists.txt -./tools/test/h5dump/CMakeLists.txt -./tools/test/h5dump/CMakeTests.cmake -./tools/test/h5dump/CMakeTestsPBITS.cmake -./tools/test/h5dump/CMakeTestsXML.cmake -./tools/test/h5dump/CMakeTestsVDS.cmake -./tools/test/h5dump/CMakeVFDTests.cmake -./tools/src/h5format_convert/CMakeLists.txt -./tools/test/h5format_convert/CMakeLists.txt -./tools/test/h5format_convert/CMakeTests.cmake -./tools/src/h5import/CMakeLists.txt -./tools/test/h5import/CMakeLists.txt -./tools/test/h5import/CMakeTests.cmake -./tools/src/h5jam/CMakeLists.txt -./tools/test/h5jam/CMakeLists.txt -./tools/test/h5jam/CMakeTests.cmake -./tools/src/h5ls/CMakeLists.txt -./tools/test/h5ls/CMakeLists.txt -./tools/test/h5ls/CMakeTests.cmake -./tools/test/h5ls/CMakeTestsVDS.cmake -./tools/src/h5repack/CMakeLists.txt -./tools/test/h5repack/CMakeLists.txt -./tools/test/h5repack/CMakeTests.cmake -./tools/test/h5repack/CMakeVFDTests.cmake -./tools/src/h5stat/CMakeLists.txt -./tools/test/h5stat/CMakeLists.txt -./tools/test/h5stat/CMakeTests.cmake -./tools/src/misc/CMakeLists.txt -./tools/src/h5perf/CMakeLists.txt -./tools/test/misc/CMakeLists.txt -./tools/test/misc/CMakeTestsClear.cmake -./tools/test/misc/CMakeTestsMkgrp.cmake -./tools/test/misc/CMakeTestsRepart.cmake -./tools/test/misc/vds/CMakeLists.txt -./tools/test/perform/CMakeLists.txt -./tools/test/perform/CMakeTests.cmake - -./utils/CMakeLists.txt -./utils/mirror_vfd/CMakeLists.txt -./utils/test/CMakeLists.txt -./utils/vfd_swmr/CMakeLists.txt - -# CMake-specific User Scripts -./config/cmake/CTestScript.cmake -./config/cmake/HDF5_Examples_options.cmake -./config/cmake/scripts/CTestScript.cmake -./config/cmake/scripts/HDF5config.cmake -./config/cmake/scripts/HDF5options.cmake - -# CMake-specific Sanitizer Scripts -./config/sanitizer/code-coverage.cmake -./config/sanitizer/formatting.cmake -./config/sanitizer/sanitizers.cmake -./config/sanitizer/tools.cmake -./config/sanitizer/LICENSE -./config/sanitizer/README.md - -# CMake-specific HPC Scripts -./config/cmake/scripts/HPC/sbatch-HDF5options.cmake -./config/cmake/scripts/HPC/bsub-HDF5options.cmake -./config/cmake/scripts/HPC/qsub-HDF5options.cmake -./config/cmake/scripts/HPC/raybsub-HDF5options.cmake - -# Files generated by autogen -./aclocal.m4 -./bin/compile -./bin/config.guess -./bin/config.sub -./bin/depcomp -./bin/install-sh -./bin/ltmain.sh -./bin/missing -./bin/test-driver -./c++/examples/Makefile.in -./c++/Makefile.in -./configure -./bin/Makefile.in -./c++/src/Makefile.in -./c++/test/Makefile.in -./examples/Makefile.in -./fortran/examples/Makefile.in -./fortran/Makefile.in -./fortran/src/Makefile.in -./fortran/test/Makefile.in -./fortran/testpar/Makefile.in -./hl/c++/examples/Makefile.in -./hl/c++/Makefile.in -./hl/c++/src/Makefile.in -./hl/c++/test/Makefile.in -./hl/examples/Makefile.in -./hl/fortran/examples/Makefile.in -./hl/fortran/Makefile.in -./hl/fortran/src/Makefile.in -./hl/fortran/test/Makefile.in -./hl/Makefile.in -./hl/src/Makefile.in -./hl/test/Makefile.in -./hl/tools/gif2h5/Makefile.in -./hl/tools/h5watch/Makefile.in -./hl/tools/Makefile.in -./java/examples/intro/Makefile.in -./java/examples/datasets/Makefile.in -./java/examples/datatypes/Makefile.in -./java/examples/Makefile.in -./java/examples/groups/Makefile.in -./java/Makefile.in -./java/test/Makefile.in -./java/src/Makefile.in -./java/src/jni/Makefile.in -./m4/libtool.m4 -./m4/lt~obsolete.m4 -./m4/ltoptions.m4 -./m4/ltsugar.m4 -./m4/ltversion.m4 -./Makefile.in -./src/H5config.h.in -./src/H5Edefin.h -./src/H5Einit.h -./src/H5Epubgen.h -./src/H5Eterm.h -./src/H5overflow.h -./src/H5version.h -./src/Makefile.in -./test/Makefile.in -./testpar/Makefile.in -./tools/Makefile.in -./tools/lib/Makefile.in -./tools/libtest/Makefile.in -./tools/src/Makefile.in -./tools/src/h5copy/Makefile.in -./tools/src/h5diff/Makefile.in -./tools/src/h5dump/Makefile.in -./tools/src/h5format_convert/Makefile.in -./tools/src/h5import/Makefile.in -./tools/src/h5jam/Makefile.in -./tools/src/h5ls/Makefile.in -./tools/src/h5perf/Makefile.in -./tools/src/h5repack/Makefile.in -./tools/src/h5stat/Makefile.in -./tools/src/misc/Makefile.in -./tools/test/Makefile.in -./tools/test/h5copy/Makefile.in -./tools/test/h5diff/Makefile.in -./tools/test/h5dump/Makefile.in -./tools/test/h5format_convert/Makefile.in -./tools/test/h5import/Makefile.in -./tools/test/h5jam/Makefile.in -./tools/test/h5ls/Makefile.in -./tools/test/h5repack/Makefile.in -./tools/test/h5stat/Makefile.in -./tools/test/misc/Makefile.in -./tools/test/misc/vds/Makefile.in -./tools/test/perform/Makefile.in -./utils/Makefile.in -./utils/mirror_vfd/Makefile.in -./utils/test/Makefile.in -./utils/tools/Makefile.in -./utils/tools/h5dwalk/Makefile.in -./utils/tools/test/Makefile.in -./utils/tools/test/h5dwalk/Makefile.in -./utils/vfd_swmr/Makefile.in diff --git a/bin/bbrelease b/bin/bbrelease index a45be2e..d056f6d 100755 --- a/bin/bbrelease +++ b/bin/bbrelease @@ -14,32 +14,13 @@ # Make a release of hdf5. # -# Programmer: Robb Matzke -# Creation date: on or before 1998-01-29. +# NOTE: +# This script differs from bin/release in that this has an added +# --revision option to create private releases with the code revision +# hash in the version strings. # -# Modifications -# Robb Matzke, 1999-07-16 -# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like -# `sed s+/CVS++' to `sed 's/\/CVS//' -# -# Albert Cheng, 1999-10-26 -# Moved the MANIFEST checking to a separate command file so that -# it can be invoked individually. -# -# Albert Cheng, 2004-08-14 -# Added the --private option. -# -# James Laird, 2005-09-07 -# Added the md5 method. -# -# Larry Knox, 2016-08-30 -# Added the --revision option to create private releases with the -# code revision hash in the version strings. Currently the version -# of this script with the --revision option is named bbrelease. It -# can probably be merged into the original release script in the -# future. -# Commands to get the revision hash have now been converted to git -# to match the source repository change. +# This script can probably be merged into the original release script in +# the future. # Function definitions # @@ -47,26 +28,25 @@ USAGE() { cat << EOF -Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ... - -d DIR The name of the directory where the release(s) should be +Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--private] [--revision] <methods> ... + -d DIR The name of the directory where the release(s) should be placed. --docver BRANCHNAME This is added for 1.8 and beyond to get the correct version of documentation files from the hdf5docs repository. BRANCHNAME for v1.8 should be hdf5_1_8. -h print the help page. - --nocheck Ignore errors in MANIFEST file. - --private Make a private release with today's date in version information. - --revision Make a private release with the code revision number in version information. - + --private Make a private release with today's date in version information. + --revision Make a private release with the code revision number 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" is assumed): - tar -- use tar and don't do any compressing. - gzip -- use gzip with "-9" and append ".gz" to the output name. + tar -- use tar and don't do any compressing. + 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. + zip -- convert all text files to DOS style and form a zip file for Windows use. doc -- produce the latest doc tree in addition to the archive. An md5 checksum is produced for each archive created and stored in the md5 file. @@ -97,15 +77,10 @@ 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 temporary directory; # Note: do this in a temporary directory to avoid changing -# the original source directory which maybe around. +# the original source directory which may be around. # 2. convert all its text files to DOS (LF-CR) style; # 3. form a zip file which is usable by Windows users. # @@ -119,8 +94,8 @@ EOF tar2zip() { if [ $# -ne 3 ]; then - echo "usage: tar2zip <tarfilename> <zipfilename>" - return 1 + echo "usage: tar2zip <tarfilename> <zipfilename>" + return 1 fi ztmpdir=/tmp/tmpdir$$ mkdir -p $ztmpdir @@ -132,23 +107,23 @@ tar2zip() (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 + 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 + # -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 + 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 @@ -163,14 +138,6 @@ tar2zip() # This command must be run at the top level of the hdf5 source directory. # Verify this requirement. -# Since we are running bbrelease to create an HDF5 source tarfile for buildbot -# testing with source that is not for release, there is not a file named -# "configure" but there will be one named "configure.ac". The "configure" -# file will be created when autogen.sh runs. There probably will always -# be a bin/release file, but just in case it is removed, we can check for -# this script, bbrelease, in the bin directory. The bin/release script should -# continue to check for "configure" because it should be present in release -# source. if [ ! \( -f configure.ac -a -f bin/bbrelease \) ]; then echo "$0 must be run at the top level of the hdf5 source directory" exit 1 @@ -182,12 +149,11 @@ VERS=`perl bin/h5vers` VERS_OLD= test "$VERS" || exit 1 verbose=yes -check=yes release_date=`date +%F` today=`date +%Y%m%d` pmode='no' revmode='no' -tmpdir="../#release_tmp.$$" # tmp work directory +tmpdir="../#release_tmp.$$" # tmp work directory DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git CPPLUS_RM_NAME=cpplus_RM @@ -195,11 +161,11 @@ CPPLUS_RM_NAME=cpplus_RM RESTORE_VERSION() { if [ X-${VERS_OLD} != X- ]; then - echo restoring version information back to $VERS_OLD - rm -f config/lt_vers.am - cp $tmpdir/lt_vers.am config/lt_vers.am - bin/h5vers -s $VERS_OLD - VERS_OLD= + echo restoring version information back to $VERS_OLD + rm -f config/lt_vers.am + cp $tmpdir/lt_vers.am config/lt_vers.am + bin/h5vers -s $VERS_OLD + VERS_OLD= fi } @@ -209,20 +175,17 @@ while [ -n "$1" ]; do arg=$1 shift case "$arg" in - -d) - DEST=$1 - shift - ;; - --nocheck) - check=no - ;; - -h) - USAGE - exit 0 - ;; - --private) - pmode=yes - ;; + -d) + DEST=$1 + shift + ;; + -h) + USAGE + exit 0 + ;; + --private) + pmode=yes + ;; --revision) revmode=yes ;; @@ -230,14 +193,14 @@ while [ -n "$1" ]; do DOCVERSION=$1 shift ;; - -*) - echo "Unknown switch: $arg" 1>&2 - USAGE - exit 1 - ;; - *) - methods="$methods $arg" - ;; + -*) + echo "Unknown switch: $arg" 1>&2 + USAGE + exit 1 + ;; + *) + methods="$methods $arg" + ;; esac done @@ -278,7 +241,7 @@ if [ X$revmode = Xyes ]; then cp config/lt_vers.am $tmpdir branch=`git branch | grep '*' | awk '{print $NF}'` revision=`git rev-parse --short HEAD` -# Set version information to m.n.r-r$revision. + # Set version information to m.n.r-r$revision. # (h5vers does not correctly handle just m.n.r-$today.) VERS=`echo $VERS | sed -e s/-.*//`-$revision echo Private release of $VERS @@ -299,23 +262,10 @@ if [ ! -d $DEST ]; then exit 1 fi -# Check the validity of the MANIFEST file. -bin/chkmanifest || fail=yes -if [ "X$fail" = "Xyes" ]; then - if [ $check = yes ]; then - exit 1 - else - echo "Continuing anyway..." - fi -fi - -# Create a manifest that contains only files for distribution. -MANIFEST=$tmpdir/H5_MANIFEST -grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST - -# Prepare the source tree for a release. -#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1 +# Create a symlink to the source so files in the tarball have the prefix +# we want (gnu's --transform isn't portable) ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1 + # Save a backup copy of Makefile if exists. test -f Makefile && mv Makefile $tmpdir/Makefile.x cp -p Makefile.dist Makefile @@ -330,64 +280,60 @@ for f in README.md release_docs/RELEASE.txt; do chmod 644 $f done -# trunk is different than branches. +# develop is different than branches. if [ "${DOCVERSION}" ]; then DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git -b ${DOCVERSION} fi # Create the tar file test "$verbose" && echo " Running tar..." 1>&2 -( \ - cd $tmpdir; \ - tar cf $HDF5_VERS.tar $HDF5_IN_VERS/Makefile \ - `sed 's/^\.\//'$HDF5_IN_VERS'\//' $MANIFEST` || exit 1 \ -) +(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_IN_VERS" || exit 1 ) # Compress MD5file=$HDF5_VERS.md5 cp /dev/null $DEST/$MD5file for comp in $methods; do case $comp in - tar) - cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar - (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file) - ;; - gzip) - test "$verbose" && echo " Running gzip..." 1>&2 - gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz - (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file) - ;; - bzip2) - test "$verbose" && echo " Running bzip2..." 1>&2 - bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2 - (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file) - ;; - zip) - test "$verbose" && echo " Creating zip ball..." 1>&2 - tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2 - (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file) - ;; - doc) + tar) + cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar + (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file) + ;; + gzip) + test "$verbose" && echo " Running gzip..." 1>&2 + gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz + (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file) + ;; + bzip2) + test "$verbose" && echo " Running bzip2..." 1>&2 + bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2 + (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file) + ;; + zip) + test "$verbose" && echo " Creating zip ball..." 1>&2 + tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2 + (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file) + ;; + doc) if [ "${DOCVERSION}" = "" ]; then DOCVERSION=master fi - test "$verbose" && echo " Creating docs..." 1>&2 - # Check out docs from git repo - (cd $tmpdir; git clone $DOC_URL > /dev/null) || exit 1 - # Create doxygen C++ RM - (cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1 - # Replace version of C++ RM with just-created version + test "$verbose" && echo " Creating docs..." 1>&2 + # Check out docs from git repo + (cd $tmpdir; git clone $DOC_URL > /dev/null) || exit 1 + # Create doxygen C++ RM + (cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1 + # Replace version of C++ RM with just-created version rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME # Compress the docs and move them to the release area mv $tmpdir/$DOCVERSION $tmpdir/${HDF5_VERS}_docs - (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 - ;; + (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 @@ -408,4 +354,6 @@ fi # Remove temporary things rm -rf $tmpdir +echo "DONE" + exit 0 diff --git a/bin/checkposix b/bin/checkposix index 36d07a8..79c59ad 100755 --- a/bin/checkposix +++ b/bin/checkposix @@ -115,7 +115,7 @@ foreach $arg (@ARGV) { # These are really HDF5 functions/macros even though they don't # start with `h' or `H'. - next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NOFS|_NOCLEAR|_NOINIT|_NOPUSH)?(_NOFUNC|_TAG)?$/; + next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NAMECHECK_ONLY|_NO_EOT|_NOFS|_NOCLEAR|_NOINIT|_NOPUSH)?(_NOFUNC|_TAG)?$/; next if $name =~ /^(BEGIN|END)_FUNC$/; next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)(_VAR)?$/; next if $name =~ /^CI_(PRINT_STATS|INC_SRC|INC_DST)$/; @@ -123,10 +123,16 @@ foreach $arg (@ARGV) { next if $name =~ /^(MIN3?|MAX3?|NELMTS|POWER_OF_TWO|REGION_OVERFLOW)$/; next if $name =~ /^(SIZE_OVERFLOW|UNIQUE_MEMBERS|S_ISDIR)$/; next if $name =~ /^addr_defined$/; + next if $name =~ /^TERMINATOR$/; - # These functions/macros are exempt. - # op, cb, and OP are often spuriously flagged so ignore them. - next if $name =~ /^(main|op|cb|OP)$/; + # BSD queue functions + next if $name =~ /^(TAILQ_|SIMPLEQ_)/; + + # Ignore callback invocation + next if $name =~ /^(op|cb|OP|iter_op|func)$/; + + # Ignore main + next if $name =~ /^main$/; # This often appears in preprocessor lines that span multiple lines next if $name =~ /^(defined)$/; diff --git a/bin/chkmanifest b/bin/chkmanifest deleted file mode 100755 index 08ca1fa..0000000 --- a/bin/chkmanifest +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -# Check that all the files in MANIFEST exist and (if this is a -# GIT checkout) that all the GIT-managed files appear in the -# MANIFEST. -# - -verbose=yes -MANIFEST=/tmp/HD_MANIFEST.$$ -AUTOGEN=./autogen.sh -AUTOGEN_LOG=/tmp/autogen.log.$$ - -# Main -test "$verbose" && echo " Checking MANIFEST..." 1>&2 -# clean up $MANIFEST file when exits -trap "rm -f $MANIFEST" 0 - -# Only split lines on newline, not whitespace -set -f -IFS=' -' - -# First make sure i am in the directory in which there is an MANIFEST file -# and then do the checking from there. Will try the following, -# current directory, parent directory, the directory this command resides. -if [ -f MANIFEST ]; then - continue -elif [ -f ../MANIFEST ]; then - cd .. -else - commanddir=`dirname $0` - if [ -d "$commanddir" -a -f $commanddir/MANIFEST ]; then - cd $commanddir - continue - else - echo MANIFEST file not found. Abort. - exit 1 - fi -fi - -# Do an autogen if generated files (e.g., configure) is not present -if [ ! -f configure ]; then - echo " running $AUTOGEN" - $AUTOGEN > $AUTOGEN_LOG 2>&1 - if [ $? -ne 0 ]; then - echo $AUTOGEN encountered error. Abort. - echo output from $AUTOGEN: - cat $AUTOGEN_LOG - exit 1 - fi - rm $AUTOGEN_LOG -fi - -# Check for duplicate entries. This can be done at any time, but it may as -# well be sooner so that if something else fails the presence of duplicates -# will already be known. -errcode=0 -DUPLICATES=`perl -ne 's/#.*//; next if /^\s*$/; if ($uniq{$_}++) { print $_; }' MANIFEST` -if [ "$DUPLICATES" ]; then - cat 1>&2 <<EOF -These entries appear more than once in the MANIFEST: -$DUPLICATES -Please remove the duplicate lines and try again. - -EOF -errcode=1 -fi - -# Copy the manifest file to get a list of file names. -grep '^\.' MANIFEST | expand | cut -f1 -d' ' >$MANIFEST - -for file in `cat $MANIFEST`; do - if [ ! -f $file ]; then - echo "- $file" - fail=yes - fi -done - -# Get the list of files under version control and check that they are -# present. -# -# First get a list of all the pending files with git status and -# check those. -git_stat=`git status -s` -for file in $git_stat; do - - # Newly added files are not listed by git ls-files, which - # we check later. - - # The line listing new files starts with 'A'. - letter=`echo $file | head -c 1` - if [ "$letter" = "A" ]; then - # Convert the git status columns to './' so it matches - # the manifest file name. - # - # There is a space between the status columns and file name, hence - # the '3'. - path=`echo $file | sed 's/^.\{3\}/\.\//g'` - # Ignore directories - if [ ! -d $path ]; then - if (grep ^$path$ $MANIFEST >/dev/null); then - : - else - echo "- $path" - fail=yes - fi - fi - fi -done - -# Next check git ls-files, which gets a list of all files that are -# checked in. -git_ls=`git ls-files` -for file in $git_ls; do - path="./${file}" - # Ignore directories - if [ ! -d $path ]; then - if (grep ^$path$ $MANIFEST >/dev/null); then - : - else - echo "+ $path" - fail=yes - fi - fi -done - -# Finish up -if [ "X$fail" = "Xyes" ]; then - cat 1>&2 <<EOF -The MANIFEST is out of date. Files marked with a minus sign (-) no -longer exist; files marked with a plus sign (+) are GIT-managed but do -not appear in the MANIFEST. Please remedy the situation and try again. -EOF - exit 1 -fi - -if [ $errcode -ne 0 ]; then - exit 1 -fi - -test "$verbose" && echo " The MANIFEST is up to date." 1>&2 -exit 0 diff --git a/bin/locate_sw b/bin/locate_sw deleted file mode 100755 index 1cf84e2..0000000 --- a/bin/locate_sw +++ /dev/null @@ -1,238 +0,0 @@ -#!/bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -# Try to locate the software as named in argument. -# This is a sequential search of all possible locations of the software. -# Usage: locate_sw <SW-Name> -# It prints a string showing the paths leading to the include, lib and bin -# directory of the software, separated by colons. E.g., if the software is -# located in /usr/sdt/*, it prints -# /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin -# Any component that is not found will be returned as an empty string. E.g., -# if somehow the header files of the software are not found, it prints -# :/usr/sdt/lib;/usr/sdt/bin - -# Function definitions -USAGE() -{ - echo "Usage: locate_sw <SW-Name>" - echo " where <SW-Name> can be hdf4, hdf5, zlib" - echo " It prints the paths leading the header files (include)," - echo " library (lib), and tools (bin). E.g.," - echo " /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin" - echo " Any component that is not found will be returned as an empty string. E.g.," - echo " if somehow the header files of the software are not found, it prints" - echo " :/usr/sdt/lib;/usr/sdt/bin" - echo "Exit code: 0 if software located; otherwise non-zero" -} - -# locate hdf4 software -locate_hdf4() -{ -# this default is the best guess of locating hdf4 software -swpaths_defaults="/usr/ncsa /usr/sdt /usr/local" -swpaths= - -case "$OSname" in - SunOS) - case "$OSrelease" in - 5.7) - swpaths="/afs/ncsa/packages/hdf/SunOS_5.7" - ;; - *) - # use default - ;; - esac - ;; - HP-UX) - case "$OSrelease" in - B.11.00) - swpaths="/afs/ncsa/packages/hdf/HPUX_11.00" - ;; - *) - # use default - ;; - esac - ;; - Linux) - swpaths="/afs/ncsa/packages/hdf/Linux" - ;; - OSF1) - swpaths="/afs/ncsa/packages/hdf/OSF1_V4.0" - ;; - *) - # just use the defaults - ;; -esac - -# Check if the hdf4 software is actually available. -# Accept the directory only if needed .h, .a and tools are found -# in the same place. That way, they are more likely to be of the -# same version. -# -swpaths="$swpaths $swpaths_defaults" -for sw in $swpaths; do - if [ -r $sw/include/hdf.h -a -r $sw/lib/libdf.a -a -r $sw/bin/hdp ]; then - SW_inc=$sw/include - SW_lib=$sw/lib - SW_bin=$sw/bin - SW_Location=$sw - break - fi -done -} - -# locate hdf5 software -locate_hdf5() -{ -# this default is the best guess of locating hdf5 software -swpaths_defaults="/usr/ncsa /usr/sdt /usr/local" -swpaths= - -case "$OSname" in - SunOS) - case "$OSrelease" in - 5.7) - swpaths="/afs/ncsa/packages/hdf5/SunOS_5.7" - ;; - *) - # use default - ;; - esac - ;; - HP-UX) - case "$OSrelease" in - B.11.00) - swpaths="/afs/ncsa/packages/hdf5/HPUX_11.00" - ;; - *) - # use default - ;; - esac - ;; - Linux) - swpaths="/afs/ncsa/packages/hdf5/Linux" - ;; - FreeBSD) - swpaths="/afs/ncsa/packages/hdf5/FreeBSD" - ;; - OSF1) - swpaths="/afs/ncsa/packages/hdf5/OSF1_V4.0" - ;; - *) - # just use the defaults - ;; -esac - -# Check if the hdf5 software is actually available. -# Accept the directory only if needed .h, .a and tools are found -# in the same place. That way, they are more likely to be of the -# same version. -# -swpaths="$swpaths $swpaths_defaults" -for sw in $swpaths; do - if [ -r $sw/include/hdf5.h -a -r $sw/lib/libhdf5.a -a -r $sw/bin/h5dump ]; then - SW_inc=$sw/include - SW_lib=$sw/lib - SW_bin=$sw/bin - SW_Location=$sw - break - fi -done -} - -# locate zlib software -locate_zlib() -{ -# this default is the best guess of locating zlib software -swpaths_defaults="/usr /usr/local /usr/ncsa /usr/sdt" -swpaths= - - -# Check if the zlib software is actually available. -# Accept the directory only if needed .h, .a and tools are found -# in the same place. That way, they are more likely to be of the -# same version. -# Don't know something specific to check the bin directory. Maybe gzip? -# Just make sure it exists. -# -swpaths="$swpaths $swpaths_defaults" -for sw in $swpaths; do - if [ -r $sw/include/zlib.h -a \ - \( -r $sw/lib/libz.a -o -r $sw/lib/libz.so \) -a -d $cw/bin ]; then - SW_inc=$sw/include - SW_lib=$sw/lib - SW_bin=$sw/bin - SW_Location=$sw - break - fi -done - -# if none found, try HDF4 software which contains a version of zlib. -if [ x-$SW_Location = x- ]; then - locate_hdf4 -fi - -} - -# Main -# -# Options -# -if [ $# -lt 1 ]; then - USAGE - exit 1 -fi - -if [ "$1" = -h ]; then - USAGE - exit 0 -fi - -SW=$1 -shift - -# locations of the software seeked. -SW_inc= # include place -SW_lib= # library place -SW_bin= # binary place -SW_Location= # parent directory of all the above - -OSname=`uname -s` -OSrelease=`uname -r` - -case $SW in -hdf4|hdf) - locate_hdf4 - ;; -hdf5) - locate_hdf5 - ;; -zlib) - locate_zlib - ;; -*) - echo "unknown software ($SW)" - USAGE - exit 1 - ;; -esac - -# show the results located, separated by commas. -if [ -n "${SW_inc}" -a -n "${SW_lib}" -a -n "${SW_bin}" ]; then - echo ${SW_inc},${SW_lib},${SW_bin} - exit 0 -else - exit 1 -fi diff --git a/bin/release b/bin/release index e71a38e..84555b6 100755 --- a/bin/release +++ b/bin/release @@ -13,24 +13,6 @@ # # Make a release of hdf5. -# -# Programmer: Robb Matzke -# Creation date: on or before 1998-01-29. -# -# Modifications -# Robb Matzke, 1999-07-16 -# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like -# `sed s+/CVS++' to `sed 's/\/CVS//' -# -# Albert Cheng, 1999-10-26 -# Moved the MANIFEST checking to a separate command file so that -# it can be invoked individually. -# -# Albert Cheng, 2004-08-14 -# Added the --private option. -# -# James Laird, 2005-09-07 -# Added the md5 method. # Function definitions # @@ -38,14 +20,13 @@ USAGE() { cat << EOF -Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ... - -d DIR The name of the directory where the release(es) should be +Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--private] <methods> ... + -d DIR The name of the directory where the release(s) should be placed. --docver BRANCHNAME This is added for 1.8 and beyond to get the correct version of documentation files from the hdf5docs repository. BRANCHNAME for v1.8 should be hdf5_1_8. -h print the help page. - --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. @@ -100,11 +81,6 @@ 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 temporary directory; # Note: do this in a temporary directory to avoid changing @@ -167,11 +143,6 @@ tar2zip() # Function name: tar2cmakezip # Convert the release tarball to a Windows zipball with files to run CMake build. # -# Programmer: Larry Knox -# Creation date: 2017-02-20 -# -# Modifications -# # Steps: # 1. untar the tarball in a temporary directory; # Note: do this in a temporary directory to avoid changing @@ -269,10 +240,6 @@ tar2cmakezip() # Function name: tar2cmaketgz # Convert the release tarball to a gzipped tar file with files to run CMake build. # -# Programmer: Larry Knox -# Creation date: 2017-02-20 -# -# Modifications # # Steps: # 1. untar the tarball in a temporary directory; @@ -347,11 +314,6 @@ tar2cmaketgz() # and HDF5options.cmake files for parallel or serial only builds where build # tests are run on compute nodes using batch scripts. # -# Programmer: Larry Knox -# Creation date: 2019-01-28 -# -# Modifications -# # Steps: # 1. untar the tarball in a temporary directory; # Note: do this in a temporary directory to avoid changing @@ -443,7 +405,6 @@ VERS=`perl bin/h5vers` VERS_OLD= test "$VERS" || exit 1 verbose=yes -check=yes release_date=`date +%F` today=`date +%Y%m%d` pmode='no' @@ -482,9 +443,6 @@ while [ -n "$1" ]; do DEST=$1 shift ;; - --nocheck) - check=no - ;; -h) USAGE exit 0 @@ -546,28 +504,10 @@ if [ ! -d $DEST ]; then exit 1 fi -# Check the validity of the MANIFEST file. -bin/chkmanifest || fail=yes -if [ "X$fail" = "Xyes" ]; then - if [ $check = yes ]; then - echo "" - echo "Note! If you are running bin/release in a development branch" - echo "later than v 1.8 the MANIFEST check is expected to fail when" - echo "autogen.sh has not been run successfully. Either run autogen.sh " - echo "with /usr/hdf/bin/AUTOTOOLS at the beginning of PATH or add the" - echo "--nocheck argument to the bin/release command." - exit 1 - else - echo "Continuing anyway..." - fi -fi - -# Create a manifest that contains only files for distribution. -MANIFEST=$tmpdir/H5_MANIFEST -grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST - -# Prepare the source tree for a release. +# Create a symlink to the source so files in the tarball have the prefix +# we want (gnu's --transform isn't portable) ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1 + # Save a backup copy of Makefile if exists. test -f Makefile && mv Makefile $tmpdir/Makefile.x cp -p Makefile.dist Makefile @@ -582,18 +522,14 @@ for f in README.md release_docs/RELEASE.txt; do chmod 644 $f done -# trunk is different than branches. +# develop is different than branches. if [ "${DOCVERSION}" ]; then DOC_URL="$DOC_URL -b ${DOCVERSION}" fi # Create the tar file test "$verbose" && echo " Running tar..." 1>&2 -( \ - cd $tmpdir; \ - tar cf $HDF5_VERS.tar $HDF5_VERS/Makefile \ - `sed 's/^\.\//hdf5-'$VERS'\//' $MANIFEST` || exit 1 \ -) +(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_VERS" || exit 1 ) # Compress MD5file=$HDF5_VERS.md5 @@ -680,4 +616,6 @@ fi # Remove temporary things rm -rf $tmpdir +echo "DONE" + exit 0 diff --git a/bin/runtest b/bin/runtest deleted file mode 100755 index 5e05abb..0000000 --- a/bin/runtest +++ /dev/null @@ -1,966 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -# run the hdf5/bin/snapshot -# Usage: -# runtest run the test for the local host -# runtest <hostname> run the test for <hostname> -# runtest -all run the test for all predefined hosts -# -# Assumptions in knowing where to find the right scripts to execute. -# 1. assume we are at the top level of the hdf5 source. So, bin/* are -# where the script files are. -# 2. after the cvs update is completed, we can go to the snapshot area -# hdf5 source tree and use the bin/* there. -# 3. Cannot use the snapshot area scripts from the beginning because -# for one, the current directory is renamed as previous right after -# a snapshot release; and for another, some scripts may be changed -# by the cvs update while it is being used. - -# local setup -DEBUGMODE="" -test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************" -WHEREAMI='pwd' -CMD= - -# the name of this program -PROGNAME="bin/runtest $DEBUGMODE" - -# Setup -HOSTNAME=`hostname | cut -f1 -d.` # no domain part -TODAY=`date +%m%d%a` -WEEKDAY=`date +%a` -H5VER= # default to current CVS version -H5VERSION= # default to current CVS version -n_test=0 # Number of tests ran -n_pass=0 # Number of tests passed -n_fail=0 # Number of tests failed -n_skip=0 # Number of tests skipped - -# Default to do checkout (only once) and test, no release. -# Will run test only if there is significant differences from previous version. -# If srcdir is not used, don't launched multiple tests -SNAPSHOT="${DEBUGMODE:+echo }bin/snapshot" -SRCDIR="srcdir" -# Default standard Snaptest commands -SNAPCMD="$SRCDIR test clean" -# Default Standard snaptest command options -STANDARD_OPT="" -ENABLE_PARALLEL="--enable-parallel" -CONFIGNAME=$HOSTNAME # Name used in the SNAPTESTCFG file - -# test host default as local host. -TESTHOST="" - -################################# -# Function definitions -################################# - -# Print messages to stdout -# Use this to show output heading to stdout -PRINT() -{ - echo "$*" -} - -# Show seconds since midnight. -# This is used to calculate seconds elapsed -SecOfDay() -{ - set `date '+%H %M %S'` - t_sec=`expr $1 \* 3600 + $2 \* 60 + $3` - echo $t_sec -} - -# Calculated the elapsed time (in seconds) between the first -# and second time. If second time is smaller than the first, -# we assume the clock has passed midnight and calculate appropriately. -ElapsedTime() -{ - if [ $2 -lt $1 ]; then - t_sec=`expr 3600 \* 24 - $1 + $2` - else - t_sec=`expr $2 - $1` - fi - echo `expr $t_sec / 60`m `expr $t_sec % 60`s -} - -# Report errors -# $1--an error message to be printed -REPORT_ERR() -{ - ERRMSG=$1 - # print it with a banner shifted right a bit - PRINT " *************************************" - PRINT " `date`" - PRINT " $ERRMSG" - PRINT " *************************************" - # report it in the FAILED-LOG file too - PRINT "$ERRMSG" >> $FAILEDLOG -} - -# -# Report results of the last test done -REPORT_RESULT() -{ - if [ $retcode -eq 0 ]; then - if [ $skiptest = yes ]; then - n_skip=`expr $n_skip + 1` - PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $SKIPPEDLOG - else - n_pass=`expr $n_pass + 1` - PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG - fi - else - # test failed. - n_fail=`expr $n_fail + 1` - REPORT_ERR "****FAILED ${HOSTNAME}: $TEST_TYPE****" - fi -} - -# Print a blank line -PRINT_BLANK() -{ - PRINT -} - -# Print test trailer -PRINT_TEST_TRAILER() -{ - PRINT "*** finished $TEST_TYPE tests for $HOSTNAME ***" - date; EndTime=`SecOfDay` - PRINT Total time = `ElapsedTime $StartTime $EndTime` - PRINT_BLANK -} - -# Print trailer summary -PRINT_TRAILER() -{ - PRINT "*** finished tests in $HOSTNAME ***" - date; TotalEndTime=`SecOfDay` - PRINT "${HOSTNAME}: Ran $n_test($n_pass/$n_fail/$n_skip) $runtest_type, Grand total test time = " \ - "`ElapsedTime $TotalStartTime $TotalEndTime`" | tee -a $TIMELOG - PRINT_BLANK -} - -# Figure out which remote command to use to reach a host. -# Try ssh first, then rsh since fewer machines support rsh exec. -# $1--hostname to reach. -CHECK_RSH() -{ - # Figure out how to use ping command in this host. - # Some hosts use "ping host count", some use "ping -c count host". - # Test "ping -c 3 -w 5" since it has timeout feature. - # Test "ping -c ..." style before "ping host 3" because some machines - # that recognize -c treat 'ping localhost 3' as to ping host '3'. - if [ -z "$PING" ]; then - if ping -c 3 -w 5 localhost >/dev/null 2>&1; then - PING='ping -c 3 -w 5' - PINGCOUNT= - elif ping -c 3 localhost >/dev/null 2>&1; then - PING='ping -c 3' - PINGCOUNT= - elif ping localhost 3 >/dev/null 2>&1; then - PING=ping - PINGCOUNT=3 - else # don't know how to use ping. - PING=no_ping - PINGCOUNT= - fi - fi - # - host=$1 - # Try remote command with host if it responds to ping. - # Still try it if we don't know how to do ping. - if [ no_ping = "$PING" ] || $PING $host $PINGCOUNT >/dev/null 2>&1; then - if ssh $host -n hostname >/dev/null 2>&1; then - RSH=ssh - elif rsh $host -n hostname >/dev/null 2>&1; then - RSH=rsh - else - PRINT cannot remote command with $host - RSH="NoRemoteCommand" - fi - else - RSH="NotReachable" - fi -} - - -# Wait for a file for at most number of minutes -# $1--the file -# $2--number of minutes -# WAIT_STATUS set to: -# -1 if errors encountered -# 0 if file found within time limit -# 1 if file not found within time limit -WAITFOR() -{ - wait_file=$1 - nminutes=$2 - if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ] - then - PRINT "errors in argument of WAITFOR(): wait_file($1) or nminutes($2)" - WAIT_STATUS=-1 - return - fi - while [ ! -f $wait_file ]; do - if [ $nminutes -gt 0 ]; then - PRINT "Wait For $wait_file to appear" - sleep 60 #sleep 1 minute - else - WAIT_STATUS=1 - return - fi - nminutes=`expr $nminutes - 1` - done - WAIT_STATUS=0 - return -} - - -# Wait till a file disappears for at most number of minutes. -# Useful to wait till a lock is removed by another process. -# $1--the file -# $2--number of minutes -# WAIT_STATUS set to: -# -1 if errors encountered -# 0 if file disappears within time limit -# 1 if file has not disappeared within time limit -WAITTILL() -{ - wait_file=$1 - nminutes=$2 - if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ] - then - PRINT "errors in argument of WAITTILL(): wait_file($1) or nminutes($2)" - WAIT_STATUS=-1 - return - fi - while [ -f $wait_file ]; do - if [ $nminutes -gt 0 ]; then - PRINT "Wait till $wait_file has disappeared" - sleep 60 #sleep 1 minute - else - WAIT_STATUS=1 - return - fi - nminutes=`expr $nminutes - 1` - done - WAIT_STATUS=0 - return -} - - -# Run one snapshot test -# $*--Types of test being run -RUNSNAPTEST() -{ - SNAPCMD_OPT="$STANDARD_OPT" # snapshot test option - SRCDIRNAME=${HOSTNAME} - # restore CC, PATH in case they were changed in the last test. - CC="$CC_SAVED" - PATH=$PATH_SAVED - export PATH # DEC OSF1 needs to export PATH explicitly - TEST_TYPE=$* - retcode=0 - skiptest=no - date - PRINT "*** starting $TEST_TYPE tests in $HOSTNAME ***" - PRINT "Uname -a: `uname -a`" - - # Parse the test type and set options accordingly. - # See comments of SNAPTEST_CONFIG_PARSE(). - while [ $# -gt 0 ]; do - case $1 in - -n32) # want -n32 option - SRCDIRNAME=${SRCDIRNAME}-n32 - CC="cc -n32" - export CC - ;; - -64) # want -64 option - SRCDIRNAME=${SRCDIRNAME}-64 - CC="cc -64" - export CC - ;; - parallel) # want parallel test - SNAPCMD_OPT="$SNAPCMD_OPT $ENABLE_PARALLEL" - SRCDIRNAME=${SRCDIRNAME}-pp - ;; - standard) # standard test - ;; - --*) - # option for configure - SNAPCMD_OPT="$SNAPCMD_OPT $1" - ;; - op-configure) - # option for configure - SNAPCMD_OPT="$SNAPCMD_OPT $1 $2" - shift - ;; - op-snapshot) - # option for snapshot - shift - SNAPCMD_OPT="$SNAPCMD_OPT $1" - ;; - setenv) - # pass them along to snapshot set environment variable - shift - SNAPCMD_OPT="$SNAPCMD_OPT setenv $1 $2" - shift - ;; - setenvN) - # set environment variable with $1 values - # e.g., setenvN 3 x a b c is same as setenv x="a b c". - # pass them along to snapshot set environment variable - shift - envN=$1 - shift - envname=$1 - SNAPCMD_OPT="$SNAPCMD_OPT setenvN $envN $envname" - envalue= - while test $envN -gt 0; do - shift - envalue="$envalue $1" - envN=`expr $envN - 1` - done - SNAPCMD_OPT="$SNAPCMD_OPT $envalue" - ;; - skip) - # skip this test - skiptest=yes - ;; - srcdirname) - # Use this before using parallel and -n32 since this overrides - # the others. - shift - SRCDIRNAME=$1 - ;; - deploy) - # deploy the built binary. - shift - SNAPCMD_OPT="$SNAPCMD_OPT deploy $1" - ;; - deploydir) - # default directory for deployment. - shift - SNAPCMD_OPT="$SNAPCMD_OPT deploydir $1" - ;; - *) # unknown test - PRINT "$0: unknown type of test ($1)" - retcode=1 - ;; - esac - shift - done - - if [ $retcode -ne 0 -o $skiptest = yes ]; then - errcode=$retcode - return $retcode - fi - - # Track down the zlib software - ans=`$SNAPYARD/current/bin/locate_sw zlib` - if [ $? = 0 ]; then - Z_INC=`echo $ans | cut -f1 -d,` - Z_LIB=`echo $ans | cut -f2 -d,` - SNAPCMD_OPT="$SNAPCMD_OPT zlib $Z_INC,$Z_LIB" - else - # cannot locate zlib software. - # continue the test, maybe configure can find it. - : - fi - - if [ -n "${SRCDIRNAME}" ]; then - SNAPCMD_OPT="$SNAPCMD_OPT srcdirname ${SRCDIRNAME}" - fi - - # Setup log file name to save test output - THIS_MINUTE=`date +%H%M` - LOGFILE=${LOGBASENAME}/${SRCDIRNAME}_${TODAY}_${THIS_MINUTE} - PRINT "Running snapshot with output saved in" - PRINT " $LOGFILE" - (date; PRINT Hostname=$HOSTNAME) >> $LOGFILE - - ( - cd $SNAPYARD/current - $SNAPSHOT $SNAPCMD $SNAPCMD_OPT - ) >> $LOGFILE 2>&1 - retcode=$? - [ $retcode -ne 0 ] && errcode=$retcode - - date >> $LOGFILE - if [ $retcode -ne 0 ]; then - # Dump the first 10 lines and the last 30 lines of the LOGFILE. - ( ntail=30 - echo ========================= - echo "Dumping logfile of ${HOSTNAME}: $TEST_TYPE" - echo "Last $ntail lines of $LOGFILE" - echo ========================= - tail -$ntail $LOGFILE - echo ========================= - echo Dumping done - echo ========================= - echo "" - ) >> $FAILEDDETAIL - fi -} - -TIMELIMIT_PARSE() -{ - # Function returns timeparam for timekeeper via standard out - - # any debug statements should be 'echo "Debug string" >&2' or timekeeper - # will declare timeparam to be non-numeric and ignore it. - while read x y ; do - # Scan for entry for this weekday. - xd=`echo $x | cut -f1 -d/` - if [ "$xd" = ${WEEKDAY} ]; then - # strip away the weekday/ part. - timeparam=`echo $x | cut -f2 -d/` - break - fi - case "$x" in - '' | '#'*) - # blank or comment lines. Continue. - ;; - ???/*) - # Ignore any entry not of this weekday. - ;; - *) - timeparam="$x" - ;; - esac - done - echo $timeparam - return -} - -# configuration parsing. -# Taking configuration from input. -# This should be invoke with configure file as stdin. -# Syntax of the configure file: -# All lines started with the # are comment lines and are ignored. -# Blank lines are ignored too. -# Each config line starts with a "Scope" followed by test types. -# -# Scope can be: -# standard ... # what the standard test types are. -# <host>: <test> Do <test> for <host> -# all: <test> Do <test> for all hosts. -# <weekday>/... Use this scope if the <weekday> matches. -# <weekday> can be {Mon,Tue,Wed,Thu,Fri,Sat,Sun} -# If no <host>: input for a <host>, the standard test is used. -# -# Test types: -# standard tests defined in standard scope. -# -n32 -n32 mode. Apply to 64/32 bit OS such as IRIX64. -# parallel parallel mode. -# op-configure <option> configure option -# op-snapshot <option> snapshot option -# --* configure option -# setenv <name> <value> set environment variable <name> to <value> -# Pass along to snapshot -# setenvN <N> <name> <value> ... -# set environment variable with <N> values -# e.g., setenvN 3 x a b c is same as setenv x="a b c". -# Pass along to snapshot. -# skip skip this test -# srcdirname <name> use <name> as the build-directory. -# deploy <name> deploy the built binary at directory <name>. -# deploydir <name> use <name> as the default directory for deployment. -SNAPTEST_CONFIG_PARSE() -{ - while read x y ; do - # Scan for entry for this weekday. - xd=`echo $x | cut -f1 -d/` - if [ "$xd" = ${WEEKDAY} ]; then - # strip away the weekday/ part. - x=`echo $x | cut -f2 -d/` - fi - case "$x" in - '' | '#'*) - # blank or comment lines. Continue. - ;; - ???/*) - # Ignore any entry not of this weekday. - ;; - standard) - #standard configuration - STANDARD_OPT="$y" - ;; - all: | ${CONFIGNAME}:) - # types of test for all hosts or this host - if [ -n "$TEST_TYPES" ]; then - TEST_TYPES="$TEST_TYPES ; $y" - else - TEST_TYPES="$y" - fi - ;; - *:) # ignore types of test for other hosts - ;; - *) # unknown configuration option - PRINT $x $y - PRINT "***Unknown configuration option. Ignored.***" - ;; - esac - done -} - -# Snap Test configuration parsing. -# If TEST_TYPES is not set, set it to do the "standard" test. -SNAPTEST_CONFIG() -{ - TEST_TYPES= - STANDARD_OPT= - if [ -f $SNAPTESTCFG ]; then - SNAPTEST_CONFIG_PARSE < $SNAPTESTCFG - fi - TEST_TYPES=${TEST_TYPES:-'standard'} -} - - -# Show usage page -USAGE() -{ -cat <<EOF -Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [-nodiff] [<host> ...] - -h - print this help page - -debug - turn on debug mode - -r<version> - do runtest for <version> - -all - launch tests for all pre-defined testing hosts - -nocvs - do not do cvs commands - -nodiff - do not do diff commands - -setup - setup the directory structure for snapshot test - -configname <name> - use <name> as hostname in the parsing of the snaptest configure file - <host> - launch tests for <host> - --all and <host> are contradictory and whichever is specified last, is -the one to take effect. If neither are given, do the test for the -local host. -EOF -} - - -# Verify if directory ($1) exists. If not, create it. -CHECK_DIR() -{ - dir=$1 - if test ! -e $1; then - echo mkdir $1 - mkdir $1 - errcode=$? - elif test ! -d $1; then - echo $1 is not a directory - errcode=1 - fi -} - - -################################# -# Main -################################# -################################# -# Set up global variables -################################# -retcode=0 # error code of individula task -errcode=0 # error code of the whole test -skiptest=no # if test is skipped -CC_SAVED="$CC" # CC & PATH maybe changed within a test. -PATH_SAVED=$PATH # These save the original values. -timelimit=300 # default time limit (minutes) for the timekeeper - -################################# -# Parse options -################################# -while [ $# -gt 0 ]; do - case "$1" in - -h) # help--show usage - USAGE - exit 0 - ;; - -debug*) - # set debug mode - DEBUGMODE="$1" - SNAPSHOT="echo bin/snapshot" - PROGNAME="$PROGNAME $DEBUGMODE" - PRINT "******** DEBUGMODE is $DEBUGMODE ************" - ;; - -r*) - # version string - H5VER="$1" - ;; - -all) - # Test all hosts. - TESTHOST=-all - ;; - -nocvs) - # do not do cvs commands. - NOCVS=nocvs - ;; - -nodiff) - # do not do diff commands. - NODIFF=nodiff - ;; - -configname) - # use <name> as hostname in the parsing of the snaptest configure file. - shift - CONFIGNAME=$1 - ;; - -setup) - # setup the directory structure for snapshot test. - CMD=setup - ;; - -*) # Unknown option - PRINT "Unknown option ($1)" - USAGE - exit 1 - ;; - *) - TESTHOST=$* - break - ;; - esac - shift -done - -# setup H5VER if not set yet -if [ -z "$H5VER" -a -f bin/snapshot_version ] -then - . bin/snapshot_version -fi - -if [ -n "$H5VER" ] -then - H5VERSION=hdf5_`echo $H5VER | sed -e s/-r// -e s/\\\./_/g` - PROGNAME="$PROGNAME $H5VER" -else - H5VERSION=hdf5 -fi - -################################# -# Setup snapshot test directories -################################# -BASEDIR=${HOME}/snapshots-${H5VERSION} -# initial processing of setup option if requested -if test x-$CMD = x-setup; then - CHECK_DIR $BASEDIR - test $errcode -ne 0 && exit 1 -elif [ ! -d ${BASEDIR} ]; then - echo "BASEDIR ($BASEDIR) does not exist" - exit 1 -fi -# Show the real physical path rather than the symbolic path -SNAPYARD=`cd $BASEDIR && /bin/pwd` -# Log file basename -LOGDIR=${SNAPYARD}/log -LOGBASENAME=${LOGDIR} -PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY} -FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY} -FAILEDDETAIL=${LOGDIR}/FAILED_DETAIL_${TODAY} -SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY} -TIMELOG=${LOGDIR}/TIME_LOG_${TODAY} -TIMEKEEPERLOG=${LOGDIR}/TIMEKEEPER_LOG_${TODAY} -CVSLOG=${LOGDIR}/CVS_LOG_${TODAY} -CVSLOG_LOCK=${LOGDIR}/CVS_LOG_LOCK_${TODAY} -DIFFLOG=${LOGDIR}/DIFF_LOG_${TODAY} -COPYRIGHT_ERR=${LOGDIR}/COPYRIGHT_ERR_${TODAY} -# Snap Test hosts and Configuration files -ALLHOSTSFILE=${SNAPYARD}/allhostfile -SNAPTESTCFG=${SNAPYARD}/snaptest.cfg -TIMELIMIT=${SNAPYARD}/timelimit -TMPFILE="${LOGDIR}/#runtest.${TODAY}.$$" - -# more processing of setup option if requested -if test x-$CMD = x-setup; then - CHECK_DIR $LOGDIR - test $errcode -ne 0 && exit 1 - CHECK_DIR $LOGDIR/OLD - test $errcode -ne 0 && exit 1 - CHECK_DIR $SNAPYARD/TestDir - test $errcode -ne 0 && exit 1 - # create empty test hosts or configure files if non-existing - for f in $ALLHOSTSFILE $SNAPTESTCFG; do - if test ! -f $f; then - echo Creating $f - touch $f - fi - done - # create or update the current source. - echo update current source - $SNAPSHOT checkout - # setup completed. Exit. - exit 0 -fi - -################################# -# Show some host status numbers -################################# -# df sometimes hangs due to file system problems. Invoke it as background -# process and give it 10 seconds to finish. If it hangs, just continue. -uptime -df & -sleep 10 - -################################# -# Setup test host(s) -################################# -if [ "$TESTHOST" = -all ]; then - if [ -f $ALLHOSTSFILE ]; then - TESTHOST=`sed -e '/^#/d;/^ *$/d' $ALLHOSTSFILE` - else - PRINT "could not access the all-hosts-file ($ALLHOSTSFILE)" - USAGE - exit 1 - fi -fi - - -################################# -# Setup to print a trailer summary when exiting not via -# the normal end of the script. -################################# -trap PRINT_TRAILER 0 - -# -TotalStartTime=`SecOfDay` - -# Process the configuration -SNAPTEST_CONFIG -PRINT STANDARD_OPT=$STANDARD_OPT -PRINT TEST_TYPES=$TEST_TYPES -PRINT_BLANK - -# Do a checkout if one has not been done today. -# Then check MANIFEST file and copyrights noitces. -if [ -z "$NOCVS" ]; then - PRINT "Running CVS checkout with output saved in" - PRINT " $CVSLOG" - # Set CVS lock first - touch $CVSLOG_LOCK - ($SNAPSHOT checkout ) >> $CVSLOG 2>&1 - # Save error code and remove the lock - errcode=$? - rm -f $CVSLOG_LOCK - if [ $errcode -ne 0 ]; then - # test failed. - REPORT_ERR "****FAILED ${HOSTNAME}: CVS checkout****" - exit $errcode - fi - # =================== - # Check MANIFEST file - # =================== - PRINT Checking MAINFEST file ... - (cd $SNAPYARD/current; bin/chkmanifest) > $TMPFILE 2>&1 - errcode=$? - if [ $errcode -eq 0 ]; then - # test passed. - cat $TMPFILE - else - # test failed. - REPORT_ERR "****FAILED ${HOSTNAME}: MANIFEST check****" - ( echo ========================= - echo "MANIFEST checking failed output" - echo ========================= - cat $TMPFILE - echo ========================= - echo "MANIFEST checking failed output done" - echo ========================= - echo "" - ) >> $FAILEDDETAIL - fi - rm $TMPFILE - PRINT_BLANK - # No copyright checking until what need copyright is decided. 2006/4/7. - if false; then - # ====================== - # Check Copyright notice - # ====================== - PRINT Checking Copyrights notices ... - if (cd $SNAPYARD/current; bin/chkcopyright) > $TMPFILE 2>&1 ; then - echo Passed. - else - # Save the output and report some of it. - # Do not report it as failed for runtest yet. - # Send a separate report mail via hardcoding. - # Need fixes/cleanup later. - echo "Failed. See detail in another report mail" - cp $TMPFILE $COPYRIGHT_ERR - nheadlines=300 - ntaillines=5 # Number of lines in report summary. - ( - echo ========================= - echo "Copyright checking failed. Showing first $nheadlines lines of output." - echo "Complete output is in file $COPYRIGHT_ERR" - echo ========================= - nreportlines=`wc -l < $COPYRIGHT_ERR` - if [ $nreportlines -le `expr $nheadlines + $ntaillines` ]; then - # Just print the whole file. - cat $COPYRIGHT_ERR - else - # Show the first $nheadlines plus report summary - head -$nheadlines $COPYRIGHT_ERR - echo ... - tail -$ntaillines $COPYRIGHT_ERR - fi - ) | Mail -s "${H5VERSION} Copyrights check Failed" hdf5lib - fi - rm $TMPFILE - PRINT_BLANK - fi -else - # make sure the cvs update, if done by another host, has completed. - # First wait for the presence of $CVSLOG which signals some host - # has started the cvs update. Then wait for the absence of $CVSLOG_LOCK - # which signals the host has completed the cvs update. - WAITFOR $CVSLOG 90 - if [ $WAIT_STATUS -ne 0 ]; then - errcode=$WAIT_STATUS - REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to start****" - exit $errcode - fi - WAITTILL $CVSLOG_LOCK 10 - if [ $WAIT_STATUS -ne 0 ]; then - errcode=$WAIT_STATUS - REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to finish****" - exit $errcode - fi -fi - -# run a snapshot diff to see if any significant differences between -# the current and previous versions -if [ -z "$NODIFF" ]; then - $SNAPSHOT diff >> $DIFFLOG 2>&1 - errcode=$? - # check the errcode only if NOT in DEBUG MODE - if [ -z "$DEBUGMODE" -a $errcode -eq 0 ]; then - # no need to run test - PRINT "NO TEST: no significant differences between current and previous versions" | - tee -a $PASSEDLOG - exit 0 - fi -fi - -# we can use the version of script in SNAPYARD/current now. -# Don't do the diff or cvs update any more. -PROGNAME="$SNAPYARD/current/$PROGNAME -nodiff -nocvs" - -# Decide to do test for the local host or for remote hosts -if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then - date - PRINT "*** launching tests from $HOSTNAME ***" - PRINT_BLANK - TEST_TYPE="launching" - cd ${SNAPYARD}/log - # Fork off timekeeper if concurrent tests will be used. - if [ -n "$SRCDIR" ]; then - timelimit=`TIMELIMIT_PARSE < $TIMELIMIT` - ($SNAPYARD/current/bin/timekeeper $timelimit > $TIMEKEEPERLOG 2>&1 &) - PRINT " Fork off timekeeper $timelimit" - fi - runtest_type="hosts" - for h in $TESTHOST; do - # Must do CONFIGNAME before $h got changed by the second cut. - # cut returns the whole string if there is no / in the string - # at all. But that works okay for the CONFIGNAME too. - CONFIGNAME=`echo $h | cut -f2 -d/` - h=`echo $h | cut -f1 -d/` - n_test=`expr $n_test + 1` - TMP_OUTPUT="#${h}_${CONFIGNAME}.out" - (PRINT "==============" - PRINT "Testing $h" - PRINT "==============") > $TMP_OUTPUT - CHECK_RSH $h - # run the remote shell command with output to $TMP_OUTPUT - case "$RSH" in - rsh|ssh) - CMD="$RSH $h -n $PROGNAME -configname $CONFIGNAME" - PRINT $CMD - - # launch concurrent tests only if srcdir is used - if [ -n "$SRCDIR" ]; then - $CMD || REPORT_ERR "****FAILED ${h}: Abnormal exit from runtest****" && PRINT_BLANK & - echo $! > PID.${h}_${CONFIGNAME} - else - $CMD || REPORT_ERR "****FAILED ${h}: Abnormal exit from runtest****" && PRINT_BLANK - fi - ;; - NoRemoteCommand) - PRINT $h does not accept Remote Command "(`date`)" - ;; - NotReachable) - PRINT $h is not reachable "(`date`)" - ;; - *) - PRINT "CHECK_RSH for $h returned unknown result ($RSH)" - ;; - esac >> $TMP_OUTPUT 2>&1 - done - # wait for all launched tests to finish, then cat them back out. - wait - # Pause a moment in case the timekeeper is terminating processes. - wait 30 - for h in $TESTHOST; do - CONFIGNAME=`echo $h | cut -f2 -d/` - h=`echo $h | cut -f1 -d/` - TMP_OUTPUT="#${h}_${CONFIGNAME}.out" - cat $TMP_OUTPUT - # Verify test script did complete by checking the last lines - (tail -5 $TMP_OUTPUT | grep -s 'Grand total' > /dev/null 2>&1) || - (REPORT_ERR "****FAILED ${h}: snaptest did not complete****" && - PRINT_BLANK) - rm -f $TMP_OUTPUT PID.${h}_${CONFIGNAME} - done - exit 0 -fi - -# run the test(s) -# Note that first field is cut without -s but all subsequent cut -# must use -s. If -s is not used at all, a $TEST_TYPES that has -# no ';' (only 1 test), will pass through intact in all cut. That -# results in infinite looping. -# If -s is used with the first field, it will suppress completely -# a $TYPE_TYPES that has no ';' (only 1 tst ). That results in no -# test at all. -# Note that n_test must start as 1. -# -n_test=1 -runtest_type="tests" -TEST="`echo $TEST_TYPES | cut -f$n_test -d';'`" -while [ -n "$TEST" ]; do - StartTime=`SecOfDay` - RUNSNAPTEST $TEST - REPORT_RESULT - PRINT_TEST_TRAILER - - n_test=`expr $n_test + 1` - TEST="`echo $TEST_TYPES | cut -f$n_test -s -d';'`" -done -# dec n_test to show the actual number of tests ran. -n_test=`expr $n_test - 1` - -PRINT_TRAILER - -# disable trailer summary printing since all trailers have been -# printed and we are exiting normally. -trap 0 -exit $errcode diff --git a/bin/snapshot b/bin/snapshot deleted file mode 100755 index 7fcf3ab..0000000 --- a/bin/snapshot +++ /dev/null @@ -1,837 +0,0 @@ -#!/bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# This script should be run nightly from cron. It checks out the source -# from the source repository and compares it against the previous -# snapshot. If anything significant changed then a new snapshot is -# created, the minor version number is incremented, and the change is -# checked back into the source repository. -# - - -# function definitions -TIMESTAMP() -{ - echo "=====" "$1": "`date`" "=====" -} - -EXIT_BANNER() -{ - TIMESTAMP "Exit $PROGNAME with status=$?" -} - -# Show current total disk usage. -DISKUSAGE() -{ - du -ks | \ - ( read x y; echo "Disk Usage=$x KB" ) -} - -# function provided for testing software downloaded as tar files. A version of -# this function that properly extracts the downloaded files can be provided in -# the snapshots-${sw}-overrides file. -EXTRACT() -{ - echo "Error: ${SWVERSION} is in source repository - does not need extraction." -} - -# Standard procedure for checking out or updating source code from an hdfgroup -# git repository. Override the function for other repositories or procedures. -SOURCE_CHECKOUT() -{ - if test -n $GIT_URL; then - if [ -n "$AUTOGEN" ]; then - echo "Creating fresh clone of $GIT_URL in $BASEDIR/current_src" - # Check out the current version from source repository. - (cd $BASEDIR; rm -rf current_src - if test -z $GIT_BRANCH; then - echo "Testing empty branch $GIT_BRANCH." - git clone $GIT_URL current_src - else - echo "Testing branch $GIT_BRANCH." - git clone $GIT_URL -b $GIT_BRANCH current_src - fi - ) || exit 1 - else - echo "Creating fresh clone of $GIT_URL in $BASEDIR/current" - # Check out the current version from source repository. - (cd $BASEDIR; rm -rf current - if test -n $GIT_BRANCH; then - git clone $GIT_URL -b $GIT_BRANCH current - else - git clone $GIT_URL current - fi ) || exit 1 - fi - else - echo "Warning! Source directory ("current") is not checked out from git." - fi -} - -# Standard procedure for running the configure command in a build (test) -# directory -RUNCONFIGURE() -{ - if [ "${CURRENT}" != "${TESTDIR}" -a "$CPSRC" = "yes" ]; then - echo "Copying source files to ${TESTDIR}." - cp -pr ${CURRENT}/* ${TESTDIR} - cd ${TESTDIR} - ./${CONFIGURE} - elif [ -n "${AUTOGEN}" ]; then - ${CURRENTSRC}/${CONFIGURE} - else - ${CURRENT}/${CONFIGURE} - fi -} - -# Sometimes "make distclean" doesn't adequately remove files from the previous -# build. If a build (test) directory was used, its contents can be entirely -# deleted to provide a clean start. If the test is building in the source -# directory, the contents can't be deleted, so run "make distclean". -DISTCLEAN() -{ - if [ "${srcdir}" = "yes" -a -n "${SRCDIRNAME}" -a -d ${BASEDIR}/TestDir/${SRCDIRNAME} ]; then - echo "Remove contents of $SRCDIRNAME.\n" - rm -rf ${BASEDIR}/TestDir/${SRCDIRNAME}/* - else - echo "$MAKE distclean" - (cd ${TESTDIR} && ${MAKE} distclean) - fi -} - -# Several of the software packages tested do not support make check-install. -# Those that support it should have a version of this function in their -# override with the following lines: -# TIMESTAMP "check-install $1" -# ${MAKE} check-install $1 -CHECKINSTALL() -{ - echo "check-install is not supported for ${SWVERSION}" -} - -# Function for hdf4 and hdf5 to override to check in changes after snapshot. -# Safety measure to avoid unintended checkins to other repositories. -COMMITSNAPSHOT() -{ - echo "original hdf5 script committed code changes back into git." -} - -DISPLAYUSAGE() -{ - set - - cat <<EOF -Usage: $PROGNAME [all] [checkout] [ftp <URL> [diff] [test] [srcdir] [release] [help] - [clean] [distclean] [echo] [deploy <dir>] [deploydir <dir>] - [zlib <zlib_path>] [releasedir <dir>] [srcdirname <dir>] [check-vfd] - [check-passthrough-vol] - [exec <command>] [module-load <module-list>] [op-configure <option>] - [--<option>] - all: Run all commands (checkout, test & release) - [Default is all] - checkout: Run source checkout - diff: Run diff on current and previous versions. Exit 0 if - no significant differences are found. Otherwise, non-zero. - deploy: deploy binary to directory <dir> - deploydir: use <dir> as the default directory for deployment - test: Run test - release: Run release - clean: Run make clean - distclean:Run make distclean - echo: Turn on echo mode (set -x) - setenv <name> <value>: - Set environment variable <name> to <value>. - setenvN <N> <name> <value> ...: - Set environment variable with <N> values. - E.g., setenvN 3 x a b c is same as setenv x="a b c". - srcdir: Use srcdir option (does not imply other commands) - "snapshot srcdir" is equivalent to "snapshot srcdir all" - "snapshot srcdir checkout" is equivalent to "snapshot checkout" - srcdirname <dir>: - Use <dir> as the srcdir testing directory if srcdir is chosen. - If <dir> starts with '-', it is append to the default name - E.g., "snapshot srcdir srcdirname -xx" uses hostname-xx - [Default is hostname] - help: Print this message - echo: Turn on shell echo - zlib <zlib_path>: - Use <zlib_path> as the ZLIB locations - [Default is $ZLIB_default] - releasedir <dir>: - Use <dir> as the release directory - [Default is $ReleaseDir_default] - check-vfd: - Run make check-vfd instead of just make check. - check-passthrough-vol: - Run make check-passthrough-vol instead of just make check. - NOTE: Will only succeed with passthrough VOL connectors - that use the native VOL connector as the terminal - connector. - exttest <testscript>; - Run testscript; - exec <command>: - Run <command>; - module-load <module-list>: - Load modules in comma-separated <module-list>; - op-configure <option>: - Pass <option> to the configure command - E.g., "snapshot op-configure --enable-parallel" - configures for parallel mode - --<option>: - Pass --<option> to the configure command - E.g., "snapshot --enable-parallel" - configures for parallel mode -EOF - exit $errcode -} - -# MAIN -# SGI /bin/sh replaces $0 as function name if used in a function. -# Set the name here to avoid that ambiguity and better style too. -PROGNAME=$0 -SNAPSHOTNAME= -HDFREPOS= -DOCVERSION="" -MODULELIST="" - -if [ -f bin/snapshot_params ]; then - . bin/snapshot_params - echo "Added snapshot_params." -fi -if [ -z "$SWVER" -a -f bin/snapshot_version ] -then - . bin/snapshot_version - echo "Added snapshot_version." -fi -if [ -n ${HDFREPOS} -a -f bin/snapshot-${HDFREPOS}-overrides ]; then - . bin/snapshot-${HDFREPOS}-overrides - echo "Added snapshot-${HDFREPOS}-overrides." -fi - -echo "=====================================" -echo "$PROGNAME $*" -echo "=====================================" -TIMESTAMP MAIN -uname -a - -# setup exit banner message -trap EXIT_BANNER 0 1 2 9 15 - -# Dump environment variables before option parsing -echo ===Dumping environment variables before option parsing === -printenv | sort -echo ===Done Dumping environment variables before option parsing === - -# snapshots release directory. Default relative to $BASEDIR. -ReleaseDir_default=release_dir - -# Where is the zlib library? -# At NCSA, half of the machines have it in /usr/lib, the other half at -# /usr/ncsa/lib. Leave it unset. -ZLIB_default= -ZLIB=$ZLIB_default - -# What compression methods to use? (md5 does checksum). Doc was apparently -# added as a compression method to create a separate tarfile containing the -# documentation files for v 1.8 and above. -if [ "${SWVERSION}" = "hdf5_1_6" ]; then - METHODS="gzip bzip2 md5" -else - METHODS="gzip bzip2 doc" -fi - -# Use User's MAKE if set. Else use generic make. -MAKE=${MAKE:-make} - -# Default check action. -CHECKVAL=check - -# -# Command options -cmd="all" -test_opt="" -errcode=0 -AUTOGEN="" -EXTTEST="" -EXEC_CMD_ARG="" -while [ $# -gt 0 ] ; do - case "$1" in - all) - cmd="all" - ;; - checkout-autogen) - cmdcheckout="checkout" - AUTOGEN="autogen" - cmd="" - ;; - checkout) - cmdcheckout="checkout" - cmd="" - ;; - ftp) - echo "Setting ftp flags in snapshot script" - cmdcheckout="checkout" - cmdftp="ftp" - cmd="" - shift - if [ $# -lt 1 ]; then - echo "URL missing" - errcode=1 - cmd="help" - break - fi - ftp_url="$1" - echo "ftp_url is $ftp_url" - ;; - diff) - cmddiff="diff" - cmd="" - ;; - deploy) - # deploy the built binary. - shift - if [ $# -lt 1 ]; then - echo "deploy <dir> missing" - errcode=1 - cmd="help" - break - fi - cmddeploy="deploy" - DEPLOYDIRNAME="$1" - ;; - deploydir) - # default directory for deployment. - shift - if [ $# -lt 1 ]; then - echo "deploydir <dir> missing" - errcode=1 - cmd="help" - break - fi - deploydir="$1" - ;; - test) - cmdtest="test" - cmd="" - ;; - setenv) - # set environment variable - shift - eval $1="$2" - export $1 - shift - ;; - setenvN) - # set environment variable with $1 values - # e.g., setenvN 3 x a b c is same as setenv x="a b c". - # a kludge now--the extra single quotes are needed - # else eval complains. - shift - envN=$1 - shift - envname=$1 - envalue= - while test $envN -gt 0; do - shift - envalue="$envalue $1" - envN=`expr $envN - 1` - done - eval $envname="'$envalue'" - export $envname - ;; - srcdir) - #use srcdir option for test - srcdir="yes" - ;; - srcdirname) - shift - if [ $# -lt 1 ]; then - echo "srcdirname <dir> missing" - errcode=1 - cmd="help" - break - fi - SRCDIRNAME="$1" - ;; - release) - cmdrel="release" - cmd="" - ;; - autogen-release) - cmdrel="autogen-release" - cmd="" - ;; - clean | distclean) - cmdclean="$1" - cmd="" - ;; - help) - cmd="help" - break - ;; - echo) - set -x - break - ;; - zlib) - shift - if [ $# -lt 1 ]; then - echo "ZLIB information missing" - errcode=1 - cmd="help" - break - fi - ZLIB="$1" - ;; - releasedir) - shift - if [ $# -lt 1 ]; then - echo "Release directory name missing" - errcode=1 - cmd="help" - break - fi - ReleaseDir="$1" - ;; - exttest) - shift - if [ $# -lt 1 ]; then - echo "exttest script name missing" - errcode=1 - cmd="help" - break - fi - cmd="" - EXTTEST="$1" - ;; - exec) - shift - if [ $# -lt 1 ]; then - echo "exec command name missing" - errcode=1 - cmd="help" - break - fi - cmd="" - EXEC_CMD_ARG="$@" - # exit the parsing while loop since all arguments have been consumed. - break - ;; - check-vfd) - CHECKVAL=check-vfd - ;; - check-passthrough-vol) - CHECKVAL=check-passthrough-vol - ;; - module-load) - shift - if [ $# -lt 1 ]; then - echo "missing module list to load" - errcode=1 - cmd="help" - break - fi - MODULELIST="$1" - ;; - --*) - OP_CONFIGURE="$OP_CONFIGURE $1" - ;; - op-configure) - shift - if [ $# -lt 1 ]; then - echo "op-configure option missing" - errcode=1 - cmd="help" - break - fi - OP_CONFIGURE="$OP_CONFIGURE $1" - ;; - *) - echo "Unknown option $1" - errcode=1 - cmd="help" - break - ;; - esac - shift -done - -if [ -n "$MODULELIST" ]; then - . ~/.bashrc - module use /opt/pkgs/modules/all - # load module command will take a space separated list of modules. - # If we have a comma separated list, convert ',' to ' '. - MODULELIST="$( echo -e "$MODULELIST" | tr ',' ' ' )" - module load $MODULELIST -fi - -# Dump environment variables after option parsing -echo ===Dumping environment variables after option parsing === -printenv | sort -echo ===Done Dumping environment variables after option parsing === - -if [ "$cmd" = help ]; then - DISPLAYUSAGE -fi - -# Setup the proper configure option (--with-zlib) to use zlib library -# provide ZLIB is non-empty. -ZLIB=${ZLIB:+"--with-zlib="$ZLIB} -# Adding --prefix as a configure option will put the path to the deploy -# directory in the initial libhdf5*.la files -if [ -n "$DEPLOYDIRNAME" ]; then - OP_CONFIGURE="$OP_CONFIGURE --prefix=${deploydir}/${DEPLOYDIRNAME}" -fi -CONFIGURE="configure $OP_CONFIGURE" -# echo "Configure command is $CONFIGURE" - -# Execute the requests -snapshot=yes - -BASEDIR=${HOME}/snapshots-${SNAPSHOTNAME} -if [ ! -d ${BASEDIR} ]; then - echo "BASEDIR ($BASEDIR) does not exist" - exit 1 -fi - -CURRENT=${BASEDIR}/current -PREVIOUS=${BASEDIR}/previous -ReleaseDir=${ReleaseDir:=${BASEDIR}/${ReleaseDir_default}} -HOSTNAME=`hostname | cut -f1 -d.` # no domain part - -# Try finding a version of diff that supports the -I option too. -DIFF=diff -for d in `echo $PATH | sed -e 's/:/ /g'` ; do - test -x $d/diff && $d/diff -I XYZ /dev/null /dev/null > /dev/null 2>&1 && - DIFF=$d/diff && break -done - -#============================= -# Run source checkout -#============================= -if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then - TIMESTAMP "checkout" - # ${BASEDIR}/bin is now updated from git by EveningMaint or DailyMaint - # to avoid updating the scripts in ${BASEDIR}/bin while they are running. - - if [ -z "$AUTOGEN" ]; then - # If there is a Makefile in ${CURRENT}, the last test done in it - # has not been distclean'ed. They would interfere with other - # --srcdir build since make considers the files in ${CURRENT} - # take precedence over files in its own build-directory. Run - # a "make distclean" to clean them all out. This is not really - # part of the "checkout" functions but this is the most convenient - # spot to do the distclean. We will also continue the checkout process - # regardless of the return code of distclean. - ( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean) - fi - # echo "cmdftp is $cmdftp; ftp_url is $ftp_url" - if [ -n "$cmdftp" ]; then - echo "Get the NetCDF4 source from their ftp server." - echo "Command executed is: 2>&1 wget -N $ftp_url" - cd ${BASEDIR}; - WGET_OUTPUT="`2>&1 wget -N $ftp_url`" - errcode=$? - if [[ $errcode -ne 0 ]]; then - exit $errcode - fi - - if [ $? -ne 0 ];then - echo $0: "$WGET_OUTPUT" Exiting. - exit 1 - fi - - # echo "Wget output was $WGET_OUTPUT" - - if echo "$WGET_OUTPUT" | fgrep 'not retrieving' &> /dev/null - then - echo "Snapshot unchanged" - else - echo "New snapshot downloaded" - EXTRACT - fi - else - SOURCE_CHECKOUT - fi -fi # Do source checkout - - -#============================= -# Run Test the HDF5 library -#============================= -if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then - TIMESTAMP "Run Tests" - # setup if srcdir is used. - if [ -z "$srcdir" ]; then - TESTDIR=${CURRENT} - else - #create TESTDIR if not exist yet - case "$SRCDIRNAME" in - "") - SRCDIRNAME=$HOSTNAME - ;; - -*) - SRCDIRNAME="$HOSTNAME$SRCDIRNAME" - ;; - esac - TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} - test -d ${TESTDIR} || mkdir ${TESTDIR} - # set TESTDIR to use the direct path to the local test directory - # rather than the path through ${BASEDIR}. - cd ${TESTDIR} - TESTDIR=`pwd -P` - cd ${CURRENT} - fi - # Make sure current version exists and is clean - if [ -d ${TESTDIR} ]; then - DISTCLEAN - else - errcode=$? - snapshot=no - exit $errcode - fi - - # Compare it with the previous version. Compare only files listed in - # the MANIFEST plus the MANIFEST itself. - if [ -d ${PREVIOUS} ]; then - if [ -z "${AUTOGEN}" ]; then - CURRENTSRC=${CURRENT} - else - CURRENTSRC=${BASEDIR}/current_src - fi - if (${DIFF} -c ${PREVIOUS}/MANIFEST ${CURRENTSRC}/MANIFEST); then - snapshot=no - for src in `grep '^\.' ${CURRENTSRC}/MANIFEST|expand|cut -f1 -d' '`; do - if ${DIFF} -I H5_VERS_RELEASE -I " released on " \ - -I " currently under development" \ - ${PREVIOUS}/$src ${CURRENTSRC}/$src - then - : #continue - else - snapshot=yes - break - fi - done - fi - fi - - # if diff is chosen, exit 0 if no significant differences are found. - # otherwise, exit 1. This includes cases of other failures. - if [ -n "$cmddiff" ]; then - if [ $snapshot = no ]; then - exit 0 - else - exit 1 - fi - fi - - #============================= - # Execute command if defined - #============================= - #echo BEFORE EXEC command - #echo EXEC_CMD_ARG=${EXEC_CMD_ARG} - - if [ -n "$EXEC_CMD_ARG" ]; then - TIMESTAMP ${EXEC_CMD_ARG} - TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} - test -d ${TESTDIR} || mkdir ${TESTDIR} - if cd ${TESTDIR}; then - # clean up the directory before executing the command - # Do we need to clean first? - # rm -rf * - # - # If EXEC_CMD_ARG starts with a '/', it has an absolute path, else it is - # relative to the BASEDIR. - case "$EXEC_CMD_ARG" in - /*) - ${EXEC_CMD_ARG} - ;; - *) - ${BASEDIR}/${EXEC_CMD_ARG} - ;; - esac - errcode=$? - else - echo "${TESTDIR} not accessible" - errcode=1 - fi - # exit snapshot since nothing else to do, for now. - exit $errcode - fi - - # Build, run tests and install procedures - if [ "$snapshot" = "yes" ] && [ "$NOMAKE" != "yes" ]; then - FAIL_SECTION="" - if [ -f ${TESTDIR}/failsection ]; then - rm ${TESTDIR}/failsection - fi - if (cd ${TESTDIR} && \ - TIMESTAMP "configure" && echo "configure" > ${TESTDIR}/failsection && \ - RUNCONFIGURE && \ - sleep 2 && \ - TIMESTAMP "make" && echo "make" > ${TESTDIR}/failsection && \ - ${MAKE} && DISKUSAGE \ - TIMESTAMP ${CHECKVAL} && echo "make check" > ${TESTDIR}/failsection && \ - ${MAKE} ${CHECKVAL} && DISKUSAGE \ - TIMESTAMP "install" && echo "make install" > ${TESTDIR}/failsection && \ - ${MAKE} install && DISKUSAGE \ - TIMESTAMP "check-install" && echo "make check-install" > ${TESTDIR}/failsection && \ - CHECKINSTALL && DISKUSAGE \ - TIMESTAMP "uninstall" && echo "make uninstall" > ${TESTDIR}/failsection && \ - ${MAKE} uninstall && DISKUSAGE); then - : - else - errcode=$? - FAIL_SECTION=`cat ${TESTDIR}/failsection` - echo "Failed running ${FAIL_SECTION}" - snapshot=no - exit $errcode - fi - elif [ $CPSRC ]; then - cp -pr ${CURRENT}/* ${TESTDIR} - else - cmdclean="" - fi -fi # Test the HDF5 library - -# Run external test if configured - -#============================= -#============================= -#if [ -d "$CURRENT" ]; then -if [ "$EXTTEST" != "" ]; then - TIMESTAMP ${EXTTEST} - TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} - test -d ${TESTDIR} || mkdir ${TESTDIR} - cd ${TESTDIR} - sleep 1 - TIMESTAMP $pwd - ls - ${BASEDIR}/${EXTTEST} - errcode=$? - exit $errcode -fi - -#============================= -# Run deployment if requested. -#============================= -if [ -n "$DEPLOYDIRNAME" ]; then - # The daily tests deploy to .../hdf5/... or .../hdf4/... except on cobalt where the - # deploy directory is in .../HDF5/... lc will take care of this. If hdf4 or hdf5 - # either upper or lower case isn't in the path, RELEASE.txt won't be found unless - # it is in $CURRENT. - POS4=`perl -e "print index(lc(\"${deploydir}/${DEPLOYDIRNAME}\"), 'hdf4')"` - POS5=`perl -e "print index(lc(\"${deploydir}/${DEPLOYDIRNAME}\"), 'hdf5')"` - if [ "${POS4}" -ge "0" ]; then - RELEASE_TXT_LOC="release_notes" - elif [ "${POS5}" -ge "0" ]; then - RELEASE_TXT_LOC="release_docs" - else - RELEASE_TXT_LOC="" - fi - - if [ "$snapshot" = "yes" ]; then - TIMESTAMP "deploy" - if (cd ${TESTDIR} && - ${BASEDIR}/bin/deploy ${deploydir}/${DEPLOYDIRNAME} && \ - TIMESTAMP "clean" && \ - ${MAKE} clean && \ - TIMESTAMP "check-install prefix=${deploydir}/${DEPLOYDIRNAME}" && \ - CHECKINSTALL prefix=${deploydir}/${DEPLOYDIRNAME}); then - cd ${CURRENT} - cp ${RELEASE_TXT_LOC}/RELEASE.txt ${deploydir}/${DEPLOYDIRNAME} - cp COPYING ${deploydir}/${DEPLOYDIRNAME} - #: #continue - else - errcode=$? - exit $errcode - fi - fi -fi # Deploy - - -#============================= -# Run Release snapshot, update version, and commit to source repository -#============================= -if [ "$cmd" = "all" -o -n "$cmdrel" ]; then - if [ "$snapshot" = "yes" ]; then - TIMESTAMP "release" - DISTCLEAN - ( - # Turn on exit on error in the sub-shell so that it does not - # commit source if errors encounter here. - set -e - if [ "$cmdrel" = "autogen-release" ]; then - cd ${BASEDIR}/current_src - else - cd ${CURRENT} - fi - if [ "$HDFREPOS" = "hdf4" ]; then - RELEASE_VERSION="`perl bin/h4vers -v`" - echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..." - bin/release -d $ReleaseDir $METHODS - perl bin/h4vers -i - elif [ "$HDFREPOS" = "hdf5" ]; then - RELEASE_VERSION="`perl bin/h5vers -v`" - echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..." - if [ "${DOCVERSION}" ]; then - bin/release -d $ReleaseDir --docver ${DOCVERSION} $METHODS - else - bin/release -d $ReleaseDir $METHODS - fi - perl bin/h5vers -i - else - echo "need real release steps. For now, only move current version to previous" - fi - COMMITSNAPSHOT - ) - errcode=$? - fi - - # Replace the previous version with the current version. - # Should check if the errcode of the release process but there - # are other failures after release was done (e.g. h5vers or git failures) - # that should allow the replacement to occur. - rm -rf ${PREVIOUS} - mv ${CURRENT} ${PREVIOUS} -fi #Release snapshot - - -#============================= -# Clean the test area. Default is no clean. -#============================= -if [ -n "$cmdclean" ] && [ "$NOMAKE" != "yes" ]; then - TIMESTAMP "clean" - # setup if srcdir is used. - if [ -z "$srcdir" ]; then - TESTDIR=${CURRENT} - else - case "$SRCDIRNAME" in - "") - SRCDIRNAME=$HOSTNAME - ;; - -*) - SRCDIRNAME="$HOSTNAME$SRCDIRNAME" - ;; - esac - TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} - fi - # clean it - if (cd ${TESTDIR} && ${MAKE} $cmdclean ) then - : - else - errcode=$? - snapshot=no - exit $errcode - fi -fi # Clean the Test directory - -exit $errcode diff --git a/bin/snapshot_version b/bin/snapshot_version deleted file mode 100644 index da2e190..0000000 --- a/bin/snapshot_version +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -# default version for snapshot test -# H5VERSION matches with a source version symbolic name. Will test use the -# latest revision of that branch. If set to "hdf5", it uses the main -# version. -# H5VER tells runtest which version to run -H5VERSION=hdf5 diff --git a/bin/timekeeper b/bin/timekeeper deleted file mode 100755 index 03bc8d5..0000000 --- a/bin/timekeeper +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh -## -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -# As a time keeper of the remote daily test process launched by runtest. -# It sleeps for a certain time and then wakes up to hangup those processes -# that are still around, assuming they have run too long. -# -# Programmer: Albert Cheng -# Created Date: 2004/12/23 - -# variable initialization -waitminutes=300 # default to 5 hours == 300 minutes -debugtimelimit= -debugflag= # no debug - -# Function definitions -# -# PRINTMSG -# Print a one line message left justified in a field of 70 characters -# without newline. More output for this line later. -# -PRINTMSG() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - - -USAGE() -{ - echo "Usage: %0 [-h] [-debug] [<time-limit>]" - echo " Run timekeeper with <time-limit> minutes, default is $waitminutes." - echo " If <time-limit> is in the form of HH:MM, it means wait till then." - echo " -h print this help page" - echo " -debug run debug mode" -} - - -ParseOption() -{ - if [ $# -gt 0 -a "$1" = -h ]; then - shift - USAGE - exit 0 - fi - if [ $# -gt 0 -a "$1" = -debug ]; then - shift - debugflag=yes - waitminutes=1 # use shorter time for debug - fi - if [ $# -gt 0 ]; then - targettime=$1 - shift - - # find out it is minutes to wait or HH:MM to wake up - case $targettime in - *:*) # HH:MM - currenttime=`date +%H:%M` - currenthour=`echo $currenttime | cut -f1 -d:` - currentminute=`echo $currenttime | cut -f2 -d:` - targethour=`echo $targettime | cut -f1 -d:` - targetminute=`echo $targettime | cut -f2 -d:` - waitminutes=`expr \( $targethour - $currenthour \) \* 60 + $targetminute - $currentminute` - if test $waitminutes -le 0; then - # target time is in tomorrow, add 1 day of minutes - waitminutes=`expr 24 \* 60 + $waitminutes` - fi - ;; - *) - waitminutes=$targettime - ;; - esac - fi -} - - -# Main body -echo "Timekeeper started at `date`" -ParseOption $* -waitperiod=`expr $waitminutes \* 60` # convert to seconds - -if [ -z "$debugflag" ]; then - # normal time keeping mode - # sleep first - echo Timekeeper sleeping for $waitperiod seconds - sleep $waitperiod - # Look for any processes still around - echo "Timekeeper woke up at `date`, looking for processes to terminate..." - for x in PID.* ; do - if [ -f $x ]; then - pid=`cat $x` - # check if process is still around - if test X$pid \!= X && ps -p $pid > /dev/null; then - echo "terminating process $x ($pid)" - kill -HUP $pid - echo "Remote shell command ended. But some processes might still be" - echo "running in the remote machine. Login there to verify." - fi - fi - done -else - # Debug mode. Launch two rsh process, one ends before, the other after - # waitperiod. Must launch timekeeper from a subshell, else the debug - # will wait for it too. - myhostname=`hostname` - ( $0 $waitminutes &) - debugtimelimit=`expr $waitperiod - 10` - echo rsh $myhostname sleep $debugtimelimit - rsh $myhostname sleep $debugtimelimit & - echo $! > PID.before - debugtimelimit=`expr $waitperiod + 10` - echo rsh $myhostname sleep $debugtimelimit - rsh $myhostname sleep $debugtimelimit & - echo $! > PID.after - - wait - rm PID.before PID.after -fi - -echo "Timekeeper ended at `date`" diff --git a/config/clang-warnings/developer-general b/config/clang-warnings/developer-general index 74d8404..b80552f 100644 --- a/config/clang-warnings/developer-general +++ b/config/clang-warnings/developer-general @@ -1,4 +1,3 @@ --Wformat-nonliteral -Wmissing-noreturn -Wsometimes-uninitialized -Wswitch-enum diff --git a/config/clang-warnings/general b/config/clang-warnings/general index f0c9b93..433dff9 100644 --- a/config/clang-warnings/general +++ b/config/clang-warnings/general @@ -8,19 +8,13 @@ -Wformat=2 -Wframe-larger-than=16384 -Wimplicit-fallthrough -# -# NOTE: Due to the divergence in the C and C++, we're dropping support for -# compiling the C library with a C++ compiler and dropping the -Wc++-compat -# warning. -# --Wno-c++-compat -# -# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add -# it to the developer flags. -# --Wno-format-nonliteral -Wnull-dereference -Wunused-const-variable -Wwrite-strings -Wpedantic -Wvolatile-register-var +# NOTE: Due to the divergence in the C and C++, we're dropping support for +# compiling the C library with a C++ compiler and dropping the -Wc++-compat +# warning. +# +-Wno-c++-compat diff --git a/config/gnu-warnings/cxx-general b/config/gnu-warnings/cxx-general index 9548cc0..1626524 100644 --- a/config/gnu-warnings/cxx-general +++ b/config/gnu-warnings/cxx-general @@ -17,7 +17,6 @@ -Winit-self -Winvalid-pch -Wmissing-include-dirs --Wno-format-nonliteral -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual diff --git a/config/gnu-warnings/developer-general b/config/gnu-warnings/developer-general index b34c4b7..460b874 100644 --- a/config/gnu-warnings/developer-general +++ b/config/gnu-warnings/developer-general @@ -1,9 +1,6 @@ # (suggestions from gcc, not code problems) -# NOTE: -Wformat-nonliteral added back in here (from being disabled in -# H5_CFLAGS) -Waggregate-return -Wdisabled-optimization --Wformat-nonliteral -Winline -Wmissing-format-attribute -Wmissing-noreturn diff --git a/config/gnu-warnings/general b/config/gnu-warnings/general index a7a20b7..df4c613 100644 --- a/config/gnu-warnings/general +++ b/config/gnu-warnings/general @@ -15,18 +15,12 @@ -Winit-self -Winvalid-pch -Wmissing-include-dirs -# +-Wshadow +-Wundef +-Wwrite-strings +-pedantic # NOTE: Due to the divergence in the C and C++, we're dropping support for # compiling the C library with a C++ compiler and dropping the -Wc++-compat # warning. # -Wno-c++-compat -# -# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add -# it to the developer flags. -# --Wno-format-nonliteral --Wshadow --Wundef --Wwrite-strings --pedantic diff --git a/configure.ac b/configure.ac index 53d181b..9b685c6 100644 --- a/configure.ac +++ b/configure.ac @@ -2707,9 +2707,11 @@ AC_ARG_ENABLE([memory-alloc-sanity-check], [Enable this option to turn on internal memory allocation sanity checking. This could cause more memory use and somewhat slower allocation. - This option is orthogonal to the - --enable-using-memchecker option. - [default=yes if debug build, otherwise no] + This option may also cause issues with HDF5 + filter plugins, so should not be enabled if + filters are to be used. This option is orthogonal + to the --enable-using-memchecker option. + [default=no] ])], [MEMORYALLOCSANITYCHECK=$enableval]) @@ -2719,11 +2721,10 @@ AC_SUBST([MEMORYALLOCSANITYCHECK]) ## Set default if test "X-$MEMORYALLOCSANITYCHECK" = X- ; then - if test "X-$BUILD_MODE" = "X-debug" ; then - MEMORYALLOCSANITYCHECK=yes - else - MEMORYALLOCSANITYCHECK=no - fi +# Should consider enabling this option by default for +# 'developer' builds if that build mode is added in +# the future + MEMORYALLOCSANITYCHECK=no fi case "X-$MEMORYALLOCSANITYCHECK" in @@ -4213,21 +4214,20 @@ AC_CONFIG_FILES([src/libhdf5.settings src/Makefile test/Makefile test/H5srcdir_str.h - test/testabort_fail.sh - test/testcheck_version.sh - test/testerror.sh - test/testexternal_env.sh - test/testflushrefresh.sh - test/testlibinfo.sh - test/testlinks_env.sh - test/testswmr.sh - test/testvfdswmr.sh - test/testvds_env.sh - test/testvdsswmr.sh - test/test_filter_plugin.sh + test/test_abort_fail.sh + test/test_check_version.sh + test/test_error.sh + test/test_external_env.sh + test/test_flush_refresh.sh + test/test_libinfo.sh + test/test_links_env.sh test/test_mirror.sh - test/test_usecases.sh - test/test_vol_plugin.sh + test/test_plugin.sh + test/test_swmr.sh + test/test_use_cases.sh + test/test_vds_env.sh + test/test_vds_swmr.sh + test/test_vfd_swmr.sh testpar/Makefile testpar/testpflush.sh utils/Makefile diff --git a/doc/VFD_SWMR_Punch_List.md b/doc/VFD_SWMR_Punch_List.md index 5674116..8c87c9f 100644 --- a/doc/VFD_SWMR_Punch_List.md +++ b/doc/VFD_SWMR_Punch_List.md @@ -172,7 +172,7 @@ guide to the syntax. 33. Make automated tests out of the `credel` and `gaussians` tests. 34. Conserve space in the shadow file. In - vfd_swmr_enlarge_shadow_index(), we postpone reclamation of the old + H5F_vfd_swmr_enlarge_shadow_index(), we postpone reclamation of the old shadow index for max\_lag ticks, but it's not necessary to wait that long. David traded some space efficiency for simplicity, for now. See the note in the source code. diff --git a/examples/ph5example.c b/examples/ph5example.c index 36fbfd5..f16b055 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -888,6 +888,7 @@ test_split_comm_access(char filenames[][PATH_MAX]) mrc = MPI_File_delete(filenames[color], info); assert(mrc == MPI_SUCCESS); } + MPI_Comm_free(&comm); } /* diff --git a/fortran/test/tH5A_1_8.F90 b/fortran/test/tH5A_1_8.F90 index b245b1c..cd8a981 100644 --- a/fortran/test/tH5A_1_8.F90 +++ b/fortran/test/tH5A_1_8.F90 @@ -776,7 +776,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) INTEGER :: Input1 INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T - INTEGER :: minusone = -1 + INTEGER, PARAMETER :: minusone = -1 data_dims = 0 @@ -1422,7 +1422,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) INTEGER :: u ! Local index variable INTEGER :: Input1 INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T - INTEGER :: minusone = -1 + INTEGER, PARAMETER :: minusone = -1 data_dims = 0 @@ -2263,7 +2263,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) INTEGER :: error INTEGER :: crt_order_flags - INTEGER :: minusone = -1 + INTEGER, PARAMETER :: minusone = -1 ! Output message about test being performed ! WRITE(*,*) " - Testing Basic Code for Attributes with Creation Order Info" diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c index 2c2225e..44e18e0 100644 --- a/hl/tools/gif2h5/gif2mem.c +++ b/hl/tools/gif2h5/gif2mem.c @@ -49,22 +49,22 @@ Gif2Mem(GIFBYTE *MemGif, GIFTOMEM *GifMemoryStruct) GIFCOMMENT ** gifComment; /* Comment Extension structure */ GIFGRAPHICCONTROL **gifGraphicControl; /* Graphic Control Extension strct */ - register GIFWORD i; /* Loop counter */ - GIFBYTE Identifier; /* Extension block identifier holder */ - GIFBYTE Label; /* Extension block label holder */ - GIFBYTE ImageCount; /* Count of the number of images in the file */ - GIFBYTE ImageArray; /* Keep the size of the array to store Images */ - GIFBYTE CommentCount; - GIFBYTE CommentArray; - GIFBYTE ApplicationCount; - GIFBYTE ApplicationArray; - GIFBYTE PlainTextCount; - GIFBYTE PlainTextArray; - GIFBYTE GCEflag; - GIFBYTE aTemp; - GIFBYTE j; - GIFBYTE w; /* Two more variables needed only while testing */ - GIFBYTE * b; /* Endian Ordering */ + GIFWORD i; /* Loop counter */ + GIFBYTE Identifier; /* Extension block identifier holder */ + GIFBYTE Label; /* Extension block label holder */ + GIFBYTE ImageCount; /* Count of the number of images in the file */ + GIFBYTE ImageArray; /* Keep the size of the array to store Images */ + GIFBYTE CommentCount; + GIFBYTE CommentArray; + GIFBYTE ApplicationCount; + GIFBYTE ApplicationArray; + GIFBYTE PlainTextCount; + GIFBYTE PlainTextArray; + GIFBYTE GCEflag; + GIFBYTE aTemp; + GIFBYTE j; + GIFBYTE w; /* Two more variables needed only while testing */ + GIFBYTE *b; /* Endian Ordering */ /* Allocate memory for the GIF structures */ /* Plug the structs into GifMemoryStruct at the end */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 21b14d1..7126da9 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -188,13 +188,13 @@ hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, const byte *rmap, cons static void compress(int init_bits, FILE *outfile, byte *data, int len) { - register long fcode; - register int i = 0; - register int c; - register int ent; - register int disp; - register int hsize_reg; - register int hshift; + long fcode; + int i = 0; + int c; + int ent; + int disp; + int hsize_reg; + int hshift; /* * Set up the globals: g_init_bits - initial number of bits g_outfile - diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 5a01dc9..2de5d87 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -813,7 +813,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (NULL == (this_str = (char *)HDmalloc(this_len))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_sprintf: failed to allocate string buffer"); - if (HDsnprintf(this_str, "%g", this_len, tmp_double) < 0) + if (HDsnprintf(this_str, this_len, "%g", tmp_double) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure"); break; @@ -1160,11 +1160,11 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5Otoken_to_str(tid, &oi.token, &token_str); - size_t this_len = 64 + strlen(token_str) + 1; - if (NULL == (this_str = (char *)HDmalloc(this_len))) + size_t that_len = 64 + strlen(token_str) + 1; + if (NULL == (this_str = HDmalloc(that_len))) H5_OUT_OF_MEMORY_ERROR( ENVONLY, "h5str_sprintf: failed to allocate string buffer"); - if (HDsnprintf(this_str, this_len, "%lu:%s", oi.fileno, token_str) < + if (HDsnprintf(this_str, that_len, "%lu:%s", oi.fileno, token_str) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure"); diff --git a/release_docs/HISTORY-1_13.txt b/release_docs/HISTORY-1_13.txt index 06be75b..bc9ae3f 100644 --- a/release_docs/HISTORY-1_13.txt +++ b/release_docs/HISTORY-1_13.txt @@ -5,6 +5,7 @@ This file contains development history of the HDF5 1.13 releases from the develop branch 01. Release Information for hdf5-1.13.0 +02. Release Information for hdf5-1.13.1 [Search on the string '%%%%' for section breaks of each release.] @@ -1756,3 +1757,404 @@ These CVE issues have not yet been addressed and can be avoided by not building the gif tool. Disable building the High-Level tools with these options: autotools: --disable-hltools cmake: HDF5_BUILD_HL_TOOLS=OFF + + +%%%%1.13.1%%%% + +HDF5 version 1.13.1 released on 2022-03-02 +================================================================================ + + +INTRODUCTION +============ + +This document describes the differences between this release and the previous +HDF5 release. It contains information on the platforms tested and known +problems in this release. For more details check the HISTORY*.txt files in the +HDF5 source. + +Note that documentation in the links below will be updated at the time of each +final release. + +Links to HDF5 documentation can be found on The HDF5 web page: + + https://portal.hdfgroup.org/display/HDF5/HDF5 + +The official HDF5 releases can be obtained from: + + https://www.hdfgroup.org/downloads/hdf5/ + +Changes from Release to Release and New Features in the HDF5-1.13.x release series +can be found at: + + https://portal.hdfgroup.org/display/HDF5/HDF5+Application+Developer%27s+Guide + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for new platforms and languages +- Bug Fixes since HDF5-1.13.0 +- Platforms Tested +- Known Problems +- CMake vs. Autotools installations + + +New Features +============ + + Configuration: + ------------- + - Reworked corrected path searched by CMake find_package command + + The install path for cmake find_package files had been changed to use + "share/cmake" + for all platforms. However setting the HDF5_ROOT variable failed to locate + the configuration files. The build variable HDF5_INSTALL_CMAKE_DIR is now + set to the <INSTALL_DIR>/cmake folder. The location of the configuration + files can still be specified by the "HDF5_DIR" variable. + + (ADB - 2022/02/02) + + - CPack will now generate RPM/DEB packages. + + Enabled the RPM and DEB CPack generators on linux. In addition to + generating STGZ and TGZ packages, CPack will try to package the + library for RPM and DEB packages. This is the initial attempt and + may change as issues are resolved. + + (ADB - 2022/01/27) + + - Added new option to the h5cc scripts produced by CMake. + + Add -showconfig option to h5cc scripts to cat the + libhdf5.settings file to the standard output. + + (ADB - 2022/01/25) + + - CMake will now run the PowerShell script tests in test/ by default + on Windows. + + The test directory includes several shell script tests that previously + were not run by CMake on Windows. These are now run by default. + If TEST_SHELL_SCRIPTS is ON and PWSH is found, the PowerShell scripts + will execute. Similar to the bash scripts on unix platforms. + + (ADB - 2021/11/23) + + + Library: + -------- + - Add a new public function, H5ESget_requests() + + This function allows the user to retrieve request pointers from an event + set. It is intended for use primarily by VOL plugin developers. + + (NAF - 2022/01/11) + + + Parallel Library: + ----------------- + - Several improvements to parallel compression feature, including: + + * Improved support for collective I/O (for both writes and reads) + + * Significant reduction of memory usage for the feature as a whole + + * Reduction of copying of application data buffers passed to H5Dwrite + + * Addition of support for incremental file space allocation for filtered + datasets created in parallel. Incremental file space allocation is the + default for these types of datasets (early file space allocation is + also still supported), while early file space allocation is still the + default (and only supported at allocation time) for unfiltered datasets + created in parallel. Incremental file space allocation should help with + parallel HDF5 applications that wish to use fill values on filtered + datasets, but would typically avoid doing so since dataset creation in + parallel would often take an excessive amount of time. Since these + datasets previously used early file space allocation, HDF5 would + allocate space for and write fill values to every chunk in the dataset + at creation time, leading to noticeable overhead. Instead, with + incremental file space allocation, allocation of file space for chunks + and writing of fill values to those chunks will be delayed until each + individual chunk is initially written to. + + * Addition of support for HDF5's "don't filter partial edge chunks" flag + (https://portal.hdfgroup.org/display/HDF5/H5P_SET_CHUNK_OPTS) + + * Addition of proper support for HDF5 fill values with the feature + + * Addition of 'H5_HAVE_PARALLEL_FILTERED_WRITES' macro to H5pubconf.h + so HDF5 applications can determine at compile-time whether the feature + is available + + * Addition of simple examples (ph5_filtered_writes.c and + ph5_filtered_writes_no_sel.c) under examples directory to demonstrate + usage of the feature + + * Improved coverage of regression testing for the feature + + (JTH - 2022/2/23) + + +Support for new platforms, languages and compilers +================================================== + - None + + +Bug Fixes since HDF5-1.13.0 release +=================================== + Library + ------- + - Fixed a metadata cache bug when resizing a pinned/protected cache entry + + When resizing a pinned/protected cache entry, the metadata + cache code previously would wait until after resizing the + entry to attempt to log the newly-dirtied entry. This + caused H5C_resize_entry to mark the entry as dirty and made + H5AC_resize_entry think that it didn't need to add the + newly-dirtied entry to the dirty entries skiplist. + + Thus, a subsequent H5AC__log_moved_entry would think it + needed to allocate a new entry for insertion into the dirty + entry skip list, since the entry didGn't exist on that list. + This caused an assertion failure, as the code to allocate a + new entry assumes that the entry is not dirty. + + (JRM - 2022/02/28) + + - Issue #1436 identified a problem with the H5_VERS_RELEASE check in the + H5check_version function. + + Investigating the original fix, #812, we discovered some inconsistencies + with a new block added to check H5_VERS_RELEASE for incompatibilities. + This new block was not using the new warning text dealing with the + H5_VERS_RELEASE check and would cause the warning to be duplicated. + + By removing the H5_VERS_RELEASE argument in the first check for + H5_VERS_MAJOR and H5_VERS_MINOR, the second check would only check + the H5_VERS_RELEASE for incompatible release versions. This adheres + to the statement that except for the develop branch, all release versions + in a major.minor maintenance branch should be compatible. The prerequisite + is that an application will not use any APIs not present in all release versions. + + (ADB - 2022/02/24, #1438) + + - Unified handling of collective metadata reads to correctly fix old bugs + + Due to MPI-related issues occurring in HDF5 from mismanagement of the + status of collective metadata reads, they were forced to be disabled + during chunked dataset raw data I/O in the HDF5 1.10.5 release. This + wouldn't generally have affected application performance because HDF5 + already disables collective metadata reads during chunk lookup, since + it is generally unlikely that the same chunks will be read by all MPI + ranks in the I/O operation. However, this was only a partial solution + that wasn't granular enough. + + This change now unifies the handling of the file-global flag and the + API context-level flag for collective metadata reads in order to + simplify querying of the true status of collective metadata reads. Thus, + collective metadata reads are once again enabled for chunked dataset + raw data I/O, but manually controlled at places where some processing + occurs on MPI rank 0 only and would cause issues when collective + metadata reads are enabled. + + (JTH - 2021/11/16, HDFFV-10501/HDFFV-10562) + + - Fixed several potential MPI deadlocks in library failure conditions + + In the parallel library, there were several places where MPI rank 0 + could end up skipping past collective MPI operations when some failure + occurs in rank 0-specific processing. This would lead to deadlocks + where rank 0 completes an operation while other ranks wait in the + collective operation. These places have been rewritten to have rank 0 + push an error and try to cleanup after the failure, then continue to + participate in the collective operation to the best of its ability. + + (JTH - 2021/11/09) + + +Platforms Tested +=================== + + Linux 5.13.14-200.fc34 GNU gcc (GCC) 11.2.1 2021078 (Red Hat 11.2.1-1) + #1 SMP x86_64 GNU/Linux GNU Fortran (GCC) 11.2.1 2021078 (Red Hat 11.2.1-1) + Fedora34 clang version 12.0.1 (Fedora 12.0.1-1.fc34) + (cmake and autotools) + + Linux 5.11.0-34-generic GNU gcc (GCC) 9.3.0-17ubuntu1 + #36-Ubuntu SMP x86_64 GNU/Linux GNU Fortran (GCC) 9.3.0-17ubuntu1 + Ubuntu 20.04 Ubuntu clang version 10.0.0-4 + (cmake and autotools) + + Linux 5.8.0-63-generic GNU gcc (GCC) 10.3.0-1ubuntu1 + #71-Ubuntu SMP x86_64 GNU/Linux GNU Fortran (GCC) 10.3.0-1ubuntu1 + Ubuntu20.10 Ubuntu clang version 11.0.0-2 + (cmake and autotools) + + Linux 5.3.18-22-default GNU gcc (SUSE Linux) 7.5.0 + #1 SMP x86_64 GNU/Linux GNU Fortran (SUSE Linux) 7.5.0 + SUSE15sp2 clang version 7.0.1 (tags/RELEASE_701/final 349238) + (cmake and autotools) + + Linux-4.14.0-115.21.2 spectrum-mpi/rolling-release + #1 SMP ppc64le GNU/Linux clang 8.0.1, 11.0.1 + (lassen) GCC 7.3.1 + XL 16.1.1.2 + (cmake) + + Linux-3.10.0-1160.49.1 openmpi-intel/4.1 + #1 SMP x86_64 GNU/Linux Intel(R) Version 18.0.5, 19.1.2 + (chama) (cmake) + + Linux-4.12.14-150.75-default cray-mpich/7.7.10 + #1 SMP x86_64 GNU/Linux GCC 7.3.0, 8.2.0 + (cori) Intel (R) Version 19.0.3.199 + (cmake) + + Linux-4.12.14-197.86-default cray-mpich/7.7.6 + # 1SMP x86_64 GNU/Linux GCC 7.3.0, 9.3.0, 10.2.0 + (mutrino) Intel (R) Version 17.0.4, 18.0.5, 19.1.3 + (cmake) + + Linux 3.10.0-1160.36.2.el7.ppc64 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) + #1 SMP ppc64be GNU/Linux g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) + Power8 (echidna) GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) + + Linux 3.10.0-1160.24.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + Centos7 Version 4.8.5 20150623 (Red Hat 4.8.5-4) + (jelly/kituo/moohan) Version 4.9.3, Version 5.3.0, Version 6.3.0, + Version 7.2.0, Version 8.3.0, Version 9.1.0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 17.0.0.098 Build 20160721 + GNU C (gcc) and C++ (g++) 4.8.5 compilers + with NAG Fortran Compiler Release 6.1(Tozai) + Intel(R) C (icc) and C++ (icpc) 17.0.0.098 compilers + with NAG Fortran Compiler Release 6.1(Tozai) + MPICH 3.1.4 compiled with GCC 4.9.3 + MPICH 3.3 compiled with GCC 7.2.0 + OpenMPI 2.1.6 compiled with icc 18.0.1 + OpenMPI 3.1.3 and 4.0.0 compiled with GCC 7.2.0 + PGI C, Fortran, C++ for 64-bit target on + x86_64; + Version 19.10-0 + + Linux-3.10.0-1127.0.0.1chaos openmpi-4.0.0 + #1 SMP x86_64 GNU/Linux clang 6.0.0, 11.0.1 + (quartz) GCC 7.3.0, 8.1.0 + Intel 16.0.4, 18.0.2, 19.0.4 + + macOS Apple M1 11.6 Apple clang version 12.0.5 (clang-1205.0.22.11) + Darwin 20.6.0 arm64 gfortran GNU Fortran (Homebrew GCC 11.2.0) 11.1.0 + (macmini-m1) Intel icc/icpc/ifort version 2021.3.0 202106092021.3.0 20210609 + + macOS Big Sur 11.3.1 Apple clang version 12.0.5 (clang-1205.0.22.9) + Darwin 20.4.0 x86_64 gfortran GNU Fortran (Homebrew GCC 10.2.0_3) 10.2.0 + (bigsur-1) Intel icc/icpc/ifort version 2021.2.0 20210228 + + macOS High Sierra 10.13.6 Apple LLVM version 10.0.0 (clang-1000.10.44.4) + 64-bit gfortran GNU Fortran (GCC) 6.3.0 + (bear) Intel icc/icpc/ifort version 19.0.4.233 20190416 + + macOS Sierra 10.12.6 Apple LLVM version 9.0.0 (clang-900.39.2) + 64-bit gfortran GNU Fortran (GCC) 7.4.0 + (kite) Intel icc/icpc/ifort version 17.0.2 + + Mac OS X El Capitan 10.11.6 Apple clang version 7.3.0 from Xcode 7.3 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (osx1011test) Intel icc/icpc/ifort version 16.0.2 + + + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + Centos6 Version 4.4.7 20120313 + (platypus) Version 4.9.3, 5.3.0, 6.2.0 + MPICH 3.1.4 compiled with GCC 4.9.3 + PGI C, Fortran, C++ for 64-bit target on + x86_64; + Version 19.10-0 + + Windows 10 x64 Visual Studio 2015 w/ Intel C/C++/Fortran 18 (cmake) + Visual Studio 2017 w/ Intel C/C++/Fortran 19 (cmake) + Visual Studio 2019 w/ clang 12.0.0 + with MSVC-like command-line (C/C++ only - cmake) + Visual Studio 2019 w/ Intel Fortran 19 (cmake) + Visual Studio 2019 w/ MSMPI 10.1 (C only - cmake) + + +Known Problems +============== + Setting a variable-length dataset fill value will leak the memory allocated + for the p field of the hvl_t struct. A fix is in progress for this. + HDFFV-10840 + + CMake files do not behave correctly with paths containing spaces. + Do not use spaces in paths because the required escaping for handling spaces + results in very complex and fragile build files. + ADB - 2019/05/07 + + At present, metadata cache images may not be generated by parallel + applications. Parallel applications can read files with metadata cache + images, but since this is a collective operation, a deadlock is possible + if one or more processes do not participate. + + CPP ptable test fails on both VS2017 and VS2019 with Intel compiler, JIRA + issue: HDFFV-10628. This test will pass with VS2015 with Intel compiler. + + The subsetting option in ph5diff currently will fail and should be avoided. + The subsetting option works correctly in serial h5diff. + + Known problems in previous releases can be found in the HISTORY*.txt files + in the HDF5 source. Please report any new problems found to + help@hdfgroup.org. + + +CMake vs. Autotools installations +================================= +While both build systems produce similar results, there are differences. +Each system produces the same set of folders on linux (only CMake works +on standard Windows); bin, include, lib and share. Autotools places the +COPYING and RELEASE.txt file in the root folder, CMake places them in +the share folder. + +The bin folder contains the tools and the build scripts. Additionally, CMake +creates dynamic versions of the tools with the suffix "-shared". Autotools +installs one set of tools depending on the "--enable-shared" configuration +option. + build scripts + ------------- + Autotools: h5c++, h5cc, h5fc + CMake: h5c++, h5cc, h5hlc++, h5hlcc + +The include folder holds the header files and the fortran mod files. CMake +places the fortran mod files into separate shared and static subfolders, +while Autotools places one set of mod files into the include folder. Because +CMake produces a tools library, the header files for tools will appear in +the include folder. + +The lib folder contains the library files, and CMake adds the pkgconfig +subfolder with the hdf5*.pc files used by the bin/build scripts created by +the CMake build. CMake separates the C interface code from the fortran code by +creating C-stub libraries for each Fortran library. In addition, only CMake +installs the tools library. The names of the szip libraries are different +between the build systems. + +The share folder will have the most differences because CMake builds include +a number of CMake specific files for support of CMake's find_package and support +for the HDF5 Examples CMake project. + +The issues with the gif tool are: + HDFFV-10592 CVE-2018-17433 + HDFFV-10593 CVE-2018-17436 + HDFFV-11048 CVE-2020-10809 +These CVE issues have not yet been addressed and can be avoided by not building +the gif tool. Disable building the High-Level tools with these options: + autotools: --disable-hltools + cmake: HDF5_BUILD_HL_TOOLS=OFF diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 160675f..5e488be 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -36,7 +36,7 @@ CONTENTS - New Features - Support for new platforms and languages -- Bug Fixes since HDF5-1.13.0 +- Bug Fixes since HDF5-1.13.1 - Platforms Tested - Known Problems - CMake vs. Autotools installations @@ -47,85 +47,35 @@ New Features Configuration: ------------- - - CPack will now generate RPM/DEB packages. + - HDF5 memory allocation sanity checking is now off by default for + Autotools debug builds - Enabled the RPM and DEB CPack generators on linux. In addition to - generating STGZ and TGZ packages, CPack will try to package the - library for RPM and DEB packages. This is the initial attempt and - may change as issues are resolved. + HDF5 can be configured to perform sanity checking on internal memory + allocations by adding heap canaries to these allocations. However, + enabling this option can cause issues with external filter plugins + when working with (reallocating/freeing/allocating and passing back) + buffers. - (ADB - 2022/01/27) + Previously, this option was off by default for all CMake build types, + but only off by default for non-debug Autotools builds. Since debug + is the default build mode for HDF5 when built from source with + Autotools, this can result in surprising segfaults that don't occur + when an application is built against a release version of HDF5. + Therefore, this option is now off by default for all build types + across both CMake and Autotools. - - Added new option to the h5cc scripts produced by CMake. - - Add -showconfig option to h5cc scripts that cat the - libhdf5-settings to the standard output. - - (ADB - 2022/01/25) - - - CMake will now run the PowerShell script tests in test/ by default - on Windows. - - The test directory includes several shell script tests that previously - were not run by CMake on Windows. These are now run by default. - If TEST_SHELL_SCRIPTS is ON and PWSH is found, the PowerShell scripts - will execute. Similar to the bash scripts on unix platforms. - - (ADB - 2021/11/23) + (JTH - 2022/03/01) Library: -------- - - Add a new public function, H5ESget_requests() - - This function allows the user to retrieve request pointers from an event - set. It is intended for use primarily by VOL plug in developers. - - (NAF - 2022/01/11) + - Parallel Library: ----------------- - - Several improvements to parallel compression feature, including: - - * Improved support for collective I/O (for both writes and reads) - - * Significant reduction of memory usage for the feature as a whole - - * Reduction of copying of application data buffers passed to H5Dwrite - - * Addition of support for incremental file space allocation for filtered - datasets created in parallel. Incremental file space allocation is the - default for these types of datasets (early file space allocation is - also still supported), while early file space allocation is still the - default (and only supported allocation time) for unfiltered datasets - created in parallel. Incremental file space allocation should help with - parallel HDF5 applications that wish to use fill values on filtered - datasets, but would typically avoid doing so since dataset creation in - parallel would often take an excessive amount of time. Since these - datasets previously used early file space allocation, HDF5 would - allocate space for and write fill values to every chunk in the dataset - at creation time, leading to noticeable overhead. Instead, with - incremental file space allocation, allocation of file space for chunks - and writing of fill values to those chunks will be delayed until each - individual chunk is initially written to. - - * Addition of support for HDF5's "don't filter partial edge chunks" flag - (https://portal.hdfgroup.org/display/HDF5/H5P_SET_CHUNK_OPTS) - - * Addition of proper support for HDF5 fill values with the feature - - * Addition of 'H5_HAVE_PARALLEL_FILTERED_WRITES' macro to H5pubconf.h - so HDF5 applications can determine at compile-time whether the feature - is available - - * Addition of simple examples (ph5_filtered_writes.c and - ph5_filtered_writes_no_sel.c) under examples directory to demonstrate - usage of the feature - - * Improved coverage of regression testing for the feature + - - (JTH - 2022/2/23) Fortran Library: ---------------- @@ -172,76 +122,11 @@ Support for new platforms, languages and compilers - -Bug Fixes since HDF5-1.12.0 release +Bug Fixes since HDF5-1.13.1 release =================================== Library ------- - - Fixed a metadata cache bug when resizing a pinned/protected cache entry - - When resizing a pinned/protected cache entry, the metadata - cache code previously would wait until after resizing the - entry to attempt to log the newly-dirtied entry. This would - cause H5C_resize_entry to mark the entry as dirty and make - H5AC_resize_entry think that it doesn't need to add the - newly-dirtied entry to the dirty entries skiplist. - - Thus, a subsequent H5AC__log_moved_entry would think it - needs to allocate a new entry for insertion into the dirty - entry skip list, since the entry doesn't exist on that list. - This causes an assertion failure, as the code to allocate a - new entry assumes that the entry is not dirty. - - (JRM - 2022/02/28) - - - Issue #1436 identified a problem with the H5_VERS_RELEASE check in the - H5check_version function. - - Investigating the original fix, #812, we discovered some inconsistencies - with a new block added to check H5_VERS_RELEASE for incompatibilities. - This new block was not using the new warning text dealing with the - H5_VERS_RELEASE check and would cause the warning to be duplicated. - - By removing the H5_VERS_RELEASE argument in the first check for - H5_VERS_MAJOR and H5_VERS_MINOR, the second check would only check - the H5_VERS_RELEASE for incompatible release versions. This adheres - to the statement that except for the develop branch, all release versions - in a major.minor maintenance branch should be compatible. The prerequisite - is that an application will not use any APIs not present in all release versions. - - (ADB - 2022/02/24, #1438) - - - Unified handling of collective metadata reads to correctly fix old bugs - - Due to MPI-related issues occurring in HDF5 from mismanagement of the - status of collective metadata reads, they were forced to be disabled - during chunked dataset raw data I/O in the HDF5 1.10.5 release. This - wouldn't generally have affected application performance because HDF5 - already disables collective metadata reads during chunk lookup, since - it is generally unlikely that the same chunks will be read by all MPI - ranks in the I/O operation. However, this was only a partial solution - that wasn't granular enough. - - This change now unifies the handling of the file-global flag and the - API context-level flag for collective metadata reads in order to - simplify querying of the true status of collective metadata reads. Thus, - collective metadata reads are once again enabled for chunked dataset - raw data I/O, but manually controlled at places where some processing - occurs on MPI rank 0 only and would cause issues when collective - metadata reads are enabled. - - (JTH - 2021/11/16, HDFFV-10501/HDFFV-10562) - - - Fixed several potential MPI deadlocks in library failure conditions - - In the parallel library, there were several places where MPI rank 0 - could end up skipping past collective MPI operations when some failure - occurs in rank 0-specific processing. This would lead to deadlocks - where rank 0 completes an operation while other ranks wait in the - collective operation. These places have been rewritten to have rank 0 - push an error and try to cleanup after the failure, then continue to - participate in the collective operation to the best of its ability. - - (JTH - 2021/11/09) + - Java Library diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dcb74a9..4ebc8bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -250,7 +250,6 @@ set (H5FD_SOURCES ${HDF5_SRC_DIR}/H5FDstdio.c ${HDF5_SRC_DIR}/H5FDtest.c ${HDF5_SRC_DIR}/H5FDvfd_swmr.c - ${HDF5_SRC_DIR}/H5FDvfd_swmr_instr.c ${HDF5_SRC_DIR}/H5FDwindows.c ) @@ -912,7 +911,6 @@ set (H5_PRIVATE_HEADERS ${HDF5_SRC_DIR}/H5FDmirror_priv.h ${HDF5_SRC_DIR}/H5FDpkg.h ${HDF5_SRC_DIR}/H5FDprivate.h - ${HDF5_SRC_DIR}/H5FDvfd_swmr_private.h ${HDF5_SRC_DIR}/H5FLprivate.h @@ -1075,20 +1073,23 @@ if (LOCAL_BATCH_TEST) endif () endif () +#### make the H5detect program set (lib_prog_deps) -if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") - add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) - target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") - target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) - TARGET_C_PROPERTIES (H5detect STATIC) - target_link_libraries (H5detect - PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> - ) - target_compile_options(H5detect - PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>" - ) - set (lib_prog_deps ${lib_prog_deps} H5detect) +add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) +target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) +TARGET_C_PROPERTIES (H5detect STATIC) +target_link_libraries (H5detect + PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> +) +target_compile_options(H5detect + PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>" +) +set (lib_prog_deps ${lib_prog_deps} H5detect) +# check if a pregenerated H5Tinit.c file is present +if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") + # execute the H5detect program if (HDF5_BATCH_H5DETECT) configure_file ( ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_BATCH_H5DETECT_SCRIPT}.in.cmake @@ -1096,9 +1097,9 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") ) add_custom_command ( OUTPUT gen_SRCS.stamp1 + BYPRODUCTS H5Tinit.c COMMAND ${HDF5_BATCH_CMD} ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} - BYPRODUCTS H5Tinit.c gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E echo "Executed batch command to create H5Tinit.c" COMMAND ${CMAKE_COMMAND} @@ -1109,31 +1110,30 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") add_custom_target (gen_H5Tinit COMMAND ${CMAKE_COMMAND} -P ${HDF5_SOURCE_DIR}/config/cmake/wait_H5Tinit.cmake ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) else () - add_custom_command (TARGET H5detect POST_BUILD + add_custom_command ( + OUTPUT gen_SRCS.stamp1 + BYPRODUCTS H5Tinit.c COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5detect> ARGS H5Tinit.c - BYPRODUCTS H5Tinit.c gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E touch gen_SRCS.stamp1 DEPENDS H5detect WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} COMMENT "Create H5Tinit.c" ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) - add_custom_command (TARGET H5detect POST_BUILD + add_custom_command ( + OUTPUT shared/shared_gen_SRCS.stamp1 + BYPRODUCTS shared/H5Tinit.c COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c - BYPRODUCTS shared/H5Tinit.c shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E touch shared/shared_gen_SRCS.stamp1 - DEPENDS H5detect H5Tinit.c + DEPENDS H5detect gen_SRCS.stamp1 WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} COMMENT "Copy H5Tinit.c to shared folder" ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) endif () endif () else () @@ -1149,16 +1149,15 @@ else () if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT shared/shared_gen_SRCS.stamp1 + BYPRODUCTS shared/H5Tinit.c COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c - BYPRODUCTS shared/H5Tinit.c shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E touch shared/shared_gen_SRCS.stamp1 - DEPENDS H5Tinit.c + DEPENDS H5Tinit.c gen_SRCS.stamp1 WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} COMMENT "Copy existing H5Tinit.c to shared folder" ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) endif () endif () @@ -1169,6 +1168,7 @@ if (HDF5_ENABLE_FORMATTERS) clang_format (HDF5_SRC_DETECT_FORMAT ${HDF5_SRC_DIR}/H5detect.c) endif () +# make the H5make_libsettings program add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) @@ -1188,10 +1188,12 @@ if (HDF5_ENABLE_FORMATTERS) clang_format (HDF5_SRC_LIBSETTINGS_FORMAT H5make_libsettings) endif () -add_custom_command (TARGET H5make_libsettings POST_BUILD +# execute the H5make_libsettings program +add_custom_command ( + OUTPUT gen_SRCS.stamp2 + BYPRODUCTS H5lib_settings.c COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5make_libsettings> ARGS H5lib_settings.c - BYPRODUCTS H5lib_settings.c gen_SRCS.stamp2 COMMAND ${CMAKE_COMMAND} ARGS -E touch gen_SRCS.stamp2 DEPENDS H5make_libsettings @@ -1200,17 +1202,17 @@ add_custom_command (TARGET H5make_libsettings POST_BUILD ) set_source_files_properties (${HDF5_SRC_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) - add_custom_command (TARGET H5make_libsettings POST_BUILD + add_custom_command ( + OUTPUT shared/shared_gen_SRCS.stamp2 + BYPRODUCTS shared/H5lib_settings.c COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different H5lib_settings.c shared/H5lib_settings.c - BYPRODUCTS shared/H5lib_settings.c shared/shared_gen_SRCS.stamp2 COMMAND ${CMAKE_COMMAND} ARGS -E touch shared/shared_gen_SRCS.stamp2 - DEPENDS H5make_libsettings H5lib_settings.c + DEPENDS H5make_libsettings gen_SRCS.stamp2 WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR} COMMENT "Copy H5lib_settings.c to shared folder" ) - set_source_files_properties (${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) endif () ## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z" @@ -1223,7 +1225,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) if (NOT ONLY_SHARED_LIBS) set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c) add_custom_target (gen_${HDF5_LIB_TARGET} ALL - DEPENDS ${lib_prog_deps} ${gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2 + DEPENDS ${lib_prog_deps} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2 COMMENT "Generation target files" ) @@ -1262,7 +1264,7 @@ endif () if (BUILD_SHARED_LIBS) set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c) add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL - DEPENDS ${lib_prog_deps} ${shared_gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2 + DEPENDS ${lib_prog_deps} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2 COMMENT "Shared generation target files" ) @@ -234,7 +234,7 @@ H5AC_cache_image_pending(const H5F_t *f) * Programmer: Robb Matzke * Jul 9 1997 * - * Changes: Added code to configrue the metadata cache for VFD SWMR + * Changes: Added code to configure the metadata cache for VFD SWMR * reader operations when indicated. * * JRM -- 1/15/19 @@ -2452,7 +2452,7 @@ done: /*------------------------------------------------------------------------------ * Function: H5AC_expunge_tag_type_metadata() * - * Purpose: Wrapper for cache level function which expunge entries with + * Purpose: Wrapper for cache level function which expunges entries with * a specific tag and type id. * * Return: SUCCEED on success, FAIL otherwise. @@ -2462,7 +2462,7 @@ done: *------------------------------------------------------------------------------ */ herr_t -H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags, hbool_t type_match) +H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags) { /* Variable Declarations */ herr_t ret_value = SUCCEED; @@ -2475,7 +2475,7 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flag HDassert(f->shared); /* Call cache level function to expunge entries with specified tag and type id */ - if (H5C_expunge_tag_type_metadata(f, tag, type_id, flags, type_match) < 0) + if (H5C_expunge_tag_type_metadata(f, tag, type_id, flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot expunge tagged type entries") done: @@ -2483,6 +2483,40 @@ done: } /* H5AC_expunge_tag_type_metadata*/ /*------------------------------------------------------------------------------ + * Function: H5AC_expunge_all_tagged_metadata() + * + * Purpose: Wrapper for cache level function which expunges all tagged + * entries + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * Spring 2022 + * + *------------------------------------------------------------------------------ + */ +herr_t +H5AC_expunge_all_tagged_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags) +{ + /* Variable Declarations */ + herr_t ret_value = SUCCEED; + + /* Function Enter Macro */ + FUNC_ENTER_NOAPI(FAIL) + + /* Assertions */ + HDassert(f); + HDassert(f->shared); + + /* Call cache level function to expunge all tagged entries */ + if (H5C_expunge_all_tagged_metadata(f, tag, type_id, flags) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot expunge all entries") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC_expunge_all_tagged_metadata*/ + +/*------------------------------------------------------------------------------ * Function: H5AC_get_tag() * * Purpose: Get the tag for a metadata cache entry. diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index ff632d0..758f63d 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -430,8 +430,8 @@ H5_DLL herr_t H5AC_get_entry_ring(const H5F_t *f, haddr_t addr, H5AC_ring_t *rin H5_DLL void H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring); H5_DLL herr_t H5AC_unsettle_entry_ring(void *entry); H5_DLL herr_t H5AC_unsettle_ring(H5F_t *f, H5AC_ring_t ring); -H5_DLL herr_t H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags, - hbool_t type_match); +H5_DLL herr_t H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags); +H5_DLL herr_t H5AC_expunge_all_tagged_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags); H5_DLL herr_t H5AC_get_tag(const void *thing, /*OUT*/ haddr_t *tag); H5_DLL herr_t H5AC_set_vfd_swmr_reader(H5AC_t *cache_ptr, hbool_t vfd_swmr_reader, hsize_t page_size); @@ -11,9 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* TEMPORARY (during VFD SWMR sync with develop - reduces churn) */ -/* clang-format off */ - /*------------------------------------------------------------------------- * * Created: H5C.c @@ -36,7 +33,7 @@ * * Code Changes: * - * - Remove extra functionality in H5C__flush_single_entry()? + * - Remove extra functionality in H5C__flush_single_entry()? * * - Change protect/unprotect to lock/unlock. * @@ -54,18 +51,18 @@ * the LRU list, eliminating skip list lookups when evicting objects * from the cache. * - * - Create MPI type for dirty objects when flushing in parallel. + * - Create MPI type for dirty objects when flushing in parallel. * - * - Now that TBBT routines aren't used, fix nodes in memory to + * - Now that TBBT routines aren't used, fix nodes in memory to * point directly to the skip list node from the LRU list, eliminating * skip list lookups when evicting objects from the cache. * - * Tests: + * Tests: * - * - Trim execution time. (This is no longer a major issue with the - * shift from the TBBT to a hash table for indexing.) + * - Trim execution time. (This is no longer a major issue with the + * shift from the TBBT to a hash table for indexing.) * - * - Add random tests. + * - Add random tests. * **************************************************************************/ @@ -79,17 +76,18 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5retry_private.h" /* Retry loops. */ -#include "H5Cpkg.h" /* Cache */ -#include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* Files */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5Cpkg.h" /* Cache */ +#include "H5CXprivate.h" /* API Contexts */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Pprivate.h" /* Property lists */ + +#include "H5retry_private.h" /* Retry loops */ /****************/ /* Local Macros */ @@ -1064,12 +1062,6 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t *f, uint64_t page, uint32_t lengt HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); HDassert(cache_ptr->vfd_swmr_reader); -#if 0 /* JRM */ - HDfprintf(stderr, - "H5C_evict_or_refresh_all_entries_in_page() entering. page = %lld\n", - page); -#endif /* JRM */ - /* since file must be opened R/O for a VFD SWMR reader, the skip * list must be empty. Verify this. */ @@ -1117,11 +1109,6 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t *f, uint64_t page, uint32_t lengt tag = entry_ptr->tag_info->tag; HDassert(!(entry_ptr->tag_info->corked)); -#if 0 /* JRM */ - HDfprintf(stderr, - "evicting tagged entries addr/page/tag == %lld/%lld/%lld\n", - entry_ptr->addr, entry_ptr->page, tag); -#endif /* JRM */ /* passing TRUE for the match_global parameter. Look * into this and verify that it is the right thing to @@ -1137,10 +1124,7 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t *f, uint64_t page, uint32_t lengt follow_ptr = entry_ptr = NULL; } else if (entry_ptr->type->refresh) { -#if 0 /* JRM */ - HDfprintf(stderr, "refreshing addr/page/tag == %lld/%lld\n", - entry_ptr->addr, entry_ptr->page); -#endif /* JRM */ + /* If there is a refresh callback, use it to minimize * overhead. * @@ -1281,19 +1265,6 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t *f, uint64_t page, uint32_t lengt * skip list -- thus no need for the * H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG. */ -#if 0 /* JRM */ - if ( entry_ptr->tag_info ) { - - HDfprintf(stderr, - "evicting entry addr/page/tag == %lld/%lld/%lld\n", - entry_ptr->addr, entry_ptr->page, - entry_ptr->tag_info->tag); - } else { - HDfprintf(stderr, - "evicting entry addr/page == %lld/%lld no tag\n", - entry_ptr->addr, entry_ptr->page); - } -#endif /* JRM */ if (H5C__flush_single_entry(f, entry_ptr, flush_flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't evict unpinned entry") @@ -1348,10 +1319,7 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t *f, uint64_t page, uint32_t lengt entry_ptr = (cache_ptr->page_index)[i]; while (entry_ptr) { - HDassert((entry_ptr->page != page) || (entry_ptr->refreshed_in_tick == tick)); - ; - entry_ptr = entry_ptr->pi_next; } @@ -1703,7 +1671,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u HDassert(cache_ptr); HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - /* if this is a VFD SWMR reader, verify that the page size is defined */ + /* If this is a VFD SWMR reader, verify that the page size is defined */ HDassert((!cache_ptr->vfd_swmr_reader) || (cache_ptr->page_size > 0)); HDassert(type); @@ -1831,14 +1799,10 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u entry_ptr->tag_info = NULL; /* initialize fields supporting VFD SWMR */ - if (cache_ptr->vfd_swmr_reader) { - + if (cache_ptr->vfd_swmr_reader) entry_ptr->page = (addr / cache_ptr->page_size); - } - else { - + else entry_ptr->page = 0; - } entry_ptr->refreshed_in_tick = 0; entry_ptr->pi_next = NULL; entry_ptr->pi_prev = NULL; @@ -2281,7 +2245,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd HDassert(cache_ptr); HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - /* if this is a VFD SWMR reader, verify that the page size is defined */ + /* If this is a VFD SWMR reader, verify that the page size is defined */ HDassert((!cache_ptr->vfd_swmr_reader) || (cache_ptr->page_size > 0)); HDassert(type); @@ -2346,13 +2310,11 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd entry_ptr->addr = new_addr; - /* update the page in which the entry resides if the file is opened - * as a VFD SWMR reader. + /* Update the page in which the entry resides if the file is opened + * as a VFD SWMR reader */ - if (cache_ptr->vfd_swmr_reader) { - + if (cache_ptr->vfd_swmr_reader) entry_ptr->page = (new_addr / cache_ptr->page_size); - } if (!entry_ptr->destroy_in_progress) { hbool_t was_dirty; /* Whether the entry was previously dirty */ @@ -2806,15 +2768,16 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign #endif /* H5_HAVE_PARALLEL */ type, addr, udata))) { /* Print out meaningful message for VFD SWMR reader */ - if(f->shared->vfd_swmr && !f->shared->vfd_swmr_writer) { - uint64_t tmp_tick_num = 0; + if (f->shared->vfd_swmr && !f->shared->vfd_swmr_writer) { + uint64_t tmp_tick_num = 0; if (H5FD_vfd_swmr_get_tick_and_idx(f->shared->lf, TRUE, &tmp_tick_num, NULL, NULL) < 0) HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, NULL, "error in retrieving tick_num from driver"); if (tmp_tick_num >= f->shared->tick_num + f->shared->vfd_swmr_config.max_lag) - HDONE_ERROR(H5E_FILE, H5E_SYSTEM, NULL, - "Reader's API time exceeds max_lag ticks, suggest to increase the value of max_lag."); + HDONE_ERROR( + H5E_FILE, H5E_SYSTEM, NULL, + "Reader's API time exceeds max_lag ticks, suggest to increase the value of max_lag."); } HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't load entry") @@ -3520,7 +3483,7 @@ done: * Programmer: John Mainzer * 1/15/19 * - * Changes: None. + * Changes: None * *------------------------------------------------------------------------- */ @@ -6817,12 +6780,6 @@ done: * be cleared and not flushed, and the call can't be part of a * sequence of flushes. * - * If the caller knows the address of the skip list node at - * which the target entry resides, it can avoid a lookup - * by supplying that address in the tgt_node_ptr parameter. - * If this parameter is NULL, the function will do a skip list - * search for the entry instead. - * * The function does nothing silently if there is no entry * at the supplied address, or if the entry found has the * wrong type. @@ -7134,7 +7091,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) H5C__SET_PB_WRITE_HINTS(cache_ptr, entry_ptr->type) - if (H5F_block_write(f, mem_type, entry_ptr->addr, entry_ptr->size, entry_ptr->image_ptr) < 0) { + if (H5F_block_write(f, mem_type, entry_ptr->addr, entry_ptr->size, entry_ptr->image_ptr) < + 0) { H5C__RESET_PB_WRITE_HINTS(cache_ptr) @@ -7488,7 +7446,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) */ /* VFD SWMR TODO: Think on this, and decide if we need to extend - * this for multi page metadata entries. + * this for multi-page metadata entries. */ if (update_page_buffer) { @@ -7601,10 +7559,7 @@ done: * * Programmer: John Mainzer, 5/18/04 * - * Changes: Please maintain the change list and do not delete entries - * unless the have been folded into the header comment. - * - * Reverted optimization that avoided re-reading the prefix + * Changes: Reverted optimization that avoided re-reading the prefix * of a metadata entry when a speculative read proved too * small. * JRM -- 3/25/20 @@ -7664,10 +7619,6 @@ H5C__load_entry(H5F_t *f, HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't retrieve image size") HDassert(len > 0); -#if 0 -init_len = len; -#endif - /* Check for possible speculative read off the end of the file */ if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG) if (H5C__verify_len_eoa(f, type, addr, &len, FALSE) < 0) @@ -7708,8 +7659,8 @@ init_len = len; * --determine the actual size of the metadata * --perform checksum verification */ - for (do_try = h5_retry_init(&retry, H5F_GET_READ_ATTEMPTS(f), 1, H5_RETRY_ONE_HOUR / 3600 / 100); - do_try; do_try = h5_retry_next(&retry)) { + for (do_try = H5_retry_init(&retry, H5F_GET_READ_ATTEMPTS(f), 1, H5_RETRY_ONE_HOUR / 3600 / 100); + do_try; do_try = H5_retry_next(&retry)) { if (actual_len != len) { if (NULL == (new_image = H5MM_realloc(image, len + H5C_IMAGE_EXTRA_SPACE))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()") @@ -7776,61 +7727,50 @@ init_len = len; #ifdef H5_HAVE_PARALLEL if (!coll_access || 0 == mpi_rank) { #endif /* H5_HAVE_PARALLEL */ -#if 0 /* JRM */ - /* If the thing's image needs to be bigger for - * a speculatively loaded thing, go get the - * on-disk image again (the extra portion). - */ - if ( H5F_block_read(f, type->mem_type, addr + len, - actual_len - len, image + len) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, \ - "can't read image") -#else /* JRM */ + /* the original version of this code re-read + * the entire buffer. At some point, someone + * reworked this code to avoid re-reading the + * initial portion of the buffer. + * + * In addition to being of questionable utility, + * this optimization changed the invariant that + * that metadata is read and written atomically. + * While this didn't cause immediate problems, + * the page buffer in VFD SWMR depends on this + * invariant in its management of multi-page + * metadata entries. + * + * To repair this issue, I have reverted to + * the original algorithm for managing the + * speculative load case. Note that I have + * done so crudely -- before merge, we should + * remove the infrastructure that supports the + * optimization. + * + * We should also verify my impression that the + * that the optimization is of no measurable + * value. If it is, we will put it back, but + * disable it in the VFD SWMR case. + * + * While this issue was detected in the global + * heap case, note that the super block, the + * local heap, and the fractal heap also use + * speculative loads. + * + * JRM -- 3/24/20 + */ - /* the original version of this code re-read - * the entire buffer. At some point, someone - * reworked this code to avoid re-reading the - * initial portion of the buffer. - * - * In addition to being of questionable utility, - * this optimization changed the invariant that - * that metadata is read and written atomically. - * While this didn't cause immediate problems, - * the page buffer in VFD SWMR depends on this - * invariant in its management of multi-page - * metadata entries. - * - * To repair this issue, I have reverted to - * the original algorithm for managing the - * speculative load case. Note that I have - * done so crudely -- before merge, we should - * remove the infrastructure that supports the - * optimization. - * - * We should also verify my impression that the - * that the optimization is of no measurable - * value. If it is, we will put it back, but - * disable it in the VFD SWMR case. - * - * While this issue was detected in the global - * heap case, note that the super block, the - * local heap, and the fractal heap also use - * speculative loads. - * - * JRM -- 3/24/20 - */ + H5C__SET_PB_READ_HINTS(f->shared->cache, type, FALSE); - H5C__SET_PB_READ_HINTS(f->shared->cache, type, FALSE); + if (H5F_block_read(f, type->mem_type, addr, actual_len, image) < 0) { - if (H5F_block_read(f, type->mem_type, addr, actual_len, image) < 0) { + H5C__RESET_PB_READ_HINTS(f->shared->cache) - H5C__RESET_PB_READ_HINTS(f->shared->cache) + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image") + } + H5C__RESET_PB_READ_HINTS(f->shared->cache) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image") - } - H5C__RESET_PB_READ_HINTS(f->shared->cache) -#endif /* JRM */ #ifdef H5_HAVE_PARALLEL } /* If the collective metadata read optimization is turned on, @@ -7870,34 +7810,15 @@ init_len = len; } /* Check for too many tries */ - if (!do_try) { -#if 0 /* JRM */ - haddr_t eoa; - int64_t page = (int64_t)(addr / f->shared->cache->page_size); - - eoa = H5F_get_eoa(f, type->mem_type); - - HDfprintf(stderr, "addr = 0x%llx, init_len = %lld, len = %lld\n", - (int64_t)addr, (int64_t)init_len, (int64_t)len); - HDfprintf(stderr, "type = %s, eoa = 0x%llx, tick = %lld\n", - type->name, (int64_t)eoa, f->shared->tick_num); - HDfprintf(stderr, "page = %lld, index_len = %d\n", - page, f->shared->mdf_idx_entries_used); - H5FD_vfd_swmr_dump_status(f->shared->lf, page); -#endif /* JRM */ + if (!do_try) HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, - "incorrect metadata checksum after all read attempts addr %" PRIuHADDR - " size %zu", - addr, len); - } - - /* Calculate and track the # of retries */ - if ((tries = h5_retry_tries(&retry)) > 1) { /* Does not track 0 retry */ - - if (H5F_track_metadata_read_retries(f, (unsigned)type->mem_type, tries - 1) < 0) + "incorrect metadata checksum after all read attempts addr %" PRIuHADDR " size %zu", + addr, len) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "cannot track read tries = %u ", tries) - } + /* Calculate and track the # of retries (does not track 0 retries) */ + if ((tries = H5_retry_tries(&retry)) > 1) + if (H5F_track_metadata_read_retries(f, (unsigned)type->mem_type, tries - 1) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "cannot track read tries = %u ", tries) /* Set the final length (in case it wasn't set earlier) */ len = actual_len; @@ -8004,14 +7925,10 @@ init_len = len; entry->tag_info = NULL; /* initialize fields supporting VFD SWMR */ - if (f->shared->cache->vfd_swmr_reader) { - + if (f->shared->cache->vfd_swmr_reader) entry->page = (addr / f->shared->cache->page_size); - } - else { - + else entry->page = 0; - } entry->refreshed_in_tick = 0; entry->pi_next = NULL; entry->pi_prev = NULL; @@ -8352,10 +8269,8 @@ done: * * Programmer: John Mainzer, 7/14/05 * - * Changes: - * - * Added code to verify that the LRU contains no pinned - * entries. JRM -- 4/25/14 + * Changes: Added code to verify that the LRU contains no pinned + * entries. JRM -- 4/25/14 * *------------------------------------------------------------------------- */ @@ -8434,9 +8349,7 @@ done: * * Programmer: John Mainzer, 4/25/14 * - * Changes: - * - * None. + * Changes: None * *------------------------------------------------------------------------- */ @@ -8518,9 +8431,7 @@ done: * * Programmer: John Mainzer, 4/25/14 * - * Changes: - * - * None. + * Changes: None * *------------------------------------------------------------------------- */ @@ -8600,9 +8511,7 @@ done: * * Programmer: John Mainzer, 11/1/14 * - * Changes: - * - * None. + * Changes: None * *------------------------------------------------------------------------- */ @@ -9716,10 +9625,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) entry_ptr->addr = new_addr; /* In the VFD SWMR reader case, update the entry page field */ - if (cache_ptr->vfd_swmr_reader) { - + if (cache_ptr->vfd_swmr_reader) entry_ptr->page = (new_addr / cache_ptr->page_size); - } /* And then reinsert in the index and slist */ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL); @@ -9898,6 +9805,3 @@ H5C_remove_entry(void *_entry) done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__remove_entry() */ - -/* TEMPORARY (during VFD SWMR sync with develop - reduces churn) */ -/* clang-format on */ diff --git a/src/H5Cimage.c b/src/H5Cimage.c index bdfba08..bec337b 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -862,53 +862,6 @@ H5C__free_image_entries_array(H5C_t *cache_ptr) } /* H5C__free_image_entries_array() */ /*------------------------------------------------------------------------- - * Function: H5C_force_cache_image_load() - * - * Purpose: On rare occasions, it is necessary to run - * H5MF_tidy_self_referential_fsm_hack() prior to the first - * metadata cache access. This is a problem as if there is a - * cache image at the end of the file, that routine will - * discard it. - * - * We solve this issue by calling this function, which will - * load the cache image and then call - * H5MF_tidy_self_referential_fsm_hack() to discard it. - * - * Return: SUCCEED on success, and FAIL on failure. - * - * Programmer: John Mainzer - * 1/11/17 - * - *------------------------------------------------------------------------- - */ -herr_t -H5C_force_cache_image_load(H5F_t *f) -{ - H5C_t *cache_ptr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - /* Sanity checks */ - HDassert(f); - HDassert(f->shared); - cache_ptr = f->shared->cache; - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - HDassert(cache_ptr->load_image); - - /* Load the cache image, if requested */ - if (cache_ptr->load_image) { - cache_ptr->load_image = FALSE; - if (H5C__load_cache_image(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "can't load cache image") - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_force_cache_image_load() */ - -/*------------------------------------------------------------------------- * Function: H5C_get_cache_image_config * * Purpose: Copy the current configuration for cache image generation diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index dd286a9..405d03a 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -53,7 +53,7 @@ /* Cache configuration settings */ #define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ -#define H5C__PAGE_HASH_TABLE_LEN (4 * 1024) /* must be a poser of 2 */ +#define H5C__PAGE_HASH_TABLE_LEN (4 * 1024) /* must be a power of 2 */ #define H5C__H5C_T_MAGIC 0x005CAC0E /* Initial allocated size of the "flush_dep_parent" array */ @@ -1235,7 +1235,7 @@ if ( ( (cache_ptr) == NULL ) || \ ( ( !((entry_ptr)->is_dirty ) || \ ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ ( ( ((entry_ptr)->is_dirty) ) || \ - ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \ + ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \ ( ( (cache_ptr)->index_len == 1 ) && \ ( (cache_ptr)->index_size != (new_size) ) ) || \ ( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \ @@ -1510,10 +1510,10 @@ if ( ( (cache_ptr)->index_size != \ H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ (cache_ptr)->dirty_index_size -= (entry_ptr)->size; \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \ - -= (entry_ptr)->size; \ + -= (entry_ptr)->size; \ (cache_ptr)->clean_index_size += (entry_ptr)->size; \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \ - += (entry_ptr)->size; \ + += (entry_ptr)->size; \ H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ } @@ -1522,18 +1522,18 @@ if ( ( (cache_ptr)->index_size != \ H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \ - -= (entry_ptr)->size; \ + -= (entry_ptr)->size; \ (cache_ptr)->dirty_index_size += (entry_ptr)->size; \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \ - += (entry_ptr)->size; \ + += (entry_ptr)->size; \ H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ } #define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ + entry_ptr, was_clean) \ { \ H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ + entry_ptr, was_clean) \ (cache_ptr)->index_size -= (old_size); \ (cache_ptr)->index_size += (new_size); \ ((cache_ptr)->index_ring_size[entry_ptr->ring]) -= (old_size); \ @@ -1542,14 +1542,14 @@ if ( ( (cache_ptr)->index_size != \ (cache_ptr)->clean_index_size -= (old_size); \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring])-= (old_size); \ } else { \ - (cache_ptr)->dirty_index_size -= (old_size); \ + (cache_ptr)->dirty_index_size -= (old_size); \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])-= (old_size); \ } \ if((entry_ptr)->is_dirty) { \ (cache_ptr)->dirty_index_size += (new_size); \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])+= (new_size); \ } else { \ - (cache_ptr)->clean_index_size += (new_size); \ + (cache_ptr)->clean_index_size += (new_size); \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring])+= (new_size); \ } \ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->il_len, \ @@ -1836,7 +1836,7 @@ if ( ( (cache_ptr)->index_size != \ } else { /* slist disabled */ \ \ HDassert( (cache_ptr)->slist_len == 0 ); \ - HDassert( (cache_ptr)->slist_size == 0 ); \ + HDassert( (cache_ptr)->slist_size == 0 ); \ } \ } /* H5C__REMOVE_ENTRY_FROM_SLIST */ @@ -2078,16 +2078,16 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head.\ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Use the dirty flag to infer whether the entry is on the clean or \ @@ -2141,16 +2141,16 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2333,28 +2333,28 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ + * head. \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* since the entry is being flushed or cleared, one would think \ - * that it must be dirty -- but that need not be the case. Use the \ - * dirty flag to infer whether the entry is on the clean or dirty \ - * LRU list, and remove it. Then insert it at the head of the \ - * clean LRU list. \ + * that it must be dirty -- but that need not be the case. Use the \ + * dirty flag to infer whether the entry is on the clean or dirty \ + * LRU list, and remove it. Then insert it at the head of the \ + * clean LRU list. \ * \ * The function presumes that a dirty entry will be either cleared \ - * or flushed shortly, so it is OK if we put a dirty entry on the \ - * clean LRU list. \ + * or flushed shortly, so it is OK if we put a dirty entry on the \ + * clean LRU list. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ @@ -2395,17 +2395,17 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ + * head. \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2469,7 +2469,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* insert the entry at the tail of the clean or dirty LRU list as \ @@ -2510,7 +2510,7 @@ if ( ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ - \ + \ } else { \ \ /* modified LRU specific code */ \ @@ -2519,7 +2519,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2603,7 +2603,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* insert the entry at the head of the clean or dirty LRU list as \ @@ -2644,7 +2644,7 @@ if ( ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ - \ + \ } else { \ \ /* modified LRU specific code */ \ @@ -2653,7 +2653,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2722,12 +2722,12 @@ if ( ( (cache_ptr)->index_size != \ HDassert( !((entry_ptr)->is_read_only) ); \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ \ } else { \ @@ -2738,7 +2738,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Similarly, remove the entry from the clean or dirty LRU list \ @@ -2784,12 +2784,12 @@ if ( ( (cache_ptr)->index_size != \ HDassert( !((entry_ptr)->is_read_only) ); \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ \ } else { \ @@ -2800,7 +2800,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2849,21 +2849,21 @@ if ( ( (cache_ptr)->index_size != \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ \ - if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \ - \ + if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) {\ + \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* remove the entry from either the clean or dirty LUR list as \ @@ -2872,7 +2872,7 @@ if ( ( (cache_ptr)->index_size != \ if ( was_dirty ) { \ \ H5C__AUX_DLL_REMOVE((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ @@ -2881,34 +2881,34 @@ if ( ( (cache_ptr)->index_size != \ } else { \ \ H5C__AUX_DLL_REMOVE((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ } \ \ /* insert the entry at the head of either the clean or dirty \ - * LRU list as appropriate. \ + * LRU list as appropriate. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ \ H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ \ } else { \ \ H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ } \ \ /* End modified LRU specific code. */ \ @@ -2917,7 +2917,7 @@ if ( ( (cache_ptr)->index_size != \ #else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \ +#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \ { \ HDassert( (cache_ptr) ); \ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ @@ -2926,21 +2926,21 @@ if ( ( (cache_ptr)->index_size != \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ \ - if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \ - \ + if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) {\ + \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2997,49 +2997,49 @@ if ( ( (cache_ptr)->index_size != \ \ if ( (entry_ptr)->coll_access ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \ - (cache_ptr)->coll_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \ + (cache_ptr)->coll_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ } \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ } else { \ \ /* modified LRU specific code */ \ \ - /* Update the size of the LRU list */ \ + /* Update the size of the LRU list */ \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ /* Similarly, update the size of the clean or dirty LRU list as \ - * appropriate. At present, the entry must be clean, but that \ - * could change. \ + * appropriate. At present, the entry must be clean, but that \ + * could change. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ } else { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ } \ \ /* End modified LRU specific code. */ \ @@ -3062,21 +3062,21 @@ if ( ( (cache_ptr)->index_size != \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ } else { \ \ /* modified LRU specific code */ \ \ - /* Update the size of the LRU list */ \ + /* Update the size of the LRU list */ \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ /* End modified LRU specific code. */ \ } \ @@ -3363,7 +3363,7 @@ if ( ( (hd_ptr) == NULL ) || \ ( (Size) < (entry_ptr)->size ) || \ ( ( (Size) == (entry_ptr)->size ) && ( ! ( (len) == 1 ) ) ) || \ ( ( (entry_ptr)->coll_prev == NULL ) && ( (hd_ptr) != (entry_ptr) ) ) || \ - ( ( (entry_ptr)->coll_next == NULL ) && ( (tail_ptr) != (entry_ptr) ) ) || \ + ( ( (entry_ptr)->coll_next == NULL ) && ( (tail_ptr) != (entry_ptr) ) ) ||\ ( ( (len) == 1 ) && \ ( ! ( ( (hd_ptr) == (entry_ptr) ) && ( (tail_ptr) == (entry_ptr) ) && \ ( (entry_ptr)->coll_next == NULL ) && \ @@ -3395,10 +3395,10 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ ) \ ) { \ HDassert(0 && "COLL DLL sanity check failed"); \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "COLL DLL sanity check failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "COLL DLL sanity check failed")\ } -#define H5C__COLL_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ +#define H5C__COLL_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv)\ if ( ( (entry_ptr) == NULL ) || \ ( (entry_ptr)->coll_next != NULL ) || \ ( (entry_ptr)->coll_prev != NULL ) || \ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 524a276..dad5029 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -2370,10 +2370,9 @@ H5_DLL herr_t H5C_evict_or_refresh_all_entries_in_page(H5F_t *f, uint64_t page, H5_DLL herr_t H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flags); H5_DLL herr_t H5C_flush_cache(H5F_t *f, unsigned flags); H5_DLL herr_t H5C_flush_tagged_entries(H5F_t *f, haddr_t tag); -H5_DLL herr_t H5C_force_cache_image_load(H5F_t *f); H5_DLL herr_t H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global); -H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags, - hbool_t type_match); +H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags); +H5_DLL herr_t H5C_expunge_all_tagged_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags); H5_DLL herr_t H5C_get_tag(const void *thing, /*OUT*/ haddr_t *tag); #if H5C_DO_TAGGING_SANITY_CHECKS herr_t H5C_verify_tag(int id, haddr_t tag); diff --git a/src/H5Ctag.c b/src/H5Ctag.c index a3f04e8..2095cf8 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -72,7 +72,6 @@ typedef struct { H5F_t * f; /* File pointer for evicting entry */ int type_id; /* Cache entry type to expunge */ unsigned flags; /* Flags for expunging entry */ - hbool_t type_match; } H5C_tag_iter_ettm_ctx_t; /* Typedef for tagged entry iterator callback context - mark corked */ @@ -818,7 +817,7 @@ H5C__expunge_tag_type_metadata_cb(H5C_cache_entry_t *entry, void *_ctx) HDassert(ctx); /* Found one with the same tag and type id */ - if (entry->type->id == ctx->type_id || !ctx->type_match) + if (entry->type->id == ctx->type_id) if (H5C_expunge_entry(ctx->f, entry->type, entry->addr, ctx->flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, H5_ITER_ERROR, "can't expunge entry") @@ -841,7 +840,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags, hbool_t type_match) +H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags) { H5C_t * cache; /* Pointer to cache structure */ H5C_tag_iter_ettm_ctx_t ctx; /* Context for iterator callback */ @@ -858,10 +857,9 @@ H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags HDassert(cache->magic == H5C__H5C_T_MAGIC); /* Construct context for iterator callbacks */ - ctx.f = f; - ctx.type_id = type_id; - ctx.flags = flags; - ctx.type_match = type_match; + ctx.f = f; + ctx.type_id = type_id; + ctx.flags = flags; /* Iterate through hash table entries, expunge those with specified tag and type id */ if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__expunge_tag_type_metadata_cb, &ctx) < 0) @@ -873,6 +871,82 @@ done: /*------------------------------------------------------------------------- * + * Function: H5C__expunge_all_tagged_metadata_cb + * + * Purpose: Callback for expunging all tagged cache entries + * + * Return: H5_ITER_ERROR if error is detected, H5_ITER_CONT otherwise. + * + * Programmer: Dana Robinson + * Spring 2022 + * + *------------------------------------------------------------------------- + */ +static int +H5C__expunge_all_tagged_metadata_cb(H5C_cache_entry_t *entry, void *_ctx) +{ + H5C_tag_iter_ettm_ctx_t *ctx = (H5C_tag_iter_ettm_ctx_t *)_ctx; /* Get pointer to iterator context */ + int ret_value = H5_ITER_CONT; /* Return value */ + + /* Function enter macro */ + FUNC_ENTER_STATIC + + /* Santify checks */ + HDassert(entry); + HDassert(ctx); + + if (H5C_expunge_entry(ctx->f, entry->type, entry->addr, ctx->flags) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, H5_ITER_ERROR, "can't expunge entry") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C__expunge_all_tagged_metadata_cb() */ + +/*------------------------------------------------------------------------- + * + * Function: H5C_expunge_all_tagged_metadata + * + * Purpose: Expunge all cache entries + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * Spring 2022 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_expunge_all_tagged_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags) +{ + H5C_t * cache; /* Pointer to cache structure */ + H5C_tag_iter_ettm_ctx_t ctx; /* Context for iterator callback */ + herr_t ret_value = SUCCEED; /* Return value */ + + /* Function enter macro */ + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity checks */ + HDassert(f); + HDassert(f->shared); + cache = f->shared->cache; /* Get cache pointer */ + HDassert(cache != NULL); + HDassert(cache->magic == H5C__H5C_T_MAGIC); + + /* Construct context for iterator callbacks */ + ctx.f = f; + ctx.type_id = type_id; + ctx.flags = flags; + + /* Iterate through all tagged entries, expunging them */ + if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__expunge_all_tagged_metadata_cb, &ctx) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iterated expunging of tagged entries failed") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_expunge_all_tagged_metadata() */ + +/*------------------------------------------------------------------------- + * * Function: H5C_get_tag() * * Purpose: Get the tag for a metadata cache entry. diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 9078877..35916d2 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2874,20 +2874,29 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_io_term() */ -/* Close the given dataset's chunk index, or destroy it if `destroy` - * is true. A closed index merely releases holds on metadata cache - * entries; the index can be reopened. Once a dataset's index is - * destroyed, however, the dataset must not try to use the index, again. +/*------------------------------------------------------------------------- + * Function: H5D__chunk_index_close + * + * Purpose: Close the given dataset's chunk index, or destroy it if + * `destroy` is true. A closed index merely releases holds + * on metadata cache entries; the index can be reopened. Once + * a dataset's index is + * destroyed, however, the dataset must not try to use the + * index, again. + * + * A useful side-effect of closing the chunk index is the + * release of pinned/tagged metadata cache entries connected + * with the index. * - * A useful side-effect of closing the chunk index is the release - * pinned/tagged metadata cache entries connected with the index. + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- */ static herr_t H5D__chunk_index_close(const H5D_t *dset, bool destroy) { H5D_chk_idx_info_t idx_info; H5O_storage_chunk_t * sc = &(dset->shared->layout.storage.u.chunk); - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; H5D_chunk_close_func_t fn; FUNC_ENTER_STATIC diff --git a/src/H5Dint.c b/src/H5Dint.c index 15092f3..cc17265 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -3374,7 +3374,7 @@ done: /* Expunge from cache all v1 B-tree type entries associated with tag */ if (H5AC_expunge_tag_type_metadata(dataset->oloc.file, dataset->oloc.addr, H5AC_BT_ID, - H5AC__NO_FLAGS_SET, TRUE)) + H5AC__NO_FLAGS_SET)) HDONE_ERROR(H5E_DATASET, H5E_CANTEXPUNGE, FAIL, "unable to expunge index metadata") } /* end if */ diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 527fc7b..8577001 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -446,7 +446,7 @@ static FILE * debug_stream = NULL; do { \ if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \ HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \ - fflush(debug_stream); \ + HDfflush(debug_stream); \ } \ } while (0) @@ -455,7 +455,7 @@ static FILE * debug_stream = NULL; do { \ if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \ HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \ - fflush(debug_stream); \ + HDfflush(debug_stream); \ } \ } while (0) @@ -465,7 +465,7 @@ static FILE * debug_stream = NULL; \ if (trace_flag) { \ H5D_MPIO_DEBUG_VA(rank, "%s%s", trace_in_pre, __func__); \ - debug_indent += (int)strlen(trace_in_pre); \ + debug_indent += (int)HDstrlen(trace_in_pre); \ } \ } while (0) @@ -474,7 +474,7 @@ static FILE * debug_stream = NULL; hbool_t trace_flag = H5D_mpio_debug_flags_s[(int)'t']; \ \ if (trace_flag) { \ - debug_indent -= (int)strlen(trace_out_pre); \ + debug_indent -= (int)HDstrlen(trace_out_pre); \ H5D_MPIO_DEBUG_VA(rank, "%s%s", trace_out_pre, __func__); \ } \ } while (0) @@ -1141,8 +1141,8 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf HGOTO_ERROR(H5E_IO, H5E_OPENERROR, FAIL, "couldn't open debugging log file") /* Print a short header for this I/O operation */ - time_now = time(NULL); - HDfprintf(debug_log_file, "##### %s", asctime(localtime(&time_now))); + time_now = HDtime(NULL); + HDfprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now))); debug_stream = debug_log_file; } @@ -2809,7 +2809,7 @@ H5Fvfd_swmr_end_tick(hid_t file_id) if (NULL == vol_obj) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") - /* Check on this when go parallel for VFD SWMR */ + /* TODO: Revisit this when VFD SWMR + parallel works */ /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") @@ -2848,7 +2848,7 @@ H5Fvfd_swmr_disable_end_of_tick(hid_t file_id) if (NULL == vol_obj) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") - /* Check on this when go parallel for VFD SWMR */ + /* TODO: Revisit this when VFD SWMR + parallel works */ /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") @@ -2886,7 +2886,7 @@ H5Fvfd_swmr_enable_end_of_tick(hid_t file_id) if (NULL == vol_obj) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") - /* Check on this when go parallel for VFD SWMR */ + /* TODO: Revisit this when VFD SWMR + parallel works */ /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") @@ -970,7 +970,7 @@ H5FD_close(H5FD_t *file) { const H5FD_class_t *driver; H5FD_wrap_t * item; - H5FD_wrap_t * delete_me = NULL; + H5FD_wrap_t * temp = NULL; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -989,11 +989,12 @@ H5FD_close(H5FD_t *file) if (item->file->exc_owner == file) item->file->exc_owner = NULL; if (item->file == file) - delete_me = item; + temp = item; } - HDassert(delete_me); - TAILQ_REMOVE(&all_vfds, delete_me, link); - H5MM_xfree(delete_me); + + HDassert(temp); + TAILQ_REMOVE(&all_vfds, temp, link); + H5MM_xfree(temp); /* Dispatch to the driver for actual close. If the driver fails to * close the file then the file will be in an unusable state. @@ -1056,9 +1057,10 @@ H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2) { int ret_value = -1; /* Return value */ - FUNC_ENTER_NOAPI_NOERR /* return value is arbitrary */ + FUNC_ENTER_NOAPI_NOERR; /* return value is arbitrary */ - if ((!f1 || !f1->cls) && (!f2 || !f2->cls)) HGOTO_DONE(0) + if ((!f1 || !f1->cls) && (!f2 || !f2->cls)) + HGOTO_DONE(0) if (!f1 || !f1->cls) HGOTO_DONE(-1) if (!f2 || !f2->cls) diff --git a/src/H5FDdevelop.h b/src/H5FDdevelop.h index fd62ad7..32cd36f 100644 --- a/src/H5FDdevelop.h +++ b/src/H5FDdevelop.h @@ -227,6 +227,9 @@ struct H5FD_t { hbool_t paged_aggr; /* Paged aggregation for file space is enabled or not */ }; +/* VFD initialization function */ +typedef hid_t (*H5FD_init_t)(void); + /********************/ /* Public Variables */ /********************/ @@ -239,7 +242,7 @@ struct H5FD_t { extern "C" { #endif -H5_DLL hid_t H5FDperform_init(hid_t (*)(void)); +H5_DLL hid_t H5FDperform_init(H5FD_init_t op); H5_DLL hid_t H5FDregister(const H5FD_class_t *cls); H5_DLL htri_t H5FDis_driver_registered_by_name(const char *driver_name); H5_DLL htri_t H5FDis_driver_registered_by_value(H5FD_class_value_t driver_value); diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 4e54197..3f0080e 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -233,20 +233,20 @@ H5FD__family_get_default_printf_filename(const char *old_filename) HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate new filename buffer") /* Determine if filename contains a ".h5" extension. */ - if ((file_extension = strstr(old_filename, ".h5"))) { + if ((file_extension = HDstrstr(old_filename, ".h5"))) { /* Insert the printf format between the filename and ".h5" extension. */ HDstrcpy(tmp_buffer, old_filename); - file_extension = strstr(tmp_buffer, ".h5"); + file_extension = HDstrstr(tmp_buffer, ".h5"); HDsprintf(file_extension, "%s%s", suffix, ".h5"); } - else if ((file_extension = strrchr(old_filename, '.'))) { + else if ((file_extension = HDstrrchr(old_filename, '.'))) { char *new_extension_loc = NULL; /* If the filename doesn't contain a ".h5" extension, but contains * AN extension, just insert the printf format before that extension. */ HDstrcpy(tmp_buffer, old_filename); - new_extension_loc = strrchr(tmp_buffer, '.'); + new_extension_loc = HDstrrchr(tmp_buffer, '.'); HDsprintf(new_extension_loc, "%s%s", suffix, file_extension); } else { diff --git a/src/H5FDint.c b/src/H5FDint.c index d09801f..b1b48c9 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -182,26 +182,6 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /* HGOTO_DONE(SUCCEED) #endif /* H5_HAVE_PARALLEL */ -#if 0 /* JRM */ - /* If the file is open for SWMR read access, allow access to data past - * the end of the allocated space (the 'eoa'). This is done because the - * eoa stored in the file's superblock might be out of sync with the - * objects being written within the file by the application performing - * SWMR write operations. - */ - if (!(file->access_flags & H5F_ACC_SWMR_READ)) { - haddr_t eoa; - - if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") - - if ((addr + file->base_addr + size) > eoa) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu, eoa = %llu", - (unsigned long long)(addr + file->base_addr), (unsigned long long)size, - (unsigned long long)eoa) - } -#endif /* JRM */ - /* Dispatch to driver */ if ((file->cls->read)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0) HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed") diff --git a/src/H5FDperform.c b/src/H5FDperform.c index 096fdd6..4a68c6e 100644 --- a/src/H5FDperform.c +++ b/src/H5FDperform.c @@ -29,13 +29,14 @@ * Function: H5FDperform_init * * Purpose: Ensure that the library is initialized and then call - * the provided VFD initializer. + * the provided VFD initializer * - * Return: Success: identifier for the VFD just initialized + * Return: Success: Identifier for the VFD just initialized * Failure: H5I_INVALID_HID *------------------------------------------------------------------------- */ -hid_t H5FDperform_init(hid_t (*init)(void)) +hid_t +H5FDperform_init(H5FD_init_t op) { hid_t ret_value = H5I_INVALID_HID; /* Return value */ @@ -43,16 +44,16 @@ hid_t H5FDperform_init(hid_t (*init)(void)) /*NO TRACE*/ /* It is possible that an application will evaluate an - * `H5FD_*` symbol (`H5FD_FAMILY`, `H5FD_MULTI`, `H5FD_SEC2`, et - * cetera) before the library has had an opportunity to initialize. - * Call H5_init_library() to make sure that the library has been - * initialized before `init` is run. + * `H5FD_*` symbol (`H5FD_FAMILY`, `H5FD_MULTI`, `H5FD_SEC2`, etc. + * before the library has had an opportunity to initialize. Call + * H5_init_library() to make sure that the library has been initialized + * before `init` is run. */ - if (H5_init_library() < 0) { + if (H5_init_library() < 0) HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, H5I_INVALID_HID, "library initialization failed") - } - ret_value = init(); + ret_value = op(); + done: FUNC_LEAVE_API_NOINIT(ret_value) } diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index 4ba7060..fa51574 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -220,8 +220,8 @@ typedef struct H5FD_vfd_swmr_md_header { * is false. */ static inline H5FD_vfd_swmr_idx_entry_t * -vfd_swmr_pageno_to_mdf_idx_entry(H5FD_vfd_swmr_idx_entry_t *idx, uint32_t nentries, uint64_t target_page, - bool reuse_garbage) +H5FD_vfd_swmr_pageno_to_mdf_idx_entry(H5FD_vfd_swmr_idx_entry_t *idx, uint32_t nentries, uint64_t target_page, + bool reuse_garbage) { uint32_t top; uint32_t bottom; @@ -336,7 +336,7 @@ H5_DLL htri_t H5FD_is_driver_registered_by_value(H5FD_class_value_t driver_value H5_DLL hid_t H5FD_get_driver_id_by_name(const char *name, hbool_t is_api); H5_DLL hid_t H5FD_get_driver_id_by_value(H5FD_class_value_t value, hbool_t is_api); H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); -H5FD_t * H5FD_deduplicate(H5FD_t *, hid_t); +H5FD_t * H5FD_deduplicate(H5FD_t *file, hid_t fapl_id); H5_DLL herr_t H5FD_close(H5FD_t *file); H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2); H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/); @@ -368,14 +368,13 @@ H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file); H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged); H5_DLL herr_t H5FD_init(void); + /* Function prototypes for VFD SWMR */ -H5_DLL int shadow_image_defer_free(struct H5F_shared_t *, const H5FD_vfd_swmr_idx_entry_t *); H5_DLL herr_t H5FD_vfd_swmr_get_tick_and_idx(H5FD_t *_file, hbool_t read_index, uint64_t *tick_ptr, uint32_t *num_entries_ptr, H5FD_vfd_swmr_idx_entry_t index[]); -H5_DLL H5FD_vfd_swmr_idx_entry_t *vfd_swmr_enlarge_shadow_index(struct H5F_t *); -H5_DLL void H5FD_vfd_swmr_dump_status(H5FD_t *, uint64_t); -H5_DLL void H5FD_vfd_swmr_set_pb_configured(H5FD_t *_file); -H5_DLL void H5FD_vfd_swmr_record_elapsed_ticks(H5FD_t *, uint64_t); +H5_DLL void H5FD_vfd_swmr_dump_status(H5FD_t *file, uint64_t page); +H5_DLL void H5FD_vfd_swmr_set_pb_configured(H5FD_t *_file); +H5_DLL void H5FD_vfd_swmr_record_elapsed_ticks(H5FD_t *_file, uint64_t elapsed); H5_DLL H5FD_t *H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl_id); /* Function prototypes for MPI based VFDs*/ diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 31438cd..509c18e 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -527,20 +527,20 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "filename exceeds max length") /* Determine if filename contains a ".h5" extension. */ - if ((file_extension = strstr(base_filename, ".h5"))) { + if ((file_extension = HDstrstr(base_filename, ".h5"))) { /* Insert the suffix between the filename and ".h5" extension. */ HDstrcpy(new_path, base_filename); - file_extension = strstr(new_path, ".h5"); + file_extension = HDstrstr(new_path, ".h5"); HDsprintf(file_extension, "%s%s", suffix, ".h5"); } - else if ((file_extension = strrchr(base_filename, '.'))) { + else if ((file_extension = HDstrrchr(base_filename, '.'))) { char *new_extension_loc = NULL; /* If the filename doesn't contain a ".h5" extension, but contains * AN extension, just insert the suffix before that extension. */ HDstrcpy(new_path, base_filename); - new_extension_loc = strrchr(new_path, '.'); + new_extension_loc = HDstrrchr(new_path, '.'); HDsprintf(new_extension_loc, "%s%s", suffix, file_extension); } else { diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c index 11c177b..cd1a02e 100644 --- a/src/H5FDvfd_swmr.c +++ b/src/H5FDvfd_swmr.c @@ -235,9 +235,9 @@ H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file) HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "could not allocate API elapsed ticks") /* Retry on opening the metadata file */ - for (do_try = h5_retry_init(&retry, H5FD_VFD_SWMR_MD_FILE_RETRY_MAX, H5_RETRY_DEFAULT_MINIVAL, + for (do_try = H5_retry_init(&retry, H5FD_VFD_SWMR_MD_FILE_RETRY_MAX, H5_RETRY_DEFAULT_MINIVAL, H5_RETRY_DEFAULT_MAXIVAL); - do_try; do_try = h5_retry_next(&retry)) { + do_try; do_try = H5_retry_next(&retry)) { if ((file->md_fd = HDopen(file->md_file_path, O_RDONLY)) >= 0) break; } @@ -358,8 +358,6 @@ done: static void H5FD__swmr_reader_close(H5FD_vfd_swmr_t *file) { - vfd_swmr_reader_did_increase_tick_to(0); - if (file->api_elapsed_ticks != NULL) H5MM_xfree(file->api_elapsed_ticks); @@ -770,7 +768,7 @@ H5FD__vfd_swmr_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id /* Try finding the addr from the index */ target_page = addr / fs_page_size; - entry = vfd_swmr_pageno_to_mdf_idx_entry(index, num_entries, target_page, FALSE); + entry = H5FD_vfd_swmr_pageno_to_mdf_idx_entry(index, num_entries, target_page, FALSE); if (entry == NULL) { /* Cannot find addr in index, read from the underlying hdf5 file */ @@ -1011,9 +1009,9 @@ H5FD__vfd_swmr_load_hdr_and_idx(H5FD_vfd_swmr_t *file, hbool_t open) FUNC_ENTER_STATIC - for (do_try = h5_retry_init(&retry, H5FD_VFD_SWMR_MD_LOAD_RETRY_MAX, H5_RETRY_ONE_SECOND / 10, + for (do_try = H5_retry_init(&retry, H5FD_VFD_SWMR_MD_LOAD_RETRY_MAX, H5_RETRY_ONE_SECOND / 10, H5_RETRY_ONE_SECOND); - do_try; do_try = h5_retry_next(&retry)) { + do_try; do_try = H5_retry_next(&retry)) { /* Load and decode the header. Go around again on a temporary * failure (FALSE). Bail on an irrecoverable failure (FAIL). @@ -1170,7 +1168,8 @@ H5FD__vfd_swmr_header_deserialize(H5FD_vfd_swmr_t *file, H5FD_vfd_swmr_md_header UINT32DECODE(p, md_header->fs_page_size); UINT64DECODE(p, md_header->tick_num); UINT64DECODE(p, md_header->index_offset); - if ((index_length = uint64_decode(&p)) > SIZE_MAX) + UINT64DECODE(p, index_length); + if (index_length > SIZE_MAX) HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "index is too large to hold in core") md_header->index_length = (size_t)index_length; @@ -1181,13 +1180,6 @@ H5FD__vfd_swmr_header_deserialize(H5FD_vfd_swmr_t *file, H5FD_vfd_swmr_md_header /* Sanity check */ HDassert((size_t)(p - image) <= H5FD_MD_HEADER_SIZE); -#if 0 /* JRM */ - HDfprintf(stderr, - "---read header ps/tick/idx_off/idx_len = %d / %lld / %lld / %lld\n", - md_header->fs_page_size, md_header->tick_num, - md_header->index_offset, md_header->index_length); -#endif /* JRM */ - ret_value = TRUE; done: @@ -1320,12 +1312,6 @@ H5FD__vfd_swmr_index_deserialize(const H5FD_vfd_swmr_t *file, H5FD_vfd_swmr_md_i /* Sanity check */ HDassert((size_t)(p - image) <= md_header->index_length); -#if 0 /* JRM */ - HDfprintf(stderr, - " ---- read index tick/num_entries = %lld / %d \n", - md_index->tick_num, md_index->num_entries); -#endif /* JRM */ - done: if (image != NULL) image = H5MM_xfree(image); diff --git a/src/H5FDvfd_swmr_instr.c b/src/H5FDvfd_swmr_instr.c deleted file mode 100644 index ad4885a..0000000 --- a/src/H5FDvfd_swmr_instr.c +++ /dev/null @@ -1,58 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by Akadio, Inc. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "H5private.h" /* H5_ATTR_UNUSED */ -#include "H5Fpublic.h" -#include "H5FDvfd_swmr.h" - -/* vfd_swmr_writer_may_increase_tick_to() and - * vfd_swmr_reader_did_increase_tick_to() are instrumentation points for - * VFD SWMR tests to use to coordinate the tick-number increases - * on a single writer with the progress of a single reader. - * - * This file provides the default, do-nothing implementations for both - * instrumentation routines. - * - * A VFD SWMR writer calls vfd_swmr_writer_may_increase_tick_to() with the - * increased tick number that it proposes, `tick_num`. The argument - * `wait_for_reader` tells whether or not the writer can wait for the reader - * before increasing its tick number. If `true`, then - * vfd_swmr_writer_may_increase_tick_to() should - * block until the reader is finished using the shadow-file content - * from ticks `tick_num - max_lag` and before, returning `true`. - * If `false`, then - * vfd_swmr_writer_may_increase_tick_to() immediately return `true` if - * the new tick number does permissible, otherwise `false`. - * - * After a VFD SWMR reader increases its tick number, it calls - * vfd_swmr_reader_did_increase_tick_to() with the new tick number. - * - * The test programs test/vfd_swmr_zoo_{reader,writer} provide - * their own vfd_swmr_writer_may_increase_tick_to() and - * vfd_swmr_reader_did_increase_tick_to() implementations that override the - * ones in the library. In the "zoo" - * test (test/vfd_swmr_zoo_{reader,writer}), the reader and the writer - * use a shared file to coordinate tick-number increases so that the writer - * can call H5Fvfd_swmr_end_tick() to increase its tick number at an arbitrary - * rate without outrunning the reader. - */ -bool -vfd_swmr_writer_may_increase_tick_to(uint64_t H5_ATTR_UNUSED tick_num, bool H5_ATTR_UNUSED wait_for_reader) -{ - return true; -} - -void -vfd_swmr_reader_did_increase_tick_to(uint64_t H5_ATTR_UNUSED tick_num) -{ - return; -} diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h deleted file mode 100644 index f5cf484..0000000 --- a/src/H5FDvfd_swmr_private.h +++ /dev/null @@ -1,87 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by Akadio, Inc. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef H5FDvfd_swmr_private_H -#define H5FDvfd_swmr_private_H - -#include "H5queue.h" /* for TAILQ_* */ - -/* Forward declaration */ -struct H5F_t; -struct H5F_shared_t; -struct H5FD_vfd_swmr_idx_entry_t; - -/* - * struct eot_queue_entry_t - * - * This is the structure for an entry on the end-of-tick queue (EOT queue) of files - * opened in either VFD SWMR write or VFD SWMR read mode. This queue is maintained - * in increasing end of tick time order. - * The structure contains all information required to determine whether the end - * of tick has arrived for the specified file, and to initiate end of tick processing - * if it has. - * - * The fields of eot_queue_entry_t are discussed below: - * - * vfd_swmr_file: Pointer to the instance of H5F_file_t containing the shared - * fields of the associated file that has been opened in VFD SWMR mode - * NOTE: for the time being use H5F_t instead of H5F_file_t - * - * vfd_swmr_writer: Boolean flag that is set to TRUE if the associated file - * has been opened in VFD SWMR writer mode, and FALSE if it has been - * opened in VFD SWMR reader mode. - * - * tick_num: Number of the current tick of the target file. - * - * end_of_tick: Expiration time of the current tick of the target file. - * - * link: Forward and backward linkage between the next element and the previous - * element (or the queue head). Note that if there is a following entry, - * `next`, then `next->end_of_tick` must be greater than or equal to - * `end_of_tick`. - */ -typedef struct eot_queue_entry { - hbool_t vfd_swmr_writer; - uint64_t tick_num; - struct timespec end_of_tick; - struct H5F_t * vfd_swmr_file; /* NOTE: for the time being use H5F_t instead H5F_shared_t */ - TAILQ_ENTRY(eot_queue_entry) link; -} eot_queue_entry_t; - -H5_DLLVAR unsigned int vfd_swmr_api_entries_g; - -/* The head of the EOT queue */ -typedef TAILQ_HEAD(eot_queue, eot_queue_entry) eot_queue_t; - -H5_DLLVAR eot_queue_t eot_queue_g; - -/***************************************/ -/* Library-private Function Prototypes */ -/***************************************/ - -H5_DLL herr_t H5F_vfd_swmr_init(struct H5F_t *f, hbool_t file_create); -H5_DLL herr_t H5F_vfd_swmr_close_or_flush(struct H5F_t *f, hbool_t closing); -H5_DLL herr_t H5F_update_vfd_swmr_metadata_file(struct H5F_t *f, uint32_t index_len, - struct H5FD_vfd_swmr_idx_entry_t *index); -H5_DLL herr_t H5F_vfd_swmr_writer__delay_write(struct H5F_shared_t *, uint64_t, uint64_t *); -H5_DLL herr_t H5F_vfd_swmr_writer__prep_for_flush_or_close(struct H5F_t *f); -herr_t H5F_vfd_swmr_process_eot_queue(hbool_t); -H5_DLL herr_t H5F_vfd_swmr_writer_end_of_tick(struct H5F_t *f, hbool_t); -H5_DLL herr_t H5F_vfd_swmr_writer__dump_index(struct H5F_shared_t *); -H5_DLL herr_t H5F_vfd_swmr_reader_end_of_tick(struct H5F_t *f, hbool_t); - -H5_DLL herr_t H5F_vfd_swmr_remove_entry_eot(struct H5F_t *f); -H5_DLL herr_t H5F_vfd_swmr_insert_entry_eot(struct H5F_t *f); -H5_DLL void H5F_vfd_swmr_update_entry_eot(eot_queue_entry_t *); -H5_DLL herr_t H5F_dump_eot_queue(void); - -#endif /* H5FDvfd_swmr_private_H */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 729aeea..9909256 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -32,7 +32,6 @@ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ #include "H5MFprivate.h" /* File memory management */ -#include "H5MVprivate.h" /* File memory management for VFD SWMR */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ #include "H5SMprivate.h" /* Shared Object Header Messages */ @@ -1541,7 +1540,7 @@ H5F__dest(H5F_t *f, hbool_t flush) /* If this is a VFD SWMR writer, prep for flush or close */ if ((f->shared->vfd_swmr) && (f->shared->vfd_swmr_writer) && - (H5F_vfd_swmr_writer__prep_for_flush_or_close(f) < 0)) + (H5F_vfd_swmr_writer_prep_for_flush_or_close(f) < 0)) /* Push error, but keep going*/ HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "vfd swmr prep for flush or close failed") @@ -2070,7 +2069,6 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) if (H5F_VFD_SWMR_CONFIG(file)) { /* Set up the VFD SWMR LOG file */ - /* Kent*/ if (HDstrlen(vfd_swmr_config_ptr->log_file_path) > 0) shared->vfd_swmr_log_on = TRUE; if (TRUE == shared->vfd_swmr_log_on) { @@ -2082,7 +2080,6 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) if (H5_timer_start(&(shared->vfd_swmr_log_start_time)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't obtain the time from the HDF5 timer.") } - /* End of Kent */ /* Initialization for VFD SWMR writer and reader */ if (1 == shared->nrefs) { @@ -2205,14 +2202,16 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Success */ ret_value = file; -#if 1 /*Kent: write to the log file when H5F_open ends. Tested, can be commented out if necessary.*/ + /* Write to the log file when H5F_open ends. + * TODO: Tested, can be commented out if necessary. + */ H5F_POST_VFD_SWMR_LOG_ENTRY(file, FILE_OPEN, "File open ends"); -#endif + done: if ((NULL == ret_value) && file) { if (file->shared->root_grp && file->shared->nrefs == 1) { - if (H5AC_expunge_tag_type_metadata(file, H5G_oloc(file->shared->root_grp)->addr, H5AC_OHDR_ID, - H5AC__NO_FLAGS_SET, FALSE) < 0) + if (H5AC_expunge_all_tagged_metadata(file, H5G_oloc(file->shared->root_grp)->addr, H5AC_OHDR_ID, + H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, NULL, "unable to expunge root group tagged entries") } @@ -2358,7 +2357,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing) /* If this is a VFD SWMR writer, prep for flush or close */ if ((f->shared->vfd_swmr) && (f->shared->vfd_swmr_writer) && - (H5F_vfd_swmr_writer__prep_for_flush_or_close(f) < 0)) + (H5F_vfd_swmr_writer_prep_for_flush_or_close(f) < 0)) /* Push error, but keep going*/ HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "vfd swmr prep for flush or close failed") @@ -4114,142 +4113,3 @@ H5F_set_min_dset_ohdr(H5F_t *f, hbool_t minimize) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_min_dset_ohdr() */ - -/*------------------------------------------------------------------------- - * Function: H5F__vfd_swmr_end_tick() - * - * Purpose: To trigger end of tick processing - * - * Return: Non-negative on success/Negative on errors - *------------------------------------------------------------------------- - */ -herr_t -H5F__vfd_swmr_end_tick(H5F_t *f) -{ - eot_queue_entry_t *curr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - - /* The file should be opened with VFD SWMR configured.*/ - if (!(H5F_USE_VFD_SWMR(f))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "must have VFD SWMR configured for this public routine") - - /* Search EOT queue */ - TAILQ_FOREACH(curr, &eot_queue_g, link) - { - if (curr->vfd_swmr_file == f) - break; - } - - /* If the file does not exist on the EOT queue, flag an error */ - if (curr == NULL) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "EOT for the file has been disabled") - - if (f->shared->vfd_swmr_writer) { - if (H5F_vfd_swmr_writer_end_of_tick(f, true) < 0) - HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR writer"); - } - else if (H5F_vfd_swmr_reader_end_of_tick(f, true) < 0) { - HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR reader"); - } - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5F__vfd_swmr_end_tick() */ - -/*------------------------------------------------------------------------- - * Function: H5F__vfd_swmr_disable_end_of_tick() - * - * Purpose: To disable end of tick processing - * - * Return: Non-negative on success/Negative on errors - *------------------------------------------------------------------------- - */ -herr_t -H5F__vfd_swmr_disable_end_of_tick(H5F_t *f) -{ - eot_queue_entry_t *curr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - - /* The file should be opened with VFD SWMR configured.*/ - if (!(H5F_USE_VFD_SWMR(f))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "must have VFD SWMR configured for this public routine") - - /* Search EOT queue */ - TAILQ_FOREACH(curr, &eot_queue_g, link) - { - if (curr->vfd_swmr_file == f) - break; - } - - /* If the file does not exist on the EOT queue, flag an error */ - if (curr == NULL) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "EOT for the file has already been disabled") - - /* Remove the entry that corresponds to "f" from the EOT queue */ - if (H5F_vfd_swmr_remove_entry_eot(f) < 0) - HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to remove entry from EOT queue") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5F__vfd_swmr_disable_end_of_tick() */ - -/*------------------------------------------------------------------------- - * Function: H5F__vfd_swmr_enable_end_of_tick() - * - * Purpose: To enable end of tick processing - * - * Return: Non-negative on success/Negative on errors - *------------------------------------------------------------------------- - */ -herr_t -H5F__vfd_swmr_enable_end_of_tick(H5F_t *f) -{ - eot_queue_entry_t *curr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - - /* The file should be opened with VFD SWMR configured.*/ - if (!(H5F_USE_VFD_SWMR(f))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "must have VFD SWMR configured for this public routine") - - /* Search EOT queue */ - TAILQ_FOREACH(curr, &eot_queue_g, link) - { - if (curr->vfd_swmr_file == f) - break; - } - - /* If the file already exists on the EOT queue, flag an error */ - if (curr != NULL) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "EOT for the file has already been enabled") - - /* Insert the entry that corresponds to "f" onto the EOT queue */ - if (H5F_vfd_swmr_insert_entry_eot(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to insert entry into the EOT queue") - - /* Check if the tick has expired, if so call end of tick processing */ - if (H5F_vfd_swmr_process_eot_queue(true) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "error processing EOT queue") - - /* FUNC_LEAVE_API could do the check, but not so for reader_end_of_tick() */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5F__vfd_swmr_enable_end_of_tick() */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 2edcc60..ca714c1 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -153,6 +153,62 @@ /* Size of file consistency flags (status_flags) in the superblock */ #define H5F_SUPER_STATUS_FLAGS_SIZE(v) (v >= 2 ? 1 : 4) +/* VFD SMWR LOG REPORTING MACROS */ + +/* H5F_POST_VFD_SWMR_LOG_ENTRY is the macro that can help the developers debug VFD SWMR features. + * It calls an internal reporting function H5F_post_vfd_swmr_log_entry() that receives + * a log entry_type_code, which generates a log tag, and the message log_info, which + * the developers want to save into a log file. + * + * The macro H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, number_entry_production, m) is + * called by H5F_POST_VFD_SWMR_LOG_ENTRY when the HDF5 library is built with the + * production mode. Number_entry_production will control the number of entry tags that + * applications can receive. Currently this number is set to 1 and is subject to change + * when more tags are useful to be present to applications. + * + * The first argument of the macro is the HDF5 file pointer(H5F_t *). + * Its value needs to be checked to avoid a failure caused by "Low-Level File I/O " + * in the testhdf5 program, which involves the test of a non-existing HDF5 file. + */ + +#define H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info) \ + do { \ + if (fp != NULL) { \ + if (fp->shared != NULL) { \ + if (fp->shared->vfd_swmr_log_on == TRUE) { \ + H5F__post_vfd_swmr_log_entry(fp, entry_type_code, log_info); \ + } \ + } \ + } \ + } while (0) + +#define H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(fp, entry_type_code, max_code, log_info) \ + do { \ + if (entry_type_code < max_code) { \ + H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info); \ + } \ + } while (0) + +/* Note: change H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) on the following lines to + * H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, your_number_entry_production, m) + * as necessary. + */ +#ifndef NDEBUG +#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(f, c, m) +#else +#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) +#endif + +/* Macros for VFD SWMR log entry code + * Note: this should be consistent with const char *H5Fvfd_swmr_log_tags[] declared at + * H5Fvfd_swmr.c . + */ +#define EOT_PROCESSING_TIME 0 +#define FILE_OPEN 1 +#define FILE_CLOSE 2 +#define EOT_TRIGGER_TIME 3 +#define EOT_META_FILE_INDEX 4 + /* Forward declaration external file cache struct used below (defined in * H5Fefc.c) */ typedef struct H5F_efc_t H5F_efc_t; @@ -564,6 +620,8 @@ H5_DLL herr_t H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t hi H5_DLL herr_t H5F__get_cont_info(const H5F_t *f, H5VL_file_cont_info_t *info); H5_DLL herr_t H5F__parse_file_lock_env_var(htri_t *use_locks); H5_DLL herr_t H5F__delete(const char *filename, hid_t fapl_id); + +/* VFD SWMR routines */ H5_DLL herr_t H5F__vfd_swmr_end_tick(H5F_t *f); H5_DLL herr_t H5F__vfd_swmr_disable_end_of_tick(H5F_t *f); H5_DLL herr_t H5F__vfd_swmr_enable_end_of_tick(H5F_t *f); @@ -626,6 +684,9 @@ H5_DLL herr_t H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa); /* Functions that flush or evict */ H5_DLL herr_t H5F__evict_cache_entries(H5F_t *f); +/* VFD SWMR log functions */ +H5_DLL void H5F__post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, const char *log_info); + /* Testing functions */ #ifdef H5F_TESTING H5_DLL herr_t H5F__get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count); @@ -641,61 +702,4 @@ H5_DLL htri_t H5F__same_file_test(hid_t file_id1, hid_t file_id2); H5_DLL herr_t H5F__reparse_file_lock_variable_test(void); #endif /* H5F_TESTING */ -/* VFD SMWR LOG REPORTING MACROS */ - -/* H5F_POST_VFD_SWMR_LOG_ENTRY is the macro that can help the developers debug VFD SWMR features. - * It calls an internal reporting function H5F_post_vfd_swmr_log_entry() that receives - * a log entry_type_code, which generates a log tag, and the message log_info, which - * the developers want to save into a log file. - * - * The macro H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, number_entry_production, m) is - * called by H5F_POST_VFD_SWMR_LOG_ENTRY when the HDF5 library is built with the - * production mode. Number_entry_production will control the number of entry tags that - * applications can receive. Currently this number is set to 1 and is subject to change - * when more tags are useful to be present to applications. - * - * The first argument of the macro is the HDF5 file pointer(H5F_t *). - * Its value needs to be checked to avoid a failure caused by "Low-Level File I/O " - * in the testhdf5 program, which involves the test of a non-existing HDF5 file. - */ - -H5_DLL void H5F__post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, const char *log_info); - -#define H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info) \ - do { \ - if (fp != NULL) { \ - if (fp->shared != NULL) { \ - if (fp->shared->vfd_swmr_log_on == TRUE) { \ - H5F__post_vfd_swmr_log_entry(fp, entry_type_code, log_info); \ - } \ - } \ - } \ - } while (0) - -#define H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(fp, entry_type_code, max_code, log_info) \ - do { \ - if (entry_type_code < max_code) { \ - H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info); \ - } \ - } while (0) - -/* Note: change H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) on the following lines to - * H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, your_number_entry_production, m) - * as necessary. - */ -#ifndef NDEBUG -#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(f, c, m) -#else -#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) -#endif - -/* Macros for VFD SWMR log entry code - * Note: this should be consistent with const char *H5Fvfd_swmr_log_tags[] declared at - * H5Fvfd_swmr.c . - */ -#define EOT_PROCESSING_TIME 0 -#define FILE_OPEN 1 -#define FILE_CLOSE 2 -#define EOT_TRIGGER_TIME 3 -#define EOT_META_FILE_INDEX 4 #endif /* H5Fpkg_H */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index e94ee64..ffc369b 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -238,20 +238,6 @@ typedef struct H5F_t H5F_t; (p) += 8; \ } -static inline uint64_t -uint64_decode(uint8_t **pp) -{ - int i; - uint8_t *p = *pp; - uint64_t v = 0; - - for (i = 0; i < 8; i++) { - v = (v << 8) | p[7 - i]; - } - *pp += 8; - return v; -} - #define UINT64DECODE(p, n) \ { \ /* WE DON'T CHECK FOR OVERFLOW! */ \ @@ -388,10 +374,7 @@ uint64_decode(uint8_t **pp) #define H5F_THRESHOLD(F) ((F)->shared->threshold) #define H5F_PGEND_META_THRES(F) ((F)->shared->fs.pgend_meta_thres) #define H5F_POINT_OF_NO_RETURN(F) ((F)->shared->fs.point_of_no_return) -#define H5F_FIRST_ALLOC_DEALLOC(F) ((F)->shared->first_alloc_dealloc) -#define H5F_EOA_PRE_FSM_FSALLOC(F) ((F)->shared->eoa_pre_fsm_fsalloc) #define H5F_USE_VFD_SWMR(F) ((F)->shared->vfd_swmr) -#define H5F_VFD_SWMR_MD_EOA(F) ((F)->shared->vfd_swmr_md_eoa) #define H5F_NULL_FSM_ADDR(F) ((F)->shared->null_fsm_addr) #define H5F_GET_MIN_DSET_OHDR(F) ((F)->shared->crt_dset_min_ohdr_flag) #define H5F_SET_MIN_DSET_OHDR(F, V) ((F)->shared->crt_dset_min_ohdr_flag = (V)) @@ -455,9 +438,7 @@ uint64_decode(uint8_t **pp) #define H5F_THRESHOLD(F) (H5F_get_threshold(F)) #define H5F_PGEND_META_THRES(F) (H5F_get_pgend_meta_thres(F)) #define H5F_POINT_OF_NO_RETURN(F) (H5F_get_point_of_no_return(F)) -#define H5F_FIRST_ALLOC_DEALLOC(F) (H5F_get_first_alloc_dealloc(F)) -#define H5F_EOA_PRE_FSM_FSALLOC(F) (H5F_get_eoa_pre_fsm_fsalloc(F)) -#define H5F_USE_VFD_SWMR(F) (H5F_use_vfd_swmr(F)) +#define H5F_USE_VFD_SWMR(F) (H5F_get_use_vfd_swmr(F)) #define H5F_NULL_FSM_ADDR(F) (H5F_get_null_fsm_addr(F)) #define H5F_GET_MIN_DSET_OHDR(F) (H5F_get_min_dset_ohdr(F)) #define H5F_SET_MIN_DSET_OHDR(F, V) (H5F_set_min_dset_ohdr((F), (V))) @@ -641,16 +622,23 @@ uint64_decode(uint8_t **pp) /* Default configuration for VFD SWMR: not configured */ #define H5F_ACS_VFD_SWMR_CONFIG_NAME "vfd_swmr_config" +/* clang-format off */ #define H5F__DEFAULT_VFD_SWMR_CONFIG \ { \ - /* int32_t version = */ 0, /* int32_t tick_len = */ 0, \ - /* int32_t max_lag = */ 0, /* hbool_t vfd_swmr_writer = */ FALSE, \ - /* hbool_t maintain_metadata_file = */ FALSE, \ - /* hbool_t generate_updater_files = */ FALSE, \ - /* hbool_t flush_raw_data = */ FALSE, /* int32_t md_pages_reserved = */ 0, \ - /* int32_t pb_expansion_threshold = */ 0, /* char md_file_path[] = */ "", \ - /* char updater_file_path[] = */ "", /* char log_file_path[] = */ "" \ + /* int32_t version = */ 0, \ + /* int32_t tick_len = */ 0, \ + /* int32_t max_lag = */ 0, \ + /* hbool_t vfd_swmr_writer = */ FALSE, \ + /* hbool_t maintain_metadata_file = */ FALSE, \ + /* hbool_t generate_updater_files = */ FALSE, \ + /* hbool_t flush_raw_data = */ FALSE, \ + /* int32_t md_pages_reserved = */ 0, \ + /* int32_t pb_expansion_threshold = */ 0, \ + /* char md_file_path[] = */ "", \ + /* char updater_file_path[] = */ "", \ + /* char log_file_path[] = */ "" \ } +/* clang-format on */ /* For VFD SWMR testing only: private property to generate checksum for metadata file via callback */ #define H5F_ACS_GENERATE_MD_CK_CB_NAME "generate md ck callback" @@ -841,18 +829,6 @@ uint64_decode(uint8_t **pp) + H5F_SIZEOF_CHKSUM /* Updater file change list checksum */ \ ) -/* - * For VFD SWMR testing only: - */ - -/* Callback routine to generate checksum for metadata file specified by md_path */ -typedef herr_t (*H5F_generate_md_ck_t)(char *md_path, uint64_t updater_seq_num); - -/* Structure for "generate checksum callback" private property */ -typedef struct H5F_generate_md_ck_cb_t { - H5F_generate_md_ck_t func; -} H5F_generate_md_ck_cb_t; - /****************************/ /* Library Private Typedefs */ /****************************/ @@ -865,6 +841,7 @@ struct H5O_loc_t; struct H5HG_heap_t; struct H5VL_class_t; struct H5P_genplist_t; +struct H5FD_vfd_swmr_idx_entry_t; /* Forward declarations for anonymous H5F objects */ @@ -929,6 +906,44 @@ typedef enum H5F_prefix_open_t { /*---------------------------------------------------------------------------- * + * struct eot_queue_entry_t + * + * This is the structure for an entry on the end-of-tick queue (EOT queue) of files + * opened in either VFD SWMR write or VFD SWMR read mode. This queue is maintained + * in increasing end of tick time order. + * The structure contains all information required to determine whether the end + * of tick has arrived for the specified file, and to initiate end of tick processing + * if it has. + * + * The fields of eot_queue_entry_t are discussed below: + * + * vfd_swmr_file: Pointer to the instance of H5F_shared_t containing the shared + * fields of the associated file that has been opened in VFD SWMR mode + * NOTE: for the time being use H5F_t instead of H5F_shared_t + * + * vfd_swmr_writer: Boolean flag that is set to TRUE if the associated file + * has been opened in VFD SWMR writer mode, and FALSE if it has been + * opened in VFD SWMR reader mode. + * + * tick_num: Number of the current tick of the target file. + * + * end_of_tick: Expiration time of the current tick of the target file. + * + * link: Forward and backward linkage between the next element and the previous + * element (or the queue head). Note that if there is a following entry, + * `next`, then `next->end_of_tick` must be greater than or equal to + * `end_of_tick`. + */ +typedef struct eot_queue_entry { + hbool_t vfd_swmr_writer; + uint64_t tick_num; + struct timespec end_of_tick; + H5F_t * vfd_swmr_file; + TAILQ_ENTRY(eot_queue_entry) link; +} eot_queue_entry_t; + +/*---------------------------------------------------------------------------- + * * struct H5F_vfd_swmr_updater_cl_entry_t * * An array of instances of H5F_vfd_swmr_updater_cl_entry_t of length equal to @@ -1097,6 +1112,14 @@ typedef struct H5F_vfd_swmr_updater_t { H5F_vfd_swmr_updater_cl_entry_t *change_list; } H5F_vfd_swmr_updater_t; +/* Callback routine to generate checksum for metadata file specified by md_path */ +typedef herr_t (*H5F_generate_md_ck_t)(char *md_path, uint64_t updater_seq_num); + +/* Structure for "generate checksum callback" private property */ +typedef struct H5F_generate_md_ck_cb_t { + H5F_generate_md_ck_t func; +} H5F_generate_md_ck_cb_t; + /*****************************/ /* Library-private Variables */ /*****************************/ @@ -1189,7 +1212,22 @@ H5_DLL herr_t H5F_shared_get_file_driver(const H5F_shared_t *f_sh, H5FD_t **fil H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle); /* VFD SWMR functions */ -H5_DLL hbool_t H5F_use_vfd_swmr(const H5F_t *f); +H5_DLL hbool_t H5F_get_use_vfd_swmr(const H5F_t *f); +H5_DLL herr_t H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create); +H5_DLL herr_t H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing); +H5_DLL herr_t H5F_update_vfd_swmr_metadata_file(H5F_t *f, uint32_t index_len, + H5FD_vfd_swmr_idx_entry_t *index); +H5_DLL herr_t H5F_vfd_swmr_writer_delay_write(H5F_shared_t *shared, uint64_t page, uint64_t *untilp); +H5_DLL herr_t H5F_vfd_swmr_writer_prep_for_flush_or_close(H5F_t *f); +H5_DLL herr_t H5F_vfd_swmr_writer_end_of_tick(H5F_t *f); +H5_DLL herr_t H5F_vfd_swmr_writer_dump_index(H5F_shared_t *shared); +H5_DLL herr_t H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api); +H5_DLL herr_t H5F_vfd_swmr_remove_entry_eot(H5F_t *f); +H5_DLL herr_t H5F_vfd_swmr_insert_entry_eot(H5F_t *f); +H5_DLL void H5F_vfd_swmr_update_entry_eot(eot_queue_entry_t *entry); +H5_DLL herr_t H5F_dump_eot_queue(void); +H5_DLL herr_t H5F_shadow_image_defer_free(H5F_shared_t *shared, const H5FD_vfd_swmr_idx_entry_t *entry); +H5_DLL H5FD_vfd_swmr_idx_entry_t *H5F_vfd_swmr_enlarge_shadow_index(H5F_t *f); /* File mounting routines */ H5_DLL herr_t H5F_mount(const struct H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id); diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 6d292bf..e9d3340 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -1820,14 +1820,6 @@ H5_DLL herr_t H5Fvfd_swmr_disable_end_of_tick(hid_t file_id); * \todo Add missing documentation */ H5_DLL herr_t H5Fvfd_swmr_enable_end_of_tick(hid_t file_id); -/** - * \todo Add missing documentation - */ -H5_DLL bool vfd_swmr_writer_may_increase_tick_to(uint64_t, bool); -/** - * \todo Add missing documentation - */ -H5_DLL void vfd_swmr_reader_did_increase_tick_to(uint64_t); #ifdef H5_HAVE_PARALLEL /** diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 2665505..acdf521 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -1344,18 +1344,15 @@ H5F_get_file_locking(const H5F_t *f) } /* end H5F_get_file_locking */ /*------------------------------------------------------------------------- - * Function: H5F_use_vfd_swmr + * Function: H5F_get_use_vfd_swmr * - * Purpose: Quick and dirty routine to determine if VFD SWMR is - * enabled for this file. - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) + * Purpose: Determine if VFD SWMR is enabled for this file. * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) + * Return: TRUE/FALSE *------------------------------------------------------------------------- */ hbool_t -H5F_use_vfd_swmr(const H5F_t *f) +H5F_get_use_vfd_swmr(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Ftest.c b/src/H5Ftest.c index f4a89fd..01c9706 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -416,9 +416,10 @@ H5F__vfd_swmr_decode_md_hdr(int md_fd, H5FD_vfd_swmr_md_header *md_hdr) UINT32DECODE(p, md_hdr->fs_page_size); UINT64DECODE(p, md_hdr->tick_num); UINT64DECODE(p, md_hdr->index_offset); - if ((index_length = uint64_decode(&p)) > SIZE_MAX) { + UINT64DECODE(p, index_length); + if (index_length > SIZE_MAX) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "index is too long") - } + md_hdr->index_length = (size_t)index_length; done: @@ -568,16 +569,27 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__vfd_swmr_verify_md_hdr_and_idx() */ +/*------------------------------------------------------------------------- + * Function: H5F__count_shadow_defrees + * + * Purpose: + * + * Return: SUCCEED/FAIL + * + *------------------------------------------------------------------------- + */ static unsigned -count_shadow_defrees(shadow_defree_queue_t *shadow_defrees) +H5F__count_shadow_defrees(shadow_defree_queue_t *shadow_defrees) { shadow_defree_t *shadow_defree; unsigned count = 0; + FUNC_ENTER_STATIC_NOERR + TAILQ_FOREACH(shadow_defree, shadow_defrees, link) count++; - return count; + FUNC_LEAVE_NOAPI(count) } /*------------------------------------------------------------------------- @@ -618,7 +630,7 @@ H5F__vfd_swmr_writer_md_test(hid_t file_id, unsigned num_entries, H5FD_vfd_swmr_ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "error updating the md file with the index") /* Verify the number of entries in the delayed list is as expected */ - if (count_shadow_defrees(&f->shared->shadow_defrees) == nshadow_defrees) + if (H5F__count_shadow_defrees(&f->shared->shadow_defrees) == nshadow_defrees) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "incorrect # of entries in the delayed list") /* Open the metadata file */ diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index 06d0c0d..84beefc 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -11,12 +11,9 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- + * Created: H5Fvfd_swmr.c * - * Created: H5Fvfd_swmr.c - * Oct 10 2019 - * - * Purpose: Functions for VFD SWMR. - * + * Purpose: File functions for VFD SWMR *------------------------------------------------------------------------- */ @@ -52,8 +49,8 @@ /* Local Macros */ /****************/ -#define nanosecs_per_second 1000000000 /* nanoseconds per second */ -#define nanosecs_per_tenth_sec 100000000 /* nanoseconds per 0.1 second */ +#define NANOSECS_PER_SECOND 1000000000 /* nanoseconds per second */ +#define NANOSECS_PER_TENTH_SEC 100000000 /* nanoseconds per 0.1 second */ /* Declare an array of string to identify the VFD SMWR Log tags. * Note this array is used to generate the entry tag by the log reporting macro @@ -103,7 +100,7 @@ static herr_t H5F__vfd_swmr_construct_write_md_idx(H5F_shared_t *, uint32_t, struct H5FD_vfd_swmr_idx_entry_t[], uint8_t *); static herr_t H5F__idx_entry_cmp(const void *_entry1, const void *_entry2); static herr_t H5F__vfd_swmr_create_index(H5F_shared_t *); -static herr_t H5F__vfd_swmr_writer__wait_a_tick(H5F_t *); +static herr_t H5F__vfd_swmr_writer_wait_a_tick(H5F_t *); static herr_t H5F__vfd_swmr_construct_ud_hdr(H5F_vfd_swmr_updater_t *updater); static herr_t H5F__vfd_swmr_construct_ud_cl(H5F_vfd_swmr_updater_t *updater); @@ -116,20 +113,15 @@ static herr_t H5F__generate_updater_file(H5F_t *f, uint32_t num_entries, uint16_ /* Package Variables */ /*********************/ -/* - * Globals for VFD SWMR +/* Globals for VFD SWMR */ + +/* Times the library was entered and re-entered minus the times it was exited. + * We only perform the end-of-tick processing on the 0->1 and 1->0 transitions. */ +unsigned int vfd_swmr_api_entries_g = 0; -unsigned int vfd_swmr_api_entries_g = 0; /* Times the library was entered - * and re-entered minus the times - * it was exited. We only perform - * the end-of-tick processing - * on the 0->1 and 1->0 - * transitions. - */ -/* - * The head of the end of tick queue (EOT queue) for files opened in either - * VFD SWMR write or VFD SWMR read mode +/* The head of the end of tick queue (EOT queue) for files opened in either + * VFD SWMR write or VFD SWMR read mode */ eot_queue_t eot_queue_g = TAILQ_HEAD_INITIALIZER(eot_queue_g); @@ -144,7 +136,6 @@ H5FL_DEFINE(shadow_defree_t); H5FL_DEFINE(eot_queue_entry_t); /*------------------------------------------------------------------------- - * * Function: H5F_vfd_swmr_init * * Purpose: Initialize globals and the corresponding fields in @@ -168,11 +159,6 @@ H5FL_DEFINE(eot_queue_entry_t); * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Vailin Choi -- 10/??/18 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t @@ -208,9 +194,9 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create) md_size = (hsize_t)shared->vfd_swmr_config.md_pages_reserved * shared->fs_page_size; - if ((hdr_addr = H5MV_alloc(f, md_size)) == HADDR_UNDEF) { - HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error allocating shadow-file header"); - } + if ((hdr_addr = H5MV_alloc(f, md_size)) == HADDR_UNDEF) + HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error allocating shadow-file header") + HDassert(H5F_addr_eq(hdr_addr, H5FD_MD_HEADER_OFF)); shared->writer_index_offset = H5FD_MD_HEADER_SIZE; @@ -222,10 +208,10 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create) if (!file_create) { if (H5F__vfd_swmr_construct_write_md_idx(shared, 0, NULL, md_idx_image) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create index in md"); + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create index in md") if (H5F__vfd_swmr_construct_write_md_hdr(shared, 0, md_hdr_image) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create header in md"); + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create header in md") } /* For VFD SWMR testing: invoke callback if set to generate metadata file checksum */ @@ -274,28 +260,18 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create) /* allocate an index to save the initial index */ if (H5F__vfd_swmr_create_index(shared) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate metadata file index"); + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate metadata file index") /* Set tick_num to the current tick read from the metadata file */ shared->mdf_idx_entries_used = shared->mdf_idx_len; if (H5FD_vfd_swmr_get_tick_and_idx(shared->lf, FALSE, &shared->tick_num, &(shared->mdf_idx_entries_used), shared->mdf_idx) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTLOAD, FAIL, "unable to load/decode metadata file"); - - vfd_swmr_reader_did_increase_tick_to(shared->tick_num); - -#if 0 /* JRM */ - HDfprintf(stderr, - "##### initialized index: tick/used/len = %lld/%d/%d #####\n", - shared->tick_num, shared->mdf_idx_entries_used, - shared->mdf_idx_len); -#endif /* JRM */ + HGOTO_ERROR(H5E_FILE, H5E_CANTLOAD, FAIL, "unable to load/decode metadata file") } /* Update end_of_tick */ - if (H5F__vfd_swmr_update_end_of_tick_and_tick_num(shared, FALSE) < 0) { - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to update end of tick"); - } + if (H5F__vfd_swmr_update_end_of_tick_and_tick_num(shared, FALSE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to update end of tick") done: @@ -304,7 +280,6 @@ done: } /* H5F_vfd_swmr_init() */ /*------------------------------------------------------------------------- - * * Function: H5F_vfd_swmr_close_or_flush * * Purpose: Used by the VFD SWMR writer when the HDF5 file is closed @@ -325,11 +300,6 @@ done: * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/??/18 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t @@ -348,17 +318,17 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing) /* Write empty index to the md file */ if (H5F__vfd_swmr_construct_write_md_idx(shared, 0, NULL, md_idx_image) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create index in md"); + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create index in md") /* Write header to the md file */ if (H5F__vfd_swmr_construct_write_md_hdr(shared, 0, md_hdr_image) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create header in md"); + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create header in md") if (closing) { /* For file close */ /* Close the md file */ if (HDclose(shared->vfd_swmr_md_fd) < 0) - HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close the metadata file"); + HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close the metadata file") shared->vfd_swmr_md_fd = -1; /* For VFD SWMR testing: invoke callback if set to generate metadata file checksum */ @@ -369,12 +339,12 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing) /* Unlink the md file */ if (HDunlink(shared->vfd_swmr_config.md_file_path) < 0) - HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, FAIL, "unable to unlink the metadata file"); + HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, FAIL, "unable to unlink the metadata file") /* Close the free-space manager for the metadata file */ if (H5MV_close(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, - "unable to close the free-space manager for the metadata file"); + "unable to close the free-space manager for the metadata file") /* Free the delayed list */ while ((curr = TAILQ_FIRST(&shared->shadow_defrees)) != NULL) { @@ -394,51 +364,68 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing) else { /* For file flush */ /* Update end_of_tick */ if (H5F__vfd_swmr_update_end_of_tick_and_tick_num(shared, TRUE) < 0) - HDONE_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to update end of tick"); + HDONE_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to update end of tick") } -#if 1 /*Kent Save the end of close info. to the log file, subject to comment out. */ +#if 1 /* Save the end of close info. to the log file, subject to comment out. */ if (closing) H5F_POST_VFD_SWMR_LOG_ENTRY(f, FILE_CLOSE, "VFD SWMR File close ends"); #endif done: - /* Kent: Stop the timer and close the VFD SWMR log file if it is turned on. - * Please REVIEW to ensure this is the right place to + /* Stop the timer and close the VFD SWMR log file if it is turned on. + * TODO: Please REVIEW to ensure this is the right place to * close the log file. */ if (shared->vfd_swmr_log_on && closing) { H5_timer_stop(&(shared->vfd_swmr_log_start_time)); HDfclose(shared->vfd_swmr_log_file_ptr); } - /* Kent */ + FUNC_LEAVE_NOAPI(ret_value) } -static int -shadow_range_defer_free(H5F_shared_t *shared, uint64_t offset, uint32_t length) +/*------------------------------------------------------------------------- + * Function: H5F__shadow_image_defer_free + * + * Purpose: + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +static herr_t +H5F__shadow_range_defer_free(H5F_shared_t *shared, uint64_t offset, uint32_t length) { shadow_defree_t *shadow_defree; if (NULL == (shadow_defree = H5FL_CALLOC(shadow_defree_t))) - return -1; + return FAIL; shadow_defree->offset = offset; shadow_defree->length = length; shadow_defree->tick_num = shared->tick_num; TAILQ_INSERT_HEAD(&shared->shadow_defrees, shadow_defree, link); - return 0; + + return SUCCEED; } -int -shadow_image_defer_free(H5F_shared_t *shared, const H5FD_vfd_swmr_idx_entry_t *entry) +/*------------------------------------------------------------------------- + * Function: H5F_shadow_image_defer_free + * + * Purpose: + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +herr_t +H5F_shadow_image_defer_free(H5F_shared_t *shared, const H5FD_vfd_swmr_idx_entry_t *entry) { - return shadow_range_defer_free(shared, entry->md_file_page_offset * shared->fs_page_size, entry->length); + return H5F__shadow_range_defer_free(shared, entry->md_file_page_offset * shared->fs_page_size, + entry->length); } /*------------------------------------------------------------------------- - * - * Function: H5F_update_vfd_swmr_metadata_file() + * Function: H5F_update_vfd_swmr_metadata_file * * Purpose: Update the metadata file with the input index * @@ -462,12 +449,6 @@ shadow_image_defer_free(H5F_shared_t *shared, const H5FD_vfd_swmr_idx_entry_t *e * free-space manager * * Return: SUCCEED/FAIL - * - * Programmer: Vailin Choi 11/??/18 - * - * Changes: None. - * - * *------------------------------------------------------------------------- */ herr_t @@ -513,7 +494,7 @@ H5F_update_vfd_swmr_metadata_file(H5F_t *f, uint32_t num_entries, H5FD_vfd_swmr_ /* Prepend previous image of the entry to the delayed list */ if (index[i].md_file_page_offset) { - if (shadow_image_defer_free(shared, &index[i]) == -1) { + if (H5F_shadow_image_defer_free(shared, &index[i]) == -1) { HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate the delayed entry") } } @@ -528,22 +509,6 @@ H5F_update_vfd_swmr_metadata_file(H5F_t *f, uint32_t num_entries, H5FD_vfd_swmr_ index[i].md_file_page_offset = md_addr / shared->fs_page_size; index[i].checksum = H5_checksum_metadata(index[i].entry_ptr, index[i].length, 0); -#if 0 /* JRM */ - HDfprintf(stderr, - "writing index[%d] fo/mdfo/l/checksum/fc/lc = %lld/%lld/%ld/%lx/%lx/%lx\n", - i, - index[i].hdf5_page_offset, - index[i].md_file_page_offset, - index[i].length, - index[i].checksum, - (((char*)(index[i].entry_ptr))[0]), - (((char*)(index[i].entry_ptr))[4095])); - - HDassert(md_addr == index[i].md_file_page_offset * - shared->fs_page_size); - HDassert(shared->fs_page_size == 4096); -#endif /* JRM */ - if (shared->vfd_swmr_config.maintain_metadata_file) { /* Seek and write the entry to the metadata file */ @@ -594,13 +559,11 @@ H5F_update_vfd_swmr_metadata_file(H5F_t *f, uint32_t num_entries, H5FD_vfd_swmr_ TAILQ_FOREACH_REVERSE_SAFE(shadow_defree, &shared->shadow_defrees, shadow_defree_queue, link, prev) { - if (shadow_defree->tick_num + shared->vfd_swmr_config.max_lag > shared->tick_num) { + if (shadow_defree->tick_num + shared->vfd_swmr_config.max_lag > shared->tick_num) break; // No more entries are due for reclamation. - } - if (H5MV_free(f, shadow_defree->offset, shadow_defree->length) < 0) { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry"); - } + if (H5MV_free(f, shadow_defree->offset, shadow_defree->length) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry") TAILQ_REMOVE(&shared->shadow_defrees, shadow_defree, link); @@ -622,16 +585,14 @@ H5F_update_vfd_swmr_metadata_file(H5F_t *f, uint32_t num_entries, H5FD_vfd_swmr_ done: - if (md_idx_image) - HDfree(md_idx_image); + HDfree(md_idx_image); FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_update_vfd_swmr_metadata_file() */ /*------------------------------------------------------------------------- - * - * Function: H5F_vfd_swmr_writer__delay_write + * Function: H5F_vfd_swmr_writer_delay_write * * Purpose: Given the base address of a page of metadata, or of a multi- * page metadata entry, determine whether the write must be @@ -662,15 +623,10 @@ done: * or equal to the current tick, or zero otherwise. * * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 11/4/18 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t -H5F_vfd_swmr_writer__delay_write(H5F_shared_t *shared, uint64_t page, uint64_t *untilp) +H5F_vfd_swmr_writer_delay_write(H5F_shared_t *shared, uint64_t page, uint64_t *untilp) { uint64_t until; H5FD_vfd_swmr_idx_entry_t *ie_ptr; @@ -687,16 +643,14 @@ H5F_vfd_swmr_writer__delay_write(H5F_shared_t *shared, uint64_t page, uint64_t * HDassert(idx != NULL || shared->tick_num <= 1); - /* do a binary search on the metadata file index to see if - * it already contains an entry for `page`. + /* Do a binary search on the metadata file index to see if + * it already contains an entry for `page` */ - if (idx == NULL) { + if (idx == NULL) ie_ptr = NULL; - } - else { - ie_ptr = vfd_swmr_pageno_to_mdf_idx_entry(idx, shared->mdf_idx_entries_used, page, FALSE); - } + else + ie_ptr = H5FD_vfd_swmr_pageno_to_mdf_idx_entry(idx, shared->mdf_idx_entries_used, page, FALSE); if (ie_ptr == NULL) until = shared->tick_num + shared->vfd_swmr_config.max_lag; @@ -715,11 +669,10 @@ done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5F_vfd_swmr_writer__delay_write() */ +} /* H5F_vfd_swmr_writer_delay_write() */ /*------------------------------------------------------------------------- - * - * Function: H5F_vfd_swmr_writer__prep_for_flush_or_close + * Function: H5F_vfd_swmr_writer_prep_for_flush_or_close * * Purpose: In the context of the VFD SWMR writer, two issues must be * addressed before the page buffer can be flushed -- as is @@ -735,15 +688,10 @@ done: * This function manages these details. * * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 11/27/18 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t -H5F_vfd_swmr_writer__prep_for_flush_or_close(H5F_t *f) +H5F_vfd_swmr_writer_prep_for_flush_or_close(H5F_t *f) { herr_t ret_value = SUCCEED; /* Return value */ H5F_shared_t *shared = f->shared; @@ -758,14 +706,11 @@ H5F_vfd_swmr_writer__prep_for_flush_or_close(H5F_t *f) * tick so as to avoid attempts to flush entries on the page buffer * tick list that were modified during the current tick. */ - if (H5F_vfd_swmr_writer_end_of_tick(f, TRUE) < 0) - + if (H5F_vfd_swmr_writer_end_of_tick(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "H5F_vfd_swmr_writer_end_of_tick() failed.") while (shared->page_buf->dwl_len > 0) { - - if (H5F__vfd_swmr_writer__wait_a_tick(f) < 0) - + if (H5F__vfd_swmr_writer_wait_a_tick(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "wait a tick failed.") } @@ -773,10 +718,10 @@ done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5F_vfd_swmr_writer__prep_for_flush_or_close() */ +} /* H5F_vfd_swmr_writer_prep_for_flush_or_close() */ static int -clean_shadow_index(H5F_t *f, uint32_t nentries, H5FD_vfd_swmr_idx_entry_t *idx, uint32_t *ndeletedp) +H5F__clean_shadow_index(H5F_t *f, uint32_t nentries, H5FD_vfd_swmr_idx_entry_t *idx, uint32_t *ndeletedp) { H5F_shared_t * shared = f->shared; uint32_t i, j, ndeleted, max_lag = shared->vfd_swmr_config.max_lag; @@ -792,7 +737,7 @@ clean_shadow_index(H5F_t *f, uint32_t nentries, H5FD_vfd_swmr_idx_entry_t *idx, HDassert(ie->entry_ptr == NULL); if (ie->md_file_page_offset != 0) { - if (shadow_image_defer_free(shared, ie) == -1) + if (H5F_shadow_image_defer_free(shared, ie) == -1) return -1; ie->md_file_page_offset = 0; } @@ -808,7 +753,6 @@ clean_shadow_index(H5F_t *f, uint32_t nentries, H5FD_vfd_swmr_idx_entry_t *idx, } /*------------------------------------------------------------------------- - * * Function: H5F_vfd_swmr_writer_end_of_tick * * Purpose: Main routine for managing the end of tick for the VFD @@ -858,15 +802,10 @@ clean_shadow_index(H5F_t *f, uint32_t nentries, H5FD_vfd_swmr_idx_entry_t *idx, * In passing, generate log entries as appropriate. * * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 11/4/18 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t -H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) +H5F_vfd_swmr_writer_end_of_tick(H5F_t *f) { H5F_shared_t *shared = f->shared; uint32_t idx_entries_added = 0; @@ -877,10 +816,10 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) herr_t ret_value = SUCCEED; /* Return value */ hbool_t incr_tick = FALSE; - /* Kent: define the local variables to calculate the EOT time - and write them to the log file. */ + /* Local variables to calculate the EOT time and write to the log file */ H5_timevals_t current_time; - double start_elapsed_time, end_elapsed_time; + double start_elapsed_time = 0.0; + double end_elapsed_time = 0.0; unsigned int temp_time; char * log_msg; @@ -890,17 +829,12 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) HDassert(shared->page_buf); HDassert(shared->vfd_swmr_writer); - /* Kent */ /* Obtain the starting time for the logging info: the processing time of this function. */ - if (shared->vfd_swmr_log_on == true) { + if (shared->vfd_swmr_log_on == TRUE) { if (H5_timer_get_times(shared->vfd_swmr_log_start_time, ¤t_time) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time from H5_timer_get_times") start_elapsed_time = current_time.elapsed; } - /* Kent */ - - if (!vfd_swmr_writer_may_increase_tick_to(shared->tick_num + 1, wait_for_reader)) - goto update_eot; incr_tick = TRUE; @@ -966,8 +900,8 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) * to the HDF5 file more than max_lag ticks ago, and haven't * been modified since. */ - if (clean_shadow_index(f, shared->mdf_idx_entries_used + idx_entries_added, shared->mdf_idx, - &idx_entries_removed) < 0) + if (H5F__clean_shadow_index(f, shared->mdf_idx_entries_used + idx_entries_added, shared->mdf_idx, + &idx_entries_removed) < 0) HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "can't clean shadow file index") /* 6) Update the metadata file. Must do this before we @@ -989,27 +923,18 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) HDassert(shared->mdf_idx_entries_used <= shared->mdf_idx_len); -#if 0 /* JRM */ - H5F__vfd_swmr_writer__dump_index(f); -#endif /* JRM */ - /* 7) Release the page buffer tick list. */ if (H5PB_vfd_swmr__release_tick_list(shared) < 0) - HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "can't release tick list") /* 8) Release any delayed writes whose delay has expired */ if (H5PB_vfd_swmr__release_delayed_writes(shared) < 0) - HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "can't release delayed writes") -update_eot: - /* 9) Increment the tick, and update the end of tick. */ /* Update end_of_tick */ if (H5F__vfd_swmr_update_end_of_tick_and_tick_num(shared, incr_tick) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to update end of tick") /* Remove the entry from the EOT queue */ @@ -1021,8 +946,8 @@ update_eot: HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to insert entry into the EOT queue") done: - /* Kent: Calculate the processing time and write the time info to the log file */ - if (shared->vfd_swmr_log_on == true) { + /* Calculate the processing time and write the time info to the log file */ + if (shared->vfd_swmr_log_on == TRUE) { if (H5_timer_get_times(shared->vfd_swmr_log_start_time, ¤t_time) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time from H5_timer_get_times") end_elapsed_time = current_time.elapsed; @@ -1033,26 +958,20 @@ done: HDfree(log_msg); } } - /* Kent */ + FUNC_LEAVE_NOAPI(ret_value) } /*------------------------------------------------------------------------- - * - * Function: H5F_vfd_swmr_writer__dump_index + * Function: H5F_vfd_swmr_writer_dump_index * * Purpose: Dump a summary of the metadata file index. * * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 12/14/19 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t -H5F_vfd_swmr_writer__dump_index(H5F_shared_t *shared) +H5F_vfd_swmr_writer_dump_index(H5F_shared_t *shared) { unsigned int i; uint32_t mdf_idx_len; @@ -1074,15 +993,13 @@ H5F_vfd_swmr_writer__dump_index(H5F_shared_t *shared) HDfprintf(stderr, "index len / entries used = %" PRIu32 " / %" PRIu32 "\n\n", mdf_idx_len, mdf_idx_entries_used); - for (i = 0; i < mdf_idx_entries_used; i++) { - + for (i = 0; i < mdf_idx_entries_used; i++) HDfprintf(stderr, "%u: %" PRIu64 " %" PRIu64 " %" PRIu32 "\n", i, index[i].hdf5_page_offset, index[i].md_file_page_offset, index[i].length); - } FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F_vfd_swmr_writer__dump_index() */ +} /* end H5F_vfd_swmr_writer_dump_index() */ /*------------------------------------------------------------------------- * Function: H5F_vfd_swmr_reader_end_of_tick @@ -1116,11 +1033,6 @@ H5F_vfd_swmr_writer__dump_index(H5F_shared_t *shared) * 9) Increment the tick, and update the end of tick. * * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 12/29/18 - * - * Changes: None. - * *------------------------------------------------------------------------- */ herr_t @@ -1168,23 +1080,17 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) /* This is ok if we're entering the API, but it should * not happen if we're exiting the API. */ - /* JRM review this */ + /* TODO: review this */ /* The following line is added for more meaningful error message when * the long running API on the reader side exceeds the max_lag of ticks. - * KY 2021-09-02 - * */ + */ if (!entering_api && tmp_tick_num >= shared->tick_num + shared->vfd_swmr_config.max_lag) { HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "Reader's API time exceeds max_lag ticks, suggest to increase the value of max_lag."); } -#if 0 /* Kent */ - /* The original code */ - HDassert(entering_api || tmp_tick_num < shared->tick_num + shared->vfd_swmr_config.max_lag); -#endif - if (!entering_api) { + if (!entering_api) H5FD_vfd_swmr_record_elapsed_ticks(shared->lf, tmp_tick_num - shared->tick_num); - } if (tmp_tick_num != shared->tick_num) { const H5FD_vfd_swmr_idx_entry_t *new_mdf_idx; @@ -1239,11 +1145,6 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) mdf_idx_entries_used = shared->mdf_idx_len; -#if 0 /* JRM */ - HDfprintf(stderr, "--- reader EOT mdf_idx_entries_used = %d ---\n", - mdf_idx_entries_used); -#endif /* JRM */ - if (H5FD_vfd_swmr_get_tick_and_idx(file, FALSE, NULL, &mdf_idx_entries_used, shared->mdf_idx) < 0) HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error in retrieving tick_num from driver"); @@ -1251,18 +1152,12 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) shared->mdf_idx_entries_used = mdf_idx_entries_used; -#if 0 /* JRM */ - HDfprintf(stderr, - "--- reader EOT index used / len = %" PRIu32 "/%" PRIu32 " ---\n", - shared->mdf_idx_entries_used, shared->mdf_idx_len); -#endif /* JRM */ - new_mdf_idx = shared->mdf_idx; old_mdf_idx = shared->old_mdf_idx; new_mdf_idx_entries_used = shared->mdf_idx_entries_used; old_mdf_idx_entries_used = shared->old_mdf_idx_entries_used; - change = malloc(sizeof(change[0]) * (old_mdf_idx_entries_used + new_mdf_idx_entries_used)); + change = HDmalloc(sizeof(change[0]) * (old_mdf_idx_entries_used + new_mdf_idx_entries_used)); if (change == NULL) { HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate removed pages list"); @@ -1296,13 +1191,7 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) * extension could overlap with a second entry. */ - /* JRM review this */ - /* Kent: need to comment out the line to make reader iterate - * a large number of groups - * */ -#if 0 /*Kent*/ - HDassert(oent->length == nent->length); -#endif + /* TODO: review this */ /* This is a bug uncovered by issue #1 of the * group test failures. See Kent's documentation * "Designed to Fail Tests and Issues". @@ -1386,11 +1275,6 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) } } -#if 0 /* JRM */ - HDfprintf(stderr, "--- reader EOT pre new tick index " - "used/len = %" PRIu32 "/ %" PRIu32 " ---\n", - shared->mdf_idx_entries_used, shared->mdf_idx_len); -#endif /* JRM */ shared->max_jump_ticks = MAX(shared->max_jump_ticks, (tmp_tick_num - shared->tick_num)); /* At this point, we should have evicted or refreshed all stale @@ -1400,8 +1284,6 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) */ shared->tick_num = tmp_tick_num; - vfd_swmr_reader_did_increase_tick_to(tmp_tick_num); - /* Update end_of_tick */ if (H5F__vfd_swmr_update_end_of_tick_and_tick_num(shared, FALSE) < 0) { HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to update end of tick"); @@ -1409,29 +1291,37 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) } /* Remove the entry from the EOT queue */ - if (H5F_vfd_swmr_remove_entry_eot(f) < 0) { + if (H5F_vfd_swmr_remove_entry_eot(f) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to remove entry from EOT queue") - } /* Re-insert the entry that corresponds to f onto the EOT queue */ - if (H5F_vfd_swmr_insert_entry_eot(f) < 0) { + if (H5F_vfd_swmr_insert_entry_eot(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to insert entry into the EOT queue") - } done: if (change != NULL) - free(change); + HDfree(change); FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_vfd_swmr_reader_end_of_tick() */ +/*------------------------------------------------------------------------- + * Function: H5F__vfd_swmr_insert_eot_entry + * + * Purpose: Insert an entry in the EOT queue + * + * Return: void + *------------------------------------------------------------------------- + */ static void -insert_eot_entry(eot_queue_entry_t *entry_ptr) +H5F__vfd_swmr_insert_eot_entry(eot_queue_entry_t *entry_ptr) { eot_queue_entry_t *prec_ptr; /* The predecessor entry on the EOT end of tick queue */ + FUNC_ENTER_STATIC_NOERR + /* Find the insertion point for the entry on the EOT queue */ TAILQ_FOREACH_REVERSE(prec_ptr, &eot_queue_g, eot_queue, link) { @@ -1444,9 +1334,17 @@ insert_eot_entry(eot_queue_entry_t *entry_ptr) TAILQ_INSERT_AFTER(&eot_queue_g, prec_ptr, entry_ptr, link); else TAILQ_INSERT_HEAD(&eot_queue_g, entry_ptr, link); -} -/* Update an entry on the EOT queue and move it to its proper place. + FUNC_LEAVE_NOAPI_VOID +} /* end H5F__vfd_swmr_insert_eot_entry() */ + +/*------------------------------------------------------------------------- + * Function: H5F_vfd_swmr_update_entry_eot + * + * Purpose: Update an entry on the EOT queue and move it to its proper place + * + * Return: void + *------------------------------------------------------------------------- */ void H5F_vfd_swmr_update_entry_eot(eot_queue_entry_t *entry) @@ -1454,6 +1352,8 @@ H5F_vfd_swmr_update_entry_eot(eot_queue_entry_t *entry) H5F_t * f = entry->vfd_swmr_file; H5F_shared_t *shared = f->shared; + FUNC_ENTER_NOAPI_NOERR + /* Free the entry on the EOT queue that corresponds to f */ TAILQ_REMOVE(&eot_queue_g, entry, link); @@ -1462,20 +1362,17 @@ H5F_vfd_swmr_update_entry_eot(eot_queue_entry_t *entry) entry->tick_num = shared->tick_num; entry->end_of_tick = shared->end_of_tick; - insert_eot_entry(entry); -} + H5F__vfd_swmr_insert_eot_entry(entry); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5F_vfd_swmr_update_entry_eot() */ /*------------------------------------------------------------------------- - * * Function: H5F__vfd_swmr_remove_entry_eot * * Purpose: Remove an entry from the EOT queue * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/18/2019 - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ herr_t @@ -1499,19 +1396,14 @@ H5F_vfd_swmr_remove_entry_eot(H5F_t *f) } FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5F_vfd_swmr_remove_entry_eot() */ +} /* end H5F_vfd_swmr_remove_entry_eot() */ /*------------------------------------------------------------------------- - * * Function: H5F_vfd_swmr_insert_entry_eot * * Purpose: Insert an entry onto the EOT queue * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/18/2019 - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ herr_t @@ -1533,24 +1425,18 @@ H5F_vfd_swmr_insert_entry_eot(H5F_t *f) entry_ptr->end_of_tick = shared->end_of_tick; entry_ptr->vfd_swmr_file = f; - insert_eot_entry(entry_ptr); + H5F__vfd_swmr_insert_eot_entry(entry_ptr); done: FUNC_LEAVE_NOAPI(ret_value) - -} /* H5F_vfd_swmr_insert_entry_eot() */ +} /* end H5F_vfd_swmr_insert_entry_eot() */ /*------------------------------------------------------------------------- - * * Function: H5F_dump_eot_queue() * * Purpose: Dump the contents of the EOT queue * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/18/2019 - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ herr_t @@ -1571,27 +1457,15 @@ H5F_dump_eot_queue(void) HDfprintf(stderr, "EOT head is null\n"); FUNC_LEAVE_NOAPI(SUCCEED) - -} /* H5F_dump_eot_queue() */ - -/* - * Beginning of static functions - */ +} /* end H5F_dump_eot_queue() */ /*------------------------------------------------------------------------- - * * Function: H5F__vfd_swmr_update_end_of_tick_and_tick_num * * Purpose: Update end_of_tick (shared->end_of_tick) * Update tick_num (shared->tick_num) * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/??/18 - * - * Changes: None. - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -1608,7 +1482,7 @@ H5F__vfd_swmr_update_end_of_tick_and_tick_num(H5F_shared_t *shared, hbool_t incr /* Get current time in struct timespec */ #ifdef H5_HAVE_WIN32_API - if (timespec_get(&curr, TIME_UTC) != TIME_UTC) + if (HDtimespec_get(&curr, TIME_UTC) != TIME_UTC) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time via timespec_get"); #else if (HDclock_gettime(CLOCK_MONOTONIC, &curr) < 0) { @@ -1617,20 +1491,17 @@ H5F__vfd_swmr_update_end_of_tick_and_tick_num(H5F_shared_t *shared, hbool_t incr #endif /* Convert curr to nsecs */ - curr_nsecs = curr.tv_sec * nanosecs_per_second + curr.tv_nsec; + curr_nsecs = curr.tv_sec * NANOSECS_PER_SECOND + curr.tv_nsec; /* Convert tick_len to nanosecs */ - tlen_nsecs = shared->vfd_swmr_config.tick_len * nanosecs_per_tenth_sec; + tlen_nsecs = shared->vfd_swmr_config.tick_len * NANOSECS_PER_TENTH_SEC; - /* - * Update shared->tick_num - */ + /* Update shared->tick_num */ if (incr_tick_num) { shared->tick_num++; if (H5PB_vfd_swmr__set_tick(shared) < 0) - HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "Can't update page buffer current tick") } @@ -1641,13 +1512,11 @@ H5F__vfd_swmr_update_end_of_tick_and_tick_num(H5F_shared_t *shared, hbool_t incr /* TODO: The modulo operation is very expensive on most machines -- * re-work this code so as to avoid it. - * - * JRM -- 11/12/18 */ new_end_nsecs = curr_nsecs + tlen_nsecs; - new_end_of_tick.tv_nsec = (long)(new_end_nsecs % nanosecs_per_second); - new_end_of_tick.tv_sec = new_end_nsecs / nanosecs_per_second; + new_end_of_tick.tv_nsec = (long)(new_end_nsecs % NANOSECS_PER_SECOND); + new_end_of_tick.tv_sec = new_end_nsecs / NANOSECS_PER_SECOND; shared->end_of_tick = new_end_of_tick; @@ -1658,7 +1527,6 @@ done: } /* H5F__vfd_swmr_update_end_of_tick_and_tick_num() */ /*------------------------------------------------------------------------- - * * Function: H5F__vfd_swmr_construct_write_md_hdr * * Purpose: Encode and write header to the metadata file. @@ -1670,13 +1538,7 @@ done: * --after flushing an HDF5 file * --when updating the metadata file * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/??/18 - * - * Changes: None. - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -1691,9 +1553,7 @@ H5F__vfd_swmr_construct_write_md_hdr(H5F_shared_t *shared, uint32_t num_entries, FUNC_ENTER_STATIC - /* - * Encode metadata file header - */ + /* Encode metadata file header */ p = image; /* Encode magic for header */ @@ -1718,24 +1578,20 @@ H5F__vfd_swmr_construct_write_md_hdr(H5F_shared_t *shared, uint32_t num_entries, if (shared->vfd_swmr_config.maintain_metadata_file) { /* Set to beginning of the file */ if (HDlseek(shared->vfd_swmr_md_fd, H5FD_MD_HEADER_OFF, SEEK_SET) < 0) - HGOTO_ERROR(H5E_VFL, H5E_SEEKERROR, FAIL, "unable to seek in metadata file") nwritten = HDwrite(shared->vfd_swmr_md_fd, image, hdr_size); + /* Write header to the metadata file */ - if (nwritten != (ssize_t)hdr_size) { + if (nwritten != (ssize_t)hdr_size) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error in writing header to metadata file") - } } done: - FUNC_LEAVE_NOAPI(ret_value) - } /* H5F__vfd_swmr_construct_write_md_hdr() */ /*------------------------------------------------------------------------- - * Function: H5F__vfd_swmr_construct_write_md_idx * * Purpose: Encode and write index to the metadata file. @@ -1747,13 +1603,7 @@ done: * --after flushing an HDF5 file * --when updating the metadata file * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 11/??/18 - * - * Changes: None. - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -1772,9 +1622,7 @@ H5F__vfd_swmr_construct_write_md_idx(H5F_shared_t *shared, uint32_t num_entries, HDassert(num_entries == 0 || index != NULL); - /* - * Encode metadata file index - */ + /* Encode metadata file index */ p = image; /* Encode magic for index */ @@ -1813,27 +1661,24 @@ H5F__vfd_swmr_construct_write_md_idx(H5F_shared_t *shared, uint32_t num_entries, HGOTO_ERROR(H5E_VFL, H5E_SEEKERROR, FAIL, "unable to seek in metadata file") nwritten = HDwrite(shared->vfd_swmr_md_fd, image, idx_size); + /* Write index to the metadata file */ - if (nwritten != (ssize_t)idx_size) { + if (nwritten != (ssize_t)idx_size) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error in writing index to metadata file") - } } done: - FUNC_LEAVE_NOAPI(ret_value) - -} /* H5F__vfd_swmr_construct_write_idx() */ +} /* end H5F__vfd_swmr_construct_write_idx() */ /*------------------------------------------------------------------------- - * Function: H5F__idx_entry_cmp() - * - * Purpose: Callback used by HDqsort to sort entries in the index + * Function: H5F__idx_entry_cmp() * - * Return: 0 if the entries are the same - * -1 if entry1's offset is less than that of entry2 - * 1 if entry1's offset is greater than that of entry2 + * Purpose: Callback used by HDqsort to sort entries in the index * + * Return: 0 if the entries are the same + * -1 if entry1's offset is less than that of entry2 + * 1 if entry1's offset is greater than that of entry2 *------------------------------------------------------------------------- */ static herr_t @@ -1856,21 +1701,15 @@ H5F__idx_entry_cmp(const void *_entry1, const void *_entry2) ret_value = 1; FUNC_LEAVE_NOAPI(ret_value) -} /* H5F__idx_entry_cmp() */ +} /* end H5F__idx_entry_cmp() */ /*------------------------------------------------------------------------- + * Function: H5F__vfd_swmr_create_index * - * Function: H5F__vfd_swmr_create_index - * - * Purpose: Allocate and initialize the index for the VFD SWMR metadata - * file. - * - * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 11/5/18 - * - * Changes: None. + * Purpose: Allocate and initialize the index for the VFD SWMR metadata + * file. * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -1898,29 +1737,37 @@ H5F__vfd_swmr_create_index(H5F_shared_t *shared) index = H5MM_calloc(entries_in_index * sizeof(index[0])); - if (index == NULL) { + if (index == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for md index") - } HDassert(entries_in_index <= UINT32_MAX); shared->mdf_idx = index; shared->mdf_idx_len = (uint32_t)entries_in_index; shared->mdf_idx_entries_used = 0; + done: FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5F__vfd_swmr_create_index() */ +/*------------------------------------------------------------------------- + * Function: H5F_vfd_swmr_enlarge_shadow_index + * + * Purpose: Enlarge the shadow index + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ H5FD_vfd_swmr_idx_entry_t * -vfd_swmr_enlarge_shadow_index(H5F_t *f) +H5F_vfd_swmr_enlarge_shadow_index(H5F_t *f) { - H5F_shared_t * shared = f->shared; - H5FD_vfd_swmr_idx_entry_t *ret_value = NULL; + H5F_shared_t * shared = f->shared; haddr_t idx_addr; haddr_t old_writer_index_offset; hsize_t idx_size; H5FD_vfd_swmr_idx_entry_t *new_mdf_idx = NULL, *old_mdf_idx; uint32_t new_mdf_idx_len, old_mdf_idx_len; + H5FD_vfd_swmr_idx_entry_t *ret_value = NULL; FUNC_ENTER_NOAPI(NULL) @@ -1937,9 +1784,8 @@ vfd_swmr_enlarge_shadow_index(H5F_t *f) idx_addr = H5MV_alloc(f, idx_size); - if (idx_addr == HADDR_UNDEF) { + if (idx_addr == HADDR_UNDEF) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "shadow-file allocation failed for index") - } new_mdf_idx = H5MM_calloc(new_mdf_idx_len * sizeof(new_mdf_idx[0])); @@ -1972,35 +1818,30 @@ vfd_swmr_enlarge_shadow_index(H5F_t *f) * trade-off for simplicity. */ /* Fix: use the saved old_writer_index_offset not the current one */ - if (shadow_range_defer_free(shared, old_writer_index_offset, H5FD_MD_INDEX_SIZE(old_mdf_idx_len)) == -1) { + if (H5F__shadow_range_defer_free(shared, old_writer_index_offset, H5FD_MD_INDEX_SIZE(old_mdf_idx_len)) == + -1) { HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "could not schedule index reclamation"); } done: FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5F_vfd_swmr_enlarge_shadow_index() */ /*------------------------------------------------------------------------- + * Function: H5F__vfd_swmr_writer_wait_a_tick * - * Function: H5F__vfd_swmr_writer__wait_a_tick - * - * Purpose: Before a file that has been opened by a VFD SWMR writer, - * all pending delayed writes must be allowed drain. + * Purpose: Before a file that has been opened by a VFD SWMR writer, + * all pending delayed writes must be allowed drain. * - * This function facilitates this by sleeping for a tick, and - * then running the writer end of tick function. + * This function facilitates this by sleeping for a tick, and + * then running the writer end of tick function. * - * It should only be called as part the flush or close operations. - * - * Return: SUCCEED/FAIL - * - * Programmer: John Mainzer 11/23/18 - * - * Changes: None. + * It should only be called as part the flush or close operations. * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t -H5F__vfd_swmr_writer__wait_a_tick(H5F_t *f) +H5F__vfd_swmr_writer_wait_a_tick(H5F_t *f) { uint64_t tick_in_nsec; H5F_shared_t *shared; @@ -2013,17 +1854,25 @@ H5F__vfd_swmr_writer__wait_a_tick(H5F_t *f) HDassert(shared->vfd_swmr); HDassert(shared->vfd_swmr_writer); - tick_in_nsec = shared->vfd_swmr_config.tick_len * nanosecs_per_tenth_sec; + tick_in_nsec = shared->vfd_swmr_config.tick_len * NANOSECS_PER_TENTH_SEC; H5_nanosleep(tick_in_nsec); - if (H5F_vfd_swmr_writer_end_of_tick(f, FALSE) < 0) + if (H5F_vfd_swmr_writer_end_of_tick(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "H5F_vfd_swmr_writer_end_of_tick() failed") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5F__vfd_swmr_writer__wait_a_tick() */ +} /* H5F__vfd_swmr_writer_wait_a_tick() */ +/*------------------------------------------------------------------------- + * Function: H5F_vfd_swmr_process_eot_queue + * + * Purpose: Process end-of-tick queue + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ herr_t H5F_vfd_swmr_process_eot_queue(hbool_t entering_api) { @@ -2040,12 +1889,11 @@ H5F_vfd_swmr_process_eot_queue(hbool_t entering_api) H5F_shared_t *shared = f->shared; #ifdef H5_HAVE_WIN32_API - if (timespec_get(&now, TIME_UTC) != TIME_UTC) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time via timespec_get"); + if (HDtimespec_get(&now, TIME_UTC) != TIME_UTC) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time via timespec_get") #else - if (HDclock_gettime(CLOCK_MONOTONIC, &now) < 0) { - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time via clock_gettime"); - } + if (HDclock_gettime(CLOCK_MONOTONIC, &now) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time via clock_gettime") #endif if (HDtimespeccmp(&now, &head->end_of_tick, <)) break; @@ -2059,21 +1907,20 @@ H5F_vfd_swmr_process_eot_queue(hbool_t entering_api) H5F_vfd_swmr_update_entry_eot(head); } else if (shared->vfd_swmr_writer) { - if (H5F_vfd_swmr_writer_end_of_tick(f, FALSE) < 0) - HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR writer"); + if (H5F_vfd_swmr_writer_end_of_tick(f) < 0) + HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR writer") } else if (H5F_vfd_swmr_reader_end_of_tick(f, entering_api) < 0) { - HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR reader"); + HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR reader") } } while ((head = TAILQ_FIRST(&eot_queue_g)) != NULL && head != first_head); done: FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5F_vfd_swmr_process_eot_queue() */ /*------------------------------------------------------------------------- - * - * Function: H5F_post_vfd_swmr_log_entry + * Function: H5F__post_vfd_swmr_log_entry * * Purpose: Write the log information to the log file. * @@ -2083,22 +1930,22 @@ done: * log entry tag. * char *log_info IN: The information to be stored in the * log file. - * Return: None - * + * Return: void *------------------------------------------------------------------------- */ - void H5F__post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, const char *log_info) { double temp_time; H5_timevals_t current_time; - char * gettime_error; + char * gettime_error = NULL; - /* Obtain the current time. - If failed, write an error message to the log file. - else obtain the elapsed time in seconds since the log file - was created and write the time to the log file. */ + FUNC_ENTER_PACKAGE_NOERR + + /* Obtain the current time. If failed, write an error message to the log + * file, else obtain the elapsed time in seconds since the log file was + * created and write the time to the log file. + */ if (H5_timer_get_times(f->shared->vfd_swmr_log_start_time, ¤t_time) < 0) { if (NULL != (gettime_error = HDmalloc(log_err_mesg_length * sizeof(char)))) { HDsprintf(gettime_error, "gettime_error"); @@ -2112,22 +1959,16 @@ H5F__post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, const char *log_info HDfprintf(f->shared->vfd_swmr_log_file_ptr, log_fmt_str, H5Fvfd_swmr_log_tags[entry_type_code], temp_time, log_info); } - return; -} + + FUNC_LEAVE_NOAPI_VOID +} /* end H5F__post_vfd_swmr_log_entry() */ /*------------------------------------------------------------------------- - * * Function: H5F__vfd_swmr_construct_ud_hdr * * Purpose: Encode updater header in the buffer updater->header_image_ptr * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 10/2021 - * - * Changes: None. - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -2140,17 +1981,16 @@ H5F__vfd_swmr_construct_ud_hdr(H5F_vfd_swmr_updater_t *updater) FUNC_ENTER_STATIC_NOERR - /* - * Encode metadata file header - */ + /* Encode metadata file header */ p = image; /* Encode magic for header */ HDmemcpy(p, H5F_UD_HEADER_MAGIC, (size_t)H5_SIZEOF_MAGIC); p += H5_SIZEOF_MAGIC; - /* Encode version number, flags, page size, sequence number, tick number, change list offset, change list - * length */ + /* Encode version number, flags, page size, sequence number, tick number, + * change list offset, change list length + */ UINT16ENCODE(p, H5F_UD_VERSION); UINT16ENCODE(p, updater->flags); UINT32ENCODE(p, updater->page_size); @@ -2171,22 +2011,15 @@ H5F__vfd_swmr_construct_ud_hdr(H5F_vfd_swmr_updater_t *updater) FUNC_LEAVE_NOAPI(ret_value) -} /* H5F__vfd_swmr_construct_ud_hdr() */ +} /* end H5F__vfd_swmr_construct_ud_hdr() */ /*------------------------------------------------------------------------- - * * Function: H5F__vfd_swmr_construct_ud_cl * * Purpose: Encode updater change list in the buffer * updater->change_list_image_ptr * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi -- 10/2021 - * - * Changes: None. - * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -2200,9 +2033,7 @@ H5F__vfd_swmr_construct_ud_cl(H5F_vfd_swmr_updater_t *updater) FUNC_ENTER_STATIC_NOERR - /* - * Encode ud cl - */ + /* Encode ud cl */ p = image; /* Encode magic for ud cl */ @@ -2262,37 +2093,14 @@ H5F__vfd_swmr_construct_ud_cl(H5F_vfd_swmr_updater_t *updater) HDassert(p - image == (ptrdiff_t)updater->change_list_len); FUNC_LEAVE_NOAPI(ret_value) - -} /* H5F__vfd_swmr_construct_ud_cl() */ +} /* end H5F__vfd_swmr_construct_ud_cl() */ /*------------------------------------------------------------------------- + * Function: H5F__generate_updater_file * - * Function: H5F_generate_updater_file() - * - * Purpose: Generate updater file: - * --assemble and initialize data in the updater struct - * --determine num_change_list entries - * --allocate buffers - * --construct on disk image (serialize) of the updater header and change list - * --create updater file using a temporary file name: - * --<shared->vfd_swmr_config.updater_file_path>.ud_tmp - * --allocate space and write the following to the updater file - * --updater file header - * --updater file change list - * --metadata entries - * --metadata file index - * --metadata file header - * --close the updater file - * --rename the updater file with the correct name: - * <shared->vfd_swmr_config.updater_file_path>.<shared->updater_seq_num> - * - * --increment shared->updater_seq_num - * --free buffers - * - * Return: SUCCEED/FAIL - * - * Programmer: Vailin Choi 8/24/2021 + * Purpose: Generate updater file * + * Return: SUCCEED/FAIL *------------------------------------------------------------------------- */ static herr_t @@ -2308,9 +2116,10 @@ H5F__generate_updater_file(H5F_t *f, uint32_t num_entries, uint16_t flags, uint8 char newname[H5F__MAX_VFD_SWMR_FILE_NAME_LEN]; unsigned i, j; hsize_t alloc_size; + int sz; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Updater file header fields */ updater.version = H5F_UD_VERSION; @@ -2357,7 +2166,13 @@ H5F__generate_updater_file(H5F_t *f, uint32_t num_entries, uint16_t flags, uint8 } /* Create the updater file with a temporary file name */ - HDsprintf(namebuf, "%s.ud_tmp", shared->vfd_swmr_config.updater_file_path); + sz = HDsnprintf(namebuf, H5F__MAX_VFD_SWMR_FILE_NAME_LEN, "%s.ud_tmp", + shared->vfd_swmr_config.updater_file_path); + if (sz < 0) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "error processing snprintf format string") + if (sz > H5F__MAX_VFD_SWMR_FILE_NAME_LEN) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "string passed to snprintf would be truncated") + namebuf[H5F__MAX_VFD_SWMR_FILE_NAME_LEN - 1] = '\0'; if ((ud_file = H5FD_open(namebuf, H5F_ACC_TRUNC | H5F_ACC_RDWR | H5F_ACC_CREAT, H5P_FILE_ACCESS_DEFAULT, HADDR_UNDEF)) == NULL) @@ -2485,7 +2300,13 @@ H5F__generate_updater_file(H5F_t *f, uint32_t num_entries, uint16_t flags, uint8 /* Close the updater file and rename the file */ if (H5FD_close(ud_file) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close updater file") - HDsprintf(newname, "%s.%lu", shared->vfd_swmr_config.updater_file_path, shared->updater_seq_num); + sz = HDsnprintf(newname, H5F__MAX_VFD_SWMR_FILE_NAME_LEN, "%s.%lu", + shared->vfd_swmr_config.updater_file_path, shared->updater_seq_num); + if (sz < 0) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "error processing snprintf format string") + if (sz > H5F__MAX_VFD_SWMR_FILE_NAME_LEN) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "string passed to snprintf would be truncated") + newname[H5F__MAX_VFD_SWMR_FILE_NAME_LEN - 1] = '\0'; HDrename(namebuf, newname); ++shared->updater_seq_num; @@ -2499,5 +2320,143 @@ done: HDfree(updater.change_list); FUNC_LEAVE_NOAPI(ret_value) +} /* end H5F__generate_updater_file() */ + +/*------------------------------------------------------------------------- + * Function: H5F__vfd_swmr_end_tick() + * + * Purpose: To trigger end of tick processing + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +herr_t +H5F__vfd_swmr_end_tick(H5F_t *f) +{ + eot_queue_entry_t *curr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity check */ + HDassert(f); + HDassert(f->shared); + + /* The file should be opened with VFD SWMR configured.*/ + if (!(H5F_USE_VFD_SWMR(f))) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "must have VFD SWMR configured for this public routine") + + /* Search EOT queue */ + TAILQ_FOREACH(curr, &eot_queue_g, link) + { + if (curr->vfd_swmr_file == f) + break; + } + + /* If the file does not exist on the EOT queue, flag an error */ + if (curr == NULL) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "EOT for the file has been disabled") + + if (f->shared->vfd_swmr_writer) { + if (H5F_vfd_swmr_writer_end_of_tick(f) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR writer") + } + else if (H5F_vfd_swmr_reader_end_of_tick(f, TRUE) < 0) { + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "end of tick error for VFD SWMR reader") + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F__vfd_swmr_end_tick() */ + +/*------------------------------------------------------------------------- + * Function: H5F__vfd_swmr_disable_end_of_tick() + * + * Purpose: To disable end of tick processing + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +herr_t +H5F__vfd_swmr_disable_end_of_tick(H5F_t *f) +{ + eot_queue_entry_t *curr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity check */ + HDassert(f); + HDassert(f->shared); + + /* The file should be opened with VFD SWMR configured.*/ + if (!(H5F_USE_VFD_SWMR(f))) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "must have VFD SWMR configured for this public routine") + + /* Search EOT queue */ + TAILQ_FOREACH(curr, &eot_queue_g, link) + { + if (curr->vfd_swmr_file == f) + break; + } + + /* If the file does not exist on the EOT queue, flag an error */ + if (curr == NULL) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "EOT for the file has already been disabled") + + /* Remove the entry that corresponds to "f" from the EOT queue */ + if (H5F_vfd_swmr_remove_entry_eot(f) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to remove entry from EOT queue") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F__vfd_swmr_disable_end_of_tick() */ + +/*------------------------------------------------------------------------- + * Function: H5F__vfd_swmr_enable_end_of_tick() + * + * Purpose: To enable end of tick processing + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +herr_t +H5F__vfd_swmr_enable_end_of_tick(H5F_t *f) +{ + eot_queue_entry_t *curr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity check */ + HDassert(f); + HDassert(f->shared); + + /* The file should be opened with VFD SWMR configured.*/ + if (!(H5F_USE_VFD_SWMR(f))) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "must have VFD SWMR configured for this public routine") -} /* H5F__generate_updater_file() */ + /* Search EOT queue */ + TAILQ_FOREACH(curr, &eot_queue_g, link) + { + if (curr->vfd_swmr_file == f) + break; + } + + /* If the file already exists on the EOT queue, flag an error */ + if (curr != NULL) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "EOT for the file has already been enabled") + + /* Insert the entry that corresponds to "f" onto the EOT queue */ + if (H5F_vfd_swmr_insert_entry_eot(f) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to insert entry into the EOT queue") + + /* Check if the tick has expired, if so call end of tick processing */ + if (H5F_vfd_swmr_process_eot_queue(TRUE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "error processing EOT queue") + + /* FUNC_LEAVE_API could do the check, but not so for reader_end_of_tick() */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F__vfd_swmr_enable_end_of_tick() */ @@ -129,7 +129,7 @@ H5HG__create(H5F_t *f, size_t size) size_t n; haddr_t ret_value = HADDR_UNDEF; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__GLOBALHEAP_TAG) + FUNC_ENTER_STATIC /* Check args */ HDassert(f); @@ -218,7 +218,7 @@ done: } /* end if */ } /* end if */ - FUNC_LEAVE_NOAPI_TAG(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* H5HG__create() */ /*------------------------------------------------------------------------- @@ -445,7 +445,7 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type) H5AC_ring_t fsm_ring; /* Ring of FSM */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC /* * Check arguments. @@ -498,7 +498,7 @@ done: if (orig_ring != H5AC_RING_INV) H5AC_set_ring(orig_ring, NULL); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__create_fstype() */ /*------------------------------------------------------------------------- @@ -520,7 +520,7 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_PACKAGE /* * Check arguments. @@ -547,7 +547,7 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type) } /* end else */ done: - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__start_fstype() */ /*------------------------------------------------------------------------- @@ -571,7 +571,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type) haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC /* check args */ HDassert(f); @@ -618,7 +618,7 @@ done: if (orig_ring != H5AC_RING_INV) H5AC_set_ring(orig_ring, NULL); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__delete_fstype() */ /*------------------------------------------------------------------------- @@ -639,7 +639,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC /* * Check arguments. @@ -664,7 +664,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type) f->shared->fs_state[type] = H5F_FS_STATE_CLOSED; done: - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__close_fstype() */ /*------------------------------------------------------------------------- @@ -688,7 +688,7 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio H5F_mem_page_t fs_type; /* Free space type (mapped from allocation type) */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_PACKAGE HDassert(f); HDassert(fspace); @@ -724,7 +724,7 @@ done: if (orig_ring != H5AC_RING_INV) H5AC_set_ring(orig_ring, NULL); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__add_sect() */ /*------------------------------------------------------------------------- @@ -748,7 +748,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h H5MF_free_section_t *node; /* Free space section pointer */ htri_t ret_value = FAIL; /* Whether an existing free list node was found */ - FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_PACKAGE HDassert(f); HDassert(fspace); @@ -808,7 +808,7 @@ done: if (orig_ring != H5AC_RING_INV) H5AC_set_ring(orig_ring, NULL); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__find_sect() */ /*------------------------------------------------------------------------- @@ -953,7 +953,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) H5MF_free_section_t *node = NULL; /* Free space section pointer */ haddr_t ret_value = HADDR_UNDEF; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); @@ -1065,7 +1065,7 @@ done: if (H5MF__sect_free((H5FS_section_info_t *)node) < 0) HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, HADDR_UNDEF, "can't free section node") - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__alloc_pagefs() */ /*------------------------------------------------------------------------- @@ -1720,7 +1720,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ @@ -1759,7 +1759,7 @@ done: #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5MF__close_delete() */ /*------------------------------------------------------------------------- @@ -1891,7 +1891,7 @@ H5MF__close_aggrfs(H5F_t *f) H5FD_mem_t type; /* Memory type for iteration */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ @@ -2033,7 +2033,7 @@ done: #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__close_aggrfs() */ /*------------------------------------------------------------------------- @@ -2057,7 +2057,7 @@ H5MF__close_pagefs(H5F_t *f) H5O_fsinfo_t fsinfo; /* File space info message */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ @@ -2208,7 +2208,7 @@ done: #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__close_pagefs() */ /*------------------------------------------------------------------------- @@ -2236,7 +2236,7 @@ H5MF__close_shrink_eoa(H5F_t *f) H5MF_sect_ud_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__FREESPACE_TAG) + FUNC_ENTER_STATIC /* check args */ HDassert(f); @@ -2317,7 +2317,7 @@ done: if (orig_ring != H5AC_RING_INV) H5AC_set_ring(orig_ring, NULL); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__close_shrink_eoa() */ /*------------------------------------------------------------------------- diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index c4f8b27..b83b57e 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -1679,7 +1679,7 @@ H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr) + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(f); @@ -1712,7 +1712,7 @@ H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs) } /* end else */ done: - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__attr_count_real */ /*------------------------------------------------------------------------- diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 84e68a1..ccaf004 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -348,7 +348,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir done: /* Release the [possibly partially initialized] object header on errors */ if (!ret_value && oh) - if (H5O__free(oh) < 0) + if (H5O__free(oh, FALSE) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data") FUNC_LEAVE_NOAPI(ret_value) @@ -641,7 +641,7 @@ H5O__cache_free_icr(void *_thing) HDassert(oh->cache_info.type == H5AC_OHDR); /* Destroy object header */ - if (H5O__free(oh) < 0) + if (H5O__free(oh, FALSE) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header") done: @@ -1244,7 +1244,7 @@ H5O__prefix_deserialize(const uint8_t *_image, H5O_cache_ud_t *udata) /* Save the object header for later use in 'deserialize' callback */ udata->oh = oh; - if (H5O__free(saved_oh) < 0) + if (H5O__free(saved_oh, FALSE) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header") udata->free_oh = FALSE; } @@ -1257,7 +1257,7 @@ H5O__prefix_deserialize(const uint8_t *_image, H5O_cache_ud_t *udata) done: /* Release the [possibly partially initialized] object header on errors */ if (ret_value < 0 && oh) - if (H5O__free(oh) < 0) + if (H5O__free(oh, FALSE) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header data") FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 8367b93..0b0bb55 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -771,7 +771,7 @@ done: /* Free destination object header on failure */ if (ret_value < 0) { if (oh_dst && !inserted) { - if (H5O__free(oh_dst) < 0) + if (H5O__free(oh_dst, TRUE) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") if (H5O_loc_reset(oloc_dst) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") diff --git a/src/H5Oflush.c b/src/H5Oflush.c index f2eacd6..ba1fa3e 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -239,7 +239,7 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid) case H5I_DATASET: ds = (H5D_t *)vol_obj->data; state.dapl_id = ds->shared->dapl_id; - if (H5I_inc_ref(state.dapl_id, false) < 0) + if (H5I_inc_ref(state.dapl_id, FALSE) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not increase refcnt"); break; default: @@ -405,6 +405,7 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, const H5O_refresh_sta break; case H5I_DATASET: + /* Re-open the dataset */ object = H5D_open(obj_loc, (state == NULL) ? H5P_DATASET_ACCESS_DEFAULT : state->dapl_id); if (NULL == object) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") diff --git a/src/H5Oint.c b/src/H5Oint.c index ee79b0c..2348790 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -289,7 +289,7 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file") done: - if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh) < 0)) + if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0)) HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "can't delete object header") FUNC_LEAVE_NOAPI(ret_value) @@ -353,7 +353,7 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id) ret_value = oh; done: - if ((NULL == ret_value) && (NULL != oh) && (H5O__free(oh) < 0)) + if ((NULL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0)) HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "can't delete object header") FUNC_LEAVE_NOAPI(ret_value) @@ -3014,7 +3014,7 @@ H5O_get_proxy(const H5O_t *oh) *------------------------------------------------------------------------- */ herr_t -H5O__free(H5O_t *oh) +H5O__free(H5O_t *oh, hbool_t force) { unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3038,10 +3038,12 @@ H5O__free(H5O_t *oh) for (u = 0; u < oh->nmesgs; u++) { #ifndef NDEBUG /* Verify that message is clean, unless it could have been marked - * dirty by decoding */ + * dirty by decoding, or if this is a forced free (in case of + * failure during creation of the object some messages may be dirty) + */ if (oh->ndecode_dirtied && oh->mesg[u].dirty) oh->ndecode_dirtied--; - else + else if (!force) HDassert(oh->mesg[u].dirty == 0); #endif /* NDEBUG */ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index ebfe636..1fe918d 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -551,7 +551,7 @@ H5_DLL herr_t H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty H5O_iterate2_t op, void *op_data, unsigned fields); H5_DLL herr_t H5O__inc_rc(H5O_t *oh); H5_DLL herr_t H5O__dec_rc(H5O_t *oh); -H5_DLL herr_t H5O__free(H5O_t *oh); +H5_DLL herr_t H5O__free(H5O_t *oh, hbool_t force); /* Object header message routines */ H5_DLL herr_t H5O__msg_alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_flags, @@ -50,14 +50,14 @@ /* Round _x down to nearest _size. */ /* not used at present */ /* -#ifndef rounddown -#define rounddown(_x, _size) (((_x) / (_size)) * (_size)) +#ifndef H5PB_ROUNDDOWN +#define H5PB_ROUNDDOWN(_x, _size) (((_x) / (_size)) * (_size)) #endif */ /* Round _x up to nearest _size. */ -#ifndef roundup -#define roundup(_x, _size) ((((_x) + (_size)-1) / (_size)) * (_size)) +#ifndef H5PB_ROUNDUP +#define H5PB_ROUNDUP(_x, _size) ((((_x) + (_size)-1) / (_size)) * (_size)) #endif /******************/ @@ -1358,18 +1358,18 @@ done: * this routine performs an O(n) copy of index entries. */ static int -shadow_idx_entry_remove(H5F_shared_t *shared, uint64_t page, hbool_t only_mark) +H5PB__shadow_idx_entry_remove(H5F_shared_t *shared, uint64_t page, hbool_t only_mark) { ptrdiff_t i; H5FD_vfd_swmr_idx_entry_t *entry; - entry = vfd_swmr_pageno_to_mdf_idx_entry(shared->mdf_idx, shared->mdf_idx_entries_used, page, FALSE); + entry = H5FD_vfd_swmr_pageno_to_mdf_idx_entry(shared->mdf_idx, shared->mdf_idx_entries_used, page, FALSE); if (entry == NULL) return 0; if (shared->vfd_swmr_writer && entry->md_file_page_offset != 0) { - if (shadow_image_defer_free(shared, entry) != 0) + if (H5F_shadow_image_defer_free(shared, entry) != 0) return -1; entry->md_file_page_offset = 0; } @@ -1492,8 +1492,8 @@ H5PB_remove_entry(H5F_shared_t *shared, haddr_t addr) HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, "forced eviction failed") HDassert(!shared->vfd_swmr_writer || - vfd_swmr_pageno_to_mdf_idx_entry(shared->mdf_idx, shared->mdf_idx_entries_used, page, - FALSE) == NULL); + H5FD_vfd_swmr_pageno_to_mdf_idx_entry(shared->mdf_idx, shared->mdf_idx_entries_used, page, + FALSE) == NULL); } done: @@ -2098,7 +2098,7 @@ H5PB_vfd_swmr__update_index(H5F_t *f, uint32_t *idx_ent_added_ptr, uint32_t *idx /* see if the shadow index already contains an entry for *entry. */ - ie_ptr = vfd_swmr_pageno_to_mdf_idx_entry(idx, shared->mdf_idx_entries_used, target_page, FALSE); + ie_ptr = H5FD_vfd_swmr_pageno_to_mdf_idx_entry(idx, shared->mdf_idx_entries_used, target_page, FALSE); if (ie_ptr == NULL) { /* alloc new entry in the metadata file index*/ uint32_t new_index_entry_index; @@ -2106,7 +2106,7 @@ H5PB_vfd_swmr__update_index(H5F_t *f, uint32_t *idx_ent_added_ptr, uint32_t *idx new_index_entry_index = shared->mdf_idx_entries_used + idx_ent_added++; if (new_index_entry_index >= shared->mdf_idx_len && - (idx = vfd_swmr_enlarge_shadow_index(f)) == NULL) { + (idx = H5F_vfd_swmr_enlarge_shadow_index(f)) == NULL) { HDfprintf(stderr, "\n\nmax mdf index len (%" PRIu32 ") exceeded.\n\n", shared->mdf_idx_len); HDfprintf(stderr, "tick = %" PRIu64 ".\n", tick_num); HDexit(EXIT_FAILURE); @@ -2136,7 +2136,7 @@ H5PB_vfd_swmr__update_index(H5F_t *f, uint32_t *idx_ent_added_ptr, uint32_t *idx if (ie_ptr->length != (uint32_t)entry->size) { int ret; - ret = shadow_image_defer_free(shared, ie_ptr); + ret = H5F_shadow_image_defer_free(shared, ie_ptr); HDassert(ret == 0); ie_ptr->md_file_page_offset = 0; @@ -2714,7 +2714,7 @@ H5PB__allocate_page(H5PB_t *page_buf, size_t size, hbool_t clean_image) void * image_ptr = NULL; H5PB_entry_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI(NULL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(page_buf); @@ -2786,7 +2786,7 @@ done: image_ptr = H5MM_xfree(image_ptr); } - } /* end if */ + } FUNC_LEAVE_NOAPI(ret_value) @@ -2922,7 +2922,7 @@ done: static void H5PB__deallocate_page(H5PB_entry_t *entry_ptr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* sanity checks */ HDassert(entry_ptr); @@ -2989,7 +2989,7 @@ H5PB__evict_entry(H5F_shared_t *shared, H5PB_entry_t *entry_ptr, hbool_t force, H5PB_t *page_buf = shared->page_buf; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(page_buf); @@ -3063,7 +3063,7 @@ H5PB__evict_entry(H5F_shared_t *shared, H5PB_entry_t *entry_ptr, hbool_t force, * the image will be bigger. So the shadow file will never see the * entire image written, just the first page of the image. */ - if (shared->vfd_swmr_writer && shadow_idx_entry_remove(shared, entry_ptr->page, only_mark) == -1) { + if (shared->vfd_swmr_writer && H5PB__shadow_idx_entry_remove(shared, entry_ptr->page, only_mark) == -1) { HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, "failed to remove shadow index entry") } @@ -3108,7 +3108,7 @@ H5PB__flush_entry(H5F_shared_t *shared, H5PB_t *page_buf, H5PB_entry_t *const en haddr_t eoa; /* Current EOA for the file */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(shared); @@ -3215,7 +3215,7 @@ H5PB__load_page(H5F_shared_t *shared, H5PB_t *page_buf, haddr_t addr, H5FD_mem_t void * image_ptr = NULL; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(shared); @@ -3224,18 +3224,6 @@ H5PB__load_page(H5F_shared_t *shared, H5PB_t *page_buf, haddr_t addr, H5FD_mem_t HDassert(page_buf->magic == H5PB__H5PB_T_MAGIC); HDassert((entry_ptr_ptr == NULL) || (*entry_ptr_ptr == NULL)); -#if 0 /* JRM */ - haddr_t eoa; - /* Retrieve the 'eoa' for the file */ - if ( HADDR_UNDEF == (eoa = H5FD_get_eoa(shared->lf, type))) - - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, \ - "driver get_eoa request failed") - if ( addr + ((haddr_t)(page_buf->page_size)) > eoa ) - - HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, \ - "Attempt to load page that extends past EOA") -#endif /* JRM */ if (HADDR_UNDEF == (eof = H5FD_get_eof(shared->lf, H5FD_MEM_DEFAULT))) HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eof request failed") @@ -3384,7 +3372,7 @@ H5PB__make_space(H5F_shared_t *shared, H5PB_t *page_buf, H5FD_mem_t inserted_typ H5PB_entry_t *evict_ptr; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(page_buf); @@ -3498,7 +3486,7 @@ H5PB__mark_entry_clean(H5PB_t *page_buf, H5PB_entry_t *entry_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(page_buf); @@ -3558,7 +3546,7 @@ H5PB__mark_entry_dirty(H5F_shared_t *shared, H5PB_t *page_buf, H5PB_entry_t *ent { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* sanity checks */ HDassert(page_buf); @@ -3582,7 +3570,7 @@ H5PB__mark_entry_dirty(H5F_shared_t *shared, H5PB_t *page_buf, H5PB_entry_t *ent HDassert(entry_ptr->delay_write_until == 0); if ((page_buf->vfd_swmr_writer) && (entry_ptr->loaded) && (entry_ptr->mem_type != H5FD_MEM_DRAW) && - (H5F_vfd_swmr_writer__delay_write(shared, entry_ptr->page, &(entry_ptr->delay_write_until)) < 0)) + (H5F_vfd_swmr_writer_delay_write(shared, entry_ptr->page, &(entry_ptr->delay_write_until)) < 0)) HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, "get delayed write request failed") @@ -3774,7 +3762,7 @@ H5PB__read_meta(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size size_t clipped_size; /* possibley clipped size */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(shared); @@ -4082,7 +4070,7 @@ H5PB__read_raw(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size, hsize_t i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(shared); @@ -4375,7 +4363,7 @@ H5PB__write_meta(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t siz size_t offset; /* offset of write in page */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(shared); @@ -4432,7 +4420,7 @@ H5PB__write_meta(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t siz H5PB_entry_t *overlap; void * new_image = H5MM_malloc(size); uint64_t iter_page; - uint64_t last_page = page + roundup(size, page_buf->page_size) / page_buf->page_size; + uint64_t last_page = page + H5PB_ROUNDUP(size, page_buf->page_size) / page_buf->page_size; for (iter_page = page + 1; iter_page < last_page; iter_page++) { H5PB__SEARCH_INDEX(page_buf, iter_page, overlap, FAIL) @@ -4592,7 +4580,7 @@ H5PB__write_raw(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size size_t offset; /* offset of write in a page */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(shared); diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 65d426b..a9f21d1 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -1290,8 +1290,8 @@ H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name, const cha FUNC_ENTER_NOAPI(FAIL) - assert(plist); - assert(driver_name); + HDassert(plist); + HDassert(driver_name); /* Register the driver */ if ((new_driver_id = H5FD_register_driver_by_name(driver_name, app_ref)) < 0) @@ -1378,8 +1378,8 @@ H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value, FUNC_ENTER_NOAPI(FAIL) - assert(plist); - assert(driver_value >= 0); + HDassert(plist); + HDassert(driver_value >= 0); /* Register the driver */ if ((new_driver_id = H5FD_register_driver_by_value(driver_value, app_ref)) < 0) @@ -626,7 +626,7 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header) haddr_t addr = HADDR_UNDEF; /* Address of the list on disk */ haddr_t ret_value = HADDR_UNDEF; /* Return value */ - FUNC_ENTER_STATIC_TAG(H5AC__SOHM_TAG) + FUNC_ENTER_STATIC HDassert(f); HDassert(header); @@ -668,7 +668,7 @@ done: H5MF_xfree(f, H5FD_MEM_SOHM_INDEX, addr, (hsize_t)header->list_size); } /* end if */ - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5SM__create_list */ /*------------------------------------------------------------------------- @@ -848,7 +848,7 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header) haddr_t btree_addr; herr_t ret_value = SUCCEED; - FUNC_ENTER_STATIC_TAG(H5AC__SOHM_TAG) + FUNC_ENTER_STATIC /* Remember the address of the old B-tree, but change the header over to be * a list.. @@ -882,7 +882,7 @@ done: if (list && H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DIRTIED_FLAG) < 0) HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to unprotect SOHM index") - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5SM__convert_btree_to_list() */ /*------------------------------------------------------------------------- @@ -1271,7 +1271,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t size_t empty_pos = SIZE_MAX; /* Empty entry in list */ herr_t ret_value = SUCCEED; - FUNC_ENTER_STATIC_TAG(H5AC__SOHM_TAG) + FUNC_ENTER_STATIC /* Sanity check */ HDassert(header); @@ -1535,7 +1535,7 @@ done: if (encoding_buf) encoding_buf = H5MM_xfree(encoding_buf); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5SM__write_mesg() */ /*------------------------------------------------------------------------- @@ -1782,7 +1782,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c unsigned type_id; /* Message type to operate on */ herr_t ret_value = SUCCEED; - FUNC_ENTER_STATIC_TAG(H5AC__SOHM_TAG) + FUNC_ENTER_STATIC /* Sanity check */ HDassert(f); @@ -1948,7 +1948,7 @@ done: *mesg_size = 0; } - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5SM__delete_from_index() */ /*------------------------------------------------------------------------- @@ -2384,7 +2384,7 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh H5O_t * oh = NULL; /* Object header for message in object header */ herr_t ret_value = SUCCEED; - FUNC_ENTER_STATIC_TAG(H5AC__SOHM_TAG) + FUNC_ENTER_STATIC HDassert(f); HDassert(mesg); @@ -2458,7 +2458,7 @@ done: if (ret_value < 0 && udata.encoding_buf) udata.encoding_buf = H5MM_xfree(udata.encoding_buf); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5SM__read_mesg */ /*------------------------------------------------------------------------- @@ -192,10 +192,10 @@ H5TS_tid_destructor(void *_v) return; /* TBD use an atomic CAS */ - HDpthread_mutex_lock(&H5TS_tid_mtx); + pthread_mutex_lock(&H5TS_tid_mtx); tid->next = H5TS_tid_next_free; H5TS_tid_next_free = tid; - HDpthread_mutex_unlock(&H5TS_tid_mtx); + pthread_mutex_unlock(&H5TS_tid_mtx); } /*-------------------------------------------------------------------------- @@ -215,8 +215,8 @@ H5TS_tid_destructor(void *_v) static void H5TS_tid_init(void) { - HDpthread_mutex_init(&H5TS_tid_mtx, NULL); - HDpthread_key_create(&H5TS_tid_key, H5TS_tid_destructor); + pthread_mutex_init(&H5TS_tid_mtx, NULL); + pthread_key_create(&H5TS_tid_key, H5TS_tid_destructor); } /*-------------------------------------------------------------------------- @@ -246,7 +246,7 @@ H5TS_tid_init(void) uint64_t H5TS_thread_id(void) { - H5TS_tid_t *tid = HDpthread_getspecific(H5TS_tid_key); + H5TS_tid_t *tid = pthread_getspecific(H5TS_tid_key); H5TS_tid_t proto_tid; /* An ID is already assigned. */ @@ -260,14 +260,14 @@ H5TS_thread_id(void) * point `tid` at `proto_tid` if we need to allocate some * memory. */ - HDpthread_mutex_lock(&H5TS_tid_mtx); + pthread_mutex_lock(&H5TS_tid_mtx); if ((tid = H5TS_tid_next_free) != NULL) H5TS_tid_next_free = tid->next; else if (H5TS_tid_next_id != UINT64_MAX) { tid = &proto_tid; tid->id = ++H5TS_tid_next_id; } - HDpthread_mutex_unlock(&H5TS_tid_mtx); + pthread_mutex_unlock(&H5TS_tid_mtx); /* If a prototype ID record was established, copy it to the heap. */ if (tid == &proto_tid) @@ -281,7 +281,7 @@ H5TS_thread_id(void) * to it. */ tid->next = NULL; - if (HDpthread_setspecific(H5TS_tid_key, tid) != 0) { + if (pthread_setspecific(H5TS_tid_key, tid) != 0) { H5TS_tid_destructor(tid); return 0; } @@ -323,29 +323,29 @@ H5TS_pthread_first_thread_init(void) #endif /* initialize global API mutex lock */ - HDpthread_mutex_init(&H5_g.init_lock.atomic_lock, NULL); - HDpthread_cond_init(&H5_g.init_lock.cond_var, NULL); + pthread_mutex_init(&H5_g.init_lock.atomic_lock, NULL); + pthread_cond_init(&H5_g.init_lock.cond_var, NULL); H5_g.init_lock.lock_count = 0; - HDpthread_mutex_init(&H5_g.init_lock.atomic_lock2, NULL); + pthread_mutex_init(&H5_g.init_lock.atomic_lock2, NULL); H5_g.init_lock.attempt_lock_count = 0; /* Initialize integer thread identifiers. */ H5TS_tid_init(); /* initialize key for thread-specific error stacks */ - HDpthread_key_create(&H5TS_errstk_key_g, H5TS__key_destructor); + pthread_key_create(&H5TS_errstk_key_g, H5TS__key_destructor); #ifdef H5_HAVE_CODESTACK /* initialize key for thread-specific function stacks */ - HDpthread_key_create(&H5TS_funcstk_key_g, H5TS__key_destructor); + pthread_key_create(&H5TS_funcstk_key_g, H5TS__key_destructor); #endif /* H5_HAVE_CODESTACK */ /* initialize key for thread-specific API contexts */ - HDpthread_key_create(&H5TS_apictx_key_g, H5TS__key_destructor); + pthread_key_create(&H5TS_apictx_key_g, H5TS__key_destructor); /* initialize key for thread cancellability mechanism */ - HDpthread_key_create(&H5TS_cancel_key_s, H5TS__key_destructor); + pthread_key_create(&H5TS_cancel_key_s, H5TS__key_destructor); FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY } /* end H5TS_pthread_first_thread_init() */ @@ -380,13 +380,13 @@ H5TS__mutex_acquire(H5TS_mutex_t *mutex, unsigned int lock_count, hbool_t *acqui *acquired = TRUE; #else /* H5_HAVE_WIN_THREADS */ /* Attempt to acquire the mutex lock */ - if (0 == HDpthread_mutex_lock(&mutex->atomic_lock)) { - pthread_t my_thread_id = HDpthread_self(); + if (0 == pthread_mutex_lock(&mutex->atomic_lock)) { + pthread_t my_thread_id = pthread_self(); /* Check if locked already */ if (mutex->lock_count) { /* Check for this thread already owning the lock */ - if (HDpthread_equal(my_thread_id, mutex->owner_thread)) { + if (pthread_equal(my_thread_id, mutex->owner_thread)) { /* Already owned by self - increment count */ mutex->lock_count += lock_count; *acquired = TRUE; @@ -401,7 +401,7 @@ H5TS__mutex_acquire(H5TS_mutex_t *mutex, unsigned int lock_count, hbool_t *acqui *acquired = TRUE; } /* end else */ - if (0 != HDpthread_mutex_unlock(&mutex->atomic_lock)) + if (0 != pthread_mutex_unlock(&mutex->atomic_lock)) ret_value = -1; } /* end if */ else @@ -463,35 +463,35 @@ herr_t H5TS_mutex_lock(H5TS_mutex_t *mutex) EnterCriticalSection(&mutex->CriticalSection); #else /* H5_HAVE_WIN_THREADS */ /* Acquire the "attempt" lock, increment the attempt lock count, release the lock */ - ret_value = HDpthread_mutex_lock(&mutex->atomic_lock2); + ret_value = pthread_mutex_lock(&mutex->atomic_lock2); if (ret_value) HGOTO_DONE(ret_value); mutex->attempt_lock_count++; - ret_value = HDpthread_mutex_unlock(&mutex->atomic_lock2); + ret_value = pthread_mutex_unlock(&mutex->atomic_lock2); if (ret_value) HGOTO_DONE(ret_value); /* Acquire the library lock */ - ret_value = HDpthread_mutex_lock(&mutex->atomic_lock); + ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) HGOTO_DONE(ret_value); /* Check if this thread already owns the lock */ - if (mutex->lock_count && HDpthread_equal(HDpthread_self(), mutex->owner_thread)) + if (mutex->lock_count && pthread_equal(pthread_self(), mutex->owner_thread)) /* already owned by self - increment count */ mutex->lock_count++; else { /* Wait until the lock is released by current owner thread */ while (mutex->lock_count) - HDpthread_cond_wait(&mutex->cond_var, &mutex->atomic_lock); + pthread_cond_wait(&mutex->cond_var, &mutex->atomic_lock); /* After we've received the signal, take ownership of the mutex */ - mutex->owner_thread = HDpthread_self(); + mutex->owner_thread = pthread_self(); mutex->lock_count = 1; } /* end else */ /* Release the library lock */ - ret_value = HDpthread_mutex_unlock(&mutex->atomic_lock); + ret_value = pthread_mutex_unlock(&mutex->atomic_lock); done: #endif /* H5_HAVE_WIN_THREADS */ @@ -530,12 +530,12 @@ H5TS__mutex_unlock(H5TS_mutex_t *mutex, unsigned int *lock_count) #else /* H5_HAVE_WIN_THREADS */ /* Reset the lock count for this thread */ - ret_value = HDpthread_mutex_lock(&mutex->atomic_lock); + ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) HGOTO_DONE(ret_value); *lock_count = mutex->lock_count; mutex->lock_count = 0; - ret_value = HDpthread_mutex_unlock(&mutex->atomic_lock); + ret_value = pthread_mutex_unlock(&mutex->atomic_lock); /* If the lock count drops to zero, signal the condition variable, to * wake another thread. @@ -543,7 +543,7 @@ H5TS__mutex_unlock(H5TS_mutex_t *mutex, unsigned int *lock_count) if (mutex->lock_count == 0) { int err; - err = HDpthread_cond_signal(&mutex->cond_var); + err = pthread_cond_signal(&mutex->cond_var); if (err != 0) ret_value = err; } /* end if */ @@ -586,11 +586,11 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) #else /* H5_HAVE_WIN_THREADS */ /* Decrement the lock count for this thread */ - ret_value = HDpthread_mutex_lock(&mutex->atomic_lock); + ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) HGOTO_DONE(ret_value); mutex->lock_count--; - ret_value = HDpthread_mutex_unlock(&mutex->atomic_lock); + ret_value = pthread_mutex_unlock(&mutex->atomic_lock); /* If the lock count drops to zero, signal the condition variable, to * wake another thread. @@ -598,7 +598,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) if (mutex->lock_count == 0) { int err; - err = HDpthread_cond_signal(&mutex->cond_var); + err = pthread_cond_signal(&mutex->cond_var); if (err != 0) ret_value = err; } /* end if */ @@ -630,13 +630,13 @@ H5TSmutex_get_attempt_count(unsigned int *count) #ifdef H5_HAVE_WIN_THREADS /* Add Win32 equivalent here when async is supported */ #else /* H5_HAVE_WIN_THREADS */ - ret_value = HDpthread_mutex_lock(&H5_g.init_lock.atomic_lock2); + ret_value = pthread_mutex_lock(&H5_g.init_lock.atomic_lock2); if (ret_value) HGOTO_DONE(ret_value); *count = H5_g.init_lock.attempt_lock_count; - ret_value = HDpthread_mutex_unlock(&H5_g.init_lock.atomic_lock2); + ret_value = pthread_mutex_unlock(&H5_g.init_lock.atomic_lock2); if (ret_value) HGOTO_DONE(ret_value); @@ -725,7 +725,7 @@ H5TS_cancel_count_inc(void) HGOTO_DONE(FAIL); /* Set the thread's cancellation counter with the new object */ - ret_value = HDpthread_setspecific(H5TS_cancel_key_s, (void *)cancel_counter); + ret_value = pthread_setspecific(H5TS_cancel_key_s, (void *)cancel_counter); if (ret_value) { HDfree(cancel_counter); HGOTO_DONE(FAIL); @@ -735,7 +735,7 @@ H5TS_cancel_count_inc(void) /* Check if thread entering library */ if (cancel_counter->cancel_count == 0) /* Set cancellation state to 'disable', and remember previous state */ - ret_value = HDpthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_counter->previous_state); + ret_value = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_counter->previous_state); /* Increment # of times the library API was re-entered, to avoid resetting * previous cancellation state until the final API routine is returning. @@ -788,7 +788,7 @@ H5TS_cancel_count_dec(void) /* Check for leaving last API routine */ if (cancel_counter->cancel_count == 1) /* Reset to previous thread cancellation state, if last API */ - ret_value = HDpthread_setcancelstate(cancel_counter->previous_state, NULL); + ret_value = pthread_setcancelstate(cancel_counter->previous_state, NULL); /* Decrement cancellation counter */ --cancel_counter->cancel_count; @@ -995,7 +995,7 @@ H5TS_create_thread(H5TS_thread_cb_t func, H5TS_attr_t *attr, void *udata) #else /* H5_HAVE_WIN_THREADS */ - HDpthread_create(&ret_value, attr, (void *(*)(void *))func, udata); + pthread_create(&ret_value, attr, (void *(*)(void *))func, udata); #endif /* H5_HAVE_WIN_THREADS */ diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index 0d3bd0f..e773bae 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -393,8 +393,8 @@ static const unsigned char LogTable256[] = { static inline unsigned H5_ATTR_UNUSED H5VM_log2_gen(uint64_t n) { - unsigned r; /* r will be log2(n) */ - register unsigned int t, tt, ttt; /* temporaries */ + unsigned r; /* r will be log2(n) */ + unsigned int t, tt, ttt; /* temporaries */ if ((ttt = (unsigned)(n >> 32))) if ((tt = (unsigned)(n >> 48))) diff --git a/src/H5private.h b/src/H5private.h index da20a1b..bee2afc 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1164,57 +1164,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifndef HDprintf #define HDprintf printf /*varargs*/ #endif -#ifndef HDpthread_attr_destroy -#define HDpthread_attr_destroy(A) pthread_attr_destroy(A) -#endif -#ifndef HDpthread_attr_init -#define HDpthread_attr_init(A) pthread_attr_init(A) -#endif -#ifndef HDpthread_attr_setscope -#define HDpthread_attr_setscope(A, S) pthread_attr_setscope(A, S) -#endif -#ifndef HDpthread_cond_init -#define HDpthread_cond_init(C, A) pthread_cond_init(C, A) -#endif -#ifndef HDpthread_cond_signal -#define HDpthread_cond_signal(C) pthread_cond_signal(C) -#endif -#ifndef HDpthread_cond_wait -#define HDpthread_cond_wait(C, M) pthread_cond_wait(C, M) -#endif -#ifndef HDpthread_create -#define HDpthread_create(R, A, F, U) pthread_create(R, A, F, U) -#endif -#ifndef HDpthread_equal -#define HDpthread_equal(T1, T2) pthread_equal(T1, T2) -#endif -#ifndef HDpthread_getspecific -#define HDpthread_getspecific(K) pthread_getspecific(K) -#endif -#ifndef HDpthread_join -#define HDpthread_join(T, V) pthread_join(T, V) -#endif -#ifndef HDpthread_key_create -#define HDpthread_key_create(K, D) pthread_key_create(K, D) -#endif -#ifndef HDpthread_mutex_init -#define HDpthread_mutex_init(M, A) pthread_mutex_init(M, A) -#endif -#ifndef HDpthread_mutex_lock -#define HDpthread_mutex_lock(M) pthread_mutex_lock(M) -#endif -#ifndef HDpthread_mutex_unlock -#define HDpthread_mutex_unlock(M) pthread_mutex_unlock(M) -#endif -#ifndef HDpthread_self -#define HDpthread_self() pthread_self() -#endif -#ifndef HDpthread_setcancelstate -#define HDpthread_setcancelstate(N, O) pthread_setcancelstate(N, O) -#endif -#ifndef HDpthread_setspecific -#define HDpthread_setspecific(K, V) pthread_setspecific(K, V) -#endif #ifndef HDputc #define HDputc(C, F) putc(C, F) #endif @@ -1537,6 +1486,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifndef HDtimes #define HDtimes(T) times(T) #endif +#ifndef HDtimespec_get +#define HDtimespec_get(T, B) timespec_get(T, B) +#endif #ifndef HDtimespeccmp #ifdef H5_HAVE_TIMESPECCMP @@ -2066,6 +2018,16 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ #endif +/* Typedef for the VFD SWMR end-of-tick queue */ +typedef TAILQ_HEAD(eot_queue, eot_queue_entry) eot_queue_t; + +/* VFD SWMR globals used in FUNC macros */ +H5_DLLVAR unsigned int vfd_swmr_api_entries_g; +H5_DLLVAR eot_queue_t eot_queue_g; + +/* Forward declaration of H5F_vfd_swmr_process_eot_queue() */ +H5_DLL herr_t H5F_vfd_swmr_process_eot_queue(hbool_t entering_api); + /* Forward declaration of H5CXpush() / H5CXpop() */ /* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */ H5_DLL herr_t H5CX_push(void); @@ -2135,8 +2097,6 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); \ BEGIN_MPE_LOG -#include "H5FDvfd_swmr_private.h" - #define VFD_SWMR_ENTER(err) \ do { \ /* TBD assert that the API lock is held. The API lock */ \ @@ -2161,7 +2121,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); ; /* Do nothing: an error occurred. */ \ else if (TAILQ_EMPTY(&eot_queue_g)) \ ; /* Nothing to do. */ \ - else if (H5F_vfd_swmr_process_eot_queue(false) < 0) { \ + else if (H5F_vfd_swmr_process_eot_queue(FALSE) < 0) { \ /* Report error instead of "err" */ \ HDONE_ERROR(H5E_FUNC, H5E_CANTSET, FALSE, "error processing EOT queue") \ } \ diff --git a/src/H5retry_private.h b/src/H5retry_private.h index 057c402..768211d 100644 --- a/src/H5retry_private.h +++ b/src/H5retry_private.h @@ -39,13 +39,13 @@ typedef struct h5_retry_t { * * XXX This is not part of the API. XXX */ -static inline bool -h5_retry_decrement(struct h5_retry_t *r) +static inline hbool_t +H5__retry_decrement(struct h5_retry_t *r) { if (r->tries == 0) - return false; + return FALSE; --r->tries; - return true; + return TRUE; } /* Establish state for a retry loop in `r`. The loop will retry no @@ -69,28 +69,28 @@ h5_retry_decrement(struct h5_retry_t *r) * Note well: the program will enter the body of the loop, above, no more * than 101 times: once for an initial try, and then 100 times for retries. */ -static inline bool -h5_retry_init(struct h5_retry_t *r, unsigned int maxtries, uint64_t minival, uint64_t maxival) +static inline hbool_t +H5_retry_init(h5_retry_t *r, unsigned int maxtries, uint64_t minival, uint64_t maxival) { - memset(r, '\0', sizeof(*r)); - assert(0 < maxtries); - assert(0 < minival && minival <= maxival); + HDmemset(r, '\0', sizeof(*r)); + HDassert(0 < maxtries); + HDassert(0 < minival && minival <= maxival); r->tries = r->maxtries = maxtries; r->ival = minival; r->maxival = maxival; - return h5_retry_decrement(r); + return H5__retry_decrement(r); } /* If any tries remain, sleep for the minimum interval, or twice the * previous sleep time, and return true. If no tries remain, return false. */ -static inline bool -h5_retry_next(struct h5_retry_t *r) +static inline hbool_t +H5_retry_next(h5_retry_t *r) { uint64_t ival; - if (!h5_retry_decrement(r)) - return false; + if (!H5__retry_decrement(r)) + return FALSE; ival = r->ival; if (r->maxival < ival) ival = r->maxival; @@ -99,14 +99,14 @@ h5_retry_next(struct h5_retry_t *r) H5_nanosleep(ival); - return true; + return TRUE; } /* Return the number of tries performed since `h5_retry_init()` * was called on `r`. */ static inline unsigned -h5_retry_tries(struct h5_retry_t *r) +H5_retry_tries(h5_retry_t *r) { return r->maxtries - r->tries; } diff --git a/src/H5system.c b/src/H5system.c index b280c84..1104f3b 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -862,7 +862,7 @@ H5_nanosleep(uint64_t nanosec) #else - const uint64_t nanosec_per_sec = 1000 * 1000 * 1000; + const uint64_t nanosec_per_sec = 1000 * 1000L * 1000; struct timespec sleeptime; /* Struct to hold time to sleep */ /* Set up time to sleep @@ -1173,7 +1173,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct HDfree(arg); } else { - register char *cp; /* pointer into current token */ + char *cp; /* pointer into current token */ /* short command line option */ optchar = argv[H5_optind][sp]; diff --git a/src/Makefile.am b/src/Makefile.am index 3baf833..f39afc7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -64,8 +64,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5lib_settings.c H5system.c \ H5FAint.c H5FAstat.c H5FAtest.c \ H5FD.c H5FDcore.c H5FDfamily.c H5FDint.c H5FDlog.c \ H5FDmulti.c H5FDperform.c H5FDsec2.c H5FDspace.c \ - H5FDsplitter.c H5FDstdio.c H5FDtest.c \ - H5FDvfd_swmr.c H5FDvfd_swmr_instr.c \ + H5FDsplitter.c H5FDstdio.c H5FDtest.c H5FDvfd_swmr.c \ H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSint.c H5FSsection.c \ H5FSstat.c H5FStest.c \ H5G.c H5Gbtree2.c H5Gcache.c H5Gcompact.c H5Gdense.c H5Gdeprec.c \ diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 4e828f8..6abef3b 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -674,18 +674,18 @@ set_tests_properties (H5TEST-tcheck_version-release PROPERTIES # flushrefresh ############################################################################## # autotools script tests -# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. -# NOT CONVERTED accum_swmr_reader is used by accum.c. -# NOT CONVERTED atomic_writer and atomic_reader are standalone programs. -# links_env is used by testlinks_env.sh -# filenotclosed and del_many_dense_attrs are used by testabort_fail.sh -# NOT CONVERTED flushrefresh is used by testflushrefresh.sh. -# NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh -# NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh. -# NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh -# NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG. -# NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly, -# NOT CONVERTED and this lets automake keep all its test programs in one place. +# error_test and err_compat are built at the same time as the other tests, but executed by test_error.sh +# NOT CONVERTED accum_swmr_reader is used by accum.c +# NOT CONVERTED atomic_writer and atomic_reader are stand-alone programs +# links_env is used by test_links_env.sh +# filenotclosed and del_many_dense_attrs are used by test_abort_fail.sh +# NOT CONVERTED flushrefresh is used by test_flush_refresh.sh +# NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_use_cases.sh +# NOT CONVERTED swmr_* files (besides swmr.c) are used by test_swmr.sh +# NOT CONVERTED vds_swmr_* files are used by test_vds_swmr.sh +# 'make check' doesn't run them directly, so they are not included in TEST_PROG. +# Also build testmeta, which is used for timings test. It builds quickly +# and this lets automake keep all its test programs in one place. ############################################################################## #-- Adding test for filenotclosed @@ -853,16 +853,6 @@ if (BUILD_SHARED_LIBS) ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} ) - -############################################################################## -# HDFFV-9655 relative plugin test disabled -# -# add_test (NAME H5PLUGIN-pluginRelative COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:plugin>) -# set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES -# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" -# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} -# ) -############################################################################## endif () option (TEST_SHELL_SCRIPTS "Enable shell script tests" ON) @@ -875,10 +865,10 @@ if (ENABLE_EXTENDED_TESTS) ############################################################################## ### S W M R T E S T S ############################################################################## -# testflushrefresh.sh: flushrefresh -# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes -# testswmr.sh: swmr* -# testvdsswmr.sh: vds_swmr* +# test_flush_refresh.sh: flushrefresh +# test_use_cases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes +# test_swmr.sh: swmr* +# test_vds_swmr.sh: vds_swmr* #-- Adding test for flushrefresh file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test") diff --git a/test/Makefile.am b/test/Makefile.am index 2a22ac4..2b62cf0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -22,22 +22,23 @@ include $(top_srcdir)/config/commence.am AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src # Test scripts-- -# testerror.sh: err_compat, error_test -# testlibinfo.sh: -# testcheck_version.sh: tcheck_version -# testlinks_env.sh: links_env -# testexternal_env.sh: external_env -# testflushrefresh.sh: flushrefresh -# testvds_env.sh: vds_env -# testswmr.sh: swmr* -# testvdsswmr.sh: vds_swmr* -# testabort_fail.sh: filenotclosed.c and del_many_dense_attrs.c -# test_filter_plugin.sh: filter_plugin.c +# test_abort_fail.sh: filenotclosed.c and del_many_dense_attrs.c +# test_check_version.sh: tcheck_version +# test_error.sh: err_compat, error_test +# test_external_env.sh: external_env +# test_flush_refresh.sh: flushrefresh +# test_libinfo.sh: +# test_links_env.sh: links_env # test_mirror.sh: mirror_vfd ../utils/mirror_vfd/* -# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes -TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh testexternal_env.sh \ - testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh \ - testvfdswmr.sh +# test_plugin.sh: filter_plugin.c vfd_plugin.c vol_plugin.c +# test_swmr.sh: swmr* +# test_vds_env.sh: vds_env +# test_vds_swmr.sh: vds_swmr* +# test_use_cases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes +TEST_SCRIPT = test_abort_fail.sh test_check_version.sh test_error.sh \ + test_flush_refresh.sh test_external_env.sh test_libinfo.sh \ + test_links_env.sh test_swmr.sh test_vds_env.sh test_vds_swmr.sh \ + test_use_cases.sh test_vfd_swmr.sh SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \ external_env$(EXEEXT) filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \ flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \ @@ -58,10 +59,9 @@ SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \ vfd_swmr_indep_wr_p0$(EXEEXT) vfd_swmr_indep_wr_p1$(EXEEXT) \ vds_env$(EXEEXT) vds_swmr_gen$(EXEEXT) vds_swmr_reader$(EXEEXT) vds_swmr_writer$(EXEEXT) if HAVE_SHARED_CONDITIONAL - TEST_SCRIPT += test_filter_plugin.sh test_vol_plugin.sh - SCRIPT_DEPEND += filter_plugin$(EXEEXT) vol_plugin$(EXEEXT) + TEST_SCRIPT += test_plugin.sh + SCRIPT_DEPEND += filter_plugin$(EXEEXT) vfd_plugin $(EXEEXT) vol_plugin$(EXEEXT) endif - if MIRROR_VFD_CONDITIONAL TEST_SCRIPT += test_mirror.sh endif @@ -84,22 +84,25 @@ TEST_PROG= testhdf5 \ dangle dtransform reserved cross_read freespace mf vds file_image \ unregister cache_logging cork swmr thread_id vol timer event_set -# List programs to be built when testing here. -# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. -# tcheck_version is used by testcheck_version.sh. -# accum_swmr_reader is used by accum.c. -# atomic_writer and atomic_reader are standalone programs. -# links_env is used by testlinks_env.sh -# external_env is used by testexternal_env.sh -# filenotclosed and del_many_dense_attrs are used by testabort_fail.sh -# flushrefresh is used by testflushrefresh.sh. -# use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh -# swmr_* files (besides swmr.c) are used by testswmr.sh. -# vds_swmr_* files are used by testvdsswmr.sh -# vds_env is used by testvds_env.sh +# List programs to be built when testing here +# +# error_test and err_compat are built at the same time as the other tests, but executed by test_error.sh +# tcheck_version is used by test_check_version.sh +# accum_swmr_reader is used by accum.c +# atomic_writer and atomic_reader are stand-alone programs +# links_env is used by test_links_env.sh +# external_env is used by test_external_env.sh +# filenotclosed and del_many_dense_attrs are used by test_abort_fail.sh +# flushrefresh is used by test_flush_refresh.sh +# use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_use_cases.sh +# swmr_* files (besides swmr.c) are used by test_swmr.sh +# vds_swmr_* files are used by test_vds_swmr.sh +# vds_env is used by test_vds_env.sh # mirror_vfd is used by test_mirror.sh +# # 'make check' doesn't run them directly, so they are not included in TEST_PROG. -# Also build testmeta, which is used for timings test. It builds quickly, +# +# Also build testmeta, which is used for the timing test. It builds quickly # and this lets automake keep all its test programs in one place. check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \ testmeta accum_swmr_reader atomic_writer atomic_reader external_env \ @@ -124,7 +127,6 @@ check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \ if HAVE_SHARED_CONDITIONAL check_PROGRAMS+= filter_plugin vfd_plugin vol_plugin endif - if MIRROR_VFD_CONDITIONAL check_PROGRAMS+= mirror_vfd endif diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake index e7de735..140da6f 100644 --- a/test/ShellTests.cmake +++ b/test/ShellTests.cmake @@ -17,21 +17,21 @@ find_program (PWSH NAMES pwsh powershell) if (PWSH) - file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/use_cases_test") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test") set (srcdir ${HDF5_TEST_SOURCE_DIR}) set (H5_UTILS_TEST_BUILDDIR ${CMAKE_TEST_OUTPUT_DIRECTORY}) set (H5_TEST_BUILDDIR ${HDF5_TEST_BINARY_DIR}/H5TEST) - configure_file(${HDF5_TEST_SOURCE_DIR}/testswmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1 @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_swmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.ps1 @ONLY) # test commented out as currently the programs are not allowing another access to the data file #add_test (H5SHELL-testswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1) #set_tests_properties (H5SHELL-testswmr PROPERTIES # ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" # WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST #) - configure_file(${HDF5_TEST_SOURCE_DIR}/testvdsswmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.ps1 @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_vds_swmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.ps1 @ONLY) # test commented out as currently the programs are not allowing another access to the data file #add_test (H5SHELL-testvdsswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.ps1) #set_tests_properties (H5SHELL-testvdsswmr PROPERTIES @@ -48,11 +48,11 @@ elseif (UNIX) # configure scripts to test dir ############################################################################## if (H5_PERL_FOUND) - configure_file(${HDF5_TEST_SOURCE_DIR}/testflushrefresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_flush_refresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_flush_refresh.sh @ONLY) endif () - configure_file(${HDF5_TEST_SOURCE_DIR}/test_usecases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh @ONLY) - configure_file(${HDF5_TEST_SOURCE_DIR}/testswmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh @ONLY) - configure_file(${HDF5_TEST_SOURCE_DIR}/testvdsswmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_use_cases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_use_cases.sh @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_swmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.sh @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_vds_swmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.sh @ONLY) ############################################################################## # copy test programs to test dir @@ -78,44 +78,44 @@ elseif (UNIX) # flushrefresh ############################################################################## # autotools script tests - # error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. - # NOT CONVERTED accum_swmr_reader is used by accum.c. - # NOT CONVERTED atomic_writer and atomic_reader are standalone programs. - # links_env is used by testlinks_env.sh - # filenotclosed and del_many_dense_attrs are used by testabort_fail.sh - # NOT CONVERTED flushrefresh is used by testflushrefresh.sh. - # NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh - # NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh. - # NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh + # error_test and err_compat are built at the same time as the other tests, but executed by test_error.sh + # NOT CONVERTED accum_swmr_reader is used by accum.c + # NOT CONVERTED atomic_writer and atomic_reader are stand-alone programs + # links_env is used by test_links_env.sh + # filenotclosed and del_many_dense_attrs are used by test_abort_fail.sh + # NOT CONVERTED flushrefresh is used by test_flush_refresh.sh. + # NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_use_cases.sh + # NOT CONVERTED swmr_* files (besides swmr.c) are used by test_swmr.sh. + # NOT CONVERTED vds_swmr_* files are used by test_vds_swmr.sh # NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG. - # NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly, + # NOT CONVERTED Also build testmeta, which is used for timing test. It builds quickly # NOT CONVERTED and this lets automake keep all its test programs in one place. ############################################################################## ############################################################################## ### S W M R T E S T S ############################################################################## - # testflushrefresh.sh: flushrefresh - # test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes - # testswmr.sh: swmr* - # testvdsswmr.sh: vds_swmr* - add_test (H5SHELL-testflushrefresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh) - set_tests_properties (H5SHELL-testflushrefresh PROPERTIES + # test_flush_refresh.sh: flushrefresh + # test_use_cases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes + # test_swmr.sh: swmr* + # test_vds_swmr.sh: vds_swmr* + add_test (H5SHELL-test_flush_refresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_flush_refresh.sh) + set_tests_properties (H5SHELL-test_flush_refresh PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) - add_test (H5SHELL-test_usecases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh) - set_tests_properties (H5SHELL-test_usecases PROPERTIES + add_test (H5SHELL-test_use_cases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_use_cases.sh) + set_tests_properties (H5SHELL-test_use_cases PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) - add_test (H5SHELL-testswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh) - set_tests_properties (H5SHELL-testswmr PROPERTIES + add_test (H5SHELL-test_swmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.sh) + set_tests_properties (H5SHELL-test_swmr PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) - add_test (H5SHELL-testvdsswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh) - set_tests_properties (H5SHELL-testvdsswmr PROPERTIES + add_test (H5SHELL-test_vds_swmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.sh) + set_tests_properties (H5SHELL-test_vds_swmr PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) diff --git a/test/external.c b/test/external.c index 11185b3..bb86cde 100644 --- a/test/external.c +++ b/test/external.c @@ -166,8 +166,7 @@ test_non_extendible(hid_t file) if (file_size != (max_size[0] * sizeof(int))) { H5_FAILED(); HDputs(" Wrong file size."); - HDprintf(" got: %lu\n ans: %lu\n", (unsigned long)file_size, - (unsigned long)max_size[0] * sizeof(int)); + HDprintf(" got: %" PRIuHSIZE "\n ans: %" PRIuHSIZE "\n", file_size, max_size[0] * sizeof(int)); goto error; } @@ -986,11 +985,11 @@ test_path_absolute(hid_t fapl) if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath))) TEST_ERROR for (i = 0; i < N_EXT_FILES; i++) { - HDsnprintf(filename, sizeof(filename), "%s%sextern_%dr.raw", cwdpath, H5_DIR_SEPS, (int)i + 1); + HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1); #if defined(H5_HAVE_WINDOW_PATH) /* For windows, test path-absolute case (\dir\file.raw) for the second file */ if (i == 1) - HDsnprintf(filename, sizeof(filename), "%s%sextern_%dr.raw", cwdpath + 2, H5_DIR_SEPS, i + 1); + HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1); #endif if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0) FAIL_STACK_ERROR diff --git a/test/filter_plugin.c b/test/filter_plugin.c index c373b3b..dd61a43 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -968,16 +968,6 @@ test_path_api_calls(void) */ n_starting_paths = 42; - /* Check that initialization is correct */ - TESTING(" initialize"); - - if (H5PLsize(&n_paths) < 0) - TEST_ERROR; - if (n_paths != 2) - TEST_ERROR; - - PASSED(); - /****************/ /* H5PLremove() */ /****************/ diff --git a/test/supervise.subr b/test/supervise.subr deleted file mode 100644 index 8fc526a..0000000 --- a/test/supervise.subr +++ /dev/null @@ -1,42 +0,0 @@ -#!/us/bin/env bash -# -# Copyright by Akadio, Inc. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the vfd swmr feature. - -# catch_out_err_and_rc outbase command [arguments] -# -# Run `command` with any `arguments` provided. Redirect `command`'s -# stderr and stdout to the file `outbase.out`. Record the result code -# of `command` in `outbase.rc`. -# -catch_out_err_and_rc() -{ - if [ $# -lt 2 ]; then - echo "usage: catch_output_and_rc outbase command [arguments]" \ - 1>&2 - exit 1 - fi - outbase=$1 - shift - { - "$@" < ${STDIN_PATH:-/dev/stdin} > ${STDOUT_PATH:-/dev/stdout} & - echo $! > ${outbase}.pid - wait $(cat ${outbase}.pid) - echo $? > ${outbase}.rc - } 2>&1 | tee ${outbase}.out -} - -#catch_out_err_and_rc xxlsxx ls smiles & - -#wait -#echo result=$(cat xxlsxx.rc) - -#exit 0 diff --git a/test/testabort_fail.sh.in b/test/test_abort_fail.sh.in index a866f9e..a866f9e 100644 --- a/test/testabort_fail.sh.in +++ b/test/test_abort_fail.sh.in diff --git a/test/testcheck_version.sh.in b/test/test_check_version.sh.in index 273702e..273702e 100644 --- a/test/testcheck_version.sh.in +++ b/test/test_check_version.sh.in diff --git a/test/testerror.sh.in b/test/test_error.sh.in index 4fb2a81..4fb2a81 100644 --- a/test/testerror.sh.in +++ b/test/test_error.sh.in diff --git a/test/testexternal_env.sh.in b/test/test_external_env.sh.in index 94fbb88..94fbb88 100644 --- a/test/testexternal_env.sh.in +++ b/test/test_external_env.sh.in diff --git a/test/test_filter_plugin.sh.in b/test/test_filter_plugin.sh.in deleted file mode 100644 index 78cdb3a..0000000 --- a/test/test_filter_plugin.sh.in +++ /dev/null @@ -1,113 +0,0 @@ -#! /bin/sh -# -# 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 COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -# Determine if backward compatibility options enabled -DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -nerrors=0 -verbose=yes -exit_code=$EXIT_SUCCESS - -TEST_NAME=filter_plugin -TEST_BIN=`pwd`/$TEST_NAME -FROM_DIR=`pwd`/.libs -case $(uname) in - CYGWIN* ) - PLUGINS_FOR_DIR1="$FROM_DIR/cygfilter_plugin1* $FROM_DIR/cygfilter_plugin3*" - PLUGINS_FOR_DIR2="$FROM_DIR/cygfilter_plugin2* $FROM_DIR/cygfilter_plugin4*" - ;; - *) - PLUGINS_FOR_DIR1="$FROM_DIR/libfilter_plugin1* $FROM_DIR/libfilter_plugin3*" - PLUGINS_FOR_DIR2="$FROM_DIR/libfilter_plugin2* $FROM_DIR/libfilter_plugin4*" - ;; -esac -PLUGIN_DIR1=filter_plugin_dir1 -PLUGIN_DIR2=filter_plugin_dir2 -CP="cp -p" # Use -p to preserve mode,ownership,timestamps -RM="rm -rf" - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Main Body -# Create test directories if necessary. -test -d $PLUGIN_DIR1 || mkdir -p $PLUGIN_DIR1 -if [ $? != 0 ]; then - echo "Failed to create filter plugin test directory ($PLUGIN_DIR1)" - exit $EXIT_FAILURE -fi - -test -d $PLUGIN_DIR2 || mkdir -p $PLUGIN_DIR2 -if [ $? != 0 ]; then - echo "Failed to create filter plugin test directory ($PLUGIN_DIR2)" - exit $EXIT_FAILURE -fi - -# Copy plugins for the tests. -$CP $PLUGINS_FOR_DIR1 $PLUGIN_DIR1 -if [ $? != 0 ]; then - echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR1) to test directory." - exit $EXIT_FAILURE -fi - -$CP $PLUGINS_FOR_DIR2 $PLUGIN_DIR2 -if [ $? != 0 ]; then - echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR2) to test directory." - exit $EXIT_FAILURE -fi - -# setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_DIR1}:${PLUGIN_DIR2}" - -# Run the test -$ENVCMD $TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi - -############################################ -# HDFFV-9655 test for relative path disabled -# setup filter plugin path relative to test -# actual executable is in the .libs folder -#ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_DIR1}:@/../${PLUGIN_DIR2}" -# -# Run the test -#$ENVCMD $TEST_BIN -#if [ $? != 0 ]; then -# nerrors=`expr $nerrors + 1` -#fi -############################################# - -# print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All filter plugin tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories and leave -$RM $PLUGIN_DIR1 $PLUGIN_DIR2 - -exit $exit_code diff --git a/test/testflushrefresh.sh.in b/test/test_flush_refresh.sh.in index 209d370..209d370 100644 --- a/test/testflushrefresh.sh.in +++ b/test/test_flush_refresh.sh.in diff --git a/test/testlibinfo.sh.in b/test/test_libinfo.sh.in index d9fee48..d9fee48 100644 --- a/test/testlibinfo.sh.in +++ b/test/test_libinfo.sh.in diff --git a/test/testlinks_env.sh.in b/test/test_links_env.sh.in index 09074c3..09074c3 100644 --- a/test/testlinks_env.sh.in +++ b/test/test_links_env.sh.in diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in new file mode 100644 index 0000000..d958b4b --- /dev/null +++ b/test/test_plugin.sh.in @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +# +# 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 COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# This shell script is for testing filter, VFD, and VOL plugins. +# +srcdir=@srcdir@ +TOP_BUILDDIR=@top_builddir@ + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +CP="cp -p" # Use -p to preserve mode,ownership, timestamps +RM="rm -rf" + +nerrors=0 +verbose=yes +exit_code=$EXIT_SUCCESS + +# Test binary names +FILTER_TEST_NAME=filter_plugin +FILTER_TEST_BIN=`pwd`/$FILTER_TEST_NAME + +VFD_TEST_NAME=vfd_plugin +VFD_TEST_BIN=`pwd`/$VFD_TEST_NAME + +VOL_TEST_NAME=vol_plugin +VOL_TEST_BIN=`pwd`/$VOL_TEST_NAME + +# Paths to actual plugins ("libraries" in test directory are just stubs) +FROM_DIR=`pwd`/.libs +case $(uname) in + CYGWIN* ) + NULL_VFD_PLUGIN="$FROM_DIR/cygnull_vfd_plugin*" + NULL_VOL_PLUGIN="$FROM_DIR/cygnull_vol_connector*" + PLUGINS_FOR_DIR1="$FROM_DIR/cygfilter_plugin1* $FROM_DIR/cygfilter_plugin3*" + PLUGINS_FOR_DIR2="$FROM_DIR/cygfilter_plugin2* $FROM_DIR/cygfilter_plugin4*" + ;; + *) + NULL_VFD_PLUGIN="$FROM_DIR/libnull_vfd_plugin*" + NULL_VOL_PLUGIN="$FROM_DIR/libnull_vol_connector*" + PLUGINS_FOR_DIR1="$FROM_DIR/libfilter_plugin1* $FROM_DIR/libfilter_plugin3*" + PLUGINS_FOR_DIR2="$FROM_DIR/libfilter_plugin2* $FROM_DIR/libfilter_plugin4*" + ;; +esac + +# Directories where we'll copy plugins +TEMP_PLUGIN_DIR=temp_plugins +TEMP_FILTER_DIR1=temp_filter_plugin_dir1 +TEMP_FILTER_DIR2=temp_filter_plugin_dir2 + +# Function to print a line-line message left justified in a field of +# 70 characters beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +############# +# Main Body # +############# + +# Create plugin directories +test -d $TEMP_PLUGIN_DIR || mkdir -p $TEMP_PLUGIN_DIR +if [ $? != 0 ]; then + echo "Failed to create plugin test directory ($TEMP_PLUGIN_DIR)" + exit $EXIT_FAILURE +fi +test -d $TEMP_FILTER_DIR1 || mkdir -p $TEMP_FILTER_DIR1 +if [ $? != 0 ]; then + echo "Failed to create filter plugin test directory ($TEMP_FILTER_DIR1)" + exit $EXIT_FAILURE +fi +test -d $TEMP_FILTER_DIR2 || mkdir -p $TEMP_FILTER_DIR2 +if [ $? != 0 ]; then + echo "Failed to create filter plugin test directory ($TEMP_FILTER_DIR2)" + exit $EXIT_FAILURE +fi + +# Copy plugins for the tests +$CP $NULL_VFD_PLUGIN $TEMP_PLUGIN_DIR +if [ $? != 0 ]; then + echo "Failed to copy NULL VFD plugin ($NULL_VFD_PLUGIN) to test directory." + exit $EXIT_FAILURE +fi +$CP $NULL_VOL_PLUGIN $TEMP_PLUGIN_DIR +if [ $? != 0 ]; then + echo "Failed to copy NULL VOL plugin ($NULL_VOL_PLUGIN) to test directory." + exit $EXIT_FAILURE +fi +$CP $PLUGINS_FOR_DIR1 $TEMP_FILTER_DIR1 +if [ $? != 0 ]; then + echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR1) to test directory." + exit $EXIT_FAILURE +fi +$CP $PLUGINS_FOR_DIR2 $TEMP_FILTER_DIR2 +if [ $? != 0 ]; then + echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR2) to test directory." + exit $EXIT_FAILURE +fi + +# Set plugin path +ENVCMD="env HDF5_PLUGIN_PATH=${TEMP_PLUGIN_DIR}:${TEMP_FILTER_DIR1}:${TEMP_FILTER_DIR2}" + +# Run the tests +$ENVCMD $FILTER_TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi +$ENVCMD $VFD_TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi +$ENVCMD $VOL_TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi + +# Print results +if test $nerrors -ne 0 ; then + echo "$nerrors errors encountered" + exit_code=$EXIT_FAILURE +else + echo "All plugin tests passed." + exit_code=$EXIT_SUCCESS +fi + +# Clean up temporary files/directories and leave +$RM $TEMP_PLUGIN_DIR $TEMP_FILTER_DIR1 $TEMP_FILTER_DIR2 + +exit $exit_code diff --git a/test/testswmr.pwsh.in b/test/test_swmr.pwsh.in index de7a57a..de7a57a 100644 --- a/test/testswmr.pwsh.in +++ b/test/test_swmr.pwsh.in diff --git a/test/testswmr.sh.in b/test/test_swmr.sh.in index 771fe4a..771fe4a 100644 --- a/test/testswmr.sh.in +++ b/test/test_swmr.sh.in diff --git a/test/test_usecases.sh.in b/test/test_use_cases.sh.in index fd30afd..fd30afd 100644 --- a/test/test_usecases.sh.in +++ b/test/test_use_cases.sh.in diff --git a/test/testvds_env.sh.in b/test/test_vds_env.sh.in index 39f13a5..39f13a5 100644 --- a/test/testvds_env.sh.in +++ b/test/test_vds_env.sh.in diff --git a/test/testvdsswmr.pwsh.in b/test/test_vds_swmr.pwsh.in index bf5aabb..bf5aabb 100644 --- a/test/testvdsswmr.pwsh.in +++ b/test/test_vds_swmr.pwsh.in diff --git a/test/testvdsswmr.sh.in b/test/test_vds_swmr.sh.in index 399fdef..399fdef 100644 --- a/test/testvdsswmr.sh.in +++ b/test/test_vds_swmr.sh.in diff --git a/test/testvfdswmr.sh.in b/test/test_vfd_swmr.sh.in index 88a4ec1..4ae4085 100644 --- a/test/testvfdswmr.sh.in +++ b/test/test_vfd_swmr.sh.in @@ -19,8 +19,6 @@ srcdir=@srcdir@ -. ${srcdir}/supervise.subr - utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@ ############################################################################### @@ -122,6 +120,29 @@ WAIT_MESSAGE() { fi } +# catch_out_err_and_rc outbase command [arguments] +# +# Run `command` with any `arguments` provided. Redirect `command`'s +# stderr and stdout to the file `outbase.out`. Record the result code +# of `command` in `outbase.rc`. +# +catch_out_err_and_rc() +{ + if [ $# -lt 2 ]; then + echo "usage: catch_output_and_rc outbase command [arguments]" \ + 1>&2 + exit 1 + fi + outbase=$1 + shift + { + "$@" < ${STDIN_PATH:-/dev/stdin} > ${STDOUT_PATH:-/dev/stdout} & + echo $! > ${outbase}.pid + wait $(cat ${outbase}.pid) + echo $? > ${outbase}.rc + } 2>&1 | tee ${outbase}.out +} + ############################################################################### ## Main ## diff --git a/test/test_vol_plugin.sh.in b/test/test_vol_plugin.sh.in deleted file mode 100644 index d31646b..0000000 --- a/test/test_vol_plugin.sh.in +++ /dev/null @@ -1,84 +0,0 @@ -#! /bin/sh -# -# 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 COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# This shell script is for testing VOL connector plugins. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -nerrors=0 -verbose=yes -exit_code=$EXIT_SUCCESS - -TEST_NAME=vol_plugin -TEST_BIN=`pwd`/$TEST_NAME -FROM_DIR=`pwd`/.libs -case $(uname) in - CYGWIN* ) - NULL_VOL_PLUGIN="$FROM_DIR/cygnull_vol_connector*" - ;; - *) - NULL_VOL_PLUGIN="$FROM_DIR/libnull_vol_connector*" - ;; -esac -TEMP_PLUGIN_DIR=null_vol_plugin_dir -CP="cp -p" # Use -p to preserve mode,ownership, timestamps -RM="rm -rf" - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Main Body -# Create test directory if necessary. -test -d $TEMP_PLUGIN_DIR || mkdir -p $TEMP_PLUGIN_DIR -if [ $? != 0 ]; then - echo "Failed to create VOL connector plugin test directory ($TEMP_PLUGIN_DIR)" - exit $EXIT_FAILURE -fi - -# Copy plugin for the tests. -$CP $NULL_VOL_PLUGIN $TEMP_PLUGIN_DIR -if [ $? != 0 ]; then - echo "Failed to copy NULL VOL plugin ($NULL_VOL_PLUGIN) to test directory." - exit $EXIT_FAILURE -fi - -# setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=${TEMP_PLUGIN_DIR}" - -# Run the test -$ENVCMD $TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi - -# print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All VOL plugin tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories and leave -$RM $TEMP_PLUGIN_DIR - -exit $exit_code diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index 0973dd8..c61a065 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -18,7 +18,6 @@ * *************************************************************/ -#include "H5queue.h" #include "h5test.h" #include "vfd_swmr_common.h" @@ -3391,7 +3390,7 @@ test_shadow_index_lookup(void) for (j = 0; j < cursize; j++) { H5FD_vfd_swmr_idx_entry_t *found; - found = vfd_swmr_pageno_to_mdf_idx_entry(idx, cursize, idx[j].hdf5_page_offset, FALSE); + found = H5FD_vfd_swmr_pageno_to_mdf_idx_entry(idx, cursize, idx[j].hdf5_page_offset, FALSE); if ((have_failj && failj == j) || found != &idx[j]) break; } diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c index 357c3b1..3540c61 100644 --- a/test/vfd_swmr_bigset_writer.c +++ b/test/vfd_swmr_bigset_writer.c @@ -289,7 +289,7 @@ usage(const char *progname) "-w deflate_level: the level (0 - 9) of gzip compression\n" "\n", progname); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } static bool @@ -382,10 +382,10 @@ state_init(state_t *s, int argc, char **argv) s->use_named_pipe = false; break; case 'd': - if (strcmp(optarg, "1") == 0 || strcmp(optarg, "one") == 0) + if (HDstrcmp(optarg, "1") == 0 || HDstrcmp(optarg, "one") == 0) s->expand_2d = false; - else if (strcmp(optarg, "2") == 0 || strcmp(optarg, "two") == 0 || - strcmp(optarg, "both") == 0) + else if (HDstrcmp(optarg, "2") == 0 || HDstrcmp(optarg, "two") == 0 || + HDstrcmp(optarg, "both") == 0) s->expand_2d = true; else { HDfprintf(stderr, "bad -d argument %s\n", optarg); @@ -496,7 +496,7 @@ state_init(state_t *s, int argc, char **argv) #ifdef H5_HAVE_AUX_PROCESS if (s->vds == vds_multi) - exit(EXIT_SUCCESS); + HDexit(EXIT_SUCCESS); #endif if (s->vds != vds_off && s->expand_2d) { @@ -2703,7 +2703,7 @@ main(int argc, char **argv) /* Start to write chunks. The writer writes as many chunks as possible within a tick, then * notify the reader. But it doesn't receive back the reader's notice. */ if (!write_dsets(s, &np, mat)) { - fprintf(stderr, "write_dsets failed"); + HDfprintf(stderr, "write_dsets failed"); TEST_ERROR; } } diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index d0eca4f6..c89b078 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -51,7 +51,7 @@ below_speed_limit(struct timespec *last, const struct timespec *ival) /* NOTE: timespec_get() is C11. This may need further tweaks. */ #ifdef H5_HAVE_WIN32_API - if (timespec_get(&now, TIME_UTC) != TIME_UTC) { + if (HDtimespec_get(&now, TIME_UTC) != TIME_UTC) { #else if (HDclock_gettime(CLOCK_MONOTONIC, &now) == -1) { #endif diff --git a/test/vfd_swmr_dsetchks_writer.c b/test/vfd_swmr_dsetchks_writer.c index d649c3c..5c1f30d 100644 --- a/test/vfd_swmr_dsetchks_writer.c +++ b/test/vfd_swmr_dsetchks_writer.c @@ -254,7 +254,7 @@ usage(const char *progname) " -x <xincrs> or -y <ydecrs>\n" "\n"); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* usage() */ /* @@ -340,7 +340,7 @@ state_init(state_t *s, int argc, char **argv) case 'u': /* Ticks for reader to wait before verification */ case 'c': /* Communication interval */ errno = 0; - tmp = strtoul(optarg, &end, 0); + tmp = HDstrtoul(optarg, &end, 0); if (end == optarg || *end != '\0') { HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg); TEST_ERROR; diff --git a/test/vfd_swmr_gfail_writer.c b/test/vfd_swmr_gfail_writer.c index 53b95d3..27d6c31 100644 --- a/test/vfd_swmr_gfail_writer.c +++ b/test/vfd_swmr_gfail_writer.c @@ -631,7 +631,7 @@ main(int argc, char **argv) /* Delete 1000 groups if the del_grp option is true. */ if (s.del_grp && s.nsteps > 1000) { - printf("Deleting groups. \n"); + HDprintf("Deleting groups. \n"); for (step = s.nsteps - 1; step >= (s.nsteps - 1000); step--) { dbgf(2, "writer: deleting step %d\n", step); @@ -667,21 +667,21 @@ main(int argc, char **argv) } if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } - printf("Reader: call back function: check group names.\n"); + HDprintf("Reader: call back function: check group names.\n"); if (H5Literate(s.file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, NULL) < 0) { - printf("H5Literate failed \n"); + HDprintf("H5Literate failed \n"); TEST_ERROR; } if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } temp_time = TIME_PASSED(start_time, end_time); - fprintf(stdout, "H5Literate: temp time = %lf\n", temp_time); + HDfprintf(stdout, "H5Literate: temp time = %lf\n", temp_time); } if (H5Pclose(fapl) < 0) { @@ -768,22 +768,11 @@ op_func(hid_t loc_id, const char *name, const H5L_info_t *info, void *operator_d (void)info; (void)operator_data; -#if 0 /* Kent for debugging purpose. */ - char * subname; - int grp_num; -#endif - - if (strncmp(name, "group", (size_t)5) != 0) { - printf("Iteration failed: group name is %s\n", name); + if (HDstrncmp(name, "group", (size_t)5) != 0) { + HDprintf("Iteration failed: group name is %s\n", name); return -1; } else { -#if 0 /* Kent for debugging purpose. */ - subname = name + 6; - grp_num = atoi((const char *)subname); - if (grp_num > 1450000 && grp_num % 5000 == 0) - dbgf(2, "Group name is %s\n", name); -#endif return 0; } } diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c index dbceace..66fd22f 100644 --- a/test/vfd_swmr_gperf_writer.c +++ b/test/vfd_swmr_gperf_writer.c @@ -112,7 +112,7 @@ typedef struct { static void usage(const char *progname) { - fprintf( + HDfprintf( stderr, "usage: ./%s -P -n 1000 -N 5 -q (create 1000 groups, each group has 5 attributes)\n" "usage: ./%s -P -L -n 100000 -q (create 100000 groups and generate log message to file 'log-test')\n" @@ -197,7 +197,7 @@ usage(const char *progname) "-q: silence printouts, few messages\n" "\n", progname, progname); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } static bool @@ -212,7 +212,7 @@ state_init(state_t *s, int argc, char **argv) *s = ALL_HID_INITIALIZER; if (H5_basename(argv[0], &tfile) < 0) { - printf("H5_basename failed\n"); + HDprintf("H5_basename failed\n"); TEST_ERROR; } @@ -250,15 +250,15 @@ state_init(state_t *s, int argc, char **argv) errno = 0; tmp = HDstrtoul(optarg, &end, 0); if (end == optarg || *end != '\0') { - printf("couldn't parse `-%c` argument `%s`\n", ch, optarg); + HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg); TEST_ERROR; } else if (errno != 0) { - printf("couldn't parse `-%c` argument `%s`\n", ch, optarg); + HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg); TEST_ERROR; } else if (tmp > UINT_MAX) { - printf("`-%c` argument `%lu` too large\n", ch, tmp); + HDprintf("`-%c` argument `%lu` too large\n", ch, tmp); TEST_ERROR; } @@ -301,7 +301,7 @@ state_init(state_t *s, int argc, char **argv) else if (HDstrcmp(optarg, "grp-dense-t-compact") == 0) s->grp_op_pattern = 'T'; else { - printf("Invalid -O argument \"%s\"", optarg); + HDprintf("Invalid -O argument \"%s\"", optarg); TEST_ERROR; } break; @@ -331,7 +331,7 @@ state_init(state_t *s, int argc, char **argv) else if (HDstrcmp(optarg, "del-ohr-block") == 0) s->at_pattern = 'R'; else { - printf("Invalid -A argument \"%s\"", optarg); + HDprintf("Invalid -A argument \"%s\"", optarg); TEST_ERROR; } break; @@ -354,24 +354,24 @@ state_init(state_t *s, int argc, char **argv) if (!s->grp_op_test) { if (s->asteps < 1 || s->asteps > s->nsteps) { - printf("attribute interval is out of bounds\n"); + HDprintf("attribute interval is out of bounds\n"); TEST_ERROR; } } if (s->grp_op_test && s->attr_test) { - printf("Cannot test both group operation and attribute tests!\n"); - printf("Attribute tests are ignored.\n"); + HDprintf("Cannot test both group operation and attribute tests!\n"); + HDprintf("Attribute tests are ignored.\n"); } if (argc > 0) { - printf("unexpected command-line arguments\n"); + HDprintf("unexpected command-line arguments\n"); TEST_ERROR; } /* space for attributes */ if ((s->one_by_one_sid = H5Screate_simple(1, &dims, &dims)) < 0) { - printf("H5Screate_simple failed\n"); + HDprintf("H5Screate_simple failed\n"); TEST_ERROR; } @@ -395,11 +395,11 @@ error: * * bool one_chunk_ohr * flag to indicate if the object header chunk is 1 or greater - * 1: true - * greater than 1: false + * 1: TRUE + * greater than 1: FALSE * - * Return: Success: true - * Failure: false + * Return: Success: TRUE + * Failure: FALSE * *------------------------------------------------------------------------- */ @@ -412,19 +412,19 @@ check_ohr_num_chunk(hid_t g, bool one_chunk_ohr) /* Get the object information */ if (H5Oget_native_info(g, &ninfo, H5O_NATIVE_INFO_HDR) < 0) { - printf("H5Oget_native_info failed\n"); + HDprintf("H5Oget_native_info failed\n"); TEST_ERROR; } if (true == one_chunk_ohr) { if (ninfo.hdr.nchunks != 1) { - printf("Object header should have only one chunk,but it is not.\n"); + HDprintf("Object header should have only one chunk,but it is not.\n"); TEST_ERROR; } } else { if (ninfo.hdr.nchunks <= 1) { - printf("Object header should have more than one chunk,but it is not.\n"); + HDprintf("Object header should have more than one chunk,but it is not.\n"); TEST_ERROR; } } @@ -482,7 +482,7 @@ add_attr(state_t *s, hid_t oid, unsigned int which, unsigned num_attrs, const ch /* Need to obtain native datatype for H5Aread */ if ((amtype = H5Tget_native_type(atype, H5T_DIR_ASCEND)) < 0) { - printf("H5Tget_native_type failed\n"); + HDprintf("H5Tget_native_type failed\n"); TEST_ERROR; } @@ -492,7 +492,7 @@ add_attr(state_t *s, hid_t oid, unsigned int which, unsigned num_attrs, const ch /* Construct attribute name like attr-0-0 */ HDsprintf(attrname, aname_fmt, which, u); if ((aid = H5Acreate2(oid, attrname, atype, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - printf("H5Acreate2 failed\n"); + HDprintf("H5Acreate2 failed\n"); TEST_ERROR; } @@ -502,13 +502,13 @@ add_attr(state_t *s, hid_t oid, unsigned int which, unsigned num_attrs, const ch /* Write data into the attribute */ if (H5Awrite(aid, amtype, &attr_value) < 0) { - printf("H5Awrite failed\n"); + HDprintf("H5Awrite failed\n"); TEST_ERROR; } /* Close attribute */ if (H5Aclose(aid) < 0) { - printf("H5Aclose failed\n"); + HDprintf("H5Aclose failed\n"); TEST_ERROR; } @@ -516,8 +516,8 @@ add_attr(state_t *s, hid_t oid, unsigned int which, unsigned num_attrs, const ch * we need to check if this test behaves as expected. */ if (s->at_pattern == 'a' || s->at_pattern == 'R') { if (false == check_ohr_num_chunk(oid, false)) { - printf("An object header continuation block should be created. \n"); - printf("But it is not.\n"); + HDprintf("An object header continuation block should be created. \n"); + HDprintf("But it is not.\n"); TEST_ERROR; } } @@ -580,7 +580,7 @@ add_vlstr_attr(state_t *s, hid_t g, unsigned int which) /* Allocate buffer for the VL string value */ astr_val = HDmalloc(VS_ATTR_NAME_LEN); if (astr_val == NULL) { - printf("Allocate memory for VL string failed.\n"); + HDprintf("Allocate memory for VL string failed.\n"); TEST_ERROR; } @@ -592,32 +592,32 @@ add_vlstr_attr(state_t *s, hid_t g, unsigned int which) /* Create a datatype to refer to. */ if ((atype = H5Tcopy(H5T_C_S1)) < 0) { - printf("Cannot create variable length datatype.\n"); + HDprintf("Cannot create variable length datatype.\n"); TEST_ERROR; } if (H5Tset_size(atype, H5T_VARIABLE) < 0) { - printf("Cannot set variable length datatype.\n"); + HDprintf("Cannot set variable length datatype.\n"); TEST_ERROR; } /* Generate the VL string attribute.*/ if ((aid = H5Acreate2(g, name, atype, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - printf("H5Acreate2 failed.\n"); + HDprintf("H5Acreate2 failed.\n"); TEST_ERROR; } if (H5Awrite(aid, atype, &astr_val) < 0) { - printf("H5Awrite failed.\n"); + HDprintf("H5Awrite failed.\n"); TEST_ERROR; } if (H5Tclose(atype) < 0) { - printf("H5Tclose() failed\n"); + HDprintf("H5Tclose() failed\n"); TEST_ERROR; } if (H5Aclose(aid) < 0) { - printf("H5Aclose() failed\n"); + HDprintf("H5Aclose() failed\n"); TEST_ERROR; } @@ -785,7 +785,7 @@ del_one_attr(state_t *s, hid_t obj_id, bool is_dense, bool is_vl_or_ohrc, unsign /* Delete the attribute */ if (H5Adelete(obj_id, attrname) < 0) { - printf("H5Adelete() failed\n"); + HDprintf("H5Adelete() failed\n"); TEST_ERROR; } @@ -793,7 +793,7 @@ del_one_attr(state_t *s, hid_t obj_id, bool is_dense, bool is_vl_or_ohrc, unsign * we need to check if this test behaves as expected. */ if (s->at_pattern == 'R') { if (false == check_ohr_num_chunk(obj_id, true)) { - printf("The object header chunk should not continue. \n"); + HDprintf("The object header chunk should not continue. \n"); TEST_ERROR; } } @@ -881,12 +881,12 @@ modify_attr(state_t *s, hid_t g, const char *aname_fmt, unsigned int which) HDsprintf(attrname, aname_fmt, which, 0); if ((aid = H5Aopen(g, attrname, H5P_DEFAULT)) < 0) { - printf("H5Aopen failed\n"); + HDprintf("H5Aopen failed\n"); TEST_ERROR; } if ((amtype = H5Tget_native_type(s->filetype, H5T_DIR_ASCEND)) < 0) { - printf("H5Tget_native_type failed\n"); + HDprintf("H5Tget_native_type failed\n"); TEST_ERROR; } @@ -894,15 +894,15 @@ modify_attr(state_t *s, hid_t g, const char *aname_fmt, unsigned int which) modify_value = which + 10000; if (H5Awrite(aid, amtype, &modify_value) < 0) { - printf("H5Awrite failed\n"); + HDprintf("H5Awrite failed\n"); TEST_ERROR; } if (H5Tclose(amtype) < 0) { - printf("H5Tclose failed\n"); + HDprintf("H5Tclose failed\n"); TEST_ERROR; } if (H5Aclose(aid) < 0) { - printf("H5Aclose failed\n"); + HDprintf("H5Aclose failed\n"); TEST_ERROR; } @@ -949,7 +949,7 @@ modify_vlstr_attr(hid_t g, unsigned int which) astr_val = HDmalloc(VS_ATTR_NAME_LEN); if (astr_val == NULL) { - printf("Allocate memory for VL string failed.\n"); + HDprintf("Allocate memory for VL string failed.\n"); TEST_ERROR; } @@ -961,35 +961,35 @@ modify_vlstr_attr(hid_t g, unsigned int which) /* Create a datatype to refer to. */ if ((atype = H5Tcopy(H5T_C_S1)) < 0) { - printf("Cannot create variable length datatype.\n"); + HDprintf("Cannot create variable length datatype.\n"); TEST_ERROR; } if (H5Tset_size(atype, H5T_VARIABLE) < 0) { - printf("Cannot set variable length datatype.\n"); + HDprintf("Cannot set variable length datatype.\n"); TEST_ERROR; } /* Open this attribute. */ if ((aid = H5Aopen(g, name, H5P_DEFAULT)) < 0) { - printf("H5Aopen failed.\n"); + HDprintf("H5Aopen failed.\n"); TEST_ERROR; } dbgf(1, "The modified VL string value is %s \n", astr_val); if (H5Awrite(aid, atype, &astr_val) < 0) { - printf("H5Awrite failed.\n"); + HDprintf("H5Awrite failed.\n"); TEST_ERROR; } if (H5Tclose(atype) < 0) { - printf("H5Tclose() failed\n"); + HDprintf("H5Tclose() failed\n"); TEST_ERROR; } if (H5Aclose(aid) < 0) { - printf("H5Aclose() failed\n"); + HDprintf("H5Aclose() failed\n"); TEST_ERROR; } @@ -1098,7 +1098,7 @@ add_attrs_compact(state_t *s, hid_t g, hid_t gcpl, unsigned int which) * storage and the minimal number of attributes to be stored in * dense storage. */ if (H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense) < 0) { - printf("H5Pget_attr_phase_change() failed\n"); + HDprintf("H5Pget_attr_phase_change() failed\n"); TEST_ERROR; } } @@ -1152,7 +1152,7 @@ add_attrs_compact_dense(state_t *s, hid_t g, hid_t gcpl, unsigned int which) bool ret_value = false; if (H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense) < 0) { - printf("H5Pget_attr_phase_change failed\n"); + HDprintf("H5Pget_attr_phase_change failed\n"); TEST_ERROR; } @@ -1208,21 +1208,30 @@ del_attrs_compact_dense_compact(hid_t obj_id, hid_t gcpl, unsigned int which) char attrname[VS_ATTR_NAME_LEN]; const char *aname_format = "attr-%u-%u"; const char *adname_format = "attr-d-%u-%u"; + int sz; /* Obtain the maximal number of attributes to be stored in compact * storage and the minimal number of attributes to be stored in * dense storage. */ if (H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense) < 0) { - printf("H5Pget_attr_phase_change failed\n"); + HDprintf("H5Pget_attr_phase_change failed\n"); TEST_ERROR; } u = max_compact + 1; - /* delete a number of attributes so that the attribute storage just becomes dense.*/ + /* Delete a number of attributes so that the attribute storage just becomes dense.*/ for (u--; u >= (min_dense - 1); u--) { - HDsprintf(attrname, aname_format, which, max_compact - u); + sz = HDsnprintf(attrname, VS_ATTR_NAME_LEN - 1, aname_format, which, max_compact - u); + if (sz < 0) { + HDprintf("snprintf format error\n"); + TEST_ERROR; + } + if (sz > VS_ATTR_NAME_LEN - 1) { + HDprintf("snprintf truncated string\n"); + TEST_ERROR; + } if (H5Adelete(obj_id, attrname) < 0) { - printf("H5Adelete failed\n"); + HDprintf("H5Adelete failed\n"); TEST_ERROR; } } @@ -1235,9 +1244,17 @@ del_attrs_compact_dense_compact(hid_t obj_id, hid_t gcpl, unsigned int which) * The attribute name to be deleted is attr-max_compact+which-0 */ - HDsprintf(attrname, adname_format, max_compact + which, 0); + sz = HDsnprintf(attrname, VS_ATTR_NAME_LEN - 1, adname_format, max_compact + which, 0); + if (sz < 0) { + HDprintf("snprintf format error\n"); + TEST_ERROR; + } + if (sz > VS_ATTR_NAME_LEN - 1) { + HDprintf("snprintf truncated string\n"); + TEST_ERROR; + } if (H5Adelete(obj_id, attrname) < 0) { - printf("H5Adelete failed\n"); + HDprintf("H5Adelete failed\n"); TEST_ERROR; } @@ -1333,7 +1350,7 @@ add_del_attrs_compact_dense(state_t *s, hid_t g, hid_t gcpl, unsigned int which) unsigned min_dense = 0; if (H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense) < 0) { - printf("H5Pget_attr_phase_change failed\n"); + HDprintf("H5Pget_attr_phase_change failed\n"); TEST_ERROR; } @@ -1579,7 +1596,7 @@ write_group(state_t *s, unsigned int which) double temp_time; if (which >= s->nsteps) { - printf("Number of created groups is out of bounds\n"); + HDprintf("Number of created groups is out of bounds\n"); TEST_ERROR; } @@ -1590,14 +1607,14 @@ write_group(state_t *s, unsigned int which) else { gcpl = H5Pcreate(H5P_GROUP_CREATE); if (gcpl < 0) { - printf("H5Pcreate failed\n"); + HDprintf("H5Pcreate failed\n"); TEST_ERROR; } /* If we test the dense storage, change the attribute phase. */ if (s->at_pattern == 'd') { if (H5Pset_attr_phase_change(gcpl, 0, 0) < 0) { - printf("H5Pset_attr_phase_change failed for the dense storage.\n"); + HDprintf("H5Pset_attr_phase_change failed for the dense storage.\n"); TEST_ERROR; } } @@ -1607,14 +1624,14 @@ write_group(state_t *s, unsigned int which) if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } } if ((g = H5Gcreate2(s->file, name, H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) { - printf("H5Gcreate2 failed\n"); + HDprintf("H5Gcreate2 failed\n"); TEST_ERROR; } @@ -1622,7 +1639,7 @@ write_group(state_t *s, unsigned int which) if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } @@ -1639,27 +1656,27 @@ write_group(state_t *s, unsigned int which) if (s->at_pattern == 'a' || s->at_pattern == 'R') { if ((dummy_d = H5Dcreate2(g, "Dataset", H5T_NATIVE_INT, s->one_by_one_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - printf("H5Dcreate2 failed\n"); + HDprintf("H5Dcreate2 failed\n"); TEST_ERROR; } } /* We only need to check the first group */ if (which == 0) { if (H5Gget_info(g, &group_info) < 0) { - printf("H5Gget_info failed\n"); + HDprintf("H5Gget_info failed\n"); TEST_ERROR; } if (s->old_style_grp) { if (group_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) { - printf("Old-styled group test: but the group is not in old-style. \n"); + HDprintf("Old-styled group test: but the group is not in old-style. \n"); TEST_ERROR; } dbgf(2, "Writer: group is created with the old-style.\n"); } else { if (group_info.storage_type == H5G_STORAGE_TYPE_SYMBOL_TABLE) { - printf("The created group should NOT be in old-style . \n"); + HDprintf("The created group should NOT be in old-style . \n"); TEST_ERROR; } dbgf(2, "Writer: group is created with the new-style.\n"); @@ -1670,8 +1687,8 @@ write_group(state_t *s, unsigned int which) * we need to check if this test behaves as expected. */ if (s->at_pattern == 'a' || s->at_pattern == 'R') { if (false == check_ohr_num_chunk(g, true)) { - printf("An object header continuation block should NOT be created. \n"); - printf("But it is created.\n"); + HDprintf("An object header continuation block should NOT be created. \n"); + HDprintf("But it is created.\n"); TEST_ERROR; } } @@ -1682,18 +1699,18 @@ write_group(state_t *s, unsigned int which) if (s->at_pattern == 'a' || s->at_pattern == 'R') { if (H5Dclose(dummy_d) < 0) { - printf("H5Dclose failed\n"); + HDprintf("H5Dclose failed\n"); TEST_ERROR; } } if (H5Gclose(g) < 0) { - printf("H5Gclose failed\n"); + HDprintf("H5Gclose failed\n"); TEST_ERROR; } if (!s->old_style_grp && H5Pclose(gcpl) < 0) { - printf("H5Pclose failed\n"); + HDprintf("H5Pclose failed\n"); TEST_ERROR; } @@ -1748,49 +1765,49 @@ create_group_id(state_t *s, unsigned int which, bool dense_to_compact) H5G_info_t group_info; if (which >= s->nsteps) { - printf("Number of created groups is out of bounds\n"); + HDprintf("Number of created groups is out of bounds\n"); TEST_ERROR; } gcpl = H5Pcreate(H5P_GROUP_CREATE); if (gcpl < 0) { - printf("H5Pcreate failed\n"); + HDprintf("H5Pcreate failed\n"); TEST_ERROR; } if (dense_to_compact) { if (H5Pset_link_phase_change(gcpl, 2, 2) < 0) { - printf("H5Pset_link_phase_change failed for dense to compact.\n"); + HDprintf("H5Pset_link_phase_change failed for dense to compact.\n"); TEST_ERROR; } } else { if (H5Pset_link_phase_change(gcpl, 1, 1) < 0) { - printf("H5Pset_attr_phase_change failed for compact to dense.\n"); + HDprintf("H5Pset_attr_phase_change failed for compact to dense.\n"); TEST_ERROR; } } esnprintf(name, sizeof(name), "/group-%u", which); if ((g = H5Gcreate2(s->file, name, H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) { - printf("H5Gcreate2 failed\n"); + HDprintf("H5Gcreate2 failed\n"); TEST_ERROR; } if (H5Gget_info(g, &group_info) < 0) { - printf("H5Gget_info failed\n"); + HDprintf("H5Gget_info failed\n"); TEST_ERROR; } /* The storage type should always be compact when a group is created. */ if (group_info.storage_type != H5G_STORAGE_TYPE_COMPACT) { - printf("New-style group link storage test:. \n"); - printf(" still be compact after group creation. \n"); + HDprintf("New-style group link storage test:. \n"); + HDprintf(" still be compact after group creation. \n"); TEST_ERROR; } if (H5Pclose(gcpl) < 0) { - printf("H5Pclose failed\n"); + HDprintf("H5Pclose failed\n"); TEST_ERROR; } @@ -1827,7 +1844,7 @@ close_group_id(hid_t g) { if (H5Gclose(g) < 0) { - printf("H5Gclose failed\n"); + HDprintf("H5Gclose failed\n"); TEST_ERROR; } @@ -1866,38 +1883,38 @@ create_group(state_t *s, unsigned int which) H5G_info_t group_info; if (which >= s->nsteps) { - printf("Number of created groups is out of bounds\n"); + HDprintf("Number of created groups is out of bounds\n"); TEST_ERROR; } esnprintf(name, sizeof(name), "/group-%u", which); if ((g = H5Gcreate2(s->file, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - printf("H5Gcreate2 failed\n"); + HDprintf("H5Gcreate2 failed\n"); TEST_ERROR; } if (H5Gget_info(g, &group_info) < 0) { - printf("H5Gget_info failed\n"); + HDprintf("H5Gget_info failed\n"); TEST_ERROR; } if (s->old_style_grp) { if (group_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) { - printf("Old-styled group test: but the group is not in old-style. \n"); + HDprintf("Old-styled group test: but the group is not in old-style. \n"); TEST_ERROR; } dbgf(2, "Writer: group is created with the old-style.\n"); } else { if (group_info.storage_type == H5G_STORAGE_TYPE_SYMBOL_TABLE) { - printf("The created group should NOT be in old-style . \n"); + HDprintf("The created group should NOT be in old-style . \n"); TEST_ERROR; } dbgf(2, "Writer: group is created with the new-style.\n"); } if (H5Gclose(g) < 0) { - printf("H5Gclose failed\n"); + HDprintf("H5Gclose failed\n"); TEST_ERROR; } @@ -1953,38 +1970,38 @@ delete_one_link(state_t *s, hid_t obj_id, const char *name, short link_storage, H5G_info_t group_info; if (which >= s->nsteps) { - printf("Number of created groups is out of bounds\n"); + HDprintf("Number of created groups is out of bounds\n"); TEST_ERROR; } if (H5Ldelete(obj_id, name, H5P_DEFAULT) < 0) { - printf("H5Ldelete failed\n"); + HDprintf("H5Ldelete failed\n"); TEST_ERROR; } if (link_storage > 0) { if (s->old_style_grp) { - printf("Old style group doesn't support the indexed storage.\n"); + HDprintf("Old style group doesn't support the indexed storage.\n"); TEST_ERROR; } if (H5Gget_info(obj_id, &group_info) < 0) { - printf("H5Gget_info failed\n"); + HDprintf("H5Gget_info failed\n"); TEST_ERROR; } if (link_storage == 1) { if (group_info.storage_type != H5G_STORAGE_TYPE_COMPACT) { - printf("The group link storage should be compact. \n"); + HDprintf("The group link storage should be compact. \n"); TEST_ERROR; } } else { if (group_info.storage_type != H5G_STORAGE_TYPE_DENSE) { - printf("The group link storage should be dense. \n"); + HDprintf("The group link storage should be dense. \n"); TEST_ERROR; } } @@ -2066,12 +2083,12 @@ move_one_group(state_t *s, hid_t obj_id, const char *name, const char *newname, { if (which >= s->nsteps) { - printf("Number of created groups is out of bounds\n"); + HDprintf("Number of created groups is out of bounds\n"); TEST_ERROR; } if (H5Lmove(obj_id, name, obj_id, newname, H5P_DEFAULT, H5P_DEFAULT) < 0) { - printf("H5Ldelete failed\n"); + HDprintf("H5Ldelete failed\n"); TEST_ERROR; } @@ -2163,7 +2180,7 @@ insert_one_link(state_t *s, hid_t obj_id, const char *name, const char *newname, H5G_info_t group_info; if (which >= s->nsteps) { - printf("Number of created groups is out of bounds\n"); + HDprintf("Number of created groups is out of bounds\n"); TEST_ERROR; } @@ -2173,13 +2190,13 @@ insert_one_link(state_t *s, hid_t obj_id, const char *name, const char *newname, if (is_hard) { if (link_storage > 0) { if (H5Lcreate_hard(s->file, name, obj_id, newname, H5P_DEFAULT, H5P_DEFAULT) < 0) { - printf("H5Lcreate_hard failed\n"); + HDprintf("H5Lcreate_hard failed\n"); TEST_ERROR; } } else { if (H5Lcreate_hard(obj_id, name, obj_id, newname, H5P_DEFAULT, H5P_DEFAULT) < 0) { - printf("H5Lcreate_hard failed\n"); + HDprintf("H5Lcreate_hard failed\n"); TEST_ERROR; } } @@ -2187,13 +2204,13 @@ insert_one_link(state_t *s, hid_t obj_id, const char *name, const char *newname, else { if (link_storage > 0) { if (H5Lcreate_soft("/", obj_id, newname, H5P_DEFAULT, H5P_DEFAULT) < 0) { - printf("H5Lcreate_soft failed\n"); + HDprintf("H5Lcreate_soft failed\n"); TEST_ERROR; } } else { if (H5Lcreate_soft(name, obj_id, newname, H5P_DEFAULT, H5P_DEFAULT) < 0) { - printf("H5Lcreate_soft failed.\n"); + HDprintf("H5Lcreate_soft failed.\n"); TEST_ERROR; } } @@ -2202,24 +2219,24 @@ insert_one_link(state_t *s, hid_t obj_id, const char *name, const char *newname, if (link_storage > 0) { if (s->old_style_grp) { - printf("Old style group doesn't support dense or compact storage.\n"); + HDprintf("Old style group doesn't support dense or compact storage.\n"); TEST_ERROR; } if (H5Gget_info(obj_id, &group_info) < 0) { - printf("H5Gget_info failed\n"); + HDprintf("H5Gget_info failed\n"); TEST_ERROR; } if (link_storage == 1) { if (group_info.storage_type != H5G_STORAGE_TYPE_COMPACT) { - printf("The group link storage should be compact. \n"); + HDprintf("The group link storage should be compact. \n"); TEST_ERROR; } } else { if (group_info.storage_type != H5G_STORAGE_TYPE_DENSE) { - printf("The group link storage should be dense. \n"); + HDprintf("The group link storage should be dense. \n"); TEST_ERROR; } } @@ -2343,7 +2360,7 @@ transit_storage_compact_to_dense(state_t *s, unsigned int which) hid_t g = create_group_id(s, which, false); if (g < 0) { - printf("create_group_id failed\n"); + HDprintf("create_group_id failed\n"); TEST_ERROR; } @@ -2351,19 +2368,19 @@ transit_storage_compact_to_dense(state_t *s, unsigned int which) esnprintf(name, sizeof(name), "/group-%u", which); esnprintf(hd_name, sizeof(hd_name), "hd-group-%u", which); if (insert_one_link(s, g, name, hd_name, true, 1, which) == false) { - printf("insert_one_link for compact storage failed\n"); + HDprintf("insert_one_link for compact storage failed\n"); TEST_ERROR; } /* Then insert a soft link, the storage becomes dense. */ esnprintf(st_name, sizeof(st_name), "st-group-%u", which); if (insert_one_link(s, g, name, st_name, false, 2, which) == false) { - printf("insert_one_link for dense storage failed\n"); + HDprintf("insert_one_link for dense storage failed\n"); TEST_ERROR; } if (close_group_id(g) == false) { - printf("insert_one_link for dense storage failed\n"); + HDprintf("insert_one_link for dense storage failed\n"); TEST_ERROR; } @@ -2410,7 +2427,7 @@ transit_storage_dense_to_compact(state_t *s, unsigned int which) hid_t g = create_group_id(s, which, true); if (g < 0) { - printf("create_group_id failed\n"); + HDprintf("create_group_id failed\n"); TEST_ERROR; } @@ -2418,38 +2435,38 @@ transit_storage_dense_to_compact(state_t *s, unsigned int which) esnprintf(name, sizeof(name), "/group-%u", which); esnprintf(hd_name, sizeof(hd_name), "hd-group-%u", which); if (insert_one_link(s, g, name, hd_name, true, 1, which) == false) { - printf("insert_one_link for compact storage failed\n"); + HDprintf("insert_one_link for compact storage failed\n"); TEST_ERROR; } /* Insert a link, storage is still compact. */ esnprintf(st_name, sizeof(st_name), "st-group-%u", which); if (insert_one_link(s, g, name, st_name, false, 1, which) == false) { - printf("insert_one_link for compact storage failed\n"); + HDprintf("insert_one_link for compact storage failed\n"); TEST_ERROR; } /* Insert a link, storage becomes dense. */ esnprintf(st2_name, sizeof(st2_name), "st2-group-%u", which); if (insert_one_link(s, g, name, st2_name, false, 2, which) == false) { - printf("insert_one_link for dense storage failed\n"); + HDprintf("insert_one_link for dense storage failed\n"); TEST_ERROR; } /* Delete a link, storage is still dense */ if (delete_one_link(s, g, st_name, 2, which) == false) { - printf("delete_one_link for dense storage failed\n"); + HDprintf("delete_one_link for dense storage failed\n"); TEST_ERROR; } /* Delete another link, storage becomes compact */ if (delete_one_link(s, g, st2_name, 1, which) == false) { - printf("delete_one_link for compact storage failed\n"); + HDprintf("delete_one_link for compact storage failed\n"); TEST_ERROR; } if (close_group_id(g) == false) { - printf("insert_one_link for dense storage failed\n"); + HDprintf("insert_one_link for dense storage failed\n"); TEST_ERROR; } @@ -2594,7 +2611,8 @@ static unsigned int obtain_tree_level_elems(unsigned int total_ele, unsigned int level) { - assert(level <= total_ele); + HDassert(level <= total_ele); + /* if every element is under the root, just return the total number of elements. */ if (level == 0) return total_ele; @@ -2654,7 +2672,7 @@ gen_tree_struct(state_t *s, unsigned int level, unsigned ne_per_level, hid_t pgr /* For each i a group is created. Use grp_counter to generate the group name. - printf("id: %u,level: %u, index: %u\n",id,level,i); + HDprintf("id: %u,level: %u, index: %u\n",id,level,i); */ esnprintf(name, sizeof(name), "group-%u", grp_counter); if (grp_counter == s->nsteps) @@ -2664,13 +2682,13 @@ gen_tree_struct(state_t *s, unsigned int level, unsigned ne_per_level, hid_t pgr if (s->gperf) { if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } } if ((grp_id = H5Gcreate2(pgrp_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - printf("H5Gcreate2 failed\n"); + HDprintf("H5Gcreate2 failed\n"); TEST_ERROR; } @@ -2678,7 +2696,7 @@ gen_tree_struct(state_t *s, unsigned int level, unsigned ne_per_level, hid_t pgr if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } @@ -2694,20 +2712,20 @@ gen_tree_struct(state_t *s, unsigned int level, unsigned ne_per_level, hid_t pgr /* Just check the first group information. */ if (grp_counter == 0) { if (H5Gget_info(grp_id, &group_info) < 0) { - printf("H5Gget_info failed\n"); + HDprintf("H5Gget_info failed\n"); TEST_ERROR; } if (s->old_style_grp) { if (group_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) { - printf("Old-styled group test: but the group is not in old-style. \n"); + HDprintf("Old-styled group test: but the group is not in old-style. \n"); TEST_ERROR; } dbgf(2, "Writer: group is created with the old-style.\n"); } else { if (group_info.storage_type == H5G_STORAGE_TYPE_SYMBOL_TABLE) { - printf("The created group should NOT be in old-style . \n"); + HDprintf("The created group should NOT be in old-style . \n"); TEST_ERROR; } dbgf(2, "Writer: group is created with the new-style.\n"); @@ -2719,7 +2737,7 @@ gen_tree_struct(state_t *s, unsigned int level, unsigned ne_per_level, hid_t pgr result = add_default_group_attr(s, grp_id, grp_counter); if (result == false) { - printf("Cannot create group attributes. \n"); + HDprintf("Cannot create group attributes. \n"); TEST_ERROR; } grp_counter++; @@ -2727,13 +2745,13 @@ gen_tree_struct(state_t *s, unsigned int level, unsigned ne_per_level, hid_t pgr /* Generate groups in the next level */ result = gen_tree_struct(s, level - 1, ne_per_level, grp_id); if (result == false) { - printf("Cannot create nested groups. \n"); + HDprintf("Cannot create nested groups. \n"); TEST_ERROR; } /* close the group ID. No problem. */ if (H5Gclose(grp_id) < 0) { - printf("H5Gclose failed. \n"); + HDprintf("H5Gclose failed. \n"); TEST_ERROR; } } @@ -2766,7 +2784,7 @@ main(int argc, char **argv) unsigned int num_elems_per_level = 0; if (!state_init(&s, argc, argv)) { - printf("state_init failed\n"); + HDprintf("state_init failed\n"); TEST_ERROR; } @@ -2777,12 +2795,12 @@ main(int argc, char **argv) else if (personality != NULL && HDstrcmp(personality, "vfd_swmr_gperf_reader") == 0) writer = false; else { - printf("unknown personality, expected vfd_swmr_gperf_{reader,writer}\n"); + HDprintf("unknown personality, expected vfd_swmr_gperf_{reader,writer}\n"); TEST_ERROR; } if (writer == false) { - printf("Reader is skipped for the performance tests.\n"); + HDprintf("Reader is skipped for the performance tests.\n"); return EXIT_SUCCESS; } @@ -2801,7 +2819,7 @@ main(int argc, char **argv) * should be used as the second parameter of H5Pset_libver_bound(). * Also pass the use_vfd_swmr, only_meta_page, page buffer size, config to vfd_swmr_create_fapl().*/ if ((fapl = vfd_swmr_create_fapl(!s.old_style_grp, s.use_vfd_swmr, true, s.pbs, &config)) < 0) { - printf("vfd_swmr_create_fapl failed\n"); + HDprintf("vfd_swmr_create_fapl failed\n"); TEST_ERROR; } @@ -2813,8 +2831,8 @@ main(int argc, char **argv) if (s.nglevels > 0) { if (s.grp_op_pattern != ' ' || s.at_pattern != ' ') { - printf("For nested group creation test, only the default option is supported.\n"); - printf("Please re-run the tests with the appropriate option.\n"); + HDprintf("For nested group creation test, only the default option is supported.\n"); + HDprintf("Please re-run the tests with the appropriate option.\n"); TEST_ERROR; } } @@ -2822,7 +2840,7 @@ main(int argc, char **argv) if (s.gperf) { if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } } @@ -2832,7 +2850,7 @@ main(int argc, char **argv) if (s.gperf) { if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } @@ -2840,7 +2858,7 @@ main(int argc, char **argv) } if (s.file < 0) { - printf("H5Fcreate failed\n"); + HDprintf("H5Fcreate failed\n"); TEST_ERROR; } @@ -2852,7 +2870,7 @@ main(int argc, char **argv) if (s.gperf) { if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } } @@ -2863,7 +2881,7 @@ main(int argc, char **argv) /* for the recursive call, the groups under the root is treated as one level */ wg_ret = gen_tree_struct(&s, s.nglevels + 1, num_elems_per_level, s.file); if (wg_ret == false) { - printf("write nested group failed at group counter %u\n", grp_counter); + HDprintf("write nested group failed at group counter %u\n", grp_counter); TEST_ERROR; } } @@ -2873,7 +2891,7 @@ main(int argc, char **argv) dbgf(2, "writer: step %d\n", step); wg_ret = group_operations(&s, step); if (wg_ret == false) { - printf("write_group failed at step %d\n", step); + HDprintf("write_group failed at step %d\n", step); TEST_ERROR; } } @@ -2883,7 +2901,7 @@ main(int argc, char **argv) if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } @@ -2893,17 +2911,17 @@ main(int argc, char **argv) } if (H5Pclose(fapl) < 0) { - printf("H5Pclose failed\n"); + HDprintf("H5Pclose failed\n"); TEST_ERROR; } if (H5Pclose(fcpl) < 0) { - printf("H5Pclose failed\n"); + HDprintf("H5Pclose failed\n"); TEST_ERROR; } if (H5Sclose(s.one_by_one_sid) < 0) { - printf("H5Sclose failed\n"); + HDprintf("H5Sclose failed\n"); TEST_ERROR; } @@ -2911,14 +2929,14 @@ main(int argc, char **argv) if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } } if (H5Fclose(s.file) < 0) { - printf("H5Fclose failed\n"); + HDprintf("H5Fclose failed\n"); TEST_ERROR; } @@ -2926,7 +2944,7 @@ main(int argc, char **argv) if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) { - fprintf(stderr, "HDclock_gettime failed"); + HDfprintf(stderr, "HDclock_gettime failed"); TEST_ERROR; } @@ -2939,48 +2957,49 @@ main(int argc, char **argv) if (verbosity != 0) { - fprintf(stdout, "\nPerformance Test Configuration: "); + HDfprintf(stdout, "\nPerformance Test Configuration: "); if (s.use_vfd_swmr) - fprintf(stdout, " Using VFD SWMR \n"); + HDfprintf(stdout, " Using VFD SWMR \n"); else - fprintf(stdout, " Not using VFD SWMR \n"); + HDfprintf(stdout, " Not using VFD SWMR \n"); if (s.old_style_grp) - fprintf(stdout, " Groups: Created via the earliest file format(old-style) \n"); + HDfprintf(stdout, " Groups: Created via the earliest file format(old-style) \n"); else - fprintf(stdout, " Groups: Created via the latest file format(new-style) \n"); - - fprintf(stdout, "\n"); - - fprintf(stdout, "The length of a tick = %u\n", s.tick_len); - fprintf(stdout, "The maximum expected lag(in ticks)= %u\n", s.max_lag); - fprintf(stdout, "The page size(in bytes) = %u\n", s.ps); - fprintf(stdout, "The page buffer size(in bytes) = %u\n", s.pbs); - fprintf(stdout, "\n"); - fprintf(stdout, "Number of groups = %u\n", s.nsteps); - fprintf(stdout, "Group Nested levels = %u\n", s.nglevels); - fprintf(stdout, "Number of attributes = %u\n", s.num_attrs); - fprintf(stdout, "Number of element per attribute = 1\n"); + HDfprintf(stdout, " Groups: Created via the latest file format(new-style) \n"); + + HDfprintf(stdout, "\n"); + + HDfprintf(stdout, "The length of a tick = %u\n", s.tick_len); + HDfprintf(stdout, "The maximum expected lag(in ticks)= %u\n", s.max_lag); + HDfprintf(stdout, "The page size(in bytes) = %u\n", s.ps); + HDfprintf(stdout, "The page buffer size(in bytes) = %u\n", s.pbs); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, "Number of groups = %u\n", s.nsteps); + HDfprintf(stdout, "Group Nested levels = %u\n", s.nglevels); + HDfprintf(stdout, "Number of attributes = %u\n", s.num_attrs); + HDfprintf(stdout, "Number of element per attribute = 1\n"); if (s.vlstr_test) - fprintf(stdout, "Attribute datatype is variable length string. \n"); + HDfprintf(stdout, "Attribute datatype is variable length string. \n"); else if (s.filetype == H5T_STD_U32BE) - fprintf(stdout, "Attribute datatype is big-endian unsigned 32-bit integer.\n"); + HDfprintf(stdout, "Attribute datatype is big-endian unsigned 32-bit integer.\n"); else - fprintf(stdout, "Attribute datatype is native unsigned 32-bit integer.\n"); + HDfprintf(stdout, "Attribute datatype is native unsigned 32-bit integer.\n"); - fprintf(stdout, "\n"); - fprintf(stdout, - "(If the nested level is 0, all the groups are created directly under the root.)\n\n"); - fprintf(stdout, "group creation maximum time =%lf\n", s.max_gc_time); - fprintf(stdout, "group creation minimum time =%lf\n", s.min_gc_time); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, + "(If the nested level is 0, all the groups are created directly under the root.)\n\n"); + HDfprintf(stdout, "group creation maximum time =%lf\n", s.max_gc_time); + HDfprintf(stdout, "group creation minimum time =%lf\n", s.min_gc_time); } - fprintf(stdout, "group creation total time = %lf\n", s.total_gc_time); - fprintf(stdout, "group creation mean time(per group) = %lf\n", s.mean_gc_time); - fprintf(stdout, "group creation and attributes generation total time = %lf\n", s.total_time); - fprintf(stdout, "group creation and attributes generation mean time(per group) = %lf\n", s.mean_time); - fprintf(stdout, "H5Fcreate time = %lf\n", s.fo_total_time); - fprintf(stdout, "H5Fclose time = %lf\n", s.fc_total_time); + HDfprintf(stdout, "group creation total time = %lf\n", s.total_gc_time); + HDfprintf(stdout, "group creation mean time(per group) = %lf\n", s.mean_gc_time); + HDfprintf(stdout, "group creation and attributes generation total time = %lf\n", s.total_time); + HDfprintf(stdout, "group creation and attributes generation mean time(per group) = %lf\n", + s.mean_time); + HDfprintf(stdout, "H5Fcreate time = %lf\n", s.fo_total_time); + HDfprintf(stdout, "H5Fclose time = %lf\n", s.fc_total_time); } return EXIT_SUCCESS; diff --git a/test/vfd_swmr_indep_rw_writer.c b/test/vfd_swmr_indep_rw_writer.c index c3572b6..9d004bc 100644 --- a/test/vfd_swmr_indep_rw_writer.c +++ b/test/vfd_swmr_indep_rw_writer.c @@ -220,26 +220,26 @@ verify_matrix(mat_t *mat, unsigned int which) static void usage(const char *progname) { - fprintf(stderr, - "usage: %s [-S] [-c cols] [-r rows] [-t tick_len] [-m max_lag] \n" - " [-B page_buffer_size] [-s page_size] [-u reader wait interval] [-q silent output] \n" - "\n" - "-S: do not use VFD SWMR\n" - "-c cols: `cols` columns for the dataset\n" - " The default value is 512.\n" - "-r rows: `rows` rows for the dataset\n" - " The default value is 256.\n" - "-t tick_len: length of a tick in tenths of a second.\n" - "-m max_lag: maximum expected lag(in ticks) between writer and readers\n" - "-B pbs: page buffer size in bytes:\n" - " The default value is 4K(4096).\n" - "-s ps: page size used by page aggregation, page buffer and \n" - " the metadata file. The default value is 4K(4096).\n" - "-u 0.1s: interval in tenth of seconds to check if a dataset is ready for the reader.\n" - "-q: silence printouts, few messages\n" - "\n", - progname); - exit(EXIT_FAILURE); + HDfprintf(stderr, + "usage: %s [-S] [-c cols] [-r rows] [-t tick_len] [-m max_lag] \n" + " [-B page_buffer_size] [-s page_size] [-u reader wait interval] [-q silent output] \n" + "\n" + "-S: do not use VFD SWMR\n" + "-c cols: `cols` columns for the dataset\n" + " The default value is 512.\n" + "-r rows: `rows` rows for the dataset\n" + " The default value is 256.\n" + "-t tick_len: length of a tick in tenths of a second.\n" + "-m max_lag: maximum expected lag(in ticks) between writer and readers\n" + "-B pbs: page buffer size in bytes:\n" + " The default value is 4K(4096).\n" + "-s ps: page size used by page aggregation, page buffer and \n" + " the metadata file. The default value is 4K(4096).\n" + "-u 0.1s: interval in tenth of seconds to check if a dataset is ready for the reader.\n" + "-q: silence printouts, few messages\n" + "\n", + progname); + HDexit(EXIT_FAILURE); } /* Initialize the state_t with different options specified by the user. */ @@ -368,7 +368,7 @@ indep_init_vfd_swmr_config_plist(state_t *s, bool writer, const char *mdf_path) /* Pass the use_vfd_swmr, only_meta_page, page buffer size, config to vfd_swmr_create_fapl().*/ if ((s->fapl = vfd_swmr_create_fapl(true, s->use_vfd_swmr, true, s->pbs, &config)) < 0) { - printf("vfd_swmr_create_fapl failed\n"); + HDprintf("vfd_swmr_create_fapl failed\n"); TEST_ERROR; } @@ -598,12 +598,12 @@ close_pl(const state_t *s) { if (H5Pclose(s->fapl) < 0) { - printf("H5Pclose failed\n"); + HDprintf("H5Pclose failed\n"); TEST_ERROR; } if (H5Pclose(s->fcpl) < 0) { - printf("H5Pclose failed\n"); + HDprintf("H5Pclose failed\n"); TEST_ERROR; } diff --git a/testpar/t_file.c b/testpar/t_file.c index 9970538..235b832 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -116,13 +116,12 @@ test_split_comm_access(void) VRFY((mrc == MPI_SUCCESS), "final MPI_Barrier succeeded"); } -#if 0 void test_page_buffer_access(void) { hid_t file_id = -1; /* File ID */ hid_t fcpl, fapl; - size_t page_count = 0; + int64_t page_count = 0; int i, num_elements = 200; haddr_t raw_addr, meta_addr; int * data; @@ -222,7 +221,7 @@ test_page_buffer_access(void) ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * (size_t)num_elements, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* update the first 50 elements */ for (i = 0; i < 50; i++) @@ -233,7 +232,7 @@ test_page_buffer_access(void) ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); page_count += 2; - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* update the second 50 elements */ for (i = 0; i < 50; i++) @@ -242,7 +241,7 @@ test_page_buffer_access(void) VRFY((ret == 0), ""); ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 50), sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* update 100 - 200 */ for (i = 0; i < 100; i++) @@ -251,7 +250,7 @@ test_page_buffer_access(void) VRFY((ret == 0), ""); ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 100), sizeof(int) * 100, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); ret = H5PB_flush(f->shared); VRFY((ret == 0), ""); @@ -259,24 +258,24 @@ test_page_buffer_access(void) /* read elements 0 - 200 */ ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 200, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 200; i++) VRFY((data[i] == i), "Read different values than written"); ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 200, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 200; i++) VRFY((data[i] == i), "Read different values than written"); /* read elements 0 - 50 */ ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 50; i++) VRFY((data[i] == i), "Read different values than written"); ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 50; i++) VRFY((data[i] == i), "Read different values than written"); @@ -330,7 +329,7 @@ test_page_buffer_access(void) ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * (size_t)num_elements, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* update the first 50 elements */ for (i = 0; i < 50; i++) @@ -339,7 +338,7 @@ test_page_buffer_access(void) VRFY((ret == 0), ""); ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* update the second 50 elements */ for (i = 0; i < 50; i++) @@ -348,7 +347,7 @@ test_page_buffer_access(void) VRFY((ret == 0), ""); ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 50), sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* update 100 - 200 */ for (i = 0; i < 100; i++) @@ -357,7 +356,7 @@ test_page_buffer_access(void) VRFY((ret == 0), ""); ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 100), sizeof(int) * 100, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); ret = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VRFY((ret == 0), ""); @@ -365,25 +364,25 @@ test_page_buffer_access(void) /* read elements 0 - 200 */ ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 200, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 200; i++) VRFY((data[i] == i), "Read different values than written"); ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 200, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 200; i++) VRFY((data[i] == i), "Read different values than written"); /* read elements 0 - 50 */ ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 50; i++) VRFY((data[i] == i), "Read different values than written"); ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); page_count += 1; - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 50; i++) VRFY((data[i] == i), "Read different values than written"); @@ -393,20 +392,20 @@ test_page_buffer_access(void) data[i] = -1; ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); /* read elements 0 - 50 */ ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 50; i++) VRFY((data[i] == -1), "Read different values than written"); ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); - VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); + VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB"); for (i = 0; i < 50; i++) VRFY((data[i] == -1), "Read different values than written"); @@ -431,7 +430,6 @@ test_page_buffer_access(void) data = NULL; MPI_Barrier(MPI_COMM_WORLD); } -#endif static int create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_strategy) diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index e6c36bf..16f45d3 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -241,7 +241,7 @@ void collective_group_write(void); void independent_group_read(void); void test_fapl_mpio_dup(void); void test_split_comm_access(void); -// void test_page_buffer_access(void); +void test_page_buffer_access(void); void dataset_atomicity(void); void dataset_writeInd(void); void dataset_writeAll(void); diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 2275c72..debd54a 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -648,14 +648,16 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char *------------------------------------------------------------------------- */ /* open file 1 */ - if (opts->custom_vol[0]) { - if ((fapl1_id = h5tools_get_fapl(H5P_DEFAULT, &(opts->vol_info[0]), NULL)) < 0) { + if (opts->custom_vol[0] || opts->custom_vfd[0]) { + if ((fapl1_id = h5tools_get_fapl(H5P_DEFAULT, opts->custom_vol[0] ? &(opts->vol_info[0]) : NULL, + opts->custom_vfd[0] ? &(opts->vfd_info[0]) : NULL)) < 0) { parallel_print("h5diff: unable to create fapl for input file\n"); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "unable to create input fapl\n"); } } - if ((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, fapl1_id, FALSE, NULL, (size_t)0)) < 0) { + if ((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, fapl1_id, (fapl1_id != H5P_DEFAULT), NULL, + (size_t)0)) < 0) { parallel_print("h5diff: <%s>: unable to open file\n", fname1); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "<%s>: unable to open file\n", fname1); } @@ -663,14 +665,16 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* open file 2 */ - if (opts->custom_vol[1]) { - if ((fapl2_id = h5tools_get_fapl(H5P_DEFAULT, &(opts->vol_info[1]), NULL)) < 0) { + if (opts->custom_vol[1] || opts->custom_vfd[1]) { + if ((fapl2_id = h5tools_get_fapl(H5P_DEFAULT, opts->custom_vol[1] ? &(opts->vol_info[1]) : NULL, + opts->custom_vfd[1] ? &(opts->vfd_info[1]) : NULL)) < 0) { parallel_print("h5diff: unable to create fapl for output file\n"); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "unable to create output fapl\n"); } } - if ((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, fapl2_id, FALSE, NULL, (size_t)0)) < 0) { + if ((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, fapl2_id, (fapl2_id != H5P_DEFAULT), NULL, + (size_t)0)) < 0) { parallel_print("h5diff: <%s>: unable to open file\n", fname2); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "<%s>: unable to open file\n", fname2); } diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 87eff98..4afb3f6 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -89,7 +89,9 @@ typedef struct { char * obj_name[2]; /* name for object */ struct subset_t * sset[2]; /* subsetting parameters */ h5tools_vol_info_t vol_info[2]; /* VOL information for input file, output file */ + h5tools_vfd_info_t vfd_info[2]; /* VFD information for input file, output file */ hbool_t custom_vol[2]; /* Using a custom input, output VOL? */ + hbool_t custom_vfd[2]; /* Using a custom input, output VFD? */ } diff_opt_t; /*------------------------------------------------------------------------- diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 45fc78c..a88b164 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -460,27 +460,29 @@ h5tools_set_error_file(const char *fname, int is_bin) return retvalue; } +/*------------------------------------------------------------------------- + * Function: h5tools_set_up_vfd_swmr + * + * Purpose: Set up VFD SWMR on the fapl + * + * Return: positive - succeeded + * negative - failed + *------------------------------------------------------------------------- + */ static hid_t -swmr_fapl_augment(hid_t fapl, const char *fname) +h5tools_set_up_vfd_swmr(hid_t fapl, const char *fname) { - H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ - char * dname = NULL; + H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ + char * dname = NULL; + hid_t ret_value = H5I_INVALID_HID; - /* - * Set up to open the file with VFD SWMR configured. - */ /* Enable page buffering */ - if (H5Pset_page_buffer_size(fapl, 4096, 100, 0) < 0) { - HDfprintf(rawerrorstream, "H5Pset_page_buffer_size failed\n"); - return H5I_INVALID_HID; - } + if (H5Pset_page_buffer_size(fapl, 4096, 100, 0) < 0) + H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "H5Pset_page_buffer_size failed"); /* Allocate memory for the configuration structure */ - config = (H5F_vfd_swmr_config_t *)HDcalloc(1, sizeof(*config)); - if (config == NULL) { - HDfprintf(rawerrorstream, "VFD SWMR config allocation failed\n"); - return H5I_INVALID_HID; - } + if (NULL == (config = HDcalloc(1, sizeof(*config)))) + H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "VFD SWMR config allocation failed"); config->version = H5F__CURR_VFD_SWMR_CONFIG_VERSION; config->tick_len = 4; @@ -488,26 +490,25 @@ swmr_fapl_augment(hid_t fapl, const char *fname) config->writer = FALSE; config->md_pages_reserved = 128; - if (H5_dirname(fname, &dname) < 0) { - HDfprintf(rawerrorstream, "H5_dirname() failed\n"); - return H5I_INVALID_HID; - } + if (H5_dirname(fname, &dname) < 0) + H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "H5_dirname() failed"); + HDsnprintf(config->md_file_path, sizeof(config->md_file_path), "%s/my_md_file", dname); - HDfree(dname); /* Enable VFD SWMR configuration */ - if (H5Pset_vfd_swmr_config(fapl, config) < 0) { - HDfprintf(rawerrorstream, "H5Pset_vrd_swmr_config failed\n"); - return H5I_INVALID_HID; - } - return fapl; + if (H5Pset_vfd_swmr_config(fapl, config) < 0) + H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "H5Pset_vrd_swmr_config failed"); + +done: + HDfree(dname); + return ret_value; } /*------------------------------------------------------------------------- * Function: h5tools_set_fapl_vfd * - * Purpose: Given a VFL driver name, sets the appropriate driver on the - * specified FAPL. + * Purpose: Given a VFL driver name or ID, sets the appropriate driver on + * the specified FAPL. * * Return: positive - succeeded * negative - failed @@ -518,110 +519,136 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info) { herr_t ret_value = SUCCEED; - /* Determine which driver the user wants to open the file with */ - if (!HDstrcmp(vfd_info->name, drivernames[SWMR_VFD_IDX])) { - /* SWMR driver */ - if (swmr_fapl_augment(fapl_id, vfd_info->fname) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "swmr_fapl_augment failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[SEC2_VFD_IDX])) { - /* SEC2 Driver */ - if (H5Pset_fapl_sec2(fapl_id) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[DIRECT_VFD_IDX])) { + switch (vfd_info->type) { + case VFD_BY_NAME: + /* Determine which driver the user wants to open the file with */ + if (!HDstrcmp(vfd_info->u.name, drivernames[SEC2_VFD_IDX])) { + /* SEC2 Driver */ + if (H5Pset_fapl_sec2(fapl_id) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[DIRECT_VFD_IDX])) { #ifdef H5_HAVE_DIRECT - /* Direct Driver */ - if (H5Pset_fapl_direct(fapl_id, 1024, 4096, 8 * 4096) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_direct failed"); + /* Direct Driver */ + if (H5Pset_fapl_direct(fapl_id, 1024, 4096, 8 * 4096) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_direct failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "Direct VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "Direct VFD is not enabled"); #endif - } - else if (!HDstrcmp(vfd_info->name, drivernames[LOG_VFD_IDX])) { - unsigned long long log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC; + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[LOG_VFD_IDX])) { + unsigned long long log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC; - /* Log Driver */ - if (H5Pset_fapl_log(fapl_id, NULL, log_flags, (size_t)0) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_log failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[WINDOWS_VFD_IDX])) { + /* Log Driver */ + if (H5Pset_fapl_log(fapl_id, NULL, log_flags, (size_t)0) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_log failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[WINDOWS_VFD_IDX])) { #ifdef H5_HAVE_WINDOWS - /* There is no Windows VFD - use SEC2 */ - if (H5Pset_fapl_sec2(fapl_id) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); + /* There is no Windows VFD - use SEC2 */ + if (H5Pset_fapl_sec2(fapl_id) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "Windows VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "Windows VFD is not enabled"); #endif - } - else if (!HDstrcmp(vfd_info->name, drivernames[STDIO_VFD_IDX])) { - /* Stdio Driver */ - if (H5Pset_fapl_stdio(fapl_id) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[CORE_VFD_IDX])) { - /* Core Driver */ - if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, TRUE) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_core failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[FAMILY_VFD_IDX])) { - /* FAMILY Driver */ - /* Set member size to be 0 to indicate the current first member size - * is the member size. - */ - if (H5Pset_fapl_family(fapl_id, (hsize_t)0, H5P_DEFAULT) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_family failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[SPLIT_VFD_IDX])) { - /* SPLIT Driver */ - if (H5Pset_fapl_split(fapl_id, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_split failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[MULTI_VFD_IDX])) { - /* MULTI Driver */ - if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[MPIO_VFD_IDX])) { + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[STDIO_VFD_IDX])) { + /* Stdio Driver */ + if (H5Pset_fapl_stdio(fapl_id) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[CORE_VFD_IDX])) { + /* Core Driver */ + if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, TRUE) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_core failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[FAMILY_VFD_IDX])) { + /* FAMILY Driver */ + /* Set member size to be 0 to indicate the current first member size + * is the member size. + */ + if (H5Pset_fapl_family(fapl_id, (hsize_t)0, H5P_DEFAULT) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_family failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[SPLIT_VFD_IDX])) { + /* SPLIT Driver */ + if (H5Pset_fapl_split(fapl_id, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_split failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[MULTI_VFD_IDX])) { + /* MULTI Driver */ + if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[MPIO_VFD_IDX])) { #ifdef H5_HAVE_PARALLEL - int mpi_initialized, mpi_finalized; + int mpi_initialized, mpi_finalized; - /* MPI-I/O Driver */ + /* MPI-I/O Driver */ - /* check if MPI is available. */ - MPI_Initialized(&mpi_initialized); - MPI_Finalized(&mpi_finalized); + /* check if MPI is available. */ + MPI_Initialized(&mpi_initialized); + MPI_Finalized(&mpi_finalized); - if (mpi_initialized && !mpi_finalized) { - if (H5Pset_fapl_mpio(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_mpio failed"); - } + if (mpi_initialized && !mpi_finalized) { + if (H5Pset_fapl_mpio(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_mpio failed"); + } #else - H5TOOLS_GOTO_ERROR(FAIL, "MPI-I/O VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "MPI-I/O VFD is not enabled"); #endif /* H5_HAVE_PARALLEL */ - } - else if (!HDstrcmp(vfd_info->name, drivernames[ROS3_VFD_IDX])) { + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[ROS3_VFD_IDX])) { #ifdef H5_HAVE_ROS3_VFD - if (!vfd_info->info) - H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid"); - if (H5Pset_fapl_ros3(fapl_id, (H5FD_ros3_fapl_t *)vfd_info->info) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed"); + if (!vfd_info->info) + H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid"); + if (H5Pset_fapl_ros3(fapl_id, (H5FD_ros3_fapl_t *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled"); #endif - } - else if (!HDstrcmp(vfd_info->name, drivernames[HDFS_VFD_IDX])) { + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[HDFS_VFD_IDX])) { #ifdef H5_HAVE_LIBHDFS - if (!vfd_info->info) - H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid"); - if (H5Pset_fapl_hdfs(fapl_id, (H5FD_hdfs_fapl_t *)vfd_info->info) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_hdfs() failed"); + if (!vfd_info->info) + H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid"); + if (H5Pset_fapl_hdfs(fapl_id, (H5FD_hdfs_fapl_t *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_hdfs() failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled"); #endif + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[SWMR_VFD_IDX])) { + /* VFD SWMR driver */ + if (h5tools_set_up_vfd_swmr(fapl_id, vfd_info->fname) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "swmr_fapl_augment failed"); + } + else { + /* + * Try to load VFD plugin. + * + * Currently, driver configuration strings are unsupported. + */ + if (H5Pset_driver_by_name(fapl_id, vfd_info->u.name, (const char *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "can't load VFD plugin by driver name '%s'", vfd_info->u.name); + } + + break; + + case VFD_BY_VALUE: + /* + * Try to load VFD plugin. + * + * Currently, driver configuration strings are unsupported. + */ + if (H5Pset_driver_by_value(fapl_id, vfd_info->u.value, (const char *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "can't load VFD plugin by driver value '%ld'", + (long int)vfd_info->u.value); + break; + + default: + H5TOOLS_GOTO_ERROR(FAIL, "invalid VFD retrieval type"); } - else - H5TOOLS_GOTO_ERROR(FAIL, "invalid VFD name"); done: if (ret_value < 0) { @@ -971,7 +998,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec * as TRUE, we should return failure now since the file couldn't be opened with * the VFL driver/VOL connector that was set on the FAPL by the caller. */ - if (fid < 0 && use_specific_driver) + if (use_specific_driver) H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to open file using specified FAPL"); /* @@ -1012,9 +1039,10 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec if (drivernum == SWMR_VFD_IDX) continue; - vfd_info.info = NULL; - vfd_info.fname = fname; - vfd_info.name = drivernames[drivernum]; + vfd_info.type = VFD_BY_NAME; + vfd_info.info = NULL; + vfd_info.fname = fname; + vfd_info.u.name = drivernames[drivernum]; /* Get a fapl reflecting the selected VOL connector and VFD */ if ((tmp_fapl_id = h5tools_get_fapl(fapl_id, &vol_info, &vfd_info)) < 0) @@ -1085,7 +1113,7 @@ done: H5_ATTR_PURE static size_t h5tools_count_ncols(const char *s) { - register size_t i; + size_t i; for (i = 0; *s; s++) if (*s >= ' ') diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 8f64dd3..0ae0daa 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -550,6 +550,7 @@ typedef struct h5tools_context_t { */ typedef enum { VOL_BY_NAME, VOL_BY_VALUE } h5tools_vol_info_type_t; +typedef enum { VFD_BY_NAME, VFD_BY_VALUE } h5tools_vfd_info_type_t; typedef struct h5tools_vol_info_t { h5tools_vol_info_type_t type; @@ -565,14 +566,18 @@ typedef struct h5tools_vol_info_t { } h5tools_vol_info_t; typedef struct h5tools_vfd_info_t { + h5tools_vfd_info_type_t type; /* Pointer to information to be passed to the driver for its setup */ const void *info; - /* Name of the VFD */ - const char *name; + /* Field specifying either the driver's name or value (ID) */ + union { + const char * name; + H5FD_class_value_t value; + } u; - /* Name of the file to open with the VFD */ + /* Name of the file to open with the VFD (only needed by VFD SWMR) */ const char *fname; } h5tools_vfd_info_t; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 1fb2c68..5976044 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1051,7 +1051,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai H5TOOLS_DEBUG("H5T_ENUM"); if (H5Tenum_nameof(type, vp, enum_name, sizeof enum_name) >= 0) - h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name))); + h5tools_str_append(str, "%s", h5tools_escape(enum_name, sizeof(enum_name))); else { size_t i; if (1 == nsize) @@ -1401,10 +1401,10 @@ h5tools_str_sprint_reference(h5tools_str_t *str, H5R_ref_t *ref_vp) static char * h5tools_escape(char *s /*in,out*/, size_t size) { - register size_t i; - const char * escape; - char octal[8]; - size_t n = HDstrlen(s); + size_t i; + const char *escape; + char octal[8]; + size_t n = HDstrlen(s); for (i = 0; i < n; i++) { switch (s[i]) { diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index 8cc147a..cff77b4 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -1201,10 +1201,11 @@ test_set_configured_fapl(void) #endif /* UTIL_TEST_DEBUG */ /* test */ - vfd_info.info = C.conf_fa; - vfd_info.name = C.vfdname; - vfd_info.fname = "ignore"; - result = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info); + vfd_info.type = VFD_BY_NAME; + vfd_info.info = C.conf_fa; + vfd_info.u.name = C.vfdname; + vfd_info.fname = "ignore"; + result = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info); if (C.expected == 0) JSVERIFY(result, H5I_INVALID_HID, C.message) else diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 1bf3994..77a6785 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -48,6 +48,12 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"vol-value-2", require_arg, '4'}, {"vol-name-2", require_arg, '5'}, {"vol-info-2", require_arg, '6'}, + {"vfd-value-1", require_arg, '7'}, + {"vfd-name-1", require_arg, '8'}, + {"vfd-info-1", require_arg, '9'}, + {"vfd-value-2", require_arg, '0'}, + {"vfd-name-2", require_arg, 'Y'}, + {"vfd-info-2", require_arg, 'Z'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -432,6 +438,38 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case '6': opts->vol_info[1].info_string = H5_optarg; break; + + case '7': + opts->vfd_info[0].type = VFD_BY_VALUE; + opts->vfd_info[0].u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + opts->custom_vfd[0] = TRUE; + break; + + case '8': + opts->vfd_info[0].type = VFD_BY_NAME; + opts->vfd_info[0].u.name = H5_optarg; + opts->custom_vol[0] = TRUE; + break; + + case '9': + opts->vfd_info[0].info = (const void *)H5_optarg; + break; + + case '0': + opts->vfd_info[1].type = VFD_BY_VALUE; + opts->vfd_info[1].u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + opts->custom_vfd[1] = TRUE; + break; + + case 'Y': + opts->vfd_info[1].type = VFD_BY_NAME; + opts->vfd_info[1].u.name = H5_optarg; + opts->custom_vfd[1] = TRUE; + break; + + case 'Z': + opts->vfd_info[1].info = (const void *)H5_optarg; + break; } } diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 20ff29e..8c04bc7 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -18,14 +18,15 @@ /* Name of tool */ #define PROGRAMNAME "h5dump" -static const char *driver_name_g = NULL; /* The driver to open the file with. */ const char * outfname_g = NULL; static hbool_t doxml_g = FALSE; static hbool_t useschema_g = TRUE; static const char *xml_dtd_uri_g = NULL; static hbool_t use_custom_vol_g = FALSE; +static hbool_t use_custom_vfd_g = FALSE; static h5tools_vol_info_t vol_info_g; +static h5tools_vfd_info_t vfd_info_g; #ifdef H5_HAVE_ROS3_VFD /* Default "anonymous" S3 configuration */ @@ -127,6 +128,9 @@ static struct h5_long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"vol-value", require_arg, '1'}, {"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, + {"vfd-value", require_arg, '4'}, + {"vfd-name", require_arg, '5'}, + {"vfd-info", require_arg, '6'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -948,7 +952,10 @@ parse_start: last_was_dset = TRUE; break; case 'f': - driver_name_g = H5_optarg; + vfd_info_g.type = VFD_BY_NAME; + vfd_info_g.u.name = H5_optarg; + vfd_info_g.info = NULL; + use_custom_vfd_g = TRUE; break; case 'g': dump_opts.display_all = 0; @@ -1269,6 +1276,22 @@ end_collect: vol_info_g.info_string = H5_optarg; break; + case '4': + vfd_info_g.type = VFD_BY_VALUE; + vfd_info_g.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + use_custom_vfd_g = TRUE; + break; + + case '5': + vfd_info_g.type = VFD_BY_NAME; + vfd_info_g.u.name = H5_optarg; + use_custom_vfd_g = TRUE; + break; + + case '6': + vfd_info_g.info = (const void *)H5_optarg; + break; + case '?': default: usage(h5tools_getprogname()); @@ -1383,40 +1406,9 @@ main(int argc, char *argv[]) /* Initialize indexing options */ h5trav_set_index(sort_by, sort_order); - if (driver_name_g != NULL) { - h5tools_vfd_info_t vfd_info; - - vfd_info.info = NULL; - vfd_info.name = driver_name_g; - - if (!HDstrcmp(driver_name_g, drivernames[ROS3_VFD_IDX])) { -#ifdef H5_HAVE_ROS3_VFD - vfd_info.info = (void *)&ros3_fa_g; -#else - error_msg("Read-Only S3 VFD not enabled.\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; -#endif - } - else if (!HDstrcmp(driver_name_g, drivernames[HDFS_VFD_IDX])) { -#ifdef H5_HAVE_LIBHDFS - vfd_info.info = (void *)&hdfs_fa_g; -#else - error_msg("The HDFS VFD is not enabled.\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; -#endif - } - - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) { - error_msg("unable to create FAPL for file access\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - } /* driver name defined */ - - if (use_custom_vol_g) { - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &vol_info_g, NULL)) < 0) { + if (use_custom_vol_g || use_custom_vfd_g) { + if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, use_custom_vol_g ? &vol_info_g : NULL, + use_custom_vfd_g ? &vfd_info_g : NULL)) < 0) { error_msg("unable to create FAPL for file access\n"); h5tools_setstatus(EXIT_FAILURE); goto done; @@ -1426,7 +1418,7 @@ main(int argc, char *argv[]) while (H5_optind < argc) { fname = HDstrdup(argv[H5_optind++]); - fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0); + fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0); if (fid < 0) { error_msg("unable to open file \"%s\"\n", fname); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 06f537d..873cec2 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -121,7 +121,7 @@ typedef struct { /* Command-line switches */ static int verbose_g = 0; /* lots of extra output */ static int width_g = 80; /* output width in characters */ -static hbool_t vfd_swmr_poll_g = FALSE; /* poll for changes using VFD SWMR */ +static hbool_t vfd_swmr_poll_g = FALSE; /* poll for changes file using VFD SWMR */ static hbool_t address_g = FALSE; /* print raw data addresses */ static hbool_t data_g = FALSE; /* display dataset values? */ static hbool_t label_g = FALSE; /* label compound values? */ @@ -2305,7 +2305,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter) iter->symlink_list->dangle_link = TRUE; h5tools_str_append(&buffer, "Soft Link {"); - h5tools_str_append(&buffer, buf); + h5tools_str_append(&buffer, "%s", buf); h5tools_str_append(&buffer, "}"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); @@ -2373,11 +2373,11 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter) goto done; h5tools_str_append(&buffer, "External Link {"); - h5tools_str_append(&buffer, filename); + h5tools_str_append(&buffer, "%s", filename); h5tools_str_append(&buffer, "/"); if (*path != '/') h5tools_str_append(&buffer, "/"); - h5tools_str_append(&buffer, path); + h5tools_str_append(&buffer, "%s", path); h5tools_str_append(&buffer, "}"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); @@ -2654,15 +2654,17 @@ main(int argc, char *argv[]) char * fname = NULL, *oname = NULL, *x = NULL; const char * s = NULL; char * rest; - int argno, times; + int argno; static char root_name[] = "/"; char drivername[50]; - const char * preferred_driver = NULL; - int err_exit = 0; - uint64_t poll_nanosecs = 1000; - hid_t fapl_id = H5P_DEFAULT; - hbool_t custom_vol_fapl = FALSE; + int err_exit = 0; + hid_t fapl_id = H5P_DEFAULT; + hbool_t custom_vol_fapl = FALSE; + hbool_t custom_vfd_fapl = FALSE; h5tools_vol_info_t vol_info; + h5tools_vfd_info_t vfd_info; + int times; + uint64_t poll_nanosecs = 1000; #ifdef H5_HAVE_ROS3_VFD /* Default "anonymous" S3 configuration */ @@ -2693,8 +2695,9 @@ main(int argc, char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - /* Initialize fapl info struct */ + /* Initialize fapl info structs */ HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t)); + HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* Build object display table */ DISPATCH(H5O_TYPE_GROUP, "Group", NULL, NULL); @@ -2740,14 +2743,18 @@ main(int argc, char *argv[]) else if (!HDstrcmp(argv[argno], "--full")) { fullname_g = TRUE; } - else if (!HDstrncmp(argv[argno], "--poll=", strlen("--poll="))) { - int nscanned = 0, rc; + else if (!HDstrncmp(argv[argno], "--poll=", HDstrlen("--poll="))) { + int nscanned = 0; + int rc; uint64_t poll_millisecs; - rc = sscanf(argv[argno], "--poll=%" SCNu64 "%n", &poll_millisecs, &nscanned); + + rc = HDsscanf(argv[argno], "--poll=%" SCNu64 "%n", &poll_millisecs, &nscanned); + if (rc != 1 || argv[argno][nscanned] != '\0') { usage(); leave(EXIT_FAILURE); } + poll_nanosecs = poll_millisecs * 1000000; vfd_swmr_poll_g = TRUE; } @@ -2770,9 +2777,6 @@ main(int argc, char *argv[]) else if (!HDstrcmp(argv[argno], "--string")) { string_g = TRUE; } - else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) { - preferred_driver = argv[argno] + 6; - } else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) { vol_info.type = VOL_BY_VALUE; vol_info.u.value = (H5VL_class_value_t)HDatoi(argv[argno] + 12); @@ -2786,6 +2790,25 @@ main(int argc, char *argv[]) else if (!HDstrncmp(argv[argno], "--vol-info=", (size_t)11)) { vol_info.info_string = argv[argno] + 11; } + else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) { + vfd_info.type = VFD_BY_NAME; + vfd_info.u.name = argv[argno] + 6; + vfd_info.info = NULL; + custom_vfd_fapl = TRUE; + } + else if (!HDstrncmp(argv[argno], "--vfd-value=", (size_t)12)) { + vfd_info.type = VFD_BY_VALUE; + vfd_info.u.value = (H5FD_class_value_t)HDatoi(argv[argno] + 12); + custom_vfd_fapl = TRUE; + } + else if (!HDstrncmp(argv[argno], "--vfd-name=", (size_t)11)) { + vfd_info.type = VFD_BY_NAME; + vfd_info.u.name = argv[argno] + 11; + custom_vfd_fapl = TRUE; + } + else if (!HDstrncmp(argv[argno], "--vfd-info=", (size_t)11)) { + vfd_info.info = (const void *)(argv[argno] + 11); + } else if (!HDstrncmp(argv[argno], "--width=", (size_t)8)) { width_g = (int)HDstrtol(argv[argno] + 8, &rest, 0); @@ -2979,28 +3002,47 @@ main(int argc, char *argv[]) leave(EXIT_FAILURE); } /* end if */ + /* Can only poll a single file using VFD SWMR */ if (vfd_swmr_poll_g && argc > 1 + argno) { - HDfprintf(rawerrorstream, "Error: -p / --poll is limited to only one file[/OBJECT]\n\n"); + error_msg("-p / --poll is limited to only one file[/OBJECT]\n"); + leave(EXIT_FAILURE); + } + + /* Must use VFD SWMR with polling */ + if (vfd_swmr_poll_g && custom_vfd_fapl && HDstrcmp(vfd_info.u.name, "swmr")) { + error_msg("can't set non-VFD-SWMR VFD with poll option (-p or --poll)\n"); leave(EXIT_FAILURE); } + /* Check for conflicting arguments */ if (!is_valid_args()) { usage(); leave(EXIT_FAILURE); } + /* Set up VFD SWMR for polling if a custom config wasn't passed in */ + if (vfd_swmr_poll_g && !custom_vfd_fapl) { + vfd_info.type = VFD_BY_NAME; + vfd_info.info = NULL; + vfd_info.u.name = "swmr"; + + /* We're only opening one file, so setting this outside of the file + * processing loop is fine. + */ + vfd_info.fname = argv[argno]; + + custom_vfd_fapl = TRUE; + } + /* Setup a custom fapl for file accesses */ - if (custom_vol_fapl) { - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &vol_info, NULL)) < 0) { + if (custom_vol_fapl || custom_vfd_fapl) { + if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, custom_vol_fapl ? &vol_info : NULL, + custom_vfd_fapl ? &vfd_info : NULL)) < 0) { error_msg("failed to setup file access property list (fapl) for file\n"); leave(EXIT_FAILURE); } } - if (vfd_swmr_poll_g) { - preferred_driver = "swmr"; - } - /* Each remaining argument is an hdf5 file followed by an optional slash * and object name. * @@ -3025,38 +3067,8 @@ main(int argc, char *argv[]) file_id = H5I_INVALID_HID; while (fname && *fname) { - if (preferred_driver) { - h5tools_vfd_info_t vfd_info; - - vfd_info.info = NULL; - vfd_info.name = preferred_driver; - vfd_info.fname = fname; - - if (!HDstrcmp(preferred_driver, drivernames[ROS3_VFD_IDX])) { -#ifdef H5_HAVE_ROS3_VFD - vfd_info.info = (void *)&ros3_fa; -#else - HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n"); - leave(EXIT_FAILURE); -#endif - } - else if (!HDstrcmp(preferred_driver, drivernames[HDFS_VFD_IDX])) { -#ifdef H5_HAVE_LIBHDFS - vfd_info.info = (void *)&hdfs_fa; -#else - HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n"); - leave(EXIT_FAILURE); -#endif - } - - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) { - HDfprintf(rawerrorstream, "Error: Unable to create FAPL for file access\n\n"); - leave(EXIT_FAILURE); - } - } - - file_id = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, - drivername, sizeof drivername); + file_id = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), drivername, + sizeof drivername); if (file_id >= 0) { if (verbose_g) @@ -3065,6 +3077,7 @@ main(int argc, char *argv[]) } else if (vfd_swmr_poll_g) break; + /* Shorten the file name; lengthen the object name */ x = oname; oname = HDstrrchr(fname, '/'); @@ -3145,9 +3158,10 @@ main(int argc, char *argv[]) if (vfd_swmr_poll_g) { int i; for (i = 0; i < 3; i++) - printf("\n"); + HDprintf("\n"); } - /* Open the object and display it's information */ + + /* Open the object and display its information */ if (li.type == H5L_TYPE_HARD) { if (visit_obj(file_id, oname, &iter) < 0) { leave(EXIT_FAILURE); @@ -3159,9 +3173,7 @@ main(int argc, char *argv[]) iter.gid = file_id; list_lnk(oname, &li, &iter); } -#if 1 H5_nanosleep(poll_nanosecs); -#endif } H5Fclose(file_id); HDfree(fname); @@ -3179,13 +3191,6 @@ main(int argc, char *argv[]) /* if no-dangling-links option specified and dangling link found */ if (no_dangling_link_g && iter.symlink_list->dangle_link) err_exit = 1; - if (fapl_id != H5P_DEFAULT) { - if (0 < H5Pclose(fapl_id)) { - HDfprintf(rawerrorstream, "Error: Unable to set close fapl entry\n\n"); - leave(EXIT_FAILURE); - } - fapl_id = H5P_DEFAULT; - } } /* end while */ if (fapl_id != H5P_DEFAULT) { diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index e316245..1baaca2 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -420,7 +420,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si /* If the prefix specifies the HDF5_PARAPREFIX directory, then * default to using the "/tmp/$USER" or "/tmp/$LOGIN" * directory instead. */ - register char *user, *login, *subdir; + char *user, *login, *subdir; user = HDgetenv("USER"); login = HDgetenv("LOGIN"); diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c index 7e12bed..ec0115b 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -200,7 +200,7 @@ static void output_results(const struct options *options, const char *name, min off_t data_size); static void output_times(const struct options *options, const char *name, minmax *table, int table_size); static void output_report(const char *fmt, ...) H5_ATTR_FORMAT(printf, 1, 2); -static void print_indent(register int indent); +static void print_indent(int indent); static void usage(const char *prog); static void report_parameters(struct options *opts); static off_t squareo(off_t); @@ -336,7 +336,7 @@ run_test_loop(struct options *opts) /* start with max_num_procs and decrement it by half for each loop. */ /* if performance needs restart, fewer processes may be needed. */ for (num_procs = opts->max_num_procs; num_procs >= opts->min_num_procs; num_procs >>= 1) { - register size_t buf_size; + size_t buf_size; parms.num_procs = num_procs; @@ -411,34 +411,34 @@ run_test_loop(struct options *opts) static int run_test(iotype iot, parameters parms, struct options *opts) { - results res; - register int i, ret_value = SUCCESS; - int comm_size; - off_t raw_size; - minmax * write_mpi_mm_table = NULL; - minmax * write_mm_table = NULL; - minmax * write_gross_mm_table = NULL; - minmax * write_raw_mm_table = NULL; - minmax * read_mpi_mm_table = NULL; - minmax * read_mm_table = NULL; - minmax * read_gross_mm_table = NULL; - minmax * read_raw_mm_table = NULL; - minmax * read_open_mm_table = NULL; - minmax * read_close_mm_table = NULL; - minmax * write_open_mm_table = NULL; - minmax * write_close_mm_table = NULL; - minmax write_mpi_mm = {0.0, 0.0, 0.0, 0}; - minmax write_mm = {0.0, 0.0, 0.0, 0}; - minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; - minmax write_raw_mm = {0.0, 0.0, 0.0, 0}; - minmax read_mpi_mm = {0.0, 0.0, 0.0, 0}; - minmax read_mm = {0.0, 0.0, 0.0, 0}; - minmax read_gross_mm = {0.0, 0.0, 0.0, 0}; - minmax read_raw_mm = {0.0, 0.0, 0.0, 0}; - minmax read_open_mm = {0.0, 0.0, 0.0, 0}; - minmax read_close_mm = {0.0, 0.0, 0.0, 0}; - minmax write_open_mm = {0.0, 0.0, 0.0, 0}; - minmax write_close_mm = {0.0, 0.0, 0.0, 0}; + results res; + int i, ret_value = SUCCESS; + int comm_size; + off_t raw_size; + minmax *write_mpi_mm_table = NULL; + minmax *write_mm_table = NULL; + minmax *write_gross_mm_table = NULL; + minmax *write_raw_mm_table = NULL; + minmax *read_mpi_mm_table = NULL; + minmax *read_mm_table = NULL; + minmax *read_gross_mm_table = NULL; + minmax *read_raw_mm_table = NULL; + minmax *read_open_mm_table = NULL; + minmax *read_close_mm_table = NULL; + minmax *write_open_mm_table = NULL; + minmax *write_close_mm_table = NULL; + minmax write_mpi_mm = {0.0, 0.0, 0.0, 0}; + minmax write_mm = {0.0, 0.0, 0.0, 0}; + minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; + minmax write_raw_mm = {0.0, 0.0, 0.0, 0}; + minmax read_mpi_mm = {0.0, 0.0, 0.0, 0}; + minmax read_mm = {0.0, 0.0, 0.0, 0}; + minmax read_gross_mm = {0.0, 0.0, 0.0, 0}; + minmax read_raw_mm = {0.0, 0.0, 0.0, 0}; + minmax read_open_mm = {0.0, 0.0, 0.0, 0}; + minmax read_close_mm = {0.0, 0.0, 0.0, 0}; + minmax write_open_mm = {0.0, 0.0, 0.0, 0}; + minmax write_close_mm = {0.0, 0.0, 0.0, 0}; raw_size = parms.num_files * (off_t)parms.num_dsets * (off_t)parms.num_bytes; parms.io_type = iot; @@ -1098,10 +1098,9 @@ output_report(const char *fmt, ...) * things. * Return: Nothing * Programmer: Bill Wendling, 29. October 2001 - * Modifications: */ static void -print_indent(register int indent) +print_indent(int indent) { int myrank; @@ -1278,7 +1277,7 @@ report_parameters(struct options *opts) static struct options * parse_command_line(int argc, const char *const *argv) { - register int opt; + int opt; struct options *cl_opts; cl_opts = (struct options *)malloc(sizeof(struct options)); diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index 95ec3ce..bdd2c08 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -328,7 +328,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si /* If the prefix specifies the HDF5_PREFIX directory, then * default to using the "/tmp/$USER" or "/tmp/$LOGIN" * directory instead. */ - register char *user, *login, *subdir; + char *user, *login, *subdir; user = HDgetenv("USER"); login = HDgetenv("LOGIN"); diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index 87b9d65..dc2e15e 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -173,7 +173,7 @@ static void accumulate_minmax_stuff(const minmax *mm, int count, minm static void output_results(const struct options *options, const char *name, minmax *table, int table_size, off_t data_size); static void output_report(const char *fmt, ...); -static void print_indent(register int indent); +static void print_indent(int indent); static void usage(const char *prog); static void report_parameters(struct options *opts); @@ -299,25 +299,25 @@ run_test_loop(struct options *opts) static int run_test(iotype iot, parameters parms, struct options *opts) { - results res; - register int i, ret_value = SUCCESS; - off_t raw_size; - minmax * write_sys_mm_table = NULL; - minmax * write_mm_table = NULL; - minmax * write_gross_mm_table = NULL; - minmax * write_raw_mm_table = NULL; - minmax * read_sys_mm_table = NULL; - minmax * read_mm_table = NULL; - minmax * read_gross_mm_table = NULL; - minmax * read_raw_mm_table = NULL; - minmax write_sys_mm = {0.0, 0.0, 0.0, 0}; - minmax write_mm = {0.0, 0.0, 0.0, 0}; - minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; - minmax write_raw_mm = {0.0, 0.0, 0.0, 0}; - minmax read_sys_mm = {0.0, 0.0, 0.0, 0}; - minmax read_mm = {0.0, 0.0, 0.0, 0}; - minmax read_gross_mm = {0.0, 0.0, 0.0, 0}; - minmax read_raw_mm = {0.0, 0.0, 0.0, 0}; + results res; + int i, ret_value = SUCCESS; + off_t raw_size; + minmax *write_sys_mm_table = NULL; + minmax *write_mm_table = NULL; + minmax *write_gross_mm_table = NULL; + minmax *write_raw_mm_table = NULL; + minmax *read_sys_mm_table = NULL; + minmax *read_mm_table = NULL; + minmax *read_gross_mm_table = NULL; + minmax *read_raw_mm_table = NULL; + minmax write_sys_mm = {0.0, 0.0, 0.0, 0}; + minmax write_mm = {0.0, 0.0, 0.0, 0}; + minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; + minmax write_raw_mm = {0.0, 0.0, 0.0, 0}; + minmax read_sys_mm = {0.0, 0.0, 0.0, 0}; + minmax read_mm = {0.0, 0.0, 0.0, 0}; + minmax read_gross_mm = {0.0, 0.0, 0.0, 0}; + minmax read_raw_mm = {0.0, 0.0, 0.0, 0}; raw_size = (off_t)parms.num_bytes; parms.io_type = iot; @@ -657,10 +657,9 @@ output_report(const char *fmt, ...) * things. * Return: Nothing * Programmer: Bill Wendling, 29. October 2001 - * Modifications: */ static void -print_indent(register int indent) +print_indent(int indent) { indent *= TAB_SPACE; diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 0241d62..4c88bd7 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -31,7 +31,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:v*z:EG:LM:P:S:T:VXW1:2:3:4:5:6:"; +static const char *s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:v*z:EG:LM:P:S:T:VXWY:Z:1:2:3:4:5:6:7:8:9:0:"; static struct h5_long_options l_opts[] = {{"alignment", require_arg, 'a'}, {"block", require_arg, 'b'}, {"compact", require_arg, 'c'}, @@ -68,6 +68,12 @@ static struct h5_long_options l_opts[] = {{"alignment", require_arg, 'a'}, {"dst-vol-value", require_arg, '4'}, {"dst-vol-name", require_arg, '5'}, {"dst-vol-info", require_arg, '6'}, + {"src-vfd-value", require_arg, '7'}, + {"src-vfd-name", require_arg, '8'}, + {"src-vfd-info", require_arg, '9'}, + {"dst-vfd-value", require_arg, '0'}, + {"dst-vfd-name", require_arg, 'Y'}, + {"dst-vfd-info", require_arg, 'Z'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -505,15 +511,21 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) { h5tools_vol_info_t in_vol_info; h5tools_vol_info_t out_vol_info; - hbool_t custom_in_fapl = FALSE; - hbool_t custom_out_fapl = FALSE; - hid_t tmp_fapl = H5I_INVALID_HID; + h5tools_vfd_info_t in_vfd_info; + h5tools_vfd_info_t out_vfd_info; + hbool_t custom_in_vol = FALSE; + hbool_t custom_in_vfd = FALSE; + hbool_t custom_out_vol = FALSE; + hbool_t custom_out_vfd = FALSE; + hid_t tmp_fapl = H5I_INVALID_HID; int bound, opt; int ret_value = 0; /* Initialize fapl info structs */ HDmemset(&in_vol_info, 0, sizeof(h5tools_vol_info_t)); HDmemset(&out_vol_info, 0, sizeof(h5tools_vol_info_t)); + HDmemset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t)); + HDmemset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* parse command line options */ while (EOF != (opt = H5_get_option(argc, argv, s_opts, l_opts))) { @@ -765,13 +777,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) case '1': in_vol_info.type = VOL_BY_VALUE; in_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg); - custom_in_fapl = TRUE; + custom_in_vol = TRUE; break; case '2': in_vol_info.type = VOL_BY_NAME; in_vol_info.u.name = H5_optarg; - custom_in_fapl = TRUE; + custom_in_vol = TRUE; break; case '3': @@ -781,19 +793,51 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) case '4': out_vol_info.type = VOL_BY_VALUE; out_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg); - custom_out_fapl = TRUE; + custom_out_vol = TRUE; break; case '5': out_vol_info.type = VOL_BY_NAME; out_vol_info.u.name = H5_optarg; - custom_out_fapl = TRUE; + custom_out_vol = TRUE; break; case '6': out_vol_info.info_string = H5_optarg; break; + case '7': + in_vfd_info.type = VFD_BY_VALUE; + in_vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + custom_in_vfd = TRUE; + break; + + case '8': + in_vfd_info.type = VFD_BY_NAME; + in_vfd_info.u.name = H5_optarg; + custom_in_vfd = TRUE; + break; + + case '9': + in_vfd_info.info = (const void *)H5_optarg; + break; + + case '0': + out_vfd_info.type = VFD_BY_VALUE; + out_vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + custom_out_vfd = TRUE; + break; + + case 'Y': + out_vfd_info.type = VFD_BY_NAME; + out_vfd_info.u.name = H5_optarg; + custom_out_vfd = TRUE; + break; + + case 'Z': + out_vfd_info.info = (const void *)H5_optarg; + break; + default: break; } /* end switch */ @@ -827,8 +871,9 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) } /* Setup FAPL for input and output file accesses */ - if (custom_in_fapl) { - if ((tmp_fapl = h5tools_get_fapl(options->fin_fapl, &in_vol_info, NULL)) < 0) { + if (custom_in_vol || custom_in_vfd) { + if ((tmp_fapl = h5tools_get_fapl(options->fin_fapl, custom_in_vol ? &in_vol_info : NULL, + custom_in_vfd ? &in_vfd_info : NULL)) < 0) { error_msg("failed to setup FAPL for input file\n"); h5tools_setstatus(EXIT_FAILURE); ret_value = -1; @@ -847,8 +892,9 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) options->fin_fapl = tmp_fapl; } - if (custom_out_fapl) { - if ((tmp_fapl = h5tools_get_fapl(options->fout_fapl, &out_vol_info, NULL)) < 0) { + if (custom_out_vol || custom_out_vfd) { + if ((tmp_fapl = h5tools_get_fapl(options->fout_fapl, custom_out_vol ? &out_vol_info : NULL, + custom_out_vfd ? &out_vfd_info : NULL)) < 0) { error_msg("failed to setup FAPL for output file\n"); h5tools_setstatus(EXIT_FAILURE); ret_value = -1; diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 9ad9203..1fbc03c 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -1704,26 +1704,10 @@ main(int argc, char *argv[]) if (drivername) { h5tools_vfd_info_t vfd_info; - vfd_info.info = NULL; - vfd_info.name = drivername; - vfd_info.fname = fname; - - if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX])) { -#ifdef H5_HAVE_ROS3_VFD - vfd_info.info = (void *)&ros3_fa; -#else - error_msg("Read-Only S3 VFD not enabled.\n"); - goto done; -#endif - } - else if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX])) { -#ifdef H5_HAVE_LIBHDFS - vfd_info.info = (void *)&hdfs_fa; -#else - error_msg("HDFS VFD not enabled.\n"); - goto done; -#endif - } + vfd_info.type = VFD_BY_NAME; + vfd_info.info = NULL; + vfd_info.u.name = drivername; + vfd_info.fname = fname; if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) { error_msg("Unable to create FAPL for file access\n"); @@ -1740,7 +1724,7 @@ main(int argc, char *argv[]) HDprintf("Filename: %s\n", fname); - fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0); + fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0); if (fid < 0) { error_msg("unable to open file \"%s\"\n", fname); diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index 5c2396c..1b8b23d 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -26,7 +26,8 @@ static const char * s_opts = "hlpvV"; static struct h5_long_options l_opts[] = { {"help", no_arg, 'h'}, {"latest", no_arg, 'l'}, {"parents", no_arg, 'p'}, {"verbose", no_arg, 'v'}, {"version", no_arg, 'V'}, {"vol-value", require_arg, '1'}, - {"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, {NULL, 0, '\0'}}; + {"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, {"vfd-value", require_arg, '4'}, + {"vfd-name", require_arg, '5'}, {"vfd-info", require_arg, '6'}, {NULL, 0, '\0'}}; /* Command line parameter settings */ typedef struct mkgrp_opt_t { @@ -134,8 +135,10 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) { int opt; /* Option from command line */ size_t curr_group; /* Current group name to copy */ - hbool_t custom_fapl = FALSE; + hbool_t custom_vol = FALSE; + hbool_t custom_vfd = FALSE; h5tools_vol_info_t vol_info; + h5tools_vfd_info_t vfd_info; hid_t tmp_fapl_id = H5I_INVALID_HID; /* Check for empty command line */ @@ -144,8 +147,9 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) leave(EXIT_SUCCESS); } - /* Initialize fapl info struct */ + /* Initialize fapl info structs */ HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t)); + HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* Parse command line options */ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { @@ -180,19 +184,35 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) case '1': vol_info.type = VOL_BY_VALUE; vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg); - custom_fapl = TRUE; + custom_vol = TRUE; break; case '2': vol_info.type = VOL_BY_NAME; vol_info.u.name = H5_optarg; - custom_fapl = TRUE; + custom_vol = TRUE; break; case '3': vol_info.info_string = H5_optarg; break; + case '4': + vfd_info.type = VFD_BY_VALUE; + vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + custom_vfd = TRUE; + break; + + case '5': + vfd_info.type = VFD_BY_NAME; + vfd_info.u.name = H5_optarg; + custom_vfd = TRUE; + break; + + case '6': + vfd_info.info = (const void *)H5_optarg; + break; + /* Bad command line argument */ default: usage(h5tools_getprogname()); @@ -231,8 +251,9 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) } /* Setup a custom fapl for file accesses */ - if (custom_fapl) { - if ((tmp_fapl_id = h5tools_get_fapl(options->fapl_id, &vol_info, NULL)) < 0) { + if (custom_vol || custom_vfd) { + if ((tmp_fapl_id = h5tools_get_fapl(options->fapl_id, custom_vol ? &vol_info : NULL, + custom_vfd ? &vfd_info : NULL)) < 0) { error_msg("failed to setup file access property list (fapl) for file\n"); leave(EXIT_FAILURE); } @@ -304,7 +325,8 @@ main(int argc, char *argv[]) } /* Attempt to open an existing HDF5 file first */ - fid = h5tools_fopen(params_g.fname, H5F_ACC_RDWR, params_g.fapl_id, FALSE, NULL, 0); + fid = h5tools_fopen(params_g.fname, H5F_ACC_RDWR, params_g.fapl_id, (params_g.fapl_id != H5P_DEFAULT), + NULL, 0); /* If we couldn't open an existing file, try creating file */ /* (use "EXCL" instead of "TRUNC", so we don't blow away existing non-HDF5 file) */ diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 5258211..339b563 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -3914,9 +3914,9 @@ gent_multi(void) static void gent_large_objname(void) { - hid_t fid, group, group2; - char grp_name[128]; - register int i; + hid_t fid, group, group2; + char grp_name[128]; + int i; fid = H5Fcreate(FILE37, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index e7cc21a..8b114e4 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -272,98 +272,100 @@ main(void) GOERROR; PASSED(); - TESTING(" files with file space info setting-- options -S and -P are set & -L"); - ++j; /* #3 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */ - pack_options.fs_persist = TRUE; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (h5_using_default_driver(NULL)) { + TESTING(" files with file space info setting-- options -S and -P are set & -L"); + ++j; /* #3 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */ + pack_options.fs_persist = TRUE; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -P and -T are set & -L"); - ++j; /* #4 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 2; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -P and -T are set & -L"); + ++j; /* #4 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ + pack_options.fs_threshold = 2; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -S and -G are set & -L"); - ++j; /* #5 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; - pack_options.fs_pagesize = 8192; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -S and -G are set & -L"); + ++j; /* #5 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; + pack_options.fs_pagesize = 8192; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); - ++j; /* #6 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE; - pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 1; - pack_options.fs_pagesize = 8192; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); + ++j; /* #6 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE; + pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ + pack_options.fs_threshold = 1; + pack_options.fs_pagesize = 8192; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); - ++j; /* #7 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR; - pack_options.fs_threshold = 1; - pack_options.fs_pagesize = 4096; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); + ++j; /* #7 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR; + pack_options.fs_threshold = 1; + pack_options.fs_pagesize = 4096; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * file with fill values @@ -389,20 +391,22 @@ main(void) * file with all kinds of dataset datatypes *------------------------------------------------------------------------- */ - TESTING(" copy of datasets (all datatypes)"); - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (!h5_using_parallel_driver(NULL)) { + TESTING(" copy of datasets (all datatypes)"); + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * file with attributes @@ -1487,49 +1491,53 @@ main(void) GOERROR; PASSED(); - /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ - TESTING(" file with userblock"); - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0) - GOERROR; - if (verify_userblock(FNAME16OUT) < 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * test file with userblock + *------------------------------------------------------------------------- + */ + TESTING(" file with userblock"); + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0) + GOERROR; + if (verify_userblock(FNAME16OUT) < 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * test --latest options *------------------------------------------------------------------------- */ - TESTING(" latest file format options"); - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - pack_options.latest = 1; - pack_options.grp_compact = 10; - pack_options.grp_indexed = 5; - pack_options.msg_size[0] = 10; - pack_options.msg_size[1] = 20; - pack_options.msg_size[2] = 30; - pack_options.msg_size[3] = 40; - pack_options.msg_size[4] = 50; - if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (!h5_using_parallel_driver(NULL)) { + TESTING(" latest file format options"); + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + pack_options.latest = 1; + pack_options.grp_compact = 10; + pack_options.grp_indexed = 5; + pack_options.msg_size[0] = 10; + pack_options.msg_size[1] = 20; + pack_options.msg_size[2] = 30; + pack_options.msg_size[3] = 40; + pack_options.msg_size[4] = 50; + if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * test several global filters @@ -1560,36 +1568,38 @@ main(void) SKIPPED(); #endif - /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ - TESTING(" file with added userblock"); + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * test file with userblock + *------------------------------------------------------------------------- + */ + TESTING(" file with added userblock"); #ifdef H5_HAVE_FILTER_DEFLATE - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; - /* add the options for a user block size and user block filename */ - pack_options.ublock_size = USERBLOCK_SIZE; - pack_options.ublock_filename = FNAME_UB; + /* add the options for a user block size and user block filename */ + pack_options.ublock_size = USERBLOCK_SIZE; + pack_options.ublock_filename = FNAME_UB; - if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) - GOERROR; - if (verify_userblock(FNAME8OUT) < 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; + if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) + GOERROR; + if (verify_userblock(FNAME8OUT) < 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; - PASSED(); + PASSED(); #else - SKIPPED(); + SKIPPED(); #endif + } /*------------------------------------------------------------------------- * test file with alignment @@ -1664,48 +1674,50 @@ main(void) PASSED(); - /*------------------------------------------------------------------------- - * test --metadata_block_size option - * Also verify that output file using the metadata_block_size option is - * larger than the output file one not using it. - * FNAME4 is used because it is the same as the test file used for the - * shell script version of this test (h5repack.sh). - *------------------------------------------------------------------------- - */ - TESTING(" metadata block size option"); - /* First run without metadata option. No need to verify the correctness */ - /* since this has been verified by earlier tests. Just record the file */ - /* size of the output file. */ - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) - GOERROR; - if (HDstat(FNAME4OUT, &file_stat) < 0) - GOERROR; - fsize1 = file_stat.st_size; - if (h5repack_end(&pack_options) < 0) - GOERROR; + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * test --metadata_block_size option + * Also verify that output file using the metadata_block_size option is + * larger than the output file one not using it. + * FNAME4 is used because it is the same as the test file used for the + * shell script version of this test (h5repack.sh). + *------------------------------------------------------------------------- + */ + TESTING(" metadata block size option"); + /* First run without metadata option. No need to verify the correctness */ + /* since this has been verified by earlier tests. Just record the file */ + /* size of the output file. */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) + GOERROR; + if (HDstat(FNAME4OUT, &file_stat) < 0) + GOERROR; + fsize1 = file_stat.st_size; + if (h5repack_end(&pack_options) < 0) + GOERROR; - /* run it again with metadata option */ - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - pack_options.meta_block_size = 8192; - if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) - GOERROR; - /* record the file size of the output file */ - if (HDstat(FNAME4OUT, &file_stat) < 0) - GOERROR; - fsize2 = file_stat.st_size; - /* verify second file size is larger than the first one */ - if (fsize2 <= fsize1) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + /* run it again with metadata option */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + pack_options.meta_block_size = 8192; + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) + GOERROR; + /* record the file size of the output file */ + if (HDstat(FNAME4OUT, &file_stat) < 0) + GOERROR; + fsize2 = file_stat.st_size; + /* verify second file size is larger than the first one */ + if (fsize2 <= fsize1) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * clean temporary test files @@ -1725,7 +1737,10 @@ main(void) return 0; error: + h5tools_close(); + puts("***** H5REPACK TESTS FAILED *****"); + return 1; } @@ -1760,12 +1775,14 @@ make_testfiles(void) * create another file for general copy test (all datatypes) *------------------------------------------------------------------------- */ - if ((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - if (make_all_objects(fid) < 0) - goto out; - if (H5Fclose(fid) < 0) - return -1; + if (!h5_using_parallel_driver(NULL)) { + if ((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + if (make_all_objects(fid) < 0) + goto out; + if (H5Fclose(fid) < 0) + return -1; + } /*------------------------------------------------------------------------- * create a file for attributes copy test @@ -1934,19 +1951,21 @@ make_testfiles(void) if (H5Fclose(fid) < 0) return -1; - /*------------------------------------------------------------------------- - * create a file with userblock - *------------------------------------------------------------------------- - */ - if (make_userblock() < 0) - goto out; + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * create a file with userblock + *------------------------------------------------------------------------- + */ + if (make_userblock() < 0) + goto out; - /*------------------------------------------------------------------------- - * create a userblock file - *------------------------------------------------------------------------- - */ - if (make_userblock_file() < 0) - goto out; + /*------------------------------------------------------------------------- + * create a userblock file + *------------------------------------------------------------------------- + */ + if (make_userblock_file() < 0) + goto out; + } /*------------------------------------------------------------------------- * create a file with named datatypes @@ -1959,30 +1978,32 @@ make_testfiles(void) if (H5Fclose(fid) < 0) return -1; - /*------------------------------------------------------------------------- - * create obj and region reference type datasets (bug1814) - * add attribute with int type (bug1726) - * add attribute with obj and region reference type (bug1726) - *------------------------------------------------------------------------- - */ - if ((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - /* create reference type datasets */ - if (make_references(fid) < 0) - goto out; - if (H5Fclose(fid) < 0) - return -1; + if (!h5_using_parallel_driver(NULL)) { + /*------------------------------------------------------------------------- + * create obj and region reference type datasets (bug1814) + * add attribute with int type (bug1726) + * add attribute with obj and region reference type (bug1726) + *------------------------------------------------------------------------- + */ + if ((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + /* create reference type datasets */ + if (make_references(fid) < 0) + goto out; + if (H5Fclose(fid) < 0) + return -1; - /*------------------------------------------------------------------------- - * create a file with obj and region references in attribute of compound and - * vlen datatype - *-------------------------------------------------------------------------*/ - if ((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - if (make_complex_attr_references(fid) < 0) - goto out; - if (H5Fclose(fid) < 0) - return -1; + /*------------------------------------------------------------------------- + * create a file with obj and region references in attribute of compound and + * vlen datatype + *-------------------------------------------------------------------------*/ + if ((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + if (make_complex_attr_references(fid) < 0) + goto out; + if (H5Fclose(fid) < 0) + return -1; + } /*------------------------------------------------------------------------- * create 8 files with combinations ??? @@ -2018,111 +2039,113 @@ make_testfiles(void) if (H5Fclose(fid) < 0) return -1; - /* - * #2 -- h5repack_page_persist.h5 - * Setting: - * strategy=PAGE, persist=TRUE, threshold=1 - * inpage=512 - * latest format - */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; - - /* - * #3 -- h5repack_fsm_aggr_persist.h5 - * Setting: - * strategy=FSM_AGGR, persist=TRUE, threshold=1 - * default: inpage=4096 - */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; - - /* - * #4 -- h5repack_page_threshold.h5 - * Setting: - * strategy=PAGE, persist=FALSE, threshold=3 - * inpage=8192 - * latest format - */ - - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0) - return -1; - if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; - - /* - * #5 -- h5repack_fsm_aggr_threshold.h5 - * Setting: - * strategy=FSM_AGGR, persist=FALSE, threshold=3 - * inpage=4096 - */ + if (h5_using_default_driver(NULL)) { + /* + * #2 -- h5repack_page_persist.h5 + * Setting: + * strategy=PAGE, persist=TRUE, threshold=1 + * inpage=512 + * latest format + */ + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #3 -- h5repack_fsm_aggr_persist.h5 + * Setting: + * strategy=FSM_AGGR, persist=TRUE, threshold=1 + * default: inpage=4096 + */ + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #4 -- h5repack_page_threshold.h5 + * Setting: + * strategy=PAGE, persist=FALSE, threshold=3 + * inpage=8192 + * latest format + */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0) - return -1; - if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0) + return -1; + if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #5 -- h5repack_fsm_aggr_threshold.h5 + * Setting: + * strategy=FSM_AGGR, persist=FALSE, threshold=3 + * inpage=4096 + */ - /* - * #6 -- h5repack_aggr.h5 - * Setting: - * strategy=AGGR, persist=FALSE, threshold=1 - * latest format - */ + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0) + return -1; + if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #6 -- h5repack_aggr.h5 + * Setting: + * strategy=AGGR, persist=FALSE, threshold=1 + * latest format + */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + } /* * #7 -- h5repack_none.h5 diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c index 032bfba..a074d2c 100644 --- a/tools/test/perform/pio_standalone.c +++ b/tools/test/perform/pio_standalone.c @@ -92,7 +92,7 @@ get_option(int argc, const char **argv, const char *opts, const struct h5_long_o sp = 1; } else { - register char *cp; /* pointer into current token */ + char *cp; /* pointer into current token */ /* short command line option */ opt_opt = argv[H5_optind][sp]; diff --git a/tools/test/perform/sio_standalone.c b/tools/test/perform/sio_standalone.c index 7c22b53..353dad3 100644 --- a/tools/test/perform/sio_standalone.c +++ b/tools/test/perform/sio_standalone.c @@ -92,7 +92,7 @@ get_option(int argc, const char **argv, const char *opts, const struct h5_long_o sp = 1; } else { - register char *cp; /* pointer into current token */ + char *cp; /* pointer into current token */ /* short command line option */ opt_opt = argv[H5_optind][sp]; diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 74b1685..87a7122 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -336,8 +336,8 @@ parse_size_directive(const char *size) static void fill_with_random_data(Bytef *src, uLongf src_len) { - register unsigned u; - h5_stat_t stat_buf; + unsigned u; + h5_stat_t stat_buf; if (HDstat("/dev/urandom", &stat_buf) == 0) { uLongf len = src_len; @@ -386,7 +386,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long Bytef * src; for (src_len = min_buf_size; src_len <= max_buf_size; src_len <<= 1) { - register unsigned long i, iters; + unsigned long i, iters; iters = file_size / src_len; src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len); diff --git a/utils/vfd_swmr/aux_process.c b/utils/vfd_swmr/aux_process.c index 2e1b2f0..dffc2e5 100644 --- a/utils/vfd_swmr/aux_process.c +++ b/utils/vfd_swmr/aux_process.c @@ -272,7 +272,7 @@ const char *aux_optarg; /* Flag argument (or value) */ * Failure: A question mark. *------------------------------------------------------------------------- */ -int +static int aux_get_options(int argc, char **argv, const char *opts, const aux_long_options *l_opts) { static int sp = 1; /* character index in current token */ @@ -350,7 +350,7 @@ aux_get_options(int argc, char **argv, const char *opts, const aux_long_options free(arg); } else { - register char *cp; /* pointer into current token */ + char *cp; /* pointer into current token */ /* short command line option */ optchar = argv[aux_optind][sp]; @@ -798,15 +798,18 @@ verify_md_file_chksum(handler_t *hand, uint64_t ud_seq_num) if (hand->output) { fprintf(hand->output, - "\nFor testing, verify the checksum after applying the updater file %llu:\n", ud_seq_num); - fprintf(hand->output, "received checksum=%u, calculated checksum=%u (at line %d)\n", + "\nFor testing, verify the checksum after applying the updater file %" PRIu64 ":\n", + ud_seq_num); + fprintf(hand->output, + "received checksum=%" PRIu32 ", calculated checksum=%" PRIu32 " (at line %d)\n", hand->md_file_checksums[ud_seq_num], verified_checksum, __LINE__); } /* Make sure the checksum is correct */ if (verified_checksum != hand->md_file_checksums[ud_seq_num]) { fprintf(stderr, - "received checksum for updater file %llu (%u) doesn't match calculated checksum (%u) at " + "received checksum for updater file %" PRIu64 " (%" PRIu32 + ") doesn't match calculated checksum (%" PRIu32 ") at " "line %d\n", ud_seq_num, hand->md_file_checksums[ud_seq_num], verified_checksum, __LINE__); goto error; @@ -903,15 +906,17 @@ decode_ud_header(updater_t *updater, handler_t *hand) /* Output the log info */ if (hand->output) { fprintf(hand->output, "header signature=%s\n", updater->header_signature); - fprintf(hand->output, "version=%hu\n", updater->version); - fprintf(hand->output, "flags=%hu\n", updater->flags); - fprintf(hand->output, "page size (bytes)=%u\n", updater->page_size); - fprintf(hand->output, "sequence number=%llu\n", updater->sequence_num); - fprintf(hand->output, "tick number=%llu\n", updater->tick_num); - fprintf(hand->output, "change list offset (bytes)=%llu\n", updater->change_list_offset); - fprintf(hand->output, "change list length (bytes)=%llu\n", updater->change_list_len); - fprintf(hand->output, "received checksum for header=%u\n", updater->received_header_checksum); - fprintf(hand->output, "calculated checksum for header=%u\n\n", updater->verified_header_checksum); + fprintf(hand->output, "version=%h" PRIu16 "\n", updater->version); + fprintf(hand->output, "flags=%h" PRIu16 "\n", updater->flags); + fprintf(hand->output, "page size (bytes)=%" PRIu32 "\n", updater->page_size); + fprintf(hand->output, "sequence number=%" PRIu64 "\n", updater->sequence_num); + fprintf(hand->output, "tick number=%" PRIu64 "\n", updater->tick_num); + fprintf(hand->output, "change list offset (bytes)=%" PRIu64 "\n", updater->change_list_offset); + fprintf(hand->output, "change list length (bytes)=%" PRIu64 "\n", updater->change_list_len); + fprintf(hand->output, "received checksum for header=%" PRIu32 "\n", + updater->received_header_checksum); + fprintf(hand->output, "calculated checksum for header=%" PRIu32 "\n\n", + updater->verified_header_checksum); } /* If the flag is CREATE_METADATA_FILE_ONLY_FLAG (0x0001), create the metadata file and close the updater @@ -1046,20 +1051,25 @@ decode_cl_top_fields(updater_t *updater, handler_t *hand) /* Output the log info */ if (hand->output) { fprintf(hand->output, "change list signature=%s\n", updater->cl_signature); - fprintf(hand->output, "change list tick number=%llu\n", updater->cl_tick_num); - fprintf(hand->output, "page offset for metadata file header in updater=%u\n", + fprintf(hand->output, "change list tick number=%" PRIu64 "\n", updater->cl_tick_num); + fprintf(hand->output, "page offset for metadata file header in updater=%" PRIu32 "\n", updater->md_file_header_ud_page_offset); - fprintf(hand->output, "length for metadata file header (bytes)=%u\n", updater->md_file_header_len); - fprintf(hand->output, "checksum for metadata file header=%u\n", updater->md_file_header_chksum); - fprintf(hand->output, "page offset for metadata file index in updater=%u\n", + fprintf(hand->output, "length for metadata file header (bytes)=%" PRIu32 "\n", + updater->md_file_header_len); + fprintf(hand->output, "checksum for metadata file header=%" PRIu32 "\n", + updater->md_file_header_chksum); + fprintf(hand->output, "page offset for metadata file index in updater=%" PRIu32 "\n", updater->md_file_index_ud_page_offset); - fprintf(hand->output, "offset for metadata file index in metadata file (bytes)=%llu\n", + fprintf(hand->output, "offset for metadata file index in metadata file (bytes)=%" PRIu64 "\n", updater->md_file_index_md_file_offset); - fprintf(hand->output, "length for metadata file index (bytes)=%u\n", updater->md_file_index_len); - fprintf(hand->output, "checksum for metadata file index=%u\n", updater->md_file_index_chksum); - fprintf(hand->output, "number of change list entries=%u\n", updater->num_cl_entries); - fprintf(hand->output, "received checksum for the change list=%u\n", updater->received_cl_checksum); - fprintf(hand->output, "calculated checksum for the change list=%u\n\n", + fprintf(hand->output, "length for metadata file index (bytes)=%" PRIu32 "\n", + updater->md_file_index_len); + fprintf(hand->output, "checksum for metadata file index=%" PRIu32 "\n", + updater->md_file_index_chksum); + fprintf(hand->output, "number of change list entries=%" PRIu32 "\n", updater->num_cl_entries); + fprintf(hand->output, "received checksum for the change list=%" PRIu32 "\n", + updater->received_cl_checksum); + fprintf(hand->output, "calculated checksum for the change list=%" PRIu32 "\n\n", updater->verified_cl_checksum); } @@ -1423,7 +1433,7 @@ get_md_file_chksums(handler_t *hand) UINT32DECODE(ptr, hand->md_file_checksums[i]); if (hand->output) - fprintf(hand->output, "\tupdater file %llu: checksum=%u\n", seq_nums[i], + fprintf(hand->output, "\tupdater file %" PRIu64 ": checksum=%" PRIu32 "\n", seq_nums[i], hand->md_file_checksums[i]); } @@ -1570,16 +1580,16 @@ main(int argc, char **argv) if (release_resources(&hand) < 0) goto error; - return 0; + return EXIT_SUCCESS; error: - return 1; + return EXIT_FAILURE; } #else /* H5_HAVE_AUX_PROCESS */ int main() { - return 0; + return EXIT_FAILURE; } #endif /* H5_HAVE_AUX_PROCESS */ |