diff options
-rw-r--r-- | CMakeInstallation.cmake | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | MANIFEST | 57 | ||||
-rw-r--r-- | Makefile.am | 22 | ||||
-rw-r--r-- | Makefile.in | 42 | ||||
-rw-r--r-- | README.txt | 2 | ||||
-rwxr-xr-x | bin/cmakehdf5 | 112 | ||||
-rwxr-xr-x | bin/release | 5 | ||||
-rw-r--r-- | c++/src/Makefile.in | 2 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 9 | ||||
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 14 | ||||
-rw-r--r-- | config/lt_vers.am | 2 | ||||
-rwxr-xr-x | configure | 32 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | fortran/src/H5Af.c | 2 | ||||
-rw-r--r-- | fortran/src/H5Aff_F03.f90 | 5 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 3 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 2 | ||||
-rw-r--r-- | fortran/test/tH5P.f90 | 2 | ||||
-rw-r--r-- | hl/c++/src/Makefile.in | 2 | ||||
-rw-r--r-- | hl/fortran/src/Makefile.in | 2 | ||||
-rw-r--r-- | hl/src/Makefile.in | 2 | ||||
-rw-r--r-- | perform/benchpar.c | 488 | ||||
-rw-r--r-- | perform/pio_timer.c | 258 | ||||
-rw-r--r-- | perform/sio_timer.c | 197 | ||||
-rw-r--r-- | perform/sio_timer.h | 78 | ||||
-rw-r--r-- | release_docs/RELEASE.txt | 13 | ||||
-rw-r--r-- | src/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/H5FD.c | 6 | ||||
-rw-r--r-- | src/H5FDcore.c | 6 | ||||
-rw-r--r-- | src/H5FDdirect.c | 6 | ||||
-rw-r--r-- | src/H5FDfamily.c | 10 | ||||
-rw-r--r-- | src/H5FDint.c | 11 | ||||
-rw-r--r-- | src/H5FDlog.c | 6 | ||||
-rw-r--r-- | src/H5FDmpio.c | 52 | ||||
-rw-r--r-- | src/H5FDmulti.c | 170 | ||||
-rw-r--r-- | src/H5FDprivate.h | 2 | ||||
-rw-r--r-- | src/H5FDpublic.h | 4 | ||||
-rw-r--r-- | src/H5FDsec2.c | 6 | ||||
-rw-r--r-- | src/H5FDstdio.c | 6 | ||||
-rw-r--r-- | src/H5Fint.c | 2 | ||||
-rw-r--r-- | src/H5Fsuper_cache.c | 55 | ||||
-rw-r--r-- | src/H5Ofill.c | 4 | ||||
-rw-r--r-- | src/H5Smpio.c | 9 | ||||
-rw-r--r-- | src/H5VLnative.c | 13 | ||||
-rw-r--r-- | src/H5public.h | 4 | ||||
-rw-r--r-- | src/Makefile.in | 2 | ||||
-rw-r--r-- | test/testmeta.c | 8 | ||||
-rw-r--r-- | testpar/t_cache.c | 4 | ||||
-rw-r--r-- | testpar/t_chunk_alloc.c | 2 | ||||
-rw-r--r-- | testpar/t_pflush2.c | 20 | ||||
-rw-r--r-- | testpar/t_shapesame.c | 6 | ||||
-rw-r--r-- | testpar/testphdf5.c | 6 | ||||
-rw-r--r-- | tools/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tools/Makefile.am | 3 | ||||
-rw-r--r-- | tools/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5dump/CMakeTestsXML.cmake | 4 | ||||
-rw-r--r-- | tools/lib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tools/lib/Makefile.am | 2 | ||||
-rw-r--r-- | tools/lib/Makefile.in | 5 | ||||
-rw-r--r-- | tools/lib/io_timer.c | 232 | ||||
-rw-r--r-- | tools/lib/io_timer.h (renamed from perform/pio_timer.h) | 27 | ||||
-rw-r--r-- | tools/perform/CMakeLists.txt (renamed from perform/CMakeLists.txt) | 38 | ||||
-rw-r--r-- | tools/perform/CMakeTests.cmake (renamed from perform/CMakeTests.cmake) | 4 | ||||
-rw-r--r-- | tools/perform/COPYING (renamed from perform/COPYING) | 0 | ||||
-rw-r--r-- | tools/perform/Makefile.am (renamed from perform/Makefile.am) | 4 | ||||
-rw-r--r-- | tools/perform/Makefile.in (renamed from perform/Makefile.in) | 18 | ||||
-rwxr-xr-x | tools/perform/build_h5perf_alone.sh (renamed from perform/build_h5perf_alone.sh) | 0 | ||||
-rwxr-xr-x | tools/perform/build_h5perf_serial_alone.sh (renamed from perform/build_h5perf_serial_alone.sh) | 0 | ||||
-rw-r--r-- | tools/perform/chunk.c (renamed from perform/chunk.c) | 0 | ||||
-rwxr-xr-x | tools/perform/gen_report.pl (renamed from perform/gen_report.pl) | 0 | ||||
-rw-r--r-- | tools/perform/iopipe.c (renamed from perform/iopipe.c) | 0 | ||||
-rw-r--r-- | tools/perform/overhead.c (renamed from perform/overhead.c) | 0 | ||||
-rw-r--r-- | tools/perform/perf.c (renamed from perform/perf.c) | 0 | ||||
-rw-r--r-- | tools/perform/perf_meta.c (renamed from perform/perf_meta.c) | 0 | ||||
-rw-r--r-- | tools/perform/pio_engine.c (renamed from perform/pio_engine.c) | 7 | ||||
-rw-r--r-- | tools/perform/pio_perf.c (renamed from perform/pio_perf.c) | 54 | ||||
-rw-r--r-- | tools/perform/pio_perf.h (renamed from perform/pio_perf.h) | 6 | ||||
-rw-r--r-- | tools/perform/pio_standalone.c (renamed from perform/pio_standalone.c) | 0 | ||||
-rw-r--r-- | tools/perform/pio_standalone.h (renamed from perform/pio_standalone.h) | 0 | ||||
-rw-r--r-- | tools/perform/sio_engine.c (renamed from perform/sio_engine.c) | 5 | ||||
-rw-r--r-- | tools/perform/sio_perf.c (renamed from perform/sio_perf.c) | 49 | ||||
-rw-r--r-- | tools/perform/sio_perf.h (renamed from perform/sio_perf.h) | 6 | ||||
-rw-r--r-- | tools/perform/sio_standalone.c (renamed from perform/sio_standalone.c) | 0 | ||||
-rw-r--r-- | tools/perform/sio_standalone.h (renamed from perform/sio_standalone.h) | 0 | ||||
-rw-r--r-- | tools/perform/zip_perf.c (renamed from perform/zip_perf.c) | 0 | ||||
-rw-r--r-- | vms/src/h5pubconf.h | 6 |
87 files changed, 827 insertions, 1447 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 651382c..095fb4b 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -4,7 +4,8 @@ include (${HDF_RESOURCES_DIR}/CMakePackageConfigHelpers.cmake) # Check for Installation Utilities #----------------------------------------------------------------------------- if (WIN32) - find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles(x86)}\\NSIS") + set (PF_ENV_EXT "(x86)") + find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS") if(NOT CPACK_WIX_ROOT) file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT) endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 6877b6a..9a8b276 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,7 @@ set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test) set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl) set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++) set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools) -set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/perform) +set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/perform) set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran) if (NOT HDF5_INSTALL_BIN_DIR) @@ -773,9 +773,6 @@ if (BUILD_TESTING) add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) add_subdirectory (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test) endif (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") - if (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") - add_subdirectory (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform) - endif (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") if (H5_HAVE_PARALLEL) if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") add_subdirectory (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar) @@ -526,34 +526,6 @@ # #------------------------------------------------------------------------------ -./perform/COPYING -./perform/Makefile.am -./perform/Makefile.in -./perform/benchpar.c -./perform/build_h5perf_alone.sh -./perform/build_h5perf_serial_alone.sh -./perform/chunk.c -./perform/gen_report.pl -./perform/iopipe.c -./perform/overhead.c -./perform/perf.c -./perform/perf_meta.c -./perform/pio_engine.c -./perform/pio_perf.c -./perform/pio_perf.h -./perform/pio_standalone.c -./perform/pio_standalone.h -./perform/pio_timer.c -./perform/pio_timer.h -./perform/sio_engine.c -./perform/sio_perf.c -./perform/sio_perf.h -./perform/sio_standalone.c -./perform/sio_standalone.h -./perform/sio_timer.c -./perform/sio_timer.h -./perform/zip_perf.c - ./release_docs/COPYING ./release_docs/HISTORY-1_0-1_8_0_rc3.txt ./release_docs/HISTORY-1_9.txt @@ -1336,6 +1308,8 @@ ./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/misc/Makefile.am ./tools/misc/Makefile.in @@ -2244,6 +2218,29 @@ ./tools/testfiles/h5mkgrp_single_p.ls ./tools/testfiles/h5mkgrp_single_l.ls +./tools/perform/COPYING +./tools/perform/Makefile.am +./tools/perform/Makefile.in +./tools/perform/build_h5perf_alone.sh +./tools/perform/build_h5perf_serial_alone.sh +./tools/perform/chunk.c +./tools/perform/gen_report.pl +./tools/perform/iopipe.c +./tools/perform/overhead.c +./tools/perform/perf.c +./tools/perform/perf_meta.c +./tools/perform/pio_engine.c +./tools/perform/pio_perf.c +./tools/perform/pio_perf.h +./tools/perform/pio_standalone.c +./tools/perform/pio_standalone.h +./tools/perform/sio_engine.c +./tools/perform/sio_perf.c +./tools/perform/sio_perf.h +./tools/perform/sio_standalone.c +./tools/perform/sio_standalone.h +./tools/perform/zip_perf.c + # high level libraries ./hl/COPYING @@ -2539,8 +2536,6 @@ ./hl/test/CMakeTests.cmake ./hl/tools/CMakeLists.txt ./hl/tools/CMakeTests.cmake -./perform/CMakeLists.txt -./perform/CMakeTests.cmake ./src/CMakeLists.txt ./test/CMakeLists.txt ./test/CMakeTests.cmake @@ -2568,3 +2563,5 @@ ./tools/lib/CMakeLists.txt ./tools/misc/CMakeLists.txt ./tools/misc/CMakeTests.cmake +./tools/perform/CMakeLists.txt +./tools/perform/CMakeTests.cmake diff --git a/Makefile.am b/Makefile.am index 640fdcb..0bef022 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,8 +73,8 @@ else endif SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \ - $(HDF5_HL_DIR) perform -DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples + $(HDF5_HL_DIR) +DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples # Some files generated during configure that should be cleaned DISTCLEANFILES=config/stamp1 config/stamp2 @@ -93,25 +93,17 @@ lib progs check-p check-s: fi; \ done -# Make all, tests, and (un)install also recurse into perform directory -all-local: - @cd perform && $(MAKE) $(AM_MAKEFLAGS) all - +# Make all, tests, and (un)install tests: - @@SETX@; for d in $(SUBDIRS) perform; do \ + @@SETX@; for d in $(SUBDIRS); do \ if test $$d != .; then \ (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ fi; \ - done - -install-exec-local: - @cd perform && $(MAKE) $(AM_MAKEFLAGS) install -uninstall-local: - @cd perform && $(MAKE) $(AM_MAKEFLAGS) uninstall + done # Check-clean also recurses into examples directory check-clean: - @@SETX@; for d in $(SUBDIRS) examples perform; do \ + @@SETX@; for d in $(SUBDIRS) examples; do \ if test $$d != .; then \ (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ fi; \ @@ -201,4 +193,4 @@ check-vfd: $(top_builddir)/config.status: # Don't include conclude.am in root Makefile; tests target needs to -# recurse into perform directory as well as reguar subdirs. +# recurse into reguar subdirs. diff --git a/Makefile.in b/Makefile.in index 05e2d73..670bbde 100644 --- a/Makefile.in +++ b/Makefile.in @@ -525,9 +525,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp @BUILD_HDF5_HL_CONDITIONAL_FALSE@HDF5_HL_DIR = @BUILD_HDF5_HL_CONDITIONAL_TRUE@HDF5_HL_DIR = hl SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \ - $(HDF5_HL_DIR) perform + $(HDF5_HL_DIR) -DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples +DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples # Some files generated during configure that should be cleaned DISTCLEANFILES = config/stamp1 config/stamp2 @@ -872,7 +872,7 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile all-local +all-am: Makefile installdirs: installdirs-recursive installdirs-am: install-exec: install-exec-recursive @@ -932,7 +932,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-exec-local +install-exec-am: install-html: install-html-recursive @@ -973,11 +973,11 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-local +uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ @@ -985,14 +985,14 @@ uninstall-am: uninstall-local distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installcheck-local installdirs installdirs-am maintainer-clean \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installcheck-local \ + installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ - tags-am uninstall uninstall-am uninstall-local + tags-am uninstall uninstall-am # List all build rules defined by HDF5 Makefiles as "PHONY" targets here. @@ -1017,25 +1017,17 @@ lib progs check-p check-s: fi; \ done -# Make all, tests, and (un)install also recurse into perform directory -all-local: - @cd perform && $(MAKE) $(AM_MAKEFLAGS) all - +# Make all, tests, and (un)install tests: - @@SETX@; for d in $(SUBDIRS) perform; do \ + @@SETX@; for d in $(SUBDIRS); do \ if test $$d != .; then \ (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ fi; \ - done - -install-exec-local: - @cd perform && $(MAKE) $(AM_MAKEFLAGS) install -uninstall-local: - @cd perform && $(MAKE) $(AM_MAKEFLAGS) uninstall + done # Check-clean also recurses into examples directory check-clean: - @@SETX@; for d in $(SUBDIRS) examples perform; do \ + @@SETX@; for d in $(SUBDIRS) examples; do \ if test $$d != .; then \ (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ fi; \ @@ -1125,7 +1117,7 @@ check-vfd: $(top_builddir)/config.status: # Don't include conclude.am in root Makefile; tests target needs to -# recurse into perform directory as well as reguar subdirs. +# recurse into reguar subdirs. # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. @@ -1,4 +1,4 @@ -HDF5 version 1.9.205 currently under development +HDF5 version 1.9.210 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index 68a550e..ec6357f 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -23,14 +23,28 @@ makelog="#${progname}_2build.log" testlog="#${progname}_3test.log" packlog="#${progname}_4pack.log" installlog="#${progname}_5install.log" -srcdir="../hdf5" # expected source directory exit_code=0 +# This command should be in the source directory's bin/ +# and should have invoked as "$srcdir/bin/$progname" or +# "bin/$progname". So, by striping bin/$program from $0, +# we can find $srcdir. +if [ $0 == bin/$progname ]; then + srcdir="." # current directory +else + # $0 is $srdir/bin/$progname + srcdir=`echo $0 | sed -e s%/bin/$progname\$%%` +fi +# Sanity check +if [ ! -r $srcdir/bin/$progname ]; then + echo "encountered error while trying to find srcdir($srdir)" + exit 1 +fi + # Cmake build options -hdf5_src=../hdf5 -cacheinit=$hdf5_src/config/cmake/cacheinit.cmake -build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=ON # C++ interface default on -build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=ON # Fortran interface default on +cacheinit=$srcdir/config/cmake/cacheinit.cmake +build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off +build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on @@ -40,12 +54,33 @@ build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on # Function definitions #============= -# Show user help page +# Show user brief help page +HELP_BRIEF() +{ +cat << EOF +Usage: $progname [options] + --help: shows details help page +EOF +} + +# Show user detail help page HELP() { - echo "Usage: $progname [--script]" - echo " --script: Use the ctest scripting method of $progname" - echo "" +cat << EOF +Usage: $progname [<options>] + where options are: + --enable-fortran | --disable-fortran: + enable or disable fortran API. Default is off. + --enable-cxx | --disable-cxx: + enable or disable c++ API. Default is off. + --enable-hl | --disable-hl: + enable or disable high level API. Default is on. + --enable-tools | --disable-tools: + enable or disable building tools. Default is on. + --enable-testing | --disable-testing: + enable or disable building tests. Default is on. + --help: shows details help page +EOF } # Display a time stamp @@ -86,8 +121,61 @@ STEP() # Show a start time stamp TIMESTAMP -# Always display the help page -HELP +# Parse Cmake configure options +# --enable-XXX or --disable-XXX will enable or disable feature XXX. +# XXX can be: +# fortran Fortran interface +# cxx C++ interface +# hl Highlevel interface +# testing Build tests +# tools Build tools +while [ $# -gt 0 ]; do + case "$1" in + --enable-fortran) + build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=ON + ;; + --disable-fortran) + build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF + ;; + --enable-cxx) + build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=ON + ;; + --disable-cxx) + build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF + ;; + --enable-hl) + build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON + ;; + --disable-hl) + build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF + ;; + --enable-tools) + build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON + ;; + --disable-tools) + build_tools=-DHDF5_BUILD_TOOLS:BOOL=OFF + ;; + --enable-testing) + build_testing=-DBUILD_TESTING:BOOL=ON + ;; + --disable-testing) + build_testing=-DBUILD_TESTING:BOOL=OFF + ;; + --help) + # print the detail help page and exit + HELP + exit 0 + ;; + *) + echo "Unknown options" + HELP + ;; + esac + shift +done + +# Always display the brief help page +HELP_BRIEF # Verify there is a valid hdf5 source directory present if [ ! -d $srcdir ]; then @@ -115,7 +203,7 @@ STEP "Configure..." "cmake \ $build_hl_lib \ $build_testing \ $build_tools \ - $hdf5_src" $configlog + $srcdir" $configlog # 5. Build the C library, tools and tests with this command: STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog diff --git a/bin/release b/bin/release index 68745ec..d771db6 100755 --- a/bin/release +++ b/bin/release @@ -40,12 +40,11 @@ USAGE() { cat << EOF -Usage: $0 [--nocheck] [-d <dir>] [-h] <methods> ... +Usage: $0 -d <dir> [-h] [--nocheck] [--private] <methods> ... -d DIR The name of the directory where the releas(es) should be placed. - + -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. diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 1a231dc..aaa8ceb 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -683,7 +683,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 # This is our main target diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index a18493c..ee03f94 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -107,15 +107,6 @@ if (WINDOWS) endif (WINDOWS) SET (H5_DEFAULT_VOL H5VL_NATIVE) -if (WINDOWS) - #----------------------------------------------------------------------------- - # These tests need to be manually SET for windows since there is currently - # something not quite correct with the actual test implementation. This affects - # the 'dt_arith' test and most likely lots of other code - # ---------------------------------------------------------------------------- - set (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "") -endif (WINDOWS) - # ---------------------------------------------------------------------- # END of WINDOWS Hard code Values # ---------------------------------------------------------------------- diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 5ebb9cd..78c8d9b 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -12,7 +12,7 @@ set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) set(CTEST_BUILD_CONFIGURATION "Release") #set(NO_MAC_FORTRAN "true") -#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON) set(CTEST_USE_TAR_SOURCE "true") @@ -68,9 +68,8 @@ if(CTEST_USE_TAR_SOURCE) ## Uncompress source if tar or zip file provided ## -------------------------- if(WIN32) - set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") - message(STATUS "extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]") - execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv) + message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) else(WIN32) message(STATUS "extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]") execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv) @@ -87,8 +86,11 @@ endif(CTEST_USE_TAR_SOURCE) ## Clear the build directory ## -------------------------- set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) -file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") # Use multiple CPU cores to build include(ProcessorCount) diff --git a/config/lt_vers.am b/config/lt_vers.am index 5719759..3fdac98 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -19,7 +19,7 @@ # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.205. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.210. # # Report bugs to <help@hdfgroup.org>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.205' -PACKAGE_STRING='HDF5 1.9.205' +PACKAGE_VERSION='1.9.210' +PACKAGE_STRING='HDF5 1.9.210' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1489,7 +1489,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.205 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.210 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1559,7 +1559,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.205:";; + short | recursive ) echo "Configuration of HDF5 1.9.210:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.205 +HDF5 configure 1.9.210 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.205, which was +It was created by HDF5 $as_me 1.9.210, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3717,7 +3717,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.205' + VERSION='1.9.210' cat >>confdefs.h <<_ACEOF @@ -4003,11 +4003,7 @@ AM_CFLAGS="${AM_CFLAGS}" AM_CXXFLAGS="${AM_CXXFLAGS}" AM_FCFLAGS="${AM_FCFLAGS}" AM_CPPFLAGS="${AM_CPPFLAGS}" -if test "x$prefix" = xNONE; then - AM_LDFLAGS="${AM_LDFLAGS} -L$ac_default_prefix/lib" -else - AM_LDFLAGS="$AM_LDFLAGS -L$prefix/lib" -fi +AM_LDFLAGS="${AM_LDFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" FCFLAGS="${FCFLAGS}" @@ -31736,7 +31732,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -HDF5 config.lt 1.9.205 +HDF5 config.lt 1.9.210 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33272,7 +33268,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh test/test_vol_plugin.sh testpar/Makefile perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh test/test_vol_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -33878,7 +33874,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.205, which was +This file was extended by HDF5 $as_me 1.9.210, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33944,7 +33940,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.205 +HDF5 config.status 1.9.210 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -34553,7 +34549,6 @@ do "test/test_plugin.sh") CONFIG_FILES="$CONFIG_FILES test/test_plugin.sh" ;; "test/test_vol_plugin.sh") CONFIG_FILES="$CONFIG_FILES test/test_vol_plugin.sh" ;; "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;; - "perform/Makefile") CONFIG_FILES="$CONFIG_FILES perform/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;; "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;; @@ -34580,6 +34575,7 @@ do "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;; "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;; "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;; + "tools/perform/Makefile") CONFIG_FILES="$CONFIG_FILES tools/perform/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;; "examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;; diff --git a/configure.ac b/configure.ac index f85c718..541c9f0 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.205], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.210], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) @@ -115,11 +115,7 @@ AM_CFLAGS="${AM_CFLAGS}" AM_CXXFLAGS="${AM_CXXFLAGS}" AM_FCFLAGS="${AM_FCFLAGS}" AM_CPPFLAGS="${AM_CPPFLAGS}" -if test "x$prefix" = xNONE; then - AM_LDFLAGS="${AM_LDFLAGS} -L$ac_default_prefix/lib" -else - AM_LDFLAGS="$AM_LDFLAGS -L$prefix/lib" -fi +AM_LDFLAGS="${AM_LDFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" FCFLAGS="${FCFLAGS}" @@ -4485,7 +4481,6 @@ AC_CONFIG_FILES([src/libhdf5.settings test/test_plugin.sh test/test_vol_plugin.sh testpar/Makefile - perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh @@ -4512,6 +4507,7 @@ AC_CONFIG_FILES([src/libhdf5.settings tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile + tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 896736d..f7121d2 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -2099,7 +2099,7 @@ done: * SOURCE */ int_f -nh5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf) +h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90 index 807f6fa..1c83320 100644 --- a/fortran/src/H5Aff_F03.f90 +++ b/fortran/src/H5Aff_F03.f90 @@ -143,12 +143,9 @@ MODULE H5A_PROVISIONAL ! to the C H5Awrite routine INTERFACE - INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) + INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') USE H5GLOBAL USE, INTRINSIC :: ISO_C_BINDING - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_F_C'::h5awrite_f_c - !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), VALUE :: buf diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 08a8f31..c05558e 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -490,7 +490,6 @@ H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f #define nh5awritec_5_c H5_FC_FUNC_(h5awritec_5_c, H5AWRITEC_5_C) #define nh5awritec_6_c H5_FC_FUNC_(h5awritec_6_c, H5AWRITEC_6_C) #define nh5awritec_7_c H5_FC_FUNC_(h5awritec_7_c, H5AWRITEC_7_C) -#define nh5awrite_f_c H5_FC_FUNC_(h5awrite_f_c, H5AWRITE_F_C) #define nh5aread_c H5_FC_FUNC_(h5aread_c, H5AREAD_C) #define nh5aread_integer_s_c H5_FC_FUNC_(h5aread_integer_s_c, H5AREAD_INTEGER_S_C) #define nh5aread_integer_1_c H5_FC_FUNC_(h5aread_integer_1_c, H5AREAD_INTEGER_1_C) @@ -586,7 +585,7 @@ H5_FCDLL int_f nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, voi H5_FCDLL int_f nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); H5_FCDLL int_f nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); H5_FCDLL int_f nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 9b02d1f..bea4a2d 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -734,7 +734,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90 index c94d564..8b48be6 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.f90 @@ -306,7 +306,7 @@ SUBROUTINE multi_file_test(cleanup, total_error) ! CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("h5pcreate_f", error, total_error) - CALL h5pset_fapl_multi_f(fapl, relax, error) + CALL h5pset_fapl_multi_f(fapl, memb_map, memb_fapl, memb_name, memb_addr, relax, error) CALL check("h5pset_fapl_multi_f", error, total_error) CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error, access_prp = fapl) CALL check("h5fopen_f", error, total_error) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 634cd16..f78f404 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -675,7 +675,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index a168458..1cacec0 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -690,7 +690,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index f29f274..424b800 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -671,7 +671,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 # This library is our main target. diff --git a/perform/benchpar.c b/perform/benchpar.c deleted file mode 100644 index b75006a..0000000 --- a/perform/benchpar.c +++ /dev/null @@ -1,488 +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 files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifdef H5_HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdlib.h> -#include <assert.h> -#include <math.h> -#include <float.h> -#include <string.h> - -#include "hdf5.h" - -/* Local macros */ -#ifdef H5_HAVE_VISUAL_STUDIO -#define HDgetlogin() Wgetlogin() -#else /* H5_HAVE_VISUAL_STUDIO */ -#define HDgetlogin() getlogin() -#endif /* H5_HAVE_VISUAL_STUDIO */ - -/* - * HDF Boolean type. - */ -#ifndef FALSE -# define FALSE 0 -#endif -#ifndef TRUE -# define TRUE 1 -#endif - -/* defines for type of VFL driver to use */ -#define FACC_DEFAULT 0 -#define FACC_MPIO 1 - -/* Defines for computing performance information */ -#define ONE_KB 1024 -#define ONE_MB (ONE_KB * ONE_KB) -#define ONE_GB (ONE_MB * ONE_KB) - -/* report 0.0 in case t is zero too */ -#define MB_PER_SEC(bytes,t) ((fabs(t)<0.0000000001) ? 0.0 : ((((double)bytes) / ONE_MB) / (t))) - -/* Control default behavior (with no command line arguments) */ -#define DEFAULT_RANK 3 -#define DEFAULT_DIM 1024 -#define DEFAULT_PREFIX "/tmp" -#define DEFAULT_USERNAME "koziol" -#define DEFAULT_FILENAME "benchpar.h5" -#define DEFAULT_SLICE 0 -#define DEFAULT_C_TYPE int -#define DEFAULT_HDF5_DATATYPE H5T_NATIVE_INT /* Keep this in sync with the DEFAULT_C_TYPE */ -#define DEFAULT_DATASET_NAME "Dataset" -#define DEFAULT_VFL_DRIVER FACC_MPIO -#define DEFAULT_PAR_MODE H5FD_MPIO_COLLECTIVE -#define DEFAULT_CHUNK_STORAGE 0 -#define DEFAULT_ITER 3 - -/* MPI info */ -int mpi_rank, mpi_size; -int mpi_namelen; -char mpi_name[MPI_MAX_PROCESSOR_NAME]; - -/* Usage information */ -static void usage(void) -{ - printf("usage: benchpar [-d <# of dims>] [-s <dim_size>] [-f <file name>] [-h]\n"); - printf(" [-S <slice dim>] [-I] [-c] [-i <# of iterations>\n"); - printf(" -c - Use chunked storage for dataset with 1-1 exact\n"); - printf(" mapping of chunks to hyperslabs\n"); - printf(" Default: off (i.e. contiguous storage)\n"); - printf(" -d <# of dims> - Number of dimensions of the dataset\n"); - printf(" Default: 3\n"); - printf(" -f <file name> - Set the name of the test file\n"); - printf(" Default: /tmp/<login>/benchpar.h5\n"); - printf(" -h - Prints usage information\n"); - printf(" -i <# of iters> - Set the number of test iterations to perform\n"); - printf(" Default: 3\n"); - printf(" -I - Use independent parallel I/O\n"); - printf(" Default: use collective parallel I/O\n"); - printf(" -s <dim_size> - Set the size of each of the dataset's dimensions\n"); - printf(" Default: 1024\n"); - printf(" -S <slice dim> - Set the dimension to slice the dataset along\n"); - printf(" Default: 0\n"); -} /* end usage() */ - -/* Create & initialize file creation property list with appropriate properties */ -static hid_t create_fcpl(void) -{ - hid_t fcpl; /* File creation property list */ - - fcpl=H5Pcreate(H5P_FILE_CREATE); - assert(fcpl>0); - - return(fcpl); -} /* end create_fcpl() */ - -/* Create & initialize file access property list with appropriate properties */ -static hid_t create_fapl(MPI_Comm comm, MPI_Info info, int acc_type ) -{ - hid_t fapl; /* File access property list */ - herr_t ret; /* Generic return value */ - - fapl = H5Pcreate (H5P_FILE_ACCESS); - assert(fapl>0); - - /* set parallel access with communicator, using MPI-I/O driver */ - if (acc_type == FACC_MPIO) { - ret = H5Pset_fapl_mpio(fapl, comm, info); - assert(ret>=0); - } /* end if */ - - return (fapl); -} /* end create_fapl() */ - -/* Create & initialize dataset creation property list with appropriate properties */ -static hid_t create_dcpl(unsigned use_chunks, int rank, hsize_t *dims) -{ - hid_t dcpl; /* Dataset creation property list */ - herr_t ret; /* Generic return value */ - - dcpl=H5Pcreate(H5P_DATASET_CREATE); - assert(dcpl>0); - - /* Check if the dataset should be chunked */ - if(use_chunks) { - ret = H5Pset_chunk(dcpl, rank, dims); - assert(ret>=0); - } /* end if */ - - return(dcpl); -} /* end create_dcpl() */ - -/* Create & initialize dataset transfer property list with appropriate properties */ -static hid_t create_dxpl(H5FD_mpio_xfer_t par_mode) -{ - hid_t dxpl; /* Dataset creation property list */ - herr_t ret; /* Generic return value */ - - dxpl=H5Pcreate(H5P_DATASET_XFER); - assert(dxpl>0); - - /* Set collective I/O on this transfer */ - ret=H5Pset_dxpl_mpio(dxpl, par_mode); - assert(ret>=0); - - return(dxpl); -} /* end create_dcpl() */ - -int main(int argc, char *argv[]) -{ - int curr_arg; /* Current command line argument being processed */ - int rank; /* Number of dimensions of the dataset */ - hsize_t dim_size; /* Dimension size of each dimension */ - hsize_t dims[H5S_MAX_RANK]; /* Pointer to array of dimensions */ - hsize_t start[H5S_MAX_RANK]; /* Pointer to array of starting locations for hyperslab selection */ - hsize_t count[H5S_MAX_RANK]; /* Pointer to array of counts for hyperslab selection */ - unsigned slice_dim; /* Dimension to slice up */ - char *file_name=NULL; /* Name of file to put data into */ - hid_t fcpl; /* HDF5 File creation property list ID */ - hid_t fapl; /* HDF5 File access property list ID */ - hid_t dcpl; /* HDF5 Dataset creation property list ID */ - hid_t dxpl; /* HDF5 Dataset transfer property list ID */ - hid_t fid; /* HDF5 file ID */ - hid_t dsid; /* HDF5 dataset ID */ - hid_t file_sid; /* HDF5 dataspace ID for dataset on disk */ - hid_t mem_sid; /* HDF5 dataspace ID for dataset in memory */ - DEFAULT_C_TYPE *buf; /* Buffer to write out */ - hsize_t buf_size; /* Size of buffer to write */ - int i; /* Local index variable */ - herr_t ret; /* Generic return value */ - double start_write_time, end_write_time, elap_write_time; /* Start, end and elapsed time to write raw data */ - double tmp_max_write_time; /* Temporary holders for maximum time for all nodes to perform raw data I/O */ - double max_write_time=-DBL_MAX, min_write_time=DBL_MAX; /* Minimum & maximum time for all nodes to perform raw data I/O */ - double start_file_time, end_file_time, elap_file_time; /* Start, end and elapsed time from file open to file close */ - double tmp_max_file_time; /* Temporary holders for maximum time for all nodes from file open to file close */ - double max_file_time=-DBL_MAX, min_file_time=DBL_MAX; /* Minimum & maximum time for all nodes from file open to file close */ - int vfl_type; /* Type of VFL driver to use */ - H5FD_mpio_xfer_t par_mode; /* Type of parallel I/O to perform */ - unsigned use_chunks; /* Whether to use chunks for dataset or not */ - unsigned num_iter; /* Number of iterations to perform */ - unsigned u; /* Local index variable */ - - /* Un-buffer the stdout and stderr */ - setbuf(stderr, NULL); - setbuf(stdout, NULL); - - /* MPI initialization */ - MPI_Init(&argc,&argv); - MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); - MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); - MPI_Get_processor_name(mpi_name,&mpi_namelen); - - /* Set some defaults */ - rank=DEFAULT_RANK; - dim_size=DEFAULT_DIM; - slice_dim=DEFAULT_SLICE; - vfl_type=DEFAULT_VFL_DRIVER; - par_mode=DEFAULT_PAR_MODE; - use_chunks=DEFAULT_CHUNK_STORAGE; - num_iter=DEFAULT_ITER; - - /* Parse command line arguments */ - if(argc>1) { - curr_arg=1; - while(curr_arg<argc) { - /* Trap any unknown command line parameters */ - if(argv[curr_arg][0]!='-') { - printf("unknown command line parameter: %s\n",argv[curr_arg]); - goto done; - } /* end if */ - - /* Skip over command line flag */ - curr_arg++; - - switch(argv[curr_arg-1][1]) { - case 'c': /* Use chunked storage for dataset */ - use_chunks=1; - break; - - case 'd': /* Change number of dimensions */ - /* Get new number of dimensions */ - rank=atoi(argv[curr_arg]); - curr_arg++; /* Skip over number of dimensions */ - - /* Sanity check */ - if(rank<=0) { - printf("rank=%d, invalid number of dimensions: %d\n",mpi_rank,rank); - goto done; - } /* end if */ - break; - - case 'f': /* Change test file name */ - /* Get new file name */ - file_name=strdup(argv[curr_arg]); - curr_arg++; /* Skip over file name from command line */ - break; - - case 'h': /* Print usage information */ - usage(); - goto done; - break; - - case 'i': /* Change number of iterations */ - /* Get new number of dimensions */ - num_iter=atoi(argv[curr_arg]); - curr_arg++; /* Skip over number of iterations */ - - /* Sanity check */ - if(num_iter<1) { - printf("rank=%d, invalid number of iterations: %u\n",mpi_rank,num_iter); - goto done; - } /* end if */ - break; - - case 'I': /* Use independent I/O for parallel I/O */ - par_mode=H5FD_MPIO_INDEPENDENT; - break; - - case 's': /* Change dimension size */ - /* Get new dimension size */ - dim_size=atoi(argv[curr_arg]); - curr_arg++; /* Skip over dimension size from command line */ - - /* Sanity check */ - if(dim_size<=0) { - printf("rank=%d, invalid dimension size: %ld\n",mpi_rank,(long)dim_size); - goto done; - } /* end if */ - break; - - case 'S': /* Change dimension to slice */ - /* Get new dimension to slice */ - slice_dim=atoi(argv[curr_arg]); - curr_arg++; /* Skip over slice dimension from command line */ - break; - - default: - printf("rank=%d, unknown command line parameter: %s\n",mpi_rank,argv[curr_arg-1]); - goto done; - } /* end switch */ - } /* end while */ - } /* end if */ - - /* Sanity check */ - if(slice_dim>=rank) { - printf("rank=%d, error, slice dim larger than rank: slice_dim=%d, rank=%d\n",mpi_rank,slice_dim,rank); - goto done; - } /* end if */ - - /* Set rest of defaults */ - if(file_name==NULL) { - char *login; /* Pointer to login name */ - - /* Get the login name for this user */ - login=HDgetlogin(); - if(login==NULL) - login=DEFAULT_USERNAME; - - /* Allocate enough room for the prefix, the login name, two '/'s, the filename and the string terminator */ - file_name=malloc(strlen(DEFAULT_PREFIX)+1+strlen(login)+1+strlen(DEFAULT_FILENAME)+1); - strcpy(file_name,DEFAULT_PREFIX); - strcat(file_name,"/"); - strcat(file_name,login); - strcat(file_name,"/"); - strcat(file_name,DEFAULT_FILENAME); - } /* end if */ - - /* Allocate memory for this process's portion of dataset */ - buf_size=sizeof(DEFAULT_C_TYPE); - for(i=0; i<rank; i++) - buf_size *= dim_size; - buf_size /= mpi_size; - - /* Sanity check for overflow */ - assert((hsize_t)((size_t)buf_size)==buf_size); - - buf=malloc((size_t)buf_size); - assert(buf); - - /* Initialize dataset portion to something unique for each process */ - memset(buf,mpi_rank,(size_t)buf_size); - - for(u=0; u<num_iter; u++) { - /* Create file creation property list */ - fcpl=create_fcpl(); - assert(fcpl>0); - - /* Create file access property list */ - fapl=create_fapl(MPI_COMM_WORLD,MPI_INFO_NULL,vfl_type); - assert(fapl>0); - - /* Get file start time */ - start_file_time = MPI_Wtime(); - - /* Create file */ - fid=H5Fcreate(file_name,H5F_ACC_TRUNC,fcpl,fapl); - assert(fid>0); - - /* Close file creation property list */ - ret=H5Pclose(fcpl); - assert(ret>=0); - - /* Close file access property list */ - ret=H5Pclose(fapl); - assert(ret>=0); - - /* Create dataspace for dataset on disk */ - for(i=0; i<rank; i++) - dims[i]=dim_size; - - file_sid=H5Screate_simple(rank,dims,NULL); - assert(file_sid>0); - - /* Create dataspace for buffer in memory */ - for(i=0; i<rank; i++) - dims[i]=dim_size; - dims[slice_dim] /= mpi_size; - - mem_sid=H5Screate_simple(rank,dims,NULL); - assert(mem_sid>0); - - /* Create dataset creation property list */ - dcpl=create_dcpl(use_chunks,rank,dims); - assert(dcpl>0); - - /* Create dataset */ - dsid = H5Dcreate2(fid, DEFAULT_DATASET_NAME, DEFAULT_HDF5_DATATYPE, file_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - assert(dsid > 0); - - /* Close dataset creation property list */ - ret=H5Pclose(dcpl); - assert(ret>=0); - - /* Select hyperslab for file dataspace */ - for(i=0; i<rank; i++) { - start[i]=0; - count[i]=dim_size; - } /* end for */ - start[slice_dim]=mpi_rank*(dim_size/mpi_size); - count[slice_dim]=dim_size/mpi_size; - - ret = H5Sselect_hyperslab(file_sid,H5S_SELECT_SET,start,NULL,count,NULL); - assert(ret>=0); - - /* Create dataset transfer property list */ - dxpl=create_dxpl(par_mode); - assert(dxpl>0); - - /* Get raw data start time */ - start_write_time = MPI_Wtime(); - - /* Write hyperslab to dataset */ - ret = H5Dwrite(dsid, DEFAULT_HDF5_DATATYPE, mem_sid, - file_sid, dxpl, buf); - assert(ret>=0); - - /* Get stop time for raw data timer */ - end_write_time = MPI_Wtime(); - - /* Close dataset transfer property list */ - ret=H5Pclose(dxpl); - assert(ret>=0); - - /* Close memory dataspace */ - ret=H5Sclose(mem_sid); - assert(ret>=0); - - /* Close file dataspace */ - ret=H5Sclose(file_sid); - assert(ret>=0); - - /* Close dataset */ - ret=H5Dclose(dsid); - assert(ret>=0); - - /* Close file */ - ret=H5Fclose(fid); - assert(ret>=0); - - /* Get stop time for file timer */ - end_file_time = MPI_Wtime(); - - /* Compute timing results */ - elap_write_time=end_write_time-start_write_time; - elap_file_time=end_file_time-start_file_time; - - /* Collect the minimum and maximum times by MPI reduces */ - MPI_Allreduce(&elap_write_time, &tmp_max_write_time, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - MPI_Allreduce(&elap_file_time, &tmp_max_file_time, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - - /* Track the fastest & slowest total runs */ - if(tmp_max_write_time>max_write_time) - max_write_time=tmp_max_write_time; - if(tmp_max_write_time<min_write_time) - min_write_time=tmp_max_write_time; - if(tmp_max_file_time>max_file_time) - max_file_time=tmp_max_file_time; - if(tmp_max_file_time<min_file_time) - min_file_time=tmp_max_file_time; - } /* end for */ - - /* Only print information from one node */ - if(mpi_rank==0) { - /* Print information about test */ - printf("File driver used: %s\n",vfl_type==FACC_MPIO ? "MPI-I/O" : "Unknown"); - printf("Type of parallel access: %s\n",par_mode==H5FD_MPIO_COLLECTIVE ? "Collective" : "Independent"); - printf("Type of dataset storage: %s\n",use_chunks ? "Chunked" : "Contiguous"); - printf("Number of processes: %d\n",mpi_size); - printf("Element size: %u\n",(unsigned)sizeof(DEFAULT_C_TYPE)); - printf("# of dimensions: %d\n",rank); - printf("Dimension size: %ld\n",(long)dim_size); - printf("Dimension sliced: %u\n",slice_dim); - printf("Number of elements: %lu\n",(unsigned long)((buf_size/sizeof(DEFAULT_C_TYPE))*mpi_size)); - printf("Total dataset size (bytes): %lu\n",(unsigned long)(buf_size*mpi_size)); - printf("Dataset size per process (bytes): %lu\n",(unsigned long)buf_size); - - /* Print timing results */ - printf("# of iterations: %u\n",num_iter); - printf("Maximum raw data write throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),min_write_time),min_write_time); - printf("Minimum raw data write throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),max_write_time),max_write_time); - printf("Maximum file throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),min_file_time),min_file_time); - printf("Minimum file throughput=%6.2f MB/s (%7.3f s)\n",MB_PER_SEC((buf_size*mpi_size),max_file_time),max_file_time); - } /* end if */ - -done: - /* Free buffers allocated */ - if(file_name) - free(file_name); - if(buf) - free(buf); - - /* MPI termination */ - MPI_Finalize(); - return(0); -} /* end main() */ diff --git a/perform/pio_timer.c b/perform/pio_timer.c deleted file mode 100644 index aba219e..0000000 --- a/perform/pio_timer.c +++ /dev/null @@ -1,258 +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 files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * Purpose: - * - * This is a module of useful timing functions for performance testing. - */ - -#include <stdio.h> -#include <stdlib.h> - -#include "hdf5.h" - -#ifdef H5_HAVE_PARALLEL - -#include <mpi.h> - -#include "pio_perf.h" - -/* - * The number to divide the tv_usec field with to get a nice decimal to add to - * the number of seconds. - */ -#define MICROSECOND 1000000.0 - -/* global variables */ -pio_time *timer_g; /* timer: global for stub functions */ - -/* - * Function: sub_time - * Purpose: Struct two time values, and return the difference, in microseconds - * - * Note that the function assumes that a > b - * Programmer: Leon Arber, 1/27/06 - */ -static double sub_time(struct timeval* a, struct timeval* b) -{ - return (((double)a->tv_sec + - ((double)a->tv_usec) / MICROSECOND) - - ((double)b->tv_sec + - ((double)b->tv_usec) / MICROSECOND)); -} - - -/* - * Function: pio_time_new - * Purpose: Build us a brand, spankin', new performance time object. - * The object is a black box to the user. They just tell us - * what type of timer they want (MPI_TIMER for MPI_Wtime or - * SYS_TIMER for system time). - * Return: Pointer to pio_time object - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -pio_time * -pio_time_new(clock_type type) -{ - pio_time *pt = (pio_time *)calloc(1, sizeof(struct pio_time_)); - - /* set global timer variable */ - timer_g = pt; - - pt->type = type; - return pt; -} - -/* - * Function: pio_time_destroy - * Purpose: Remove the memory allocated for the pio_time object. Only - * need to call on a pointer allocated with the ``pio_time_new'' - * function. - * Return: Nothing - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -void -pio_time_destroy(pio_time *pt) -{ - HDfree(pt); - /* reset the global timer pointer too. */ - timer_g = NULL; -} - -/* - * Function: set_timer_type - * Purpose: Set the type of the timer to either MPI_TIMER or SYS_TIMER. - * This really only needs to be called if you didn't construct a - * timer with the pio_timer_new function (shame!). - * Return: Nothing - * Programmer: Bill Wendling, 04. October 2001 - * Modifications: - */ -void -set_timer_type(pio_time *pt, clock_type type) -{ - pt->type = type; -} - -/* - * Function: get_timer_type - * Purpose: Get the type of the timer. - * Return: MPI_TIMER or SYS_TIMER. - * Programmer: Bill Wendling, 04. October 2001 - * Modifications: - */ -clock_type -get_timer_type(pio_time *pt) -{ - return pt->type; -} - -/* - * Function: set_time - * Purpose: Set the time in a ``pio_time'' object. - * Return: Pointer to the passed in ``pio_time'' object. - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -pio_time * -set_time(pio_time *pt, timer_type t, int start_stop) -{ - if (pt) { - if (pt->type == MPI_TIMER) { - if (start_stop == TSTART) { - pt->mpi_timer[t] = MPI_Wtime(); - - /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS - * we compute the time it took to only open the file */ - if(t == HDF5_FINE_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_WRITE_FIXED_DIMS]; - else if(t == HDF5_FINE_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_READ_FIXED_DIMS]; - - } else { - pt->total_time[t] += MPI_Wtime() - pt->mpi_timer[t]; - pt->mpi_timer[t] = MPI_Wtime(); - - /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS - * we compute the time it took to close the file after the last read/write finished */ - if(t == HDF5_GROSS_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_WRITE_FIXED_DIMS]; - else if(t == HDF5_GROSS_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS]; - } - } else { - if (start_stop == TSTART) { - HDgettimeofday(&pt->sys_timer[t], NULL); - - /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS - * we compute the time it took to only open the file */ - if(t == HDF5_FINE_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS])); - else if(t == HDF5_FINE_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS])); - - - } else { - struct timeval sys_t; - - HDgettimeofday(&sys_t, NULL); - pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t])); - -/* ((double)sys_t.tv_sec + - ((double)sys_t.tv_usec) / MICROSECOND) - - ((double)pt->sys_timer[t].tv_sec + - ((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/ - - /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS - * we compute the time it took to close the file after the last read/write finished */ - if(t == HDF5_GROSS_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS])); - else if(t == HDF5_GROSS_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS])); - - } - } - - if (pio_debug_level >= 4) { - const char *msg; - int myrank; - - MPI_Comm_rank(pio_comm_g, &myrank); - - switch (t) { - case HDF5_FILE_OPENCLOSE: - msg = "File Open/Close"; - break; - case HDF5_DATASET_CREATE: - msg = "Dataset Create"; - break; - case HDF5_MPI_WRITE: - msg = "MPI Write"; - break; - case HDF5_MPI_READ: - msg = "MPI Read"; - break; - case HDF5_FINE_WRITE_FIXED_DIMS: - msg = "Fine Write"; - break; - case HDF5_FINE_READ_FIXED_DIMS: - msg = "Fine Read"; - break; - case HDF5_GROSS_WRITE_FIXED_DIMS: - msg = "Gross Write"; - break; - case HDF5_GROSS_READ_FIXED_DIMS: - msg = "Gross Read"; - break; - case HDF5_RAW_WRITE_FIXED_DIMS: - msg = "Raw Write"; - break; - case HDF5_RAW_READ_FIXED_DIMS: - msg = "Raw Read"; - break; - default: - msg = "Unknown Timer"; - break; - } - - fprintf(output, " Proc %d: %s %s: %.2f\n", myrank, msg, - (start_stop == TSTART ? "Start" : "Stop"), - pt->total_time[t]); - } - } - - return pt; -} - -/* - * Function: get_time - * Purpose: Get the time from a ``pio_time'' object. - * Return: The number of seconds as a DOUBLE. - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -double -get_time(pio_time *pt, timer_type t) -{ - return pt->total_time[t]; -} - -#endif /* H5_HAVE_PARALLEL */ -#ifdef STANDALONE -#include "pio_standalone.c" -#endif diff --git a/perform/sio_timer.c b/perform/sio_timer.c deleted file mode 100644 index 4e42ee6..0000000 --- a/perform/sio_timer.c +++ /dev/null @@ -1,197 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * Purpose: - * - * This is a module of useful timing functions for performance testing. - */ - -#include <stdio.h> -#include <stdlib.h> - -#include "sio_timer.h" - - -#include "sio_perf.h" - -/* - * The number to divide the tv_usec field with to get a nice decimal to add to - * the number of seconds. - */ -#define MICROSECOND 1000000.0 - -/* global variables */ -sio_time *timer_g; /* timer: global for stub functions */ - -/* - * Function: sub_time - * Purpose: Struct two time values, and return the difference, in microseconds - * - * Note that the function assumes that a > b - * Programmer: Leon Arber, 1/27/06 - */ -static double sub_time(struct timeval* a, struct timeval* b) -{ - return (((double)a->tv_sec + - ((double)a->tv_usec) / MICROSECOND) - - ((double)b->tv_sec + - ((double)b->tv_usec) / MICROSECOND)); -} - - -/* - * Function: sio_time_new - * Purpose: Build us a brand, spankin', new performance time object. - * The object is a black box to the user. - * Return: Pointer to sio_time object - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -sio_time * -sio_time_new(void) -{ - sio_time *pt = (sio_time *)calloc(1, sizeof(struct sio_time_)); - - /* set global timer variable */ - timer_g = pt; - - return pt; -} - -/* - * Function: sio_time_destroy - * Purpose: Remove the memory allocated for the sio_time object. Only - * need to call on a pointer allocated with the ``sio_time_new'' - * function. - * Return: Nothing - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -void -sio_time_destroy(sio_time *pt) -{ - HDfree(pt); - /* reset the global timer pointer too. */ - timer_g = NULL; -} - - - -/* - * Function: set_time - * Purpose: Set the time in a ``sio_time'' object. - * Return: Pointer to the passed in ``sio_time'' object. - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -sio_time * -set_time(sio_time *pt, timer_type t, int start_stop) -{ - if (pt) { - if (start_stop == TSTART) { - HDgettimeofday(&pt->sys_timer[t], NULL); - - /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS - * we compute the time it took to only open the file */ - if(t == HDF5_FINE_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS])); - else if(t == HDF5_FINE_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS])); - - - } else { - struct timeval sys_t; - - HDgettimeofday(&sys_t, NULL); - pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t])); - -/* ((double)sys_t.tv_sec + - ((double)sys_t.tv_usec) / MICROSECOND) - - ((double)pt->sys_timer[t].tv_sec + - ((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/ - - /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS - * we compute the time it took to close the file after the last read/write finished */ - if(t == HDF5_GROSS_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS])); - else if(t == HDF5_GROSS_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS])); - - } - - if (sio_debug_level >= 4) { - const char *msg; - - switch (t) { - case HDF5_FILE_OPENCLOSE: - msg = "File Open/Close"; - break; - case HDF5_DATASET_CREATE: - msg = "Dataset Create"; - break; - case HDF5_MPI_WRITE: - msg = "MPI Write"; - break; - case HDF5_MPI_READ: - msg = "MPI Read"; - break; - case HDF5_FINE_WRITE_FIXED_DIMS: - msg = "Fine Write"; - break; - case HDF5_FINE_READ_FIXED_DIMS: - msg = "Fine Read"; - break; - case HDF5_GROSS_WRITE_FIXED_DIMS: - msg = "Gross Write"; - break; - case HDF5_GROSS_READ_FIXED_DIMS: - msg = "Gross Read"; - break; - case HDF5_RAW_WRITE_FIXED_DIMS: - msg = "Raw Write"; - break; - case HDF5_RAW_READ_FIXED_DIMS: - msg = "Raw Read"; - break; - default: - msg = "Unknown Timer"; - break; - } - - fprintf(output, " %s %s: %.2f\n", msg, - (start_stop == TSTART ? "Start" : "Stop"), - pt->total_time[t]); - } - } - - return pt; -} - -/* - * Function: get_time - * Purpose: Get the time from a ``sio_time'' object. - * Return: The number of seconds as a DOUBLE. - * Programmer: Bill Wendling, 01. October 2001 - * Modifications: - */ -double -get_time(sio_time *pt, timer_type t) -{ - return pt->total_time[t]; -} -#ifdef STANDALONE -#include "sio_standalone.c" -#endif - diff --git a/perform/sio_timer.h b/perform/sio_timer.h deleted file mode 100644 index 46702c3..0000000 --- a/perform/sio_timer.h +++ /dev/null @@ -1,78 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef SIO_TIMER__ -#define SIO_TIMER__ - -#include "hdf5.h" - -#if defined(H5_TIME_WITH_SYS_TIME) -# include <sys/time.h> -# include <time.h> -#elif defined(H5_HAVE_SYS_TIME_H) -# include <sys/time.h> -#else -# include <time.h> -#endif - -#ifdef H5_HAVE_WINSOCK2_H -# include <winsock2.h> -#endif /* H5_HAVE_WINSOCK2_H */ - -/* The different types of timers we can have */ -typedef enum timer_type_ { - HDF5_FILE_OPENCLOSE, - HDF5_DATASET_CREATE, - HDF5_MPI_WRITE, - HDF5_MPI_READ, - HDF5_FILE_READ_OPEN, - HDF5_FILE_READ_CLOSE, - HDF5_FILE_WRITE_OPEN, - HDF5_FILE_WRITE_CLOSE, - HDF5_FINE_WRITE_FIXED_DIMS, - HDF5_FINE_READ_FIXED_DIMS, - HDF5_GROSS_WRITE_FIXED_DIMS, - HDF5_GROSS_READ_FIXED_DIMS, - HDF5_RAW_WRITE_FIXED_DIMS, - HDF5_RAW_READ_FIXED_DIMS, - NUM_TIMERS -} timer_type; - - -/* Miscellaneous identifiers */ -enum { - TSTART, /* Start a specified timer */ - TSTOP /* Stop a specified timer */ -}; - -/* The performance time structure */ -typedef struct sio_time_ { - double total_time[NUM_TIMERS]; - struct timeval sys_timer[NUM_TIMERS]; -} sio_time; - -/* External function declarations */ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -extern sio_time *sio_time_new(void); -extern void sio_time_destroy(sio_time *pt); -extern void set_timer_type(sio_time *pt); -extern sio_time *set_time(sio_time *pt, timer_type t, int start_stop); -extern double get_time(sio_time *pt, timer_type t); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* SIO_TIMER__ */ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 779b810..cbfefc7 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.205 currently under development +HDF5 version 1.9.210 currently under development ================================================================================ @@ -41,6 +41,9 @@ New Features Configuration: ------------- + - cmakehdf5: configure options added to enable or disable the building of + different API's and testings. See "cmakehdf5 --help" for details. + (AKC - 2014/12/09 HDFFV-8932) - Autotools: Automake updated to 1.14.1 (ADB - 2014/04/08) - CMake: Moved minimum CMake version to 2.8.11 which enables better library include processing. (ADB - 2014/03/26) @@ -431,6 +434,14 @@ Bug Fixes since HDF5-1.8.0 release Library ------- + - Incorrect usage of list in CMake COMPILE_DEFINITIONS set_property + + The CMake command, set_property with COMPILE_DEFINITIONS property + needs a quoted semi-colon separated list of values. CMake will + transform the list to a series of -D{value} for the compile. + + (ADB - 2014/12/09, HDFV-9041) + - H5Z.c: H5Zfilter_avail(H5Z_filter_t id) Added else block if the call to the internal H5Z_filter_avail(id) does not fail and returns FALSE. This block calls the H5PL_load(H5PL_TYPE_FILTER, (int)id) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c1df07b..6a54319 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -896,10 +896,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF) if (HDF5_ENABLE_DEBUG_APIS) set_target_properties (${HDF5_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS - "-DH5Z_DEBUG -DH5VM_DEBUG -DH5T_DEBUG - -DH5S_DEBUG -DH5P_DEBUG -DH5O_DEBUG -DH5MM_DEBUG -DH5MF_DEBUG - -DH5I_DEBUG -DH5HL_DEBUG -DH5HG_DEBUG -DH5G_DEBUG -DH5F_DEBUG - -DH5E_DEBUG -DH5D_DEBUG -DH5B_DEBUG -DH5AC_DEBUG -UNDEBUG" + "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG" ) endif (HDF5_ENABLE_DEBUG_APIS) @@ -1521,19 +1521,19 @@ done: *------------------------------------------------------------------------- */ haddr_t -H5FDget_eof(H5FD_t *file) +H5FDget_eof(H5FD_t *file, H5FD_mem_t type) { haddr_t ret_value; FUNC_ENTER_API(HADDR_UNDEF) - H5TRACE1("a", "*x", file); + H5TRACE2("a", "*xMt", file, type); /* Check arguments */ if(!file || !file->cls) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer") /* The real work */ - if(HADDR_UNDEF == (ret_value = H5FD_get_eof(file))) + if(HADDR_UNDEF == (ret_value = H5FD_get_eof(file, type))) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed") /* (Note compensating for base address subtraction in internal routine) */ diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 7d643d7..d26b04f 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -138,7 +138,7 @@ static int H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static herr_t H5FD_core_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -static haddr_t H5FD_core_get_eof(const H5FD_t *_file); +static haddr_t H5FD_core_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); @@ -1126,13 +1126,13 @@ done: *------------------------------------------------------------------------- */ static haddr_t -H5FD_core_get_eof(const H5FD_t *_file) +H5FD_core_get_eof(const H5FD_t *_file, H5FD_mem_t UNUSED type) { const H5FD_core_t *file = (const H5FD_core_t*)_file; FUNC_ENTER_NOAPI_NOINIT_NOERR - FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa)) + FUNC_LEAVE_NOAPI(file->eof) } diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 0c68315..7f313f9 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -137,7 +137,7 @@ static int H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static herr_t H5FD_direct_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -static haddr_t H5FD_direct_get_eof(const H5FD_t *_file); +static haddr_t H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); @@ -810,13 +810,13 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr) *------------------------------------------------------------------------- */ static haddr_t -H5FD_direct_get_eof(const H5FD_t *_file) +H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t UNUSED type) { const H5FD_direct_t *file = (const H5FD_direct_t*)_file; FUNC_ENTER_NOAPI_NOINIT - FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa)) + FUNC_LEAVE_NOAPI(file->eof) } diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 9f8696f..d4e6f3d 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -99,7 +99,7 @@ static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa); -static haddr_t H5FD_family_get_eof(const H5FD_t *_file); +static haddr_t H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *_buf/*out*/); @@ -751,7 +751,7 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, * smaller than the size specified through H5Pset_fapl_family(). Update the actual * member size. */ - if ((eof=H5FDget_eof(file->memb[0]))) file->memb_size = eof; + if ((eof=H5FDget_eof(file->memb[0], H5FD_MEM_DEFAULT))) file->memb_size = eof; ret_value=(H5FD_t *)file; @@ -1041,7 +1041,7 @@ done: *------------------------------------------------------------------------- */ static haddr_t -H5FD_family_get_eof(const H5FD_t *_file) +H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type) { const H5FD_family_t *file = (const H5FD_family_t*)_file; haddr_t eof=0; @@ -1057,7 +1057,7 @@ H5FD_family_get_eof(const H5FD_t *_file) */ HDassert(file->nmembs > 0); for(i = (int)file->nmembs - 1; i >= 0; --i) { - if((eof = H5FD_get_eof(file->memb[i])) != 0) + if((eof = H5FD_get_eof(file->memb[i], type)) != 0) break; if(0 == i) break; @@ -1073,7 +1073,7 @@ H5FD_family_get_eof(const H5FD_t *_file) eof += ((unsigned)i)*file->memb_size; /* Set return value */ - ret_value = MAX(eof, file->eoa); + ret_value = eof; FUNC_LEAVE_NOAPI(ret_value) } diff --git a/src/H5FDint.c b/src/H5FDint.c index 9f02a25..4f3c234 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -120,7 +120,7 @@ H5FD_int_init_interface(void) herr_t H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr) { - haddr_t addr, eoa; + haddr_t addr, eoa, eof; uint8_t buf[H5F_SIGNATURE_LEN]; unsigned n, maxpow; herr_t ret_value = SUCCEED; /* Return value */ @@ -128,7 +128,10 @@ H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_add FUNC_ENTER_NOAPI_NOINIT /* Find the least N such that 2^N is larger than the file size */ - if(HADDR_UNDEF == (addr = H5FD_get_eof(file)) || HADDR_UNDEF == (eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER))) + eof = H5FD_get_eof(file, H5FD_MEM_SUPER); + eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER); + addr = MAX(eof, eoa); + if(HADDR_UNDEF == addr) HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to obtain EOF/EOA value") for(maxpow = 0; addr; maxpow++) addr >>= 1; @@ -348,7 +351,7 @@ done: *------------------------------------------------------------------------- */ haddr_t -H5FD_get_eof(const H5FD_t *file) +H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type) { haddr_t ret_value; @@ -358,7 +361,7 @@ H5FD_get_eof(const H5FD_t *file) /* Dispatch to driver */ if(file->cls->get_eof) { - if(HADDR_UNDEF == (ret_value = (file->cls->get_eof)(file))) + if(HADDR_UNDEF == (ret_value = (file->cls->get_eof)(file, type))) HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "driver get_eof request failed") } /* end if */ else diff --git a/src/H5FDlog.c b/src/H5FDlog.c index b35dcf3..8701826 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -177,7 +177,7 @@ static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); static haddr_t H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -static haddr_t H5FD_log_get_eof(const H5FD_t *_file); +static haddr_t H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); @@ -1061,13 +1061,13 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr) *------------------------------------------------------------------------- */ static haddr_t -H5FD_log_get_eof(const H5FD_t *_file) +H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t UNUSED type) { const H5FD_log_t *file = (const H5FD_log_t *)_file; FUNC_ENTER_NOAPI_NOINIT_NOERR - FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa)) + FUNC_LEAVE_NOAPI(file->eof) } /* end H5FD_log_get_eof() */ diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 73237b7..70cf49a 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -69,6 +69,7 @@ typedef struct H5FD_mpio_t { haddr_t eof; /*end-of-file marker */ haddr_t eoa; /*end-of-address marker */ haddr_t last_eoa; /* Last known end-of-address marker */ + haddr_t local_eof; /* Local end-of-file address for each process */ } H5FD_mpio_t; /* Private Prototypes */ @@ -84,7 +85,7 @@ static herr_t H5FD_mpio_close(H5FD_t *_file); static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -static haddr_t H5FD_mpio_get_eof(const H5FD_t *_file); +static haddr_t H5FD_mpio_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_mpio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf); @@ -1107,6 +1108,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, /* Set the size of the file (from library's perspective) */ file->eof = H5FD_mpi_MPIOff_to_haddr(size); + file->local_eof = file->eof; /* Set return value */ ret_value=(H5FD_t*)file; @@ -1331,7 +1333,7 @@ H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr) *------------------------------------------------------------------------- */ static haddr_t -H5FD_mpio_get_eof(const H5FD_t *_file) +H5FD_mpio_get_eof(const H5FD_t *_file, H5FD_mem_t UNUSED type) { const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file; @@ -1454,10 +1456,16 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add int mpi_code; /* mpi return code */ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */ int size_i; /* Integer copy of 'size' to read */ +#if MPI_VERSION >= 3 MPI_Count bytes_read; /* Number of bytes read in */ - int n; MPI_Count type_size; /* MPI datatype used for I/O's size */ MPI_Count io_size; /* Actual number of bytes requested */ +#else + int bytes_read; /* Number of bytes read in */ + int type_size; /* MPI datatype used for I/O's size */ + int io_size; /* Actual number of bytes requested */ +#endif + int n; H5P_genplist_t *plist = NULL; /* Property list pointer */ hbool_t use_view_this_time = FALSE; herr_t ret_value = SUCCEED; @@ -1574,11 +1582,19 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add } /* How many bytes were actually read? */ - if (MPI_SUCCESS != (mpi_code=MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_read))) +#if MPI_VERSION >= 3 + if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_read))) +#else + if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read))) +#endif HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code) /* Get the type's size */ - if (MPI_SUCCESS != (mpi_code=MPI_Type_size_x(buf_type,&type_size))) +#if MPI_VERSION >= 3 + if (MPI_SUCCESS != (mpi_code = MPI_Type_size_x(buf_type, &type_size))) +#else + if (MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size))) +#endif HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code) /* Compute the actual number of bytes requested */ @@ -1734,10 +1750,16 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, MPI_Status mpi_stat; /* Status from I/O operation */ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */ int mpi_code; /* MPI return code */ +#if MPI_VERSION >= 3 MPI_Count bytes_written; - int size_i; MPI_Count type_size; /* MPI datatype used for I/O's size */ MPI_Count io_size; /* Actual number of bytes requested */ +#else + int bytes_written; + int type_size; /* MPI datatype used for I/O's size */ + int io_size; /* Actual number of bytes requested */ +#endif + int size_i; hbool_t use_view_this_time = FALSE; H5P_genplist_t *plist = NULL; /* Property list pointer */ herr_t ret_value = SUCCEED; @@ -1864,11 +1886,19 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, } /* How many bytes were actually written? */ +#if MPI_VERSION >= 3 if(MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_written))) +#else + if(MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written))) +#endif HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code) /* Get the type's size */ +#if MPI_VERSION >= 3 if(MPI_SUCCESS != (mpi_code = MPI_Type_size_x(buf_type, &type_size))) +#else + if(MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size))) +#endif HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code) /* Compute the actual number of bytes requested */ @@ -1878,9 +1908,17 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, if(bytes_written != io_size) HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") - /* Forget the EOF value (see H5FD_mpio_get_eof()) --rpm 1999-08-06 */ + /* Each process will keep track of its perceived EOF value locally, and + * ultimately we will reduce this value to the maximum amongst all + * processes, but until then keep the actual eof at HADDR_UNDEF just in + * case something bad happens before that point. (rather have a value + * we know is wrong sitting around rather than one that could only + * potentially be wrong.) */ file->eof = HADDR_UNDEF; + if(bytes_written && ((bytes_written + addr) > file->local_eof)) + file->local_eof = addr + bytes_written; + done: #ifdef H5FDmpio_DEBUG if(H5FD_mpio_Debug[(int)'t']) diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 38097c8..b1f094c 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -43,10 +43,6 @@ */ #define H5FD_MULTI_DEBUG -/* Our version of MAX */ -#undef MAX -#define MAX(X,Y) ((X)>(Y)?(X):(Y)) - #ifndef FALSE #define FALSE 0 #endif @@ -135,7 +131,7 @@ static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags); static herr_t H5FD_multi_get_type_map(const H5FD_t *file, H5FD_mem_t *type_map); static haddr_t H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa); -static haddr_t H5FD_multi_get_eof(const H5FD_t *_file); +static haddr_t H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, @@ -196,8 +192,6 @@ static const H5FD_class_t H5FD_multi_g = { * Programmer: Robb Matzke * Friday, August 13, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static char * @@ -230,8 +224,6 @@ my_strdup(const char *s) * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ hid_t @@ -283,14 +275,6 @@ H5FD_multi_term(void) * Programmer: Robb Matzke * Wednesday, August 11, 1999 * - * Modifications: - * Albert Cheng, Sep 17, 2001 - * Added feature that if the raw or meta extension string contains - * a "%s", it will be substituted by the filename given for H5Fopen - * or H5Fcreate. This is same as the multi-file syntax. If no %s - * is found, one is inserted at the beginning. This is the previous - * behavior. - * *------------------------------------------------------------------------- */ herr_t @@ -440,11 +424,6 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * - * Raymond Lu, 2001-10-25 - * Use new generic property list for argument checking. - * *------------------------------------------------------------------------- */ herr_t @@ -547,11 +526,6 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * - * Raymond Lu, 2001-10-25 - * Use new generic property list for argument checking. - * *------------------------------------------------------------------------- */ herr_t @@ -616,8 +590,6 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/, * Programmer: Robb Matzke * Monday, August 16, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static hsize_t @@ -669,8 +641,6 @@ H5FD_multi_sb_size(H5FD_t *_file) * Programmer: Robb Matzke * Monday, August 16, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -908,8 +878,6 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) * Programmer: Robb Matzke * Friday, August 13, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static void * @@ -936,8 +904,6 @@ H5FD_multi_fapl_get(H5FD_t *_file) * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static void * @@ -992,8 +958,6 @@ H5FD_multi_fapl_copy(const void *_old_fa) * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1032,8 +996,6 @@ H5FD_multi_fapl_free(void *_fa) * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static H5FD_t * @@ -1132,8 +1094,6 @@ error: * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1197,8 +1157,6 @@ H5FD_multi_close(H5FD_t *_file) * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -1240,8 +1198,6 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2) * Programmer: Quincey Koziol * Tuesday, September 26, 2000 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1315,7 +1271,6 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) { const H5FD_multi_t *file = (const H5FD_multi_t*)_file; haddr_t eoa = 0; - haddr_t memb_eoa = 0; static const char *func="H5FD_multi_get_eoa"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1329,21 +1284,25 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) */ if(H5FD_MEM_DEFAULT == type) { UNIQUE_MEMBERS(file->fa.memb_map, mt) { + haddr_t memb_eoa; + if (file->memb[mt]) { /* Retrieve EOA */ H5E_BEGIN_TRY { memb_eoa = H5FDget_eoa(file->memb[mt], mt); } H5E_END_TRY; - if (HADDR_UNDEF==memb_eoa) + if(HADDR_UNDEF == memb_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF) - } else if (file->fa.relax) { + if(memb_eoa>0) + memb_eoa += file->fa.memb_addr[mt]; + } else if(file->fa.relax) { /* * The member is not open yet (maybe it doesn't exist). Make the * best guess about the end-of-file. */ memb_eoa = file->memb_next[mt]; - assert(HADDR_UNDEF!=memb_eoa); + assert(HADDR_UNDEF != memb_eoa); } else { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) } @@ -1353,23 +1312,26 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) } END_MEMBERS; } else { H5FD_mem_t mmt = file->fa.memb_map[type]; - if (H5FD_MEM_DEFAULT==mmt) mmt = type; - if (file->memb[mmt]) { + if(H5FD_MEM_DEFAULT==mmt) + mmt = type; + + if(file->memb[mmt]) { H5E_BEGIN_TRY { eoa = H5FDget_eoa(file->memb[mmt], mmt); } H5E_END_TRY; - if (HADDR_UNDEF==eoa) + if(HADDR_UNDEF == eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF) - if (eoa>0) eoa += file->fa.memb_addr[mmt]; - } else if (file->fa.relax) { + if(eoa > 0) + eoa += file->fa.memb_addr[mmt]; + } else if(file->fa.relax) { /* * The member is not open yet (maybe it doesn't exist). Make the * best guess about the end-of-file. */ eoa = file->memb_next[mmt]; - assert(HADDR_UNDEF!=eoa); + assert(HADDR_UNDEF != eoa); } else { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) } @@ -1461,63 +1423,73 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) * Programmer: Robb Matzke * Wednesday, August 4, 1999 * - * Modifications: - * Raymond Lu - * 5 January 2007 - * Multi driver no longer has EOA for the whole file. Calculate - * it in the same way as EOF instead. - * *------------------------------------------------------------------------- */ static haddr_t -H5FD_multi_get_eof(const H5FD_t *_file) +H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) { const H5FD_multi_t *file = (const H5FD_multi_t*)_file; - haddr_t eof=0, tmp_eof; - haddr_t eoa=0, tmp_eoa; + haddr_t eof = 0; static const char *func="H5FD_multi_get_eof"; /* Function Name for error reporting */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); - UNIQUE_MEMBERS(file->fa.memb_map, mt) { - if (file->memb[mt]) { - /* Retrieve EOF */ - H5E_BEGIN_TRY { - tmp_eof = H5FDget_eof(file->memb[mt]); - } H5E_END_TRY; + if(H5FD_MEM_DEFAULT == type) { + UNIQUE_MEMBERS(file->fa.memb_map, mt) { + haddr_t tmp_eof; + + if(file->memb[mt]) { + /* Retrieve EOF */ + H5E_BEGIN_TRY { + tmp_eof = H5FDget_eof(file->memb[mt], type); + } H5E_END_TRY; + + if(HADDR_UNDEF == tmp_eof) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF) + if(tmp_eof > 0) + tmp_eof += file->fa.memb_addr[mt]; + } else if(file->fa.relax) { + /* + * The member is not open yet (maybe it doesn't exist). Make the + * best guess about the end-of-file. + */ + tmp_eof = file->memb_next[mt]; + assert(HADDR_UNDEF != tmp_eof); + } else { + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) + } + if(tmp_eof > eof) + eof = tmp_eof; + } END_MEMBERS; + } else { + H5FD_mem_t mmt = file->fa.memb_map[type]; - if (HADDR_UNDEF==tmp_eof) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF) - if (tmp_eof>0) tmp_eof += file->fa.memb_addr[mt]; + if(H5FD_MEM_DEFAULT == mmt) + mmt = type; - /* Retrieve EOA */ - H5E_BEGIN_TRY { - tmp_eoa = H5FDget_eoa(file->memb[mt], mt); - } H5E_END_TRY; + if(file->memb[mmt]) { + /* Retrieve EOF */ + H5E_BEGIN_TRY { + eof = H5FDget_eof(file->memb[mmt], mmt); + } H5E_END_TRY; - if (HADDR_UNDEF==tmp_eoa) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF) - if (tmp_eoa>0) tmp_eoa += file->fa.memb_addr[mt]; - } else if (file->fa.relax) { + if(HADDR_UNDEF == eof) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF) + if(eof > 0) + eof += file->fa.memb_addr[mmt]; + } else if(file->fa.relax) { /* * The member is not open yet (maybe it doesn't exist). Make the * best guess about the end-of-file. */ - tmp_eof = file->memb_next[mt]; - assert(HADDR_UNDEF!=tmp_eof); - - tmp_eoa = file->memb_next[mt]; - assert(HADDR_UNDEF!=tmp_eoa); - } else { + eof = file->memb_next[mmt]; + assert(HADDR_UNDEF != eof); + } else { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) - } - - if (tmp_eof>eof) eof = tmp_eof; - if (tmp_eoa>eoa) eoa = tmp_eoa; - } END_MEMBERS; - - return MAX(eoa, eof); + } + } + return eof; } @@ -1531,8 +1503,6 @@ H5FD_multi_get_eof(const H5FD_t *_file) * Programmer: Raymond Lu * Sept. 16, 2002 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1566,8 +1536,6 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle) * Programmer: Robb Matzke * Thursday, August 12, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static haddr_t @@ -1615,8 +1583,6 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) * Programmer: Robb Matzke * Thursday, August 12, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1867,8 +1833,6 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) * Programmer: Robb Matzke * Monday, August 23, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -1910,8 +1874,6 @@ compute_next(H5FD_multi_t *file) * Programmer: Robb Matzke * Monday, August 23, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ static int diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index 33332d7..7c2a564 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -130,7 +130,7 @@ H5_DLL htri_t H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, haddr_t blk_end, hsize_t extra_requested); H5_DLL haddr_t H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type); H5_DLL herr_t H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr); -H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file); +H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type); H5_DLL haddr_t H5FD_get_maxaddr(const H5FD_t *file); H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags); H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map); diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index ed50bc7..87edf50 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -267,7 +267,7 @@ typedef struct H5FD_class_t { haddr_t addr, hsize_t size); haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type); herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr); - haddr_t (*get_eof)(const H5FD_t *file); + haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type); herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle); herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer); @@ -348,7 +348,7 @@ H5_DLL herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size); H5_DLL haddr_t H5FDget_eoa(H5FD_t *file, H5FD_mem_t type); H5_DLL herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa); -H5_DLL haddr_t H5FDget_eof(H5FD_t *file); +H5_DLL haddr_t H5FDget_eof(H5FD_t *file, H5FD_mem_t type); H5_DLL herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle); H5_DLL herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf/*out*/); diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 4f7c3d8..99ea9b7 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -135,7 +135,7 @@ static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file); +static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); @@ -621,13 +621,13 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr) *------------------------------------------------------------------------- */ static haddr_t -H5FD_sec2_get_eof(const H5FD_t *_file) +H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t UNUSED type) { const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; FUNC_ENTER_NOAPI_NOINIT_NOERR - FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa)) + FUNC_LEAVE_NOAPI(file->eof) } /* end H5FD_sec2_get_eof() */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 64919ed..c02e96d 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -185,7 +185,7 @@ static herr_t H5FD_stdio_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); static haddr_t H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -static haddr_t H5FD_stdio_get_eof(const H5FD_t *_file); +static haddr_t H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_stdio_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); @@ -719,14 +719,14 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, haddr_t addr) *------------------------------------------------------------------------- */ static haddr_t -H5FD_stdio_get_eof(const H5FD_t *_file) +H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type) { const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); - return MAX(file->eof, file->eoa); + return(file->eof); } /* end H5FD_stdio_get_eof() */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 48c0cc6..c25668d 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1090,7 +1090,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, * Read or write the file superblock, depending on whether the file is * empty or not. */ - if(0 == H5FD_get_eof(lf) && (flags & H5F_ACC_RDWR)) { + if(0 == (MAX(H5FD_get_eof(lf, H5FD_MEM_SUPER), H5FD_get_eoa(lf, H5FD_MEM_SUPER))) && (flags & H5F_ACC_RDWR)) { /* * We've just opened a fresh new file (or truncated one). We need * to create & write the superblock. diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index 45fad37..f3931cb 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -120,8 +120,8 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) H5P_genplist_t *c_plist; /* File creation property list */ H5F_file_t *shared; /* shared part of `file' */ H5FD_t *lf; /* file driver part of `shared' */ - haddr_t stored_eoa; /*relative end-of-addr in file */ - haddr_t eof; /*end of file address */ + haddr_t stored_eof; /* stored end-of-file address in file */ + haddr_t eof; /* end of file address */ uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */ uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */ const size_t fixed_size = H5F_SUPERBLOCK_FIXED_SIZE; /*fixed sizeof superblock */ @@ -288,7 +288,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) /* Remainder of "variable-sized" portion of superblock */ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr/*out*/); H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &stored_eoa/*out*/); + H5F_addr_decode(f, (const uint8_t **)&p, &stored_eof/*out*/); H5F_addr_decode(f, (const uint8_t **)&p, &sblock->driver_addr/*out*/); /* Allocate space for the root group symbol table entry */ @@ -310,10 +310,10 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) if(!H5F_addr_eq(base_addr, sblock->base_addr)) { /* Check if the superblock moved earlier in the file */ if(H5F_addr_lt(base_addr, sblock->base_addr)) - stored_eoa -= (sblock->base_addr - base_addr); + stored_eof -= (sblock->base_addr - base_addr); else /* The superblock moved later in the file */ - stored_eoa += (base_addr - sblock->base_addr); + stored_eof += (base_addr - sblock->base_addr); /* Adjust base address for offsets of the HDF5 data in the file */ sblock->base_addr = base_addr; @@ -420,7 +420,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) /* Base, superblock extension, end of file & root group object header addresses */ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr/*out*/); H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &stored_eoa/*out*/); + H5F_addr_decode(f, (const uint8_t **)&p, &stored_eof/*out*/); H5F_addr_decode(f, (const uint8_t **)&p, &sblock->root_addr/*out*/); /* Compute checksum for superblock */ @@ -440,10 +440,10 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) if(!H5F_addr_eq(base_addr, sblock->base_addr)) { /* Check if the superblock moved earlier in the file */ if(H5F_addr_lt(base_addr, sblock->base_addr)) - stored_eoa -= (sblock->base_addr - base_addr); + stored_eof -= (sblock->base_addr - base_addr); else /* The superblock moved later in the file */ - stored_eoa += (base_addr - sblock->base_addr); + stored_eof += (base_addr - sblock->base_addr); /* Adjust base address for offsets of the HDF5 data in the file */ sblock->base_addr = base_addr; @@ -475,19 +475,21 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) * possible is if the first file of a family of files was opened * individually. */ - if(HADDR_UNDEF == (eof = H5FD_get_eof(lf))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to determine file size") + if(HADDR_UNDEF == (eof = H5FD_get_eof(lf, H5FD_MEM_DEFAULT))) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to determine file size") - /* (Account for the stored EOA being absolute offset -QAK) */ - if((eof + sblock->base_addr) < stored_eoa) - HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eoa = %llu", (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)stored_eoa) + /* (Account for the stored EOF being absolute offset -QAK) */ + if((eof + sblock->base_addr) < stored_eof) + HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, + "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eof = %llu", + (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)stored_eof) /* * Tell the file driver how much address space has already been * allocated so that it knows how to allocate additional memory. */ /* (Account for the stored EOA being absolute offset -NAF) */ - if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eoa - sblock->base_addr) < 0) + if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eof - sblock->base_addr) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to set end-of-address marker for file") /* Read the file's superblock extension, if there is one. */ @@ -506,7 +508,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) /* Check for superblock extension being located "outside" the stored * 'eoa' value, which can occur with the split/multi VFD. */ - if(H5F_addr_gt(sblock->ext_addr, stored_eoa)) { + if(H5F_addr_gt(sblock->ext_addr, stored_eof)) { /* Set the 'eoa' for the object header memory type large enough * to give some room for a reasonably sized superblock extension. * (This is _rather_ a kludge -QAK) @@ -663,7 +665,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, H5P_genplist_t *dxpl; /* DXPL object */ uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE + H5F_MAX_DRVINFOBLOCK_SIZE]; /* Superblock & driver info blockencoding buffer */ uint8_t *p; /* Ptr into encoding buffer */ - haddr_t rel_eoa; /* Relative EOA for file */ + haddr_t rel_eof; /* Relative EOF for file */ size_t superblock_size; /* Size of superblock, in bytes */ size_t driver_size; /* Size of driver info block (bytes)*/ @@ -703,8 +705,15 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, /* Encode the address of global free-space index */ H5F_addr_encode(f, &p, sblock->ext_addr); - rel_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER); - H5F_addr_encode(f, &p, (rel_eoa + sblock->base_addr)); + + /* Encode the end-of-file address. Note that at this point in time, + * the EOF value itself may not be reflective of the file's size, as + * we will eventually truncate the file to match the EOA value. As + * such, use the EOA value in its place, knowing that the current EOF + * value will ultimately match it. */ + if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + H5F_addr_encode(f, &p, (rel_eof + sblock->base_addr)); /* Encode the driver informaton block address */ H5F_addr_encode(f, &p, sblock->driver_addr); @@ -763,8 +772,14 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, /* Encode the address of the superblock extension */ H5F_addr_encode(f, &p, sblock->ext_addr); - rel_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER); - H5F_addr_encode(f, &p, (rel_eoa + sblock->base_addr)); + /* At this point in time, the EOF value itself may + * not be reflective of the file's size, since we'll eventually + * truncate it to match the EOA value. As such, use the EOA value + * in its place, knowing that the current EOF value will + * ultimately match it. */ + if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + H5F_addr_encode(f, &p, rel_eof + sblock->base_addr); /* Retrieve information for root group */ if(NULL == (root_oloc = H5G_oloc(f->shared->root_grp))) diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 1e8ccb1..a0fc42e 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -890,7 +890,7 @@ H5O_fill_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_fill, FILE *s else fprintf(stream, "<dataset type>\n"); - FUNC_LEAVE_NOAPI(SUCCEED); + FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_fill_debug() */ @@ -993,7 +993,7 @@ done: if(bkg) H5MM_xfree(bkg); - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_convert() */ diff --git a/src/H5Smpio.c b/src/H5Smpio.c index 9a1b5a6..def7598 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -168,18 +168,23 @@ H5S_mpio_create_point_datatype (size_t elmt_size, hsize_t num_points, if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) elmt_type_created = TRUE; - + +#if MPI_VERSION >= 3 + /* Create an MPI datatype for the whole point selection */ + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block((int)num_points, 1, disp, elmt_type, new_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code) +#else /* Allocate block sizes for MPI datatype call */ if(NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * num_points))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") - /* Would be nice to have Create_Hindexed_block to avoid this array of all ones */ for(u = 0; u < num_points; u++) blocks[u] = 1; /* Create an MPI datatype for the whole point selection */ if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)num_points, blocks, disp, elmt_type, new_type))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code) +#endif /* Commit MPI datatype for later use */ if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type))) diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 61abedb..0d164a8 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -2017,17 +2017,24 @@ H5VL_native_file_optional(void *obj, hid_t dxpl_id, void UNUSED **req, va_list a case H5VL_FILE_GET_SIZE: { haddr_t eof; /* End of file address */ + haddr_t eoa; /* End of allocation address */ + haddr_t max_eof_eoa; /* Maximum of the EOA & EOF */ haddr_t base_addr; /* Base address for the file */ hsize_t *ret = va_arg (arguments, hsize_t *); f = (H5F_t *)obj; + /* Go get the actual file size */ - if(HADDR_UNDEF == (eof = H5FD_get_eof(f->shared->lf))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + eof = H5FD_get_eof(f->shared->lf, H5FD_MEM_DEFAULT); + eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT); + max_eof_eoa = MAX(eof, eoa); + if(HADDR_UNDEF == max_eof_eoa) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file get eof/eoa requests failed") base_addr = H5FD_get_base_addr(f->shared->lf); if(ret) - *ret = (hsize_t)(eof + base_addr); /* Convert relative base address for file to absolute address */ + *ret = (hsize_t)(max_eof_eoa + base_addr); /* Convert relative base address for file to absolute address */ + break; } /* H5Fget_file_image */ diff --git a/src/H5public.h b/src/H5public.h index 67adce5..1ccf361 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 205 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 210 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.205" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.210" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index b5aa806..59f72cd 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -734,7 +734,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 195 +LT_VERS_REVISION = 200 LT_VERS_AGE = 0 # Our main target, the HDF5 library diff --git a/test/testmeta.c b/test/testmeta.c index a008cc7..e1d12e6 100644 --- a/test/testmeta.c +++ b/test/testmeta.c @@ -105,9 +105,11 @@ int main(void) for(j=0; j<NDATAOBJECTS; j++) { - printf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS); - fflush(stdout); - + /* Removed print statement as it would lock system resources on Windows */ + /* + * printf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS); + * fflush(stdout); + */ floatval = (float)j; /* Create group to hold data arrays for this object */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index c56abe9..cffe832 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -5717,7 +5717,6 @@ smoke_check_3(int metadata_write_strategy) { const char * fcn_name = "smoke_check_3()"; hbool_t success = TRUE; - hbool_t verbose = FALSE; int cp = 0; int i; int max_nerrors; @@ -6402,7 +6401,6 @@ smoke_check_5(int metadata_write_strategy) { const char * fcn_name = "smoke_check_5()"; hbool_t success = TRUE; - hbool_t verbose = FALSE; int cp = 0; int i; int max_nerrors; @@ -7126,7 +7124,7 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0){ - printf("Failed to turn off atexit processing. Continue.\n", mpi_rank); + printf("Failed to turn off atexit processing. Continue.\n"); }; H5open(); diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index bc233c7..05fd2fc 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -106,7 +106,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_ VRFY((memspace >= 0), ""); /* Create a new file. If file exists its contents will be overwritten. */ - file_id = H5Fcreate(h5_rmprefix(filename), H5F_ACC_TRUNC, H5P_DEFAULT, + file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); VRFY((file_id >= 0), "H5Fcreate"); diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index a570d4c..743a3d3 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -133,9 +133,7 @@ error: int main(int argc, char* argv[]) { - hid_t fapl1, fapl2; H5E_auto2_t func; - char name[1024]; const char *envval = NULL; @@ -147,13 +145,6 @@ main(int argc, char* argv[]) MPI_Comm_size(comm, &mpi_size); MPI_Comm_rank(comm, &mpi_rank); - fapl1 = H5Pcreate(H5P_FILE_ACCESS); - H5Pset_fapl_mpio(fapl1, comm, info); - - fapl2 = H5Pcreate(H5P_FILE_ACCESS); - H5Pset_fapl_mpio(fapl2, comm, info); - - if(mpi_rank == 0) TESTING("H5Fflush (part2 with flush)"); @@ -162,6 +153,14 @@ main(int argc, char* argv[]) if (envval == NULL) envval = "nomatch"; if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split")) { + hid_t fapl1, fapl2; + + fapl1 = H5Pcreate(H5P_FILE_ACCESS); + H5Pset_fapl_mpio(fapl1, comm, info); + + fapl2 = H5Pcreate(H5P_FILE_ACCESS); + H5Pset_fapl_mpio(fapl2, comm, info); + /* Check the case where the file was flushed */ h5_fixname(FILENAME[0], fapl1, name, sizeof name); if(check_file(name, fapl1)) @@ -213,6 +212,3 @@ main(int argc, char* argv[]) return 1; } - - - diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index f96c669..d167687 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -5037,9 +5037,11 @@ int main(int argc, char **argv) { int mpi_size, mpi_rank; /* mpi variables */ +#ifndef H5_HAVE_WIN32_API /* Un-buffer the stdout and stderr */ - setbuf(stderr, NULL); - setbuf(stdout, NULL); + HDsetbuf(stderr, NULL); + HDsetbuf(stdout, NULL); +#endif MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index c55e2de..c3da73f 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -307,9 +307,11 @@ int main(int argc, char **argv) H5Ptest_param_t io_mode_confusion_params; H5Ptest_param_t rr_obj_flush_confusion_params; +#ifndef H5_HAVE_WIN32_API /* Un-buffer the stdout and stderr */ - setbuf(stderr, NULL); - setbuf(stdout, NULL); + HDsetbuf(stderr, NULL); + HDsetbuf(stdout, NULL); +#endif MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a9a8c49..2365326 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -44,3 +44,6 @@ add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5stat) #-- Add the h5dump and test executables add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5dump) + +#-- Add the perform and test executables +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/perform) diff --git a/tools/Makefile.am b/tools/Makefile.am index 76b32d2..095cc30 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -24,6 +24,7 @@ include $(top_srcdir)/config/commence.am CONFIG=ordered # All subdirectories -SUBDIRS=lib h5diff h5ls h5dump misc h5import h5repack h5jam h5copy h5stat +SUBDIRS=lib h5diff h5ls h5dump misc h5import h5repack h5jam h5copy h5stat \ + perform include $(top_srcdir)/config/conclude.am diff --git a/tools/Makefile.in b/tools/Makefile.in index 0b0e2d0..c4bf941 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -667,7 +667,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog CONFIG = ordered # All subdirectories -SUBDIRS = lib h5diff h5ls h5dump misc h5import h5repack h5jam h5copy h5stat +SUBDIRS = lib h5diff h5ls h5dump misc h5import h5repack h5jam h5copy h5stat \ + perform + # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake index 0d4e0f4..a939d78 100644 --- a/tools/h5dump/CMakeTestsXML.cmake +++ b/tools/h5dump/CMakeTestsXML.cmake @@ -414,9 +414,9 @@ # The lone colon here confuses some systems (Cray X1). Skip # it if configure detects that this is a problem. set (TESTTYPE "TEST") - if (NOT "H5_LONE_COLON") + if (NOT ${H5_LONE_COLON}) set (TESTTYPE "SKIP") - endif (NOT "H5_LONE_COLON") + endif (NOT ${H5_LONE_COLON}) ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5) ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index e65673a..3dba919 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -24,6 +24,7 @@ set (H5_TOOLS_LIB_SRCS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_type.c ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_utils.c ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.c + ${HDF5_TOOLS_LIB_SOURCE_DIR}/io_timer.c ) set (H5_TOOLS_LIB_HDRS diff --git a/tools/lib/Makefile.am b/tools/lib/Makefile.am index 9050aac..e8fc6a1 100644 --- a/tools/lib/Makefile.am +++ b/tools/lib/Makefile.am @@ -28,7 +28,7 @@ noinst_LTLIBRARIES=libh5tools.la libh5tools_la_SOURCES=h5tools.c h5tools_dump.c h5tools_str.c h5tools_utils.c h5diff.c \ h5diff_array.c h5diff_attr.c h5diff_dset.c h5diff_util.c h5trav.c \ - h5tools_filters.c h5tools_ref.c h5tools_type.c + h5tools_filters.c h5tools_ref.c h5tools_type.c io_timer.c # Test program. Link using libhdf5 and libh5tools TEST_PROG= diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 210b6b3..b2afb07 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -115,7 +115,7 @@ libh5tools_la_LIBADD = am_libh5tools_la_OBJECTS = h5tools.lo h5tools_dump.lo h5tools_str.lo \ h5tools_utils.lo h5diff.lo h5diff_array.lo h5diff_attr.lo \ h5diff_dset.lo h5diff_util.lo h5trav.lo h5tools_filters.lo \ - h5tools_ref.lo h5tools_type.lo + h5tools_ref.lo h5tools_type.lo io_timer.lo libh5tools_la_OBJECTS = $(am_libh5tools_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -666,7 +666,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog noinst_LTLIBRARIES = libh5tools.la libh5tools_la_SOURCES = h5tools.c h5tools_dump.c h5tools_str.c h5tools_utils.c h5diff.c \ h5diff_array.c h5diff_attr.c h5diff_dset.c h5diff_util.c h5trav.c \ - h5tools_filters.c h5tools_ref.c h5tools_type.c + h5tools_filters.c h5tools_ref.c h5tools_type.c io_timer.c # Test program. Link using libhdf5 and libh5tools @@ -773,6 +773,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tools_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tools_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5trav.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io_timer.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c new file mode 100644 index 0000000..78e7fe9 --- /dev/null +++ b/tools/lib/io_timer.c @@ -0,0 +1,232 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* changes: + * rename pio_timer.c as io_timer.c; + * Removed pio_perf.h so that it is not dependant on it; + * Removed set_timer_type() and get_timer_type() since no one calls them; + * Merged sio_timer.c into io_timer.c; + */ + +/* + * Purpose: + * + * This is a module of useful timing functions for performance testing. + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "H5private.h" +#include "hdf5.h" + +#ifdef H5_HAVE_PARALLEL +#include <mpi.h> +#endif + +#include "io_timer.h" + +/* + * The number to divide the tv_usec field with to get a nice decimal to add to + * the number of seconds. + */ +#define MICROSECOND 1000000.0 + +/* global variables */ +io_time_t *timer_g; /* timer: global for stub functions */ + +/* + * Function: sub_time + * Purpose: Struct two time values, and return the difference, in microseconds + * + * Note that the function assumes that a > b + * Programmer: Leon Arber, 1/27/06 + */ +static double sub_time(struct timeval* a, struct timeval* b) +{ + return (((double)a->tv_sec + + ((double)a->tv_usec) / MICROSECOND) - + ((double)b->tv_sec + + ((double)b->tv_usec) / MICROSECOND)); +} + + +/* + * Function: io_time_new + * Purpose: Build us a brand, spankin', new performance time object. + * The object is a black box to the user. They just tell us + * what type of timer they want (MPI_CLOCK for MPI_Wtime or + * SYS_CLOCK for system time). + * Return: Pointer to io_time object + * Programmer: Bill Wendling, 01. October 2001 + * Modifications: + */ +io_time_t * +io_time_new(clock_type type) +{ + io_time_t *pt = (io_time_t *)HDcalloc(1, sizeof(struct io_time_t)); + + /* set global timer variable */ + timer_g = pt; + + pt->type = type; + return pt; +} + +/* + * Function: io_time_destroy + * Purpose: Remove the memory allocated for the io_time object. Only + * need to call on a pointer allocated with the ``io_time_new'' + * function. + * Return: Nothing + * Programmer: Bill Wendling, 01. October 2001 + * Modifications: + */ +void +io_time_destroy(io_time_t *pt) +{ + HDfree(pt); + /* reset the global timer pointer too. */ + timer_g = NULL; +} + +#if 0 +/* no one is calling set_timer_type or get_timer_type ???*/ +/* + * Function: set_timer_type + * Purpose: Set the type of the timer to either MPI_CLOCK or SYS_CLOCK. + * This really only needs to be called if you didn't construct a + * timer with the pio_timer_new function (shame!). + * Return: Nothing + * Programmer: Bill Wendling, 04. October 2001 + * Modifications: + */ +void +set_timer_type(io_time_t *pt, clock_type type) +{ + pt->type = type; +} + +/* + * Function: get_timer_type + * Purpose: Get the type of the timer. + * Return: MPI_CLOCK or SYS_CLOCK. + * Programmer: Bill Wendling, 04. October 2001 + * Modifications: + */ +clock_type +get_timer_type(io_time_t *pt) +{ + return pt->type; +} +#endif + +/* + * Function: set_time + * Purpose: Set the time in a ``io_time_t'' object. + * Return: Pointer to the passed in ``io_time_t'' object if SUCCEED; Null otherwise. + * Programmer: Bill Wendling, 01. October 2001 + * Modifications: + */ +io_time_t * +set_time(io_time_t *pt, timer_type t, int start_stop) +{ + /* sanity check */ + assert(pt); + + switch(pt->type){ +#ifdef H5_HAVE_PARALLEL + case MPI_CLOCK: + if (start_stop == TSTART) { + pt->mpi_timer[t] = MPI_Wtime(); + + /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS + * we compute the time it took to only open the file */ + if(t == HDF5_FINE_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_WRITE_FIXED_DIMS]; + else if(t == HDF5_FINE_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_READ_FIXED_DIMS]; + + } else { + pt->total_time[t] += MPI_Wtime() - pt->mpi_timer[t]; + pt->mpi_timer[t] = MPI_Wtime(); + + /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS + * we compute the time it took to close the file after the last read/write finished */ + if(t == HDF5_GROSS_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_WRITE_FIXED_DIMS]; + else if(t == HDF5_GROSS_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS]; + } + break; +#endif /* H5_HAVE_PARALLEL */ + case SYS_CLOCK: + if (start_stop == TSTART) { + HDgettimeofday(&pt->sys_timer[t], NULL); + + /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS + * we compute the time it took to only open the file */ + if(t == HDF5_FINE_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS])); + else if(t == HDF5_FINE_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS])); + + + } else { + struct timeval sys_t; + + HDgettimeofday(&sys_t, NULL); + pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t])); + + /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS + * we compute the time it took to close the file after the last read/write finished */ + if(t == HDF5_GROSS_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS])); + else if(t == HDF5_GROSS_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS])); + + } + break; + default: + HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type); + return (NULL); + break; + } + +#if 0 + /* this does not belong here. Need fix in h5perf code when set_time() is called. -AKC- */ + debug_start_stop_time(pt, t, start_stop); +#endif + + return pt; +} + +/* + * Function: get_time + * Purpose: Get the time from a ``io_time_t'' object. + * Return: The number of seconds as a DOUBLE. + * Programmer: Bill Wendling, 01. October 2001 + * Modifications: + */ +double +get_time(io_time_t *pt, timer_type t) +{ + return pt->total_time[t]; +} + +#if 0 +/* standalone is not working yet. Need fix later. -AKC- */ +#ifdef STANDALONE +#include "pio_standalone.c" +#endif +#endif diff --git a/perform/pio_timer.h b/tools/lib/io_timer.h index a5ee6d7..4ce0733 100644 --- a/perform/pio_timer.h +++ b/tools/lib/io_timer.h @@ -13,8 +13,8 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef PIO_TIMER__ -#define PIO_TIMER__ +#ifndef IO_TIMER__ +#define IO_TIMER__ #include "hdf5.h" @@ -27,6 +27,9 @@ # include <time.h> #endif +#ifdef H5_HAVE_WINSOCK2_H +# include <winsock2.h> +#endif /* H5_HAVE_WINSOCK2_H */ /* The different types of timers we can have */ typedef enum timer_type_ { HDF5_FILE_OPENCLOSE, @@ -47,8 +50,8 @@ typedef enum timer_type_ { } timer_type; typedef enum clock_type_ { - MPI_TIMER = 0, /* Use MPI timer to measure time */ - SYS_TIMER = 1 /* Use system clock to measure time */ + SYS_CLOCK = 0, /* Use system clock to measure time */ + MPI_CLOCK = 1 /* Use MPI clock to measure time */ } clock_type; /* Miscellaneous identifiers */ @@ -58,25 +61,23 @@ enum { }; /* The performance time structure */ -typedef struct pio_time_ { +typedef struct io_time_t { clock_type type; double total_time[NUM_TIMERS]; double mpi_timer[NUM_TIMERS]; struct timeval sys_timer[NUM_TIMERS]; -} pio_time; +} io_time_t; /* External function declarations */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -extern pio_time *pio_time_new(clock_type t); -extern void pio_time_destroy(pio_time *pt); -extern void set_timer_type(pio_time *pt, clock_type type); -extern clock_type get_timer_type(pio_time *pt); -extern pio_time *set_time(pio_time *pt, timer_type t, int start_stop); -extern double get_time(pio_time *pt, timer_type t); +H5TOOLS_DLL io_time_t *io_time_new(clock_type t); +H5TOOLS_DLL void io_time_destroy(io_time_t *pt); +H5TOOLS_DLL io_time_t *set_time(io_time_t *pt, timer_type t, int start_stop); +H5TOOLS_DLL double get_time(io_time_t *pt, timer_type t); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* PIO_TIMER__ */ +#endif /* IO_TIMER__ */ diff --git a/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt index 6887c60..0713661 100644 --- a/perform/CMakeLists.txt +++ b/tools/perform/CMakeLists.txt @@ -17,7 +17,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) # -------------------------------------------------------------------- #-- Adding test for h5perf_serial set (h5perf_serial_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c ${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) @@ -30,7 +29,6 @@ set_target_properties (h5perf_serial PROPERTIES FOLDER perform) if (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for h5perf_serial_alone set (h5perf_serial_alone_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c ${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) @@ -74,15 +72,17 @@ TARGET_C_PROPERTIES (overhead " " " ") target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) +if (BUILD_TESTING) #-- Adding test for perf_meta -set (perf_meta_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c -) -add_executable (perf_meta ${perf_meta_SRCS}) -TARGET_NAMING (perf_meta ${LIB_TYPE}) -TARGET_C_PROPERTIES (perf_meta " " " ") -target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (perf_meta PROPERTIES FOLDER perform) + set (perf_meta_SRCS + ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c + ) + add_executable (perf_meta ${perf_meta_SRCS}) + TARGET_NAMING (perf_meta ${LIB_TYPE}) + TARGET_C_PROPERTIES (perf_meta " " " ") + target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + set_target_properties (perf_meta PROPERTIES FOLDER perform) +endif (BUILD_TESTING) #-- Adding test for zip_perf set (zip_perf_SRCS @@ -94,10 +94,9 @@ TARGET_C_PROPERTIES (zip_perf " " " ") target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) -if (H5_HAVE_PARALLEL) +if (H5_HAVE_PARALLEL AND BUILD_TESTING) #-- Adding test for h5perf set (h5perf_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/pio_timer.c ${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) @@ -110,7 +109,6 @@ if (H5_HAVE_PARALLEL) if (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for h5perf set (h5perf_alone_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/pio_timer.c ${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) @@ -123,18 +121,6 @@ if (H5_HAVE_PARALLEL) target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) endif (HDF5_BUILD_PERFORM_STANDALONE) - - if (HDF5_BUILD_PARALLEL_ALL) - #-- Adding test for benchpar - set (benchpar_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/benchpar.c - ) - add_executable (benchpar ${benchpar_SRCS}) - TARGET_NAMING (benchpar ${LIB_TYPE}) - TARGET_C_PROPERTIES (benchpar " " " ") - target_link_libraries (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - set_target_properties (benchpar PROPERTIES FOLDER perform) - endif (HDF5_BUILD_PARALLEL_ALL) -endif (H5_HAVE_PARALLEL) +endif (H5_HAVE_PARALLEL AND BUILD_TESTING) include (CMakeTests.cmake) diff --git a/perform/CMakeTests.cmake b/tools/perform/CMakeTests.cmake index 74055d5..6927124 100644 --- a/perform/CMakeTests.cmake +++ b/tools/perform/CMakeTests.cmake @@ -55,8 +55,4 @@ if (H5_HAVE_PARALLEL) if (HDF5_BUILD_PERFORM_STANDALONE) add_test (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>) endif (HDF5_BUILD_PERFORM_STANDALONE) - - if (HDF5_BUILD_PARALLEL_ALL) - add_test (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>) - endif (HDF5_BUILD_PARALLEL_ALL) endif (H5_HAVE_PARALLEL) diff --git a/perform/COPYING b/tools/perform/COPYING index 6903daf..6903daf 100644 --- a/perform/COPYING +++ b/tools/perform/COPYING diff --git a/perform/Makefile.am b/tools/perform/Makefile.am index 59c598a..1af0e7f 100644 --- a/perform/Makefile.am +++ b/tools/perform/Makefile.am @@ -59,8 +59,8 @@ TEST_PROG = iopipe chunk overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_P # "make clean" and some systems, e.g., AIX, do not like it. check_PROGRAMS= iopipe chunk overhead zip_perf perf_meta $(BUILD_ALL_PROGS) perf -h5perf_SOURCES=pio_perf.c pio_engine.c pio_timer.c -h5perf_serial_SOURCES=sio_perf.c sio_engine.c sio_timer.c +h5perf_SOURCES=pio_perf.c pio_engine.c +h5perf_serial_SOURCES=sio_perf.c sio_engine.c # These are the files that `make clean' (and derivatives) will remove from # this directory. diff --git a/perform/Makefile.in b/tools/perform/Makefile.in index 8db63de..24aa8be 100644 --- a/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -109,7 +109,7 @@ check_PROGRAMS = iopipe$(EXEEXT) chunk$(EXEEXT) overhead$(EXEEXT) \ zip_perf$(EXEEXT) perf_meta$(EXEEXT) $(am__EXEEXT_2) \ perf$(EXEEXT) TESTS = $(am__EXEEXT_3) -subdir = perform +subdir = tools/perform ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -130,15 +130,13 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -am_h5perf_OBJECTS = pio_perf.$(OBJEXT) pio_engine.$(OBJEXT) \ - pio_timer.$(OBJEXT) +am_h5perf_OBJECTS = pio_perf.$(OBJEXT) pio_engine.$(OBJEXT) h5perf_OBJECTS = $(am_h5perf_OBJECTS) h5perf_DEPENDENCIES = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) h5perf_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(h5perf_LDFLAGS) $(LDFLAGS) -o $@ -am_h5perf_serial_OBJECTS = sio_perf.$(OBJEXT) sio_engine.$(OBJEXT) \ - sio_timer.$(OBJEXT) +am_h5perf_serial_OBJECTS = sio_perf.$(OBJEXT) sio_engine.$(OBJEXT) h5perf_serial_OBJECTS = $(am_h5perf_serial_OBJECTS) h5perf_serial_DEPENDENCIES = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) h5perf_serial_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -723,8 +721,8 @@ h5perf_serial_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) @BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_PROG_PARA = h5perf perf # Serial test programs. TEST_PROG = iopipe chunk overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_PROGS) -h5perf_SOURCES = pio_perf.c pio_engine.c pio_timer.c -h5perf_serial_SOURCES = sio_perf.c sio_engine.c sio_timer.c +h5perf_SOURCES = pio_perf.c pio_engine.c +h5perf_serial_SOURCES = sio_perf.c sio_engine.c # These are the files that `make clean' (and derivatives) will remove from # this directory. @@ -772,9 +770,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign perform/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/perform/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign perform/Makefile + $(AUTOMAKE) --foreign tools/perform/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -898,10 +896,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_meta.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_engine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_perf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_timer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio_engine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio_perf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio_timer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zip_perf.Po@am__quote@ .c.o: diff --git a/perform/build_h5perf_alone.sh b/tools/perform/build_h5perf_alone.sh index b65e863..b65e863 100755 --- a/perform/build_h5perf_alone.sh +++ b/tools/perform/build_h5perf_alone.sh diff --git a/perform/build_h5perf_serial_alone.sh b/tools/perform/build_h5perf_serial_alone.sh index 2566609..2566609 100755 --- a/perform/build_h5perf_serial_alone.sh +++ b/tools/perform/build_h5perf_serial_alone.sh diff --git a/perform/chunk.c b/tools/perform/chunk.c index a3c11c1..a3c11c1 100644 --- a/perform/chunk.c +++ b/tools/perform/chunk.c diff --git a/perform/gen_report.pl b/tools/perform/gen_report.pl index 285f5d7..285f5d7 100755 --- a/perform/gen_report.pl +++ b/tools/perform/gen_report.pl diff --git a/perform/iopipe.c b/tools/perform/iopipe.c index 85063fa..85063fa 100644 --- a/perform/iopipe.c +++ b/tools/perform/iopipe.c diff --git a/perform/overhead.c b/tools/perform/overhead.c index 9341e64..9341e64 100644 --- a/perform/overhead.c +++ b/tools/perform/overhead.c diff --git a/perform/perf.c b/tools/perform/perf.c index 7d329f0..7d329f0 100644 --- a/perform/perf.c +++ b/tools/perform/perf.c diff --git a/perform/perf_meta.c b/tools/perform/perf_meta.c index b52871e..b52871e 100644 --- a/perform/perf_meta.c +++ b/tools/perform/perf_meta.c diff --git a/perform/pio_engine.c b/tools/perform/pio_engine.c index 3535fb4..96cfcc2 100644 --- a/perform/pio_engine.c +++ b/tools/perform/pio_engine.c @@ -38,7 +38,6 @@ #endif /* !MPI_FILE_NULL */ #include "pio_perf.h" -#include "pio_timer.h" /* Macro definitions */ @@ -174,15 +173,15 @@ do_pio(parameters param) switch (iot) { case MPIO: fd.mpifd = MPI_FILE_NULL; - res.timers = pio_time_new(MPI_TIMER); + res.timers = io_time_new(MPI_CLOCK); break; case POSIXIO: fd.posixfd = -1; - res.timers = pio_time_new(MPI_TIMER); + res.timers = io_time_new(MPI_CLOCK); break; case PHDF5: fd.h5fd = -1; - res.timers = pio_time_new(MPI_TIMER); + res.timers = io_time_new(MPI_CLOCK); break; default: /* unknown request */ diff --git a/perform/pio_perf.c b/tools/perform/pio_perf.c index cf41cbe..4db2249 100644 --- a/perform/pio_perf.c +++ b/tools/perform/pio_perf.c @@ -664,7 +664,7 @@ run_test(iotype iot, parameters parms, struct options *opts) } - pio_time_destroy(res.timers); + io_time_destroy(res.timers); } /* @@ -1676,6 +1676,58 @@ usage(const char *prog) } } +void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop) +{ +#if 1 + if (pio_debug_level >= 4) { + const char *msg; + int myrank; + + MPI_Comm_rank(pio_comm_g, &myrank); + + switch (t) { + case HDF5_FILE_OPENCLOSE: + msg = "File Open/Close"; + break; + case HDF5_DATASET_CREATE: + msg = "Dataset Create"; + break; + case HDF5_MPI_WRITE: + msg = "MPI Write"; + break; + case HDF5_MPI_READ: + msg = "MPI Read"; + break; + case HDF5_FINE_WRITE_FIXED_DIMS: + msg = "Fine Write"; + break; + case HDF5_FINE_READ_FIXED_DIMS: + msg = "Fine Read"; + break; + case HDF5_GROSS_WRITE_FIXED_DIMS: + msg = "Gross Write"; + break; + case HDF5_GROSS_READ_FIXED_DIMS: + msg = "Gross Read"; + break; + case HDF5_RAW_WRITE_FIXED_DIMS: + msg = "Raw Write"; + break; + case HDF5_RAW_READ_FIXED_DIMS: + msg = "Raw Read"; + break; + default: + msg = "Unknown Timer"; + break; + } + + fprintf(output, " Proc %d: %s %s: %.2f\n", myrank, msg, + (start_stop == TSTART ? "Start" : "Stop"), + pt->total_time[t]); + } +#endif +} /* debug_start_stop_time */ + #else /* H5_HAVE_PARALLEL */ /* diff --git a/perform/pio_perf.h b/tools/perform/pio_perf.h index 3295e2b..0fff7a3 100644 --- a/perform/pio_perf.h +++ b/tools/perform/pio_perf.h @@ -24,7 +24,7 @@ #else #include "pio_standalone.h" #endif -#include "pio_timer.h" +#include "io_timer.h" /* setup the dataset no fill option if this is v1.5 or more */ #if H5_VERS_MAJOR > 1 || H5_VERS_MINOR > 4 @@ -59,7 +59,7 @@ typedef struct parameters_ { typedef struct results_ { herr_t ret_code; - pio_time *timers; + io_time_t *timers; } results; #ifndef SUCCESS @@ -71,7 +71,7 @@ typedef struct results_ { #endif /* !FAIL */ extern FILE *output; /* output file */ -extern pio_time *timer_g; /* timer: global for stub functions */ +extern io_time_t *timer_g; /* timer: global for stub functions */ extern int comm_world_rank_g; /* my rank in MPI_COMM_RANK */ extern int comm_world_nprocs_g;/* num. of processes of MPI_COMM_WORLD */ extern MPI_Comm pio_comm_g; /* Communicator to run the PIO */ diff --git a/perform/pio_standalone.c b/tools/perform/pio_standalone.c index e404274..e404274 100644 --- a/perform/pio_standalone.c +++ b/tools/perform/pio_standalone.c diff --git a/perform/pio_standalone.h b/tools/perform/pio_standalone.h index 584a057..584a057 100644 --- a/perform/pio_standalone.h +++ b/tools/perform/pio_standalone.h diff --git a/perform/sio_engine.c b/tools/perform/sio_engine.c index 07e6b16c..3b28ea7 100644 --- a/perform/sio_engine.c +++ b/tools/perform/sio_engine.c @@ -29,7 +29,6 @@ #include "hdf5.h" #include "sio_perf.h" -#include "sio_timer.h" /* Macro definitions */ @@ -143,11 +142,11 @@ do_sio(parameters param) switch (iot) { case POSIXIO: fd.posixfd = -1; - res.timers = sio_time_new(); + res.timers = io_time_new(SYS_CLOCK); break; case HDF5: fd.h5fd = -1; - res.timers = sio_time_new(); + res.timers = io_time_new(SYS_CLOCK); break; default: /* unknown request */ diff --git a/perform/sio_perf.c b/tools/perform/sio_perf.c index 26cec6d..1828d6f 100644 --- a/perform/sio_perf.c +++ b/tools/perform/sio_perf.c @@ -547,7 +547,7 @@ run_test(iotype iot, parameters parms, struct options *opts) read_raw_mm_table[i] = read_gross_mm; } - sio_time_destroy(res.timers); + io_time_destroy(res.timers); } /* @@ -1407,3 +1407,50 @@ usage(const char *prog) fflush(stdout); } +void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop) +{ + if (sio_debug_level >= 4) { + const char *msg; + + switch (t) { + case HDF5_FILE_OPENCLOSE: + msg = "File Open/Close"; + break; + case HDF5_DATASET_CREATE: + msg = "Dataset Create"; + break; + case HDF5_MPI_WRITE: + msg = "MPI Write"; + break; + case HDF5_MPI_READ: + msg = "MPI Read"; + break; + case HDF5_FINE_WRITE_FIXED_DIMS: + msg = "Fine Write"; + break; + case HDF5_FINE_READ_FIXED_DIMS: + msg = "Fine Read"; + break; + case HDF5_GROSS_WRITE_FIXED_DIMS: + msg = "Gross Write"; + break; + case HDF5_GROSS_READ_FIXED_DIMS: + msg = "Gross Read"; + break; + case HDF5_RAW_WRITE_FIXED_DIMS: + msg = "Raw Write"; + break; + case HDF5_RAW_READ_FIXED_DIMS: + msg = "Raw Read"; + break; + default: + msg = "Unknown Timer"; + break; + } + + fprintf(output, " %s %s: %.2f\n", msg, + (start_stop == TSTART ? "Start" : "Stop"), + pt->total_time[t]); + } +} /* debug_start_stop_time */ + diff --git a/perform/sio_perf.h b/tools/perform/sio_perf.h index b40fed3..311d909 100644 --- a/perform/sio_perf.h +++ b/tools/perform/sio_perf.h @@ -15,7 +15,7 @@ #ifndef SIO_PERF_H__ #define SIO_PERF_H__ -#include "sio_timer.h" +#include "io_timer.h" #ifndef STANDALONE #include "H5private.h" #include "h5test.h" @@ -71,7 +71,7 @@ typedef struct parameters_ { typedef struct results_ { herr_t ret_code; - sio_time *timers; + io_time_t *timers; } results; #ifndef SUCCESS @@ -83,7 +83,7 @@ typedef struct results_ { #endif /* !FAIL */ extern FILE *output; /* output file */ -extern sio_time *timer_g; /* timer: global for stub functions */ +extern io_time_t *timer_g; /* timer: global for stub functions */ extern int sio_debug_level; /* The debug level: * 0 - Off * 1 - Minimal diff --git a/perform/sio_standalone.c b/tools/perform/sio_standalone.c index d92ed30..d92ed30 100644 --- a/perform/sio_standalone.c +++ b/tools/perform/sio_standalone.c diff --git a/perform/sio_standalone.h b/tools/perform/sio_standalone.h index b2f8220..b2f8220 100644 --- a/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h diff --git a/perform/zip_perf.c b/tools/perform/zip_perf.c index edd5b0f..edd5b0f 100644 --- a/perform/zip_perf.c +++ b/tools/perform/zip_perf.c diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 299ca83..3315669 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -504,7 +504,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.205" +#define H5_PACKAGE_STRING "HDF5 1.9.210" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -513,7 +513,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.205" +#define H5_PACKAGE_VERSION "1.9.210" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -676,7 +676,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.205" +#define H5_VERSION "1.9.210" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ |