From 94f89911545edce6fc9ebde2c83357cbda0bbd70 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Fri, 12 Apr 2013 17:36:34 -0500 Subject: [svn-r23582] Bring revisions 22708:22730 from trunk to revise_chunks. h5committested. --- CMakeLists.txt | 2 +- MANIFEST | 16 +- README.txt | 2 +- aclocal.m4 | 9 - bin/trace | 1 + c++/CMakeLists.txt | 5 + c++/src/H5CommonFG.cpp | 28 +- c++/src/Makefile.in | 2 +- config/cmake/ConfigureChecks.cmake | 5 +- config/lt_vers.am | 2 +- configure | 1202 +++++++++++++--- configure.ac | 2351 ++++++++++++++++---------------- examples/CMakeLists.txt | 5 + fortran/src/H5_f.c | 69 +- fortran/src/H5_ff.f90 | 3 + fortran/src/H5f90global.f90 | 56 +- fortran/src/H5f90proto.h | 2 +- fortran/src/Makefile.in | 2 +- hl/CMakeLists.txt | 5 + hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/H5LTanalyze.c | 42 +- hl/src/H5LTanalyze.l | 1 + hl/src/H5TB.c | 348 ++--- hl/src/H5TBpublic.h | 4 +- hl/src/Makefile.in | 2 +- hl/test/test_lite.c | 5 +- perform/CMakeLists.txt | 20 +- perform/Makefile.am | 2 +- perform/Makefile.in | 17 +- perform/mpi-perf.c | 373 ----- release_docs/INSTALL_MinGW.txt | 269 ++++ release_docs/INSTALL_parallel | 2 +- release_docs/RELEASE.txt | 15 +- release_docs/USING_CMake.txt | 202 +++ release_docs/Using_CMake.txt | 202 --- src/CMakeLists.txt | 26 + src/H5Dio.c | 2 +- src/H5Dmpio.c | 66 +- src/H5Dpkg.h | 3 +- src/H5Dprivate.h | 2 + src/H5FDmpiposix.c | 6 +- src/H5P.c | 10 +- src/H5Pdxpl.c | 51 + src/H5Pfapl.c | 114 +- src/H5Pfcpl.c | 2 + src/H5Pgcpl.c | 18 +- src/H5Pint.c | 210 +-- src/H5Plapl.c | 9 +- src/H5Pocpl.c | 55 +- src/H5Pocpypl.c | 201 ++- src/H5Ppkg.h | 7 +- src/H5Pprivate.h | 2 +- src/H5Ppublic.h | 14 + src/H5Pstrcpl.c | 33 +- src/H5Zprivate.h | 2 +- src/H5Ztrans.c | 8 +- src/H5public.h | 4 +- src/H5trace.c | 54 + src/Makefile.in | 2 +- test/CMakeLists.txt | 5 + test/file_image.c | 17 +- test/h5test.c | 20 +- test/h5test.h | 2 +- test/testframe.c | 6 - test/testhdf5.h | 12 +- test/tgenprop.c | 122 +- testpar/CMakeLists.txt | 5 + testpar/t_dset.c | 676 +++++++++ testpar/testpar.h | 3 + testpar/testphdf5.c | 4 + testpar/testphdf5.h | 16 + tools/CMakeLists.txt | 5 + tools/h5diff/testfiles/h5diff_220.txt | 2 - tools/h5diff/testfiles/h5diff_221.txt | 4 +- tools/h5diff/testfiles/h5diff_222.txt | 6 +- tools/h5diff/testfiles/h5diff_59.txt | 2 +- tools/h5diff/testfiles/h5diff_70.txt | 2 +- tools/h5diff/testfiles/h5diff_700.txt | 2 +- tools/h5diff/testfiles/h5diff_701.txt | 2 +- tools/h5diff/testfiles/h5diff_702.txt | 2 +- tools/h5diff/testfiles/h5diff_703.txt | 2 +- tools/h5diff/testfiles/h5diff_705.txt | 2 +- tools/h5diff/testfiles/h5diff_710.txt | 2 +- tools/h5dump/CMakeLists.txt | 12 + tools/h5dump/h5dumpgentest.c | 419 ++++++ tools/h5dump/testh5dump.sh.in | 8 + tools/h5import/h5importtestutil.sh.in | 2 +- tools/lib/CMakeLists.txt | 5 + tools/lib/h5diff.c | 22 + tools/lib/h5diff_dset.c | 8 - tools/testfiles/tscalarattrintsize.ddl | 130 ++ tools/testfiles/tscalarattrintsize.h5 | Bin 0 -> 12944 bytes tools/testfiles/tscalarintsize.ddl | 130 ++ tools/testfiles/tscalarintsize.h5 | Bin 0 -> 15968 bytes vms/src/h5pubconf.h | 6 +- 96 files changed, 5212 insertions(+), 2627 deletions(-) delete mode 100644 perform/mpi-perf.c create mode 100644 release_docs/INSTALL_MinGW.txt create mode 100644 release_docs/USING_CMake.txt delete mode 100644 release_docs/Using_CMake.txt create mode 100644 tools/testfiles/tscalarattrintsize.ddl create mode 100644 tools/testfiles/tscalarattrintsize.h5 create mode 100644 tools/testfiles/tscalarintsize.ddl create mode 100644 tools/testfiles/tscalarintsize.h5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 340c4ec..6138b9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -955,7 +955,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED) IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") SET (release_files ${HDF5_SOURCE_DIR}/release_docs/CMake.txt - ${HDF5_SOURCE_DIR}/release_docs/Using_CMake.txt + ${HDF5_SOURCE_DIR}/release_docs/USING_CMake.txt ${HDF5_SOURCE_DIR}/release_docs/COPYING ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_9.txt ${HDF5_SOURCE_DIR}/release_docs/INSTALL diff --git a/MANIFEST b/MANIFEST index e2f0f0b..ee8d6cd 100644 --- a/MANIFEST +++ b/MANIFEST @@ -494,7 +494,6 @@ ./perform/chunk.c ./perform/gen_report.pl ./perform/iopipe.c -./perform/mpi-perf.c ./perform/overhead.c ./perform/perf.c ./perform/perf_meta.c @@ -514,18 +513,21 @@ ./perform/sio_timer.h ./perform/zip_perf.c +./release_docs/CMake.txt ./release_docs/COPYING ./release_docs/HISTORY-1_0-1_8_0_rc3.txt ./release_docs/HISTORY-1_9.txt ./release_docs/INSTALL ./release_docs/INSTALL_Cygwin.txt +./release_docs/INSTALL_MinGW.txt +./release_docs/INSTALL_parallel ./release_docs/INSTALL_VMS.txt ./release_docs/INSTALL_Windows.txt -./release_docs/USING_Windows.txt -./release_docs/CMake.txt -./release_docs/INSTALL_parallel +./release_docs/INSTALL_Windows_From_Command_Line.txt +./release_docs/INSTALL_Windows_Short_VS2008.TXT ./release_docs/RELEASE.txt -./release_docs/Using_CMake.txt +./release_docs/USING_CMake.txt +./release_docs/USING_Windows.txt ./src/.indent.pro _DO_NOT_DISTRIBUTE_ ./src/hdf5.lnt _DO_NOT_DISTRIBUTE_ @@ -1479,6 +1481,10 @@ ./tools/testfiles/topaque.h5 ./tools/testfiles/tsaf.ddl ./tools/testfiles/tsaf.h5 +./tools/testfiles/tscalarattrintsize.ddl +./tools/testfiles/tscalarattrintsize.h5 +./tools/testfiles/tscalarintsize.ddl +./tools/testfiles/tscalarintsize.h5 ./tools/testfiles/tscaleoffset.ddl ./tools/testfiles/tslink-1.ddl ./tools/testfiles/tslink-2.ddl diff --git a/README.txt b/README.txt index 28ced68..4a516a1 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.127-FA_a5 currently under development +HDF5 version 1.9.131-FA_a5 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/aclocal.m4 b/aclocal.m4 index ee9c639..e6aae87 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -406,15 +406,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. diff --git a/bin/trace b/bin/trace index a35e106..e9d1203 100755 --- a/bin/trace +++ b/bin/trace @@ -38,6 +38,7 @@ $Source = ""; "H5FD_mpio_chunk_opt_t" => "Dh", "H5D_mpio_actual_io_mode_t" => "Di", "H5D_layout_t" => "Dl", + "H5D_mpio_no_collective_cause_t" => "Dn", "H5D_mpio_actual_chunk_opt_mode_t" => "Do", "H5D_space_status_t" => "Ds", "H5FD_mpio_xfer_t" => "Dt", diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index dad98f8..0076335 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_CPP) #----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + +#----------------------------------------------------------------------------- # Shared/Static Libs #----------------------------------------------------------------------------- IF (BUILD_SHARED_LIBS) diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 6a8609f..dcc331f 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -68,25 +68,29 @@ namespace H5 { //-------------------------------------------------------------------------- Group CommonFG::createGroup( const char* name, size_t size_hint ) const { - // Create group creation property list for size_hint - hid_t gcpl_id = H5Pcreate(H5P_GROUP_CREATE); - - // If the creation of the property list failed, throw an exception - if( gcpl_id < 0 ) - throwException("createGroup", "H5Pcreate failed"); + // Group creation property list for size_hint + hid_t gcpl_id = 0; // Set the local heap size hint - if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) { - H5Pclose(gcpl_id); - throwException("createGroup", "H5Pset_local_heap_size failed"); - } + if(!(size_hint == (size_t)-1 || size_hint == 0)) { + + // If the creation of the property list failed, throw an exception + if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) + throwException("createGroup", "H5Pcreate failed"); + + if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) { + H5Pclose(gcpl_id); + throwException("createGroup", "H5Pset_local_heap_size failed"); + } + } // Call C routine H5Gcreate2 to create the named group, giving the // location id which can be a file id or a group id hid_t group_id = H5Gcreate2( getLocId(), name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT ); - // Close the group creation property list - H5Pclose(gcpl_id); + // Close the group creation property list, if necessary + if(gcpl_id > 0) + H5Pclose(gcpl_id); // If the creation of the group failed, throw an exception if( group_id < 0 ) diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 42c33a6..4265900 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 117 +LT_VERS_REVISION = 121 LT_VERS_AGE = 0 # Include src directory diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 0940418..4f4f759 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -413,6 +413,7 @@ CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H) # The linux-lfs option is deprecated. SET (LINUX_LFS 0) +SET (HDF5_EXTRA_C_FLAGS) SET (HDF5_EXTRA_FLAGS) IF (NOT WINDOWS) # Linux Specific flags @@ -422,7 +423,9 @@ IF (NOT WINDOWS) # correctly. # POSIX feature information can be found in the gcc manual at: # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - SET (HDF5_EXTRA_FLAGS -D_POSIX_C_SOURCE=199506L -D_BSD_SOURCE) + SET (HDF5_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=199506L) + SET (HDF5_EXTRA_FLAGS -D_BSD_SOURCE) + OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON) IF (HDF5_ENABLE_LARGE_FILE) SET (msg "Performing TEST_LFS_WORKS") diff --git a/config/lt_vers.am b/config/lt_vers.am index 34fa390..9abc39d 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 117 +LT_VERS_REVISION = 121 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index ed8d70e..491cce0 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.127-FA_a5. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.131-FA_a5. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.127-FA_a5' -PACKAGE_STRING='HDF5 1.9.127-FA_a5' +PACKAGE_VERSION='1.9.131-FA_a5' +PACKAGE_STRING='HDF5 1.9.131-FA_a5' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1484,7 +1484,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.127-FA_a5 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.131-FA_a5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1554,7 +1554,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.127-FA_a5:";; + short | recursive ) echo "Configuration of HDF5 1.9.131-FA_a5:";; esac cat <<\_ACEOF @@ -1750,7 +1750,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.127-FA_a5 +HDF5 configure 1.9.131-FA_a5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2844,7 +2844,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.127-FA_a5, which was +It was created by HDF5 $as_me 1.9.131-FA_a5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3227,6 +3227,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +## AM_INIT_AUTOMAKE takes a list of options that should be applied to +## every Makefile.am when automake is run. am__api_version='1.12' # Find a good install program. We prefer a C program (faster), @@ -3674,7 +3676,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.127-FA_a5' + VERSION='1.9.131-FA_a5' cat >>confdefs.h <<_ACEOF @@ -3760,6 +3762,16 @@ fi AM_BACKSLASH='\' +## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies +## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE +## is *not* included here, these files will be rebuilt if out of date. +## This is a problem because if users try to build on a machine with +## the wrong versions of autoconf and automake, these files will be +## rebuilt with the wrong versions and bad things can happen. +## Also, CVS doesn't preserve dependencies between timestamps, so +## Makefiles will often think rebuilding needs to occur when it doesn't. +## Developers should './configure --enable-maintainer-mode' to turn on +## rebuild rules. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @@ -3784,9 +3796,26 @@ fi -ac_config_commands="$ac_config_commands default-1" +## ---------------------------------------------------------------------- +## Set prefix default (install directory) to a directory in the build area. +## This allows multiple src-dir builds within one host. +## Run post processing on files created by configure. +## src/H5pubconf.h: +## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all +## macro names. This avoid name conflict between HDF5 macro names and those +## generated by another software package that uses the HDF5 library. +## src/libhdf5.settings: +## Remove all lines begun with "#" which are generated by CONDITIONAL's of +## configure. +ac_config_commands="$ac_config_commands pubconf" + + +## It's possible to configure for a host other than the one on which +## configure is currently running by using the --host=foo flag. +## For machines on which HDF5 is often configured, it can be convenient +## to specify the name of the machine rather than its canonical type. case $host_alias in redstorm) host_alias=x86_64-redstorm-linux-gnu @@ -3866,18 +3895,23 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but +## not exported to h5cc (or h5fc, etc.) +## AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, +## and WILL be exported to h5cc (or h5fc, etc) if set by configure. +## Make sure flags are set to something (otherwise macros may set them later). AM_CFLAGS="${AM_CFLAGS}" AM_CXXFLAGS="${AM_CXXFLAGS}" AM_FCFLAGS="${AM_FCFLAGS}" @@ -3889,26 +3923,57 @@ FCFLAGS="${FCFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" +## Configure may need to alter any of the *FLAGS variables in order for +## various checks to work correctly. Save the user's value here so it +## can be restored once all configure checks are complete. saved_user_CFLAGS="$CFLAGS" saved_user_CXXFLAGS="$CXXFLAGS" saved_user_FCFLAGS="$FCFLAGS" saved_user_LDFLAGS="$LDFLAGS" saved_user_CPPFLAGS="$CPPFLAGS" +## Different compilers may need default libraries. They are specified in +## the config/* files, so we put this statement here so that it'll be +## set by the code which follows... +## DEFAULT_LIBS="" +## Support F9X variable to define Fortran compiler if FC variable is +## not used. This should be deprecated in the future. if test "x" = "x$FC"; then FC=${F9X} fi - - +## ---------------------------------------------------------------------- +## Dump all shell variables values. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking shell variables initial values" >&5 $as_echo_n "checking shell variables initial values... " >&6; } set >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } +## Define all symbol variables used for configure summary. +## EXTERNAL_FILTERS equals all external filters. Default none. +## MPE: whether MPE option is enabled. Default no. +## STATIC_EXEC: whether static-exec is enabled. Default no. +## HDF_FORTRAN: whether Fortran is enabled. Default no. +## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. +## FC: Fortran compiler. +## HDF_CXX: whether C++ is enabled. Default no. +## CXX: C++ compiler. +## HDF5_HL: whether high-level library is enabled. Default is yes. +## GPFS: whether gpfs is enabled. Default no. +## LARGEFILE: whether largefile support is enabled. Default yes. +## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. +## CODESTACK: whether CODESTACK is enabled. Default no. +## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. +## THREADSAFE: whether THREADSAFE is enabled. Default no. +## STATIC_SHARED: whether static and/or shared libraries are requested. +## enable_shared: whether shared lib is enabled. +## enable_static: whether static lib is enabled. +## UNAME_INFO: System information. MPE=no @@ -3932,7 +3997,17 @@ $as_echo "done" >&6; } UNAME_INFO=`uname -a` +## ---------------------------------------------------------------------- +## Some platforms have broken basename, and/or xargs programs. Check +## that it actually does what it's supposed to do. Catch this early +## since configure relies upon them heavily and there's no use continuing +## if it's broken. +## +## Avoid depending upon Character Ranges. +## These are defined by autoconf. +## as_cr_letters='abcdefghijklmnopqrstuvwxyz' +## as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename works" >&5 $as_echo_n "checking if basename works... " >&6; } @@ -3954,6 +4029,10 @@ else $as_echo "yes" >&6; } fi +## ---------------------------------------------------------------------- +## Check that the cache file was build on the same host as what we're +## running on now. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cached host" >&5 $as_echo_n "checking for cached host... " >&6; } if ${hdf5_cv_host+:} false; then : @@ -3971,6 +4050,22 @@ elif test $hdf5_cv_host != $host; then as_fn_error $? "config.cache file is invalid" "$LINENO" 5 fi +## ---------------------------------------------------------------------- +## Source any special files that we need. These files normally aren't +## present but can be used by the maintainers to fine tune things like +## turning on debug or profiling flags for the compiler. The search order +## is: +## +## CPU-VENDOR-OS +## VENDOR-OS +## CPU-OS +## CPU-VENDOR +## OS +## VENDOR +## CPU +## +## If the `OS' ends with a version number then remove it. For instance, +## `freebsd3.1' would become `freebsd' case $host_os in aix*) @@ -4027,6 +4122,7 @@ if test "X$host_config" != "Xnone"; then . $host_config fi +## Source any special site-specific file hname="`hostname`" while test -n "$hname"; do file=$srcdir/config/site-specific/host-$hname @@ -4045,16 +4141,28 @@ $as_echo "no" >&6; } test "$hname_tmp" = "$hname" && break done +## ---------------------------------------------------------------------- +## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so +## we need to add this in so configure works as intended. We will need to +## reset this value at the end of configure, to preserve the user's settings. CFLAGS="${AM_CFLAGS} ${CFLAGS}" FCFLAGS="${AM_FCFLAGS} ${FCFLAGS}" CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}" LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" +## ---------------------------------------------------------------------- +## Enable dependency tracking unless the configure options or a +## site-specific file told us not to. This prevents configure from +## silently disabling dependencies for some compilers. +## if test -z "${enable_dependency_tracking}"; then enable_dependency_tracking="yes" fi +## ---------------------------------------------------------------------- +## Check for programs. +## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5037,6 +5145,11 @@ fi CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" +## ---------------------------------------------------------------------------- +## Configure disallows unsupported combinations of options. However, users +## may want to override and build with unsupported combinations for their +## own use. They can use the --enable-unsupported configure flag, which +## ignores any errors from configure due to incompatible flags. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsupported combinations of configure options are allowed" >&5 $as_echo_n "checking if unsupported combinations of configure options are allowed... " >&6; } # Check whether --enable-unsupported was given. @@ -5058,6 +5171,9 @@ $as_echo "yes" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## HDF5_INTERFACES="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 $as_echo_n "checking if Fortran interface enabled... " >&6; } @@ -5074,6 +5190,9 @@ else fi +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 2003 interface enabled" >&5 $as_echo_n "checking if Fortran 2003 interface enabled... " >&6; } # Check whether --enable-fortran2003 was given. @@ -5082,6 +5201,9 @@ if test "${enable_fortran2003+set}" = set; then : fi +## ---------------------------------------------------------------------- +## Check to make sure --enable-fortran is present if --enable-fortran2003 +## was specified if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" @@ -5100,9 +5222,15 @@ if test "X$HDF_FORTRAN" = "Xyes"; then HDF5_INTERFACES="$HDF5_INTERFACES fortran" - HAVE_FORTRAN_2003="no" + ## -------------------------------------------------------------------- + ## Default for FORTRAN 2003 compliant compilers + ## + HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## @@ -5112,10 +5240,16 @@ if test "X$HDF_FORTRAN" = "Xyes"; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" + ## -------------------------------------------------------------------- + ## General Fortran flags + ## + AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" FCFLAGS="${FCFLAGS} ${FFLAGS}" - ac_ext=${ac_fc_srcext-f} + ## -------------------------------------------------------------------- + ## Fortran source extention + ## + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -5385,7 +5519,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_ext=${ac_fc_srcext-f} + ## -------------------------------------------------------------------- + ## Check for a Fortran 9X compiler and how to include modules. + ## + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -5688,15 +5825,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - F77=$FC + ## It seems that libtool (as of Libtool 1.5.14) is trying to + ## configure itself for Fortran 77. + ## Tell it that our F77 compiler is $FC (actually a F9X compiler) + F77=$FC - ac_ext=${ac_fc_srcext-f} + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_ext=${ac_fc_srcext-f} + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -6378,8 +6522,13 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## -------------------------------------------------------------------- + ## See if the compiler will support the "-I." option + ## + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } @@ -6409,6 +6558,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi + ## Check to see if -r8 was specified to determine if we need to + ## compile the DOUBLE PRECISION interfaces. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran default REAL is DOUBLE PRECISION" >&5 $as_echo_n "checking if Fortran default REAL is DOUBLE PRECISION... " >&6; } @@ -6449,7 +6600,7 @@ $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - FORTRAN_DEFAULT_REALisDBLE="yes" + FORTRAN_DEFAULT_REALisDBLE="yes" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6458,6 +6609,8 @@ fi if test "X$HDF_FORTRAN2003" = "Xyes"; then + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } @@ -6487,18 +6640,19 @@ else $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + ## echo $HAVE_FORTRAN_2003 + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 else + ## echo $HAVE_FORTRAN_2003 HAVE_FORTRAN_2003="yes" - fi - + fi fi else FC="no" fi +## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6531,6 +6685,12 @@ else fi +## ---------------------------------------------------------------------- +## Check if they would like the C++ interface compiled +## +## We need to check for a C++ compiler unconditionally, since +## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will +## miss even if c++ is not enabled. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7080,6 +7240,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + ## this is checked for when AC_HEADER_STDC is done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 $as_echo_n "checking if c++ interface enabled... " >&6; } @@ -7094,7 +7255,8 @@ if test "X$HDF_CXX" = "Xyes"; then echo "yes" HDF5_INTERFACES="$HDF5_INTERFACES c++" - ac_ext=cpp + ## Change to the C++ language + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -7329,6 +7491,7 @@ else CXX="no" fi +## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7336,6 +7499,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## ---------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## PERL="" if test "X$GCC" = "Xyes"; then for ac_prog in perl @@ -7383,6 +7550,10 @@ done fi +## ---------------------------------------------------------------------- +## Check which archiving tool to use. This needs to be done before +## the AM_PROG_LIBTOOL macro. +## if test -z "$AR"; then for ac_prog in ar xar @@ -7431,6 +7602,8 @@ test -n "$AR" || AR=":" fi +## Export the AR macro so that it will be placed in the libtool file +## correctly. export AR { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 @@ -7467,6 +7640,8 @@ fi +## ---------------------------------------------------------------------- +## Check that the tr utility is working properly. # Extract the first word of "tr", so it can be a program name with args. set dummy tr; ac_word=$2 @@ -7515,6 +7690,10 @@ if test "X${TR_TEST}" != "XTEST"; then fi +## ---------------------------------------------------------------------- +## Check that time can be used with srcdir. This is okay on most systems, +## but seems to cause problems on Cygwin. +## The solution on Cygwin is not to record execution time for tests. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 $as_echo_n "checking if srcdir= and time commands work together... " >&6; } @@ -7532,18 +7711,64 @@ $as_echo "no" >&6; } fi - - - - - +## The following variables are used to distinguish between building a +## serial and parallel library. +## +## HAVE_PARALLEL -- defined in H5config.h if we are building +## a parallel library even if configure wasn't +## able to find some header file or library that +## might be required. This is defined if the +## compiler looks like a parallel compiler (e.g., +## mpicc or mpcc) or if the user explicitly states +## that a parallel library is being built by supplying +## the `--enable-parallel' configure switch. +## +## PARALLEL -- This variable is set to a non-null value if +## configure thinks we're compiling a parallel +## version of the library. +## +## RUNSERIAL -- This is a command which will be prepended to +## the executable name to run the executable using +## a single process. For serial versions of the +## library this will normally be empty. For parallel +## versions it might be something like `mpiexec -n 1'. +## The value of this variable is substituted in *.in +## files. +## +## RUNPARALLEL -- This is a command which will be prepended to +## the executable name to run the executable on +## multiple processors. For the serial library the +## value will normally be the empty string. For +## parallel library it should be something like +## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will +## eventually contain the number of processors on which +## to run the executable (the double dollarsigns are to +## protect the expansion until make executes the +## command). The value of this variable is +## substituted in *.in files. +## + + + + + +## ---------------------------------------------------------------------- +## If the compiler is obviously a parallel compiler then we're building +## a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, +## the name of the compiler might tell us how to run the resulting +## executable. For `mpicc' the executable should be run with `mpiexec' from +## the same directory as mpicc if it exists. +## case "$CC_BASENAME" in mpicc) - PARALLEL=mpicc + ## The mpich compiler. Use mpiexec from the same directory if it + ## exists. + PARALLEL=mpicc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpiexec" >&5 $as_echo_n "checking for mpiexec... " >&6; } - cmd="`echo $CC | cut -f1 -d' '`" + ## Find the path where mpicc is located. + cmd="`echo $CC | cut -f1 -d' '`" if (echo $cmd | grep / >/dev/null); then path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" else @@ -7554,7 +7779,8 @@ $as_echo_n "checking for mpiexec... " >&6; } done fi - if test -x $path/mpiexec; then + ## Is there an mpiexec at that path? + if test -x $path/mpiexec; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $path/mpiexec" >&5 $as_echo "$path/mpiexec" >&6; } RUNSERIAL="${RUNSERIAL:-none}" @@ -7569,16 +7795,27 @@ $as_echo "none" >&6; } ;; mpcc|mpcc_r) - PARALLEL="$CC_BASENAME" + ## The IBM compiler + PARALLEL="$CC_BASENAME" ;; *) - ;; + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. + ;; esac +## ---------------------------------------------------------------------- +## If the Fortran compiler is obviously a parallel compiler then we're +## building a parallel version of hdf5 and should define HAVE_PARALLEL. +## Furthermore, the name of the compiler might tell us how to run the +## resulting executable. For `mpif90' the executable should be run with +## `mpiexec' from the same directory as mpif90 if it exists. +## if test "X$HDF_FORTRAN" = "Xyes" ; then - ac_ext=${ac_fc_srcext-f} + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -7586,11 +7823,14 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu case "$FC" in *mpif90*) - PARALLEL=mpif90 + ## The Fortran mpich compiler. Use mpiexec from the same directory + ## if it exists. + PARALLEL=mpif90 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpiexec" >&5 $as_echo_n "checking for mpiexec... " >&6; } - cmd=`echo $FC |cut -f1 -d' '` + ## Find the path where mpif90 is located. + cmd=`echo $FC |cut -f1 -d' '` if (echo $cmd |grep / >/dev/null); then path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" else @@ -7601,7 +7841,8 @@ $as_echo_n "checking for mpiexec... " >&6; } done fi - if test -x $path/mpiexec; then + ## Is there an mpiexec at that path? + if test -x $path/mpiexec; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $path/mpiexec" >&5 $as_echo "$path/mpiexec" >&6; } RUNSERIAL="${RUNSERIAL:-none}" @@ -7616,14 +7857,18 @@ $as_echo "none" >&6; } ;; *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - PARALLEL="$FC" + ## The IBM compiler + PARALLEL="$FC" ;; *) - ;; + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. + ;; esac - ac_ext=c + ## Change to the C language + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -7631,6 +7876,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi +## ----------------------------------------------------------------------------- +## If shared libraries are being used with parallel, disable them, unless the +## user explicity enables them via the '--enable-shared' option. if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then echo ' shared libraries disabled in parallel' @@ -7644,6 +7892,10 @@ elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then echo ' shared libraries explicitly enabled by user' fi +## ---------------------------------------------------------------------- +## Fortran libraries are not currently supported on Mac. Disable them. +## (this is overridable with --enable-unsupported). +## H5_FORTRAN_SHARED="no" if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then @@ -7651,6 +7903,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then $as_echo_n "checking if shared Fortran libraries are supported... " >&6; } H5_FORTRAN_SHARED="yes" + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) case "`uname`" in Darwin*) @@ -7659,6 +7912,7 @@ $as_echo_n "checking if shared Fortran libraries are supported... " >&6; } ;; esac + ## Report results of check(s) if test "X${H5_FORTRAN_SHARED}" = "Xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -7693,6 +7947,9 @@ else fi +## ---------------------------------------------------------------------- +## Disable C++ shared libraries if +DD64 flag is detected. +## H5_CXX_SHARED="no" if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then @@ -7700,12 +7957,14 @@ if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then $as_echo_n "checking if shared C++ libraries are supported... " >&6; } H5_CXX_SHARED="yes" + ## Disable C++ shared libraries if DD64 flag is being used. if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then H5_CXX_SHARED="no" CHECK_WARN="Shared C++ libraries not currently supported with +DD64 flag." fi + ## Report results of check(s) if test "X${H5_CXX_SHARED}" = "Xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -7739,12 +7998,20 @@ else fi +## ---------------------------------------------------------------------- +## pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect +## these versions and add option "-Mx,28,0x8" to the compiler to avoid +## the problem if optimization is enabled. +## if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then echo 'adding compiler flag to avoid optimization problem in pgcc' CC="${CC-cc} -Mx,28,0x8" fi +## ---------------------------------------------------------------------- +## Shared libraries are not currently supported under Cygwin, so configure +## disables them unless --enable-unsupported has been supplied by the user. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then case "`uname`" in @@ -7759,6 +8026,9 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then esac fi +## ---------------------------------------------------------------------- +## Windows won't create DLLs without the following macro. +## enable_win32_dll=yes case $host in @@ -8063,9 +8333,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -enable_dlopen=yes - - +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. case `pwd` in *\ * | *\ *) @@ -11610,6 +11880,7 @@ func_stripname_cnf () # Set options +enable_dlopen=yes @@ -21747,6 +22018,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## ---------------------------------------------------------------------- +## Check if we should install only statically linked executables. +## This check needs to occur after libtool is initialized because +## we check a libtool cache value and may issue a warning based +## on its result. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 $as_echo_n "checking if we should install only statically linked executables... " >&6; } # Check whether --enable-static_exec was given. @@ -21757,7 +22033,8 @@ fi if test "X$STATIC_EXEC" = "Xyes"; then echo "yes" - if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then + ## Issue a warning if -static flag is not supported. + if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." fi LT_STATIC_EXEC="-all-static" @@ -21768,12 +22045,19 @@ fi +## Fix up the INSTALL macro if it's a relative path. We want the +## full-path to the binary instead. case "$INSTALL" in *install-sh*) INSTALL='\${top_srcdir}/bin/install-sh -c' ;; esac +## ---------------------------------------------------------------------- +## Some users have reported problems with libtool's use of '-Wl,-rpath' to +## link shared libraries in nondefault directories. Allow users to +## disable embedding the rpath information in the executables and to +## instead solely rely on the information in LD_LIBRARY_PATH. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 $as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } # Check whether --enable-sharedlib-rpath was given. @@ -21804,10 +22088,15 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking make" >&5 $as_echo_n "checking make... " >&6; } +## ---------------------------------------------------------------------- +## Sometimes makes think the `.PATH:' appearing before the first rule +## with an action should override the `all' default target. So we have +## to decide what the proper syntax is. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking how make searches directories" >&5 $as_echo_n "checking how make searches directories... " >&6; } while true; do #for break - # The most common method is `VPATH=DIR1 DIR2 ...' + ## The most common method is `VPATH=DIR1 DIR2 ...' cat >maketest <&6; } break fi - cat >maketest <maketest <&6; } break fi - cat >maketest <maketest <&6; } break fi - SEARCH_RULE='## SEARCH DISABLED: ' + ## No way for make to search directories + SEARCH_RULE='## SEARCH DISABLED: ' SEARCH_SEP=' ' { $as_echo "$as_me:${as_lineno-$LINENO}: result: it doesn't" >&5 $as_echo "it doesn't" >&6; } @@ -21873,8 +22166,13 @@ $as_echo "it doesn't" >&6; } done rm maketest +## ---------------------------------------------------------------------- +## pmake will throw an error if variables are undefined in a Makefile. +## These errors can be changed to warnings using the -V flag. +## AM_MAKEFLAGS="" +## Don't run test if MAKE is defined but is the empty string if test -n "${MAKE-make}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make will build with undefined variables" >&5 @@ -21897,6 +22195,10 @@ $as_echo "no, setting -V flag" >&6; } rm maketest fi +## ---------------------------------------------------------------------- +## Production flags? Save the value in $CONFIG_MODE so we have it for +## the record. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 $as_echo_n "checking for production mode... " >&6; } # Check whether --enable-production was given. @@ -21944,6 +22246,9 @@ $as_echo "user-defined" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check for system libraries. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 $as_echo_n "checking for ceil in -lm... " >&6; } if ${ac_cv_lib_m_ceil+:} false; then : @@ -21999,7 +22304,8 @@ fi if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 + ## ...for Solaris + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 @@ -22108,6 +22414,9 @@ fi fi +## ---------------------------------------------------------------------- +## Check for system header files. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : @@ -22272,6 +22581,11 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi +## ---------------------------------------------------------------------- +## Check for these two functions before the time headers are checked +## for, otherwise they are not detected correctly on Solaris (the +## configure test will fail due to multiply-defined symbols). +## for ac_func in difftime do : ac_fn_c_check_func "$LINENO" "difftime" "ac_cv_func_difftime" @@ -22374,6 +22688,7 @@ fi done +## Unix for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -22426,6 +22741,7 @@ fi done +## Darwin for ac_header in mach/mach_time.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" @@ -22439,6 +22755,7 @@ fi done +## Windows case "`uname`" in CYGWIN*) for ac_header in io.h sys/timeb.h @@ -22537,7 +22854,11 @@ esac case "$host" in alpha*-dec*-osf*) - for ac_header in sys/sysinfo.h sys/proc.h + ## The and are needed on the DEC + ## Alpha to turn off UAC fixing. We do *not* attempt to + ## locate these files on other systems because there are too + ## many problems with including them. + for ac_header in sys/sysinfo.h sys/proc.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -22552,7 +22873,11 @@ done ;; mips*-sgi*-irix*) - for ac_header in sys/fpu.h + ## The is needed on the SGI machines to turn off + ## denormalized floating-point values going to zero. We do *not* + ## attempt to locate these files on other systems because there + ## may be problems with including them. + for ac_header in sys/fpu.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/fpu.h" "ac_cv_header_sys_fpu_h" "$ac_includes_default" if test "x$ac_cv_header_sys_fpu_h" = xyes; then : @@ -22578,22 +22903,33 @@ done ;; esac +## ---------------------------------------------------------------------- +## Some platforms require that all symbols are resolved when a library +## is linked. We can use the -no-undefined flag to tell libtool that +## it will be able to build shared libraries on these architectures, +## as it will not do so by default. +## if test "X${enable_shared}" = "Xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 $as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } case "`uname`" in CYGWIN*|MINGW*|AIX*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + ## Add in the -no-undefined flag to LDFLAGS for libtool. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } H5_LDFLAGS="$H5_LDFLAGS -no-undefined" ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + ## Don't add in anything. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi +## ---------------------------------------------------------------------- +## Test for Largefile support. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if configure should try to set up large file support" >&5 $as_echo_n "checking if configure should try to set up large file support... " >&6; } @@ -22603,11 +22939,14 @@ if test "${enable_largefile+set}" = set; then : fi +## If largefile support is enabled, then set up appropriate compiler options. if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 + ## Check for needed compiler options. This check is pulled drectly + ## from autoconf's AC_SYS_LARGEFILE macro, as of Autoconf v2.65. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 @@ -22616,9 +22955,9 @@ else if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ## IRIX 6.2 and later do not support large files by default, + ## so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -22645,16 +22984,16 @@ main () return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext - break + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -22666,8 +23005,15 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } CC=$CC$ac_cv_sys_largefile_CC fi + ## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines + ## that might need to be set for largefile support to behave + ## correctly. This macro is defined in acsite.m4 and overrides + ## the version provided by Autoconf (as of v2.65). The custom + ## macro additionally adds the appropriate defines to AM_CPPFLAGS + ## so that later configure checks have them visible. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + ## Check for _FILE_OFFSET_BITS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 @@ -22753,7 +23099,8 @@ _ACEOF esac rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then + ## Check for _LARGE_FILES + if test "$ac_cv_sys_file_offset_bits" = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : @@ -22841,7 +23188,9 @@ esac rm -rf conftest* fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if large (64-bit) files are supported on this system." >&5 + ## Now actually test to see if we can create large files after we've + ## checked for any needed defines. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if large (64-bit) files are supported on this system." >&5 $as_echo_n "checking if large (64-bit) files are supported on this system.... " >&6; } if ${hdf5_cv_have_lfs+:} false; then : $as_echo_n "(cached) " >&6 @@ -22901,18 +23250,49 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Add necessary defines for Linux Systems. +## case "$host_cpu-$host_vendor-$host_os" in *linux*) - if test "X$LARGEFILE" != "Xno"; then + ## If largefile support is enabled, then make available various + ## LFS-related routines using the following _LARGEFILE*_SOURCE macros. + if test "X$LARGEFILE" != "Xno"; then AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" fi - H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS" - - AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" + ## Add POSIX support on Linux systems, so defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in . + ## This flag was removed from h5cc as of 2009-10-17 when it was found + ## that the flag broke compiling netCDF-4 code with h5cc, but kept in + ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen + ## is used only by H5_debug_mask which is used only when debugging in + ## H5_init_library (all in H5.c). When the flag was removed this was + ## the only compile failure noted. + ## This was originally defined as _POSIX_SOURCE which was updated to + ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX + ## functionality so clock_gettime and CLOCK_MONOTONIC are defined + ## correctly. + ## POSIX feature information can be found in the gcc manual at: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS" + + ## Also add BSD support on Linux systems, so defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in and snprintf & vsnprintf defined + ## correctly in + ## Linking to the bsd-compat library is required as per the gcc manual: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## however, we do not do this since it breaks the big test on some + ## older platforms. + AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" ;; esac +## Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible +## for configure checks. +## Note: Both will be restored by the end of configure. CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" @@ -23005,6 +23385,9 @@ $as_echo "skipping test for stat64() and fstat64()" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## Data types and their sizes. +## ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : @@ -23652,6 +24035,7 @@ _ACEOF +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -23738,6 +24122,7 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## Posix.1g types (C9x) cat >>confdefs.h <<\EOF #include EOF @@ -24714,6 +25099,7 @@ _ACEOF +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -24800,6 +25186,9 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## ---------------------------------------------------------------------- +## Check if the dev_t type is a scalar type (must come after the check for +## sys/types.h) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dev_t is scalar" >&5 $as_echo_n "checking if dev_t is scalar... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24838,6 +25227,11 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## Fake --with-xxx option to allow us to create a help message for the +## following --with-xxx options which can take either a =DIR or =INC,LIB +## specifier. +## # Check whether --with-fnord was given. if test "${with_fnord+set}" = set; then : @@ -24845,6 +25239,12 @@ if test "${with_fnord+set}" = set; then : fi +## ---------------------------------------------------------------------- +## Is the dmalloc present? It has a header file `dmalloc.h' and a library +## `-ldmalloc' and their locations might be specified with the `--with-dmalloc' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## # Check whether --with-dmalloc was given. if test "${with_dmalloc+set}" = set; then : @@ -24951,7 +25351,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$dmalloc_inc" = "X/usr/include"; then + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. + if test "X$dmalloc_inc" = "X/usr/include"; then dmalloc_inc="" fi if test "X$dmalloc_lib" = "X/usr/lib"; then @@ -25050,6 +25452,12 @@ fi ;; esac +## ---------------------------------------------------------------------- +## Is the GNU zlib present? It has a header file `zlib.h' and a library +## `-lz' and their locations might be specified with the `--with-zlib' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## USE_FILTER_DEFLATE="no" # Check whether --with-zlib was given. @@ -25162,7 +25570,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$zlib_inc" = "X/usr/include"; then + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. + if test "X$zlib_inc" = "X/usr/include"; then zlib_inc="" fi if test "X$zlib_lib" = "X/usr/lib"; then @@ -25272,13 +25682,20 @@ $as_echo "#define HAVE_FILTER_DEFLATE 1" >>confdefs.h USE_FILTER_DEFLATE="yes" - if test "X$EXTERNAL_FILTERS" != "X"; then + ## Add "deflate" to external filter list + if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)" fi +## ---------------------------------------------------------------------- +## Is the szlib present? It has a header file `szlib.h' and a library +## `-lsz' and their locations might be specified with the `--with-szlib' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## USE_FILTER_SZIP="no" # Check whether --with-szlib was given. @@ -25386,7 +25803,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$szlib_inc" = "X/usr/include"; then + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. + if test "X$szlib_inc" = "X/usr/include"; then szlib_inc="" fi if test "X$szlib_lib" = "X/usr/lib"; then @@ -25486,10 +25905,14 @@ fi esac if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5 + ## SZLIB library is available. Check if it can encode + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5 $as_echo_n "checking for szlib encoder... " >&6; } - if test -z "$LD_LIBRARY_PATH"; then + ## Set LD_LIBRARY_PATH so encoder test can find the library and run. + ## Also add LL_PATH substitution to Makefiles so they can use the + ## path as well, for testing examples. + if test -z "$LD_LIBRARY_PATH"; then export LD_LIBRARY_PATH="$szlib_lib" else export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH" @@ -25547,7 +25970,8 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } fi - if test ${hdf5_cv_szlib_can_encode} = "yes"; then + ## Add "szip" to external filter list + if test ${hdf5_cv_szlib_can_encode} = "yes"; then if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi @@ -25571,6 +25995,7 @@ else fi +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -25657,6 +26082,13 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## ---------------------------------------------------------------------- +## Is the Pthreads library present? It has a header file `pthread.h' and +## a library `-lpthread' and their locations might be specified with the +## `--with-pthread' command-line switch. The value is an include path +## and/or a library path. If the library path is specified then it must +## be preceded by a comma. +## PTHREAD=yes # Check whether --with-pthread was given. @@ -25758,7 +26190,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$pthread_inc" = "X/usr/include"; then + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. + if test "X$pthread_inc" = "X/usr/include"; then pthread_inc="" fi if test "X$pthread_lib" = "X/usr/lib"; then @@ -25922,6 +26356,9 @@ fi ;; esac +## ---------------------------------------------------------------------- +## Enable thread-safe version of library. It requires Pthreads support. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread safe support" >&5 $as_echo_n "checking for thread safe support... " >&6; } # Check whether --enable-threadsafe was given. @@ -25930,13 +26367,31 @@ if test "${enable_threadsafe+set}" = set; then : fi +## The --enable-threadsafe flag is not compatible with --enable-cxx. +## If the user tried to specify both flags, throw an error, unless +## they also provided the --enable-unsupported flag. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + as_fn_error $? "--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 + fi +fi + +## --enable-threadsafe is also incompatible with --enable-fortran, unless +## --enable-unsupported has been specified on the configure line. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + as_fn_error $? "--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 + fi +fi + case "X-$THREADSAFE" in X-|X-no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; X-yes) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ## Check that we can link a simple Pthread program. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef FC_DUMMY_MAIN @@ -25977,6 +26432,10 @@ $as_echo "#define HAVE_THREADSAFE 1" >>confdefs.h fi +## ---------------------------------------------------------------------- +## Check for MONOTONIC_TIMER support (used in clock_gettime). This has +## to be done after any POSIX/BSD defines to ensure that the test gets +## the correct POSIX level on linux. ac_fn_c_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include " if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes; then : @@ -25986,14 +26445,19 @@ else fi +## ---------------------------------------------------------------------- +## How does one figure out the local time zone? Anyone know of a +## Posix way to do this? +## +## First check if `struct tm' has a `tm_gmtoff' member. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5 $as_echo_n "checking for tm_gmtoff in struct tm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26014,7 +26478,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26022,13 +26486,14 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## check if `struct tm' has a `__tm_gmtoff' member. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tm_gmtoff in struct tm" >&5 $as_echo_n "checking for __tm_gmtoff in struct tm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26049,7 +26514,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE___TM_GMTOFF 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26057,6 +26522,7 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## Check whether the global variable `timezone' is defined. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for global timezone variable" >&5 $as_echo_n "checking for global timezone variable... " >&6; } @@ -26091,7 +26557,7 @@ if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_TIMEZONE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26102,6 +26568,7 @@ rm -f core conftest.err conftest.$ac_objext \ ;; esac +## Check whether `struct timezone' is defined. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : @@ -26225,9 +26692,9 @@ $as_echo_n "checking for struct timezone... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include + #include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26248,8 +26715,8 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h -have_struct_tz="yes" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + have_struct_tz="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26257,6 +26724,7 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## If gettimeofday() is going to be used, make sure it uses the timezone struct if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday() gives timezone" >&5 @@ -26312,12 +26780,15 @@ $as_echo "no" >&6; } fi fi +## ---------------------------------------------------------------------- +## Does the struct stat have the st_blocks field? This field is not Posix. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blocks in struct stat" >&5 $as_echo_n "checking for st_blocks in struct stat... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26338,7 +26809,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STAT_ST_BLOCKS 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26346,6 +26817,9 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## How do we figure out the width of a tty in characters? +## for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -26396,7 +26870,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STRUCT_VIDEOCONFIG 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26429,7 +26903,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STRUCT_TEXT_INFO 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26462,7 +26936,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TIOCGWINSZ 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26495,7 +26969,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TIOCGETD 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26504,6 +26978,9 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## Check for functions. +## for ac_func in alarm BSDgettimeofday fork frexpf frexpl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -26577,6 +27054,9 @@ fi done +## Check for vsnprintf() separately, so we can detect situations where it +## doesn't return the correct size for formatted strings that are too large +## for the buffer provided for ac_func in vsnprintf do : ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" @@ -26584,7 +27064,18 @@ if test "x$ac_cv_func_vsnprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VSNPRINTF 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf returns correct value" >&5 + ## Check if vsnprintf() returns correct size for strings that don't fit + ## into the size allowed. If vsnprintf() works correctly on this platform, + ## it should return a value of 42 for the test below + ## + ## Note that vsnprintf fails in two different ways: + ## - In IRIX64, calls to vnsprintf() with a formatted string that + ## is larger than the buffer size allowed incorrectly + ## return the size of the buffer minus one. + ## - In HP/UX, calls to vsnprintf() with a formatted string that + ## is larger than the buffer size allowed incorrectly + ## return (-1) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf returns correct value" >&5 $as_echo_n "checking if vsnprintf returns correct value... " >&6; } if ${hdf5_cv_vsnprintf_works+:} false; then : @@ -26649,6 +27140,11 @@ fi done +## ---------------------------------------------------------------------- +## Check that a lone colon can be used as an argument +## This is not true on Cray X1, which interprets a lone colon as a +## system command. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lone colon can be used as an argument" >&5 $as_echo_n "checking if lone colon can be used as an argument... " >&6; } if ${hdf5_cv_lone_colon+:} false; then : @@ -26676,6 +27172,9 @@ $as_echo "$hdf5_cv_lone_colon" >&6; } H5_LONE_COLON="$hdf5_cv_lone_colon" +## ---------------------------------------------------------------------- +## Check compiler characteristics +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : @@ -26833,7 +27332,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_ATTRIBUTE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26866,7 +27365,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_C99_FUNC 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26898,7 +27397,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_FUNCTION 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26938,7 +27437,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_C99_DESIGNATED_INITIALIZER 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26946,12 +27445,21 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## Try to figure out how to print `long long'. Some machines use `%lld' +## and others use `%qd'. There may be more! The final `l' is a +## default in case none of the others work. +## Need to patch up LD_LIBRARY_PATH so that the execution can find all +## the dynamic library. The correct way to do it should be updating +## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print long long" >&5 $as_echo_n "checking how to print long long... " >&6; } if ${hdf5_cv_printf_ll+:} false; then : $as_echo_n "(cached) " >&6 else - LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" + +LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH for hdf5_cv_printf_ll in l ll L q unknown; do @@ -26961,17 +27469,17 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include + #include + #include + #include -int main(void) -{ + int main(void) + { char *s = malloc(128); long long x = (long long)1048576 * (long long)1048576; sprintf(s,"%${hdf5_cv_printf_ll}d",x); exit(strcmp(s,"1099511627776")); -} + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -26984,6 +27492,7 @@ fi done fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: %${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u" >&5 $as_echo "%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u" >&6; } @@ -26992,6 +27501,10 @@ cat >>confdefs.h <<_ACEOF _ACEOF +## ---------------------------------------------------------------------- +## Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) +## is supported on this system +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking Threads support system scope" >&5 $as_echo_n "checking Threads support system scope... " >&6; } if ${hdf5_cv_system_scope_threads+:} false; then : @@ -27006,20 +27519,20 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if STDC_HEADERS -#include -#include -#endif + #if STDC_HEADERS + #include + #include + #endif -int main(void) -{ - pthread_attr_t attribute; - int ret; + int main(void) + { + pthread_attr_t attribute; + int ret; - pthread_attr_init(&attribute); - ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - exit(ret==0 ? 0 : 1); -} + pthread_attr_init(&attribute); + ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); + exit(ret==0 ? 0 : 1); + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -27045,6 +27558,9 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Checking to see if GPFS is available on this filesystem +## # Check whether --enable-gpfs was given. if test "${enable_gpfs+set}" = set; then : enableval=$enable_gpfs; @@ -27087,14 +27603,14 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_GPFS 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - LIBS="$LIBS -lgpfs" - GPFS="yes" + LIBS="$LIBS -lgpfs" + GPFS="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - GPFS="no" + GPFS="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -27110,6 +27626,10 @@ $as_echo "suppressed" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Turn on debugging by setting compiler flags +## This must come after the enable-production since it depends on production. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug flags" >&5 $as_echo_n "checking for debug flags... " >&6; } # Check whether --enable-debug was given. @@ -27118,6 +27638,7 @@ if test "${enable_debug+set}" = set; then : fi +## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then DEBUG_PKG=no @@ -27159,6 +27680,9 @@ if test -n "$DEBUG_PKG"; then done fi +## ---------------------------------------------------------------------- +## Check if they would like the function stack support compiled in +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function stack tracking is enabled" >&5 $as_echo_n "checking whether function stack tracking is enabled... " >&6; } # Check whether --enable-codestack was given. @@ -27183,6 +27707,9 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like the metadata trace file code compiled in +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether metadata trace file code is enabled" >&5 $as_echo_n "checking whether metadata trace file code is enabled... " >&6; } # Check whether --enable-metadata-trace-file was given. @@ -27207,6 +27734,10 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Enable tracing of the API +## This must come after the enable-debug since it depends on debug. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for API tracing" >&5 $as_echo_n "checking for API tracing... " >&6; }; @@ -27216,6 +27747,7 @@ if test "${enable_trace+set}" = set; then : fi +## Default to no if debug is disabled if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then TRACE=no @@ -27239,6 +27771,10 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Enable instrumenting of the library's internal operations +## This must come after the enable-debug since it depends on debug. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for instrumented library" >&5 $as_echo_n "checking for instrumented library... " >&6; }; @@ -27248,6 +27784,7 @@ if test "${enable_instrument+set}" = set; then : fi +## Default to no if debug is disabled if test "X-$INSTRUMENT" = X- ; then if test -z "$DEBUG_PKG" ; then INSTRUMENT=no @@ -27272,6 +27809,10 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like to securely clear file buffers before they are +## written. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to clear file buffers" >&5 $as_echo_n "checking whether to clear file buffers... " >&6; } @@ -27297,6 +27838,12 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like to use a memory checking tool (like valgrind's +## 'memcheck' tool, or Rational Purify, etc) and the library should be +## more scrupulous with it's memory operations. Enabling this also +## disables the library's free space manager code. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a memory checking tool will be used" >&5 $as_echo_n "checking whether a memory checking tool will be used... " >&6; } @@ -27322,6 +27869,7 @@ $as_echo "no" >&6; } ;; esac +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -27408,24 +27956,40 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## What header files and libraries do we have to look for for parallel +## support? For the most part, search paths are already specified with +## CPPFLAGS and LDFLAGS or are known to the compiler. If the user says +## `--disable-parallel' but specifies a known parallel compiler (like mpicc +## or mpcc) then parallel support is enabled but configure doesn't search +## for any parallel header files or libraries. +## # Check whether --enable-parallel was given. if test "${enable_parallel+set}" = set; then : enableval=$enable_parallel; fi +## The --enable-parallel flag is not compatible with --enable-cxx. +## If the user tried to specify both flags, throw an error, unless +## they also provided the --enable-unsupported flag. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then as_fn_error $? "--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 fi fi +## --enable-parallel is also incompatible with --enable-threadsafe, unless +## --enable-unsupported has been specified on the configure line. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then as_fn_error $? "--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 fi fi +## It's possible to build in parallel by specifying a parallel compiler +## without using the --enable-parallel flag. This isn't allowed with +## C++ or threadsafe, either, unless the --enable-unsupported flag +## has also been specified. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then as_fn_error $? "An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error." "$LINENO" 5 @@ -27439,16 +28003,23 @@ fi $as_echo_n "checking for parallel support files... " >&6; } case "X-$enable_parallel" in X-|X-no|X-none) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 + ## Either we are not compiling for parallel or the header and + ## library files and locations are known to the compiler (this is + ## the case for a correct installation of mpicc for instance). + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 $as_echo "skipped" >&6; } ;; X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: provided by compiler" >&5 + ## We want to compile a parallel library with a compiler that + ## may already know how to link with MPI and MPI-IO. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: provided by compiler" >&5 $as_echo "provided by compiler" >&6; } PARALLEL=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ## Try link a simple MPI program. If fail, try again with -lmpi and + ## -lmpich. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef FC_DUMMY_MAIN @@ -27470,8 +28041,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : else - \ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 @@ -27523,8 +28093,7 @@ _ACEOF LIBS="-lmpi $LIBS" else - \ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 @@ -27585,7 +28154,9 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "X$PARALLEL" = "Xyes"; then + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. + if test "X$PARALLEL" = "Xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27669,13 +28240,15 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "X$HDF_FORTRAN" = "Xyes"; then - ac_ext=${ac_fc_srcext-f} + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - cat > conftest.$ac_ext <<_ACEOF + ## Try link a simple MPI program. If fail, try again with -lmpi. + cat > conftest.$ac_ext <<_ACEOF program main include 'mpif.h' @@ -27738,7 +28311,9 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "X$PARALLEL" = "Xyes"; then + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. + if test "X$PARALLEL" = "Xyes"; then cat > conftest.$ac_ext <<_ACEOF program main @@ -27803,7 +28378,8 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi - ac_ext=c + ## Change to the C language + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -27811,8 +28387,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi - if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then - for path in `echo $PATH | ${TR} ":" " "`; do + ## Set RUNPARALLEL to mpiexec if not set yet. + ## Check for building on Cray if RUNPARALLEL is not yet set by checking + ## for 'aprun' command (which is the parallel job launcher, like mpiexec). + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then + ## Find the path where aprun is located. + for path in `echo $PATH | ${TR} ":" " "`; do if test -x $path/aprun; then RUNPARALLEL="aprun -q -n \$\${NPROCS:=6}" break; @@ -27820,7 +28400,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu done fi - if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then + ## Set RUNPARALLEL to mpiexec if not set yet. + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" fi ;; @@ -27832,16 +28413,22 @@ $as_echo "error" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Print some other parallel information and do some sanity checks. +## ADD_PARALLEL_FILES="no" if test -n "$PARALLEL"; then - TESTPARALLEL=testpar + ## The 'testpar' directory should participate in the build + TESTPARALLEL=testpar + ## We are building a parallel library $as_echo "#define HAVE_PARALLEL 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for running on one processor" >&5 + ## Display what we found about running programs + { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for running on one processor" >&5 $as_echo_n "checking prefix for running on one processor... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNSERIAL" >&5 $as_echo "$RUNSERIAL" >&6; } @@ -27850,7 +28437,8 @@ $as_echo_n "checking prefix for running in parallel... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNPARALLEL" >&5 $as_echo "$RUNPARALLEL" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO program can be linked" >&5 + ## Check that we can link a simple MPI and MPI-IO application + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO program can be linked" >&5 $as_echo_n "checking whether a simple MPI-IO program can be linked... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27882,11 +28470,15 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test -z "$RUNPARALLEL"; then + ## There *must* be some way to run in parallel even if it's just the + ## word `none'. + if test -z "$RUNPARALLEL"; then as_fn_error $? "no way to run a parallel program" "$LINENO" 5 fi - if test "X$RUNSERIAL" = "Xnone"; then + ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with + ## the empty string. + if test "X$RUNSERIAL" = "Xnone"; then RUNSERIAL="" fi if test "X$RUNPARALLEL" = "Xnone"; then @@ -27967,7 +28559,13 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi - MPE=yes + ## -------------------------------------------------------------------- + ## Do we want MPE instrumentation feature on? + ## + ## This must be done after enable-parallel is checked since it depends + ## on a mpich compiler. + ## + MPE=yes # Check whether --with-mpe was given. if test "${with_mpe+set}" = set; then : @@ -28125,7 +28723,9 @@ fi ;; esac - if test "X$mpe_inc" = "X/usr/include"; then + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. + if test "X$mpe_inc" = "X/usr/include"; then mpe_inc="" fi if test "X$mpe_lib" = "X/usr/lib"; then @@ -28405,7 +29005,13 @@ $as_echo "#define HAVE_MPE 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MPI_File_set_size works for files over 2GB" >&5 + ## ---------------------------------------------------------------------- + ## Set the flag to indicate that the MPI_File_set_size() function + ## works with files over 2GB, unless it's already set in the cache. + ## (This flag should be set for all machines, except for ASCI Red, where + ## the cache value is set in it's config file) + ## + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MPI_File_set_size works for files over 2GB" >&5 $as_echo_n "checking if MPI_File_set_size works for files over 2GB... " >&6; } if ${hdf5_cv_mpi_file_set_size_big+:} false; then : $as_echo_n "(cached) " >&6 @@ -28425,7 +29031,14 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } fi - # Check whether --enable-mpi-size was given. + ## ---------------------------------------------------------------------- + ## Set the flag to indicate that the MPI_File_get_size() function + ## works. The default is enabled unless the user knows the function + ## doesn't work on the system and disables it. (This flag should be set + ## for all machines except for SGI Altix Propack 4 where the function + ## doesn't return correct file size.) + ## + # Check whether --enable-mpi-size was given. if test "${enable_mpi_size+set}" = set; then : enableval=$enable_mpi_size; MPI_GET_SIZE=$enableval fi @@ -28452,6 +29065,14 @@ $as_echo "#define HAVE_MPI_GET_SIZE 1" >>confdefs.h esac fi +## ---------------------------------------------------------------------- +## Turn on internal I/O filters by setting macros in header files +## Internal I/O filters are contained entirely within the library and do +## not depend on external headers or libraries. The shuffle filter is +## an example of an internal filter, while the gzip filter is an example of +## an external filter. Each external filter is controlled with an +## "--with-foo=" configure flag. +## USE_FILTER_SHUFFLE="no" USE_FILTER_FLETCHER32="no" @@ -28465,6 +29086,7 @@ if test "${enable_filters+set}" = set; then : fi +## Eventually: all_filters="shuffle,foo,bar,baz" all_filters="shuffle,fletcher32,nbit,scaleoffset" case "X-$FILTERS" in X-|X-all) @@ -28485,7 +29107,11 @@ esac if test -n "$FILTERS"; then for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do - if test $filter = "SHUFFLE"; then + ## ------------------------------------------------------------------ + ## Have to use separate 'if' construct for each filter, so that + ## autoheader can detect the AC_DEFINE for each one... + ## + if test $filter = "SHUFFLE"; then $as_echo "#define HAVE_FILTER_SHUFFLE 1" >>confdefs.h @@ -28512,12 +29138,19 @@ $as_echo "#define HAVE_FILTER_SCALEOFFSET 1" >>confdefs.h done fi +## ---------------------------------------------------------------------- +## This is defined only when we're using CodeWarrior, since it has a +## broken "open()" call. +# if test 1 = 2; then $as_echo "#define NO_SHARED_WRITING 1" >>confdefs.h fi +## -------------------------------------------------------------------------- +## Should the Default Virtual File Driver be compiled? +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Default Virtual File Driver definition" >&5 $as_echo_n "checking for Default Virtual File Driver definition... " >&6; } @@ -28554,6 +29187,9 @@ _ACEOF fi +## ---------------------------------------------------------------------- +## Check if Direct I/O driver is enabled by --enable-direct-vfd +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Direct Virtual File Driver support" >&5 $as_echo_n "checking for Direct Virtual File Driver support... " >&6; } @@ -28654,6 +29290,12 @@ else fi +## ---------------------------------------------------------------------- +## Decide whether the presence of user's exception handling functions is +## checked and data conversion exceptions are returned. This is mainly +## for the speed optimization of hard conversions. Soft conversions can +## actually benefit little. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether exception handling functions is checked during data conversions" >&5 $as_echo_n "checking whether exception handling functions is checked during data conversions... " >&6; } # Check whether --enable-dconv-exception was given. @@ -28675,6 +29317,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether data accuracy is guaranteed during data conversions" >&5 $as_echo_n "checking whether data accuracy is guaranteed during data conversions... " >&6; } # Check whether --enable-dconv-accuracy was given. @@ -28696,6 +29344,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle converting +## denormalized floating-point values. +## (This flag should be set for all machines, except for the Crays, where +## the cache value is set in it's config file) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting denormalized floating-point values is possible" >&5 $as_echo_n "checking if converting denormalized floating-point values is possible... " >&6; } if ${hdf5_cv_convert_denormal_float+:} false; then : @@ -28716,6 +29370,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle converting +## floating-point to long long values. +## (This flag should be _unset_ for all machines, except for Windows, where +## it's set in the custom Windows H5pubconf.h file) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting floating-point values to long long is not working" >&5 $as_echo_n "checking if converting floating-point values to long long is not working... " >&6; } if ${hdf5_cv_convert_float_llong_not_works+:} false; then : @@ -28736,6 +29396,12 @@ else $as_echo "false" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine has window style pathname, +## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). +## (This flag should be _unset_ for all machines, except for Windows, where +## it's set in the custom Windows H5pubconf.h file) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the machine has window style path name" >&5 $as_echo_n "checking if the machine has window style path name... " >&6; } @@ -28753,6 +29419,13 @@ $as_echo "no" >&6; } ;; esac +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can handle conversion from +## long double to integers accurately. This flag should be set "yes" for +## all machines except all SGIs. For SGIs, some conversions are +## incorrect and its cache value is set "no" in its config/irix6.x and +## irix5.x. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting from long double to integers is accurate" >&5 $as_echo_n "checking if converting from long double to integers is accurate... " >&6; } @@ -28778,6 +29451,13 @@ else $as_echo "no" >&6; } fi +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can do conversion from +## long double to integers regardless of accuracy. This flag should be +## set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the +## compiler has 'floating exception' when converting 'long double' to all +## integers except 'unsigned long long'. Other HP-UX systems are unknown +## yet. (1/8/05 - SLU) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting from long double to integers works" >&5 $as_echo_n "checking if converting from long double to integers works... " >&6; } @@ -28844,6 +29524,13 @@ else $as_echo "no" >&6; } fi +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can handle conversion from +## integers to long double. (This flag should be set "yes" for all +## machines except all SGIs, where some conversions are +## incorrect and its cache value is set "no" in its config/irix6.x and +## irix5.x) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting from integers to long double" >&5 $as_echo_n "checking if accurately converting from integers to long double... " >&6; } @@ -28869,6 +29556,14 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'unsigned long' to 'float' values. +## (This flag should be set for all machines, except for Pathscale compiler +## on Sandia's Linux machine where the compiler interprets 'unsigned long' +## values as negative when the first bit of 'unsigned long' is on during +## the conversion to float.) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting unsigned long to float values" >&5 $as_echo_n "checking if accurately converting unsigned long to float values... " >&6; } @@ -28937,6 +29632,14 @@ $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'unsigned (long) long' values to 'float' and 'double' values. +## (This flag should be set for all machines, except for the SGIs, where +## the cache value is set in the config/irix6.x config file) and Solaris +## 64-bit machines, where the short program below tests if round-up is +## correctly handled. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting unsigned long long to floating-point values" >&5 $as_echo_n "checking if accurately converting unsigned long long to floating-point values... " >&6; } @@ -29044,6 +29747,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'float' or 'double' to 'unsigned long long' values. +## (This flag should be set for all machines, except for PGI compiler +## where round-up happens when the fraction of float-point value is greater +## than 0.5. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately roundup converting floating-point to unsigned long long values" >&5 $as_echo_n "checking if accurately roundup converting floating-point to unsigned long long values... " >&6; } @@ -29100,6 +29810,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'float', 'double' or 'long double' to 'unsigned long long' values. +## (This flag should be set for all machines, except for HP-UX machines +## where the maximal number for unsigned long long is 0x7fffffffffffffff +## during conversion. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if right maximum converting floating-point to unsigned long long values" >&5 $as_echo_n "checking if right maximum converting floating-point to unsigned long long values... " >&6; } @@ -29163,6 +29880,11 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to 'unsigned int' values. (This flag should be set for +## all machines, except for some Intel compilers on some Linux.) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to unsigned int values" >&5 $as_echo_n "checking if correctly converting long double to unsigned int values... " >&6; } @@ -29220,6 +29942,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can _compile_ +## 'unsigned long long' to 'float' and 'double' typecasts. +## (This flag should be set for all machines, except for under Windows when +## compiled with Visual Studio 6, where the macro value is set in the +## src/H5pubconf.h file) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling unsigned long long to floating-point typecasts work" >&5 $as_echo_n "checking if compiling unsigned long long to floating-point typecasts work... " >&6; } if ${hdf5_cv_ullong_to_fp_cast_works+:} false; then : @@ -29240,6 +29969,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can _compile_ +## 'long long' to 'float' and 'double' typecasts. +## (This flag should be set for all machines, except for under Windows when +## compiled with Visual Studio 6, where the macro value is set in the +## src/H5pubconf.h file) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling long long to floating-point typecasts work" >&5 $as_echo_n "checking if compiling long long to floating-point typecasts work... " >&6; } if ${hdf5_cv_llong_to_fp_cast_works+:} false; then : @@ -29260,6 +29996,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can convert from +## 'unsigned long long' to 'long double' without precision loss. +## (This flag should be set for all machines, except for FreeBSD(sleipnir) +## where the last 2 bytes of mantissa are lost when compiler tries to do +## the conversion, and Cygwin where compiler doesn't do rounding correctly.) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting unsigned long long to long double with precision" >&5 $as_echo_n "checking if converting unsigned long long to long double with precision... " >&6; } @@ -29377,6 +30120,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle overflow converting +## all floating-point to all integer types. +## (This flag should be set for all machines, except for Cray X1 where +## floating exception is generated when the floating-point value is greater +## than the maximal integer value). +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if overflows normally converting floating-point to integer values" >&5 $as_echo_n "checking if overflows normally converting floating-point to integer values... " >&6; } @@ -29427,6 +30177,15 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine is using a special algorithm to convert +## 'long double' to '(unsigned) long' values. (This flag should only be set for +## the IBM Power6 Linux. When the bit sequence of long double is +## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long +## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. +## The machine's conversion gets the correct value. We define the macro and disable +## this kind of test until we figure out what algorithm they use. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if using special algorithm to convert long double to (unsigned) long values" >&5 $as_echo_n "checking if using special algorithm to convert long double to (unsigned) long values... " >&6; } @@ -29524,6 +30283,14 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine is using a special algorithm +## to convert some values of '(unsigned) long' to 'long double' values. +## (This flag should be off for all machines, except for IBM Power6 Linux, +## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the compiler uses a unknown algorithm. We define a +## macro and skip the test for now until we know about the algorithm. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if using special algorithm to convert (unsigned) long to long double values" >&5 $as_echo_n "checking if using special algorithm to convert (unsigned) long to long double values... " >&6; } @@ -29623,6 +30390,15 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should be set for +## all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence +## of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long +## start to go wrong on these two machines. Adjusting it higher to +## 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted +## values wildly wrong. This test detects this wrong behavior and disable the test. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to (unsigned) long long values" >&5 $as_echo_n "checking if correctly converting long double to (unsigned) long long values... " >&6; } @@ -29704,6 +30480,13 @@ $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be set for +## all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., +## 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice +## as big as they should be. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting (unsigned) long long to long double values" >&5 $as_echo_n "checking if correctly converting (unsigned) long long to long double values... " >&6; } @@ -29788,6 +30571,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine generates bad code +## for the H5V_log2_gen() routine in src/H5Vprivate.h +## (This flag should be set to no for all machines, except for SGI IRIX64, +## where the cache value is set to yes in it's config file) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bad code for log2 routine is generated" >&5 $as_echo_n "checking if bad code for log2 routine is generated... " >&6; } if ${hdf5_cv_bad_log2_code_generated+:} false; then : @@ -29808,19 +30597,28 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set some variables for general configuration information to be saved +## and installed with the libraries. +## +## HDF5 version from the first line of the README.txt file. H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" +## Configuration date CONFIG_DATE="`date`" +## User doing the configuration CONFIG_USER="`whoami`@`hostname`" if test -n "$ORGANIZATION"; then CONFIG_USER="$CONFIG_USER at $ORGANIZATION" fi +## Configuration mode (production, development, profile, etc) saved above. +## Byte sex from the AC_C_BIGENDIAN macro. if test "X$ac_cv_c_bigendian" = "Xyes"; then BYTESEX="big-endian" @@ -29836,9 +30634,13 @@ else fi +## Parallel support? (set above except empty if none) PARALLEL=${PARALLEL:-no} +## Compiler with version information. This consists of the full path +## name of the compiler and the reported version number. +## Strip anything that looks like a flag off of $CC CC_NOFLAGS=`echo $CC | sed 's/ -.*//'` if `echo $CC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -29857,6 +30659,7 @@ if test -n "$cc_version_info"; then fi +## Strip anything that looks like a flag off of $CC FC_NOFLAGS=`echo $FC | sed 's/ -.*//'` if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -29875,6 +30678,7 @@ if test -n "$fc_version_info"; then fi +## Strip anything that looks like a flag off of $CC CXX_NOFLAGS=`echo $CXX | sed 's/ -.*//'` if `echo $CXX_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -29892,6 +30696,12 @@ if test -n "$cxx_version_info"; then CXX_VERSION="$CXX_VERSION ( $cxx_version_info)" fi +## ---------------------------------------------------------------------- +## Where is the root of the source tree. Give an absolute address so +## we can find it no matter which directory of the distribution is our +## current directory. The built-in pwd fails on some systems, but the +## /bin/pwd version works OK. +## if test -x /bin/pwd; then pwd=/bin/pwd else @@ -29899,8 +30709,16 @@ else fi ROOT="`$pwd`" +## ---------------------------------------------------------------------- +## Move any compiler-specific libraries into the main LIBS varaible. +## LIBS="$DEFAULT_LIBS $LIBS" +## ---------------------------------------------------------------------- +## Determine the runtime libraries we may need to include in the +## libtools command so that executables will find the correct dynamic +## libraries. +## DYNAMIC_DIRS="" if test -n "$AM_LDFLAGS $LDFLAGS"; then @@ -29910,7 +30728,9 @@ if test -n "$AM_LDFLAGS $LDFLAGS"; then d="`echo $d | sed -e 's/-L//g'`" case "$d" in .*) - d=${ROOT}/$d + ## If the path isn't absolute, make it so by + ## prepending the ROOT directory to it. + d=${ROOT}/$d ;; esac DYNAMIC_DIRS="-R${d} $DYNAMIC_DIRS" @@ -29924,7 +30744,9 @@ if test -n "$AM_CPPFLAGS"; then for d in $AM_CPPFLAGS ; do case "$d" in -I.*) - d="`echo $d | sed -e 's/-I//g'`" + ## If the path isn't absolute, make it so by prepending + ## the ROOT directory to it. + d="`echo $d | sed -e 's/-I//g'`" d="-I${ROOT}/${d}" ;; esac @@ -29933,9 +30755,12 @@ if test -n "$AM_CPPFLAGS"; then AM_CPPFLAGS=$TEMP_CPPFLAGS fi +## ---------------------------------------------------------------------- +## Check if they would like the High Level library compiled +## HL="" -# name of fortran folder inside "hl", if FORTRAN compile is requested +## name of fortran folder inside "hl", if FORTRAN compile is requested HL_FOR="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 $as_echo_n "checking if high level library is enabled... " >&6; } @@ -29957,6 +30782,11 @@ else echo "no" fi +## ---------------------------------------------------------------------- +## Some programs shouldn't be built by default (e.g., programs to generate +## data files used by tests, some optional tests). +## Check if they want such programs built anyway. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional programs should be built" >&5 $as_echo_n "checking additional programs should be built... " >&6; } # Check whether --enable-build-all was given. @@ -29981,6 +30811,9 @@ else fi +## ---------------------------------------------------------------------- +## Enable deprecated public API symbols +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if deprecated public symbols are available" >&5 $as_echo_n "checking if deprecated public symbols are available... " >&6; }; @@ -30008,6 +30841,9 @@ $as_echo "#define NO_DEPRECATED_SYMBOLS 1" >>confdefs.h ;; esac +## -------------------------------------------------------------------------- +## Which version of the public APIs should the 'base' versioned symbols use? +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking which version of public symbols to use by default" >&5 @@ -30040,12 +30876,19 @@ else as_fn_error $? "invalid version of public symbols given" "$LINENO" 5 fi +## It's an error to try to disable deprecated public API symbols while +## choosing an older version of the public API as the default. However, +## if the user insists on doing this via the --enable-unsupported configure +## flag, we'll let them. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${DEFAULT_API_VERSION}" != "Xv110" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then as_fn_error $? "Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error." "$LINENO" 5 fi fi +## ---------------------------------------------------------------------- +## Enable strict file format checks +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to perform strict file format checks" >&5 $as_echo_n "checking Whether to perform strict file format checks... " >&6; }; @@ -30055,6 +30898,7 @@ if test "${enable_strict_format_checks+set}" = set; then : fi +## Default to yes if debug is enabled if test "X-$STRICT_CHECKS" = X- ; then if test -z "$DEBUG_PKG" ; then STRICT_CHECKS=no @@ -30080,6 +30924,9 @@ $as_echo "no" >&6; } esac +## ---------------------------------------------------------------------- +## Enable embedded library information +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to have library information embedded in the executables" >&5 $as_echo_n "checking Whether to have library information embedded in the executables... " >&6; } # Check whether --enable-embedded-libinfo was given. @@ -30102,6 +30949,9 @@ $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Check if pointer alignments are enforced +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alignment restrictions are strictly enforced" >&5 $as_echo_n "checking if alignment restrictions are strictly enforced... " >&6; } if test "$cross_compiling" = yes; then : @@ -30183,6 +31033,8 @@ fi +## ---------------------------------------------------------------------- +## Restore user's CFLAGS. CFLAGS="$saved_user_CFLAGS" FCFLAGS="$saved_user_FCFLAGS" CXXFLAGS="$saved_user_CXXFLAGS" @@ -30190,6 +31042,9 @@ CPPFLAGS="$saved_user_CPPFLAGS" LDFLAGS="$saved_user_LDFLAGS" +## ---------------------------------------------------------------------- +## Create automake conditionals to tell automake makefiles which directories +## need to be compiled if test "X$HDF_CXX" = "Xyes"; then BUILD_CXX_CONDITIONAL_TRUE= @@ -30225,26 +31080,37 @@ fi +## ---------------------------------------------------------------------- +## Build the Makefiles. +## +## The directory search list SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"' SEARCH="$SEARCH_RULE`eval $cmd`" export SEARCH +## We don't need to say when we're entering directories if we're using +## GNU make because make does it for us. if test "X$GMAKE" = "Xyes"; then SETX=":" else SETX="set -x" fi +## Some cleanup stuff rm -f conftest conftest.o conftest.c dummy.o *.mod +## Build config.status, touch the stamp files, and build all the Makefiles. +## The order is such that the first `make' does not need to update any +## configuration information. See config/commence.in for the order in which +## things need to be done. -# First the stamp1 file for H5config.h.in +## First the stamp1 file for H5config.h.in mkdir ./config >/dev/null 2>&1 touch ./config/stamp1 -# Then the config.status file (but not makefiles) +## Then the config.status file (but not makefiles) saved_no_create=$no_create no_create=yes @@ -30849,7 +31715,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.127-FA_a5, which was +This file was extended by HDF5 $as_me 1.9.131-FA_a5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30915,7 +31781,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.127-FA_a5 +HDF5 config.status 1.9.131-FA_a5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -31034,7 +31900,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" @@ -31509,7 +32374,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;; - "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;; @@ -32186,7 +33051,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "default-1":C) + "pubconf":C) echo "creating src/H5pubconf.h" sed 's/#define /#define H5_/' pubconf @@ -33693,7 +34558,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.127-FA_a5 +HDF5 config.lt 1.9.131-FA_a5 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -35167,15 +36032,16 @@ $lt_cl_success || as_fn_exit 1 no_create=$saved_no_create -# Then the stamp2 file for H5config.h +## Then the stamp2 file for H5config.h touch ./config/stamp2 -# Finally the makefiles +## Finally the makefiles test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +## Post processing to patch up some deficiencies in libtool case $host_os in linux* | freebsd* ) - # If gcc is not used, need to set $wl to use "-Wl," + ## If gcc is not used, need to set $wl to use "-Wl," if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then : using gcc else @@ -35189,6 +36055,12 @@ EOF ;; esac +## Are we compiling static libraries, shared libraries, or both? This +## is only used for the libhdf5.settings file. We can't just look at +## $enable_static and $enable_shared because if they're yes the ltconfig +## might have decided that one or the other is simply not possible. +## Therefore we have to ask the generated `libtool' shell script +## which 'features' it has enabled. if (./libtool --features | grep '^enable shared libraries' > /dev/null); then enable_shared=yes else @@ -35221,6 +36093,9 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi +## We don't want inline defined for C++ compilers +## Don't worry about the C++ ifdef wrappers in the H5pubconf file, since +## 'H5_inline' isn't a C++ keyword. cat >> src/H5config.h <> src/H5config.h <pubconf @@ -76,10 +81,10 @@ AC_OUTPUT_COMMANDS([ rm -f libhdf5.settings.TMP ]) -dnl It's possible to configure for a host other than the one on which -dnl configure is currently running by using the --host=foo flag. -dnl For machines on which HDF5 is often configured, it can be convenient -dnl to specify the name of the machine rather than its canonical type. +## It's possible to configure for a host other than the one on which +## configure is currently running by using the --host=foo flag. +## For machines on which HDF5 is often configured, it can be convenient +## to specify the name of the machine rather than its canonical type. case $host_alias in redstorm) host_alias=x86_64-redstorm-linux-gnu @@ -89,23 +94,23 @@ esac AC_CANONICAL_HOST AC_SUBST([CPPFLAGS]) -dnl H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but -dnl not exported to h5cc (or h5fc, etc.) +## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but +## not exported to h5cc (or h5fc, etc.) AC_SUBST([H5_CFLAGS]) AC_SUBST([H5_CPPFLAGS]) AC_SUBST([H5_FCFLAGS]) AC_SUBST([H5_CXXFLAGS]) AC_SUBST([H5_LDFLAGS]) -dnl AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, -dnl and WILL be exported to h5cc (or h5fc, etc) if set by configure. +## AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, +## and WILL be exported to h5cc (or h5fc, etc) if set by configure. AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_FCFLAGS]) AC_SUBST([AM_CXXFLAGS]) AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_LDFLAGS]) -dnl Make sure flags are set to something (otherwise macros may set them later). +## Make sure flags are set to something (otherwise macros may set them later). AM_CFLAGS="${AM_CFLAGS}" AM_CXXFLAGS="${AM_CXXFLAGS}" AM_FCFLAGS="${AM_FCFLAGS}" @@ -117,94 +122,89 @@ FCFLAGS="${FCFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" -dnl Configure may need to alter any of the *FLAGS variables in order for -dnl various checks to work correctly. Save the user's value here so it -dnl can be restored once all configure checks are complete. +## Configure may need to alter any of the *FLAGS variables in order for +## various checks to work correctly. Save the user's value here so it +## can be restored once all configure checks are complete. saved_user_CFLAGS="$CFLAGS" saved_user_CXXFLAGS="$CXXFLAGS" saved_user_FCFLAGS="$FCFLAGS" saved_user_LDFLAGS="$LDFLAGS" saved_user_CPPFLAGS="$CPPFLAGS" -dnl Different compilers may need default libraries. They are specified in -dnl the config/* files, so we put this statement here so that it'll be -dnl set by the code which follows... -dnl +## Different compilers may need default libraries. They are specified in +## the config/* files, so we put this statement here so that it'll be +## set by the code which follows... +## DEFAULT_LIBS="" -dnl Support F9X variable to define Fortran compiler if FC variable is -dnl not used. This should be deprecated in the future. +## Support F9X variable to define Fortran compiler if FC variable is +## not used. This should be deprecated in the future. if test "x" = "x$FC"; then FC=${F9X} fi -dnl ---------------------------------------------------------------------- -dnl Set prefix default (install directory) to a directory in the build area. -dnl This allows multiple src-dir builds within one host. -AC_PREFIX_DEFAULT([`pwd`/hdf5]) - -dnl ---------------------------------------------------------------------- -dnl Dump all shell variables values. -dnl +## ---------------------------------------------------------------------- +## Dump all shell variables values. +## AC_MSG_CHECKING([shell variables initial values]) set >&AS_MESSAGE_LOG_FD AC_MSG_RESULT([done]) -dnl Define all symbol variables used for configure summary. -dnl EXTERNAL_FILTERS equals all external filters. Default none. -dnl MPE: whether MPE option is enabled. Default no. -dnl STATIC_EXEC: whether static-exec is enabled. Default no. -dnl HDF_FORTRAN: whether Fortran is enabled. Default no. -dnl HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. -dnl FC: Fortran compiler. -dnl HDF_CXX: whether C++ is enabled. Default no. -dnl CXX: C++ compiler. -dnl HDF5_HL: whether high-level library is enabled. Default is yes. -dnl GPFS: whether gpfs is enabled. Default no. -dnl LARGEFILE: whether largefile support is enabled. Default yes. -dnl INSTRUMENT: whether INSTRUMENT is enabled. No default set here. -dnl CODESTACK: whether CODESTACK is enabled. Default no. -dnl HAVE_DMALLOC: whether system has dmalloc support. Default no. -dnl DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. -dnl THREADSAFE: whether THREADSAFE is enabled. Default no. -dnl STATIC_SHARED: whether static and/or shared libraries are requested. -dnl enable_shared: whether shared lib is enabled. -dnl enable_static: whether static lib is enabled. -dnl UNAME_INFO: System information. - -AC_SUBST(EXTERNAL_FILTERS) -AC_SUBST(MPE) MPE=no -AC_SUBST(STATIC_EXEC) STATIC_EXEC=no -AC_SUBST(HDF_FORTRAN) HDF_FORTRAN=no -AC_SUBST(HDF_FORTRAN2003) HDF_FORTRAN2003=no -AC_SUBST(FC) HDF_FORTRAN=no -AC_SUBST(FC2003) HDF_FORTRAN2003=no -AC_SUBST(HDF_CXX) HDF_CXX=no -AC_SUBST(CXX) HDF_CXX=no -AC_SUBST(HDF5_HL) HDF5_HL=yes -AC_SUBST(GPFS) GPFS=no -AC_SUBST(LARGEFILE) LARGEFILE=yes -AC_SUBST(INSTRUMENT) -AC_SUBST(CODESTACK) CODESTACK=no -AC_SUBST(HAVE_DMALLOC) HAVE_DMALLOC=no -AC_SUBST(DIRECT_VFD) DIRECT_VFD=no -AC_SUBST(THREADSAFE) THREADSAFE=no -AC_SUBST(STATIC_SHARED) -AC_SUBST(enable_shared) -AC_SUBST(enable_static) -AC_SUBST(UNAME_INFO) UNAME_INFO=`uname -a` - -dnl ---------------------------------------------------------------------- -dnl Some platforms have broken basename, and/or xargs programs. Check -dnl that it actually does what it's supposed to do. Catch this early -dnl since configure relies upon them heavily and there's no use continuing -dnl if it's broken. -dnl - -dnl Avoid depending upon Character Ranges. -dnl These are defined by autoconf. -dnl as_cr_letters='abcdefghijklmnopqrstuvwxyz' -dnl as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +## Define all symbol variables used for configure summary. +## EXTERNAL_FILTERS equals all external filters. Default none. +## MPE: whether MPE option is enabled. Default no. +## STATIC_EXEC: whether static-exec is enabled. Default no. +## HDF_FORTRAN: whether Fortran is enabled. Default no. +## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. +## FC: Fortran compiler. +## HDF_CXX: whether C++ is enabled. Default no. +## CXX: C++ compiler. +## HDF5_HL: whether high-level library is enabled. Default is yes. +## GPFS: whether gpfs is enabled. Default no. +## LARGEFILE: whether largefile support is enabled. Default yes. +## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. +## CODESTACK: whether CODESTACK is enabled. Default no. +## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. +## THREADSAFE: whether THREADSAFE is enabled. Default no. +## STATIC_SHARED: whether static and/or shared libraries are requested. +## enable_shared: whether shared lib is enabled. +## enable_static: whether static lib is enabled. +## UNAME_INFO: System information. + +AC_SUBST([EXTERNAL_FILTERS]) +AC_SUBST([MPE]) MPE=no +AC_SUBST([STATIC_EXEC]) STATIC_EXEC=no +AC_SUBST([HDF_FORTRAN]) HDF_FORTRAN=no +AC_SUBST([HDF_FORTRAN2003]) HDF_FORTRAN2003=no +AC_SUBST([FC]) HDF_FORTRAN=no +AC_SUBST([FC2003]) HDF_FORTRAN2003=no +AC_SUBST([HDF_CXX]) HDF_CXX=no +AC_SUBST([CXX]) HDF_CXX=no +AC_SUBST([HDF5_HL]) HDF5_HL=yes +AC_SUBST([GPFS]) GPFS=no +AC_SUBST([LARGEFILE]) LARGEFILE=yes +AC_SUBST([INSTRUMENT]) +AC_SUBST([CODESTACK]) CODESTACK=no +AC_SUBST([HAVE_DMALLOC]) HAVE_DMALLOC=no +AC_SUBST([DIRECT_VFD]) DIRECT_VFD=no +AC_SUBST([THREADSAFE]) THREADSAFE=no +AC_SUBST([STATIC_SHARED]) +AC_SUBST([enable_shared]) +AC_SUBST([enable_static]) +AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` + +## ---------------------------------------------------------------------- +## Some platforms have broken basename, and/or xargs programs. Check +## that it actually does what it's supposed to do. Catch this early +## since configure relies upon them heavily and there's no use continuing +## if it's broken. +## + +## Avoid depending upon Character Ranges. +## These are defined by autoconf. +## as_cr_letters='abcdefghijklmnopqrstuvwxyz' +## as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' AC_MSG_CHECKING([if basename works]) BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`" @@ -222,35 +222,35 @@ else AC_MSG_RESULT([yes]) fi -dnl ---------------------------------------------------------------------- -dnl Check that the cache file was build on the same host as what we're -dnl running on now. -dnl +## ---------------------------------------------------------------------- +## Check that the cache file was build on the same host as what we're +## running on now. +## AC_CACHE_CHECK([for cached host], [hdf5_cv_host], [hdf5_cv_host="none"]); if test $hdf5_cv_host = "none"; then hdf5_cv_host=$host elif test $hdf5_cv_host != $host; then echo "The config.cache file was generated on $hdf5_cv_host but" echo "this is $host. Please remove that file and try again." - AC_MSG_ERROR(config.cache file is invalid) + AC_MSG_ERROR([config.cache file is invalid]) fi -dnl ---------------------------------------------------------------------- -dnl Source any special files that we need. These files normally aren't -dnl present but can be used by the maintainers to fine tune things like -dnl turning on debug or profiling flags for the compiler. The search order -dnl is: -dnl -dnl CPU-VENDOR-OS -dnl VENDOR-OS -dnl CPU-OS -dnl CPU-VENDOR -dnl OS -dnl VENDOR -dnl CPU -dnl -dnl If the `OS' ends with a version number then remove it. For instance, -dnl `freebsd3.1' would become `freebsd' +## ---------------------------------------------------------------------- +## Source any special files that we need. These files normally aren't +## present but can be used by the maintainers to fine tune things like +## turning on debug or profiling flags for the compiler. The search order +## is: +## +## CPU-VENDOR-OS +## VENDOR-OS +## CPU-OS +## CPU-VENDOR +## OS +## VENDOR +## CPU +## +## If the `OS' ends with a version number then remove it. For instance, +## `freebsd3.1' would become `freebsd' case $host_os in aix*) @@ -304,7 +304,7 @@ if test "X$host_config" != "Xnone"; then . $host_config fi -dnl Source any special site-specific file +## Source any special site-specific file hname="`hostname`" while test -n "$hname"; do file=$srcdir/config/site-specific/host-$hname @@ -320,39 +320,39 @@ while test -n "$hname"; do test "$hname_tmp" = "$hname" && break done -dnl ---------------------------------------------------------------------- -dnl Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so -dnl we need to add this in so configure works as intended. We will need to -dnl reset this value at the end of configure, to preserve the user's settings. +## ---------------------------------------------------------------------- +## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so +## we need to add this in so configure works as intended. We will need to +## reset this value at the end of configure, to preserve the user's settings. CFLAGS="${AM_CFLAGS} ${CFLAGS}" FCFLAGS="${AM_FCFLAGS} ${FCFLAGS}" CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}" LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" -dnl ---------------------------------------------------------------------- -dnl Enable dependency tracking unless the configure options or a -dnl site-specific file told us not to. This prevents configure from -dnl silently disabling dependencies for some compilers. -dnl +## ---------------------------------------------------------------------- +## Enable dependency tracking unless the configure options or a +## site-specific file told us not to. This prevents configure from +## silently disabling dependencies for some compilers. +## if test -z "${enable_dependency_tracking}"; then enable_dependency_tracking="yes" fi -dnl ---------------------------------------------------------------------- -dnl Check for programs. -dnl +## ---------------------------------------------------------------------- +## Check for programs. +## AC_PROG_CC CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" -dnl ---------------------------------------------------------------------------- -dnl Configure disallows unsupported combinations of options. However, users -dnl may want to override and build with unsupported combinations for their -dnl own use. They can use the --enable-unsupported configure flag, which -dnl ignores any errors from configure due to incompatible flags. +## ---------------------------------------------------------------------------- +## Configure disallows unsupported combinations of options. However, users +## may want to override and build with unsupported combinations for their +## own use. They can use the --enable-unsupported configure flag, which +## ignores any errors from configure due to incompatible flags. AC_MSG_CHECKING([if unsupported combinations of configure options are allowed]) AC_ARG_ENABLE([unsupported], - [AC_HELP_STRING([--enable-unsupported], + [AS_HELP_STRING([--enable-unsupported], [Allow unsupported combinations of configure options])], [ALLOW_UNSUPPORTED=$enableval]) @@ -367,13 +367,13 @@ case "X-$ALLOW_UNSUPPORTED" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like the Fortran interface compiled -dnl +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" AC_MSG_CHECKING([if Fortran interface enabled]) AC_ARG_ENABLE([fortran], - [AC_HELP_STRING([--enable-fortran], + [AS_HELP_STRING([--enable-fortran], [Compile the Fortran 77/90/95 interface [default=no]])], [HDF_FORTRAN=$enableval]) @@ -384,18 +384,18 @@ else fi -dnl ---------------------------------------------------------------------- -dnl Check if they would like the Fortran 2003 interface compiled -dnl +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## AC_MSG_CHECKING([if Fortran 2003 interface enabled]) AC_ARG_ENABLE([fortran2003], - [AC_HELP_STRING([--enable-fortran2003], + [AS_HELP_STRING([--enable-fortran2003], [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])], [HDF_FORTRAN2003=$enableval]) -dnl ---------------------------------------------------------------------- -dnl Check to make sure --enable-fortran is present if --enable-fortran2003 -dnl was specified +## ---------------------------------------------------------------------- +## Check to make sure --enable-fortran is present if --enable-fortran2003 +## was specified if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" @@ -409,20 +409,20 @@ FORTRAN_DEFAULT_REALisDBLE="no" if test "X$HDF_FORTRAN" = "Xyes"; then - AC_SUBST(FC) HDF_FORTRAN=yes + AC_SUBST([FC]) HDF_FORTRAN=yes AC_SUBST([HAVE_FORTRAN_2003]) HDF5_INTERFACES="$HDF5_INTERFACES fortran" - dnl -------------------------------------------------------------------- - dnl Default for FORTRAN 2003 compliant compilers - dnl + ## -------------------------------------------------------------------- + ## Default for FORTRAN 2003 compliant compilers + ## HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" - dnl -------------------------------------------------------------------- - dnl HDF5 integer variables for the H5fortran_types.f90 file. - dnl + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## AC_SUBST([R_LARGE]) AC_SUBST([R_INTEGER]) AC_SUBST([HADDR_T]) @@ -432,42 +432,42 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([SIZE_T]) AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) - dnl -------------------------------------------------------------------- - dnl General Fortran flags - dnl + ## -------------------------------------------------------------------- + ## General Fortran flags + ## AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" FCFLAGS="${FCFLAGS} ${FFLAGS}" - dnl -------------------------------------------------------------------- - dnl Fortran source extention - dnl + ## -------------------------------------------------------------------- + ## Fortran source extention + ## AC_FC_SRCEXT([f90]) AC_SUBST([F9XSUFFIXFLAG]) AC_SUBST([FSEARCH_DIRS]) - dnl -------------------------------------------------------------------- - dnl Check for a Fortran 9X compiler and how to include modules. - dnl + ## -------------------------------------------------------------------- + ## Check for a Fortran 9X compiler and how to include modules. + ## AC_PROG_FC([f90 pgf90 slf90 f95 g95 xlf95 efc ifort ftn],) AC_F9X_MODS - dnl It seems that libtool (as of Libtool 1.5.14) is trying to - dnl configure itself for Fortran 77. - dnl Tell it that our F77 compiler is $FC (actually a F9X compiler) + ## It seems that libtool (as of Libtool 1.5.14) is trying to + ## configure itself for Fortran 77. + ## Tell it that our F77 compiler is $FC (actually a F9X compiler) F77=$FC - dnl Change to the Fortran 90 language + ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) - dnl -------------------------------------------------------------------- - dnl Define wrappers for the C compiler to use Fortran function names - dnl + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## AC_FC_WRAPPERS - dnl -------------------------------------------------------------------- - dnl See if the compiler will support the "-I." option - dnl + ## -------------------------------------------------------------------- + ## See if the compiler will support the "-I." option + ## dnl AM_FCFLAGS_saved=$AM_FCFLAGS dnl AM_FCFLAGS="${AM_FCFLAGS} -I." @@ -479,20 +479,20 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl AC_MSG_RESULT(no) dnl AM_FCFLAGS="$AM_FCFLAGS_saved") - dnl -------------------------------------------------------------------- - dnl See if the fortran compiler supports the intrinsic function "SIZEOF" + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) AC_TRY_RUN([ PROGRAM main i = sizeof(x) END PROGRAM - ], [AC_MSG_RESULT(yes) + ], [AC_MSG_RESULT([yes]) HAVE_SIZEOF="yes"], - AC_MSG_RESULT(no)) + [AC_MSG_RESULT([no])]) - dnl Check to see if -r8 was specified to determine if we need to - dnl compile the DOUBLE PRECISION interfaces. + ## Check to see if -r8 was specified to determine if we need to + ## compile the DOUBLE PRECISION interfaces. AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) @@ -518,14 +518,14 @@ if test "X$HDF_FORTRAN" = "Xyes"; then CALL h5t(d) END PROGRAM main ], - AC_MSG_RESULT(no), - [AC_MSG_RESULT(yes) - FORTRAN_DEFAULT_REALisDBLE="yes"]) + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + FORTRAN_DEFAULT_REALisDBLE="yes"]) if test "X$HDF_FORTRAN2003" = "Xyes"; then - dnl Checking if the compiler supports the required Fortran 2003 features and - dnl disable Fortran 2003 if it does not. + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) HAVE_FORTRAN_2003="no" @@ -541,43 +541,41 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ptr = C_LOC(ichr(1:1)) ])], - [AC_MSG_RESULT(yes) - HAVE_F2003_REQUIREMENTS=[yes]], - [AC_MSG_RESULT(no)]) - + [AC_MSG_RESULT([yes]) + HAVE_F2003_REQUIREMENTS=[yes]], + [AC_MSG_RESULT([no])]) if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - dnl echo $HAVE_FORTRAN_2003 + ## echo $HAVE_FORTRAN_2003 AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) else + ## echo $HAVE_FORTRAN_2003 HAVE_FORTRAN_2003="yes" - dnl echo $HAVE_FORTRAN_2003 fi - fi else FC="no" fi -dnl Change back to the C language +## Change back to the C language AC_LANG_POP(Fortran) AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF" = "Xyes"]) AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Check if they would like the C++ interface compiled -dnl -dnl We need to check for a C++ compiler unconditionally, since -dnl AC_PROG_CXX defines some macros that Automake 1.9.x uses and will -dnl miss even if c++ is not enabled. +## ---------------------------------------------------------------------- +## Check if they would like the C++ interface compiled +## +## We need to check for a C++ compiler unconditionally, since +## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will +## miss even if c++ is not enabled. AC_PROG_CXX - AC_PROG_CXXCPP dnl this is checked for when AC_HEADER_STDC is done + AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done AC_MSG_CHECKING([if c++ interface enabled]) AC_ARG_ENABLE([cxx], - [AC_HELP_STRING([--enable-cxx], + [AS_HELP_STRING([--enable-cxx], [Compile the C++ interface [default=no]])], [HDF_CXX=$enableval]) @@ -585,7 +583,7 @@ if test "X$HDF_CXX" = "Xyes"; then echo "yes" HDF5_INTERFACES="$HDF5_INTERFACES c++" - dnl Change to the C++ language + ## Change to the C++ language AC_LANG_PUSH(C++) AC_MSG_CHECKING([if $CXX needs old style header files in includes]) @@ -694,41 +692,41 @@ else CXX="no" fi -dnl Change back to the C language +## Change back to the C language AC_LANG_POP(C++) -dnl ---------------------------------------------------------------------- -dnl Check if they have Perl installed on their system. We only need Perl -dnl if they're using a GNU compiler. -dnl +## ---------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## AC_SUBST([PERL]) PERL="" if test "X$GCC" = "Xyes"; then AC_CHECK_PROGS([PERL], [perl],, [$PATH]) fi -dnl ---------------------------------------------------------------------- -dnl Check which archiving tool to use. This needs to be done before -dnl the AM_PROG_LIBTOOL macro. -dnl +## ---------------------------------------------------------------------- +## Check which archiving tool to use. This needs to be done before +## the AM_PROG_LIBTOOL macro. +## if test -z "$AR"; then AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH]) fi AC_SUBST([AR]) -dnl Export the AR macro so that it will be placed in the libtool file -dnl correctly. +## Export the AR macro so that it will be placed in the libtool file +## correctly. export AR AC_PROG_MAKE_SET AC_PROG_INSTALL -dnl ---------------------------------------------------------------------- -dnl Check that the tr utility is working properly. +## ---------------------------------------------------------------------- +## Check that the tr utility is working properly. -AC_PATH_PROG(TR, tr) +AC_PATH_PROG([TR], [tr]) TR_TEST=`echo Test | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "` if test "X${TR_TEST}" != "XTEST"; then @@ -736,10 +734,10 @@ if test "X${TR_TEST}" != "XTEST"; then fi -dnl ---------------------------------------------------------------------- -dnl Check that time can be used with srcdir. This is okay on most systems, -dnl but seems to cause problems on Cygwin. -dnl The solution on Cygwin is not to record execution time for tests. +## ---------------------------------------------------------------------- +## Check that time can be used with srcdir. This is okay on most systems, +## but seems to cause problems on Cygwin. +## The solution on Cygwin is not to record execution time for tests. AC_MSG_CHECKING([if srcdir= and time commands work together]) AC_SUBST([TIME]) @@ -754,62 +752,62 @@ else fi -dnl The following variables are used to distinguish between building a -dnl serial and parallel library. -dnl -dnl HAVE_PARALLEL -- defined in H5config.h if we are building -dnl a parallel library even if configure wasn't -dnl able to find some header file or library that -dnl might be required. This is defined if the -dnl compiler looks like a parallel compiler (e.g., -dnl mpicc or mpcc) or if the user explicitly states -dnl that a parallel library is being built by supplying -dnl the `--enable-parallel' configure switch. -dnl -dnl PARALLEL -- This variable is set to a non-null value if -dnl configure thinks we're compiling a parallel -dnl version of the library. -dnl -dnl RUNSERIAL -- This is a command which will be prepended to -dnl the executable name to run the executable using -dnl a single process. For serial versions of the -dnl library this will normally be empty. For parallel -dnl versions it might be something like `mpiexec -n 1'. -dnl The value of this variable is substituted in *.in -dnl files. -dnl -dnl RUNPARALLEL -- This is a command which will be prepended to -dnl the executable name to run the executable on -dnl multiple processors. For the serial library the -dnl value will normally be the empty string. For -dnl parallel library it should be something like -dnl "mpiexec -n \$\${NPROCS:=6}" where NPROCS will -dnl eventually contain the number of processors on which -dnl to run the executable (the double dollarsigns are to -dnl protect the expansion until make executes the -dnl command). The value of this variable is -dnl substituted in *.in files. -dnl +## The following variables are used to distinguish between building a +## serial and parallel library. +## +## HAVE_PARALLEL -- defined in H5config.h if we are building +## a parallel library even if configure wasn't +## able to find some header file or library that +## might be required. This is defined if the +## compiler looks like a parallel compiler (e.g., +## mpicc or mpcc) or if the user explicitly states +## that a parallel library is being built by supplying +## the `--enable-parallel' configure switch. +## +## PARALLEL -- This variable is set to a non-null value if +## configure thinks we're compiling a parallel +## version of the library. +## +## RUNSERIAL -- This is a command which will be prepended to +## the executable name to run the executable using +## a single process. For serial versions of the +## library this will normally be empty. For parallel +## versions it might be something like `mpiexec -n 1'. +## The value of this variable is substituted in *.in +## files. +## +## RUNPARALLEL -- This is a command which will be prepended to +## the executable name to run the executable on +## multiple processors. For the serial library the +## value will normally be the empty string. For +## parallel library it should be something like +## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will +## eventually contain the number of processors on which +## to run the executable (the double dollarsigns are to +## protect the expansion until make executes the +## command). The value of this variable is +## substituted in *.in files. +## AC_SUBST([PARALLEL]) AC_SUBST([RUNSERIAL]) AC_SUBST([RUNPARALLEL]) AC_SUBST([TESTPARALLEL]) -dnl ---------------------------------------------------------------------- -dnl If the compiler is obviously a parallel compiler then we're building -dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, -dnl the name of the compiler might tell us how to run the resulting -dnl executable. For `mpicc' the executable should be run with `mpiexec' from -dnl the same directory as mpicc if it exists. -dnl +## ---------------------------------------------------------------------- +## If the compiler is obviously a parallel compiler then we're building +## a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, +## the name of the compiler might tell us how to run the resulting +## executable. For `mpicc' the executable should be run with `mpiexec' from +## the same directory as mpicc if it exists. +## case "$CC_BASENAME" in mpicc) - dnl The mpich compiler. Use mpiexec from the same directory if it - dnl exists. + ## The mpich compiler. Use mpiexec from the same directory if it + ## exists. PARALLEL=mpicc AC_MSG_CHECKING([for mpiexec]) - dnl Find the path where mpicc is located. + ## Find the path where mpicc is located. cmd="`echo $CC | cut -f1 -d' '`" if (echo $cmd | grep / >/dev/null); then path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" @@ -821,7 +819,7 @@ case "$CC_BASENAME" in done fi - dnl Is there an mpiexec at that path? + ## Is there an mpiexec at that path? if test -x $path/mpiexec; then AC_MSG_RESULT([$path/mpiexec]) RUNSERIAL="${RUNSERIAL:-none}" @@ -835,36 +833,36 @@ case "$CC_BASENAME" in ;; mpcc|mpcc_r) - dnl The IBM compiler + ## The IBM compiler PARALLEL="$CC_BASENAME" ;; *) - dnl Probably not a parallel compiler, but if `--enable-parallel' - dnl is defined below then we're still building a parallel hdf5. + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. ;; esac -dnl ---------------------------------------------------------------------- -dnl If the Fortran compiler is obviously a parallel compiler then we're -dnl building a parallel version of hdf5 and should define HAVE_PARALLEL. -dnl Furthermore, the name of the compiler might tell us how to run the -dnl resulting executable. For `mpif90' the executable should be run with -dnl `mpiexec' from the same directory as mpif90 if it exists. -dnl +## ---------------------------------------------------------------------- +## If the Fortran compiler is obviously a parallel compiler then we're +## building a parallel version of hdf5 and should define HAVE_PARALLEL. +## Furthermore, the name of the compiler might tell us how to run the +## resulting executable. For `mpif90' the executable should be run with +## `mpiexec' from the same directory as mpif90 if it exists. +## if test "X$HDF_FORTRAN" = "Xyes" ; then - dnl Change to the Fortran 90 language + ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) case "$FC" in *mpif90*) - dnl The Fortran mpich compiler. Use mpiexec from the same directory - dnl if it exists. + ## The Fortran mpich compiler. Use mpiexec from the same directory + ## if it exists. PARALLEL=mpif90 AC_MSG_CHECKING([for mpiexec]) - dnl Find the path where mpif90 is located. + ## Find the path where mpif90 is located. cmd=`echo $FC |cut -f1 -d' '` if (echo $cmd |grep / >/dev/null); then path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" @@ -876,7 +874,7 @@ if test "X$HDF_FORTRAN" = "Xyes" ; then done fi - dnl Is there an mpiexec at that path? + ## Is there an mpiexec at that path? if test -x $path/mpiexec; then AC_MSG_RESULT([$path/mpiexec]) RUNSERIAL="${RUNSERIAL:-none}" @@ -890,23 +888,23 @@ if test "X$HDF_FORTRAN" = "Xyes" ; then ;; *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - dnl The IBM compiler + ## The IBM compiler PARALLEL="$FC" ;; *) - dnl Probably not a parallel compiler, but if `--enable-parallel' - dnl is defined below then we're still building a parallel hdf5. + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. ;; esac - dnl Change to the C language + ## Change to the C language AC_LANG_POP(Fortran) fi -dnl ----------------------------------------------------------------------------- -dnl If shared libraries are being used with parallel, disable them, unless the -dnl user explicity enables them via the '--enable-shared' option. +## ----------------------------------------------------------------------------- +## If shared libraries are being used with parallel, disable them, unless the +## user explicity enables them via the '--enable-shared' option. if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then echo ' shared libraries disabled in parallel' @@ -920,17 +918,17 @@ elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then echo ' shared libraries explicitly enabled by user' fi -dnl ---------------------------------------------------------------------- -dnl Fortran libraries are not currently supported on Mac. Disable them. -dnl (this is overridable with --enable-unsupported). -dnl +## ---------------------------------------------------------------------- +## Fortran libraries are not currently supported on Mac. Disable them. +## (this is overridable with --enable-unsupported). +## AC_SUBST([H5_FORTRAN_SHARED]) H5_FORTRAN_SHARED="no" if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then AC_MSG_CHECKING([if shared Fortran libraries are supported]) H5_FORTRAN_SHARED="yes" - dnl Disable fortran shared libraries on Mac. (MAM - 03/30/11) + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) case "`uname`" in Darwin*) @@ -939,7 +937,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then ;; esac - dnl Report results of check(s) + ## Report results of check(s) if test "X${H5_FORTRAN_SHARED}" = "Xno"; then AC_MSG_RESULT([no]) @@ -961,23 +959,23 @@ fi AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Disable C++ shared libraries if +DD64 flag is detected. -dnl +## ---------------------------------------------------------------------- +## Disable C++ shared libraries if +DD64 flag is detected. +## AC_SUBST([H5_CXX_SHARED]) H5_CXX_SHARED="no" if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then AC_MSG_CHECKING([if shared C++ libraries are supported]) H5_CXX_SHARED="yes" - dnl Disable C++ shared libraries if DD64 flag is being used. + ## Disable C++ shared libraries if DD64 flag is being used. if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then H5_CXX_SHARED="no" CHECK_WARN="Shared C++ libraries not currently supported with +DD64 flag." fi - dnl Report results of check(s) + ## Report results of check(s) if test "X${H5_CXX_SHARED}" = "Xno"; then AC_MSG_RESULT([no]) @@ -998,20 +996,20 @@ fi AM_CONDITIONAL([CXX_SHARED_CONDITIONAL], [test "X$H5_CXX_SHARED" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect -dnl these versions and add option "-Mx,28,0x8" to the compiler to avoid -dnl the problem if optimization is enabled. -dnl +## ---------------------------------------------------------------------- +## pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect +## these versions and add option "-Mx,28,0x8" to the compiler to avoid +## the problem if optimization is enabled. +## if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then echo 'adding compiler flag to avoid optimization problem in pgcc' CC="${CC-cc} -Mx,28,0x8" fi -dnl ---------------------------------------------------------------------- -dnl Shared libraries are not currently supported under Cygwin, so configure -dnl disables them unless --enable-unsupported has been supplied by the user. +## ---------------------------------------------------------------------- +## Shared libraries are not currently supported under Cygwin, so configure +## disables them unless --enable-unsupported has been supplied by the user. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then case "`uname`" in @@ -1026,32 +1024,32 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then esac fi -dnl ---------------------------------------------------------------------- -dnl Windows won't create DLLs without the following macro. -dnl +## ---------------------------------------------------------------------- +## Windows won't create DLLs without the following macro. +## AC_LIBTOOL_WIN32_DLL -dnl ---------------------------------------------------------------------- -dnl Create libtool. If shared/static libraries are going to be enabled -dnl or disabled, it should happen before these macros. -AC_LIBTOOL_DLOPEN -AM_PROG_LIBTOOL - -dnl ---------------------------------------------------------------------- -dnl Check if we should install only statically linked executables. -dnl This check needs to occur after libtool is initialized because -dnl we check a libtool cache value and may issue a warning based -dnl on its result. +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. +LT_PREREQ([2.2]) +LT_INIT([dlopen]) + +## ---------------------------------------------------------------------- +## Check if we should install only statically linked executables. +## This check needs to occur after libtool is initialized because +## we check a libtool cache value and may issue a warning based +## on its result. AC_MSG_CHECKING([if we should install only statically linked executables]) AC_ARG_ENABLE([static_exec], - [AC_HELP_STRING([--enable-static-exec], + [AS_HELP_STRING([--enable-static-exec], [Install only statically linked executables [default=no]])], [STATIC_EXEC=$enableval]) if test "X$STATIC_EXEC" = "Xyes"; then echo "yes" - dnl Issue a warning if -static flag is not supported. + ## Issue a warning if -static flag is not supported. if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." fi @@ -1063,22 +1061,22 @@ fi AC_SUBST([LT_STATIC_EXEC]) -dnl Fix up the INSTALL macro if it's a relative path. We want the -dnl full-path to the binary instead. +## Fix up the INSTALL macro if it's a relative path. We want the +## full-path to the binary instead. case "$INSTALL" in *install-sh*) INSTALL='\${top_srcdir}/bin/install-sh -c' ;; esac -dnl ---------------------------------------------------------------------- -dnl Some users have reported problems with libtool's use of '-Wl,-rpath' to -dnl link shared libraries in nondefault directories. Allow users to -dnl disable embedding the rpath information in the executables and to -dnl instead solely rely on the information in LD_LIBRARY_PATH. +## ---------------------------------------------------------------------- +## Some users have reported problems with libtool's use of '-Wl,-rpath' to +## link shared libraries in nondefault directories. Allow users to +## disable embedding the rpath information in the executables and to +## instead solely rely on the information in LD_LIBRARY_PATH. AC_MSG_CHECKING([if -Wl,-rpath should be used to link shared libs in nondefault directories]) AC_ARG_ENABLE([sharedlib-rpath], - [AC_HELP_STRING([--disable-sharedlib-rpath], + [AS_HELP_STRING([--disable-sharedlib-rpath], [Disable use of the '=Wl,-rpath' linker option])], [RPATH=$enableval]) @@ -1100,14 +1098,14 @@ esac AC_MSG_CHECKING([make]) -dnl ---------------------------------------------------------------------- -dnl Sometimes makes think the `.PATH:' appearing before the first rule -dnl with an action should override the `all' default target. So we have -dnl to decide what the proper syntax is. -dnl +## ---------------------------------------------------------------------- +## Sometimes makes think the `.PATH:' appearing before the first rule +## with an action should override the `all' default target. So we have +## to decide what the proper syntax is. +## AC_MSG_CHECKING([how make searches directories]) while true; do #for break - # The most common method is `VPATH=DIR1 DIR2 ...' + ## The most common method is `VPATH=DIR1 DIR2 ...' cat >maketest <maketest <maketest < and are needed on the DEC - dnl Alpha to turn off UAC fixing. We do *not* attempt to - dnl locate these files on other systems because there are too - dnl many problems with including them. + ## The and are needed on the DEC + ## Alpha to turn off UAC fixing. We do *not* attempt to + ## locate these files on other systems because there are too + ## many problems with including them. AC_CHECK_HEADERS([sys/sysinfo.h sys/proc.h]) ;; mips*-sgi*-irix*) - dnl The is needed on the SGI machines to turn off - dnl denormalized floating-point values going to zero. We do *not* - dnl attempt to dnl locate these files on other systems because there - dnl may be problems with including them. + ## The is needed on the SGI machines to turn off + ## denormalized floating-point values going to zero. We do *not* + ## attempt to locate these files on other systems because there + ## may be problems with including them. AC_CHECK_HEADERS([sys/fpu.h]) AC_CHECK_FUNCS([get_fpc_csr]) ;; esac -dnl ---------------------------------------------------------------------- -dnl Some platforms require that all symbols are resolved when a library -dnl is linked. We can use the -no-undefined flag to tell libtool that -dnl it will be able to build shared libraries on these architectures, -dnl as it will not do so by default. -dnl +## ---------------------------------------------------------------------- +## Some platforms require that all symbols are resolved when a library +## is linked. We can use the -no-undefined flag to tell libtool that +## it will be able to build shared libraries on these architectures, +## as it will not do so by default. +## if test "X${enable_shared}" = "Xyes"; then AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared libraries]) case "`uname`" in CYGWIN*|MINGW*|AIX*) - dnl Add in the -no-undefined flag to LDFLAGS for libtool. + ## Add in the -no-undefined flag to LDFLAGS for libtool. AC_MSG_RESULT([yes]) H5_LDFLAGS="$H5_LDFLAGS -no-undefined" ;; *) - dnl Don't add in anything. + ## Don't add in anything. AC_MSG_RESULT([no]) ;; esac fi -dnl ---------------------------------------------------------------------- -dnl Test for Largefile support. -dnl +## ---------------------------------------------------------------------- +## Test for Largefile support. +## AC_MSG_CHECKING([if configure should try to set up large file support]) AC_ARG_ENABLE([largefile], - [AC_HELP_STRING([--disable-largefile], + [AS_HELP_STRING([--disable-largefile], [omit support for large files])]) -dnl If largefile support is enabled, then set up appropriate compiler options. +## If largefile support is enabled, then set up appropriate compiler options. if test "$enable_largefile" != no; then - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) - dnl Check for needed compiler options. This check is pulled drectly - dnl from autoconf's AC_SYS_LARGEFILE macro, as of Autoconf v2.65. + ## Check for needed compiler options. This check is pulled drectly + ## from autoconf's AC_SYS_LARGEFILE macro, as of Autoconf v2.65. AC_CACHE_CHECK([for special C compiler options needed for large files], ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) - AC_COMPILE_IFELSE([], [break]) - CC="$CC -n32" - AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) - break + ## IRIX 6.2 and later do not support large files by default, + ## so use the C compiler's -n32 option if that helps. + AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) + AC_COMPILE_IFELSE([], [break]) + CC="$CC -n32" + AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -1370,29 +1368,29 @@ if test "$enable_largefile" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - dnl Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines - dnl that might need to be set for largefile support to behave - dnl correctly. This macro is defined in acsite.m4 and overrides - dnl the version provided by Autoconf (as of v2.65). The custom - dnl macro additionally adds the appropriate defines to AM_CPPFLAGS - dnl so that later configure checks have them visible. + ## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines + ## that might need to be set for largefile support to behave + ## correctly. This macro is defined in acsite.m4 and overrides + ## the version provided by Autoconf (as of v2.65). The custom + ## macro additionally adds the appropriate defines to AM_CPPFLAGS + ## so that later configure checks have them visible. - dnl Check for _FILE_OFFSET_BITS - _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, - ac_cv_sys_file_offset_bits, + ## Check for _FILE_OFFSET_BITS + _AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64], + [ac_cv_sys_file_offset_bits], [Number of bits in a file offset, on hosts where this is settable.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - dnl Check for _LARGE_FILES - if test $ac_cv_sys_file_offset_bits = unknown; then - _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, + ## Check for _LARGE_FILES + if test "$ac_cv_sys_file_offset_bits" = unknown; then + _AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1], + [ac_cv_sys_large_files], [Define for large files, on AIX-style hosts.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi - dnl Now actually test to see if we can create large files after we've - dnl checked for any needed defines. + ## Now actually test to see if we can create large files after we've + ## checked for any needed defines. AC_MSG_CHECKING([if large (64-bit) files are supported on this system.]) AC_CACHE_VAL([hdf5_cv_have_lfs], [AC_TRY_RUN([ @@ -1424,52 +1422,52 @@ if test "$enable_largefile" != no; then else LARGEFILE="no" - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Add necessary defines for Linux Systems. -dnl +## ---------------------------------------------------------------------- +## Add necessary defines for Linux Systems. +## case "$host_cpu-$host_vendor-$host_os" in *linux*) - dnl If largefile support is enabled, then make available various - dnl LFS-related routines using the following _LARGEFILE*_SOURCE macros. + ## If largefile support is enabled, then make available various + ## LFS-related routines using the following _LARGEFILE*_SOURCE macros. if test "X$LARGEFILE" != "Xno"; then AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" fi - dnl Add POSIX support on Linux systems, so defines - dnl __USE_POSIX, which is required to get the prototype for fdopen - dnl defined correctly in . - dnl This flag was removed from h5cc as of 2009-10-17 when it was found - dnl that the flag broke compiling netCDF-4 code with h5cc, but kept in - dnl H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen - dnl is used only by H5_debug_mask which is used only when debugging in - dnl H5_init_library (all in H5.c). When the flag was removed this was - dnl the only compile failure noted. - dnl This was originally defined as _POSIX_SOURCE which was updated to - dnl _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - dnl functionality so clock_gettime and CLOCK_MONOTONIC are defined - dnl correctly. - dnl POSIX feature information can be found in the gcc manual at: - dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## Add POSIX support on Linux systems, so defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in . + ## This flag was removed from h5cc as of 2009-10-17 when it was found + ## that the flag broke compiling netCDF-4 code with h5cc, but kept in + ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen + ## is used only by H5_debug_mask which is used only when debugging in + ## H5_init_library (all in H5.c). When the flag was removed this was + ## the only compile failure noted. + ## This was originally defined as _POSIX_SOURCE which was updated to + ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX + ## functionality so clock_gettime and CLOCK_MONOTONIC are defined + ## correctly. + ## POSIX feature information can be found in the gcc manual at: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS" - dnl Also add BSD support on Linux systems, so defines - dnl __USE_BSD, which is required to get the prototype for strdup - dnl defined correctly in and snprintf & vsnprintf defined - dnl correctly in - dnl Linking to the bsd-compat library is required as per the gcc manual: - dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - dnl however, we do not do this since it breaks the big test on some - dnl older platforms. + ## Also add BSD support on Linux systems, so defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in and snprintf & vsnprintf defined + ## correctly in + ## Linking to the bsd-compat library is required as per the gcc manual: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## however, we do not do this since it breaks the big test on some + ## older platforms. AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" ;; esac -dnl Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible -dnl for configure checks. -dnl Note: Both will be restored by the end of configure. +## Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible +## for configure checks. +## Note: Both will be restored by the end of configure. CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" @@ -1477,7 +1475,7 @@ AC_TRY_COMPILE([#include ], [off64_t n = 0;], [AC_CHECK_FUNCS([lseek64 fseeko64 ftello64 ftruncate64])], [AC_MSG_RESULT([skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined])]) -AC_CHECK_FUNCS(fseeko ftello) +AC_CHECK_FUNCS([fseeko ftello]) AC_TRY_COMPILE([ #include #include ], @@ -1485,13 +1483,19 @@ AC_TRY_COMPILE([ [AC_CHECK_FUNCS([stat64 fstat64])], [AC_MSG_RESULT([skipping test for stat64() and fstat64()])]) -dnl ---------------------------------------------------------------------- -dnl Data types and their sizes. -dnl +## ---------------------------------------------------------------------- +## Data types and their sizes. +## AC_TYPE_OFF_T -AC_CHECK_TYPE([size_t], [unsigned long]) -AC_CHECK_TYPE([ssize_t], [long]) -AC_CHECK_TYPE([ptrdiff_t], [long]) +AC_CHECK_TYPE([size_t], [], + [AC_DEFINE_UNQUOTED([size_t], [unsigned long], + [Define to `unsigned long' if does not define.])]) +AC_CHECK_TYPE([ssize_t], [], + [AC_DEFINE_UNQUOTED([ssize_t], [long], + [Define to `long' if does not define.])]) +AC_CHECK_TYPE([ptrdiff_t], [], + [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], + [Define to `long' if does not define.])]) AC_C_BIGENDIAN AC_CHECK_SIZEOF([char], [1]) AC_CHECK_SIZEOF([short], [2]) @@ -1504,10 +1508,10 @@ AC_CHECK_SIZEOF([float], [4]) AC_CHECK_SIZEOF([double], [8]) AC_CHECK_SIZEOF([long double], [8]) -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl Posix.1g types (C9x) +## Posix.1g types (C9x) cat >>confdefs.h <<\EOF #include EOF @@ -1518,33 +1522,33 @@ if test "X$C9x" = "Xyes"; then EOF fi -AC_CHECK_SIZEOF( int8_t, [1]) -AC_CHECK_SIZEOF( uint8_t, [1]) -AC_CHECK_SIZEOF( int_least8_t, [1]) -AC_CHECK_SIZEOF( uint_least8_t, [1]) -AC_CHECK_SIZEOF( int_fast8_t, [1]) -AC_CHECK_SIZEOF( uint_fast8_t, [1]) - -AC_CHECK_SIZEOF( int16_t, [2]) -AC_CHECK_SIZEOF( uint16_t, [2]) -AC_CHECK_SIZEOF( int_least16_t, [2]) -AC_CHECK_SIZEOF(uint_least16_t, [2]) -AC_CHECK_SIZEOF( int_fast16_t, [2]) -AC_CHECK_SIZEOF( uint_fast16_t, [2]) - -AC_CHECK_SIZEOF( int32_t, [4]) -AC_CHECK_SIZEOF( uint32_t, [4]) -AC_CHECK_SIZEOF( int_least32_t, [4]) -AC_CHECK_SIZEOF(uint_least32_t, [4]) -AC_CHECK_SIZEOF( int_fast32_t, [4]) -AC_CHECK_SIZEOF( uint_fast32_t, [4]) - -AC_CHECK_SIZEOF( int64_t, [8]) -AC_CHECK_SIZEOF( uint64_t, [8]) -AC_CHECK_SIZEOF( int_least64_t, [8]) -AC_CHECK_SIZEOF(uint_least64_t, [8]) -AC_CHECK_SIZEOF( int_fast64_t, [8]) -AC_CHECK_SIZEOF( uint_fast64_t, [8]) +AC_CHECK_SIZEOF( [int8_t], [1]) +AC_CHECK_SIZEOF( [uint8_t], [1]) +AC_CHECK_SIZEOF( [int_least8_t], [1]) +AC_CHECK_SIZEOF( [uint_least8_t], [1]) +AC_CHECK_SIZEOF( [int_fast8_t], [1]) +AC_CHECK_SIZEOF( [uint_fast8_t], [1]) + +AC_CHECK_SIZEOF( [int16_t], [2]) +AC_CHECK_SIZEOF( [uint16_t], [2]) +AC_CHECK_SIZEOF( [int_least16_t], [2]) +AC_CHECK_SIZEOF([uint_least16_t], [2]) +AC_CHECK_SIZEOF( [int_fast16_t], [2]) +AC_CHECK_SIZEOF( [uint_fast16_t], [2]) + +AC_CHECK_SIZEOF( [int32_t], [4]) +AC_CHECK_SIZEOF( [uint32_t], [4]) +AC_CHECK_SIZEOF( [int_least32_t], [4]) +AC_CHECK_SIZEOF([uint_least32_t], [4]) +AC_CHECK_SIZEOF( [int_fast32_t], [4]) +AC_CHECK_SIZEOF( [uint_fast32_t], [4]) + +AC_CHECK_SIZEOF( [int64_t], [8]) +AC_CHECK_SIZEOF( [uint64_t], [8]) +AC_CHECK_SIZEOF( [int_least64_t], [8]) +AC_CHECK_SIZEOF([uint_least64_t], [8]) +AC_CHECK_SIZEOF( [int_fast64_t], [8]) +AC_CHECK_SIZEOF( [uint_fast64_t], [8]) AC_CHECK_SIZEOF([size_t], [4]) AC_CHECK_SIZEOF([ssize_t], [4]) @@ -1556,12 +1560,12 @@ EOF AC_CHECK_SIZEOF([off_t], [4]) AC_CHECK_SIZEOF([off64_t], [8]) -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl ---------------------------------------------------------------------- -dnl Check if the dev_t type is a scalar type (must come after the check for -dnl sys/types.h) +## ---------------------------------------------------------------------- +## Check if the dev_t type is a scalar type (must come after the check for +## sys/types.h) AC_MSG_CHECKING([if dev_t is scalar]) AC_TRY_COMPILE([ #ifdef HAVE_SYS_TYPES_H @@ -1571,15 +1575,15 @@ AC_TRY_COMPILE([ [dev_t d1, d2; if(d1==d2) return 0;], AC_DEFINE([DEV_T_IS_SCALAR], [1], [Define if `dev_t' is a scalar]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) ) -dnl ---------------------------------------------------------------------- -dnl Fake --with-xxx option to allow us to create a help message for the -dnl following --with-xxx options which can take either a =DIR or =INC,LIB -dnl specifier. -dnl +## ---------------------------------------------------------------------- +## Fake --with-xxx option to allow us to create a help message for the +## following --with-xxx options which can take either a =DIR or =INC,LIB +## specifier. +## AC_ARG_WITH([fnord], [ For the following --with-xxx options, you can specify where the header @@ -1591,31 +1595,31 @@ AC_ARG_WITH([fnord], include/ and lib/ subdirectories ]) -dnl ---------------------------------------------------------------------- -dnl Is the dmalloc present? It has a header file `dmalloc.h' and a library -dnl `-ldmalloc' and their locations might be specified with the `--with-dmalloc' -dnl command-line switch. The value is an include path and/or a library path. -dnl If the library path is specified then it must be preceded by a comma. -dnl +## ---------------------------------------------------------------------- +## Is the dmalloc present? It has a header file `dmalloc.h' and a library +## `-ldmalloc' and their locations might be specified with the `--with-dmalloc' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## AC_ARG_WITH([dmalloc], - [AC_HELP_STRING([--with-dmalloc=DIR], + [AS_HELP_STRING([--with-dmalloc=DIR], [Use dmalloc memory debugging aid [default=no]])],, - withval=no) + [withval=no]) case $withval in yes) HAVE_DMALLOC="yes" - AC_CHECK_HEADERS(dmalloc.h) - AC_CHECK_LIB(dmalloc, dmalloc_shutdown,, unset HAVE_DMALLOC) + AC_CHECK_HEADERS([dmalloc.h]) + AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC]) if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR(couldn't find dmalloc library) + AC_MSG_ERROR([couldn't find dmalloc library]) fi ;; no) HAVE_DMALLOC="no" - AC_MSG_CHECKING(for dmalloc library) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for dmalloc library]) + AC_MSG_RESULT([suppressed]) ;; *) HAVE_DMALLOC="yes" @@ -1632,8 +1636,8 @@ case $withval in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$dmalloc_inc" = "X/usr/include"; then dmalloc_inc="" fi @@ -1651,33 +1655,33 @@ case $withval in AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc" fi - AC_CHECK_HEADERS(dmalloc.h,,CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS") + AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) if test -n "$dmalloc_lib"; then LDFLAGS="$LDFLAGS -L$dmalloc_lib" AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib" fi - AC_CHECK_LIB(dmalloc, dmalloc_shutdown,, LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC) + AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC]) if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR(couldn't find dmalloc library) + AC_MSG_ERROR([couldn't find dmalloc library]) fi ;; esac -dnl ---------------------------------------------------------------------- -dnl Is the GNU zlib present? It has a header file `zlib.h' and a library -dnl `-lz' and their locations might be specified with the `--with-zlib' -dnl command-line switch. The value is an include path and/or a library path. -dnl If the library path is specified then it must be preceded by a comma. -dnl -AC_SUBST(USE_FILTER_DEFLATE) USE_FILTER_DEFLATE="no" +## ---------------------------------------------------------------------- +## Is the GNU zlib present? It has a header file `zlib.h' and a library +## `-lz' and their locations might be specified with the `--with-zlib' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## +AC_SUBST([USE_FILTER_DEFLATE]) USE_FILTER_DEFLATE="no" AC_ARG_WITH([zlib], - [AC_HELP_STRING([--with-zlib=DIR], + [AS_HELP_STRING([--with-zlib=DIR], [Use zlib library for external deflate I/O filter [default=yes]])],, - withval=yes) + [withval=yes]) case $withval in yes) @@ -1710,8 +1714,8 @@ case $withval in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$zlib_inc" = "X/usr/include"; then zlib_inc="" fi @@ -1752,7 +1756,7 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled]) USE_FILTER_DEFLATE="yes" - dnl Add "deflate" to external filter list + ## Add "deflate" to external filter list if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi @@ -1760,18 +1764,18 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" fi -dnl ---------------------------------------------------------------------- -dnl Is the szlib present? It has a header file `szlib.h' and a library -dnl `-lsz' and their locations might be specified with the `--with-szlib' -dnl command-line switch. The value is an include path and/or a library path. -dnl If the library path is specified then it must be preceded by a comma. -dnl -AC_SUBST(USE_FILTER_SZIP) USE_FILTER_SZIP="no" +## ---------------------------------------------------------------------- +## Is the szlib present? It has a header file `szlib.h' and a library +## `-lsz' and their locations might be specified with the `--with-szlib' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## +AC_SUBST([USE_FILTER_SZIP]) USE_FILTER_SZIP="no" AC_ARG_WITH([szlib], - [AC_HELP_STRING([--with-szlib=DIR], + [AS_HELP_STRING([--with-szlib=DIR], [Use szlib library for external szlib I/O filter [default=no]])],, - withval=no) + [withval=no]) case $withval in yes) @@ -1803,8 +1807,8 @@ case $withval in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$szlib_inc" = "X/usr/include"; then szlib_inc="" fi @@ -1841,12 +1845,12 @@ case $withval in esac if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - dnl SZLIB library is available. Check if it can encode + ## SZLIB library is available. Check if it can encode AC_MSG_CHECKING([for szlib encoder]) - dnl Set LD_LIBRARY_PATH so encoder test can find the library and run. - dnl Also add LL_PATH substitution to Makefiles so they can use the - dnl path as well, for testing examples. + ## Set LD_LIBRARY_PATH so encoder test can find the library and run. + ## Also add LL_PATH substitution to Makefiles so they can use the + ## path as well, for testing examples. if test -z "$LD_LIBRARY_PATH"; then export LD_LIBRARY_PATH="$szlib_lib" else @@ -1854,7 +1858,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then fi AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH" - + AC_CACHE_VAL([hdf5_cv_szlib_can_encode], [AC_TRY_RUN([ #include @@ -1869,10 +1873,10 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then } ], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]) - AC_DEFINE(HAVE_FILTER_SZIP, 1, + AC_DEFINE([HAVE_FILTER_SZIP], [1], [Define if support for szip filter is enabled]) USE_FILTER_SZIP="yes" - + if test ${hdf5_cv_szlib_can_encode} = "yes"; then AC_MSG_RESULT([yes]) fi @@ -1880,7 +1884,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then AC_MSG_RESULT([no]) fi - dnl Add "szip" to external filter list + ## Add "szip" to external filter list if test ${hdf5_cv_szlib_can_encode} = "yes"; then if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," @@ -1898,21 +1902,21 @@ fi AM_CONDITIONAL([BUILD_SHARED_SZIP_CONDITIONAL], [test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"]) -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl ---------------------------------------------------------------------- -dnl Is the Pthreads library present? It has a header file `pthread.h' and -dnl a library `-lpthread' and their locations might be specified with the -dnl `--with-pthread' command-line switch. The value is an include path -dnl and/or a library path. If the library path is specified then it must -dnl be preceded by a comma. -dnl +## ---------------------------------------------------------------------- +## Is the Pthreads library present? It has a header file `pthread.h' and +## a library `-lpthread' and their locations might be specified with the +## `--with-pthread' command-line switch. The value is an include path +## and/or a library path. If the library path is specified then it must +## be preceded by a comma. +## AC_SUBST([PTHREAD]) PTHREAD=yes AC_ARG_WITH([pthread], - [AC_HELP_STRING([--with-pthread=DIR], + [AS_HELP_STRING([--with-pthread=DIR], [Use the Pthreads library [default=no]])],, - withval=no) + [withval=no]) case "$withval" in yes) @@ -1938,8 +1942,8 @@ case "$withval" in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$pthread_inc" = "X/usr/include"; then pthread_inc="" fi @@ -1971,21 +1975,38 @@ case "$withval" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Enable thread-safe version of library. It requires Pthreads support. -dnl +## ---------------------------------------------------------------------- +## Enable thread-safe version of library. It requires Pthreads support. +## AC_MSG_CHECKING([for thread safe support]) AC_ARG_ENABLE([threadsafe], - [AC_HELP_STRING([--enable-threadsafe], + [AS_HELP_STRING([--enable-threadsafe], [Enable thread safe capability])], - THREADSAFE=$enableval) + [THREADSAFE=$enableval]) + +## The --enable-threadsafe flag is not compatible with --enable-cxx. +## If the user tried to specify both flags, throw an error, unless +## they also provided the --enable-unsupported flag. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + AC_MSG_ERROR([--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) + fi +fi + +## --enable-threadsafe is also incompatible with --enable-fortran, unless +## --enable-unsupported has been specified on the configure line. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + AC_MSG_ERROR([--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) + fi +fi case "X-$THREADSAFE" in X-|X-no) AC_MSG_RESULT([no]) ;; X-yes) - dnl Check that we can link a simple Pthread program. + ## Check that we can link a simple Pthread program. AC_TRY_LINK(, [pthread_self()], [AC_MSG_RESULT([yes]); THREADSAFE=yes], [AC_MSG_ERROR([needed pthread library not available])]) @@ -2000,38 +2021,38 @@ if test "X$THREADSAFE" = "Xyes"; then AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support]) fi -dnl ---------------------------------------------------------------------- -dnl Check for MONOTONIC_TIMER support (used in clock_gettime). This has -dnl to be done after any POSIX/BSD defines to ensure that the test gets -dnl the correct POSIX level on linux. -AC_CHECK_DECL(CLOCK_MONOTONIC,[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include ]]) +## ---------------------------------------------------------------------- +## Check for MONOTONIC_TIMER support (used in clock_gettime). This has +## to be done after any POSIX/BSD defines to ensure that the test gets +## the correct POSIX level on linux. +AC_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include ]]) -dnl ---------------------------------------------------------------------- -dnl How does one figure out the local time zone? Anyone know of a -dnl Posix way to do this? -dnl +## ---------------------------------------------------------------------- +## How does one figure out the local time zone? Anyone know of a +## Posix way to do this? +## -dnl First check if `struct tm' has a `tm_gmtoff' member. +## First check if `struct tm' has a `tm_gmtoff' member. AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_TRY_COMPILE([ -#include -#include ], [struct tm tm; tm.tm_gmtoff=0;], -AC_DEFINE([HAVE_TM_GMTOFF], [1], + #include + #include ], [struct tm tm; tm.tm_gmtoff=0;], + [AC_DEFINE([HAVE_TM_GMTOFF], [1], [Define if `tm_gmtoff' is a member of `struct tm']) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl check if `struct tm' has a `__tm_gmtoff' member. +## check if `struct tm' has a `__tm_gmtoff' member. AC_MSG_CHECKING([for __tm_gmtoff in struct tm]) AC_TRY_COMPILE([ -#include -#include ], [struct tm tm; tm.__tm_gmtoff=0;], -AC_DEFINE([HAVE___TM_GMTOFF], [1], + #include + #include ], [struct tm tm; tm.__tm_gmtoff=0;], + [AC_DEFINE([HAVE___TM_GMTOFF], [1], [Define if `__tm_gmtoff' is a member of `struct tm']) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl Check whether the global variable `timezone' is defined. +## Check whether the global variable `timezone' is defined. AC_MSG_CHECKING([for global timezone variable]) case "`uname`" in @@ -2042,27 +2063,27 @@ case "`uname`" in AC_TRY_LINK([ #include #include ], [timezone=0;], - AC_DEFINE([HAVE_TIMEZONE], [1], + [AC_DEFINE([HAVE_TIMEZONE], [1], [Define if `timezone' is a global variable]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) ;; esac -dnl Check whether `struct timezone' is defined. +## Check whether `struct timezone' is defined. AC_STRUCT_TIMEZONE AC_MSG_CHECKING([for struct timezone]) AC_TRY_COMPILE([ -#include -#include -#include ], [struct timezone tz; tz.tz_minuteswest=0;], -AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], + #include + #include + #include ], [struct timezone tz; tz.tz_minuteswest=0;], + [AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], [Define if `struct timezone' is defined]) -have_struct_tz="yes" -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + have_struct_tz="yes" + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl If gettimeofday() is going to be used, make sure it uses the timezone struct +## If gettimeofday() is going to be used, make sure it uses the timezone struct if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then AC_MSG_CHECKING(whether gettimeofday() gives timezone) @@ -2081,7 +2102,9 @@ if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) exit(1); else exit (0); - }], [hdf5_cv_gettimeofday_tz=yes], [hdf5_cv_gettimeofday_tz=no],)]) + }], + [hdf5_cv_gettimeofday_tz=yes], + [hdf5_cv_gettimeofday_tz=no])]) if test ${hdf5_cv_gettimeofday_tz} = "yes"; then AC_MSG_RESULT([yes]) @@ -2092,78 +2115,78 @@ if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then fi fi -dnl ---------------------------------------------------------------------- -dnl Does the struct stat have the st_blocks field? This field is not Posix. -dnl +## ---------------------------------------------------------------------- +## Does the struct stat have the st_blocks field? This field is not Posix. +## AC_MSG_CHECKING([for st_blocks in struct stat]) AC_TRY_COMPILE([ -#include ],[struct stat sb; sb.st_blocks=0;], -AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], + #include ],[struct stat sb; sb.st_blocks=0;], + [AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], [Define if `struct stat' has the `st_blocks' field]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl ---------------------------------------------------------------------- -dnl How do we figure out the width of a tty in characters? -dnl -AC_CHECK_FUNCS(_getvideoconfig gettextinfo GetConsoleScreenBufferInfo) -AC_CHECK_FUNCS(_scrsize ioctl) +## ---------------------------------------------------------------------- +## How do we figure out the width of a tty in characters? +## +AC_CHECK_FUNCS([_getvideoconfig gettextinfo GetConsoleScreenBufferInfo]) +AC_CHECK_FUNCS([_scrsize ioctl]) AC_MSG_CHECKING([for struct videoconfig]) AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;], -AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], + [AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], [Define if `struct videoconfig' is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for struct text_info]) AC_TRY_COMPILE(, [struct text_info w; w.screenwidth=0;], -AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], + [AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], [Define if `struct text_info' is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for TIOCGWINSZ]) AC_TRY_COMPILE([#include ],[int w=TIOCGWINSZ;], -AC_DEFINE([HAVE_TIOCGWINSZ], [1], + [AC_DEFINE([HAVE_TIOCGWINSZ], [1], [Define if the ioctl TIOGWINSZ is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for TIOCGETD]) AC_TRY_COMPILE([#include ],[int w=TIOCGETD;], -AC_DEFINE([HAVE_TIOCGETD], [1], + [AC_DEFINE([HAVE_TIOCGETD], [1], [Define if the ioctl TIOCGETD is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) - - -dnl ---------------------------------------------------------------------- -dnl Check for functions. -dnl -AC_CHECK_FUNCS(alarm BSDgettimeofday fork frexpf frexpl) -AC_CHECK_FUNCS(gethostname getpwuid getrusage lstat) -AC_CHECK_FUNCS(rand_r random setsysinfo) -AC_CHECK_FUNCS(signal longjmp setjmp siglongjmp sigsetjmp sigprocmask) -AC_CHECK_FUNCS(snprintf srandom strdup symlink system) -AC_CHECK_FUNCS(tmpfile vasprintf waitpid) - -dnl Check for vsnprintf() separately, so we can detect situations where it -dnl doesn't return the correct size for formatted strings that are too large -dnl for the buffer provided -AC_CHECK_FUNCS(vsnprintf, - - dnl Check if vsnprintf() returns correct size for strings that don't fit - dnl into the size allowed. If vsnprintf() works correctly on this platform, - dnl it should return a value of 42 for the test below - dnl - dnl Note that vsnprintf fails in two different ways: - dnl - In IRIX64, calls to vnsprintf() with a formatted string that - dnl is larger than the buffer size allowed incorrectly - dnl return the size of the buffer minus one. - dnl - In HP/UX, calls to vsnprintf() with a formatted string that - dnl is larger than the buffer size allowed incorrectly - dnl return (-1) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + + +## ---------------------------------------------------------------------- +## Check for functions. +## +AC_CHECK_FUNCS([alarm BSDgettimeofday fork frexpf frexpl]) +AC_CHECK_FUNCS([gethostname getpwuid getrusage lstat]) +AC_CHECK_FUNCS([rand_r random setsysinfo]) +AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask]) +AC_CHECK_FUNCS([snprintf srandom strdup symlink system]) +AC_CHECK_FUNCS([tmpfile vasprintf waitpid]) + +## Check for vsnprintf() separately, so we can detect situations where it +## doesn't return the correct size for formatted strings that are too large +## for the buffer provided +AC_CHECK_FUNCS([vsnprintf], + + ## Check if vsnprintf() returns correct size for strings that don't fit + ## into the size allowed. If vsnprintf() works correctly on this platform, + ## it should return a value of 42 for the test below + ## + ## Note that vsnprintf fails in two different ways: + ## - In IRIX64, calls to vnsprintf() with a formatted string that + ## is larger than the buffer size allowed incorrectly + ## return the size of the buffer minus one. + ## - In HP/UX, calls to vsnprintf() with a formatted string that + ## is larger than the buffer size allowed incorrectly + ## return (-1) AC_MSG_CHECKING([if vsnprintf returns correct value]) AC_CACHE_VAL([hdf5_cv_vsnprintf_works], @@ -2200,11 +2223,11 @@ int main(void) fi ,) -dnl ---------------------------------------------------------------------- -dnl Check that a lone colon can be used as an argument -dnl This is not true on Cray X1, which interprets a lone colon as a -dnl system command. -dnl +## ---------------------------------------------------------------------- +## Check that a lone colon can be used as an argument +## This is not true on Cray X1, which interprets a lone colon as a +## system command. +## AC_CACHE_CHECK([if lone colon can be used as an argument], [hdf5_cv_lone_colon], [ @@ -2224,33 +2247,33 @@ AC_CACHE_CHECK([if lone colon can be used as an argument], fi ]) -AC_SUBST(H5_LONE_COLON) H5_LONE_COLON="$hdf5_cv_lone_colon" +AC_SUBST([H5_LONE_COLON]) H5_LONE_COLON="$hdf5_cv_lone_colon" -dnl ---------------------------------------------------------------------- -dnl Check compiler characteristics -dnl +## ---------------------------------------------------------------------- +## Check compiler characteristics +## AC_C_CONST AC_C_INLINE AC_MSG_CHECKING([for __attribute__ extension]) AC_TRY_COMPILE(,[int __attribute__((unused)) x], - AC_DEFINE([HAVE_ATTRIBUTE], [1], + [AC_DEFINE([HAVE_ATTRIBUTE], [1], [Define if the __attribute__(()) extension is present]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for __func__ extension]) AC_TRY_COMPILE(,[ const char *fname = __func__; ], - AC_DEFINE([HAVE_C99_FUNC], [1], + [AC_DEFINE([HAVE_C99_FUNC], [1], [Define if the compiler understands the __func__ keyword]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for __FUNCTION__ extension]) AC_TRY_COMPILE(,[ const char *fname = __FUNCTION__; ], - AC_DEFINE([HAVE_FUNCTION], [1], + [AC_DEFINE([HAVE_FUNCTION], [1], [Define if the compiler understands the __FUNCTION__ keyword]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for C99 designated initialization support]) AC_TRY_COMPILE(,[ typedef struct { @@ -2261,66 +2284,66 @@ AC_TRY_COMPILE(,[ } u; } di_struct_t; di_struct_t x = {0, { .d = 0.0}}; ], - AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1], + [AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1], [Define if the compiler understands C99 designated initialization of structs and unions]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) - -dnl ---------------------------------------------------------------------- -dnl Try to figure out how to print `long long'. Some machines use `%lld' -dnl and others use `%qd'. There may be more! The final `l' is a -dnl default in case none of the others work. -dnl Need to patch up LD_LIBRARY_PATH so that the execution can find all -dnl the dynamic library. The correct way to do it should be updating -dnl LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. -dnl + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +## ---------------------------------------------------------------------- +## Try to figure out how to print `long long'. Some machines use `%lld' +## and others use `%qd'. There may be more! The final `l' is a +## default in case none of the others work. +## Need to patch up LD_LIBRARY_PATH so that the execution can find all +## the dynamic library. The correct way to do it should be updating +## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. +## AC_MSG_CHECKING([how to print long long]) -AC_CACHE_VAL([hdf5_cv_printf_ll], +AC_CACHE_VAL([hdf5_cv_printf_ll], [ LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH for hdf5_cv_printf_ll in l ll L q unknown; do AC_TRY_RUN([ -#include -#include -#include + #include + #include + #include -int main(void) -{ + int main(void) + { char *s = malloc(128); long long x = (long long)1048576 * (long long)1048576; sprintf(s,"%${hdf5_cv_printf_ll}d",x); exit(strcmp(s,"1099511627776")); -} - ], break,,continue) -done)dnl + } + ], [break],,[continue]) +done]) AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u]) AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], [Width for printf() for type `long long' or `__int64', use `ll']) -dnl ---------------------------------------------------------------------- -dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) -dnl is supported on this system -dnl +## ---------------------------------------------------------------------- +## Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) +## is supported on this system +## AC_MSG_CHECKING([Threads support system scope]) AC_CACHE_VAL([hdf5_cv_system_scope_threads], -[AC_TRY_RUN([ -#if STDC_HEADERS -#include -#include -#endif + [AC_TRY_RUN([ + #if STDC_HEADERS + #include + #include + #endif -int main(void) -{ - pthread_attr_t attribute; - int ret; + int main(void) + { + pthread_attr_t attribute; + int ret; - pthread_attr_init(&attribute); - ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - exit(ret==0 ? 0 : 1); -} -], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no],)]) + pthread_attr_init(&attribute); + ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); + exit(ret==0 ? 0 : 1); + } + ], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no],)]) if test ${hdf5_cv_system_scope_threads} = "yes"; then AC_DEFINE([SYSTEM_SCOPE_THREADS], [1], @@ -2330,11 +2353,11 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Checking to see if GPFS is available on this filesystem -dnl +## ---------------------------------------------------------------------- +## Checking to see if GPFS is available on this filesystem +## AC_ARG_ENABLE([gpfs], - [AC_HELP_STRING([--enable-gpfs], + [AS_HELP_STRING([--enable-gpfs], [Enable GPFS hints for the MPI/POSIX file driver. [default=no]])],, [enableval=no]) @@ -2342,16 +2365,16 @@ AC_ARG_ENABLE([gpfs], case "X-$enableval" in X-yes) AC_CHECK_HEADERS([gpfs.h], - AC_MSG_CHECKING([for GPFS support]) + [AC_MSG_CHECKING([for GPFS support]) AC_TRY_COMPILE([#include ], [int fd = 0; gpfs_fcntl(fd, (void *)0);], - AC_DEFINE(HAVE_GPFS, 1, - [Define if we have GPFS support]) - AC_MSG_RESULT([yes]) - LIBS="$LIBS -lgpfs" - GPFS="yes", - AC_MSG_RESULT([no]) - GPFS="no")) + [AC_DEFINE([HAVE_GPFS], [1], + [Define if we have GPFS support]) + AC_MSG_RESULT([yes]) + LIBS="$LIBS -lgpfs" + GPFS="yes"], + [AC_MSG_RESULT([no]) + GPFS="no"])]) ;; X-no|*) AC_MSG_CHECKING([for gpfs]) @@ -2359,13 +2382,13 @@ case "X-$enableval" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Turn on debugging by setting compiler flags -dnl This must come after the enable-production since it depends on production. -dnl -AC_MSG_CHECKING(for debug flags) +## ---------------------------------------------------------------------- +## Turn on debugging by setting compiler flags +## This must come after the enable-production since it depends on production. +## +AC_MSG_CHECKING([for debug flags]) AC_ARG_ENABLE([debug], - [AC_HELP_STRING([--enable-debug=all], + [AS_HELP_STRING([--enable-debug=all], [Turn on debugging in all packages. One may also specify a comma-separated list of package names without the leading H5 or @@ -2374,7 +2397,7 @@ AC_ARG_ENABLE([debug], ])], [DEBUG_PKG=$enableval]) -dnl Default to no if producton is enabled +## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then DEBUG_PKG=no @@ -2412,12 +2435,12 @@ if test -n "$DEBUG_PKG"; then done fi -dnl ---------------------------------------------------------------------- -dnl Check if they would like the function stack support compiled in -dnl +## ---------------------------------------------------------------------- +## Check if they would like the function stack support compiled in +## AC_MSG_CHECKING([whether function stack tracking is enabled]) AC_ARG_ENABLE([codestack], - [AC_HELP_STRING([--enable-codestack], + [AS_HELP_STRING([--enable-codestack], [Enable the function stack tracing (for developer debugging).])], [CODESTACK=$enableval]) @@ -2434,12 +2457,12 @@ case "X-$CODESTACK" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like the metadata trace file code compiled in -dnl +## ---------------------------------------------------------------------- +## Check if they would like the metadata trace file code compiled in +## AC_MSG_CHECKING([whether metadata trace file code is enabled]) AC_ARG_ENABLE([metadata-trace-file], - [AC_HELP_STRING([--enable-metadata-trace-file], + [AS_HELP_STRING([--enable-metadata-trace-file], [Enable metadata trace file collection.])], [METADATATRACEFILE=$enableval]) @@ -2456,19 +2479,19 @@ case "X-$METADATATRACEFILE" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Enable tracing of the API -dnl This must come after the enable-debug since it depends on debug. -dnl +## ---------------------------------------------------------------------- +## Enable tracing of the API +## This must come after the enable-debug since it depends on debug. +## AC_SUBST([TRACE_API]) AC_MSG_CHECKING([for API tracing]); AC_ARG_ENABLE([trace], - [AC_HELP_STRING([--enable-trace], + [AS_HELP_STRING([--enable-trace], [Enable API tracing capability. Default=no if debug is disabled.])], - TRACE=$enableval) + [TRACE=$enableval]) -dnl Default to no if debug is disabled +## Default to no if debug is disabled if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then TRACE=no @@ -2490,19 +2513,19 @@ case "X-$TRACE" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Enable instrumenting of the library's internal operations -dnl This must come after the enable-debug since it depends on debug. -dnl +## ---------------------------------------------------------------------- +## Enable instrumenting of the library's internal operations +## This must come after the enable-debug since it depends on debug. +## AC_SUBST([INSTRUMENT_LIBRARY]) AC_MSG_CHECKING([for instrumented library]); AC_ARG_ENABLE([instrument], - [AC_HELP_STRING([--enable-instrument], + [AS_HELP_STRING([--enable-instrument], [Enable library instrumentation of optimization tracing. Default=no if debug is disabled.])], - INSTRUMENT=$enableval) + [INSTRUMENT=$enableval]) -dnl Default to no if debug is disabled +## Default to no if debug is disabled if test "X-$INSTRUMENT" = X- ; then if test -z "$DEBUG_PKG" ; then INSTRUMENT=no @@ -2524,14 +2547,14 @@ case "X-$INSTRUMENT" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like to securely clear file buffers before they are -dnl written. -dnl +## ---------------------------------------------------------------------- +## Check if they would like to securely clear file buffers before they are +## written. +## AC_SUBST([CLEARFILEBUF]) AC_MSG_CHECKING([whether to clear file buffers]) AC_ARG_ENABLE([clear-file-buffers], - [AC_HELP_STRING([--enable-clear-file-buffers], + [AS_HELP_STRING([--enable-clear-file-buffers], [Securely clear file buffers before writing to file. Default=yes.])], [CLEARFILEBUF=$enableval]) @@ -2550,16 +2573,16 @@ case "X-$CLEARFILEBUF" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like to use a memory checking tool (like valgrind's -dnl 'memcheck' tool, or Rational Purify, etc) and the library should be -dnl more scrupulous with it's memory operations. Enabling this also -dnl disables the library's free space manager code. -dnl +## ---------------------------------------------------------------------- +## Check if they would like to use a memory checking tool (like valgrind's +## 'memcheck' tool, or Rational Purify, etc) and the library should be +## more scrupulous with it's memory operations. Enabling this also +## disables the library's free space manager code. +## AC_SUBST([USINGMEMCHECKER]) AC_MSG_CHECKING([whether a memory checking tool will be used]) AC_ARG_ENABLE([using-memchecker], - [AC_HELP_STRING([--enable-using-memchecker], + [AS_HELP_STRING([--enable-using-memchecker], [Enable this option if a memory allocation and/or bounds checking tool will be used on the HDF5 library. Enabling this causes the library to be @@ -2583,41 +2606,41 @@ case "X-$USINGMEMCHECKER" in ;; esac -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl What header files and libraries do we have to look for for parallel -dnl support? For the most part, search paths are already specified with -dnl CPPFLAGS and LDFLAGS or are known to the compiler. If the user says -dnl `--disable-parallel' but specifies a known parallel compiler (like mpicc -dnl or mpcc) then parallel support is enabled but configure doesn't search -dnl for any parallel header files or libraries. -dnl +## What header files and libraries do we have to look for for parallel +## support? For the most part, search paths are already specified with +## CPPFLAGS and LDFLAGS or are known to the compiler. If the user says +## `--disable-parallel' but specifies a known parallel compiler (like mpicc +## or mpcc) then parallel support is enabled but configure doesn't search +## for any parallel header files or libraries. +## AC_ARG_ENABLE([parallel], - [AC_HELP_STRING([--enable-parallel], + [AS_HELP_STRING([--enable-parallel], [Search for MPI-IO and MPI support files])]) -dnl The --enable-parallel flag is not compatible with --enable-cxx. -dnl If the user tried to specify both flags, throw an error, unless -dnl they also provided the --enable-unsupported flag. +## The --enable-parallel flag is not compatible with --enable-cxx. +## If the user tried to specify both flags, throw an error, unless +## they also provided the --enable-unsupported flag. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then AC_MSG_ERROR([--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) fi fi -dnl --enable-parallel is also incompatible with --enable-threadsafe, unless -dnl --enable-unsupported has been specified on the configure line. +## --enable-parallel is also incompatible with --enable-threadsafe, unless +## --enable-unsupported has been specified on the configure line. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then AC_MSG_ERROR([--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) fi fi -dnl It's possible to build in parallel by specifying a parallel compiler -dnl without using the --enable-parallel flag. This isn't allowed with -dnl C++ or threadsafe, either, unless the --enable-unsupported flag -dnl has also been specified. +## It's possible to build in parallel by specifying a parallel compiler +## without using the --enable-parallel flag. This isn't allowed with +## C++ or threadsafe, either, unless the --enable-unsupported flag +## has also been specified. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then AC_MSG_ERROR([An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error.]) @@ -2630,49 +2653,49 @@ fi AC_MSG_CHECKING([for parallel support files]) case "X-$enable_parallel" in X-|X-no|X-none) - dnl Either we are not compiling for parallel or the header and - dnl library files and locations are known to the compiler (this is - dnl the case for a correct installation of mpicc for instance). + ## Either we are not compiling for parallel or the header and + ## library files and locations are known to the compiler (this is + ## the case for a correct installation of mpicc for instance). AC_MSG_RESULT([skipped]) ;; X-yes) - dnl We want to compile a parallel library with a compiler that - dnl may already know how to link with MPI and MPI-IO. + ## We want to compile a parallel library with a compiler that + ## may already know how to link with MPI and MPI-IO. AC_MSG_RESULT([provided by compiler]) PARALLEL=yes - dnl Try link a simple MPI program. If fail, try again with -lmpi and - dnl -lmpich. - AC_TRY_LINK(, MPI_Init(),, \ - AC_CHECK_LIB(mpi, MPI_Init,, \ - AC_CHECK_LIB(mpich, MPI_Init,, PARALLEL=no))) + ## Try link a simple MPI program. If fail, try again with -lmpi and + ## -lmpich. + AC_TRY_LINK(, [MPI_Init()],, + [AC_CHECK_LIB([mpi], [MPI_Init],, + [AC_CHECK_LIB([mpich], [MPI_Init],, [PARALLEL=no])])]) - dnl Then try link a simple MPI-IO program. If fail, try again with - dnl -lmpio. + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. if test "X$PARALLEL" = "Xyes"; then AC_TRY_LINK(, [MPI_File_open()],, [AC_CHECK_LIB([mpio], [MPI_File_open],, [PARALLEL=no])]) fi if test "X$HDF_FORTRAN" = "Xyes"; then - dnl Change to the Fortran 90 language + ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) - dnl Try link a simple MPI program. If fail, try again with -lmpi. + ## Try link a simple MPI program. If fail, try again with -lmpi. AC_LINK_IFELSE([ program main include 'mpif.h' integer:: ierr call mpi_file_open( ierr ) end],, - AC_CHECK_LIB(mpi, [ + [AC_CHECK_LIB([mpi], [ include 'mpif.h' integer:: ierr - call mpi_file_open( ierr )],, PARALLEL=no)) + call mpi_file_open( ierr )],, [PARALLEL=no])]) - dnl Then try link a simple MPI-IO program. If fail, try again with - dnl -lmpio. + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. if test "X$PARALLEL" = "Xyes"; then AC_LINK_IFELSE([ program main @@ -2680,21 +2703,21 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - AC_CHECK_LIB(mpio, [ + [AC_CHECK_LIB([mpio], [ include 'mpif.h' integer:: ierr - call mpi_file_open( ierr )],, PARALLEL=no)) + call mpi_file_open( ierr )],, [PARALLEL=no])]) fi - dnl Change to the C language + ## Change to the C language AC_LANG_POP(Fortran) fi - dnl Set RUNPARALLEL to mpiexec if not set yet. - dnl Check for building on Cray if RUNPARALLEL is not yet set by checking - dnl for 'aprun' command (which is the parallel job launcher, like mpiexec). + ## Set RUNPARALLEL to mpiexec if not set yet. + ## Check for building on Cray if RUNPARALLEL is not yet set by checking + ## for 'aprun' command (which is the parallel job launcher, like mpiexec). if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then - dnl Find the path where aprun is located. + ## Find the path where aprun is located. for path in `echo $PATH | ${TR} ":" " "`; do if test -x $path/aprun; then RUNPARALLEL="aprun -q -n \$\${NPROCS:=6}" @@ -2703,7 +2726,7 @@ case "X-$enable_parallel" in done fi - dnl Set RUNPARALLEL to mpiexec if not set yet. + ## Set RUNPARALLEL to mpiexec if not set yet. if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" fi @@ -2715,39 +2738,39 @@ case "X-$enable_parallel" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Print some other parallel information and do some sanity checks. -dnl +## ---------------------------------------------------------------------- +## Print some other parallel information and do some sanity checks. +## AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" if test -n "$PARALLEL"; then - dnl The 'testpar' directory should participate in the build + ## The 'testpar' directory should participate in the build TESTPARALLEL=testpar - dnl We are building a parallel library + ## We are building a parallel library AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) - dnl Display what we found about running programs + ## Display what we found about running programs AC_MSG_CHECKING([prefix for running on one processor]) AC_MSG_RESULT([$RUNSERIAL]) AC_MSG_CHECKING([prefix for running in parallel]) AC_MSG_RESULT([$RUNPARALLEL]) - dnl Check that we can link a simple MPI and MPI-IO application + ## Check that we can link a simple MPI and MPI-IO application AC_MSG_CHECKING([whether a simple MPI-IO program can be linked]) AC_TRY_LINK(, [MPI_Init(); MPI_File_open();], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO application])) + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO application])]) - dnl There *must* be some way to run in parallel even if it's just the - dnl word `none'. + ## There *must* be some way to run in parallel even if it's just the + ## word `none'. if test -z "$RUNPARALLEL"; then AC_MSG_ERROR([no way to run a parallel program]) fi - dnl If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with - dnl the empty string. + ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with + ## the empty string. if test "X$RUNSERIAL" = "Xnone"; then RUNSERIAL="" fi @@ -2777,15 +2800,15 @@ if test -n "$PARALLEL"; then ) fi - dnl -------------------------------------------------------------------- - dnl Do we want MPE instrumentation feature on? - dnl - dnl This must be done after enable-parallel is checked since it depends - dnl on a mpich compiler. - dnl + ## -------------------------------------------------------------------- + ## Do we want MPE instrumentation feature on? + ## + ## This must be done after enable-parallel is checked since it depends + ## on a mpich compiler. + ## MPE=yes AC_ARG_WITH([mpe], - [AC_HELP_STRING([--with-mpe=DIR], + [AS_HELP_STRING([--with-mpe=DIR], [Use MPE instrumentation [default=no]])],, [withval=no]) @@ -2814,8 +2837,8 @@ if test -n "$PARALLEL"; then ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$mpe_inc" = "X/usr/include"; then mpe_inc="" fi @@ -2854,12 +2877,12 @@ if test -n "$PARALLEL"; then AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support]) fi - dnl ---------------------------------------------------------------------- - dnl Set the flag to indicate that the MPI_File_set_size() function - dnl works with files over 2GB, unless it's already set in the cache. - dnl (This flag should be set for all machines, except for ASCI Red, where - dnl the cache value is set in it's config file) - dnl + ## ---------------------------------------------------------------------- + ## Set the flag to indicate that the MPI_File_set_size() function + ## works with files over 2GB, unless it's already set in the cache. + ## (This flag should be set for all machines, except for ASCI Red, where + ## the cache value is set in it's config file) + ## AC_MSG_CHECKING([if MPI_File_set_size works for files over 2GB]) AC_CACHE_VAL([hdf5_cv_mpi_file_set_size_big], [hdf5_cv_mpi_file_set_size_big=yes]) @@ -2871,15 +2894,15 @@ if test -n "$PARALLEL"; then AC_MSG_RESULT([no]) fi - dnl ---------------------------------------------------------------------- - dnl Set the flag to indicate that the MPI_File_get_size() function - dnl works. The default is enabled unless the user knows the function - dnl doesn't work on the system and disables it. (This flag should be set - dnl for all machines except for SGI Altix Propack 4 where the function - dnl doesn't return correct file size.) - dnl + ## ---------------------------------------------------------------------- + ## Set the flag to indicate that the MPI_File_get_size() function + ## works. The default is enabled unless the user knows the function + ## doesn't work on the system and disables it. (This flag should be set + ## for all machines except for SGI Altix Propack 4 where the function + ## doesn't return correct file size.) + ## AC_ARG_ENABLE([mpi-size], - [AC_HELP_STRING([--enable-mpi-size], + [AS_HELP_STRING([--enable-mpi-size], [Some systems (only SGI Altix Propack 4 so far) return wrong value from MPI_File_get_size. By disabling this function, the library will replace it with stat to get the correct file size. @@ -2903,29 +2926,29 @@ if test -n "$PARALLEL"; then esac fi -dnl ---------------------------------------------------------------------- -dnl Turn on internal I/O filters by setting macros in header files -dnl Internal I/O filters are contained entirely within the library and do -dnl not depend on external headers or libraries. The shuffle filter is -dnl an example of an internal filter, while the gzip filter is an example of -dnl an external filter. Each external filter is controlled with an -dnl "--with-foo=" configure flag. -dnl +## ---------------------------------------------------------------------- +## Turn on internal I/O filters by setting macros in header files +## Internal I/O filters are contained entirely within the library and do +## not depend on external headers or libraries. The shuffle filter is +## an example of an internal filter, while the gzip filter is an example of +## an external filter. Each external filter is controlled with an +## "--with-foo=" configure flag. +## AC_SUBST([FILTERS]) -AC_SUBST(USE_FILTER_SHUFFLE) USE_FILTER_SHUFFLE="no" -AC_SUBST(USE_FILTER_FLETCHER32) USE_FILTER_FLETCHER32="no" -AC_SUBST(USE_FILTER_NBIT) USE_FILTER_NBIT="no" -AC_SUBST(USE_FILTER_SCALEOFFSET) USE_FILTER_SCALEOFFSET="no" +AC_SUBST([USE_FILTER_SHUFFLE]) USE_FILTER_SHUFFLE="no" +AC_SUBST([USE_FILTER_FLETCHER32]) USE_FILTER_FLETCHER32="no" +AC_SUBST([USE_FILTER_NBIT]) USE_FILTER_NBIT="no" +AC_SUBST([USE_FILTER_SCALEOFFSET]) USE_FILTER_SCALEOFFSET="no" AC_MSG_CHECKING([for I/O filters]) AC_ARG_ENABLE([filters], - [AC_HELP_STRING([--enable-filters=all], + [AS_HELP_STRING([--enable-filters=all], [Turn on all internal I/O filters. One may also specify a comma-separated list of filters or the word no. The default is all internal I/O filters.])], [FILTERS=$enableval]) -dnl Eventually: all_filters="shuffle,foo,bar,baz" +## Eventually: all_filters="shuffle,foo,bar,baz" all_filters="shuffle,fletcher32,nbit,scaleoffset" case "X-$FILTERS" in X-|X-all) @@ -2943,10 +2966,10 @@ esac if test -n "$FILTERS"; then for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do - dnl ------------------------------------------------------------------ - dnl Have to use separate 'if' construct for each filter, so that - dnl autoheader can detect the AC_DEFINE for each one... - dnl + ## ------------------------------------------------------------------ + ## Have to use separate 'if' construct for each filter, so that + ## autoheader can detect the AC_DEFINE for each one... + ## if test $filter = "SHUFFLE"; then AC_DEFINE([HAVE_FILTER_SHUFFLE], [1], [Define if support for shuffle filter is enabled]) @@ -2970,22 +2993,22 @@ if test -n "$FILTERS"; then done fi -dnl ---------------------------------------------------------------------- -dnl This is defined only when we're using CodeWarrior, since it has a -dnl broken "open()" call. -dnl +## ---------------------------------------------------------------------- +## This is defined only when we're using CodeWarrior, since it has a +## broken "open()" call. +# if test 1 = 2; then AC_DEFINE([NO_SHARED_WRITING], [1], [Define if shared writing must be disabled (CodeWarrior only)]) fi -dnl -------------------------------------------------------------------------- -dnl Should the Default Virtual File Driver be compiled? -dnl +## -------------------------------------------------------------------------- +## Should the Default Virtual File Driver be compiled? +## AC_MSG_CHECKING([for Default Virtual File Driver definition]) AC_ARG_WITH([default-vfd], - [AC_HELP_STRING([--with-default-vfd=driver], + [AS_HELP_STRING([--with-default-vfd=driver], [Specify default file driver [default=sec2]])],, withval=sec2) @@ -3008,14 +3031,14 @@ if test "X$default_vfd" = "Xyes"; then [Define the default virtual file driver to compile]) fi -dnl ---------------------------------------------------------------------- -dnl Check if Direct I/O driver is enabled by --enable-direct-vfd -dnl +## ---------------------------------------------------------------------- +## Check if Direct I/O driver is enabled by --enable-direct-vfd +## AC_MSG_CHECKING([for Direct Virtual File Driver support]) AC_ARG_ENABLE([direct-vfd], - [AC_HELP_STRING([--enable-direct-vfd], + [AS_HELP_STRING([--enable-direct-vfd], [Build the Direct I/O Virtual File Driver [default=yes]])], [DIRECT_VFD=$enableval], [DIRECT_VFD=yes]) @@ -3034,7 +3057,7 @@ if test "$DIRECT_VFD" = "yes"; then close(fid); remove("tst_file"); exit (0); - }], AC_TRY_LINK(, [posix_memalign()], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no]), [hdf5_cv_direct_io=no],)]) + }], [AC_TRY_LINK(, [posix_memalign()], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no])], [hdf5_cv_direct_io=no],)]) if test ${hdf5_cv_direct_io} = "yes"; then AC_MSG_RESULT([yes]) @@ -3050,15 +3073,15 @@ fi AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Decide whether the presence of user's exception handling functions is -dnl checked and data conversion exceptions are returned. This is mainly -dnl for the speed optimization of hard conversions. Soft conversions can -dnl actually benefit little. -dnl +## ---------------------------------------------------------------------- +## Decide whether the presence of user's exception handling functions is +## checked and data conversion exceptions are returned. This is mainly +## for the speed optimization of hard conversions. Soft conversions can +## actually benefit little. +## AC_MSG_CHECKING([whether exception handling functions is checked during data conversions]) AC_ARG_ENABLE([dconv-exception], - [AC_HELP_STRING([--enable-dconv-exception], + [AS_HELP_STRING([--enable-dconv-exception], [if exception handling functions is checked during data conversions [default=yes]])], [DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes]) @@ -3071,15 +3094,15 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Decide whether the data accuracy has higher priority during data -dnl conversions. If not, some hard conversions will still be prefered even -dnl though the data may be wrong (for example, some compilers don't -dnl support denormalized floating values) to maximize speed. -dnl +## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions]) AC_ARG_ENABLE([dconv-accuracy], - [AC_HELP_STRING([--enable-dconv-accuracy], + [AS_HELP_STRING([--enable-dconv-accuracy], [if data accuracy is guaranteed during data conversions [default=yes]])], [DATA_ACCURACY=$enableval], [DATA_ACCURACY=yes]) @@ -3092,12 +3115,12 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can handle converting -dnl denormalized floating-point values. -dnl (This flag should be set for all machines, except for the Crays, where -dnl the cache value is set in it's config file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle converting +## denormalized floating-point values. +## (This flag should be set for all machines, except for the Crays, where +## the cache value is set in it's config file) +## AC_MSG_CHECKING([if converting denormalized floating-point values is possible]) AC_CACHE_VAL([hdf5_cv_convert_denormal_float], [hdf5_cv_convert_denormal_float=yes]) @@ -3109,12 +3132,12 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can handle converting -dnl floating-point to long long values. -dnl (This flag should be _unset_ for all machines, except for Windows, where -dnl it's set in the custom Windows H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle converting +## floating-point to long long values. +## (This flag should be _unset_ for all machines, except for Windows, where +## it's set in the custom Windows H5pubconf.h file) +## AC_MSG_CHECKING([if converting floating-point values to long long is not working]) AC_CACHE_VAL([hdf5_cv_convert_float_llong_not_works], [hdf5_cv_convert_float_llong_not_works=no]) @@ -3126,12 +3149,12 @@ else AC_MSG_RESULT([false]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine has window style pathname, -dnl that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). -dnl (This flag should be _unset_ for all machines, except for Windows, where -dnl it's set in the custom Windows H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine has window style pathname, +## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). +## (This flag should be _unset_ for all machines, except for Windows, where +## it's set in the custom Windows H5pubconf.h file) +## AC_MSG_CHECKING([if the machine has window style path name]) case "`uname`" in @@ -3145,13 +3168,13 @@ case "`uname`" in ;; esac -dnl ----------------------------------------------------------------------- -dnl Set flag to indicate that the machine can handle conversion from -dnl long double to integers accurately. This flag should be set "yes" for -dnl all machines except all SGIs. For SGIs, some conversions are -dnl incorrect and its cache value is set "no" in its config/irix6.x and -dnl irix5.x. -dnl +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can handle conversion from +## long double to integers accurately. This flag should be set "yes" for +## all machines except all SGIs. For SGIs, some conversions are +## incorrect and its cache value is set "no" in its config/irix6.x and +## irix5.x. +## AC_MSG_CHECKING([if converting from long double to integers is accurate]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3168,13 +3191,13 @@ else AC_MSG_RESULT([no]) fi -dnl ----------------------------------------------------------------------- -dnl Set flag to indicate that the machine can do conversion from -dnl long double to integers regardless of accuracy. This flag should be -dnl set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the -dnl compiler has 'floating exception' when converting 'long double' to all -dnl integers except 'unsigned long long'. Other HP-UX systems are unknown -dnl yet. (1/8/05 - SLU) +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can do conversion from +## long double to integers regardless of accuracy. This flag should be +## set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the +## compiler has 'floating exception' when converting 'long double' to all +## integers except 'unsigned long long'. Other HP-UX systems are unknown +## yet. (1/8/05 - SLU) AC_MSG_CHECKING([if converting from long double to integers works]) @@ -3215,13 +3238,13 @@ else AC_MSG_RESULT([no]) fi -dnl ----------------------------------------------------------------------- -dnl Set flag to indicate that the machine can handle conversion from -dnl integers to long double. (This flag should be set "yes" for all -dnl machines except all SGIs, where some conversions are -dnl incorrect and its cache value is set "no" in its config/irix6.x and -dnl irix5.x) -dnl +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can handle conversion from +## integers to long double. (This flag should be set "yes" for all +## machines except all SGIs, where some conversions are +## incorrect and its cache value is set "no" in its config/irix6.x and +## irix5.x) +## AC_MSG_CHECKING([if accurately converting from integers to long double]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3238,14 +3261,14 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'unsigned long' to 'float' values. -dnl (This flag should be set for all machines, except for Pathscale compiler -dnl on Sandia's Linux machine where the compiler interprets 'unsigned long' -dnl values as negative when the first bit of 'unsigned long' is on during -dnl the conversion to float.) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'unsigned long' to 'float' values. +## (This flag should be set for all machines, except for Pathscale compiler +## on Sandia's Linux machine where the compiler interprets 'unsigned long' +## values as negative when the first bit of 'unsigned long' is on during +## the conversion to float.) +## AC_MSG_CHECKING([if accurately converting unsigned long to float values]) AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate], @@ -3288,14 +3311,14 @@ else fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'unsigned (long) long' values to 'float' and 'double' values. -dnl (This flag should be set for all machines, except for the SGIs, where -dnl the cache value is set in the config/irix6.x config file) and Solaris -dnl 64-bit machines, where the short program below tests if round-up is -dnl correctly handled. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'unsigned (long) long' values to 'float' and 'double' values. +## (This flag should be set for all machines, except for the SGIs, where +## the cache value is set in the config/irix6.x config file) and Solaris +## 64-bit machines, where the short program below tests if round-up is +## correctly handled. +## AC_MSG_CHECKING([if accurately converting unsigned long long to floating-point values]) if test ${host_os_novers} = "solaris2.x"; then @@ -3372,13 +3395,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'float' or 'double' to 'unsigned long long' values. -dnl (This flag should be set for all machines, except for PGI compiler -dnl where round-up happens when the fraction of float-point value is greater -dnl than 0.5. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'float' or 'double' to 'unsigned long long' values. +## (This flag should be set for all machines, except for PGI compiler +## where round-up happens when the fraction of float-point value is greater +## than 0.5. +## AC_MSG_CHECKING([if accurately roundup converting floating-point to unsigned long long values]) AC_CACHE_VAL([hdf5_cv_fp_to_ullong_accurate], @@ -3409,13 +3432,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'float', 'double' or 'long double' to 'unsigned long long' values. -dnl (This flag should be set for all machines, except for HP-UX machines -dnl where the maximal number for unsigned long long is 0x7fffffffffffffff -dnl during conversion. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'float', 'double' or 'long double' to 'unsigned long long' values. +## (This flag should be set for all machines, except for HP-UX machines +## where the maximal number for unsigned long long is 0x7fffffffffffffff +## during conversion. +## AC_MSG_CHECKING([if right maximum converting floating-point to unsigned long long values]) AC_CACHE_VAL([hdf5_cv_fp_to_ullong_right_maximum], @@ -3453,11 +3476,11 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'long double' to 'unsigned int' values. (This flag should be set for -dnl all machines, except for some Intel compilers on some Linux.) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to 'unsigned int' values. (This flag should be set for +## all machines, except for some Intel compilers on some Linux.) +## AC_MSG_CHECKING([if correctly converting long double to unsigned int values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3489,13 +3512,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can _compile_ -dnl 'unsigned long long' to 'float' and 'double' typecasts. -dnl (This flag should be set for all machines, except for under Windows when -dnl compiled with Visual Studio 6, where the macro value is set in the -dnl src/H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can _compile_ +## 'unsigned long long' to 'float' and 'double' typecasts. +## (This flag should be set for all machines, except for under Windows when +## compiled with Visual Studio 6, where the macro value is set in the +## src/H5pubconf.h file) +## AC_MSG_CHECKING([if compiling unsigned long long to floating-point typecasts work]) AC_CACHE_VAL([hdf5_cv_ullong_to_fp_cast_works], [hdf5_cv_ullong_to_fp_cast_works=yes]) @@ -3507,13 +3530,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can _compile_ -dnl 'long long' to 'float' and 'double' typecasts. -dnl (This flag should be set for all machines, except for under Windows when -dnl compiled with Visual Studio 6, where the macro value is set in the -dnl src/H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can _compile_ +## 'long long' to 'float' and 'double' typecasts. +## (This flag should be set for all machines, except for under Windows when +## compiled with Visual Studio 6, where the macro value is set in the +## src/H5pubconf.h file) +## AC_MSG_CHECKING([if compiling long long to floating-point typecasts work]) AC_CACHE_VAL([hdf5_cv_llong_to_fp_cast_works], [hdf5_cv_llong_to_fp_cast_works=yes]) @@ -3525,13 +3548,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can convert from -dnl 'unsigned long long' to 'long double' without precision loss. -dnl (This flag should be set for all machines, except for FreeBSD(sleipnir) -dnl where the last 2 bytes of mantissa are lost when compiler tries to do -dnl the conversion, and Cygwin where compiler doesn't do rounding correctly.) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can convert from +## 'unsigned long long' to 'long double' without precision loss. +## (This flag should be set for all machines, except for FreeBSD(sleipnir) +## where the last 2 bytes of mantissa are lost when compiler tries to do +## the conversion, and Cygwin where compiler doesn't do rounding correctly.) +## AC_MSG_CHECKING([if converting unsigned long long to long double with precision]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3623,13 +3646,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can handle overflow converting -dnl all floating-point to all integer types. -dnl (This flag should be set for all machines, except for Cray X1 where -dnl floating exception is generated when the floating-point value is greater -dnl than the maximal integer value). -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle overflow converting +## all floating-point to all integer types. +## (This flag should be set for all machines, except for Cray X1 where +## floating exception is generated when the floating-point value is greater +## than the maximal integer value). +## AC_MSG_CHECKING([if overflows normally converting floating-point to integer values]) AC_CACHE_VAL([hdf5_cv_fp_to_integer_overflow_works], @@ -3654,15 +3677,15 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine is using a special algorithm to convert -dnl 'long double' to '(unsigned) long' values. (This flag should only be set for -dnl the IBM Power6 Linux. When the bit sequence of long double is -dnl 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long -dnl is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. -dnl The machine's conversion gets the correct value. We define the macro and disable -dnl this kind of test until we figure out what algorithm they use. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine is using a special algorithm to convert +## 'long double' to '(unsigned) long' values. (This flag should only be set for +## the IBM Power6 Linux. When the bit sequence of long double is +## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long +## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. +## The machine's conversion gets the correct value. We define the macro and disable +## this kind of test until we figure out what algorithm they use. +## AC_MSG_CHECKING([if using special algorithm to convert long double to (unsigned) long values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3734,14 +3757,14 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine is using a special algorithm -dnl to convert some values of '(unsigned) long' to 'long double' values. -dnl (This flag should be off for all machines, except for IBM Power6 Linux, -dnl when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -dnl ..., 7fffff..., the compiler uses a unknown algorithm. We define a -dnl macro and skip the test for now until we know about the algorithm. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine is using a special algorithm +## to convert some values of '(unsigned) long' to 'long double' values. +## (This flag should be off for all machines, except for IBM Power6 Linux, +## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the compiler uses a unknown algorithm. We define a +## macro and skip the test for now until we know about the algorithm. +## AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3815,15 +3838,15 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'long double' to '(unsigned) long long' values. (This flag should be set for -dnl all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence -dnl of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long -dnl start to go wrong on these two machines. Adjusting it higher to -dnl 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted -dnl values wildly wrong. This test detects this wrong behavior and disable the test. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should be set for +## all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence +## of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long +## start to go wrong on these two machines. Adjusting it higher to +## 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted +## values wildly wrong. This test detects this wrong behavior and disable the test. +## AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3879,13 +3902,13 @@ else fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl '(unsigned) long long' to 'long double' values. (This flag should be set for -dnl all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., -dnl 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice -dnl as big as they should be. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be set for +## all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., +## 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice +## as big as they should be. +## AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3944,12 +3967,12 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine generates bad code -dnl for the H5V_log2_gen() routine in src/H5Vprivate.h -dnl (This flag should be set to no for all machines, except for SGI IRIX64, -dnl where the cache value is set to yes in it's config file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine generates bad code +## for the H5V_log2_gen() routine in src/H5Vprivate.h +## (This flag should be set to no for all machines, except for SGI IRIX64, +## where the cache value is set to yes in it's config file) +## AC_MSG_CHECKING([if bad code for log2 routine is generated]) AC_CACHE_VAL([hdf5_cv_bad_log2_code_generated], [hdf5_cv_bad_log2_code_generated=no]) @@ -3961,28 +3984,28 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set some variables for general configuration information to be saved -dnl and installed with the libraries. -dnl +## ---------------------------------------------------------------------- +## Set some variables for general configuration information to be saved +## and installed with the libraries. +## -dnl HDF5 version from the first line of the README.txt file. +## HDF5 version from the first line of the README.txt file. H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" AC_SUBST([H5_VERSION]) -dnl Configuration date +## Configuration date AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" -dnl User doing the configuration +## User doing the configuration AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" if test -n "$ORGANIZATION"; then CONFIG_USER="$CONFIG_USER at $ORGANIZATION" fi -dnl Configuration mode (production, development, profile, etc) saved above. +## Configuration mode (production, development, profile, etc) saved above. AC_SUBST([CONFIG_MODE]) -dnl Byte sex from the AC_C_BIGENDIAN macro. +## Byte sex from the AC_C_BIGENDIAN macro. AC_SUBST([BYTESEX]) if test "X$ac_cv_c_bigendian" = "Xyes"; then BYTESEX="big-endian" @@ -3998,13 +4021,13 @@ else fi AC_SUBST([WORDS_BIGENDIAN]) -dnl Parallel support? (set above except empty if none) +## Parallel support? (set above except empty if none) PARALLEL=${PARALLEL:-no} -dnl Compiler with version information. This consists of the full path -dnl name of the compiler and the reported version number. +## Compiler with version information. This consists of the full path +## name of the compiler and the reported version number. AC_SUBST([CC_VERSION]) -dnl Strip anything that looks like a flag off of $CC +## Strip anything that looks like a flag off of $CC CC_NOFLAGS=`echo $CC | sed 's/ -.*//'` if `echo $CC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -4023,7 +4046,7 @@ if test -n "$cc_version_info"; then fi AC_SUBST([FC_VERSION]) -dnl Strip anything that looks like a flag off of $CC +## Strip anything that looks like a flag off of $CC FC_NOFLAGS=`echo $FC | sed 's/ -.*//'` if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -4042,7 +4065,7 @@ if test -n "$fc_version_info"; then fi AC_SUBST([CXX_VERSION]) -dnl Strip anything that looks like a flag off of $CC +## Strip anything that looks like a flag off of $CC CXX_NOFLAGS=`echo $CXX | sed 's/ -.*//'` if `echo $CXX_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -4060,12 +4083,12 @@ if test -n "$cxx_version_info"; then CXX_VERSION="$CXX_VERSION ( $cxx_version_info)" fi -dnl ---------------------------------------------------------------------- -dnl Where is the root of the source tree. Give an absolute address so -dnl we can find it no matter which directory of the distribution is our -dnl current directory. The built-in pwd fails on some systems, but the -dnl /bin/pwd version works OK. -dnl +## ---------------------------------------------------------------------- +## Where is the root of the source tree. Give an absolute address so +## we can find it no matter which directory of the distribution is our +## current directory. The built-in pwd fails on some systems, but the +## /bin/pwd version works OK. +## if test -x /bin/pwd; then pwd=/bin/pwd else @@ -4073,16 +4096,16 @@ else fi AC_SUBST([ROOT]) ROOT="`$pwd`" -dnl ---------------------------------------------------------------------- -dnl Move any compiler-specific libraries into the main LIBS varaible. -dnl +## ---------------------------------------------------------------------- +## Move any compiler-specific libraries into the main LIBS varaible. +## LIBS="$DEFAULT_LIBS $LIBS" -dnl ---------------------------------------------------------------------- -dnl Determine the runtime libraries we may need to include in the -dnl libtools command so that executables will find the correct dynamic -dnl libraries. -dnl +## ---------------------------------------------------------------------- +## Determine the runtime libraries we may need to include in the +## libtools command so that executables will find the correct dynamic +## libraries. +## AC_SUBST([DYNAMIC_DIRS]) DYNAMIC_DIRS="" if test -n "$AM_LDFLAGS $LDFLAGS"; then @@ -4092,8 +4115,8 @@ if test -n "$AM_LDFLAGS $LDFLAGS"; then d="`echo $d | sed -e 's/-L//g'`" case "$d" in .*) - dnl If the path isn't absolute, make it so by - dnl prepending the ROOT directory to it. + ## If the path isn't absolute, make it so by + ## prepending the ROOT directory to it. d=${ROOT}/$d ;; esac @@ -4108,8 +4131,8 @@ if test -n "$AM_CPPFLAGS"; then for d in $AM_CPPFLAGS ; do case "$d" in -I.*) - dnl If the path isn't absolute, make it so by prepending - dnl the ROOT directory to it. + ## If the path isn't absolute, make it so by prepending + ## the ROOT directory to it. d="`echo $d | sed -e 's/-I//g'`" d="-I${ROOT}/${d}" ;; @@ -4119,16 +4142,16 @@ if test -n "$AM_CPPFLAGS"; then AM_CPPFLAGS=$TEMP_CPPFLAGS fi -dnl ---------------------------------------------------------------------- -dnl Check if they would like the High Level library compiled -dnl +## ---------------------------------------------------------------------- +## Check if they would like the High Level library compiled +## AC_SUBST(HL) HL="" -# name of fortran folder inside "hl", if FORTRAN compile is requested +## name of fortran folder inside "hl", if FORTRAN compile is requested AC_SUBST(HL_FOR) HL_FOR="" AC_MSG_CHECKING([if high level library is enabled]) AC_ARG_ENABLE([hl], - [AC_HELP_STRING([--enable-hl], + [AS_HELP_STRING([--enable-hl], [Enable the high level library [default=yes]])], [HDF5_HL=$enableval], [HDF5_HL=yes]) @@ -4142,14 +4165,14 @@ else echo "no" fi -dnl ---------------------------------------------------------------------- -dnl Some programs shouldn't be built by default (e.g., programs to generate -dnl data files used by tests, some optional tests). -dnl Check if they want such programs built anyway. -dnl +## ---------------------------------------------------------------------- +## Some programs shouldn't be built by default (e.g., programs to generate +## data files used by tests, some optional tests). +## Check if they want such programs built anyway. +## AC_MSG_CHECKING([additional programs should be built]) AC_ARG_ENABLE([build-all], - [AC_HELP_STRING([--enable-build-all], + [AS_HELP_STRING([--enable-build-all], [Build helper programs that only developers should need [default=no]])], [BUILD_ALL=$enableval], [BUILD_ALL=no]) @@ -4161,13 +4184,13 @@ else fi AM_CONDITIONAL([BUILD_ALL_CONDITIONAL], [test "X$BUILD_ALL" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Enable deprecated public API symbols -dnl +## ---------------------------------------------------------------------- +## Enable deprecated public API symbols +## AC_SUBST([DEPRECATED_SYMBOLS]) AC_MSG_CHECKING([if deprecated public symbols are available]); AC_ARG_ENABLE([deprecated-symbols], - [AC_HELP_STRING([--enable-deprecated-symbols], + [AS_HELP_STRING([--enable-deprecated-symbols], [Enable deprecated public API symbols [default=yes]])], [DEPREC_SYMBOLS=$enableval], [DEPREC_SYMBOLS=yes]) @@ -4185,17 +4208,17 @@ case "X-$DEPREC_SYMBOLS" in ;; esac -dnl -------------------------------------------------------------------------- -dnl Which version of the public APIs should the 'base' versioned symbols use? -dnl +## -------------------------------------------------------------------------- +## Which version of the public APIs should the 'base' versioned symbols use? +## AC_SUBST([DEFAULT_API_VERSION]) AC_MSG_CHECKING([which version of public symbols to use by default]) AC_ARG_WITH([default-api-version], - [AC_HELP_STRING([--with-default-api-version=(v16|v18|v110)], + [AS_HELP_STRING([--with-default-api-version=(v16|v18|v110)], [Specify default release version of public symbols [default=v110]])],, - withval=v110) + [withval=v110]) if test "X$withval" = "Xv16"; then AC_MSG_RESULT([v16]) @@ -4212,28 +4235,28 @@ else AC_MSG_ERROR([invalid version of public symbols given]) fi -dnl It's an error to try to disable deprecated public API symbols while -dnl choosing an older version of the public API as the default. However, -dnl if the user insists on doing this via the --enable-unsupported configure -dnl flag, we'll let them. +## It's an error to try to disable deprecated public API symbols while +## choosing an older version of the public API as the default. However, +## if the user insists on doing this via the --enable-unsupported configure +## flag, we'll let them. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${DEFAULT_API_VERSION}" != "Xv110" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error.]) fi fi -dnl ---------------------------------------------------------------------- -dnl Enable strict file format checks -dnl +## ---------------------------------------------------------------------- +## Enable strict file format checks +## AC_SUBST([STRICT_FORMAT_CHECKS]) AC_MSG_CHECKING([Whether to perform strict file format checks]); AC_ARG_ENABLE([strict-format-checks], - [AC_HELP_STRING([--enable-strict-format-checks], + [AS_HELP_STRING([--enable-strict-format-checks], [Enable strict file format checks, default=yes if debug flag is enabled, no otherwise])], [STRICT_CHECKS=$enableval]) -dnl Default to yes if debug is enabled +## Default to yes if debug is enabled if test "X-$STRICT_CHECKS" = X- ; then if test -z "$DEBUG_PKG" ; then STRICT_CHECKS=no @@ -4256,12 +4279,12 @@ case "X-$STRICT_CHECKS" in esac -dnl ---------------------------------------------------------------------- -dnl Enable embedded library information -dnl +## ---------------------------------------------------------------------- +## Enable embedded library information +## AC_MSG_CHECKING([Whether to have library information embedded in the executables]) AC_ARG_ENABLE([embedded-libinfo], - [AC_HELP_STRING([--enable-embedded-libinfo], + [AS_HELP_STRING([--enable-embedded-libinfo], [Enable embedded library information [default=yes]])], [enable_embedded_libinfo=$enableval], [enable_embedded_libinfo=yes]) @@ -4275,9 +4298,9 @@ AC_ARG_ENABLE([embedded-libinfo], fi -dnl ---------------------------------------------------------------------- -dnl Check if pointer alignments are enforced -dnl +## ---------------------------------------------------------------------- +## Check if pointer alignments are enforced +## AC_MSG_CHECKING([if alignment restrictions are strictly enforced]) AC_RUN_IFELSE([ AC_LANG_PROGRAM([ @@ -4323,8 +4346,8 @@ AC_RUN_IFELSE([ ]) -dnl ---------------------------------------------------------------------- -dnl Restore user's CFLAGS. +## ---------------------------------------------------------------------- +## Restore user's CFLAGS. CFLAGS="$saved_user_CFLAGS" FCFLAGS="$saved_user_FCFLAGS" CXXFLAGS="$saved_user_CXXFLAGS" @@ -4332,9 +4355,9 @@ CPPFLAGS="$saved_user_CPPFLAGS" LDFLAGS="$saved_user_LDFLAGS" -dnl ---------------------------------------------------------------------- -dnl Create automake conditionals to tell automake makefiles which directories -dnl need to be compiled +## ---------------------------------------------------------------------- +## Create automake conditionals to tell automake makefiles which directories +## need to be compiled AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"]) AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"]) @@ -4342,37 +4365,37 @@ AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"]) AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Build the Makefiles. -dnl +## ---------------------------------------------------------------------- +## Build the Makefiles. +## -dnl The directory search list +## The directory search list AC_SUBST([SEARCH]) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"' SEARCH="$SEARCH_RULE`eval $cmd`" export SEARCH -dnl We don't need to say when we're entering directories if we're using -dnl GNU make because make does it for us. +## We don't need to say when we're entering directories if we're using +## GNU make because make does it for us. if test "X$GMAKE" = "Xyes"; then AC_SUBST([SETX]) SETX=":" else AC_SUBST([SETX]) SETX="set -x" fi -dnl Some cleanup stuff +## Some cleanup stuff rm -f conftest conftest.o conftest.c dummy.o *.mod -dnl Build config.status, touch the stamp files, and build all the Makefiles. -dnl The order is such that the first `make' does not need to update any -dnl configuration information. See config/commence.in for the order in which -dnl things need to be done. +## Build config.status, touch the stamp files, and build all the Makefiles. +## The order is such that the first `make' does not need to update any +## configuration information. See config/commence.in for the order in which +## things need to be done. -# First the stamp1 file for H5config.h.in +## First the stamp1 file for H5config.h.in mkdir ./config >/dev/null 2>&1 touch ./config/stamp1 -# Then the config.status file (but not makefiles) +## Then the config.status file (but not makefiles) saved_no_create=$no_create no_create=yes @@ -4471,16 +4494,16 @@ AC_OUTPUT LT_OUTPUT no_create=$saved_no_create -# Then the stamp2 file for H5config.h +## Then the stamp2 file for H5config.h touch ./config/stamp2 -# Finally the makefiles +## Finally the makefiles test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -dnl Post processing to patch up some deficiencies in libtool +## Post processing to patch up some deficiencies in libtool case $host_os in linux* | freebsd* ) - # If gcc is not used, need to set $wl to use "-Wl," + ## If gcc is not used, need to set $wl to use "-Wl," if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then : using gcc else @@ -4494,12 +4517,12 @@ EOF ;; esac -dnl Are we compiling static libraries, shared libraries, or both? This -dnl is only used for the libhdf5.settings file. We can't just look at -dnl $enable_static and $enable_shared because if they're yes the ltconfig -dnl might have decided that one or the other is simply not possible. -dnl Therefore we have to ask the generated `libtool' shell script -dnl which 'features' it has enabled. +## Are we compiling static libraries, shared libraries, or both? This +## is only used for the libhdf5.settings file. We can't just look at +## $enable_static and $enable_shared because if they're yes the ltconfig +## might have decided that one or the other is simply not possible. +## Therefore we have to ask the generated `libtool' shell script +## which 'features' it has enabled. if (./libtool --features | grep '^enable shared libraries' > /dev/null); then enable_shared=yes else @@ -4532,9 +4555,9 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi -dnl We don't want inline defined for C++ compilers -dnl Don't worry about the C++ ifdef wrappers in the H5pubconf file, since -dnl 'H5_inline' isn't a C++ keyword. +## We don't want inline defined for C++ compilers +## Don't worry about the C++ ifdef wrappers in the H5pubconf file, since +## 'H5_inline' isn't a C++ keyword. cat >> src/H5config.h <> src/H5config.h < #ifdef H5_HAVE_UNISTD_H #include -#endif +#endif /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus @@ -175,6 +175,15 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, yytext_ptr ) +/* Some routines like yy_flex_realloc() are emitted as static but are + not called by all lexers. This generates warnings in some compilers, + notably GCC. Arrange to suppress these. */ +#ifdef __GNUC__ +#define YY_MAY_BE_UNUSED __attribute__((unused)) +#else +#define YY_MAY_BE_UNUSED +#endif + /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). @@ -281,7 +290,7 @@ YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer @@ -849,10 +858,10 @@ hbool_t first_quote = 1; /* For Lex and Yacc */ /*int input_len; char *myinput;*/ - + #define TAG_STRING 1 -#line 834 "H5LTanalyze.c" +#line 843 "H5LTanalyze.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1006,7 +1015,7 @@ YY_DECL #line 76 "H5LTanalyze.l" -#line 988 "H5LTanalyze.c" +#line 997 "H5LTanalyze.c" if ( yy_init ) { @@ -1288,17 +1297,17 @@ YY_RULE_SETUP case 40: YY_RULE_SETUP #line 121 "H5LTanalyze.l" -{return token(H5T_STR_NULLTERM_TOKEN);} +{return token(H5T_STR_NULLTERM_TOKEN);} YY_BREAK case 41: YY_RULE_SETUP #line 122 "H5LTanalyze.l" -{return token(H5T_STR_NULLPAD_TOKEN);} +{return token(H5T_STR_NULLPAD_TOKEN);} YY_BREAK case 42: YY_RULE_SETUP #line 123 "H5LTanalyze.l" -{return token(H5T_STR_SPACEPAD_TOKEN);} +{return token(H5T_STR_SPACEPAD_TOKEN);} YY_BREAK case 43: YY_RULE_SETUP @@ -1363,12 +1372,12 @@ YY_RULE_SETUP case 55: YY_RULE_SETUP #line 139 "H5LTanalyze.l" -{ - if( is_str_size || (is_enum && is_enum_memb) || +{ + if( is_str_size || (is_enum && is_enum_memb) || is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) || (csindex>-1 && cmpd_stack[csindex].is_field) ) { H5LTyylval.ival = atoi(yytext); - return NUMBER; + return NUMBER; } else REJECT; } @@ -1378,7 +1387,7 @@ YY_RULE_SETUP #line 149 "H5LTanalyze.l" { /*if it's first quote, and is a compound field name or an enum symbol*/ - if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field)) + if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field)) && first_quote) { first_quote = 0; BEGIN TAG_STRING; @@ -1441,7 +1450,7 @@ YY_RULE_SETUP #line 174 "H5LTanalyze.l" ECHO; YY_BREAK -#line 1423 "H5LTanalyze.c" +#line 1432 "H5LTanalyze.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(TAG_STRING): yyterminate(); @@ -2323,8 +2332,8 @@ int main() int my_yyinput(char *buf, int max_size) { int ret; - - memcpy(buf, myinput, input_len); + + memcpy(buf, myinput, input_len); ret = input_len; return ret; } @@ -2332,6 +2341,7 @@ int my_yyinput(char *buf, int max_size) int H5LTyyerror(char *msg) { printf("ERROR: %s before \"%s\".\n", msg, yytext); + return 0; } int yywrap() diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l index dbba15a..3f63f50 100644 --- a/hl/src/H5LTanalyze.l +++ b/hl/src/H5LTanalyze.l @@ -184,6 +184,7 @@ int my_yyinput(char *buf, int max_size) int H5LTyyerror(char *msg) { printf("ERROR: %s before \"%s\".\n", msg, yytext); + return 0; } int yywrap() diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index 8a77f13..0013e67 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -15,6 +15,7 @@ #include #include +#include "H5private.h" #include "H5LTprivate.h" #include "H5TBprivate.h" @@ -663,7 +664,7 @@ herr_t H5TBwrite_fields_index( hid_t loc_id, hid_t m_sid=-1; hid_t file_space_id=-1; char *member_name; - hsize_t i, j; + hsize_t i; hid_t preserve_id; size_t size_native; @@ -688,14 +689,19 @@ herr_t H5TBwrite_fields_index( hid_t loc_id, /* iterate tru the members */ for ( i = 0; i < nfields; i++) { + unsigned j; + + /* Range check value */ + if(field_index[i] < 0) + goto out; - j = field_index[i]; + j = (unsigned)field_index[i]; /* get the member name */ - member_name = H5Tget_member_name( tid, (unsigned) j ); + member_name = H5Tget_member_name( tid, j ); /* get the member type */ - if (( member_type_id = H5Tget_member_type( tid, (unsigned) j )) < 0) + if (( member_type_id = H5Tget_member_type( tid, j )) < 0) goto out; /* convert to native type */ @@ -1149,7 +1155,7 @@ herr_t H5TBread_fields_index( hid_t loc_id, hid_t m_sid=-1; hsize_t mem_size[1]; size_t size_native; - hsize_t i, j; + hsize_t i; /* open the dataset. */ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0) @@ -1166,13 +1172,19 @@ herr_t H5TBread_fields_index( hid_t loc_id, /* iterate tru the members */ for ( i = 0; i < nfields; i++) { - j = field_index[i]; + unsigned j; + + /* Range check */ + if(field_index[i] < 0) + goto out; + + j = (unsigned)field_index[i]; /* get the member name */ - member_name = H5Tget_member_name( tid, (unsigned) j ); + member_name = H5Tget_member_name( tid, j ); /* get the member type */ - if (( member_type_id = H5Tget_member_type( tid, (unsigned) j )) < 0) + if (( member_type_id = H5Tget_member_type( tid, j )) < 0) goto out; /* get the member size */ @@ -1748,50 +1760,50 @@ out: * *------------------------------------------------------------------------- */ -herr_t H5TBcombine_tables( hid_t loc_id1, +herr_t H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const char *dset_name2, - const char *dset_name3 ) + const char *dset_name3) { - /* identifiers for the 1st dataset. */ - hid_t did_1=-1; - hid_t tid_1=-1; - hid_t sid_1=-1; - hid_t pid_1=-1; + hid_t did_1 = H5I_BADID; + hid_t tid_1 = H5I_BADID; + hid_t sid_1 = H5I_BADID; + hid_t pid_1 = H5I_BADID; /* identifiers for the 2nd dataset. */ - hid_t did_2=-1; - hid_t tid_2=-1; - hid_t sid_2=-1; - hid_t pid_2=-1; + hid_t did_2 = H5I_BADID; + hid_t tid_2 = H5I_BADID; + hid_t sid_2 = H5I_BADID; + hid_t pid_2 = H5I_BADID; /* identifiers for the 3rd dataset. */ - hid_t did_3=-1; - hid_t tid_3=-1; - hid_t sid_3=-1; - hid_t pid_3=-1; + hid_t did_3 = H5I_BADID; + hid_t tid_3 = H5I_BADID; + hid_t sid_3 = H5I_BADID; + hid_t pid_3 = H5I_BADID; + hid_t sid = H5I_BADID; + hid_t m_sid = H5I_BADID; + hid_t member_type_id = H5I_BADID; + hid_t attr_id = H5I_BADID; hsize_t count[1]; hsize_t offset[1]; - hid_t m_sid; hsize_t mem_size[1]; hsize_t nfields; hsize_t nrecords; hsize_t dims[1]; - hsize_t maxdims[1] = { H5S_UNLIMITED }; + hsize_t maxdims[1] = {H5S_UNLIMITED}; + hsize_t i; size_t type_size; - hid_t sid; - hid_t member_type_id; size_t member_offset; + size_t src_size; + size_t *src_offset = NULL; + size_t *src_sizes = NULL; char attr_name[255]; - hid_t attr_id; char aux[255]; - unsigned char *tmp_buf; - unsigned char *tmp_fill_buf; - hsize_t i; - size_t src_size; - size_t *src_offset; - size_t *src_sizes; - int has_fill=0; + unsigned char *tmp_buf = NULL; + unsigned char *tmp_fill_buf = NULL; + htri_t has_fill; + int ret_val = -1; /*------------------------------------------------------------------------- * first we get information about type size and offsets on disk @@ -1799,18 +1811,17 @@ herr_t H5TBcombine_tables( hid_t loc_id1, */ /* get the number of records and fields */ - if (H5TBget_table_info ( loc_id1, dset_name1, &nfields, &nrecords ) < 0) - return -1; - - src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t)); - src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t)); + if(H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0) + goto out; - if (src_offset == NULL ) - return -1; + if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t)))) + goto out; + if(NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t)))) + goto out; /* get field info */ - if (H5TBget_field_info( loc_id1, dset_name1, NULL, src_sizes, src_offset, &src_size ) < 0) - return -1; + if(H5TBget_field_info(loc_id1, dset_name1, NULL, src_sizes, src_offset, &src_size) < 0) + goto out; /*------------------------------------------------------------------------- * get information about the first table @@ -1818,24 +1829,24 @@ herr_t H5TBcombine_tables( hid_t loc_id1, */ /* open the 1st dataset. */ - if ((did_1 = H5Dopen2(loc_id1, dset_name1, H5P_DEFAULT)) < 0) + if((did_1 = H5Dopen2(loc_id1, dset_name1, H5P_DEFAULT)) < 0) goto out; /* get the datatype */ - if ((tid_1 = H5Dget_type( did_1 )) < 0) + if((tid_1 = H5Dget_type(did_1)) < 0) goto out; /* get the dataspace handle */ - if ((sid_1 = H5Dget_space( did_1 )) < 0) + if((sid_1 = H5Dget_space(did_1)) < 0) goto out; /* get creation properties list */ - if ((pid_1 = H5Dget_create_plist( did_1 )) < 0) + if((pid_1 = H5Dget_create_plist(did_1)) < 0) goto out; /* get the dimensions */ - if (H5TBget_table_info ( loc_id1, dset_name1, &nfields, &nrecords ) < 0) - return -1; + if(H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0) + goto out; /*------------------------------------------------------------------------- * make the merged table with no data originally @@ -1843,11 +1854,11 @@ herr_t H5TBcombine_tables( hid_t loc_id1, */ /* clone the property list */ - if ((pid_3 = H5Pcopy(pid_1)) < 0) + if((pid_3 = H5Pcopy(pid_1)) < 0) goto out; /* clone the type id */ - if ((tid_3 = H5Tcopy(tid_1)) < 0) + if((tid_3 = H5Tcopy(tid_1)) < 0) goto out; /*------------------------------------------------------------------------- @@ -1858,96 +1869,97 @@ herr_t H5TBcombine_tables( hid_t loc_id1, dims[0] = 0; /* create a simple data space with unlimited size */ - if ((sid_3 = H5Screate_simple(1, dims, maxdims)) < 0) - return -1; + if((sid_3 = H5Screate_simple(1, dims, maxdims)) < 0) + goto out; /* create the dataset */ - if ((did_3 = H5Dcreate2(loc_id1, dset_name3, tid_3, sid_3, H5P_DEFAULT, pid_3, H5P_DEFAULT)) < 0) + if((did_3 = H5Dcreate2(loc_id1, dset_name3, tid_3, sid_3, H5P_DEFAULT, pid_3, H5P_DEFAULT)) < 0) goto out; /*------------------------------------------------------------------------- * attach the conforming table attributes *------------------------------------------------------------------------- */ - if (H5TB_attach_attributes("Merge table", loc_id1, dset_name3, nfields, tid_3) < 0) + if(H5TB_attach_attributes("Merge table", loc_id1, dset_name3, nfields, tid_3) < 0) goto out; /*------------------------------------------------------------------------- * get attributes *------------------------------------------------------------------------- */ - type_size = H5Tget_size(tid_3); /* alloc fill value attribute buffer */ - tmp_fill_buf = (unsigned char *)malloc(type_size); + if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(type_size))) + goto out; /* get the fill value attributes */ - has_fill = H5TBAget_fill(loc_id1, dset_name1, did_1, tmp_fill_buf); + if((has_fill = H5TBAget_fill(loc_id1, dset_name1, did_1, tmp_fill_buf)) < 0) + goto out; /*------------------------------------------------------------------------- * attach the fill attributes from previous table *------------------------------------------------------------------------- */ - if (has_fill == 1 ) - { + if(has_fill) { - if (( sid = H5Screate(H5S_SCALAR)) < 0) + if((sid = H5Screate(H5S_SCALAR)) < 0) goto out; - for ( i = 0; i < nfields; i++) - { - + for(i = 0; i < nfields; i++) { /* get the member type */ - if (( member_type_id = H5Tget_member_type( tid_3, (unsigned) i )) < 0) + if((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0) goto out; /* get the member offset */ member_offset = H5Tget_member_offset(tid_3, (unsigned)i); - strcpy(attr_name, "FIELD_"); - sprintf(aux, "%d", (int)i); - strcat(attr_name, aux); - sprintf(aux, "%s", "_FILL"); - strcat(attr_name, aux); + HDstrncpy(attr_name, "FIELD_", 6); + HDsnprintf(aux, 12, "%d", (int)i); + HDstrncat(attr_name, aux, 12); + HDsnprintf(aux, 6, "%s", "_FILL"); + HDstrncat(attr_name, aux, 7); - if ((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; - if (H5Awrite(attr_id, member_type_id, tmp_fill_buf+member_offset) < 0) + if(H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0) goto out; - if (H5Aclose(attr_id) < 0) + if(H5Aclose(attr_id) < 0) goto out; + attr_id = H5I_BADID; - if (H5Tclose(member_type_id) < 0) + if(H5Tclose(member_type_id) < 0) goto out; + member_type_id = H5I_BADID; } /* close data space. */ - if (H5Sclose( sid ) < 0) + if(H5Sclose(sid) < 0) goto out; + sid = H5I_BADID; } /*------------------------------------------------------------------------- * read data from 1st table *------------------------------------------------------------------------- */ - - tmp_buf = (unsigned char *)calloc((size_t) nrecords, type_size ); + if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size))) + goto out; /* define a hyperslab in the dataset of the size of the records */ offset[0] = 0; count[0] = nrecords; - if (H5Sselect_hyperslab( sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + if(H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) goto out; /* create a memory dataspace handle */ mem_size[0] = count[0]; - if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0) + if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0) goto out; - if (H5Dread( did_1, tid_1, m_sid, sid_1, H5P_DEFAULT, tmp_buf ) < 0) + if(H5Dread(did_1, tid_1, m_sid, sid_1, H5P_DEFAULT, tmp_buf) < 0) goto out; /*------------------------------------------------------------------------- @@ -1956,27 +1968,32 @@ herr_t H5TBcombine_tables( hid_t loc_id1, */ /* append the records to the new table */ - if (H5TBappend_records( loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf ) < 0) + if(H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0) goto out; /*------------------------------------------------------------------------- * release resources from 1st table *------------------------------------------------------------------------- */ - - if (H5Sclose( m_sid ) < 0) + if(H5Sclose(m_sid) < 0) goto out; - if(H5Sclose( sid_1 ) < 0) + m_sid = H5I_BADID; + if(H5Sclose(sid_1) < 0) goto out; - if(H5Tclose( tid_1 ) < 0) + sid_1 = H5I_BADID; + if(H5Tclose(tid_1) < 0) goto out; - if(H5Pclose( pid_1 ) < 0) + tid_1 = H5I_BADID; + if(H5Pclose(pid_1) < 0) goto out; - if(H5Dclose( did_1 ) < 0) + pid_1 = H5I_BADID; + if(H5Dclose(did_1) < 0) goto out; + did_1 = H5I_BADID; /* Release resources. */ - free( tmp_buf ); + free(tmp_buf); + tmp_buf = NULL; /*------------------------------------------------------------------------- * get information about the 2nd table @@ -1984,44 +2001,45 @@ herr_t H5TBcombine_tables( hid_t loc_id1, */ /* open the dataset. */ - if ((did_2 = H5Dopen2(loc_id2, dset_name2, H5P_DEFAULT)) < 0) + if((did_2 = H5Dopen2(loc_id2, dset_name2, H5P_DEFAULT)) < 0) goto out; /* get the datatype */ - if ((tid_2 = H5Dget_type( did_2 )) < 0) + if((tid_2 = H5Dget_type(did_2)) < 0) goto out; /* get the dataspace handle */ - if ((sid_2 = H5Dget_space( did_2 )) < 0) + if((sid_2 = H5Dget_space(did_2)) < 0) goto out; /* get the property list handle */ - if ((pid_2 = H5Dget_create_plist( did_2 )) < 0) + if((pid_2 = H5Dget_create_plist(did_2)) < 0) goto out; /* get the dimensions */ - if (H5TBget_table_info ( loc_id2, dset_name2, &nfields, &nrecords ) < 0) - return -1; + if(H5TBget_table_info(loc_id2, dset_name2, &nfields, &nrecords) < 0) + goto out; /*------------------------------------------------------------------------- * read data from 2nd table *------------------------------------------------------------------------- */ - tmp_buf = (unsigned char *)calloc((size_t) nrecords, type_size ); + if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size))) + goto out; /* define a hyperslab in the dataset of the size of the records */ offset[0] = 0; count[0] = nrecords; - if (H5Sselect_hyperslab( sid_2, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + if(H5Sselect_hyperslab(sid_2, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) goto out; /* create a memory dataspace handle */ mem_size[0] = count[0]; - if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0) + if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0) goto out; - if (H5Dread( did_2, tid_2, m_sid, sid_2, H5P_DEFAULT, tmp_buf ) < 0) + if(H5Dread(did_2, tid_2, m_sid, sid_2, H5P_DEFAULT, tmp_buf) < 0) goto out; /*------------------------------------------------------------------------- @@ -2030,7 +2048,7 @@ herr_t H5TBcombine_tables( hid_t loc_id1, */ /* append the records to the new table */ - if (H5TBappend_records( loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf ) < 0) + if(H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0) goto out; /*------------------------------------------------------------------------- @@ -2038,58 +2056,88 @@ herr_t H5TBcombine_tables( hid_t loc_id1, *------------------------------------------------------------------------- */ - if (H5Sclose( m_sid ) < 0) + if(H5Sclose(m_sid) < 0) goto out; - if (H5Sclose( sid_2 ) < 0) + m_sid = H5I_BADID; + if(H5Sclose(sid_2) < 0) goto out; - if (H5Tclose( tid_2 ) < 0) - return -1; - if (H5Pclose( pid_2 ) < 0) + sid_2 = H5I_BADID; + if(H5Tclose(tid_2) < 0) goto out; - if (H5Dclose( did_2 ) < 0) - return -1; + tid_2 = H5I_BADID; + if(H5Pclose(pid_2) < 0) + goto out; + pid_2 = H5I_BADID; + if(H5Dclose(did_2) < 0) + goto out; + did_2 = H5I_BADID; /*------------------------------------------------------------------------- * release resources from 3rd table *------------------------------------------------------------------------- */ - if (H5Sclose( sid_3 ) < 0) - return -1; - if (H5Tclose( tid_3 ) < 0) - return -1; - if (H5Pclose( pid_3 ) < 0) - return -1; - if (H5Dclose( did_3 ) < 0) - return -1; - - /* Release resources. */ - free( tmp_buf ); - free( tmp_fill_buf ); - free( src_offset ); - free( src_sizes ); + if(H5Sclose(sid_3) < 0) + goto out; + sid_3 = H5I_BADID; + if(H5Tclose(tid_3) < 0) + goto out; + tid_3 = H5I_BADID; + if(H5Pclose(pid_3) < 0) + goto out; + pid_3 = H5I_BADID; + if(H5Dclose(did_3) < 0) + goto out; + did_3 = H5I_BADID; - return 0; + ret_val = 0; - /* error zone */ out: - H5E_BEGIN_TRY - { - H5Dclose(did_1); - H5Sclose(sid_1); - H5Tclose(tid_1); - H5Pclose(pid_1); - H5Dclose(did_2); - H5Sclose(sid_2); - H5Tclose(tid_2); - H5Pclose(pid_2); - H5Dclose(did_3); - H5Sclose(sid_3); - H5Tclose(tid_3); - H5Pclose(pid_3); + if(tmp_buf) + free(tmp_buf); + if(tmp_fill_buf) + free(tmp_fill_buf); + if(src_offset) + free(src_offset); + if(src_sizes) + free(src_sizes); + + H5E_BEGIN_TRY { + if(member_type_id > 0) + H5Tclose(member_type_id); + if(attr_id > 0) + H5Aclose(attr_id); + if(sid > 0) + H5Sclose(sid); + if(m_sid > 0) + H5Sclose(m_sid); + if(pid_1 > 0) + H5Pclose(pid_1); + if(tid_1 > 0) + H5Tclose(tid_1); + if(sid_1 > 0) + H5Sclose(sid_1); + if(did_1 > 0) + H5Dclose(did_1); + if(pid_2 > 0) + H5Pclose(pid_2); + if(tid_2 > 0) + H5Tclose(tid_2); + if(sid_2 > 0) + H5Sclose(sid_2); + if(did_2 > 0) + H5Dclose(did_2); + if(pid_3 > 0) + H5Pclose(pid_3); + if(tid_3 > 0) + H5Tclose(tid_3); + if(sid_3 > 0) + H5Sclose(sid_3); + if(did_3 > 0) + H5Dclose(did_3); } H5E_END_TRY; - return -1; + return ret_val; } /*------------------------------------------------------------------------- @@ -2581,7 +2629,7 @@ herr_t H5TBdelete_field( hid_t loc_id, size_t member_offset; hid_t attr_id; hsize_t i; - int has_fill=0; + htri_t has_fill = 0; /* get the number of records and fields */ if (H5TBget_table_info ( loc_id, dset_name, &nfields, &nrecords ) < 0) @@ -3017,7 +3065,7 @@ herr_t H5TBAget_title( hid_t loc_id, * * Purpose: Read the table attribute fill values * -* Return: Success: 0, Failure: -1 +* Return: Success: TRUE/FALSE, Failure: -1 * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -3029,12 +3077,10 @@ herr_t H5TBAget_title( hid_t loc_id, * *------------------------------------------------------------------------- */ - - -herr_t H5TBAget_fill( hid_t loc_id, +htri_t H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, - unsigned char *dst_buf ) + unsigned char *dst_buf) { hsize_t nfields; @@ -3149,9 +3195,7 @@ herr_t H5TBget_table_info ( hid_t loc_id, */ if (nfields) - { - *nfields = num_members; - } + *nfields = (hsize_t)num_members; /*------------------------------------------------------------------------- @@ -3331,19 +3375,19 @@ int H5TB_find_field( const char *field, const char *field_list ) const char *start = field_list; const char *end; - while ( (end = strstr( start, "," )) != 0 ) + while ( (end = HDstrstr( start, "," )) != 0 ) { - size_t count = end - start; - if(strncmp(start, field, count) == 0 && count == strlen(field) ) + ptrdiff_t count = end - start; + + if(HDstrncmp(start, field, count) == 0 && count == HDstrlen(field) ) return 1; start = end + 1; } - if(strcmp( start, field ) == 0 ) + if(HDstrcmp( start, field ) == 0 ) return 1; return -1; - } diff --git a/hl/src/H5TBpublic.h b/hl/src/H5TBpublic.h index 4dd17bb..874ef20 100644 --- a/hl/src/H5TBpublic.h +++ b/hl/src/H5TBpublic.h @@ -219,10 +219,10 @@ H5_HLDLL herr_t H5TBdelete_field( hid_t loc_id, H5_HLDLL herr_t H5TBAget_title( hid_t loc_id, char *table_title ); -H5_HLDLL herr_t H5TBAget_fill( hid_t loc_id, +H5_HLDLL htri_t H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, - unsigned char *dst_buf ); + unsigned char *dst_buf); #ifdef __cplusplus } diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index d43f2cb..03e5e2f 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 117 +LT_VERS_REVISION = 121 LT_VERS_AGE = 0 # This library is our main target. diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 3fface8..a611088 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -2152,9 +2152,12 @@ int main( void ) /* test attribute functions */ nerrors += test_attr(); - /* test text-dtype functions */ + /* test valid path functions */ nerrors += test_valid_path(); + /* test text-dtype functions */ + nerrors += test_text_dtype(); + /* check for errors */ if (nerrors) goto error; diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt index 421caba..0a34677 100644 --- a/perform/CMakeLists.txt +++ b/perform/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_PERFORM ) #----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + +#----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) @@ -119,17 +124,6 @@ IF (H5_HAVE_PARALLEL) TARGET_NAMING (benchpar ${LIB_TYPE}) TARGET_LINK_LIBRARIES (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (benchpar PROPERTIES FOLDER perform) - - #-- Adding test for mpi-perf - IF (NOT WIN32) - SET (mpi-perf_SRCS - ${HDF5_PERFORM_SOURCE_DIR}/mpi-perf.c - ) - ADD_EXECUTABLE (mpi-perf ${mpi-perf_SRCS}) - TARGET_NAMING (mpi-perf ${LIB_TYPE}) - TARGET_LINK_LIBRARIES (mpi-perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - SET_TARGET_PROPERTIES (mpi-perf PROPERTIES FOLDER perform) - ENDIF (NOT WIN32) ENDIF (HDF5_BUILD_PARALLEL_ALL) ENDIF (H5_HAVE_PARALLEL) @@ -192,9 +186,5 @@ IF (H5_HAVE_PARALLEL) IF (HDF5_BUILD_PARALLEL_ALL) ADD_TEST (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - - IF (NOT WIN32) - ADD_TEST (NAME PERFORM_mpi-perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - ENDIF (NOT WIN32) ENDIF (HDF5_BUILD_PARALLEL_ALL) ENDIF (H5_HAVE_PARALLEL) diff --git a/perform/Makefile.am b/perform/Makefile.am index 4b44b43..5d0e11d 100644 --- a/perform/Makefile.am +++ b/perform/Makefile.am @@ -38,7 +38,7 @@ h5perf_serial_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) # specifying --enable-build-all at configure time. # Also, some of these programs should only be built in parallel. if BUILD_PARALLEL_CONDITIONAL - PARA_BUILD_ALL=benchpar mpi-perf + PARA_BUILD_ALL=benchpar endif if BUILD_ALL_CONDITIONAL BUILD_ALL_PROGS=$(PARA_BUILD_ALL) diff --git a/perform/Makefile.in b/perform/Makefile.in index 13c4904..139d1ea 100644 --- a/perform/Makefile.in +++ b/perform/Makefile.in @@ -90,8 +90,7 @@ CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" -@BUILD_PARALLEL_CONDITIONAL_TRUE@am__EXEEXT_1 = benchpar$(EXEEXT) \ -@BUILD_PARALLEL_CONDITIONAL_TRUE@ mpi-perf$(EXEEXT) +@BUILD_PARALLEL_CONDITIONAL_TRUE@am__EXEEXT_1 = benchpar$(EXEEXT) @BUILD_ALL_CONDITIONAL_TRUE@am__EXEEXT_2 = $(am__EXEEXT_1) PROGRAMS = $(bin_PROGRAMS) benchpar_SOURCES = benchpar.c @@ -123,10 +122,6 @@ h5perf_serial_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ iopipe_SOURCES = iopipe.c iopipe_OBJECTS = iopipe.$(OBJEXT) iopipe_DEPENDENCIES = $(LIBH5TEST) $(LIBHDF5) -mpi_perf_SOURCES = mpi-perf.c -mpi_perf_OBJECTS = mpi-perf.$(OBJEXT) -mpi_perf_LDADD = $(LDADD) -mpi_perf_DEPENDENCIES = $(LIBHDF5) overhead_SOURCES = overhead.c overhead_OBJECTS = overhead.$(OBJEXT) overhead_LDADD = $(LDADD) @@ -175,10 +170,10 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = benchpar.c chunk.c $(h5perf_SOURCES) \ - $(h5perf_serial_SOURCES) iopipe.c mpi-perf.c overhead.c perf.c \ + $(h5perf_serial_SOURCES) iopipe.c overhead.c perf.c \ perf_meta.c zip_perf.c DIST_SOURCES = benchpar.c chunk.c $(h5perf_SOURCES) \ - $(h5perf_serial_SOURCES) iopipe.c mpi-perf.c overhead.c perf.c \ + $(h5perf_serial_SOURCES) iopipe.c overhead.c perf.c \ perf_meta.c zip_perf.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -482,7 +477,7 @@ h5perf_serial_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) # Some programs are not built or run by default, but can be built by hand or by # specifying --enable-build-all at configure time. # Also, some of these programs should only be built in parallel. -@BUILD_PARALLEL_CONDITIONAL_TRUE@PARA_BUILD_ALL = benchpar mpi-perf +@BUILD_PARALLEL_CONDITIONAL_TRUE@PARA_BUILD_ALL = benchpar @BUILD_ALL_CONDITIONAL_TRUE@BUILD_ALL_PROGS = $(PARA_BUILD_ALL) # Define programs that will be run in 'make check' @@ -632,9 +627,6 @@ h5perf_serial$(EXEEXT): $(h5perf_serial_OBJECTS) $(h5perf_serial_DEPENDENCIES) $ iopipe$(EXEEXT): $(iopipe_OBJECTS) $(iopipe_DEPENDENCIES) $(EXTRA_iopipe_DEPENDENCIES) @rm -f iopipe$(EXEEXT) $(AM_V_CCLD)$(LINK) $(iopipe_OBJECTS) $(iopipe_LDADD) $(LIBS) -mpi-perf$(EXEEXT): $(mpi_perf_OBJECTS) $(mpi_perf_DEPENDENCIES) $(EXTRA_mpi_perf_DEPENDENCIES) - @rm -f mpi-perf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mpi_perf_OBJECTS) $(mpi_perf_LDADD) $(LIBS) overhead$(EXEEXT): $(overhead_OBJECTS) $(overhead_DEPENDENCIES) $(EXTRA_overhead_DEPENDENCIES) @rm -f overhead$(EXEEXT) $(AM_V_CCLD)$(LINK) $(overhead_OBJECTS) $(overhead_LDADD) $(LIBS) @@ -657,7 +649,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchpar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopipe.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-perf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/overhead.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_meta.Po@am__quote@ diff --git a/perform/mpi-perf.c b/perform/mpi-perf.c deleted file mode 100644 index a09d672..0000000 --- a/perform/mpi-perf.c +++ /dev/null @@ -1,373 +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. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * (C) 1995-2001 Clemson University and Argonne National Laboratory. - * - * See COPYING in top-level directory. - * - * This is contributed by Robert Ross to the HDF5 software. - * and was called mpi-io-test.c - */ - -#include "hdf5.h" -#include "H5private.h" -#ifdef H5_HAVE_PARALLEL -/* mpi-perf.c - * - * This is derived from code given to me by Rajeev Thakur. Dunno where - * it originated. - * - * It's purpose is to produce aggregate bandwidth numbers for varying - * block sizes, number of processors, an number of iterations. - * - * This is strictly an mpi program - it is used to test the MPI I/O - * functionality implemented by Romio. - * - * Compiling is usually easiest with something like: - * mpicc -Wall -Wstrict-prototypes mpi-io-test.c -o mpi-io-test - * - * NOTE: This code assumes that all command line arguments make it out to all - * the processes that make up the parallel job, which isn't always the case. - * So if it doesn't work on some platform, that might be why. - */ -/* Modifications: - * Albert Cheng, Apr 30, 20001 - * Changed MPI_File_open to use MPI_COMM_WORLD (was MPI_COMM_SELF). - * Albert Cheng, May 5, 20001 - * Changed MPI_File_seek then MPI_File_write or MPI_File_read to just - * MPI_File_write_at and MPI_File_read_at. Some compiler, e.g., IBM - * mpcc_r does not support MPI_File_seek and MPI_File_read or MPI_File_write. - */ - -#include -#include -#include -#ifdef H5_HAVE_UNISTD_H -#include -#endif -#include -#include -#if defined(H5_TIME_WITH_SYS_TIME) -# include -# include -#elif defined(H5_HAVE_SYS_TIME_H) -# include -#else -# include -#endif -#include -#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ -# include -#endif - - - -/* DEFAULT VALUES FOR OPTIONS */ -int64_t opt_block = 1048576*16; -int opt_iter = 1; -int opt_stripe = -1; -int opt_correct = 0; -int amode = O_RDWR | O_CREAT; -char opt_file[256] = "/tmp/test.out\0"; -char opt_pvfstab[256] = "notset\0"; -int opt_pvfstab_set = 0; - -/* function prototypes */ -static int parse_args(int argc, char **argv); - -extern int errno; - -/* globals needed for getopt */ -extern char *optarg; - -int main(int argc, char **argv) -{ - char *buf, *tmp, *buf2, *tmp2, *check; - int i, j, mynod=0, nprocs=1, err, my_correct = 1, correct, myerrno; - double stim, etim; - double write_tim = 0; - double read_tim = 0; - double read_bw, write_bw; - double max_read_tim, max_write_tim; - double min_read_tim, min_write_tim; - double ave_read_tim, ave_write_tim; - int64_t iter_jump = 0; - int64_t seek_position = 0; - MPI_File fh; - MPI_Status status; - int nchars; - - /* startup MPI and determine the rank of this process */ - MPI_Init(&argc,&argv); - MPI_Comm_size(MPI_COMM_WORLD, &nprocs); - MPI_Comm_rank(MPI_COMM_WORLD, &mynod); - - /* parse the command line arguments */ - parse_args(argc, argv); - - if (mynod == 0) printf("# Using mpi-io calls.\n"); - - - /* kindof a weird hack- if the location of the pvfstab file was - * specified on the command line, then spit out this location into - * the appropriate environment variable: */ - -#if H5_HAVE_SETENV -/* no setenv or unsetenv */ - if (opt_pvfstab_set) { - if((setenv("PVFSTAB_FILE", opt_pvfstab, 1)) < 0){ - perror("setenv"); - goto die_jar_jar_die; - } - } -#endif - - /* this is how much of the file data is covered on each iteration of - * the test. used to help determine the seek offset on each - * iteration */ - iter_jump = nprocs * opt_block; - - /* setup a buffer of data to write */ - if (!(tmp = (char *) malloc(opt_block + 256))) { - perror("malloc"); - goto die_jar_jar_die; - } - buf = tmp + 128 - (((long)tmp) % 128); /* align buffer */ - - if (opt_correct) { - /* do the same buffer setup for verifiable data */ - if (!(tmp2 = (char *) malloc(opt_block + 256))) { - perror("malloc2"); - goto die_jar_jar_die; - } - buf2 = tmp + 128 - (((long)tmp) % 128); - } - - /* open the file for writing */ - err = MPI_File_open(MPI_COMM_WORLD, opt_file, - MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); - if (err < 0) { - fprintf(stderr, "node %d, open error: %s\n", mynod, strerror(errno)); - goto die_jar_jar_die; - } - - /* now repeat the write operations the number of times - * specified on the command line */ - for (j=0; j < opt_iter; j++) { - - /* calculate the appropriate position depending on the iteration - * and rank of the current process */ - seek_position = (j*iter_jump)+(mynod*opt_block); - - if (opt_correct) /* fill in buffer for iteration */ { - for (i=mynod+j, check=buf; i + + Notes: The command format above is for readilibity. In practice, + please type in the command above with at least one + space between each line, No "Enter" until users finish + the switches and want to run the configure. + + + or do it through CPPFLAGS and LDFLAGS variables: + + $ CPPFLAGS=-I/usr/include \ + $ LDFLAGS=-L/usr/lib \ + + $ ./configure + --prefix=/c/hdf5 + --enable-fortran + <"If no more switches, then hit Enter"> + +7. Make and Make Check + + After configuration is done successfully, run the following series of + commands to build, test and install HDF5 + + $ make > "output file name" + $ make check > "output file name" + + Before run "make install", check output file for "make check", there + should be no failures at all. + +8. Make Install + + $ make install > "output file name" + + +9. Check installed HDF5 library + + After step 8, go to your installation directory, there should be + three subdirectories: "bin" "include" and "lib". + + $ make installcheck > "output file name" + +----------------------------------------------------------------------- + +Need Further assistance, email help@hdfgroup.org diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index d771c0b..b2e1eec 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -6,7 +6,7 @@ ----------- This file contains instructions for the installation of parallel HDF5 (PHDF5). It is assumed that you are familiar with the general installation steps as -described in the INSATLL file. Get familiar with that file before trying +described in the INSTALL file. Get familiar with that file before trying the parallel HDF5 installation. The remaining of this section explains the requirements to run PHDF5. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f64e334..5ac0aa2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.127-FA_a5 currently under development +HDF5 version 1.9.131-FA_a5 currently under development INTRODUCTION @@ -166,6 +166,9 @@ New Features Parallel Library: ----------------- + - Add H5Pget_mpio_no_collective_cause() function that retrive reasons + why the collective I/O was broken during read/write IO access. + (JKM - 2012/08/30 HDFFV-8143) - Special Collective IO (IO when some processes do not contribute to the IO) and Complex Derived Datatype MPI functionalities are no longer conditionally enabled in the library by configure. They are always @@ -694,6 +697,8 @@ Bug Fixes since HDF5-1.8.0 release Performance ------------- + - Retired program perform/mpi-perf. Its purpose has been incorporated + into h5perf before. (AKC 2012/09/20) - ifdefs added to tests around include unistd.h and function to simulate getlogin() on Windows. (ADB - 2011/08/15) @@ -708,9 +713,15 @@ Bug Fixes since HDF5-1.8.0 release Tools ----- + - h5diff: Fixed not to accumulate attribute difference to dataset + difference in verbose mode (-v, -r), which caused incorrect + difference between dataset and group/datatype object if attribute + exist with any differences. This also lead to fix inconsistent + format indicating difference between dataset and group/datatype + object. HDFFV-5919 (JKM 2012/09/05) - h5diff: Fixed the incorrect result when comparing attribute data values and the data type has same class but different size. - HDFFV-7942 (JKM 08/15/2012) + HDFFV-7942 (JKM 2012/08/15) - ph5diff: Fixed intermittent hang issue on a certain operation in parallel mode. It was detected by daily test for comparing non-comparable objects, but it could have occurred in other diff --git a/release_docs/USING_CMake.txt b/release_docs/USING_CMake.txt new file mode 100644 index 0000000..71f2fcf --- /dev/null +++ b/release_docs/USING_CMake.txt @@ -0,0 +1,202 @@ +************************************************************************ +* Build and Install HDF5 Applications with CMake * +************************************************************************ + +Notes: This short instruction is written for users who want to quickly build + HDF5 Applications from the HDF5 Examples package using the CMake tools. + Users can adapt these instructions for their own applicaltions, see the + "Minimum Project Files" section. + + More information about using CMake can be found at the KitWare site, + www.cmake.org. + + CMake uses the command line, however the visual CMake tool is + available for the configuration step. The steps are similiar for + all the operating systems supported by CMake. + + NOTES: + 1. Using CMake for building and using HDF5 is under active development. + While we have attempted to provide error-free files, please + understand that development with CMake has not been extensively + tested outside of HDF. The CMake specific files may change + before the next release. + + 2. CMake was originally introduced to support development on Windows, + however it should be usable on any system where CMake is supported. + Please send us any comments on how CMake support can be improved on + any system. Visit the KitWare site for more information about CMake. + + 3. HDF5 library build and test results can be submitted to our CDash server at: + cdash.hdfgroup.uiuc.edu. + Please read the HDF and CDash document at: + www.hdfgroup.org/CDash/HowToSubmit. + + +======================================================================== + Preconditions +======================================================================== + + 1. We suggest you obtain the latest CMake for windows from the Kitware + web site. The HDF5 1.8.x product requires CMake version 2.8.6 (minimum). + + 2. You have installed the HDF5 library built with CMake, by executing the + HDF Install Utility (The *.exe file in the binary package for Windows). + If you are using a Windows platform, you can obtain a pre-built Windows + binary from The HDF Group's website at www.hdfgroup.org. + + 3. On Windows with Visual Studio, if you have installed the static HDF5 + library, you will need to add the HDF5\lib folder to the library + search list. See the "Using Static Libraries with Visual Studio" section. + + 4. Set the environment variable HDF5_ROOT to the installed location of HDF5. + On Windows HDF5_ROOT=C:\Program Files\HDF Group\HDF5\hdf5-1.8.x + (Note there are no quote characters used on windows) + +======================================================================== + Building HDF5 Applications with CMake +======================================================================== + + 1. Run CMake + + The CMake executable is named "cmake-gui.exe" on Windows and should be + available in your Start menu. For Linux, UNIX, and Mac users the + executable is named "cmake-gui" and can be found where CMake was + installed. + Specify the source and build directories. It is recommemded that you + choose a build directory different then the source directory + (for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then + use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5). + + OPTIONAL: + Users can perform the configuration step without using the visual cmake-gui + program. Example configuration step executed within the build directory: + + cmake -G "" [-D] + + Where is + * Borland Makefiles + * MSYS Makefiles + * MinGW Makefiles + * NMake Makefiles + * Unix Makefiles + * Visual Studio 10 + * Visual Studio 10 Win64 + * Visual Studio 6 + * Visual Studio 7 + * Visual Studio 7 .NET 2003 + * Visual Studio 8 2005 + * Visual Studio 8 2005 Win64 + * Visual Studio 9 2008 + * Visual Studio 9 2008 Win64 + + is: + * BUILD_TESTING:BOOL=ON + * USE_SHARED_LIBS:BOOL=[ON | OFF] + + 2. Configure the cache settings + + 2.1 Click the Configure button. If this is the first time you are + running cmake-gui in this directory, you will be prompted for the + generator you wish to use (for example on Windows, Visual Studio 9 2008). + CMake will read in the CMakeLists.txt files from the source directory and + display options for the HDF5 project. After the first configure you + can adjust the cache settings and/or specify locations of other programs. + + Any conflicts or new values will be highlighted by the configure + process in red. Once you are happy with all the settings and there are no + more values in red, click the Generate button to produce the appropriate + build files. + + On Windows, if you are using a Visual Studio generator, the solution and + project files will be created in the build folder. + + On linux, if you are using the Unix Makefiles generator, the Makefiles will + be created in the build folder. + + 2.2 Alternative command line example on Windows in c:\MyHDFstuff\hdf5\build directory: + + cmake -G "Visual Studio 9 2008" -DBUILD_TESTING:BOOL=ON -DUSE_SHARED_LIBS:BOOL=ON .. + + 3. Build HDF5 Applications + + On Windows, you can build HDF5 applications using either the Visual Studio Environment + or the command line. The command line is normally used on linux, Unix, and Mac. + + To build from the command line, navigate to your build directory and + execute the following; + + cmake --build . --config {Debug | Release} + + NOTE: "--config {Debug | Release}" may be optional on your platform. We + recommend choosing either Debug or Release on Windows. If you are + using the pre-built binaries from HDF, use Release. + + 3.1 If you wish to use the Visual Studio environment, open the solution + file in your build directory. Be sure to select either Debug or + Release and build the solution. + + 4. Test HDF5 Applications. + + To test the build, navigate to your build directory and execute; + + ctest . -C {Debug | Release} + + NOTE: "-C {Debug | Release}" may be optional on your platform. We + recommend choosing either Debug or Release to match the build + step on Windows. + + 6. The files that support building with CMake are all the files in the + config/cmake folder, the CMakeLists.txt files in each source folder, and + CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing + performed by The HDF Group. It should be altered for the users + installation and needs. + + 7. More information about using CMake can be found at the KitWare site, + www.cmake.org. + + +======================================================================== + Using HDF5 Libraries with Visual Studio 2008 +======================================================================== + + 8. Set up path for external libraries and headers + + Invoke Microsoft Visual Studio and go to "Tools" and select "Options", + find "Projects", and then "VC++ Directories". + + 8.1 If you are building on 64-bit Windows, find the "Platform" dropdown + and select "x64". + + 8.2 Find the box "Show directories for", choose "Include files", add the + header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\include) + to the included directories. + + 8.3 Find the box "Show directories for", choose "Library files", add the + library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\lib) + to the library directories. + + 8.4 If using Fortran libraries, you will also need to setup the path + for the Intel Fortran compiler. + + +======================================================================== + Minimum C Project Files for CMake +======================================================================== + + 9. Create a CMakeLists.txt file at the source root. +.......................................................................... +cmake_minimum_required (VERSION 2.8.6) +PROJECT (HDF5MyApp C CXX) + +FIND_PACKAGE (HDF5 REQURIED) +INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS}) +SET (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) + +ADD_EXECUTABLE (hdf_example ${PROJECT_SOURCE_DIR}/hdf_example.c) +TARGET_LINK_LIBRARIES (hdf_example ${LINK_LIBS}) +.......................................................................... + +************************************************************************ + +Need further assistance, send email to help@hdfgroup.org + diff --git a/release_docs/Using_CMake.txt b/release_docs/Using_CMake.txt deleted file mode 100644 index 71f2fcf..0000000 --- a/release_docs/Using_CMake.txt +++ /dev/null @@ -1,202 +0,0 @@ -************************************************************************ -* Build and Install HDF5 Applications with CMake * -************************************************************************ - -Notes: This short instruction is written for users who want to quickly build - HDF5 Applications from the HDF5 Examples package using the CMake tools. - Users can adapt these instructions for their own applicaltions, see the - "Minimum Project Files" section. - - More information about using CMake can be found at the KitWare site, - www.cmake.org. - - CMake uses the command line, however the visual CMake tool is - available for the configuration step. The steps are similiar for - all the operating systems supported by CMake. - - NOTES: - 1. Using CMake for building and using HDF5 is under active development. - While we have attempted to provide error-free files, please - understand that development with CMake has not been extensively - tested outside of HDF. The CMake specific files may change - before the next release. - - 2. CMake was originally introduced to support development on Windows, - however it should be usable on any system where CMake is supported. - Please send us any comments on how CMake support can be improved on - any system. Visit the KitWare site for more information about CMake. - - 3. HDF5 library build and test results can be submitted to our CDash server at: - cdash.hdfgroup.uiuc.edu. - Please read the HDF and CDash document at: - www.hdfgroup.org/CDash/HowToSubmit. - - -======================================================================== - Preconditions -======================================================================== - - 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.8.x product requires CMake version 2.8.6 (minimum). - - 2. You have installed the HDF5 library built with CMake, by executing the - HDF Install Utility (The *.exe file in the binary package for Windows). - If you are using a Windows platform, you can obtain a pre-built Windows - binary from The HDF Group's website at www.hdfgroup.org. - - 3. On Windows with Visual Studio, if you have installed the static HDF5 - library, you will need to add the HDF5\lib folder to the library - search list. See the "Using Static Libraries with Visual Studio" section. - - 4. Set the environment variable HDF5_ROOT to the installed location of HDF5. - On Windows HDF5_ROOT=C:\Program Files\HDF Group\HDF5\hdf5-1.8.x - (Note there are no quote characters used on windows) - -======================================================================== - Building HDF5 Applications with CMake -======================================================================== - - 1. Run CMake - - The CMake executable is named "cmake-gui.exe" on Windows and should be - available in your Start menu. For Linux, UNIX, and Mac users the - executable is named "cmake-gui" and can be found where CMake was - installed. - Specify the source and build directories. It is recommemded that you - choose a build directory different then the source directory - (for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then - use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5). - - OPTIONAL: - Users can perform the configuration step without using the visual cmake-gui - program. Example configuration step executed within the build directory: - - cmake -G "" [-D] - - Where is - * Borland Makefiles - * MSYS Makefiles - * MinGW Makefiles - * NMake Makefiles - * Unix Makefiles - * Visual Studio 10 - * Visual Studio 10 Win64 - * Visual Studio 6 - * Visual Studio 7 - * Visual Studio 7 .NET 2003 - * Visual Studio 8 2005 - * Visual Studio 8 2005 Win64 - * Visual Studio 9 2008 - * Visual Studio 9 2008 Win64 - - is: - * BUILD_TESTING:BOOL=ON - * USE_SHARED_LIBS:BOOL=[ON | OFF] - - 2. Configure the cache settings - - 2.1 Click the Configure button. If this is the first time you are - running cmake-gui in this directory, you will be prompted for the - generator you wish to use (for example on Windows, Visual Studio 9 2008). - CMake will read in the CMakeLists.txt files from the source directory and - display options for the HDF5 project. After the first configure you - can adjust the cache settings and/or specify locations of other programs. - - Any conflicts or new values will be highlighted by the configure - process in red. Once you are happy with all the settings and there are no - more values in red, click the Generate button to produce the appropriate - build files. - - On Windows, if you are using a Visual Studio generator, the solution and - project files will be created in the build folder. - - On linux, if you are using the Unix Makefiles generator, the Makefiles will - be created in the build folder. - - 2.2 Alternative command line example on Windows in c:\MyHDFstuff\hdf5\build directory: - - cmake -G "Visual Studio 9 2008" -DBUILD_TESTING:BOOL=ON -DUSE_SHARED_LIBS:BOOL=ON .. - - 3. Build HDF5 Applications - - On Windows, you can build HDF5 applications using either the Visual Studio Environment - or the command line. The command line is normally used on linux, Unix, and Mac. - - To build from the command line, navigate to your build directory and - execute the following; - - cmake --build . --config {Debug | Release} - - NOTE: "--config {Debug | Release}" may be optional on your platform. We - recommend choosing either Debug or Release on Windows. If you are - using the pre-built binaries from HDF, use Release. - - 3.1 If you wish to use the Visual Studio environment, open the solution - file in your build directory. Be sure to select either Debug or - Release and build the solution. - - 4. Test HDF5 Applications. - - To test the build, navigate to your build directory and execute; - - ctest . -C {Debug | Release} - - NOTE: "-C {Debug | Release}" may be optional on your platform. We - recommend choosing either Debug or Release to match the build - step on Windows. - - 6. The files that support building with CMake are all the files in the - config/cmake folder, the CMakeLists.txt files in each source folder, and - CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing - performed by The HDF Group. It should be altered for the users - installation and needs. - - 7. More information about using CMake can be found at the KitWare site, - www.cmake.org. - - -======================================================================== - Using HDF5 Libraries with Visual Studio 2008 -======================================================================== - - 8. Set up path for external libraries and headers - - Invoke Microsoft Visual Studio and go to "Tools" and select "Options", - find "Projects", and then "VC++ Directories". - - 8.1 If you are building on 64-bit Windows, find the "Platform" dropdown - and select "x64". - - 8.2 Find the box "Show directories for", choose "Include files", add the - header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\include) - to the included directories. - - 8.3 Find the box "Show directories for", choose "Library files", add the - library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\lib) - to the library directories. - - 8.4 If using Fortran libraries, you will also need to setup the path - for the Intel Fortran compiler. - - -======================================================================== - Minimum C Project Files for CMake -======================================================================== - - 9. Create a CMakeLists.txt file at the source root. -.......................................................................... -cmake_minimum_required (VERSION 2.8.6) -PROJECT (HDF5MyApp C CXX) - -FIND_PACKAGE (HDF5 REQURIED) -INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS}) -SET (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) - -ADD_EXECUTABLE (hdf_example ${PROJECT_SOURCE_DIR}/hdf_example.c) -TARGET_LINK_LIBRARIES (hdf_example ${LINK_LIBS}) -.......................................................................... - -************************************************************************ - -Need further assistance, send email to help@hdfgroup.org - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c3f673f..65a575b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + +#----------------------------------------------------------------------------- # List Source Files #----------------------------------------------------------------------------- SET (H5_SRCS @@ -12,6 +17,7 @@ SET (H5_SRCS ${HDF5_SRC_DIR}/H5timer.c ${HDF5_SRC_DIR}/H5trace.c ) + SET (H5_HDRS ${HDF5_SRC_DIR}/hdf5.h ${HDF5_SRC_DIR}/H5api_adpt.h @@ -29,6 +35,7 @@ SET (H5A_SRCS ${HDF5_SRC_DIR}/H5Aint.c ${HDF5_SRC_DIR}/H5Atest.c ) + SET (H5A_HDRS ${HDF5_SRC_DIR}/H5Apkg.h ${HDF5_SRC_DIR}/H5Apublic.h @@ -38,6 +45,7 @@ IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" ) SET (H5AC_SRCS ${HDF5_SRC_DIR}/H5AC.c ) + SET (H5AC_HDRS ${HDF5_SRC_DIR}/H5ACpkg.h ${HDF5_SRC_DIR}/H5ACpublic.h @@ -114,6 +122,7 @@ SET (H5D_SRCS ${HDF5_SRC_DIR}/H5Dselect.c ${HDF5_SRC_DIR}/H5Dtest.c ) + SET (H5D_HDRS ${HDF5_SRC_DIR}/H5Dpkg.h ${HDF5_SRC_DIR}/H5Dpublic.h @@ -125,6 +134,7 @@ SET (H5E_SRCS ${HDF5_SRC_DIR}/H5Edeprec.c ${HDF5_SRC_DIR}/H5Eint.c ) + SET (H5E_HDRS ${HDF5_SRC_DIR}/H5Edefin.h ${HDF5_SRC_DIR}/H5Einit.h @@ -172,6 +182,7 @@ SET (H5F_SRCS ${HDF5_SRC_DIR}/H5Fsuper_cache.c ${HDF5_SRC_DIR}/H5Ftest.c ) + SET (H5F_HDRS ${HDF5_SRC_DIR}/H5Fpkg.h ${HDF5_SRC_DIR}/H5Fpublic.h @@ -212,6 +223,7 @@ SET (H5FD_SRCS ${HDF5_SRC_DIR}/H5FDstdio.c ${HDF5_SRC_DIR}/H5FDwindows.c ) + SET (H5FD_HDRS ${HDF5_SRC_DIR}/H5FDcore.h ${HDF5_SRC_DIR}/H5FDdirect.h @@ -255,6 +267,7 @@ SET (H5FS_SRCS ${HDF5_SRC_DIR}/H5FSstat.c ${HDF5_SRC_DIR}/H5FStest.c ) + SET (H5FS_HDRS ${HDF5_SRC_DIR}/H5FSpkg.h ${HDF5_SRC_DIR}/H5FSpublic.h @@ -281,6 +294,7 @@ SET (H5G_SRCS ${HDF5_SRC_DIR}/H5Gtest.c ${HDF5_SRC_DIR}/H5Gtraverse.c ) + SET (H5G_HDRS ${HDF5_SRC_DIR}/H5Gpkg.h ${HDF5_SRC_DIR}/H5Gpublic.h @@ -306,6 +320,7 @@ SET (H5HF_SRCS ${HDF5_SRC_DIR}/H5HFtest.c ${HDF5_SRC_DIR}/H5HFtiny.c ) + SET (H5HF_HDRS ${HDF5_SRC_DIR}/H5HFpkg.h ${HDF5_SRC_DIR}/H5HFpublic.h @@ -318,6 +333,7 @@ SET (H5HG_SRCS ${HDF5_SRC_DIR}/H5HGdbg.c ${HDF5_SRC_DIR}/H5HGquery.c ) + SET (H5HG_HDRS ${HDF5_SRC_DIR}/H5HGpkg.h ${HDF5_SRC_DIR}/H5HGpublic.h @@ -332,6 +348,7 @@ SET (H5HL_SRCS ${HDF5_SRC_DIR}/H5HLint.c ${HDF5_SRC_DIR}/H5HLprfx.c ) + SET (H5HL_HDRS ${HDF5_SRC_DIR}/H5HLpkg.h ${HDF5_SRC_DIR}/H5HLpublic.h @@ -375,6 +392,7 @@ SET (H5MF_SRCS ${HDF5_SRC_DIR}/H5MFdbg.c ${HDF5_SRC_DIR}/H5MFsection.c ) + SET (H5MF_HDRS ) IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" ) @@ -393,6 +411,7 @@ SET (H5MP_SRCS ${HDF5_SRC_DIR}/H5MP.c ${HDF5_SRC_DIR}/H5MPtest.c ) + SET (H5MP_HDRS ${HDF5_SRC_DIR}/H5MPpkg.h ) @@ -436,6 +455,7 @@ SET (H5O_SRCS ${HDF5_SRC_DIR}/H5Otest.c ${HDF5_SRC_DIR}/H5Ounknown.c ) + SET (H5O_HDRS ${HDF5_SRC_DIR}/H5Opkg.h ${HDF5_SRC_DIR}/H5Opublic.h @@ -462,6 +482,7 @@ SET (H5P_SRCS ${HDF5_SRC_DIR}/H5Pstrcpl.c ${HDF5_SRC_DIR}/H5Ptest.c ) + SET (H5P_HDRS ${HDF5_SRC_DIR}/H5Ppkg.h ${HDF5_SRC_DIR}/H5Ppublic.h @@ -507,6 +528,7 @@ SET (H5S_SRCS ${HDF5_SRC_DIR}/H5Sselect.c ${HDF5_SRC_DIR}/H5Stest.c ) + SET (H5S_HDRS ${HDF5_SRC_DIR}/H5Spkg.h ${HDF5_SRC_DIR}/H5Spublic.h @@ -529,6 +551,7 @@ SET (H5SM_SRCS ${HDF5_SRC_DIR}/H5SMmessage.c ${HDF5_SRC_DIR}/H5SMtest.c ) + SET (H5SM_HDRS ${HDF5_SRC_DIR}/H5SMpkg.h ) @@ -568,6 +591,7 @@ SET (H5T_SRCS ${HDF5_SRC_DIR}/H5Tvisit.c ${HDF5_SRC_DIR}/H5Tvlen.c ) + SET (H5T_HDRS ${HDF5_SRC_DIR}/H5Tpkg.h ${HDF5_SRC_DIR}/H5Tpublic.h @@ -613,6 +637,8 @@ IF (H5_ZLIB_HEADER) SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}") ENDIF (H5_ZLIB_HEADER) + + SET (H5Z_HDRS ${HDF5_SRC_DIR}/H5Zpkg.h ${HDF5_SRC_DIR}/H5Zpublic.h diff --git a/src/H5Dio.c b/src/H5Dio.c index e34452c..1bd6dae 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -997,7 +997,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id, HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator") /* Check if we can set direct MPI-IO read/write functions */ - if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm)) < 0) + if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm, dx_plist)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ") /* Check if we can use the optimized parallel I/O routines */ diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index dc8902b..1bfe10a 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -156,10 +156,12 @@ static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, const H5S_t *mem_space, const H5D_type_info_t *type_info, - const H5D_chunk_map_t *fm) + const H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist) { - int local_opinion = TRUE; /* This process's idea of whether to perform collective I/O or not */ - int consensus; /* Consensus opinion of all processes */ + /* variables to set cause of broken collective I/O */ + int local_cause = 0; + int global_cause = 0; + int mpi_code; /* MPI error code */ htri_t ret_value = TRUE; @@ -171,51 +173,54 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, HDassert(file_space); HDassert(type_info); + /* For independent I/O, get out quickly and don't try to form consensus */ - if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_INDEPENDENT) + if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_INDEPENDENT) { + local_cause = H5D_MPIO_SET_INDEPENDENT; + global_cause = H5D_MPIO_SET_INDEPENDENT; HGOTO_DONE(FALSE); + } + + /* Optimized MPI types flag must be set and it must be collective IO */ + /* (Don't allow parallel I/O for the MPI-posix driver, since it doesn't do real collective I/O) */ + if(!(H5S_mpi_opt_types_g && io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE + && !IS_H5FD_MPIPOSIX(io_info->dset->oloc.file))) { + local_cause |= H5D_MPIO_SET_MPIPOSIX; + } /* end if */ /* Don't allow collective operations if datatype conversions need to happen */ if(!type_info->is_conv_noop) { - local_opinion = FALSE; - goto broadcast; + local_cause |= H5D_MPIO_DATATYPE_CONVERSION; } /* end if */ /* Don't allow collective operations if data transform operations should occur */ if(!type_info->is_xform_noop) { - local_opinion = FALSE; - goto broadcast; - } /* end if */ - - /* Optimized MPI types flag must be set and it must be collective IO */ - /* (Don't allow parallel I/O for the MPI-posix driver, since it doesn't do real collective I/O) */ - if(!(H5S_mpi_opt_types_g && io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE - && !IS_H5FD_MPIPOSIX(io_info->dset->oloc.file))) { - local_opinion = FALSE; - goto broadcast; + local_cause |= H5D_MPIO_DATA_TRANSFORMS; } /* end if */ /* Check whether these are both simple or scalar dataspaces */ if(!((H5S_SIMPLE == H5S_GET_EXTENT_TYPE(mem_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(mem_space)) && (H5S_SIMPLE == H5S_GET_EXTENT_TYPE(file_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(file_space)))) { - local_opinion = FALSE; - goto broadcast; + local_cause |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES; } /* end if */ /* Can't currently handle point selections */ if(H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(mem_space) || H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(file_space)) { - local_opinion = FALSE; - goto broadcast; + local_cause |= H5D_MPIO_POINT_SELECTIONS; } /* end if */ /* Dataset storage must be contiguous or chunked */ if(!(io_info->dset->shared->layout.type == H5D_CONTIGUOUS || io_info->dset->shared->layout.type == H5D_CHUNKED)) { - local_opinion = FALSE; - goto broadcast; + local_cause |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET; } /* end if */ + /* check if external-file storage is used */ + if (io_info->dset->shared->dcpl_cache.efl.nused > 0) { + local_cause |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET; + } + /* The handling of memory space is different for chunking and contiguous * storage. For contiguous storage, mem_space and file_space won't change * when it it is doing disk IO. For chunking storage, mem_space will @@ -226,21 +231,28 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, /* Don't allow collective operations if filters need to be applied */ if(io_info->dset->shared->layout.type == H5D_CHUNKED) { if(io_info->dset->shared->dcpl_cache.pline.nused > 0) { - local_opinion = FALSE; - goto broadcast; + local_cause |= H5D_MPIO_FILTERS; } /* end if */ } /* end if */ -broadcast: /* Form consensus opinion among all processes about whether to perform * collective I/O */ - if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&local_opinion, &consensus, 1, MPI_INT, MPI_LAND, io_info->comm))) + if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&local_cause, &global_cause, 1, MPI_INT, MPI_BOR, io_info->comm))) HMPI_GOTO_ERROR(FAIL, "MPI_Allreduce failed", mpi_code) - ret_value = consensus > 0 ? TRUE : FALSE; + ret_value = global_cause > 0 ? FALSE : TRUE; + done: + /* Write the local value of no-collective-cause to the DXPL. */ + if(H5P_set(dx_plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, &local_cause) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set local no collective cause property") + + /* Write the global value of no-collective-cause to the DXPL. */ + if(H5P_set(dx_plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, &global_cause) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set global no collective cause property") + FUNC_LEAVE_NOAPI(ret_value) } /* H5D__mpio_opt_possible() */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index e3562bb..4fddceb 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -778,7 +778,8 @@ H5_DLL herr_t H5D__chunk_collective_write(H5D_io_info_t *io_info, * memory and the file */ H5_DLL htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, const H5S_t *mem_space, - const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm); + const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm, + H5P_genplist_t *dx_plist); #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 0438fac..c933ab1 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -74,6 +74,8 @@ #define H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME "mpio_chunk_opt_ratio" #define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME "actual_chunk_opt_mode" #define H5D_MPIO_ACTUAL_IO_MODE_NAME "actual_io_mode" +#define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME "local_no_collective_cause" /* cause of broken collective I/O in each process */ +#define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME "global_no_collective_cause" /* cause of broken collective I/O in all processes */ #endif /* H5_HAVE_PARALLEL */ #define H5D_XFER_EDC_NAME "err_detect" /* EDC */ #define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */ diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c index d9dc745..35f52c3 100644 --- a/src/H5FDmpiposix.c +++ b/src/H5FDmpiposix.c @@ -14,10 +14,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, July 11, 2002 * - * Purpose: This is a "combination" MPI-2 and posix I/O driver. + * Purpose: This is a "combination" MPI-2 and posix I/O driver. * It uses MPI for coordinating the actions of several processes * and posix I/O calls to do the actual I/O to the disk. * @@ -233,7 +233,7 @@ static const H5FD_class_mpi_t H5FD_mpiposix_g = { H5FD_mpiposix_truncate, /* truncate */ NULL, /* lock */ NULL, /* unlock */ - H5FD_FLMAP_SINGLE /* fl_map */ + H5FD_FLMAP_DICHOTOMY /* fl_map */ }, /* End of superclass information */ H5FD_mpiposix_mpi_rank, /* get_rank */ H5FD_mpiposix_mpi_size, /* get_size */ diff --git a/src/H5P.c b/src/H5P.c index ba286fb..c7ed30b 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -990,8 +990,13 @@ H5Pequal(hid_t id1, hid_t id2) /* Compare property lists */ if(H5I_GENPROP_LST == H5I_get_type(id1)) { - if(H5P_cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2) == 0) - ret_value = TRUE; + int cmp_ret = 0; + + if(H5P_cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2, &cmp_ret) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "can't compare property lists") + + /* Set return value */ + ret_value = cmp_ret == 0 ? TRUE : FALSE; } /* end if */ /* Must be property classes */ else { @@ -1062,6 +1067,7 @@ done: void *udata; IN/OUT: Pointer to iteration data from user RETURNS Success: Returns the return value of the last call to ITER_FUNC + Failure: negative value DESCRIPTION This routine calls the actual callback routine for the property in the property list or class. diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index 1bf7444..d94ee7f 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -102,6 +102,9 @@ /* Definitions for chunk io mode property. */ #define H5D_MPIO_ACTUAL_IO_MODE_SIZE sizeof(H5D_mpio_actual_io_mode_t) #define H5D_MPIO_ACTUAL_IO_MODE_DEF H5D_MPIO_NO_COLLECTIVE +/* Definitions for cause of broken collective io property */ +#define H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE sizeof(uint32_t) +#define H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF H5D_MPIO_COLLECTIVE /* Definitions for memory MPI type property */ #define H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE sizeof(MPI_Datatype) #define H5FD_MPI_XFER_MEM_MPI_TYPE_DEF MPI_DATATYPE_NULL @@ -211,6 +214,7 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass) unsigned def_mpio_chunk_opt_ratio = H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF; H5D_mpio_actual_chunk_opt_mode_t def_mpio_actual_chunk_opt_mode = H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF; H5D_mpio_actual_io_mode_t def_mpio_actual_io_mode = H5D_MPIO_ACTUAL_IO_MODE_DEF; + H5D_mpio_no_collective_cause_t def_mpio_no_collective_cause = H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF; MPI_Datatype btype = H5FD_MPI_XFER_MEM_MPI_TYPE_DEF; /* Default value for MPI buffer type */ MPI_Datatype ftype = H5FD_MPI_XFER_FILE_MPI_TYPE_DEF; /* Default value for MPI file type */ #endif /* H5_HAVE_PARALLEL */ @@ -287,6 +291,14 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass) if(H5P_register_real(pclass, H5D_MPIO_ACTUAL_IO_MODE_NAME, H5D_MPIO_ACTUAL_IO_MODE_SIZE, &def_mpio_actual_io_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + /* Register the local cause of broken collective I/O */ + if(H5P_register_real(pclass, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &def_mpio_no_collective_cause, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + + /* Register the global cause of broken collective I/O */ + if(H5P_register_real(pclass, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &def_mpio_no_collective_cause, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + /* Register the MPI memory type property */ if(H5P_register_real(pclass, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE, &btype, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) @@ -1360,5 +1372,44 @@ H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mpio_actual_io_mode() */ + +/*------------------------------------------------------------------------- + * Function: H5Pget_mpio_no_collective_cause + * + * Purpose: Retrieves cause for the broke collective I/O + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Jonathan Kim + * Aug 3, 2012 + *------------------------------------------------------------------------- + */ +herr_t +H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause) +{ + H5P_genplist_t *plist; + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE3("e", "i*Dn*Dn", plist_id, local_no_collective_cause, + global_no_collective_cause); + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Return values */ + if(local_no_collective_cause) + if(H5P_get(plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, local_no_collective_cause) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get local value") + if(global_no_collective_cause) + if(H5P_get(plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, global_no_collective_cause) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get global value") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_mpio_no_collective_cause() */ + + #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 9707357..889cdc6 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -67,7 +67,7 @@ #define H5F_ACS_DATA_CACHE_BYTE_SIZE_DEF (1024*1024) /* Definition for preemption read chunks first */ #define H5F_ACS_PREEMPT_READ_CHUNKS_SIZE sizeof(double) -#define H5F_ACS_PREEMPT_READ_CHUNKS_DEF 0.75 +#define H5F_ACS_PREEMPT_READ_CHUNKS_DEF 0.75f /* Definition for threshold for alignment */ #define H5F_ACS_ALIGN_THRHD_SIZE sizeof(hsize_t) #define H5F_ACS_ALIGN_THRHD_DEF 1 @@ -155,6 +155,7 @@ static herr_t H5P_file_image_info_del(hid_t prop_id, const char *name, size_t si static herr_t H5P_file_image_info_copy(const char *name, size_t size, void *value); static herr_t H5P_file_image_info_close(const char *name, size_t size, void *value); + /*********************/ /* Package Variables */ /*********************/ @@ -508,18 +509,18 @@ H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment) H5TRACE3("e", "ihh", fapl_id, threshold, alignment); /* Check args */ - if (alignment<1) - HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive"); + if(alignment < 1) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ if(H5P_set(plist, H5F_ACS_ALIGN_THRHD_NAME, &threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set threshold"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set threshold") if(H5P_set(plist, H5F_ACS_ALIGN_NAME, &alignment) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment") done: FUNC_LEAVE_API(ret_value) @@ -692,10 +693,10 @@ H5P_get_driver(H5P_genplist_t *plist) /* Get the current driver ID */ if(TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { if(H5P_get(plist, H5F_ACS_FILE_DRV_ID_NAME, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID") } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") if(H5FD_VFD_DEFAULT == ret_value) ret_value = H5_DEFAULT_VFD; @@ -1002,17 +1003,6 @@ done: * Programmer: Robb Matzke * Tuesday, May 19, 1998 * - * Modifications: - * - * Raymond Lu - * Tuesday, Oct 23, 2001 - * Changed the file access list to the new generic property list. - * - * J. Mainzer - * Thurs. 3/17/05 - * The mdc_nelmts entry is no more in the FAPL, so I modified - * the code to ignore it. - * *------------------------------------------------------------------------- */ herr_t @@ -1027,24 +1017,24 @@ H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts, rdcc_w0); /* Check arguments */ - if (rdcc_w0<0.0 || rdcc_w0>1.0) - HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive"); + if(rdcc_w0 < 0.0 || rdcc_w0 > 1.0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set sizes */ if(H5P_set(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc_nslots) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache number of slots"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache number of slots") if(H5P_set(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &rdcc_nbytes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache byte size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache byte size") if(H5P_set(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &rdcc_w0) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set preempt read chunks"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set preempt read chunks") done: FUNC_LEAVE_API(ret_value) -} +} /* end H5Pset_cache() */ /*------------------------------------------------------------------------- @@ -1061,18 +1051,6 @@ done: * Programmer: Robb Matzke * Tuesday, May 19, 1998 * - * Modifications: - * - * Raymond Lu - * Tuesday, Oct 23, 2001 - * Changed the file access list to the new generic property - * list. - * - * J Mainzer - * Thurs, 3/17/05 - * The mdc_nelmts fapl entry is no more, so we now just - * return a constant when that value is requested. - * *------------------------------------------------------------------------- */ herr_t @@ -1088,27 +1066,27 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts, /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get sizes */ /* the mdc_nelmts FAPL entry no longer exists, so just return a constant */ - if (mdc_nelmts) + if(mdc_nelmts) *mdc_nelmts = 0; - if (rdcc_nslots) + if(rdcc_nslots) if(H5P_get(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, rdcc_nslots) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots"); - if (rdcc_nbytes) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots") + if(rdcc_nbytes) if(H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, rdcc_nbytes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache byte size"); - if (rdcc_w0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache byte size") + if(rdcc_w0) if(H5P_get(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, rdcc_w0) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get preempt read chunks"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get preempt read chunks") done: FUNC_LEAVE_API(ret_value) -} +} /* end H5Pget_cache() */ /*------------------------------------------------------------------------- @@ -1248,11 +1226,11 @@ H5Pset_gc_references(hid_t plist_id, unsigned gc_ref) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ if(H5P_set(plist, H5F_ACS_GARBG_COLCT_REF_NAME, &gc_ref) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference") done: FUNC_LEAVE_API(ret_value) @@ -1290,12 +1268,12 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref/*out*/) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get values */ - if (gc_ref) + if(gc_ref) if(H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME, gc_ref) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference") done: FUNC_LEAVE_API(ret_value) @@ -1413,11 +1391,11 @@ H5Pset_meta_block_size(hid_t plist_id, hsize_t size) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ if(H5P_set(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size") done: FUNC_LEAVE_API(ret_value) @@ -1455,12 +1433,12 @@ H5Pget_meta_block_size(hid_t plist_id, hsize_t *size/*out*/) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get values */ - if (size) { + if(size) { if(H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get meta data block size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get meta data block size") } /* end if */ done: @@ -1508,11 +1486,11 @@ H5Pset_sieve_buf_size(hid_t plist_id, size_t size) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ if(H5P_set(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size") done: FUNC_LEAVE_API(ret_value) @@ -1550,12 +1528,12 @@ H5Pget_sieve_buf_size(hid_t plist_id, size_t *size/*out*/) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get values */ - if (size) + if(size) if(H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size") done: FUNC_LEAVE_API(ret_value) @@ -1597,11 +1575,11 @@ H5Pset_small_data_block_size(hid_t plist_id, hsize_t size) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ if(H5P_set(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size") done: FUNC_LEAVE_API(ret_value) @@ -1634,12 +1612,12 @@ H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size/*out*/) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get values */ - if (size) { + if(size) { if(H5P_get(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'small data' block size"); + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'small data' block size") } /* end if */ done: @@ -1911,7 +1889,7 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len) /* validate parameters */ if(!(((buf_ptr == NULL) && (buf_len == 0)) || ((buf_ptr != NULL) && (buf_len > 0)))) - HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistant buf_ptr and buf_len"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistant buf_ptr and buf_len") /* Get the plist structure */ if(NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index cd6a7cd..21d45df 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -99,6 +99,7 @@ /* Property class callbacks */ static herr_t H5P_fcrt_reg_prop(H5P_genclass_t *pclass); + /*********************/ /* Package Variables */ /*********************/ @@ -207,6 +208,7 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass) /* Register the free space section threshold */ if(H5P_register_real(pclass, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, H5F_CRT_FREE_SPACE_THRESHOLD_SIZE, &free_space_threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_fcrt_reg_prop() */ diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index 737976e..394cf8b 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -58,7 +58,7 @@ /********************/ /* Property class callbacks */ -static herr_t H5P_gcrt_reg_prop(H5P_genclass_t *pclass); +static herr_t H5P__gcrt_reg_prop(H5P_genclass_t *pclass); /*********************/ @@ -72,7 +72,7 @@ const H5P_libclass_t H5P_CLS_GCRT[1] = {{ &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */ &H5P_CLS_GROUP_CREATE_g, /* Pointer to class ID */ &H5P_LST_GROUP_CREATE_g, /* Pointer to default property list ID */ - H5P_gcrt_reg_prop, /* Default property registration routine */ + H5P__gcrt_reg_prop, /* Default property registration routine */ NULL, /* Class creation callback */ NULL, /* Class creation callback info */ NULL, /* Class copy callback */ @@ -94,7 +94,7 @@ const H5P_libclass_t H5P_CLS_GCRT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5P_gcrt_reg_prop + * Function: H5P__gcrt_reg_prop * * Purpose: Initialize the group creation property list class * @@ -105,25 +105,25 @@ const H5P_libclass_t H5P_CLS_GCRT[1] = {{ *------------------------------------------------------------------------- */ static herr_t -H5P_gcrt_reg_prop(H5P_genclass_t *pclass) +H5P__gcrt_reg_prop(H5P_genclass_t *pclass) { H5O_ginfo_t ginfo = H5G_CRT_GROUP_INFO_DEF; /* Default group info settings */ H5O_linfo_t linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Register group info property */ if(H5P_register_real(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, &ginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register link info property */ if(H5P_register_real(pclass, H5G_CRT_LINK_INFO_NAME, H5G_CRT_LINK_INFO_SIZE, &linfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_gcrt_reg_prop() */ +} /* end H5P__gcrt_reg_prop() */ /*------------------------------------------------------------------------- @@ -156,7 +156,7 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") /* Update field */ - ginfo.lheap_size_hint = size_hint; + H5_ASSIGN_OVERFLOW(ginfo.lheap_size_hint, size_hint, size_t, uint32_t); /* Set value */ if(H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) diff --git a/src/H5Pint.c b/src/H5Pint.c index b2d5860..57fe001 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -59,7 +59,7 @@ typedef struct { typedef struct { H5P_iterate_int_t cb_func; /* Iterator callback */ void *udata; /* Iterator callback pointer */ - H5P_genplist_t *plist; /* Property list pointer */ + const H5P_genplist_t *plist; /* Property list pointer */ H5SL_t *seen; /* Skip list to hold names of properties already seen */ int *curr_idx_ptr; /* Pointer to current iteration index */ int prev_idx; /* Previous iteration index */ @@ -73,6 +73,12 @@ typedef struct { int prev_idx; /* Previous iteration index */ } H5P_iter_pclass_ud_t; +/* Typedef for property list comparison callback */ +typedef struct { + const H5P_genplist_t *plist2; /* Pointer to second property list */ + int cmp_value; /* Value from property comparison */ +} H5P_plist_cmp_ud_t; + /********************/ /* Local Prototypes */ @@ -1101,7 +1107,7 @@ done: Internal routine to check for a property in a property list's skip list USAGE H5P_genprop_t *H5P_find_prop(plist, name) - H5P_genplist_t *plist; IN: Pointer to property list to check + const H5P_genplist_t *plist; IN: Pointer to property list to check const char *name; IN: Name of property to check for RETURNS Returns pointer to property on success, NULL on failure. @@ -1113,7 +1119,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ H5P_genprop_t * -H5P__find_prop_plist(H5P_genplist_t *plist, const char *name) +H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name) { H5P_genprop_t *ret_value; /* Property pointer return value */ @@ -2572,7 +2578,7 @@ done: Internal routine to query the existance of a property in a property list. USAGE herr_t H5P_exist_plist(plist, name) - H5P_genplist_t *plist; IN: Property list to check + const H5P_genplist_t *plist; IN: Property list to check const char *name; IN: Name of property to check for RETURNS Success: Positive if the property exists in the property list, zero @@ -2587,7 +2593,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ htri_t -H5P_exist_plist(H5P_genplist_t *plist, const char *name) +H5P_exist_plist(const H5P_genplist_t *plist, const char *name) { htri_t ret_value = FAIL; /* return value */ @@ -2687,7 +2693,7 @@ done: Internal routine to query the size of a property in a property list. USAGE herr_t H5P_get_size_plist(plist, name) - H5P_genplist_t *plist; IN: Property list to check + const H5P_genplist_t *plist; IN: Property list to check const char *name; IN: Name of property to query size_t *size; OUT: Size of property RETURNS @@ -2703,7 +2709,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5P_get_size_plist(H5P_genplist_t *plist, const char *name, size_t *size) +H5P_get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size) { H5P_genprop_t *prop; /* Temporary property pointer */ herr_t ret_value=SUCCEED; /* return value */ @@ -3086,105 +3092,141 @@ done: /*-------------------------------------------------------------------------- NAME + H5P__cmp_plist_cb + PURPOSE + Internal callback routine when iterating over properties in property list + to compare them for equality + USAGE + int H5P__cmp_plist_cb(prop, udata) + H5P_genprop_t *prop; IN: Pointer to the property + void *udata; IN/OUT: Pointer to iteration data from user + RETURNS + Success: Returns whether to continue (H5_ITER_CONT) or stop (H5_ITER_STOP) + iterating over the property lists. + Failure: Negative value (H5_ITER_ERROR) + DESCRIPTION + This routine compares a property from one property list (the one being + iterated over, to a property from the second property list (which is + looked up). Iteration is stopped if the comparison is non-equal. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static int +H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata) +{ + H5P_plist_cmp_ud_t *udata = (H5P_plist_cmp_ud_t *)_udata; /* Pointer to user data */ + htri_t prop2_exist; /* Whether the property exists in the second property list */ + int ret_value = H5_ITER_CONT; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(prop); + HDassert(udata); + + /* Check if the property exists in the second property list */ + if((prop2_exist = H5P_exist_plist(udata->plist2, prop->name)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "can't lookup existance of property?") + if(prop2_exist) { + const H5P_genprop_t *prop2; /* Pointer to property in second plist */ + + /* Look up same property in second property list */ + if(NULL == (prop2 = H5P__find_prop_plist(udata->plist2, prop->name))) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "property doesn't exist") + + /* Compare the two properties */ + if((udata->cmp_value = H5P_cmp_prop(prop, prop2)) != 0) + HGOTO_DONE(H5_ITER_STOP); + } /* end if */ + else { + /* Property exists in first list, but not second */ + udata->cmp_value = 1; + HGOTO_DONE(H5_ITER_STOP); + } /* end else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5P__cmp_plist_cb() */ + + +/*-------------------------------------------------------------------------- + NAME H5P_cmp_plist PURPOSE Internal routine to compare two generic property lists USAGE - int H5P_cmp_plist(plist1, plist2) + herr_t H5P_cmp_plist(plist1, plist2, cmp_ret) H5P_genplist_t *plist1; IN: 1st property list to compare H5P_genplist_t *plist2; IN: 2nd property list to compare + int *cmp_ret; OUT: Comparison value for two property lists + Negative if list1 "less" than list2, + positive if list1 "greater" than list2, + zero if list1 is "equal" to list2 RETURNS - Success: negative if list1 "less" than list2, positive if list1 "greater" - than list2, zero if list1 is "equal" to list2 - Failure: can't fail + Success: non-negative value + Failure: negative value DESCRIPTION This function compares two generic property lists together to see if - they are the same list. - + they are equal. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -int -H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2) +herr_t +H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, + int *cmp_ret) { - H5SL_node_t *tnode1, *tnode2; /* Temporary pointer to property nodes */ - int cmp_value; /* Value from comparison */ - int ret_value = 0; /* return value */ + H5P_plist_cmp_ud_t udata; /* User data for callback */ + int idx = 0; /* Index of property to begin with */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT HDassert(plist1); HDassert(plist2); + HDassert(cmp_ret); /* Check the number of properties */ - if(plist1->nprops < plist2->nprops) HGOTO_DONE(-1); - if(plist1->nprops > plist2->nprops) HGOTO_DONE(1); + if(plist1->nprops < plist2->nprops) { + *cmp_ret = -1; + HGOTO_DONE(SUCCEED); + } /* end if */ + if(plist1->nprops > plist2->nprops) { + *cmp_ret = 1; + HGOTO_DONE(SUCCEED); + } /* end if */ /* Check whether they've been initialized */ - if(plist1->class_init < plist2->class_init) HGOTO_DONE(-1); - if(plist1->class_init > plist2->class_init) HGOTO_DONE(1); - - /* Check for identical deleted properties */ - if(H5SL_count(plist1->del) > 0) { - /* Check for no deleted properties in plist2 */ - if(H5SL_count(plist2->del) == 0) HGOTO_DONE(1); - - tnode1 = H5SL_first(plist1->del); - tnode2 = H5SL_first(plist2->del); - while(tnode1 || tnode2) { - const char *name1, *name2; /* Name for node */ - - /* Check if they both have properties in this node */ - if(tnode1 == NULL && tnode2 != NULL) HGOTO_DONE(-1); - if(tnode1 != NULL && tnode2 == NULL) HGOTO_DONE(1); - - /* Compare the two deleted properties */ - name1 = (const char *)H5SL_item(tnode1); - name2 = (const char *)H5SL_item(tnode2); - if((cmp_value = HDstrcmp(name1, name2)) != 0) - HGOTO_DONE(cmp_value); - - /* Advance the pointers */ - tnode1 = H5SL_next(tnode1); - tnode2 = H5SL_next(tnode2); - } /* end while */ + if(plist1->class_init < plist2->class_init) { + *cmp_ret = -1; + HGOTO_DONE(SUCCEED); } /* end if */ - else - if(H5SL_count(plist2->del) > 0) HGOTO_DONE (-1); - - /* Cycle through the changed properties and compare them also */ - if(H5SL_count(plist1->props) > 0) { - /* Check for no changed properties in plist2 */ - if(H5SL_count(plist2->props) == 0) HGOTO_DONE(1); - - tnode1 = H5SL_first(plist1->props); - tnode2 = H5SL_first(plist2->props); - while(tnode1 || tnode2) { - H5P_genprop_t *prop1, *prop2; /* Property for node */ - - /* Check if they both have properties in this node */ - if(tnode1 == NULL && tnode2 != NULL) HGOTO_DONE(-1); - if(tnode1 != NULL && tnode2 == NULL) HGOTO_DONE(1); - - /* Compare the two properties */ - prop1 = (H5P_genprop_t *)H5SL_item(tnode1); - prop2 = (H5P_genprop_t *)H5SL_item(tnode2); - if((cmp_value = H5P_cmp_prop(prop1, prop2)) != 0) - HGOTO_DONE(cmp_value); - - /* Advance the pointers */ - tnode1 = H5SL_next(tnode1); - tnode2 = H5SL_next(tnode2); - } /* end while */ + if(plist1->class_init > plist2->class_init) { + *cmp_ret = 1; + HGOTO_DONE(SUCCEED); + } /* end if */ + + /* Set up iterator callback info */ + udata.cmp_value = 0; + udata.plist2 = plist2; + + /* Iterate over properties in first property list */ + if((ret_value = H5P_iterate_plist(plist1, TRUE, &idx, H5P__cmp_plist_cb, &udata)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list") + if(ret_value != 0) { + *cmp_ret = udata.cmp_value; + HGOTO_DONE(SUCCEED); } /* end if */ - else - if(H5SL_count(plist2->props)>0) HGOTO_DONE (-1); /* Check the parent classes */ - if((cmp_value = H5P_cmp_class(plist1->pclass, plist2->pclass)) != 0) - HGOTO_DONE(cmp_value); + if((*cmp_ret = H5P_cmp_class(plist1->pclass, plist2->pclass)) != 0) + HGOTO_DONE(SUCCEED); + + /* Property lists must be equal, set comparison value to 0 */ + *cmp_ret = 0; done: FUNC_LEAVE_NOAPI(ret_value) @@ -3363,7 +3405,7 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata) H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */ char *key = (char *)_key; /* Pointer to the property's name */ H5P_iter_plist_ud_t *udata = (H5P_iter_plist_ud_t *)_udata; /* Pointer to user data */ - int ret_value = 0; /* Return value */ + int ret_value = H5_ITER_CONT; /* Return value */ FUNC_ENTER_STATIC @@ -3382,9 +3424,9 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata) /* Increment the current index */ (*udata->curr_idx_ptr)++; - /* Add property name to "seen" list */ + /* Add property name to 'seen' list */ if(H5SL_insert(udata->seen, key, key) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into seen skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert property into 'seen' skip list") done: FUNC_LEAVE_NOAPI(ret_value) @@ -3417,7 +3459,7 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata) H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */ char *key = (char *)_key; /* Pointer to the property's name */ H5P_iter_plist_ud_t *udata = (H5P_iter_plist_ud_t *)_udata; /* Pointer to user data */ - int ret_value = 0; /* Return value */ + int ret_value = H5_ITER_CONT; /* Return value */ FUNC_ENTER_STATIC_NOERR @@ -3662,7 +3704,7 @@ H5P_iterate_pclass(const H5P_genclass_t *pclass, int *idx, int curr_idx = 0; /* Current iteration index */ int ret_value = 0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(pclass); diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 8d8ee15..0697130 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -48,6 +48,7 @@ /* Definitions for number of soft links to traverse */ #define H5L_ACS_NLINKS_SIZE sizeof(size_t) #define H5L_ACS_NLINKS_DEF H5L_NUM_LINKS /*max symlinks to follow per lookup */ + /* Definitions for external link prefix */ #define H5L_ACS_ELINK_PREFIX_SIZE sizeof(char *) #define H5L_ACS_ELINK_PREFIX_DEF NULL /*default is no prefix */ @@ -297,8 +298,12 @@ H5P_lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t UNUSED si /* Check for NULL property lists */ if(obj1 == NULL && obj2 != NULL) HGOTO_DONE(1); if(obj1 != NULL && obj2 == NULL) HGOTO_DONE(-1); - if(obj1 && obj2) - ret_value = H5P_cmp_plist(obj1, obj2); + if(obj1 && obj2) { + herr_t status; + + status = H5P_cmp_plist(obj1, obj2, &ret_value); + HDassert(status >= 0); + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 024f79b..5eba335 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -54,7 +54,7 @@ #define H5O_CRT_OHDR_FLAGS_SIZE sizeof(uint8_t) /* Definitions for filter pipeline */ #define H5O_CRT_PIPELINE_SIZE sizeof(H5O_pline_t) -#define H5O_CRT_PIPELINE_CMP H5P_ocrt_pipeline_cmp +#define H5O_CRT_PIPELINE_CMP H5P__ocrt_pipeline_cmp /******************/ @@ -72,12 +72,12 @@ /********************/ /* Property class callbacks */ -static herr_t H5P_ocrt_reg_prop(H5P_genclass_t *pclass); -static herr_t H5P_ocrt_copy(hid_t new_plist_t, hid_t old_plist_t, void *copy_data); -static herr_t H5P_ocrt_close(hid_t dxpl_id, void *close_data); +static herr_t H5P__ocrt_reg_prop(H5P_genclass_t *pclass); +static herr_t H5P__ocrt_copy(hid_t new_plist_t, hid_t old_plist_t, void *copy_data); +static herr_t H5P__ocrt_close(hid_t dxpl_id, void *close_data); /* Property callbacks */ -static int H5P_ocrt_pipeline_cmp(const void *value1, const void *value2, size_t size); +static int H5P__ocrt_pipeline_cmp(const void *value1, const void *value2, size_t size); /*********************/ @@ -91,12 +91,12 @@ const H5P_libclass_t H5P_CLS_OCRT[1] = {{ &H5P_CLS_ROOT_g, /* Parent class ID */ &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class ID */ NULL, /* Pointer to default property list ID */ - H5P_ocrt_reg_prop, /* Default property registration routine */ + H5P__ocrt_reg_prop, /* Default property registration routine */ NULL, /* Class creation callback */ NULL, /* Class creation callback info */ - H5P_ocrt_copy, /* Class copy callback */ + H5P__ocrt_copy, /* Class copy callback */ NULL, /* Class copy callback info */ - H5P_ocrt_close, /* Class close callback */ + H5P__ocrt_close, /* Class close callback */ NULL /* Class close callback info */ }}; @@ -114,7 +114,7 @@ const H5P_libclass_t H5P_CLS_OCRT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5P_ocrt_reg_prop + * Function: H5P__ocrt_reg_prop * * Purpose: Initialize the object creation property list class * @@ -126,7 +126,7 @@ const H5P_libclass_t H5P_CLS_OCRT[1] = {{ *------------------------------------------------------------------------- */ static herr_t -H5P_ocrt_reg_prop(H5P_genclass_t *pclass) +H5P__ocrt_reg_prop(H5P_genclass_t *pclass) { unsigned attr_max_compact = H5O_CRT_ATTR_MAX_COMPACT_DEF; /* Default max. compact attribute storage settings */ unsigned attr_min_dense = H5O_CRT_ATTR_MIN_DENSE_DEF; /* Default min. dense attribute storage settings */ @@ -134,7 +134,7 @@ H5P_ocrt_reg_prop(H5P_genclass_t *pclass) H5O_pline_t pline = H5O_CRT_PIPELINE_DEF; /* Default I/O pipeline setting */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Register max. compact attribute storage property */ if(H5P_register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &attr_max_compact, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) @@ -150,15 +150,15 @@ H5P_ocrt_reg_prop(H5P_genclass_t *pclass) /* Register the pipeline property */ if(H5P_register_real(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, &pline, NULL, NULL, NULL, NULL, NULL, H5O_CRT_PIPELINE_CMP, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocrt_reg_prop() */ +} /* end H5P__ocrt_reg_prop() */ /*------------------------------------------------------------------------- - * Function: H5P_ocrt_copy + * Function: H5P__ocrt_copy * * Purpose: Callback routine which is called whenever any object * creation property list is copied. This routine copies @@ -174,14 +174,14 @@ done: */ /* ARGSUSED */ static herr_t -H5P_ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) +H5P__ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) { H5O_pline_t src_pline, dst_pline; /* Source & destination pipelines */ H5P_genplist_t *src_plist; /* Pointer to source property list */ H5P_genplist_t *dst_plist; /* Pointer to destination property list */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Verify property list IDs */ if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id))) @@ -203,11 +203,11 @@ H5P_ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocrt_copy() */ +} /* end H5P__ocrt_copy() */ /*------------------------------------------------------------------------- - * Function: H5P_ocrt_close + * Function: H5P__ocrt_close * * Purpose: Callback routine which is called whenever any object create * property list is closed. This routine performs any generic @@ -223,13 +223,13 @@ done: */ /* ARGSUSED */ static herr_t -H5P_ocrt_close(hid_t dcpl_id, void UNUSED *close_data) +H5P__ocrt_close(hid_t dcpl_id, void UNUSED *close_data) { H5O_pline_t pline; /* I/O pipeline */ H5P_genplist_t *plist; /* Property list */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id))) @@ -245,7 +245,7 @@ H5P_ocrt_close(hid_t dcpl_id, void UNUSED *close_data) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocrt_close() */ +} /* end H5P__ocrt_close() */ /*------------------------------------------------------------------------- @@ -1330,7 +1330,7 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/, /*------------------------------------------------------------------------- - * Function: H5P_ocrt_pipeline_cmp + * Function: H5P__ocrt_pipeline_cmp * * Purpose: Callback routine which is called whenever a filter pipeline * property in a property list is compared. @@ -1345,24 +1345,20 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/, *------------------------------------------------------------------------- */ static int -H5P_ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED size) +H5P__ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED size) { const H5O_pline_t *pline1 = (const H5O_pline_t *)_pline1, /* Create local aliases for values */ *pline2 = (const H5O_pline_t *)_pline2; int cmp_value; /* Value from comparison */ herr_t ret_value = 0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(pline1); HDassert(pline2); HDassert(size == sizeof(H5O_pline_t)); - /* Check the number of allocated pipeline entries */ - if(pline1->nalloc < pline2->nalloc) HGOTO_DONE(-1); - if(pline1->nalloc > pline2->nalloc) HGOTO_DONE(1); - /* Check the number of used pipeline entries */ if(pline1->nused < pline2->nused) HGOTO_DONE(-1); if(pline1->nused > pline2->nused) HGOTO_DONE(1); @@ -1412,7 +1408,7 @@ H5P_ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED si done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocrt_pipeline_cmp() */ +} /* end H5P__ocrt_pipeline_cmp() */ #ifndef H5_NO_DEPRECATED_SYMBOLS @@ -1566,6 +1562,5 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags/*out*/ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_filter_by_id1() */ - #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c index adea906..0ba5625 100644 --- a/src/H5Pocpypl.c +++ b/src/H5Pocpypl.c @@ -52,11 +52,14 @@ /* Definitions for merge committed dtype list */ #define H5O_CPY_MERGE_COMM_DT_LIST_SIZE sizeof(char *) #define H5O_CPY_MERGE_COMM_DT_LIST_DEF NULL -#define H5O_CPY_MERGE_COMM_DT_LIST_CMP H5P_ocpy_merge_comm_dt_list_cmp +#define H5O_CPY_MERGE_COMM_DT_LIST_COPY H5P__ocpy_merge_comm_dt_list_copy +#define H5O_CPY_MERGE_COMM_DT_LIST_CMP H5P__ocpy_merge_comm_dt_list_cmp +#define H5O_CPY_MERGE_COMM_DT_LIST_CLOSE H5P__ocpy_merge_comm_dt_list_close /* Definitions for callback function when completing the search for a matching committed datatype from the committed dtype list */ #define H5O_CPY_MCDT_SEARCH_CB_SIZE sizeof(H5O_mcdt_cb_info_t) #define H5O_CPY_MCDT_SEARCH_CB_DEF {NULL,NULL} + /******************/ /* Local Typedefs */ /******************/ @@ -72,16 +75,15 @@ /********************/ /* General routines */ -static H5O_copy_dtype_merge_list_t *H5P_free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list); +static H5O_copy_dtype_merge_list_t *H5P__free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list); /* Property class callbacks */ -static herr_t H5P_ocpy_reg_prop(H5P_genclass_t *pclass); -static herr_t H5P_ocpy_copy(hid_t dst_plist_id, hid_t src_plist_id, - void *copy_data); -static herr_t H5P_ocpy_close(hid_t ocpypl_id, void *close_data); +static herr_t H5P__ocpy_reg_prop(H5P_genclass_t *pclass); /* Property callbacks */ -static int H5P_ocpy_merge_comm_dt_list_cmp(const void *value1, const void *value2, size_t size); +static herr_t H5P__ocpy_merge_comm_dt_list_copy(const char* name, size_t size, void* value); +static int H5P__ocpy_merge_comm_dt_list_cmp(const void *value1, const void *value2, size_t size); +static herr_t H5P__ocpy_merge_comm_dt_list_close(const char* name, size_t size, void* value); /*********************/ @@ -95,12 +97,12 @@ const H5P_libclass_t H5P_CLS_OCPY[1] = {{ &H5P_CLS_ROOT_g, /* Parent class ID */ &H5P_CLS_OBJECT_COPY_g, /* Pointer to class ID */ &H5P_LST_OBJECT_COPY_g, /* Pointer to default property list ID */ - H5P_ocpy_reg_prop, /* Default property registration routine */ + H5P__ocpy_reg_prop, /* Default property registration routine */ NULL, /* Class creation callback */ NULL, /* Class creation callback info */ - H5P_ocpy_copy, /* Class copy callback */ + NULL, /* Class copy callback */ NULL, /* Class copy callback info */ - H5P_ocpy_close, /* Class close callback */ + NULL, /* Class close callback */ NULL /* Class close callback info */ }}; @@ -120,7 +122,7 @@ H5FL_DEFINE(H5O_copy_dtype_merge_list_t); /*------------------------------------------------------------------------- - * Function: H5P_ocpy_reg_prop + * Function: H5P__ocpy_reg_prop * * Purpose: Initialize the object copy property list class * @@ -131,21 +133,21 @@ H5FL_DEFINE(H5O_copy_dtype_merge_list_t); *------------------------------------------------------------------------- */ static herr_t -H5P_ocpy_reg_prop(H5P_genclass_t *pclass) +H5P__ocpy_reg_prop(H5P_genclass_t *pclass) { unsigned ocpy_option = H5O_CPY_OPTION_DEF; /* Default object copy flags */ H5O_copy_dtype_merge_list_t *merge_comm_dtype_list = H5O_CPY_MERGE_COMM_DT_LIST_DEF; /* Default merge committed dtype list */ H5O_mcdt_cb_info_t mcdt_cb = H5O_CPY_MCDT_SEARCH_CB_DEF; /* Default callback before searching the global list of committed datatypes at destination */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Register copy options property */ if(H5P_register_real(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, &ocpy_option, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register merge named dtype list property */ - if(H5P_register_real(pclass, H5O_CPY_MERGE_COMM_DT_LIST_NAME, H5O_CPY_MERGE_COMM_DT_LIST_SIZE, &merge_comm_dtype_list, NULL, NULL, NULL, NULL, NULL, H5O_CPY_MERGE_COMM_DT_LIST_CMP, NULL) < 0) + if(H5P_register_real(pclass, H5O_CPY_MERGE_COMM_DT_LIST_NAME, H5O_CPY_MERGE_COMM_DT_LIST_SIZE, &merge_comm_dtype_list, NULL, NULL, NULL, NULL, H5O_CPY_MERGE_COMM_DT_LIST_COPY, H5O_CPY_MERGE_COMM_DT_LIST_CMP, H5O_CPY_MERGE_COMM_DT_LIST_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register property for callback when completing the search for a matching named datatype from the named dtype list */ @@ -154,47 +156,68 @@ H5P_ocpy_reg_prop(H5P_genclass_t *pclass) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocpy_reg_prop() */ +} /* end H5P__ocpy_reg_prop() */ /*------------------------------------------------------------------------- - * Function: H5P_ocpy_copy - * - * Purpose: Callback routine which is called whenever any object - * copy property list is copied. This routine copies - * the properties from the old list to the new list. + * Function: H5P__free_merge_comm_dtype_list * - * Return: Success: Non-negative - * Failure: Negative + * Purpose: Frees the provided merge named dtype list * - * Programmer: Neil Fortner - * Friday, October 28, 2011 + * Return: NULL * + * Programmer: Neil Fortner + * October 27, 2011 *------------------------------------------------------------------------- */ +static H5O_copy_dtype_merge_list_t * +H5P__free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list) +{ + H5O_copy_dtype_merge_list_t *tmp_node; + + FUNC_ENTER_STATIC_NOERR + + /* Free the list */ + while(dt_list) { + tmp_node = dt_list->next; + (void)H5MM_xfree(dt_list->path); + (void)H5FL_FREE(H5O_copy_dtype_merge_list_t, dt_list); + dt_list = tmp_node; + } /* end while */ + + FUNC_LEAVE_NOAPI(NULL); +} /* H5P__free_merge_comm_dtype_list */ + + +/*-------------------------------------------------------------------------- + * Function: H5P__ocpy_merge_comm_dt_list_copy + * + * Purpose: Copy the merge committed datatype list + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Quincey Koziol + * Friday, August 31, 2012 + * + *-------------------------------------------------------------------------- + */ /* ARGSUSED */ static herr_t -H5P_ocpy_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) +H5P__ocpy_merge_comm_dt_list_copy(const char UNUSED *name, size_t UNUSED size, + void *value) { - H5O_copy_dtype_merge_list_t *src_dt_list, *dst_dt_list = NULL; /* Source & destination merge named datatype lists */ + const H5O_copy_dtype_merge_list_t *src_dt_list; /* Source merge named datatype lists */ + H5O_copy_dtype_merge_list_t *dst_dt_list = NULL; /* Destination merge named datatype lists */ H5O_copy_dtype_merge_list_t *dst_dt_list_tail = NULL, *tmp_dt_list = NULL; /* temporary merge named datatype lists */ - H5P_genplist_t *src_plist; /* Pointer to source property list */ - H5P_genplist_t *dst_plist; /* Pointer to destination property list */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Verify property list IDs */ - if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object copy property list") - if(NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_plist_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object copy property list") - - /* Get the merge committed dtype list property from the old property list */ - if(H5P_get(src_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &src_dt_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge named dtype list") + HDassert(value); /* Make copy of merge committed dtype list */ + src_dt_list = *(const H5O_copy_dtype_merge_list_t **)value; while(src_dt_list) { /* Copy src_dt_list */ if(NULL == (tmp_dt_list = H5FL_CALLOC(H5O_copy_dtype_merge_list_t))) @@ -217,14 +240,12 @@ H5P_ocpy_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) src_dt_list = src_dt_list->next; } /* end while */ - /* Set the merge named dtype list property for the destination property list - */ - if(H5P_set(dst_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dst_dt_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set merge committed dtype list") + /* Set the merge named dtype list property for the destination property list */ + *(H5O_copy_dtype_merge_list_t **)value = dst_dt_list; done: if(ret_value < 0) { - dst_dt_list = H5P_free_merge_comm_dtype_list(dst_dt_list); + dst_dt_list = H5P__free_merge_comm_dtype_list(dst_dt_list); if(tmp_dt_list) { tmp_dt_list->path = (char *)H5MM_xfree(tmp_dt_list->path); tmp_dt_list = H5FL_FREE(H5O_copy_dtype_merge_list_t, tmp_dt_list); @@ -232,53 +253,11 @@ done: } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocpy_copy() */ - - -/*------------------------------------------------------------------------- - * Function: H5P_ocpy_close - * - * Purpose: Callback routine which is called whenever any object copy - * property list is closed. This routine performs any generic - * cleanup needed on the properties the library put into the - * list. - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Neil Fortner - * Friday, October 28, 2011 - * - *------------------------------------------------------------------------- - */ -/* ARGSUSED */ -static herr_t -H5P_ocpy_close(hid_t ocpypl_id, void UNUSED *close_data) -{ - H5O_copy_dtype_merge_list_t *dt_list; /* Merge named datatype list */ - H5P_genplist_t *plist; /* Property list */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* Check arguments */ - if(NULL == (plist = (H5P_genplist_t *)H5I_object(ocpypl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object copy property list") - - /* Get the merge named dtype list property from the old property list */ - if(H5P_get(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge named dtype list") - - /* Free the merge named dtype list */ - dt_list = H5P_free_merge_comm_dtype_list(dt_list); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocpy_close() */ +} /* end H5P__ocpy_merge_comm_dt_list_copy() */ /*------------------------------------------------------------------------- - * Function: H5P_ocpy_merge_comm_dt_list_cmp + * Function: H5P__ocpy_merge_comm_dt_list_cmp * * Purpose: Callback routine which is called whenever the merge * named dtype property in the object copy property list @@ -294,14 +273,14 @@ done: *------------------------------------------------------------------------- */ static int -H5P_ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, +H5P__ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, size_t UNUSED size) { const H5O_copy_dtype_merge_list_t *dt_list1 = *(H5O_copy_dtype_merge_list_t * const *)_dt_list1, /* Create local aliases for values */ *dt_list2 = *(H5O_copy_dtype_merge_list_t * const *)_dt_list2; herr_t ret_value = 0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(_dt_list1); @@ -326,37 +305,35 @@ H5P_ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_ocpy_merge_comm_dt_list_cmp() */ +} /* end H5P__ocpy_merge_comm_dt_list_cmp() */ -/*------------------------------------------------------------------------- - * Function: H5P_free_merge_comm_dtype_list +/*-------------------------------------------------------------------------- + * Function: H5P__ocpy_merge_comm_dt_list_close * - * Purpose: Frees the provided merge named dtype list + * Purpose: Close the merge common datatype list property * - * Return: NULL + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Neil Fortner - * October 27, 2011 - *------------------------------------------------------------------------- + * Programmer: Quincey Koziol + * Friday, August 31, 2012 + * + *--------------------------------------------------------------------------- */ -static H5O_copy_dtype_merge_list_t * -H5P_free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list) +/* ARGSUSED */ +static herr_t +H5P__ocpy_merge_comm_dt_list_close(const char UNUSED *name, size_t UNUSED size, void *value) { - H5O_copy_dtype_merge_list_t *tmp_node; + FUNC_ENTER_STATIC_NOERR - FUNC_ENTER_NOAPI_NOINIT + HDassert(value); - /* Free the list */ - while(dt_list) { - tmp_node = dt_list->next; - (void)H5MM_xfree(dt_list->path); - (void)H5FL_FREE(H5O_copy_dtype_merge_list_t, dt_list); - dt_list = tmp_node; - } /* end while */ + /* Free the merge named dtype list */ + H5P__free_merge_comm_dtype_list(*(H5O_copy_dtype_merge_list_t **)value); - FUNC_LEAVE_NOAPI(NULL); -} /* H5P_free_merge_comm_dtype_list */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__ocpy_merge_comm_dt_list_close() */ /*------------------------------------------------------------------------- @@ -541,7 +518,7 @@ H5Pfree_merge_committed_dtype_paths(hid_t plist_id) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed dtype list") /* Free dtype list */ - dt_list = H5P_free_merge_comm_dtype_list(dt_list); + dt_list = H5P__free_merge_comm_dtype_list(dt_list); /* Update the list stored in the property list (to NULL) */ if(H5P_set(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0) diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 075c43b..c877d1b 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -171,14 +171,15 @@ H5_DLL herr_t H5P_register(H5P_genclass_t **pclass, const char *name, size_t siz H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop); H5_DLL herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod); H5_DLL htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name); -H5_DLL herr_t H5P_get_size_plist(H5P_genplist_t *plist, const char *name, +H5_DLL herr_t H5P_get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size); H5_DLL herr_t H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size); H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist); H5_DLL herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops); H5_DLL int H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2); -H5_DLL int H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2); +H5_DLL herr_t H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, + int *cmp_ret); H5_DLL int H5P_iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx, H5P_iterate_int_t iter_func, void *iter_data); H5_DLL int H5P_iterate_pclass(const H5P_genclass_t *pclass, int *idx, @@ -193,7 +194,7 @@ H5_DLL herr_t H5P_close_class(void *_pclass); H5_DLL herr_t H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config); -H5_DLL H5P_genprop_t *H5P__find_prop_plist(H5P_genplist_t *plist, const char *name); +H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name); /* Testing functions */ #ifdef H5P_TESTING diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 849a533..c750070 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -87,7 +87,7 @@ H5_DLL herr_t H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); H5_DLL herr_t H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name); -H5_DLL htri_t H5P_exist_plist(H5P_genplist_t *plist, const char *name); +H5_DLL htri_t H5P_exist_plist(const H5P_genplist_t *plist, const char *name); H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass); H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recurse); diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index de6019e..1085d75 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -153,6 +153,19 @@ typedef enum H5D_mpio_actual_io_mode_t { H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4 } H5D_mpio_actual_io_mode_t; +/* Broken collective IO property */ +typedef enum H5D_mpio_no_collective_cause_t { + H5D_MPIO_COLLECTIVE = 0x00, + H5D_MPIO_SET_INDEPENDENT = 0x01, + H5D_MPIO_DATATYPE_CONVERSION = 0x02, + H5D_MPIO_DATA_TRANSFORMS = 0x04, + H5D_MPIO_SET_MPIPOSIX = 0x08, + H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10, + H5D_MPIO_POINT_SELECTIONS = 0x20, + H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x40, + H5D_MPIO_FILTERS = 0x80 +} H5D_mpio_no_collective_cause_t; + /********************/ /* Public Variables */ /********************/ @@ -401,6 +414,7 @@ H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, voi #ifdef H5_HAVE_PARALLEL H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); +H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause); #endif /* H5_HAVE_PARALLEL */ /* Link creation property list (LCPL) routines */ diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index 8573985..505e35f 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -63,7 +63,7 @@ /********************/ /* Property class callbacks */ -static herr_t H5P_strcrt_reg_prop(H5P_genclass_t *pclass); +static herr_t H5P__strcrt_reg_prop(H5P_genclass_t *pclass); /*********************/ @@ -77,7 +77,7 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{ &H5P_CLS_ROOT_g, /* Parent class ID */ &H5P_CLS_STRING_CREATE_g, /* Pointer to class ID */ NULL, /* Pointer to default property list ID */ - H5P_strcrt_reg_prop, /* Default property registration routine */ + H5P__strcrt_reg_prop, /* Default property registration routine */ NULL, /* Class creation callback */ NULL, /* Class creation callback info */ NULL, /* Class copy callback */ @@ -99,9 +99,9 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5P_strcrt_reg_prop + * Function: H5P__strcrt_reg_prop * - * Purpose: Register the dataset creation property list class's properties + * Purpose: Register the string creation property list class's properties * * Return: Non-negative on success/Negative on failure * @@ -110,41 +110,38 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{ *------------------------------------------------------------------------- */ static herr_t -H5P_strcrt_reg_prop(H5P_genclass_t *pclass) +H5P__strcrt_reg_prop(H5P_genclass_t *pclass) { H5T_cset_t char_encoding = H5P_STRCRT_CHAR_ENCODING_DEF; /* Default character set encoding */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_STATIC /* Register character encoding */ if(H5P_register_real(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, &char_encoding, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_strcrt_reg_prop() */ +} /* end H5P__strcrt_reg_prop() */ /*------------------------------------------------------------------------- - * Function: H5Pset_char_encoding + * Function: H5Pset_char_encoding * - * Purpose: Sets the character encoding of the string. + * Purpose: Sets the character encoding of the string. * - * Return: Non-negative on success/Negative on failure - * - * Programmer: James Laird - * Wednesday, October 26, 2005 - * - * Modifications: + * Return: Non-negative on success/Negative on failure * + * Programmer: James Laird + * Wednesday, October 26, 2005 *------------------------------------------------------------------------- */ herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding) { H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value=SUCCEED; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "iTc", plist_id, encoding); @@ -154,7 +151,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "character encoding is not valid") /* Get the plist structure */ - if(NULL == (plist = H5P_object_verify(plist_id,H5P_STRING_CREATE))) + if(NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set the character encoding */ diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h index c2d6f7e..c1528b3 100644 --- a/src/H5Zprivate.h +++ b/src/H5Zprivate.h @@ -103,6 +103,6 @@ H5_DLL herr_t H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop); H5_DLL herr_t H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size, const H5T_t *buf_type); H5_DLL hbool_t H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop); -H5_DLL char* H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop); +H5_DLL const char *H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop); #endif diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index 9fa3863..498db03 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -1732,11 +1732,9 @@ H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop) * *------------------------------------------------------------------------- */ -char * +const char * H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop) { - char* ret_value; - FUNC_ENTER_NOAPI_NOINIT_NOERR /* There should be no way that this can be NULL since the function @@ -1744,8 +1742,6 @@ H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop) * pasing them */ assert(data_xform_prop); - ret_value = data_xform_prop->xform_exp; - - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI(data_xform_prop->xform_exp) } /* H5Z_xform_extract_xform_str() */ diff --git a/src/H5public.h b/src/H5public.h index e3561ce..fcba406 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,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 127 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 131 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "FA_a5" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.127-FA_a5" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.131-FA_a5" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/H5trace.c b/src/H5trace.c index b559669..2dab8ec 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -535,6 +535,60 @@ H5_trace(const double *returning, const char *func, const char *type, ...) } /* end else */ break; + case 'n': + if(ptr) { + if(vp) + fprintf(out, "0x%lx", (unsigned long)vp); + else + fprintf(out, "NULL"); + } /* end if */ + else { + H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)va_arg(ap, int); + + switch(nocol_cause_mode) { + case H5D_MPIO_COLLECTIVE: + fprintf(out, "H5D_MPIO_COLLECTIVE"); + break; + + case H5D_MPIO_SET_INDEPENDENT: + fprintf(out, "H5D_MPIO_SET_INDEPENDENT"); + break; + + case H5D_MPIO_DATATYPE_CONVERSION: + fprintf(out, "H5D_MPIO_DATATYPE_CONVERSION"); + break; + + case H5D_MPIO_DATA_TRANSFORMS: + fprintf(out, "H5D_MPIO_DATA_TRANSFORMS"); + break; + + case H5D_MPIO_SET_MPIPOSIX: + fprintf(out, "H5D_MPIO_SET_MPIPOSIX"); + break; + + case H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES: + fprintf(out, "H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES"); + break; + + case H5D_MPIO_POINT_SELECTIONS: + fprintf(out, "H5D_MPIO_POINT_SELECTIONS"); + break; + + case H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET: + fprintf(out, "H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET"); + break; + + case H5D_MPIO_FILTERS: + fprintf(out, "H5D_MPIO_FILTERS"); + break; + + default: + fprintf(out, "%ld", (long)nocol_cause_mode); + break; + } /* end switch */ + } /* end else */ + break; + case 'o': if(ptr) { if(vp) diff --git a/src/Makefile.in b/src/Makefile.in index 8913399..0b4f0b2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -525,7 +525,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 117 +LT_VERS_REVISION = 121 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a6ff10b..8e63326 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_TEST) #----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + +#----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- SET (TEST_LIB_SRCS diff --git a/test/file_image.c b/test/file_image.c index 9d7a48c..c734db8 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -163,6 +163,7 @@ error: return retval; } /* end test_properties() */ + /****************************************************************************** * Function: malloc_cb * @@ -185,6 +186,7 @@ malloc_cb(size_t size, H5FD_file_image_op_t op, void *udata) return HDmalloc(size); } + /****************************************************************************** * Function: memcpy_cb * @@ -207,6 +209,7 @@ memcpy_cb(void *dest, const void *src, size_t size, H5FD_file_image_op_t op, voi return HDmemcpy(dest, src, size); } + /****************************************************************************** * Function: realloc_cb * @@ -229,6 +232,7 @@ realloc_cb(void *ptr, size_t size, H5FD_file_image_op_t op, void *udata) return HDrealloc(ptr,size); } + /****************************************************************************** * Function: free_cb * @@ -250,6 +254,7 @@ free_cb(void *ptr, H5FD_file_image_op_t op, void *udata) return(SUCCEED); } + /****************************************************************************** * Function: udata_copy_cb * @@ -273,6 +278,7 @@ udata_copy_cb(void *udata) return udata; } + /****************************************************************************** * Function: udata_free_cb * @@ -296,6 +302,7 @@ udata_free_cb(void *udata) return(SUCCEED); } + /****************************************************************************** * Function: reset_udata * @@ -314,6 +321,7 @@ reset_udata(udata_t *u) u->malloc_src = u->memcpy_src = u->realloc_src = u->free_src = H5FD_FILE_IMAGE_OP_NO_OP; } + /****************************************************************************** * Function: test_callbacks * @@ -502,6 +510,7 @@ error: return 1; } /* test_callbacks() */ + /****************************************************************************** * Function: test_core * @@ -647,6 +656,7 @@ error: return 1; } /* end test_core() */ + /****************************************************************************** * Function: test_get_file_image * @@ -899,6 +909,7 @@ error: return 1; } /* end test_get_file_image() */ + /****************************************************************************** * Function: test_get_file_image_error_rejection * @@ -1282,7 +1293,7 @@ main(void) /* test H5Fget_file_image() with sec2 driver */ fapl = H5Pcreate(H5P_FILE_ACCESS); - if(0 > H5Pset_fapl_sec2(fapl)) + if(H5Pset_fapl_sec2(fapl) < 0) errors++; else errors += test_get_file_image("H5Fget_file_image() with sec2 driver", @@ -1290,7 +1301,7 @@ main(void) /* test H5Fget_file_image() with stdio driver */ fapl = H5Pcreate(H5P_FILE_ACCESS); - if(0 > H5Pset_fapl_stdio(fapl)) + if(H5Pset_fapl_stdio(fapl) < 0) errors++; else errors += test_get_file_image("H5Fget_file_image() with stdio driver", @@ -1298,7 +1309,7 @@ main(void) /* test H5Fget_file_image() with core driver */ fapl = H5Pcreate(H5P_FILE_ACCESS); - if(0 > H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE)) + if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0) errors++; else errors += test_get_file_image("H5Fget_file_image() with core driver", diff --git a/test/h5test.c b/test/h5test.c index ea30fad..91497e3 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -408,7 +408,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) if (!fullname[0]) /* We didn't append the prefix yet */ - HDstrncpy(fullname, prefix, MIN(strlen(prefix), size)); + HDstrncpy(fullname, prefix, MIN(HDstrlen(prefix), size)); if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) { /* @@ -751,7 +751,7 @@ h5_set_info_object(void) /* copy key/value pair into temporary buffer */ len = strcspn(valp, ";"); next = &valp[len]; - key_val = calloc(1, len + 1); + key_val = (char *)calloc(1, len + 1); /* increment the next pointer past the terminating semicolon */ if (*next == ';') @@ -766,7 +766,7 @@ h5_set_info_object(void) if (!*namep) continue; /* was all white space, so move to next k/v pair */ /* eat up any ending white spaces */ - endp = &namep[strlen(namep) - 1]; + endp = &namep[HDstrlen(namep) - 1]; while (endp && (*endp == ' ' || *endp == '\t')) *endp-- = '\0'; @@ -1061,7 +1061,7 @@ getenv_all(MPI_Comm comm, int root, const char* name) if(mpi_rank == root) { env = HDgetenv(name); if(env) { - len = HDstrlen(env); + len = (int)HDstrlen(env); MPI_Bcast(&len, 1, MPI_INT, root, comm); MPI_Bcast(env, len, MPI_CHAR, root, comm); } @@ -1075,9 +1075,9 @@ getenv_all(MPI_Comm comm, int root, const char* name) MPI_Bcast(&len, 1, MPI_INT, root, comm); if(len >= 0) { if(env == NULL) - env = (char*) HDmalloc(len+1); - else if(strlen(env) < len) - env = (char*) HDrealloc(env, len+1); + env = (char*) HDmalloc((size_t)len+1); + else if(HDstrlen(env) < (size_t)len) + env = (char*) HDrealloc(env, (size_t)len+1); MPI_Bcast(env, len, MPI_CHAR, root, comm); env[len] = '\0'; @@ -1129,7 +1129,11 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name) #ifdef H5_VMS HDstrcat(filename, origfilename); #else - char * srcdir = HDgetenv("srcdir"); /* The source directory */ + const char * srcdir = HDgetenv("srcdir"); /* The source directory */ + + /* Check for using the srcdir from configure time */ + if(NULL == srcdir) + srcdir = config_srcdir; if(srcdir && ((HDstrlen(srcdir) + HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) { diff --git a/test/h5test.h b/test/h5test.h index dd38546..0c52bd1 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -175,7 +175,7 @@ H5TEST_DLL void ParseTestVerbosity(char *argv); H5TEST_DLL int GetTestNumErrs(void); H5TEST_DLL void IncTestNumErrs(void); H5TEST_DLL const void *GetTestParameters(void); -H5TEST_DLL int TestErrPrintf(const char *format, ...); +H5TEST_DLL int TestErrPrintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); H5TEST_DLL void SetTest(const char *testname, int action); H5TEST_DLL void TestAlarmOn(void); H5TEST_DLL void TestAlarmOff(void); diff --git a/test/testframe.c b/test/testframe.c index 6fbace1..5835b73 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -124,12 +124,6 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con */ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_parser)(int ac, char *av[])) { -#if !(defined MAC) - /* Un-buffer the stdout and stderr */ - setbuf(stderr, NULL); - setbuf(stdout, NULL); -#endif - /* * Turn off automatic error reporting since we do it ourselves. Besides, * half the functions this test calls are private, so automatic error diff --git a/test/testhdf5.h b/test/testhdf5.h index 149b4c8..c92c0f0 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -125,7 +125,17 @@ } while(0) /* Used to document process through a test */ -#define MESSAGE(V,A) {if (HDGetTestVerbosity()>(V)) print_func A;} +#if defined(H5_HAVE_PARALLEL) && defined(H5_PARALLEL_TEST) +#define MESSAGE(V,A) { \ + int mpi_rank; \ + \ + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); \ + if(mpi_rank == 0 && HDGetTestVerbosity() > (V)) \ + print_func A ; \ +} +#else /* H5_HAVE_PARALLEL */ +#define MESSAGE(V,A) {if (HDGetTestVerbosity() > (V)) print_func A;} +#endif /* H5_HAVE_PARALLEL */ /* Used to indicate an error that is complex to check for */ #define ERROR(where) do { \ diff --git a/test/tgenprop.c b/test/tgenprop.c index 3dbaa14..f304f11 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -743,11 +743,11 @@ test_genprop_basic_list_prop(void) /* Add temporary properties */ - /* Insert first temporary property into class (with no callbacks) */ + /* Insert first temporary property into list (with no callbacks) */ ret = H5Pinsert2(lid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL); CHECK_I(ret, "H5Pinsert2"); - /* Insert second temporary property into class (with no callbacks) */ + /* Insert second temporary property into list (with no callbacks) */ ret = H5Pinsert2(lid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL); CHECK_I(ret, "H5Pinsert2"); @@ -1215,10 +1215,10 @@ test_genprop_list_callback(void) /* The compare callback should have been called once on property 1 (to check * if the create callback modified the value) */ - VERIFY(prop1_cb_info.cmp_count, 1, "H5Pequal"); + VERIFY(prop1_cb_info.cmp_count, 1, "H5Pcreate"); /* The compare callback should not have been called on property 3, as there * is no create callback */ - VERIFY(prop3_cb_info.cmp_count, 0, "H5Pequal"); + VERIFY(prop3_cb_info.cmp_count, 0, "H5Pcreate"); /* Verify creation callback information for properties tracked */ VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate"); @@ -1233,7 +1233,7 @@ test_genprop_list_callback(void) VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget"); /* The compare callback should have been called once (to check if the get * callback modified the value) */ - VERIFY(prop1_cb_info.cmp_count, 2, "H5Pequal"); + VERIFY(prop1_cb_info.cmp_count, 2, "H5Pget"); ret = H5Pget(lid1, PROP2_NAME,&prop2_value); CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ @@ -1248,7 +1248,7 @@ test_genprop_list_callback(void) TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__); /* The compare callback should not have been called, as there is no get * callback for this property */ - VERIFY(prop3_cb_info.cmp_count, 0, "H5Pequal"); + VERIFY(prop3_cb_info.cmp_count, 0, "H5Pget"); ret = H5Pget(lid1, PROP4_NAME,&prop4_value); CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ @@ -1278,7 +1278,7 @@ test_genprop_list_callback(void) /* The compare callback should have been called once (to check if the new * value needed to be copied onto the property list) */ - VERIFY(prop1_cb_info.cmp_count, 3, "H5Pequal"); + VERIFY(prop1_cb_info.cmp_count, 3, "H5Pset"); /* Set value of property #3 to different value */ ret = H5Pset(lid1, PROP3_NAME,prop3_new_value); @@ -1286,7 +1286,7 @@ test_genprop_list_callback(void) /* The compare callback should have been called once (to check if the new * value needed to be copied onto the property list) */ - VERIFY(prop3_cb_info.cmp_count, 1, "H5Pequal"); + VERIFY(prop3_cb_info.cmp_count, 1, "H5Pset"); /* Check new value of tracked properties */ ret = H5Pget(lid1, PROP1_NAME,&prop1_value); @@ -1625,6 +1625,7 @@ test_genprop_equal(void) hid_t cid1; /* Generic Property class ID */ hid_t lid1; /* Generic Property list ID */ hid_t lid2; /* Generic Property list ID */ + int prop1_new_value = 20; /* Property #1 new value */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -1651,13 +1652,114 @@ test_genprop_equal(void) CHECK_I(lid2, "H5Pcopy"); /* Check that the lists are equal */ - ret = H5Pequal(lid1,lid2); + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 1, "H5Pequal"); + + /* Set property in first list to another value */ + ret = H5Pset(lid1, PROP1_NAME, &prop1_new_value); + CHECK_I(ret, "H5Pset"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Set property in first list back to default */ + ret = H5Pset(lid1, PROP1_NAME, PROP1_DEF_VALUE); + CHECK_I(ret, "H5Pset"); + + /* Check that the lists are still equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 1, "H5Pequal"); + + /* Insert first temporary property into first list (with no callbacks) */ + ret = H5Pinsert2(lid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL); + CHECK_I(ret, "H5Pinsert2"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Insert first temporary property into second list (with no callbacks) */ + ret = H5Pinsert2(lid2, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL); + CHECK_I(ret, "H5Pinsert2"); + + /* Check that the lists are equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 1, "H5Pequal"); + + /* Insert second temporary property into second list (with no callbacks) */ + ret = H5Pinsert2(lid2, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL); + CHECK_I(ret, "H5Pinsert2"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Insert second temporary property into first list (with no callbacks) */ + ret = H5Pinsert2(lid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL); + CHECK_I(ret, "H5Pinsert2"); + + /* Check that the lists are equal */ + ret = H5Pequal(lid1, lid2); VERIFY(ret, 1, "H5Pequal"); + /* Remove first temporary property from first list */ + ret = H5Premove(lid1, PROP3_NAME); + CHECK_I(ret, "H5Premove"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Remove second temporary property from second list */ + ret = H5Premove(lid2, PROP4_NAME); + CHECK_I(ret, "H5Premove"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Remove first temporary property from second list */ + ret = H5Premove(lid2, PROP3_NAME); + CHECK_I(ret, "H5Premove"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Remove first permanent property from first list */ + ret = H5Premove(lid1, PROP1_NAME); + CHECK_I(ret, "H5Premove"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Remove second temporary property from first list */ + ret = H5Premove(lid1, PROP4_NAME); + CHECK_I(ret, "H5Premove"); + + /* Check that the lists are not equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 0, "H5Pequal"); + + /* Remove first permanent property from second list */ + ret = H5Premove(lid2, PROP1_NAME); + CHECK_I(ret, "H5Premove"); + + /* Check that the lists are equal */ + ret = H5Pequal(lid1, lid2); + VERIFY(ret, 1, "H5Pequal"); + + /* Close property lists */ + ret = H5Pclose(lid1); + CHECK_I(ret, "H5Pclose"); + ret = H5Pclose(lid2); + CHECK_I(ret, "H5Pclose"); + /* Close class */ ret = H5Pclose_class(cid1); CHECK_I(ret, "H5Pclose_class"); - } /* ent test_genprop_equal() */ /**************************************************************** diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index f42af9f..5d594a6 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_TEST_PAR) +#----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) #----------------------------------------------------------------------------- diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 9db1610..311d4be 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -3066,6 +3066,682 @@ actual_io_mode_tests(void) { return; } +/* + * Function: test_no_collective_cause_mode + * + * Purpose: + * tests cases for broken collective I/O and checks that the + * H5Pget_mpio_no_collective_cause properties in the DXPL have the correct values. + * + * Input: + * selection_mode: various mode to cause broken collective I/O + * Note: Originally, each TEST case is supposed to be used alone. + * After some discussion, this is updated to take multiple TEST cases + * with '|'. However there is no error check for any of combined + * test cases, so a tester is responsible to understand and feed + * proper combination of TESTs if needed. + * + * + * TEST_COLLECTIVE: + * Test for regular collective I/O without cause of breaking. + * Just to test normal behavior. + * + * TEST_SET_INDEPENDENT: + * Test for Independent I/O as the cause of breaking collective I/O. + * + * TEST_DATATYPE_CONVERSION: + * Test for Data Type Conversion as the cause of breaking collective I/O. + * + * TEST_DATA_TRANSFORMS: + * Test for Data Transfrom feature as the cause of breaking collective I/O. + * + * TEST_SET_MPIPOSIX: + * Test for MPI Posix as the cause of breaking collective I/O. + * + * TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES: + * Test for NULL dataspace as the cause of breaking collective I/O. + * + * TEST_POINT_SELECTIONS: + * Test for selecting elements of dataspce as the cause of breaking collective I/O. + * + * TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT: + * Test for Compact layout as the cause of breaking collective I/O. + * + * TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL: + * Test for Externl-File storage as the cause of breaking collective I/O. + * + * TEST_FILTERS: + * Test for using filter (checksum) as the cause of breaking collective I/O. + * Note: TEST_FILTERS mode will not work until H5Dcreate and H5write is supported for mpio and filter feature. Use test_no_collective_cause_mode_filter() function instead. + * + * + * Programmer: Jonathan Kim + * Date: Aug, 2012 + */ +#define DSET_NOCOLCAUSE "nocolcause" +#define NELM 2 +#define FILE_EXTERNAL "nocolcause_extern.data" +#undef H5_HAVE_FILTER_FLETCHER32 +static void +test_no_collective_cause_mode(int selection_mode) +{ + uint32_t no_collective_cause_local_write = 0; + uint32_t no_collective_cause_local_read = 0; + uint32_t no_collective_cause_local_expected = 0; + uint32_t no_collective_cause_global_write = 0; + uint32_t no_collective_cause_global_read = 0; + uint32_t no_collective_cause_global_expected = 0; + hsize_t coord[NELM][RANK]; + + const char * filename; + const char * test_name; + hbool_t is_chunked=1; + hbool_t is_independent=0; + int mpi_size = -1; + int mpi_rank = -1; + int length; + int * buffer; + int i; + MPI_Comm mpi_comm = MPI_COMM_NULL; + MPI_Info mpi_info = MPI_INFO_NULL; + hid_t fid = -1; + hid_t sid = -1; + hid_t dataset = -1; + hid_t data_type = H5T_NATIVE_INT; + hid_t fapl = -1; + hid_t dcpl = -1; + hid_t dxpl_write = -1; + hid_t dxpl_read = -1; + hsize_t dims[RANK]; + hid_t mem_space = -1; + hid_t file_space = -1; + hsize_t chunk_dims[RANK]; + hbool_t use_gpfs = FALSE; + herr_t ret; +#ifdef H5_HAVE_FILTER_FLETCHER32 + H5Z_filter_t filter_info; +#endif + /* set to global value as default */ + int l_facc_type = facc_type; + char message[256]; + + /* Set up MPI parameters */ + MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + + MPI_Barrier(MPI_COMM_WORLD); + + HDassert(mpi_size >= 1); + + mpi_comm = MPI_COMM_WORLD; + mpi_info = MPI_INFO_NULL; + + /* Create the dataset creation plist */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); + VRFY((dcpl >= 0), "dataset creation plist created successfully"); + + if (selection_mode & TEST_SET_MPIPOSIX) { + l_facc_type = FACC_MPIPOSIX; + } + else { + if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT) { + ret = H5Pset_layout (dcpl, H5D_COMPACT); + VRFY((ret >= 0),"set COMPACT layout succeeded"); + is_chunked = 0; + } + + if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL) { + ret = H5Pset_external (dcpl, FILE_EXTERNAL, (off_t) 0, H5F_UNLIMITED); + VRFY((ret >= 0),"set EXTERNAL file layout succeeded"); + is_chunked = 0; + } + +#ifdef H5_HAVE_FILTER_FLETCHER32 + if (selection_mode & TEST_FILTERS) { + ret = H5Zfilter_avail(H5Z_FILTER_FLETCHER32); + VRFY ((ret >=0 ), "Fletcher32 filter is available.\n"); + + ret = H5Zget_filter_info (H5Z_FILTER_FLETCHER32, &filter_info); + VRFY ( ( (filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || (filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) , "Fletcher32 filter encoding and decoding available.\n"); + + ret = H5Pset_fletcher32(dcpl); + VRFY((ret >= 0),"set filter (flecher32) succeeded"); + } +#endif /* H5_HAVE_FILTER_FLETCHER32 */ + } + + if (selection_mode & TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES) { + sid = H5Screate(H5S_NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + is_chunked = 0; + } + else { + /* Create the basic Space */ + dims[0] = dim0; + dims[1] = dim1; + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + } + + + filename = (const char *)GetTestParameters(); + HDassert(filename != NULL); + + /* Setup the file access template */ + fapl = create_faccess_plist(mpi_comm, mpi_info, l_facc_type, use_gpfs); + VRFY((fapl >= 0), "create_faccess_plist() succeeded"); + + /* Create the file */ + fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + + VRFY((fid >= 0), "H5Fcreate succeeded"); + + /* If we are not testing contiguous datasets */ + if(is_chunked) { + /* Set up chunk information. */ + chunk_dims[0] = dims[0]/mpi_size; + chunk_dims[1] = dims[1]; + ret = H5Pset_chunk(dcpl, 2, chunk_dims); + VRFY((ret >= 0),"chunk creation property list succeeded"); + } + + + /* Create the dataset */ + dataset = H5Dcreate2(fid, "nocolcause", data_type, sid, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2() dataset succeeded"); + + + /* + * Set expected causes and some tweaks based on the type of test + */ + if (selection_mode & TEST_DATATYPE_CONVERSION) { + test_name = "Broken Collective I/O - Datatype Conversion"; + no_collective_cause_local_expected |= H5D_MPIO_DATATYPE_CONVERSION; + no_collective_cause_global_expected |= H5D_MPIO_DATATYPE_CONVERSION; + /* set different sign to trigger type conversion */ + data_type = H5T_NATIVE_UINT; + } + + if (selection_mode & TEST_DATA_TRANSFORMS) { + test_name = "Broken Collective I/O - DATA Transfroms"; + no_collective_cause_local_expected |= H5D_MPIO_DATA_TRANSFORMS; + no_collective_cause_global_expected |= H5D_MPIO_DATA_TRANSFORMS; + } + + if (selection_mode & TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES) { + test_name = "Broken Collective I/O - No Simple or Scalar DataSpace"; + no_collective_cause_local_expected |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES; + no_collective_cause_global_expected |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES; + } + + if (selection_mode & TEST_POINT_SELECTIONS ) { + test_name = "Broken Collective I/O - Point Selection"; + no_collective_cause_local_expected |= H5D_MPIO_POINT_SELECTIONS; + no_collective_cause_global_expected |= H5D_MPIO_POINT_SELECTIONS; + } + + if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT || + selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL) { + test_name = "Broken Collective I/O - No CONTI or CHUNKED Dataset"; + no_collective_cause_local_expected |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET; + no_collective_cause_global_expected |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET; + } + +#ifdef H5_HAVE_FILTER_FLETCHER32 + if (selection_mode & TEST_FILTERS) { + test_name = "Broken Collective I/O - Filter is required"; + no_collective_cause_local_expected |= H5D_MPIO_FILTERS; + no_collective_cause_global_expected |= H5D_MPIO_FILTERS; + } +#endif /* H5_HAVE_FILTER_FLETCHER32 */ + + if (selection_mode & TEST_SET_MPIPOSIX) { + test_name = "Broken Collective I/O - MPIO POSIX"; + no_collective_cause_local_expected |= H5D_MPIO_SET_MPIPOSIX; + no_collective_cause_global_expected |= H5D_MPIO_SET_MPIPOSIX; + } + + if (selection_mode & TEST_COLLECTIVE) { + test_name = "Broken Collective I/O - Not Broken"; + no_collective_cause_local_expected = H5D_MPIO_COLLECTIVE; + no_collective_cause_global_expected = H5D_MPIO_COLLECTIVE; + } + + if (selection_mode & TEST_SET_INDEPENDENT) { + test_name = "Broken Collective I/O - Independent"; + no_collective_cause_local_expected = H5D_MPIO_SET_INDEPENDENT; + no_collective_cause_global_expected = H5D_MPIO_SET_INDEPENDENT; + /* switch to independent io */ + is_independent = 1; + } + + /* Add MPIPOSIX cause to expected cause if MPI_POSIX driver is in use '-p'. + * Exception to the independent cause.*/ + if (facc_type == FACC_MPIPOSIX && !(selection_mode & TEST_SET_INDEPENDENT)) { + no_collective_cause_local_expected |= H5D_MPIO_SET_MPIPOSIX; + no_collective_cause_global_expected |= H5D_MPIO_SET_MPIPOSIX; + } + + /* use all spaces for certain tests */ + if (selection_mode & TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES || + selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL) { + file_space = H5S_ALL; + mem_space = H5S_ALL; + } + else { + /* Get the file dataspace */ + file_space = H5Dget_space(dataset); + VRFY((file_space >= 0), "H5Dget_space succeeded"); + + /* Create the memory dataspace */ + mem_space = H5Screate_simple (RANK, dims, NULL); + VRFY((mem_space >= 0), "mem_space created"); + } + + if (selection_mode & TEST_POINT_SELECTIONS) { + coord[0][0] = 0; coord[0][1] = 0; + coord[1][0] = 1; coord[1][1] = 1; + ret = H5Sselect_elements (file_space, H5S_SELECT_SET, NELM, (const hsize_t *)coord); + VRFY((ret >= 0), "H5Sselect_elements succeeded"); + + ret = H5Sselect_elements (mem_space, H5S_SELECT_SET, NELM, (const hsize_t *)coord); + VRFY((ret >= 0), "H5Sselect_elements succeeded"); + } + + + /* Get the number of elements in the selection */ + length = dim0 * dim1; + + /* Allocate and initialize the buffer */ + buffer = (int *)HDmalloc(sizeof(int) * length); + VRFY((buffer != NULL), "malloc of buffer succeeded"); + for(i = 0; i < length; i++) + buffer[i] = i; + + /* Set up the dxpl for the write */ + dxpl_write = H5Pcreate(H5P_DATASET_XFER); + VRFY((dxpl_write >= 0), "H5Pcreate(H5P_DATASET_XFER) succeeded"); + + if(is_independent) { + /* Set Independent I/O */ + ret = H5Pset_dxpl_mpio(dxpl_write, H5FD_MPIO_INDEPENDENT); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + } + else { + /* Set Collective I/O */ + ret = H5Pset_dxpl_mpio(dxpl_write, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + + } + + if (selection_mode & TEST_DATA_TRANSFORMS) { + ret = H5Pset_data_transform (dxpl_write, "x+1"); + VRFY((ret >= 0), "H5Pset_data_transform succeeded"); + } + + /*--------------------- + * Test Write access + *---------------------*/ + + /* Write */ + ret = H5Dwrite(dataset, data_type, mem_space, file_space, dxpl_write, buffer); + if(ret < 0) H5Eprint2(H5E_DEFAULT, stdout); + VRFY((ret >= 0), "H5Dwrite() dataset multichunk write succeeded"); + + + /* Get the cause of broken collective I/O */ + ret = H5Pget_mpio_no_collective_cause (dxpl_write, &no_collective_cause_local_write, &no_collective_cause_global_write); + VRFY((ret >= 0), "retriving no collective cause succeeded" ); + + + /*--------------------- + * Test Read access + *---------------------*/ + + /* Make a copy of the dxpl to test the read operation */ + dxpl_read = H5Pcopy(dxpl_write); + VRFY((dxpl_read >= 0), "H5Pcopy succeeded"); + + /* Read */ + ret = H5Dread(dataset, data_type, mem_space, file_space, dxpl_read, buffer); + + if(ret < 0) H5Eprint2(H5E_DEFAULT, stdout); + VRFY((ret >= 0), "H5Dread() dataset multichunk read succeeded"); + + /* Get the cause of broken collective I/O */ + ret = H5Pget_mpio_no_collective_cause (dxpl_read, &no_collective_cause_local_read, &no_collective_cause_global_read); + VRFY((ret >= 0), "retriving no collective cause succeeded" ); + + /* Check write vs read */ + VRFY((no_collective_cause_local_read == no_collective_cause_local_write), + "reading and writing are the same for local cause of Broken Collective I/O"); + VRFY((no_collective_cause_global_read == no_collective_cause_global_write), + "reading and writing are the same for global cause of Broken Collective I/O"); + + /* Test values */ + memset (message, 0, sizeof (message)); + sprintf(message, "Local cause of Broken Collective I/O has the correct value for %s.\n",test_name); + VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message); + memset (message, 0, sizeof (message)); + sprintf(message, "Global cause of Broken Collective I/O has the correct value for %s.\n",test_name); + VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message); + + /* Release some resources */ + if (sid) + H5Sclose(sid); + if (fapl) + H5Pclose(fapl); + if (dcpl) + H5Pclose(dcpl); + if (dxpl_write) + H5Pclose(dxpl_write); + if (dxpl_read) + H5Pclose(dxpl_read); + if (dataset) + H5Dclose(dataset); + if (mem_space) + H5Sclose(mem_space); + if (file_space) + H5Sclose(file_space); + if (fid) + H5Fclose(fid); + HDfree(buffer); + + /* clean up external file */ + if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL) + HDremove(FILE_EXTERNAL); + + return; +} + + +/* + * Function: test_no_collective_cause_mode_filter + * + * Purpose: + * Test specific for using filter as a caus of broken collective I/O and + * checks that the H5Pget_mpio_no_collective_cause properties in the DXPL + * have the correct values. + * + * NOTE: + * This is a temprary function. + * test_no_collective_cause_mode(TEST_FILTERS) will replace this when + * H5Dcreate and H5write support for mpio and filter feature. + * + * Input: + * TEST_FILTERS_READ: + * Test for using filter (checksum) as the cause of breaking collective I/O. + * + * Programmer: Jonathan Kim + * Date: Aug, 2012 + */ +static void +test_no_collective_cause_mode_filter(int selection_mode) +{ + uint32_t no_collective_cause_local_read = 0; + uint32_t no_collective_cause_local_expected = 0; + uint32_t no_collective_cause_global_read = 0; + uint32_t no_collective_cause_global_expected = 0; + + const char * filename; + const char * test_name; + hbool_t is_chunked=1; + int mpi_size = -1; + int mpi_rank = -1; + int length; + int * buffer; + int i; + MPI_Comm mpi_comm = MPI_COMM_NULL; + MPI_Info mpi_info = MPI_INFO_NULL; + hid_t fid = -1; + hid_t sid = -1; + hid_t dataset = -1; + hid_t data_type = H5T_NATIVE_INT; + hid_t fapl_write = -1; + hid_t fapl_read = -1; + hid_t dcpl = -1; + hid_t dxpl = -1; + hsize_t dims[RANK]; + hid_t mem_space = -1; + hid_t file_space = -1; + hsize_t chunk_dims[RANK]; + hbool_t use_gpfs = FALSE; + herr_t ret; +#ifdef H5_HAVE_FILTER_FLETCHER32 + H5Z_filter_t filter_info; +#endif + char message[256]; + + /* Set up MPI parameters */ + MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + + MPI_Barrier(MPI_COMM_WORLD); + + HDassert(mpi_size >= 1); + + mpi_comm = MPI_COMM_WORLD; + mpi_info = MPI_INFO_NULL; + + /* Create the dataset creation plist */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); + VRFY((dcpl >= 0), "dataset creation plist created successfully"); + + if (selection_mode == TEST_FILTERS_READ ) { +#ifdef H5_HAVE_FILTER_FLETCHER32 + ret = H5Zfilter_avail(H5Z_FILTER_FLETCHER32); + VRFY ((ret >=0 ), "Fletcher32 filter is available.\n"); + + ret = H5Zget_filter_info (H5Z_FILTER_FLETCHER32, (unsigned int *) &filter_info); + VRFY ( ( (filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || (filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) , "Fletcher32 filter encoding and decoding available.\n"); + + ret = H5Pset_fletcher32(dcpl); + VRFY((ret >= 0),"set filter (flecher32) succeeded"); +#endif /* H5_HAVE_FILTER_FLETCHER32 */ + } + else { + VRFY(0, "Unexpected mode, only test for TEST_FILTERS_READ."); + } + + /* Create the basic Space */ + dims[0] = dim0; + dims[1] = dim1; + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + + + filename = (const char *)GetTestParameters(); + HDassert(filename != NULL); + + /* Setup the file access template */ + fapl_write = create_faccess_plist(mpi_comm, mpi_info, FACC_DEFAULT, use_gpfs); + VRFY((fapl_write >= 0), "create_faccess_plist() succeeded"); + + fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_write); + VRFY((fid >= 0), "H5Fcreate succeeded"); + + /* If we are not testing contiguous datasets */ + if(is_chunked) { + /* Set up chunk information. */ + chunk_dims[0] = dims[0]/mpi_size; + chunk_dims[1] = dims[1]; + ret = H5Pset_chunk(dcpl, 2, chunk_dims); + VRFY((ret >= 0),"chunk creation property list succeeded"); + } + + + /* Create the dataset */ + dataset = H5Dcreate2(fid, DSET_NOCOLCAUSE, data_type, sid, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2() dataset succeeded"); + +#ifdef H5_HAVE_FILTER_FLETCHER32 + /* Set expected cause */ + test_name = "Broken Collective I/O - Filter is required"; + no_collective_cause_local_expected = H5D_MPIO_FILTERS; + no_collective_cause_global_expected = H5D_MPIO_FILTERS; +#endif + + /* Ignore above expected cause and reset cause to MPIPOSIX if + * the MPI_POSIX driver is in use.*/ + if (facc_type == FACC_MPIPOSIX) { + no_collective_cause_local_expected = H5D_MPIO_SET_MPIPOSIX; + no_collective_cause_global_expected = H5D_MPIO_SET_MPIPOSIX; + } + + /* Get the file dataspace */ + file_space = H5Dget_space(dataset); + VRFY((file_space >= 0), "H5Dget_space succeeded"); + + /* Create the memory dataspace */ + mem_space = H5Screate_simple (RANK, dims, NULL); + VRFY((mem_space >= 0), "mem_space created"); + + /* Get the number of elements in the selection */ + length = dim0 * dim1; + + /* Allocate and initialize the buffer */ + buffer = (int *)HDmalloc(sizeof(int) * length); + VRFY((buffer != NULL), "malloc of buffer succeeded"); + for(i = 0; i < length; i++) + buffer[i] = i; + + /* Set up the dxpl for the write */ + dxpl = H5Pcreate(H5P_DATASET_XFER); + VRFY((dxpl >= 0), "H5Pcreate(H5P_DATASET_XFER) succeeded"); + + if (selection_mode == TEST_FILTERS_READ) { + /* To test read in collective I/O mode , write in independent mode + * because write fails with mpio + filter */ + ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_INDEPENDENT); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + } + else { + /* To test write in collective I/O mode. */ + ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + } + + + /* Write */ + ret = H5Dwrite(dataset, data_type, mem_space, file_space, dxpl, buffer); + + if(ret < 0) H5Eprint2(H5E_DEFAULT, stdout); + VRFY((ret >= 0), "H5Dwrite() dataset multichunk write succeeded"); + + + /* Make a copy of the dxpl to test the read operation */ + dxpl = H5Pcopy(dxpl); + VRFY((dxpl >= 0), "H5Pcopy succeeded"); + + if (dataset) + H5Dclose(dataset); + if (fapl_write) + H5Pclose(fapl_write); + if (fid) + H5Fclose(fid); + + + /*--------------------- + * Test Read access + *---------------------*/ + + /* Setup the file access template */ + fapl_read = create_faccess_plist(mpi_comm, mpi_info, facc_type, use_gpfs); + VRFY((fapl_read >= 0), "create_faccess_plist() succeeded"); + + fid = H5Fopen (filename, H5F_ACC_RDONLY, fapl_read); + dataset = H5Dopen (fid, DSET_NOCOLCAUSE, H5P_DEFAULT); + + /* Set collective I/O properties in the dxpl. */ + ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + + /* Read */ + ret = H5Dread(dataset, data_type, mem_space, file_space, dxpl, buffer); + + if(ret < 0) H5Eprint2(H5E_DEFAULT, stdout); + VRFY((ret >= 0), "H5Dread() dataset multichunk read succeeded"); + + /* Get the cause of broken collective I/O */ + ret = H5Pget_mpio_no_collective_cause (dxpl, &no_collective_cause_local_read, &no_collective_cause_global_read); + VRFY((ret >= 0), "retriving no collective cause succeeded" ); + + /* Test values */ + memset (message, 0, sizeof (message)); + sprintf(message, "Local cause of Broken Collective I/O has the correct value for %s.\n",test_name); + VRFY((no_collective_cause_local_read == (uint32_t)no_collective_cause_local_expected), message); + memset (message, 0, sizeof (message)); + sprintf(message, "Global cause of Broken Collective I/O has the correct value for %s.\n",test_name); + VRFY((no_collective_cause_global_read == (uint32_t)no_collective_cause_global_expected), message); + + /* Release some resources */ + if (sid) + H5Sclose(sid); + if (fapl_read) + H5Pclose(fapl_read); + if (dcpl) + H5Pclose(dcpl); + if (dxpl) + H5Pclose(dxpl); + if (dataset) + H5Dclose(dataset); + if (mem_space) + H5Sclose(mem_space); + if (file_space) + H5Sclose(file_space); + if (fid) + H5Fclose(fid); + HDfree(buffer); + return; +} + +/* Function: no_collective_cause_tests + * + * Purpose: Tests cases for broken collective IO. + * + * Programmer: Jonathan Kim + * Date: Aug, 2012 + */ +void +no_collective_cause_tests(void) +{ + int mpi_size = -1; + int mpi_rank = -1; + MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); + MPI_Comm_size(MPI_COMM_WORLD, &mpi_rank); + + /* + * Test individual cause + */ + test_no_collective_cause_mode (TEST_COLLECTIVE); + test_no_collective_cause_mode (TEST_SET_INDEPENDENT); + test_no_collective_cause_mode (TEST_DATATYPE_CONVERSION); + test_no_collective_cause_mode (TEST_DATA_TRANSFORMS); + test_no_collective_cause_mode (TEST_SET_MPIPOSIX); + test_no_collective_cause_mode (TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES); + test_no_collective_cause_mode (TEST_POINT_SELECTIONS); + test_no_collective_cause_mode (TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT); + test_no_collective_cause_mode (TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL); +#ifdef H5_HAVE_FILTER_FLETCHER32 + /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and + * H5Dwrite is ready for mpio + filter feature. + */ + /* test_no_collective_cause_mode (TEST_FILTERS); */ + test_no_collective_cause_mode_filter (TEST_FILTERS_READ); +#endif + + /* + * Test combined causes + */ + test_no_collective_cause_mode (TEST_SET_MPIPOSIX | TEST_DATATYPE_CONVERSION); + test_no_collective_cause_mode (TEST_DATATYPE_CONVERSION | TEST_DATA_TRANSFORMS); + test_no_collective_cause_mode (TEST_DATATYPE_CONVERSION | TEST_DATA_TRANSFORMS | TEST_POINT_SELECTIONS); + + return; +} + /* * Test consistency semantics of atomic mode */ diff --git a/testpar/testpar.h b/testpar/testpar.h index ce11204..2c99103 100644 --- a/testpar/testpar.h +++ b/testpar/testpar.h @@ -18,6 +18,9 @@ #ifndef TESTPAR_H #define TESTPAR_H +/* Indicate that these are parallel tests, for the testing framework */ +#define H5_PARALLEL_TEST + #include "h5test.h" /* Constants definitions */ diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 2837e71..a4df46e 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -506,6 +506,10 @@ int main(int argc, char **argv) "test actual io mode proprerty", PARATESTFILE); + AddTest("nocolcause", no_collective_cause_tests, NULL, + "test cause for broken collective io", + PARATESTFILE); + if((mpi_size < 2) && MAINPROCESS) { printf("File Image Ops daisy chain test needs at least 2 processes.\n"); printf("File Image Ops daisy chain test will be skipped \n"); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index da11c62..29ad411 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -175,6 +175,21 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD, #define TEST_ACTUAL_IO_LINK_CHUNK 9 #define TEST_ACTUAL_IO_CONTIGUOUS 10 +/* Definitions of the selection mode for the no_collective_cause_tests function. */ +#define TEST_COLLECTIVE 0x001 +#define TEST_SET_INDEPENDENT 0x002 +#define TEST_DATATYPE_CONVERSION 0x004 +#define TEST_DATA_TRANSFORMS 0x008 +#define TEST_SET_MPIPOSIX 0x010 +#define TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES 0x020 +#define TEST_POINT_SELECTIONS 0x040 +#define TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT 0x080 +#define TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL 0x100 +#define TEST_FILTERS 0x200 +/* TEST_FILTERS will take place of this after supporting mpio + filter for + * H5Dcreate and H5Dwrite */ +#define TEST_FILTERS_READ 0x400 + /* Don't erase these lines, they are put here for debugging purposes */ /* #define MSPACE1_RANK 1 @@ -239,6 +254,7 @@ void extend_readInd(void); void extend_readAll(void); void none_selection_chunk(void); void actual_io_mode_tests(void); +void no_collective_cause_tests(void); void test_chunk_alloc(void); void test_filter_read(void); void compact_dataset(void); diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 6cdfcac..b48a1b9 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_TOOLS) #----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + +#----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib) diff --git a/tools/h5diff/testfiles/h5diff_220.txt b/tools/h5diff/testfiles/h5diff_220.txt index cadbb6d..0092fc1 100644 --- a/tools/h5diff/testfiles/h5diff_220.txt +++ b/tools/h5diff/testfiles/h5diff_220.txt @@ -1,8 +1,6 @@ Not comparable: is of class H5T_INTEGER and is of class H5T_STRING attribute: > and > 3 differences found -dataset: and -3 differences found dataset: and 3 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_221.txt b/tools/h5diff/testfiles/h5diff_221.txt index 621f5c3..5f10860 100644 --- a/tools/h5diff/testfiles/h5diff_221.txt +++ b/tools/h5diff/testfiles/h5diff_221.txt @@ -1,3 +1,5 @@ +dataset: and +3 differences found Not comparable: is of class H5T_INTEGER and is of class H5T_STRING Not comparable: has rank 1, dimensions [3], max dimensions [3] and has rank 1, dimensions [4], max dimensions [4] @@ -5,8 +7,6 @@ Not comparable: has rank 1, dimensions [3], max dimensions [3] and has rank 2, dimensions [3x1], max dimensions [3x1] attribute: > and > 3 differences found -dataset: and -6 differences found dataset: and 3 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_222.txt b/tools/h5diff/testfiles/h5diff_222.txt index 53c9464..77447da 100644 --- a/tools/h5diff/testfiles/h5diff_222.txt +++ b/tools/h5diff/testfiles/h5diff_222.txt @@ -4,10 +4,10 @@ Not comparable: is of type H5G_TYPE and is of class H5T_INTEGER and is of class H5T_STRING attribute: > and > 3 differences found -dataset: and -3 differences found dataset: and 3 differences found +dataset: and +3 differences found Not comparable: is of class H5T_INTEGER and is of class H5T_STRING Not comparable: has rank 1, dimensions [3], max dimensions [3] and has rank 1, dimensions [4], max dimensions [4] @@ -15,8 +15,6 @@ Not comparable: has rank 1, dimensions [3], max dimensions [3] and has rank 2, dimensions [3x1], max dimensions [3x1] attribute: > and > 3 differences found -dataset: and -6 differences found dataset: and 3 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_59.txt b/tools/h5diff/testfiles/h5diff_59.txt index aeefa3a..996a7b2 100644 --- a/tools/h5diff/testfiles/h5diff_59.txt +++ b/tools/h5diff/testfiles/h5diff_59.txt @@ -2,10 +2,10 @@ dataset: and Warning: different storage datatype has file datatype H5T_STD_U16LE has file datatype H5T_STD_U32LE +0 differences found Warning: different storage datatype has file datatype H5T_STD_U16LE has file datatype H5T_STD_U32LE attribute: > and > 0 differences found -0 differences found EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_70.txt b/tools/h5diff/testfiles/h5diff_70.txt index 47b057c..0a6b0c0 100644 --- a/tools/h5diff/testfiles/h5diff_70.txt +++ b/tools/h5diff/testfiles/h5diff_70.txt @@ -678,6 +678,7 @@ position vlen3D of vlen3D of difference 59 differences found dataset: and Not comparable: or is an empty dataset +0 differences found attribute: > and > size: [2] [2] position VLstring of VLstring of difference @@ -1353,7 +1354,6 @@ position vlen3D of vlen3D of difference [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 59 differences found -519 differences found group : and 0 differences found attribute: > and > diff --git a/tools/h5diff/testfiles/h5diff_700.txt b/tools/h5diff/testfiles/h5diff_700.txt index 00c5b07..1cf71dd 100644 --- a/tools/h5diff/testfiles/h5diff_700.txt +++ b/tools/h5diff/testfiles/h5diff_700.txt @@ -681,6 +681,7 @@ position vlen3D of vlen3D of difference dataset: and Not comparable: or is an empty dataset +0 differences found Attributes status: 33 common, 0 only in obj1, 0 only in obj2 attribute: > and > size: [2] [2] @@ -1357,7 +1358,6 @@ position vlen3D of vlen3D of difference [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 59 differences found -519 differences found group : and 0 differences found diff --git a/tools/h5diff/testfiles/h5diff_701.txt b/tools/h5diff/testfiles/h5diff_701.txt index a4b436f..405ab2f 100644 --- a/tools/h5diff/testfiles/h5diff_701.txt +++ b/tools/h5diff/testfiles/h5diff_701.txt @@ -713,6 +713,7 @@ position vlen3D of vlen3D of difference dataset: and Not comparable: or is an empty dataset +0 differences found obj1 obj2 -------------------------------------- x x VLstring @@ -1424,7 +1425,6 @@ position vlen3D of vlen3D of difference [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 59 differences found -519 differences found group : and 0 differences found diff --git a/tools/h5diff/testfiles/h5diff_702.txt b/tools/h5diff/testfiles/h5diff_702.txt index 00c5b07..1cf71dd 100644 --- a/tools/h5diff/testfiles/h5diff_702.txt +++ b/tools/h5diff/testfiles/h5diff_702.txt @@ -681,6 +681,7 @@ position vlen3D of vlen3D of difference dataset: and Not comparable: or is an empty dataset +0 differences found Attributes status: 33 common, 0 only in obj1, 0 only in obj2 attribute: > and > size: [2] [2] @@ -1357,7 +1358,6 @@ position vlen3D of vlen3D of difference [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 59 differences found -519 differences found group : and 0 differences found diff --git a/tools/h5diff/testfiles/h5diff_703.txt b/tools/h5diff/testfiles/h5diff_703.txt index a4b436f..405ab2f 100644 --- a/tools/h5diff/testfiles/h5diff_703.txt +++ b/tools/h5diff/testfiles/h5diff_703.txt @@ -713,6 +713,7 @@ position vlen3D of vlen3D of difference dataset: and Not comparable: or is an empty dataset +0 differences found obj1 obj2 -------------------------------------- x x VLstring @@ -1424,7 +1425,6 @@ position vlen3D of vlen3D of difference [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 59 differences found -519 differences found group : and 0 differences found diff --git a/tools/h5diff/testfiles/h5diff_705.txt b/tools/h5diff/testfiles/h5diff_705.txt index 1609189..2e52f18 100644 --- a/tools/h5diff/testfiles/h5diff_705.txt +++ b/tools/h5diff/testfiles/h5diff_705.txt @@ -1,5 +1,6 @@ dataset: and +0 differences found obj1 obj2 -------------------------------------- x float2 @@ -13,5 +14,4 @@ position integer1 of integer1 of difference [ 0 ] 1 2 1 [ 1 ] 2 3 1 2 differences found -2 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_710.txt b/tools/h5diff/testfiles/h5diff_710.txt index 862c062..10a8501 100644 --- a/tools/h5diff/testfiles/h5diff_710.txt +++ b/tools/h5diff/testfiles/h5diff_710.txt @@ -17,6 +17,7 @@ group : and Attributes status: 0 common, 0 only in obj1, 0 only in obj2 dataset: and +0 differences found obj1 obj2 -------------------------------------- x float2 @@ -30,7 +31,6 @@ position integer1 of integer1 of difference [ 0 ] 1 2 1 [ 1 ] 2 3 1 2 differences found -2 differences found group : and 0 differences found diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 16e3b53..8bd684e 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -158,6 +158,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tscaleoffset.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl @@ -259,6 +261,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5 @@ -1015,6 +1019,10 @@ IF (BUILD_TESTING) treference.out.err tsaf.out tsaf.out.err + tscalarintsize.out + tscalarintsize.out.err + tscalarattrintsize.out + tscalarattrintsize.out.err tscaleoffset.out tscaleoffset.out.err tshuffle.out @@ -1078,10 +1086,14 @@ IF (BUILD_TESTING) ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) # test for compound signed/unsigned datasets ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5) + # test for signed/unsigned scalar datasets + ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5) # test for signed/unsigned attributes ADD_H5_TEST (tattrintsize 0 --enable-error-stack tattrintsize.h5) # test for compound signed/unsigned attributes ADD_H5_TEST (tcmpdattrintsize 0 --enable-error-stack tcmpdattrintsize.h5) + # test for signed/unsigned scalar attributes + ADD_H5_TEST (tscalarattrintsize 0 --enable-error-stack tscalarattrintsize.h5) # test for displaying groups ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5) # test for displaying the selected groups diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index b8ea020..28fb4a4 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -103,6 +103,8 @@ #define FILE70 "tcmpdintsize.h5" #define FILE71 "tcmpdattrintsize.h5" #define FILE72 "tnestedcmpddt.h5" +#define FILE73 "tscalarintsize.h5" +#define FILE74 "tscalarattrintsize.h5" /*------------------------------------------------------------------------- * prototypes @@ -312,6 +314,23 @@ typedef struct s1_t { /* Name of dataset to create in datafile */ #define F71_DATASETNAME "CompoundAttrIntSize" +/* "FILE73" macros and for FILE69 */ +#define F73_ARRAY_RANK 2 +#define F73_XDIM 8 +#define F73_DATASETU08 "DU08BITS" +#define F73_DATASETS08 "DS08BITS" +#define F73_YDIM8 8 +#define F73_DATASETU16 "DU16BITS" +#define F73_DATASETS16 "DS16BITS" +#define F73_YDIM16 16 +#define F73_DATASETU32 "DU32BITS" +#define F73_DATASETS32 "DS32BITS" +#define F73_YDIM32 32 +#define F73_DATASETU64 "DU64BITS" +#define F73_DATASETS64 "DS64BITS" +#define F73_YDIM64 64 +#define F73_DUMMYDBL "DummyDBL" + static void gent_group(void) { @@ -8189,6 +8208,404 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ } /*------------------------------------------------------------------------- + * Function: gent_intscalars + * + * Purpose: Generate a file to be used in the h5dump tests. + * Four datasets of 1, 2, 4 and 8 bytes of unsigned int types are created. + * Four more datasets of 1, 2, 4 and 8 bytes of signed int types are created. + * Fill them with raw data such that no bit will be all zero in a dataset. + * A dummy dataset of double type is created for failure test. + *------------------------------------------------------------------------- + */ +static void +gent_intscalars(void) +{ + hid_t fid, dataset, space, tid; + hsize_t dims[2]; + uint8_t dsetu8[F73_XDIM][F73_YDIM8], valu8bits; + uint16_t dsetu16[F73_XDIM][F73_YDIM16], valu16bits; + uint32_t dsetu32[F73_XDIM][F73_YDIM32], valu32bits; + uint64_t dsetu64[F73_XDIM][F73_YDIM64], valu64bits; + int8_t dset8[F73_XDIM][F73_YDIM8], val8bits; + int16_t dset16[F73_XDIM][F73_YDIM16], val16bits; + int32_t dset32[F73_XDIM][F73_YDIM32], val32bits; + int64_t dset64[F73_XDIM][F73_YDIM64], val64bits; + double dsetdbl[F73_XDIM][F73_YDIM8]; + unsigned int i, j; + + fid = H5Fcreate(FILE73, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Dataset of 8 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM8; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U8LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETU08, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + valu8bits = (uint8_t) ~0u; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu8[i][0] = valu8bits; + for(j = 1; j < dims[1]; j++) { + dsetu8[i][j] = dsetu8[i][j-1] << 1; + } + valu8bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 16 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM16; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U16LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETU16, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + valu16bits = (uint16_t) ~0u; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu16[i][0] = valu16bits; + for(j = 1; j < dims[1]; j++) { + dsetu16[i][j] = dsetu16[i][j-1] << 1; + } + valu16bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 32 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM32; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U32LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETU32, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + valu32bits = (uint32_t) ~0u; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu32[i][0] = valu32bits; + for(j = 1; j < dims[1]; j++) { + dsetu32[i][j] = dsetu32[i][j-1] << 1; + } + valu32bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 64 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM64; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U64LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETU64, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu64[i][0] = valu64bits; + for(j = 1; j < dims[1]; j++) { + dsetu64[i][j] = dsetu64[i][j-1] << 1; + } + valu64bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 8 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM8; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I8LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETS08, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val8bits = (int8_t) ~0; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset8[i][0] = val8bits; + for(j = 1; j < dims[1]; j++) { + dset8[i][j] = dset8[i][j-1] << 1; + } + val8bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 16 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM16; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I16LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETS16, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val16bits = (int16_t) ~0; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset16[i][0] = val16bits; + for(j = 1; j < dims[1]; j++) { + dset16[i][j] = dset16[i][j-1] << 1; + } + val16bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 32 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM32; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I32LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETS32, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val32bits = (int32_t) ~0; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset32[i][0] = val32bits; + for(j = 1; j < dims[1]; j++) { + dset32[i][j] = dset32[i][j-1] << 1; + } + val32bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 64 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM64; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I64LE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DATASETS64, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val64bits = (int64_t) ~0L; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset64[i][0] = val64bits; + for(j = 1; j < dims[1]; j++) { + dset64[i][j] = dset64[i][j-1] << 1; + } + val64bits <<= 1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64); + H5Sclose(space); + H5Dclose(dataset); + + /* Double Dummy set for failure tests */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM8; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_IEEE_F64BE, F73_ARRAY_RANK, dims); + dataset = H5Dcreate2(fid, F73_DUMMYDBL, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0; i < dims[0]; i++) + for(j = 0; j < dims[1]; j++) + dsetdbl[i][j] = 0.0001 * j + i; + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl); + + H5Sclose(space); + H5Dclose(dataset); + H5Fclose(fid); +} + +/*------------------------------------------------------------------------- + * Function: gent_attr_packedbits + * + * Purpose: Generate a file to be used in the h5dump packed bits tests. + * Four attributes of 1, 2, 4 and 8 bytes of unsigned int types are created. + * Four more datasets of 1, 2, 4 and 8 bytes of signed int types are created. + * Fill them with raw data such that no bit will be all zero in a dataset. + * A dummy dataset of double type is created for failure test. + * Use file to test Signed/Unsigned datatypes and keep in sync with gent_packedbits() + *------------------------------------------------------------------------- + */ +static void +gent_attr_intscalars(void) +{ + hid_t fid, attr, space, root, tid; + hsize_t dims[2]; + uint8_t dsetu8[F73_XDIM][F73_YDIM8], valu8bits; + uint16_t dsetu16[F73_XDIM][F73_YDIM16], valu16bits; + uint32_t dsetu32[F73_XDIM][F73_YDIM32], valu32bits; + uint64_t dsetu64[F73_XDIM][F73_YDIM64], valu64bits; + int8_t dset8[F73_XDIM][F73_YDIM8], val8bits; + int16_t dset16[F73_XDIM][F73_YDIM16], val16bits; + int32_t dset32[F73_XDIM][F73_YDIM32], val32bits; + int64_t dset64[F73_XDIM][F73_YDIM64], val64bits; + double dsetdbl[F73_XDIM][F73_YDIM8]; + unsigned int i, j; + + fid = H5Fcreate(FILE74, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + root = H5Gopen2(fid, "/", H5P_DEFAULT); + + /* Attribute of 8 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM8; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U8LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETU08, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + valu8bits = (uint8_t) ~0u; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu8[i][0] = valu8bits; + for(j = 1; j < dims[1]; j++) { + dsetu8[i][j] = dsetu8[i][j-1] << 1; + } + valu8bits <<= 1; + } + + H5Awrite(attr, tid, dsetu8); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 16 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM16; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U16LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETU16, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + valu16bits = (uint16_t) ~0u; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu16[i][0] = valu16bits; + for(j = 1; j < dims[1]; j++) { + dsetu16[i][j] = dsetu16[i][j-1] << 1; + } + valu16bits <<= 1; + } + + H5Awrite(attr, tid, dsetu16); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 32 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM32; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U32LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETU32, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + valu32bits = (uint32_t) ~0u; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu32[i][0] = valu32bits; + for(j = 1; j < dims[1]; j++) { + dsetu32[i][j] = dsetu32[i][j-1] << 1; + } + valu32bits <<= 1; + } + + H5Awrite(attr, tid, dsetu32); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 64 bits unsigned int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM64; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_U64LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETU64, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dsetu64[i][0] = valu64bits; + for(j = 1; j < dims[1]; j++) { + dsetu64[i][j] = dsetu64[i][j-1] << 1; + } + valu64bits <<= 1; + } + + H5Awrite(attr, tid, dsetu64); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 8 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM8; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I8LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETS08, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + val8bits = (int8_t) ~0; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset8[i][0] = val8bits; + for(j = 1; j < dims[1]; j++) { + dset8[i][j] = dset8[i][j-1] << 1; + } + val8bits <<= 1; + } + + H5Awrite(attr, tid, dset8); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 16 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM16; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I16LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETS16, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + val16bits = (int16_t) ~0; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset16[i][0] = val16bits; + for(j = 1; j < dims[1]; j++) { + dset16[i][j] = dset16[i][j-1] << 1; + } + val16bits <<= 1; + } + + H5Awrite(attr, tid, dset16); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 32 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM32; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I32LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETS32, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + val32bits = (int32_t) ~0; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset32[i][0] = val32bits; + for(j = 1; j < dims[1]; j++) { + dset32[i][j] = dset32[i][j-1] << 1; + } + val32bits <<= 1; + } + + H5Awrite(attr, tid, dset32); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 64 bits signed int */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM64; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_STD_I64LE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DATASETS64, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + val64bits = (int64_t) ~0L; /* all 1s */ + for(i = 0; i < dims[0]; i++){ + dset64[i][0] = val64bits; + for(j = 1; j < dims[1]; j++) { + dset64[i][j] = dset64[i][j-1] << 1; + } + val64bits <<= 1; + } + + H5Awrite(attr, tid, dset64); + H5Sclose(space); + H5Aclose(attr); + + /* Double Dummy set for failure tests */ + dims[0] = F73_XDIM; dims[1] = F73_YDIM8; + space = H5Screate(H5S_SCALAR); + tid = H5Tarray_create2(H5T_IEEE_F64BE, F73_ARRAY_RANK, dims); + attr = H5Acreate2(root, F73_DUMMYDBL, tid, space, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0; i < dims[0]; i++) + for(j = 0; j < dims[1]; j++) + dsetdbl[i][j] = 0.0001 * j + i; + + H5Awrite(attr, tid, dsetdbl); + + H5Sclose(space); + H5Aclose(attr); + + H5Gclose(root); + H5Fclose(fid); +} + +/*------------------------------------------------------------------------- * Function: main * *------------------------------------------------------------------------- @@ -8271,6 +8688,8 @@ int main(void) gent_compound_attr_intsizes(); gent_nested_compound_dt(); + gent_intscalars(); + gent_attr_intscalars(); return 0; } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 2373f6f..c90c364 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -143,6 +143,8 @@ $SRC_H5DUMP_TESTFILES/zerodim.h5 $SRC_H5DUMP_TESTFILES/torderattr.h5 $SRC_H5DUMP_TESTFILES/tordergr.h5 $SRC_H5DUMP_TESTFILES/tsaf.h5 +$SRC_H5DUMP_TESTFILES/tscalarintsize.h5 +$SRC_H5DUMP_TESTFILES/tscalarattrintsize.h5 $SRC_H5DUMP_TESTFILES/tslink.h5 $SRC_H5DUMP_TESTFILES/tsplit_file-m.h5 $SRC_H5DUMP_TESTFILES/tsplit_file-r.h5 @@ -277,6 +279,8 @@ $SRC_H5DUMP_TESTFILES/torderlinks2.ddl $SRC_H5DUMP_TESTFILES/tperror.ddl $SRC_H5DUMP_TESTFILES/treference.ddl $SRC_H5DUMP_TESTFILES/tsaf.ddl +$SRC_H5DUMP_TESTFILES/tscalarintsize.ddl +$SRC_H5DUMP_TESTFILES/tscalarattrintsize.ddl $SRC_H5DUMP_TESTFILES/tscaleoffset.ddl $SRC_H5DUMP_TESTFILES/tshuffle.ddl $SRC_H5DUMP_TESTFILES/tslink-1.ddl @@ -678,10 +682,14 @@ TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5 TOOLTEST packedbits.ddl --enable-error-stack packedbits.h5 # test for compound signed/unsigned datasets TOOLTEST tcmpdintsize.ddl --enable-error-stack tcmpdintsize.h5 +# test for signed/unsigned scalar datasets +TOOLTEST tscalarintsize.ddl --enable-error-stack tscalarintsize.h5 # test for signed/unsigned attributes TOOLTEST tattrintsize.ddl --enable-error-stack tattrintsize.h5 # test for compound signed/unsigned attributes TOOLTEST tcmpdattrintsize.ddl --enable-error-stack tcmpdattrintsize.h5 +# test for signed/unsigned scalar attributes +TOOLTEST tscalarattrintsize.ddl --enable-error-stack tscalarattrintsize.h5 # test for displaying groups TOOLTEST tgroup-1.ddl --enable-error-stack tgroup.h5 # test for displaying the selected groups diff --git a/tools/h5import/h5importtestutil.sh.in b/tools/h5import/h5importtestutil.sh.in index ba0743b..fd21dc1 100644 --- a/tools/h5import/h5importtestutil.sh.in +++ b/tools/h5import/h5importtestutil.sh.in @@ -331,7 +331,7 @@ TOOLTEST2 "/int/buin/32-bit" binuin32.h5 TESTING "STR" TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5 TESTING "H5DUMP-STR" -TOOLTEST43 "/mytext/data" txtstr.h5 +TOOLTEST4 "/mytext/data" txtstr.h5 TESTING "BINARY I8 CR LF EOF" diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 21420ce..7f7b451 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_TOOLS_LIB) #----------------------------------------------------------------------------- +# Apply Definitions to compiler in this directory and below +#----------------------------------------------------------------------------- +ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) + +#----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index f2eb3ab..2b4fa29 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -1547,6 +1547,8 @@ hsize_t diff(hid_t file1_id, diff_opt_t * options, diff_args_t *argdata) { + hid_t dset1_id = (-1); + hid_t dset2_id = (-1); hid_t type1_id = (-1); hid_t type2_id = (-1); hid_t grp1_id = (-1); @@ -1714,6 +1716,10 @@ hsize_t diff(hid_t file1_id, *---------------------------------------------------------------------- */ case H5TRAV_TYPE_DATASET: + if((dset1_id = H5Dopen2(file1_id, path1, H5P_DEFAULT)) < 0) + goto out; + if((dset2_id = H5Dopen2(file2_id, path2, H5P_DEFAULT)) < 0) + goto out; /* verbose (-v) and report (-r) mode */ if(options->m_verbose || options->m_report) { @@ -1737,6 +1743,22 @@ hsize_t diff(hid_t file1_id, print_found(nfound); } } + + + /*--------------------------------------------------------- + * compare attributes + * if condition refers to cases when the dataset is a + * referenced object + *--------------------------------------------------------- + */ + if(path1) + nfound += diff_attr(dset1_id, dset2_id, path1, path2, options); + + + if(H5Dclose(dset1_id) < 0) + goto out; + if(H5Dclose(dset2_id) < 0) + goto out; break; /*---------------------------------------------------------------------- diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index f9c7d1c..f6e6329 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -507,14 +507,6 @@ hsize_t diff_datasetid( hid_t did1, } /* hyperslab read */ } /*can_compare*/ - /*------------------------------------------------------------------------- - * compare attributes - * the if condition refers to cases when the dataset is a referenced object - *------------------------------------------------------------------------- - */ - h5difftrace("compare attributes?\n"); - if(obj1_name) - nfound += diff_attr(did1,did2,obj1_name,obj2_name,options); /*------------------------------------------------------------------------- * close diff --git a/tools/testfiles/tscalarattrintsize.ddl b/tools/testfiles/tscalarattrintsize.ddl new file mode 100644 index 0000000..4157859 --- /dev/null +++ b/tools/testfiles/tscalarattrintsize.ddl @@ -0,0 +1,130 @@ +HDF5 "tscalarattrintsize.h5" { +GROUP "/" { + ATTRIBUTE "DS08BITS" { + DATATYPE H5T_ARRAY { [8][8] H5T_STD_I8LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, + -2, -4, -8, -16, -32, -64, -128, 0, + -4, -8, -16, -32, -64, -128, 0, 0, + -8, -16, -32, -64, -128, 0, 0, 0, + -16, -32, -64, -128, 0, 0, 0, 0, + -32, -64, -128, 0, 0, 0, 0, 0, + -64, -128, 0, 0, 0, 0, 0, 0, + -128, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DS16BITS" { + DATATYPE H5T_ARRAY { [8][16] H5T_STD_I16LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, + -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, + -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, + -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, + -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, + -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, 0, + -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DS32BITS" { + DATATYPE H5T_ARRAY { [8][32] H5T_STD_I32LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, + -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, + -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, + -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, + -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, + -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, + -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, + -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DS64BITS" { + DATATYPE H5T_ARRAY { [8][64] H5T_STD_I64LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, + -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, + -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, + -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, + -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, + -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, + -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, + -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DU08BITS" { + DATATYPE H5T_ARRAY { [8][8] H5T_STD_U8LE } + DATASPACE SCALAR + DATA { + (0): [ 255, 254, 252, 248, 240, 224, 192, 128, + 254, 252, 248, 240, 224, 192, 128, 0, + 252, 248, 240, 224, 192, 128, 0, 0, + 248, 240, 224, 192, 128, 0, 0, 0, + 240, 224, 192, 128, 0, 0, 0, 0, + 224, 192, 128, 0, 0, 0, 0, 0, + 192, 128, 0, 0, 0, 0, 0, 0, + 128, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DU16BITS" { + DATATYPE H5T_ARRAY { [8][16] H5T_STD_U16LE } + DATASPACE SCALAR + DATA { + (0): [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, + 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, + 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, + 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, + 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DU32BITS" { + DATATYPE H5T_ARRAY { [8][32] H5T_STD_U32LE } + DATASPACE SCALAR + DATA { + (0): [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, + 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, + 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, + 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, + 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, + 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, + 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DU64BITS" { + DATATYPE H5T_ARRAY { [8][64] H5T_STD_U64LE } + DATASPACE SCALAR + DATA { + (0): [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, + 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, + 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, + 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, + 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, + 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, + 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, 0, + 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, 0, 0 ] + } + } + ATTRIBUTE "DummyDBL" { + DATATYPE H5T_ARRAY { [8][8] H5T_IEEE_F64BE } + DATASPACE SCALAR + DATA { + (0): [ 0, 1.17284e-90, 1.17284e-90, 1.05571e+165, 1.17284e-90, -3.23633e+292, 1.05571e+165, -3.55182e+37, + 3.03865e-319, 3.71772e+239, -5.54961e+165, 8.81586e+91, -8.11368e+22, 1.28325e-51, -1.9407e-125, 2.0391e-194, + 3.16202e-322, 4.49083e-30, 3.71772e+239, -6.38938e-104, -5.54961e+165, 9.82903e-178, 8.81586e+91, -9.79926e-247, + 1.04347e-320, 4.49083e-30, 3.71772e+239, -6.38938e-104, -5.54961e+165, 9.82903e-178, 8.81586e+91, -9.79926e-247, + 2.05531e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31, + 2.56124e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31, + 3.06716e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31, + 3.57308e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31 ] + } + } +} +} diff --git a/tools/testfiles/tscalarattrintsize.h5 b/tools/testfiles/tscalarattrintsize.h5 new file mode 100644 index 0000000..acf87e8 Binary files /dev/null and b/tools/testfiles/tscalarattrintsize.h5 differ diff --git a/tools/testfiles/tscalarintsize.ddl b/tools/testfiles/tscalarintsize.ddl new file mode 100644 index 0000000..b4d9c02 --- /dev/null +++ b/tools/testfiles/tscalarintsize.ddl @@ -0,0 +1,130 @@ +HDF5 "tscalarintsize.h5" { +GROUP "/" { + DATASET "DS08BITS" { + DATATYPE H5T_ARRAY { [8][8] H5T_STD_I8LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, + -2, -4, -8, -16, -32, -64, -128, 0, + -4, -8, -16, -32, -64, -128, 0, 0, + -8, -16, -32, -64, -128, 0, 0, 0, + -16, -32, -64, -128, 0, 0, 0, 0, + -32, -64, -128, 0, 0, 0, 0, 0, + -64, -128, 0, 0, 0, 0, 0, 0, + -128, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DS16BITS" { + DATATYPE H5T_ARRAY { [8][16] H5T_STD_I16LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, + -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, + -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, + -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, + -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, + -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, 0, + -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DS32BITS" { + DATATYPE H5T_ARRAY { [8][32] H5T_STD_I32LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, + -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, + -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, + -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, + -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, + -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, + -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, + -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DS64BITS" { + DATATYPE H5T_ARRAY { [8][64] H5T_STD_I64LE } + DATASPACE SCALAR + DATA { + (0): [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, + -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, + -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, + -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, + -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, + -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, + -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, + -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DU08BITS" { + DATATYPE H5T_ARRAY { [8][8] H5T_STD_U8LE } + DATASPACE SCALAR + DATA { + (0): [ 255, 254, 252, 248, 240, 224, 192, 128, + 254, 252, 248, 240, 224, 192, 128, 0, + 252, 248, 240, 224, 192, 128, 0, 0, + 248, 240, 224, 192, 128, 0, 0, 0, + 240, 224, 192, 128, 0, 0, 0, 0, + 224, 192, 128, 0, 0, 0, 0, 0, + 192, 128, 0, 0, 0, 0, 0, 0, + 128, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DU16BITS" { + DATATYPE H5T_ARRAY { [8][16] H5T_STD_U16LE } + DATASPACE SCALAR + DATA { + (0): [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, + 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, + 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, + 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, + 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DU32BITS" { + DATATYPE H5T_ARRAY { [8][32] H5T_STD_U32LE } + DATASPACE SCALAR + DATA { + (0): [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, + 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, + 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, + 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, + 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, + 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, + 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DU64BITS" { + DATATYPE H5T_ARRAY { [8][64] H5T_STD_U64LE } + DATASPACE SCALAR + DATA { + (0): [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, + 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, + 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, + 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, + 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, + 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, + 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, 0, + 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, 0, 0 ] + } + } + DATASET "DummyDBL" { + DATATYPE H5T_ARRAY { [8][8] H5T_IEEE_F64BE } + DATASPACE SCALAR + DATA { + (0): [ 0, 1.17284e-90, 1.17284e-90, 1.05571e+165, 1.17284e-90, -3.23633e+292, 1.05571e+165, -3.55182e+37, + 3.03865e-319, 3.71772e+239, -5.54961e+165, 8.81586e+91, -8.11368e+22, 1.28325e-51, -1.9407e-125, 2.0391e-194, + 3.16202e-322, 4.49083e-30, 3.71772e+239, -6.38938e-104, -5.54961e+165, 9.82903e-178, 8.81586e+91, -9.79926e-247, + 1.04347e-320, 4.49083e-30, 3.71772e+239, -6.38938e-104, -5.54961e+165, 9.82903e-178, 8.81586e+91, -9.79926e-247, + 2.05531e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31, + 2.56124e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31, + 3.06716e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31, + 3.57308e-320, 2.30888e-169, 4.49083e-30, 1.26564e+105, 3.71772e+239, -3.43143e-243, -6.38938e-104, -1.85109e+31 ] + } + } +} +} diff --git a/tools/testfiles/tscalarintsize.h5 b/tools/testfiles/tscalarintsize.h5 new file mode 100644 index 0000000..9433401 Binary files /dev/null and b/tools/testfiles/tscalarintsize.h5 differ diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index f7c5549..3d1d770 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -502,7 +502,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.127-FA_a5" +#define H5_PACKAGE_STRING "HDF5 1.9.131-FA_a5" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -511,7 +511,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.127-FA_a5" +#define H5_PACKAGE_VERSION "1.9.131-FA_a5" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -674,7 +674,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.127-FA_a5" +#define H5_VERSION "1.9.131-FA_a5" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12