From 79b36622aacb480870340e494a62de8315f8662d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 18 Jun 2012 12:29:44 -0500 Subject: [svn-r22469] MinGW Flags need to use dash set WINSOCK2_H do not test for endianess Tested: windows 32 minGW --- config/cmake/ConfigureChecks.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 6fb9ec1..2b64a56 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -121,12 +121,13 @@ IF (WIN32) IF (MINGW) SET (H5_HAVE_MINGW 1) SET (WINDOWS 1) # MinGW tries to imitate Windows + SET (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1") ENDIF (MINGW) SET (H5_HAVE_WIN32_API 1) SET (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") - SET (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1") IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) SET (WINDOWS 1) + SET (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1") IF (MSVC) SET (H5_HAVE_VISUAL_STUDIO 1) ENDIF (MSVC) @@ -172,7 +173,9 @@ IF (WINDOWS) SET (H5_HAVE_TIMEZONE 1) SET (H5_HAVE_GETTIMEOFDAY 1) SET (H5_LONE_COLON 0) - + IF (MINGW) + SET (H5_HAVE_WINSOCK2_H 1) + ENDIF (MINGW) SET (H5_HAVE_LIBWS2_32 1) SET (H5_HAVE_LIBWSOCK32 1) ENDIF (WINDOWS) @@ -217,7 +220,9 @@ IF (WINDOWS) SET (USE_INCLUDES ${USE_INCLUDES} "windows.h") ENDIF (WINDOWS) -TEST_BIG_ENDIAN(H5_WORDS_BIGENDIAN) +IF (NOT WINDOWS) + TEST_BIG_ENDIAN(H5_WORDS_BIGENDIAN) +ENDIF (NOT WINDOWS) # For other specific tests, use this MACRO. MACRO (HDF5_FUNCTION_TEST OTHER_TEST) -- cgit v0.12 From 860fe3d4d78e7f1b130b39bf410b5c8f55ad1123 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 18 Jun 2012 13:01:57 -0500 Subject: [svn-r22470] Allow MinGW checks for fseek and the like Tested: windows 32 mingw --- config/cmake/ConfigureChecks.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 2b64a56..0940418 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -461,7 +461,7 @@ ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS}) #----------------------------------------------------------------------------- # Check for HAVE_OFF64_T functionality #----------------------------------------------------------------------------- -IF (NOT WINDOWS) +IF (NOT WINDOWS OR MINGW) HDF5_FUNCTION_TEST (HAVE_OFF64_T) IF (H5_HAVE_OFF64_T) CHECK_FUNCTION_EXISTS (lseek64 H5_HAVE_LSEEK64) @@ -478,7 +478,7 @@ IF (NOT WINDOWS) CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64) CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64) ENDIF (HAVE_STAT64_STRUCT) -ENDIF (NOT WINDOWS) +ENDIF (NOT WINDOWS OR MINGW) #----------------------------------------------------------------------------- # Check the size in bytes of all the int and float types -- cgit v0.12 From 9b63d7d5131d02369af498f7930183138535fa80 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 18 Jun 2012 15:01:59 -0500 Subject: [svn-r22471] Add check for MINGW - ws2_32 library Tested: windows - mingw --- config/cmake/H5pubconf.h.in | 3 +++ configure | 65 ++++++++++++++++++++++++++++++++++++++++++++- configure.in | 4 +++ src/H5config.h.in | 3 +++ 4 files changed, 74 insertions(+), 1 deletion(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 0c6cc0b..6fca1ae 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -260,6 +260,9 @@ /* Define to 1 if you have the `sz' library (-lsz). */ #cmakedefine H5_HAVE_LIBSZ @H5_HAVE_LIBSZ@ +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#cmakedefine H5_HAVE_LIBWS2_32 @H5_HAVE_LIBWS2_32@ + /* Define to 1 if you have the `z' library (-lz). */ #cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@ diff --git a/configure b/configure index 515a9e4..f1fa27f 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 22430 2012-06-04 17:05:02Z byrn . +# From configure.in Id: configure.in 22448 2012-06-10 13:53:06Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.9.122. # @@ -22271,6 +22271,69 @@ fi done ;; + MINGW*) + for ac_header in io.h winsock2.h sys/timeb.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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32_main=yes +else + ac_cv_lib_ws2_32_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + + LIBS="-lws2_32 $LIBS" + +fi +ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main + + ;; *) for ac_header in io.h winsock2.h sys/timeb.h do : diff --git a/configure.in b/configure.in index 3dc354b..6f8a3e9 100644 --- a/configure.in +++ b/configure.in @@ -1286,6 +1286,10 @@ case "`uname`" in CYGWIN*) AC_CHECK_HEADERS([io.h sys/timeb.h]) ;; + MINGW*) + AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) + AC_HAVE_LIBRARY([ws2_32]) + ;; *) AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) ;; diff --git a/src/H5config.h.in b/src/H5config.h.in index 6176b33..a2b75df 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -217,6 +217,9 @@ /* Define to 1 if you have the `sz' library (-lsz). */ #undef HAVE_LIBSZ +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#undef HAVE_LIBWS2_32 + /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -- cgit v0.12 From d0347999e6a7bd9ee2284f91a0fb77cf1527deb6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Jun 2012 09:38:23 -0500 Subject: [svn-r22477] Removed subfolder tools from install command, need to correct install template --- config/cmake/hdf5-config.cmake.install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in index 268d5ed..a851915 100644 --- a/config/cmake/hdf5-config.cmake.install.in +++ b/config/cmake/hdf5-config.cmake.install.in @@ -43,8 +43,8 @@ IF (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB) ENDIF (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB) IF (HDF5_BUILD_TOOLS) - SET (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include/tools" ) - SET (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin/tools" ) + SET (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include" ) + SET (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin" ) ENDIF (HDF5_BUILD_TOOLS) #----------------------------------------------------------------------------- -- cgit v0.12 From b608652f7e6469550a5c7433ca8c3186ec26b7c3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Jun 2012 09:43:02 -0500 Subject: [svn-r22479] Remove subfolder tools from install command --- hl/tools/CMakeLists.txt | 2 +- tools/h5copy/CMakeLists.txt | 4 ++-- tools/h5diff/CMakeLists.txt | 8 ++++---- tools/h5dump/CMakeLists.txt | 4 ++-- tools/h5import/CMakeLists.txt | 4 ++-- tools/h5jam/CMakeLists.txt | 4 ++-- tools/h5ls/CMakeLists.txt | 4 ++-- tools/h5repack/CMakeLists.txt | 4 ++-- tools/h5stat/CMakeLists.txt | 4 ++-- tools/lib/CMakeLists.txt | 13 ------------- tools/misc/CMakeLists.txt | 15 +++++++++++---- 11 files changed, 30 insertions(+), 36 deletions(-) diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 4fc83b7..28943d6 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -54,7 +54,7 @@ INSTALL ( gif2h5 h52gif RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications ) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index b56f8c7..94eb732 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -375,13 +375,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5copy RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index a962ceb..3357b97 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -1429,26 +1429,26 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5diff RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) IF (H5_HAVE_PARALLEL) - INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS ph5diff RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 0976bc3..debbb48 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1758,13 +1758,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5dump RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index f5dabef..0f0cc20 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -262,13 +262,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5import RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index 4d81d72..d0bf30f 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -535,13 +535,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5jam h5unjam RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 4c21eee..81a6787 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -434,13 +434,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5ls RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index b182332..936559e 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -899,13 +899,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5repack RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index fa9f815..e8d75e3 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -206,13 +206,13 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5stat RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 2367911..6d48d5f 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -75,19 +75,6 @@ IF (APPLE) ENDIF (HDF5_BUILD_WITH_INSTALL_NAME) ENDIF (APPLE) -IF (MSVC) - GET_TARGET_PROPERTY (target_name ${HDF5_TOOLS_LIB_TARGET} RELWITHDEBINFO_OUTPUT_NAME) - MESSAGE (STATUS "target_name is ${target_name} with config ${CMAKE_BUILD_TYPE}") - INSTALL ( - FILES - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb - DESTINATION - ${HDF5_INSTALL_LIB_DIR} - CONFIGURATIONS RelWithDebInfo - COMPONENT toolslibraries - ) - ENDIF (MSVC) - #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index b634b47..0687323 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -31,6 +31,13 @@ SET (H5_DEP_EXECUTABLES h5mkgrp ) +#----------------------------------------------------------------------------- +# Generate the h5cc file containing settings needed to compile programs +#----------------------------------------------------------------------------- +#IF (NOT WIN32) +# CONFIGURE_FILE (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY) +#ENDIF (NOT WIN32) + ############################################################################## ############################################################################## ### T E S T I N G ### @@ -312,15 +319,15 @@ ENDIF (BUILD_TESTING) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) -INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) -INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR} toolsapplications) +INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications) +INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR} toolsapplications) INSTALL ( TARGETS h5debug h5repart h5mkgrp RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR}/tools + ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) -- cgit v0.12 From 24b1316f8b91a4ac2fd27668c56a96b04412c191 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Sat, 23 Jun 2012 18:31:40 -0500 Subject: [svn-r22482] Maintenance: - Fixed a typo in return value of the nh5dread_f_c function ( was 1 instead of 0 on success); fixed the return value to make it consistent with other Fortran functions; cleaned the code from debug statements. Platforms tested: jam with GNU and Intel compilers, fortran 2003 feature. --- fortran/src/H5Df.c | 24 +----------------------- release_docs/RELEASE.txt | 6 ++++++ 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index e1aa98e..ab7adf7 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -2401,16 +2401,6 @@ nh5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t c_xfer_prp; herr_t status; -/* int i, j; */ -/* typedef struct { */ -/* int x; */ -/* float y; */ -/* } r_dual_c; */ - -/* r_dual_c *name=buf; */ - -/* r_dual_c access[4][4]; */ - c_dset_id = (hid_t)*dset_id; c_mem_type_id = (hid_t)*mem_type_id; c_mem_space_id = (hid_t)*mem_space_id; @@ -2419,22 +2409,10 @@ nh5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, /* * Call H5Dread function. */ - -/* printf("%i %i %i %i %i \n",c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp); */ - status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); if ( status < 0 ) return ret_value; -/* for ( i=0; i<4; ++i) */ -/* for (j = 0; j<4; ++j) { */ -/* access[i][j] = name[i*4+j]; */ -/* /\* access[i].x = access[i].x + 1; *\/ */ -/* printf("x = %i \n", access[i][j].x); */ -/* printf("y = %f \n", access[i][j].y); */ -/* } */ - - - ret_value = 1; + ret_value = 0; return ret_value; } /****if* H5Df/nh5dget_access_plist_c diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 93d2dd1..bfce039 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -693,6 +693,12 @@ Bug Fixes since HDF5-1.8.0 release (ADB - 2011/08/15) - perf_serial test added to Windows projects and check batch file. (ADB - 2009/06/11) + Fortran + -------- + - Fixed a typo in return value of the nh5dread_f_c function ( was 1 + instead of 0 on success); fixed the return value to make it consistent + with other Fortran functions; cleaned the code from debug statements. + (EIP - 2012/06/23) Tools ----- -- cgit v0.12 From 5f8d6d5bb53da6221616e02cef4dbd6d680d9185 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 23 Jun 2012 18:32:02 -0500 Subject: [svn-r22484] Description: Copy the file image test file from the source directory to the build directory, instead of trying to open the [in-memory] file R/W. Also, clean up a few other test files that were left lying around from other tests. Tested on: MacOSX/64 10.7.4 (amazon) w/debug Too minor to require h5committest --- hl/test/Makefile.am | 6 +++--- test/Makefile.am | 7 ++++--- test/file_image.c | 30 +++++++++++++++--------------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/hl/test/Makefile.am b/hl/test/Makefile.am index 76c6f90..8893b93 100644 --- a/hl/test/Makefile.am +++ b/hl/test/Makefile.am @@ -44,8 +44,8 @@ if BUILD_ALL_CONDITIONAL endif # Temporary files. These files are the ones created by running `make test'. -CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-9].h5 test_image[1-3].h5 \ - file_img[1-2].h5 test_lite[1-2].h5 test_table.h5 test_packet_table.h5 \ - test_packet_compress.h5 test_detach.h5 +CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-9].h5 test_ds10.h5 \ + test_image[1-3].h5 file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \ + test_packet_table.h5 test_packet_compress.h5 test_detach.h5 include $(top_srcdir)/config/conclude.am diff --git a/test/Makefile.am b/test/Makefile.am index 50ca89c..f1ef97e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -108,11 +108,11 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \ copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \ - sys_file1 tfile[1-5].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \ + sys_file1 tfile[1-6].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \ stab.h5 extern_[1-3].h5 extern_[1-4][ab].raw gheap[0-4].h5 \ dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 tmp \ big.data big[0-9][0-9][0-9][0-9][0-9].h5 \ - stdio.h5 sec2.h5 dtypes[0-9].h5 dt_arith[1-2].h5 tattr.h5 \ + stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0]dt_arith[1-2].h5 tattr.h5 \ tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \ fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 ttime.h5 \ trefer[1-3].h5 tvltypes.h5 tvlstr.h5 tvlstr2.h5 flush.h5 \ @@ -126,7 +126,8 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \ earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ - new_multi_file_v16-s.h5 + split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ + file_image_core_test.h5.copy new_multi_file_v16-s.h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/file_image.c b/test/file_image.c index a846a3c..73c901e 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -519,7 +519,7 @@ test_core(void) udata_t *udata; unsigned char *file_image; char filename[1024]; - char src_dir_filename[1024]; + char copied_filename[1024]; const char *tmp = NULL; size_t size; hsize_t dims[2]; @@ -542,16 +542,15 @@ test_core(void) tmp = h5_fixname(FILENAME[0], fapl, filename, sizeof(filename)); VERIFY(tmp != NULL, "h5_fixname failed"); - /* convert file name to srcdir file name. Make a copy as - * H5_get_srcdir_filename() simply sets up the file name in its - * own buffer each time it is called -- overwriting the previous - * value. - */ - tmp = H5_get_srcdir_filename(filename); - VERIFY(tmp != NULL, "H5_get_srcdir_filename failed"); - VERIFY(strlen(tmp) < 1023, "srcdir file name too long."); - HDstrncpy(src_dir_filename, tmp, 1023); - src_dir_filename[1023] = '\0'; + /* Append ".copy" to the filename from the source directory */ + VERIFY(HDstrlen(filename) < (1023 - 5), "file name too long."); + HDstrncpy(copied_filename, filename, 1023); + copied_filename[1023] = '\0'; + HDstrcat(copied_filename, ".copy"); + + /* Make a copy of the data file from svn. */ + ret = h5_make_local_copy(filename, copied_filename); + VERIFY(ret >= 0, "h5_make_local_copy"); /* Allocate and initialize udata */ udata = (udata_t *)HDmalloc(sizeof(udata_t)); @@ -566,7 +565,7 @@ test_core(void) /* Test open (no file image) */ reset_udata(udata); - file = H5Fopen(src_dir_filename, H5F_ACC_RDWR, fapl); + file = H5Fopen(copied_filename, H5F_ACC_RDONLY, fapl); VERIFY(file >= 0, "H5Fopen failed"); VERIFY(udata->used_callbacks == MALLOC, "opening a core file used the wrong callbacks"); VERIFY(udata->malloc_src == H5FD_FILE_IMAGE_OP_FILE_OPEN, "Malloc callback came from wrong sourc in core open"); @@ -579,7 +578,7 @@ test_core(void) VERIFY(udata->free_src == H5FD_FILE_IMAGE_OP_FILE_CLOSE, "Free callback came from wrong sourc in core close"); /* Reopen file */ - file = H5Fopen(src_dir_filename, H5F_ACC_RDWR, fapl); + file = H5Fopen(copied_filename, H5F_ACC_RDWR, fapl); VERIFY(file >= 0, "H5Fopen failed"); /* Set up a new dset */ @@ -613,7 +612,7 @@ test_core(void) VERIFY(udata->free_src == H5FD_FILE_IMAGE_OP_FILE_CLOSE, "Free callback came from wrong sourc in core close"); /* Create file image buffer */ - fd = HDopen(src_dir_filename, O_RDONLY, 0666); + fd = HDopen(copied_filename, O_RDONLY, 0666); VERIFY(fd > 0, "open failed"); ret = HDfstat(fd, &sb); VERIFY(ret == 0, "fstat failed"); @@ -627,13 +626,14 @@ test_core(void) if(H5Pset_file_image(fapl, file_image, size) < 0) FAIL_STACK_ERROR /* Test open with file image */ - if((file = H5Fopen("dne.h5", H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR + if((file = H5Fopen("dne.h5", H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR if(H5Fclose(file) < 0) FAIL_STACK_ERROR /* Release resources */ h5_cleanup(FILENAME, fapl); HDfree(udata); HDfree(file_image); + HDremove(copied_filename); PASSED(); -- cgit v0.12 From 76c13682e4bb9c43e59c71fcaaf760e619a59e66 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 23 Jun 2012 18:42:09 -0500 Subject: [svn-r22486] Description: Fix typo with last change and reformat a little bit --- test/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index f1ef97e..cb56d52 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -112,7 +112,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse stab.h5 extern_[1-3].h5 extern_[1-4][ab].raw gheap[0-4].h5 \ dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 tmp \ big.data big[0-9][0-9][0-9][0-9][0-9].h5 \ - stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0]dt_arith[1-2].h5 tattr.h5 \ + stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \ tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \ fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 ttime.h5 \ trefer[1-3].h5 tvltypes.h5 tvlstr.h5 tvlstr2.h5 flush.h5 \ @@ -125,9 +125,10 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \ - earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ + earray.h5 efc[0-5].h5 log_vfd_out.log \ + new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ - file_image_core_test.h5.copy new_multi_file_v16-s.h5 + file_image_core_test.h5.copy # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ -- cgit v0.12 From 02a0bd53e89c79508899ef28bfb7f038a1612aa7 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 24 Jun 2012 09:29:36 -0500 Subject: [svn-r22487] Snapshot version 1.9 release 122 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 24 ++++++++++++------------ configure.in | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- hl/test/Makefile.in | 6 +++--- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- test/Makefile.in | 32 +++++++++++++++++--------------- vms/src/h5pubconf.h | 6 +++--- windows/src/H5pubconf.h | 6 +++--- 16 files changed, 50 insertions(+), 48 deletions(-) diff --git a/README.txt b/README.txt index 7b77f8e..0186b6f 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.122 currently under development +HDF5 version 1.9.123 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index c265924..544c719 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -431,7 +431,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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 48f0d67..9d32ebd 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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index f1fa27f..ea85c37 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Id: configure.in 22448 2012-06-10 13:53:06Z hdftest . +# From configure.in Id: configure.in 22471 2012-06-18 20:01:59Z byrn . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for HDF5 1.9.122. +# Generated by GNU Autoconf 2.68 for HDF5 1.9.123. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.122' -PACKAGE_STRING='HDF5 1.9.122' +PACKAGE_VERSION='1.9.123' +PACKAGE_STRING='HDF5 1.9.123' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1463,7 +1463,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.122 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.123 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1533,7 +1533,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.122:";; + short | recursive ) echo "Configuration of HDF5 1.9.123:";; esac cat <<\_ACEOF @@ -1726,7 +1726,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.122 +HDF5 configure 1.9.123 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2815,7 +2815,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.122, which was +It was created by HDF5 $as_me 1.9.123, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3636,7 +3636,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.122' + VERSION='1.9.123' cat >>confdefs.h <<_ACEOF @@ -30668,7 +30668,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.122, which was +This file was extended by HDF5 $as_me 1.9.123, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30734,7 +30734,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.122 +HDF5 config.status 1.9.123 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -33529,7 +33529,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.122 +HDF5 config.lt 1.9.123 configured by $0, generated by GNU Autoconf 2.68. Copyright (C) 2010 Free Software Foundation, Inc. diff --git a/configure.in b/configure.in index 6f8a3e9..953c488 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ dnl dnl NOTE: Don't forget to change the version number here when we do a dnl release!!! dnl -AC_INIT([HDF5], [1.9.122], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.123], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AM_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 46ffc46..dc267f8 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -478,7 +478,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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index cae86d3..5c4d5f7 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -421,7 +421,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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 4644586..3685893 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -436,7 +436,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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index bc88d4d..adc4ee1 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -420,7 +420,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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 # This library is our main target. diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index b7548ec..be0338a 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -427,9 +427,9 @@ TRACE = perl $(top_srcdir)/bin/trace # Temporary files. These files are the ones created by running `make test'. CHECK_CLEANFILES = *.chkexe *.chklog *.clog combine_tables[1-2].h5 \ - test_ds[1-9].h5 test_image[1-3].h5 file_img[1-2].h5 \ - test_lite[1-2].h5 test_table.h5 test_packet_table.h5 \ - test_packet_compress.h5 test_detach.h5 + test_ds[1-9].h5 test_ds10.h5 test_image[1-3].h5 \ + file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \ + test_packet_table.h5 test_packet_compress.h5 test_detach.h5 # The tests depend on the hdf5, hdf5 test, and hdf5_hl libraries LDADD = $(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index bfce039..e1913d0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.122 currently under development +HDF5 version 1.9.123 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 7d834de..deedbf8 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 122 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 123 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.122" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.123" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index c06f8d8..6b1df70 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -484,7 +484,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 = 112 +LT_VERS_REVISION = 113 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/test/Makefile.in b/test/Makefile.in index 626a029..ede709c 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -750,25 +750,27 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \ max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \ copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 \ - frspace.h5 links*.h5 sys_file1 tfile[1-5].h5 th5s[1-4].h5 \ + frspace.h5 links*.h5 sys_file1 tfile[1-6].h5 th5s[1-4].h5 \ lheap.h5 fheap.h5 ohdr.h5 stab.h5 extern_[1-3].h5 \ extern_[1-4][ab].raw gheap[0-4].h5 dt_arith[1-2] links.h5 \ links[0-6]*.h5 extlinks[0-15].h5 tmp big.data \ big[0-9][0-9][0-9][0-9][0-9].h5 stdio.h5 sec2.h5 \ - dtypes[0-9].h5 dt_arith[1-2].h5 tattr.h5 tselect.h5 mtime.h5 \ - unlink.h5 unicode.h5 coord.h5 fillval_[0-9].h5 fillval.raw \ - mount_[0-9].h5 testmeta.h5 ttime.h5 trefer[1-3].h5 tvltypes.h5 \ - tvlstr.h5 tvlstr2.h5 flush.h5 enum1.h5 titerate.h5 ttsafe.h5 \ - tarray1.h5 tgenprop.h5 tmisc[0-9]*.h5 set_extent[1-5].h5 \ - ext[12].bin getname.h5 getname[1-3].h5 sec2_file.h5 \ - direct_file.h5 family_file000[0-3][0-9].h5 \ - new_family_v16_000[0-3][0-9].h5 multi_file-[rs].h5 core_file \ - new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 \ - err_compat.h5 dtransform.h5 test_filters.h5 get_file_name.h5 \ - tstint[1-2].h5 unlink_chunked.h5 btree2.h5 objcopy_src.h5 \ - objcopy_dst.h5 objcopy_ext.dat trefer1.h5 trefer2.h5 \ - app_ref.h5 farray.h5 earray.h5 efc[0-5].h5 log_vfd_out.log \ - new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 + dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \ + tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \ + fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 \ + ttime.h5 trefer[1-3].h5 tvltypes.h5 tvlstr.h5 tvlstr2.h5 \ + flush.h5 enum1.h5 titerate.h5 ttsafe.h5 tarray1.h5 tgenprop.h5 \ + tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin getname.h5 \ + getname[1-3].h5 sec2_file.h5 direct_file.h5 \ + family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \ + multi_file-[rs].h5 core_file new_move_[ab].h5 ntypes.h5 \ + dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \ + test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ + unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ + objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \ + earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ + new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \ + split_get_file_image_test-r.h5 file_image_core_test.h5.copy INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src # Test script for error_test and err_compat diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 48748b5..965f2d6 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.122" +#define H5_PACKAGE_STRING "HDF5 1.9.123" /* 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.122" +#define H5_PACKAGE_VERSION "1.9.123" /* 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.122" +#define H5_VERSION "1.9.123" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index 99f466d..a1d3308 100644 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -527,7 +527,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.122" +#define H5_PACKAGE_STRING "HDF5 1.9.123" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -536,7 +536,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.122" +#define H5_PACKAGE_VERSION "1.9.123" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "I64" @@ -707,7 +707,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.122" +#define H5_VERSION "1.9.123" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From 9ded3f59ed614d4e25ab18acf274e59bd5888d8a Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Mon, 25 Jun 2012 17:00:06 -0500 Subject: [svn-r22490] I took out the "return an error" line in H5Dget_offset, to match what the RM says about the function behavior. Quincey added it some time ago without realizing it caused test errors (Issue 8072). Tested on ostrich, MacGoblin - simple change. --- src/H5D.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/H5D.c b/src/H5D.c index cf93399..da050ab 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -825,8 +825,6 @@ H5Dget_offset(hid_t dset_id) /* Set return value */ ret_value = H5D__get_offset(dset); - if(!H5F_addr_defined(ret_value)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HADDR_UNDEF, "unable to get space status") done: FUNC_LEAVE_API(ret_value) -- cgit v0.12 From 4a7802b82b175bb8ccc20cc9d41b004c6351d51a Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 27 Jun 2012 11:12:57 -0500 Subject: [svn-r22495] Skip the failing File Creation I/O subtest that causes c++ tests to fail with the new/PGI compiler (see HDFFV- 8067). Tested jam, koala, ostrich. --- c++/test/tfile.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 88ffc03..df01752 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -110,15 +110,22 @@ static void test_file_create() // try to create the same file with H5F_ACC_TRUNC. This should fail // because file1 is the same file and is currently open. + +/* These three are failing with new/PGI compiler, HDFFV-8067 + The line "H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E" + Results in this message: + "terminate called without an active exception + Command terminated by signal 6" + Commenting it out until it's fixed LK 20120626. #ifndef H5_HAVE_FILE_VERSIONS try { H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E - // Should FAIL but didn't, so throw an invalid action exception throw InvalidActionException("H5File constructor", "Attempted to create an existing file."); } catch( FileIException E ) // catch truncating existing file {} // do nothing, FAIL expected + #endif // Close file1 delete file1; @@ -152,13 +159,15 @@ static void test_file_create() // Try with H5F_ACC_EXCL. This should fail too because the file already // exists. try { - H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E +// H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E // Should FAIL but didn't, so throw an invalid action exception throw InvalidActionException("H5File constructor", "H5F_ACC_EXCL attempt on an existing file."); } catch( FileIException E ) // catching H5F_ACC_EXCL on existing file {} // do nothing, FAIL expected +*/ + std::cerr << "SKIPPED for HDFFV-8067" << std::endl; // Get the file-creation template FileCreatPropList tmpl1 = file1->getCreatePlist(); -- cgit v0.12 From a13344aefd14cdcd321b25244dbff5993656b924 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 27 Jun 2012 13:26:16 -0500 Subject: [svn-r22496] Add file to test integer sizes for attributes Tested: local linux --- tools/h5dump/CMakeLists.txt | 6 + tools/h5dump/h5dumpgentest.c | 288 ++++++++++++++++---- tools/testfiles/tattrintsize.ddl | 569 +++++++++++++++++++++++++++++++++++++++ tools/testfiles/tattrintsize.h5 | Bin 0 -> 13016 bytes 4 files changed, 816 insertions(+), 47 deletions(-) create mode 100644 tools/testfiles/tattrintsize.ddl create mode 100644 tools/testfiles/tattrintsize.h5 diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index debbb48..d6c43c0 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -66,6 +66,7 @@ IF (BUILD_TESTING) tarray7.ddl tarray8.ddl tattr-1.ddl + tattrintsize.ddl tattr-2.ddl tattr-3.ddl tattr-4_be.ddl @@ -258,6 +259,7 @@ IF (BUILD_TESTING) tattr.h5 tattr2.h5 tattr4_be.h5 + tattrintsize.h5 tattrreg.h5 tbigdims.h5 tbinary.h5 @@ -730,6 +732,8 @@ IF (BUILD_TESTING) tattr-3.out.err tattr-4_be.out tattr-4_be.out.err + tattrintsize.out + tattrintsize.out.err tattrreg.out tattrreg.out.err tattrregR.out @@ -935,6 +939,8 @@ IF (BUILD_TESTING) # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) + # test for signed/unsigned attributes + ADD_H5_TEST (tattrintsize 0 --enable-error-stack tattrintsize.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 4fab379..f204499 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -98,6 +98,7 @@ #define FILE66 "packedbits.h5" #define FILE67 "zerodim.h5" #define FILE68 "charsets.h5" +#define FILE69 "tattrintsize.h5" @@ -262,20 +263,20 @@ typedef struct s1_t { #define THRESHOLD10 10 /* Free space section threshold */ /* "FILE66" macros */ -#define F66_XDIM 8 +#define F66_XDIM 8 #define F66_DATASETU08 "DU08BITS" #define F66_DATASETS08 "DS08BITS" -#define F66_YDIM8 8 +#define F66_YDIM8 8 #define F66_DATASETU16 "DU16BITS" #define F66_DATASETS16 "DS16BITS" -#define F66_YDIM16 16 +#define F66_YDIM16 16 #define F66_DATASETU32 "DU32BITS" #define F66_DATASETS32 "DS32BITS" -#define F66_YDIM32 32 +#define F66_YDIM32 32 #define F66_DATASETU64 "DU64BITS" #define F66_DATASETS64 "DS64BITS" #define F66_YDIM64 64 -#define F66_DUMMYDBL "DummyDBL" +#define F66_DUMMYDBL "DummyDBL" static void gent_group(void) @@ -576,7 +577,7 @@ static int gent_softlink2(void) */ /* Create a new dataset as sample object */ dset1 = H5Dcreate2(fileid1, "/dset1", H5T_NATIVE_INT, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset1 < 0) { fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); @@ -597,7 +598,7 @@ static int gent_softlink2(void) */ /* Create a new dataset as sample object */ dset2 = H5Dcreate2(fileid1, "/dset2", H5T_NATIVE_INT, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset2 < 0) { fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); @@ -3344,7 +3345,7 @@ static void gent_array8(void) hsize_t sdims[] = {F64_DIM0}; hsize_t tdims[] = {F64_DIM1}; int wdata[(F64_DIM1) * sizeof(int)]; /* Write buffer */ - unsigned int i; + unsigned int i; /* * Initialize data. i is the element in the dataspace, j and k the @@ -6946,8 +6947,8 @@ gent_fs_strategy_threshold(void) * Function: gent_packedbits * * Purpose: Generate a file to be used in the h5dump packed bits tests. - * Three datasets of 1, 2 and 4 bytes of unsigned int types are created. - * Three more datasets of 1, 2 and 4 bytes of signed int types are created. + * 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. * Created: Albert Cheng, 2010/5/10. @@ -6979,11 +6980,11 @@ gent_packedbits(void) 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][0] = valu8bits; + for(j = 1; j < dims[1]; j++) { dsetu8[i][j] = dsetu8[i][j-1] << 1; - } - valu8bits <<= 1; + } + valu8bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8); @@ -6995,13 +6996,13 @@ gent_packedbits(void) space = H5Screate_simple(2, dims, NULL); dataset = H5Dcreate2(fid, F66_DATASETU16, H5T_STD_U16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - valu16bits = (uint16_t) ~0u; /* all 1s */ + 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][0] = valu16bits; + for(j = 1; j < dims[1]; j++) { dsetu16[i][j] = dsetu16[i][j-1] << 1; - } - valu16bits <<= 1; + } + valu16bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16); @@ -7013,13 +7014,13 @@ gent_packedbits(void) space = H5Screate_simple(2, dims, NULL); dataset = H5Dcreate2(fid, F66_DATASETU32, H5T_STD_U32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - valu32bits = (uint32_t) ~0u; /* all 1s */ + 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][0] = valu32bits; + for(j = 1; j < dims[1]; j++) { dsetu32[i][j] = dsetu32[i][j-1] << 1; - } - valu32bits <<= 1; + } + valu32bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32); @@ -7033,11 +7034,11 @@ gent_packedbits(void) 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][0] = valu64bits; + for(j = 1; j < dims[1]; j++) { dsetu64[i][j] = dsetu64[i][j-1] << 1; - } - valu64bits <<= 1; + } + valu64bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64); @@ -7049,13 +7050,13 @@ gent_packedbits(void) space = H5Screate_simple(2, dims, NULL); dataset = H5Dcreate2(fid, F66_DATASETS08, H5T_STD_I8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - val8bits = (int8_t) ~0; /* all 1s */ + 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][0] = val8bits; + for(j = 1; j < dims[1]; j++) { dset8[i][j] = dset8[i][j-1] << 1; - } - val8bits <<= 1; + } + val8bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8); @@ -7067,13 +7068,13 @@ gent_packedbits(void) space = H5Screate_simple(2, dims, NULL); dataset = H5Dcreate2(fid, F66_DATASETS16, H5T_STD_I16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - val16bits = (int16_t) ~0; /* all 1s */ + 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][0] = val16bits; + for(j = 1; j < dims[1]; j++) { dset16[i][j] = dset16[i][j-1] << 1; - } - val16bits <<= 1; + } + val16bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16); @@ -7085,13 +7086,13 @@ gent_packedbits(void) space = H5Screate_simple(2, dims, NULL); dataset = H5Dcreate2(fid, F66_DATASETS32, H5T_STD_I32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - val32bits = (int32_t) ~0; /* all 1s */ + 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][0] = val32bits; + for(j = 1; j < dims[1]; j++) { dset32[i][j] = dset32[i][j-1] << 1; - } - val32bits <<= 1; + } + val32bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32); @@ -7105,11 +7106,11 @@ gent_packedbits(void) 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][0] = val64bits; + for(j = 1; j < dims[1]; j++) { dset64[i][j] = dset64[i][j-1] << 1; - } - val64bits <<= 1; + } + val64bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64); @@ -7133,6 +7134,198 @@ gent_packedbits(void) } /*------------------------------------------------------------------------- + * 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_intsize(void) +{ + hid_t fid, attr, space, root; + hsize_t dims[2]; + uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits; + uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits; + uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits; + uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits; + int8_t dset8[F66_XDIM][F66_YDIM8], val8bits; + int16_t dset16[F66_XDIM][F66_YDIM16], val16bits; + int32_t dset32[F66_XDIM][F66_YDIM32], val32bits; + int64_t dset64[F66_XDIM][F66_YDIM64], val64bits; + double dsetdbl[F66_XDIM][F66_YDIM8]; + unsigned int i, j; + + fid = H5Fcreate(FILE69, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + root = H5Gopen2(fid, "/", H5P_DEFAULT); + + /* Attribute of 8 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM8; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETU08, H5T_STD_U8LE, 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, H5T_NATIVE_UINT8, dsetu8); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 16 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM16; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETU16, H5T_STD_U16LE, 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, H5T_NATIVE_UINT16, dsetu16); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 32 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM32; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETU32, H5T_STD_U32LE, 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, H5T_NATIVE_UINT32, dsetu32); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 64 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM64; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETU64, H5T_STD_U64LE, 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, H5T_NATIVE_UINT64, dsetu64); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 8 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM8; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETS08, H5T_STD_I8LE, 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, H5T_NATIVE_INT8, dset8); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 16 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM16; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETS16, H5T_STD_I16LE, 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, H5T_NATIVE_INT16, dset16); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 32 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM32; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETS32, H5T_STD_I32LE, 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, H5T_NATIVE_INT32, dset32); + H5Sclose(space); + H5Aclose(attr); + + /* Attribute of 64 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM64; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DATASETS64, H5T_STD_I64LE, 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, H5T_NATIVE_INT64, dset64); + H5Sclose(space); + H5Aclose(attr); + + /* Double Dummy set for failure tests */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM8; + space = H5Screate_simple(2, dims, NULL); + attr = H5Acreate2(root, F66_DUMMYDBL, H5T_IEEE_F64BE, 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, H5T_NATIVE_DOUBLE, dsetdbl); + + H5Sclose(space); + H5Aclose(attr); + + H5Gclose(root); + H5Fclose(fid); +} + +/*------------------------------------------------------------------------- * Function: gent_charsets * * Purpose: Generate a file to be used in the character set test @@ -7256,6 +7449,7 @@ int main(void) gent_extlinks(); gent_fs_strategy_threshold(); gent_packedbits(); + gent_attr_intsize(); gent_charsets(); return 0; diff --git a/tools/testfiles/tattrintsize.ddl b/tools/testfiles/tattrintsize.ddl new file mode 100644 index 0000000..638384e --- /dev/null +++ b/tools/testfiles/tattrintsize.ddl @@ -0,0 +1,569 @@ +HDF5 "tattrintsize.h5" { +GROUP "/" { + ATTRIBUTE "DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, + (1,0): -2, -4, -8, -16, -32, -64, -128, 0, + (2,0): -4, -8, -16, -32, -64, -128, 0, 0, + (3,0): -8, -16, -32, -64, -128, 0, 0, 0, + (4,0): -16, -32, -64, -128, 0, 0, 0, 0, + (5,0): -32, -64, -128, 0, 0, 0, 0, 0, + (6,0): -64, -128, 0, 0, 0, 0, 0, 0, + (7,0): -128, 0, 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (0,12): -4096, -8192, -16384, -32768, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (1,11): -4096, -8192, -16384, -32768, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (2,11): -8192, -16384, -32768, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (3,11): -16384, -32768, 0, 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (4,10): -16384, -32768, 0, 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (5,10): -32768, 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (6,9): -32768, 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, + (7,10): 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, + (0,19): -524288, -1048576, -2097152, -4194304, -8388608, -16777216, + (0,25): -33554432, -67108864, -134217728, -268435456, -536870912, + (0,30): -1073741824, -2147483648, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (1,11): -4096, -8192, -16384, -32768, -65536, -131072, -262144, + (1,18): -524288, -1048576, -2097152, -4194304, -8388608, -16777216, + (1,24): -33554432, -67108864, -134217728, -268435456, -536870912, + (1,29): -1073741824, -2147483648, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824, + (2,29): -2147483648, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (3,29): 0, 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (4,28): 0, 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, + (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, + (5,22): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (5,27): 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (6,9): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, + (6,16): -4194304, -8388608, -16777216, -33554432, -67108864, + (6,21): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (6,26): 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, + (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, + (7,21): -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, + (7,29): 0, 0, 0 + } + } + ATTRIBUTE "DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, + (0,19): -524288, -1048576, -2097152, -4194304, -8388608, -16777216, + (0,25): -33554432, -67108864, -134217728, -268435456, -536870912, + (0,30): -1073741824, -2147483648, -4294967296, -8589934592, + (0,34): -17179869184, -34359738368, -68719476736, -137438953472, + (0,38): -274877906944, -549755813888, -1099511627776, -2199023255552, + (0,42): -4398046511104, -8796093022208, -17592186044416, + (0,45): -35184372088832, -70368744177664, -140737488355328, + (0,48): -281474976710656, -562949953421312, -1125899906842624, + (0,51): -2251799813685248, -4503599627370496, -9007199254740992, + (0,54): -18014398509481984, -36028797018963968, -72057594037927936, + (0,57): -144115188075855872, -288230376151711744, -576460752303423488, + (0,60): -1152921504606846976, -2305843009213693952, + (0,62): -4611686018427387904, -9223372036854775808, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (1,11): -4096, -8192, -16384, -32768, -65536, -131072, -262144, + (1,18): -524288, -1048576, -2097152, -4194304, -8388608, -16777216, + (1,24): -33554432, -67108864, -134217728, -268435456, -536870912, + (1,29): -1073741824, -2147483648, -4294967296, -8589934592, + (1,33): -17179869184, -34359738368, -68719476736, -137438953472, + (1,37): -274877906944, -549755813888, -1099511627776, -2199023255552, + (1,41): -4398046511104, -8796093022208, -17592186044416, + (1,44): -35184372088832, -70368744177664, -140737488355328, + (1,47): -281474976710656, -562949953421312, -1125899906842624, + (1,50): -2251799813685248, -4503599627370496, -9007199254740992, + (1,53): -18014398509481984, -36028797018963968, -72057594037927936, + (1,56): -144115188075855872, -288230376151711744, -576460752303423488, + (1,59): -1152921504606846976, -2305843009213693952, + (1,61): -4611686018427387904, -9223372036854775808, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824, + (2,29): -2147483648, -4294967296, -8589934592, -17179869184, + (2,33): -34359738368, -68719476736, -137438953472, -274877906944, + (2,37): -549755813888, -1099511627776, -2199023255552, -4398046511104, + (2,41): -8796093022208, -17592186044416, -35184372088832, + (2,44): -70368744177664, -140737488355328, -281474976710656, + (2,47): -562949953421312, -1125899906842624, -2251799813685248, + (2,50): -4503599627370496, -9007199254740992, -18014398509481984, + (2,53): -36028797018963968, -72057594037927936, -144115188075855872, + (2,56): -288230376151711744, -576460752303423488, -1152921504606846976, + (2,59): -2305843009213693952, -4611686018427387904, + (2,61): -9223372036854775808, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (3,29): -4294967296, -8589934592, -17179869184, -34359738368, + (3,33): -68719476736, -137438953472, -274877906944, -549755813888, + (3,37): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (3,41): -17592186044416, -35184372088832, -70368744177664, + (3,44): -140737488355328, -281474976710656, -562949953421312, + (3,47): -1125899906842624, -2251799813685248, -4503599627370496, + (3,50): -9007199254740992, -18014398509481984, -36028797018963968, + (3,53): -72057594037927936, -144115188075855872, -288230376151711744, + (3,56): -576460752303423488, -1152921504606846976, + (3,58): -2305843009213693952, -4611686018427387904, + (3,60): -9223372036854775808, 0, 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (4,28): -4294967296, -8589934592, -17179869184, -34359738368, + (4,32): -68719476736, -137438953472, -274877906944, -549755813888, + (4,36): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (4,40): -17592186044416, -35184372088832, -70368744177664, + (4,43): -140737488355328, -281474976710656, -562949953421312, + (4,46): -1125899906842624, -2251799813685248, -4503599627370496, + (4,49): -9007199254740992, -18014398509481984, -36028797018963968, + (4,52): -72057594037927936, -144115188075855872, -288230376151711744, + (4,55): -576460752303423488, -1152921504606846976, + (4,57): -2305843009213693952, -4611686018427387904, + (4,59): -9223372036854775808, 0, 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, + (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, + (5,22): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (5,27): -4294967296, -8589934592, -17179869184, -34359738368, + (5,31): -68719476736, -137438953472, -274877906944, -549755813888, + (5,35): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (5,39): -17592186044416, -35184372088832, -70368744177664, + (5,42): -140737488355328, -281474976710656, -562949953421312, + (5,45): -1125899906842624, -2251799813685248, -4503599627370496, + (5,48): -9007199254740992, -18014398509481984, -36028797018963968, + (5,51): -72057594037927936, -144115188075855872, -288230376151711744, + (5,54): -576460752303423488, -1152921504606846976, + (5,56): -2305843009213693952, -4611686018427387904, + (5,58): -9223372036854775808, 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (6,9): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, + (6,16): -4194304, -8388608, -16777216, -33554432, -67108864, + (6,21): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (6,26): -4294967296, -8589934592, -17179869184, -34359738368, + (6,30): -68719476736, -137438953472, -274877906944, -549755813888, + (6,34): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (6,38): -17592186044416, -35184372088832, -70368744177664, + (6,41): -140737488355328, -281474976710656, -562949953421312, + (6,44): -1125899906842624, -2251799813685248, -4503599627370496, + (6,47): -9007199254740992, -18014398509481984, -36028797018963968, + (6,50): -72057594037927936, -144115188075855872, -288230376151711744, + (6,53): -576460752303423488, -1152921504606846976, + (6,55): -2305843009213693952, -4611686018427387904, + (6,57): -9223372036854775808, 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, + (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, + (7,21): -268435456, -536870912, -1073741824, -2147483648, -4294967296, + (7,26): -8589934592, -17179869184, -34359738368, -68719476736, + (7,30): -137438953472, -274877906944, -549755813888, -1099511627776, + (7,34): -2199023255552, -4398046511104, -8796093022208, + (7,37): -17592186044416, -35184372088832, -70368744177664, + (7,40): -140737488355328, -281474976710656, -562949953421312, + (7,43): -1125899906842624, -2251799813685248, -4503599627370496, + (7,46): -9007199254740992, -18014398509481984, -36028797018963968, + (7,49): -72057594037927936, -144115188075855872, -288230376151711744, + (7,52): -576460752303423488, -1152921504606846976, + (7,54): -2305843009213693952, -4611686018427387904, + (7,56): -9223372036854775808, 0, 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DU08BITS" { + DATATYPE H5T_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (4,9): 57344, 49152, 32768, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (5,9): 49152, 32768, 0, 0, 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (6,9): 32768, 0, 0, 0, 0, 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, + (7,9): 0, 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + DATA { + (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (0,30): 3221225472, 2147483648, + (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, + (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (1,30): 2147483648, 0, + (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, + (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, + (2,31): 0, + (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, + (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, + (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, + (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (6,25): 2147483648, 0, 0, 0, 0, 0, 0, + (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, + (7,26): 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + DATA { + (0,0): 18446744073709551615, 18446744073709551614, + (0,2): 18446744073709551612, 18446744073709551608, + (0,4): 18446744073709551600, 18446744073709551584, + (0,6): 18446744073709551552, 18446744073709551488, + (0,8): 18446744073709551360, 18446744073709551104, + (0,10): 18446744073709550592, 18446744073709549568, + (0,12): 18446744073709547520, 18446744073709543424, + (0,14): 18446744073709535232, 18446744073709518848, + (0,16): 18446744073709486080, 18446744073709420544, + (0,18): 18446744073709289472, 18446744073709027328, + (0,20): 18446744073708503040, 18446744073707454464, + (0,22): 18446744073705357312, 18446744073701163008, + (0,24): 18446744073692774400, 18446744073675997184, + (0,26): 18446744073642442752, 18446744073575333888, + (0,28): 18446744073441116160, 18446744073172680704, + (0,30): 18446744072635809792, 18446744071562067968, + (0,32): 18446744069414584320, 18446744065119617024, + (0,34): 18446744056529682432, 18446744039349813248, + (0,36): 18446744004990074880, 18446743936270598144, + (0,38): 18446743798831644672, 18446743523953737728, + (0,40): 18446742974197923840, 18446741874686296064, + (0,42): 18446739675663040512, 18446735277616529408, + (0,44): 18446726481523507200, 18446708889337462784, + (0,46): 18446673704965373952, 18446603336221196288, + (0,48): 18446462598732840960, 18446181123756130304, + (0,50): 18445618173802708992, 18444492273895866368, + (0,52): 18442240474082181120, 18437736874454810624, + (0,54): 18428729675200069632, 18410715276690587648, + (0,56): 18374686479671623680, 18302628885633695744, + (0,58): 18158513697557839872, 17870283321406128128, + (0,60): 17293822569102704640, 16140901064495857664, + (0,62): 13835058055282163712, 9223372036854775808, + (1,0): 18446744073709551614, 18446744073709551612, + (1,2): 18446744073709551608, 18446744073709551600, + (1,4): 18446744073709551584, 18446744073709551552, + (1,6): 18446744073709551488, 18446744073709551360, + (1,8): 18446744073709551104, 18446744073709550592, + (1,10): 18446744073709549568, 18446744073709547520, + (1,12): 18446744073709543424, 18446744073709535232, + (1,14): 18446744073709518848, 18446744073709486080, + (1,16): 18446744073709420544, 18446744073709289472, + (1,18): 18446744073709027328, 18446744073708503040, + (1,20): 18446744073707454464, 18446744073705357312, + (1,22): 18446744073701163008, 18446744073692774400, + (1,24): 18446744073675997184, 18446744073642442752, + (1,26): 18446744073575333888, 18446744073441116160, + (1,28): 18446744073172680704, 18446744072635809792, + (1,30): 18446744071562067968, 18446744069414584320, + (1,32): 18446744065119617024, 18446744056529682432, + (1,34): 18446744039349813248, 18446744004990074880, + (1,36): 18446743936270598144, 18446743798831644672, + (1,38): 18446743523953737728, 18446742974197923840, + (1,40): 18446741874686296064, 18446739675663040512, + (1,42): 18446735277616529408, 18446726481523507200, + (1,44): 18446708889337462784, 18446673704965373952, + (1,46): 18446603336221196288, 18446462598732840960, + (1,48): 18446181123756130304, 18445618173802708992, + (1,50): 18444492273895866368, 18442240474082181120, + (1,52): 18437736874454810624, 18428729675200069632, + (1,54): 18410715276690587648, 18374686479671623680, + (1,56): 18302628885633695744, 18158513697557839872, + (1,58): 17870283321406128128, 17293822569102704640, + (1,60): 16140901064495857664, 13835058055282163712, + (1,62): 9223372036854775808, 0, + (2,0): 18446744073709551612, 18446744073709551608, + (2,2): 18446744073709551600, 18446744073709551584, + (2,4): 18446744073709551552, 18446744073709551488, + (2,6): 18446744073709551360, 18446744073709551104, + (2,8): 18446744073709550592, 18446744073709549568, + (2,10): 18446744073709547520, 18446744073709543424, + (2,12): 18446744073709535232, 18446744073709518848, + (2,14): 18446744073709486080, 18446744073709420544, + (2,16): 18446744073709289472, 18446744073709027328, + (2,18): 18446744073708503040, 18446744073707454464, + (2,20): 18446744073705357312, 18446744073701163008, + (2,22): 18446744073692774400, 18446744073675997184, + (2,24): 18446744073642442752, 18446744073575333888, + (2,26): 18446744073441116160, 18446744073172680704, + (2,28): 18446744072635809792, 18446744071562067968, + (2,30): 18446744069414584320, 18446744065119617024, + (2,32): 18446744056529682432, 18446744039349813248, + (2,34): 18446744004990074880, 18446743936270598144, + (2,36): 18446743798831644672, 18446743523953737728, + (2,38): 18446742974197923840, 18446741874686296064, + (2,40): 18446739675663040512, 18446735277616529408, + (2,42): 18446726481523507200, 18446708889337462784, + (2,44): 18446673704965373952, 18446603336221196288, + (2,46): 18446462598732840960, 18446181123756130304, + (2,48): 18445618173802708992, 18444492273895866368, + (2,50): 18442240474082181120, 18437736874454810624, + (2,52): 18428729675200069632, 18410715276690587648, + (2,54): 18374686479671623680, 18302628885633695744, + (2,56): 18158513697557839872, 17870283321406128128, + (2,58): 17293822569102704640, 16140901064495857664, + (2,60): 13835058055282163712, 9223372036854775808, 0, 0, + (3,0): 18446744073709551608, 18446744073709551600, + (3,2): 18446744073709551584, 18446744073709551552, + (3,4): 18446744073709551488, 18446744073709551360, + (3,6): 18446744073709551104, 18446744073709550592, + (3,8): 18446744073709549568, 18446744073709547520, + (3,10): 18446744073709543424, 18446744073709535232, + (3,12): 18446744073709518848, 18446744073709486080, + (3,14): 18446744073709420544, 18446744073709289472, + (3,16): 18446744073709027328, 18446744073708503040, + (3,18): 18446744073707454464, 18446744073705357312, + (3,20): 18446744073701163008, 18446744073692774400, + (3,22): 18446744073675997184, 18446744073642442752, + (3,24): 18446744073575333888, 18446744073441116160, + (3,26): 18446744073172680704, 18446744072635809792, + (3,28): 18446744071562067968, 18446744069414584320, + (3,30): 18446744065119617024, 18446744056529682432, + (3,32): 18446744039349813248, 18446744004990074880, + (3,34): 18446743936270598144, 18446743798831644672, + (3,36): 18446743523953737728, 18446742974197923840, + (3,38): 18446741874686296064, 18446739675663040512, + (3,40): 18446735277616529408, 18446726481523507200, + (3,42): 18446708889337462784, 18446673704965373952, + (3,44): 18446603336221196288, 18446462598732840960, + (3,46): 18446181123756130304, 18445618173802708992, + (3,48): 18444492273895866368, 18442240474082181120, + (3,50): 18437736874454810624, 18428729675200069632, + (3,52): 18410715276690587648, 18374686479671623680, + (3,54): 18302628885633695744, 18158513697557839872, + (3,56): 17870283321406128128, 17293822569102704640, + (3,58): 16140901064495857664, 13835058055282163712, + (3,60): 9223372036854775808, 0, 0, 0, + (4,0): 18446744073709551600, 18446744073709551584, + (4,2): 18446744073709551552, 18446744073709551488, + (4,4): 18446744073709551360, 18446744073709551104, + (4,6): 18446744073709550592, 18446744073709549568, + (4,8): 18446744073709547520, 18446744073709543424, + (4,10): 18446744073709535232, 18446744073709518848, + (4,12): 18446744073709486080, 18446744073709420544, + (4,14): 18446744073709289472, 18446744073709027328, + (4,16): 18446744073708503040, 18446744073707454464, + (4,18): 18446744073705357312, 18446744073701163008, + (4,20): 18446744073692774400, 18446744073675997184, + (4,22): 18446744073642442752, 18446744073575333888, + (4,24): 18446744073441116160, 18446744073172680704, + (4,26): 18446744072635809792, 18446744071562067968, + (4,28): 18446744069414584320, 18446744065119617024, + (4,30): 18446744056529682432, 18446744039349813248, + (4,32): 18446744004990074880, 18446743936270598144, + (4,34): 18446743798831644672, 18446743523953737728, + (4,36): 18446742974197923840, 18446741874686296064, + (4,38): 18446739675663040512, 18446735277616529408, + (4,40): 18446726481523507200, 18446708889337462784, + (4,42): 18446673704965373952, 18446603336221196288, + (4,44): 18446462598732840960, 18446181123756130304, + (4,46): 18445618173802708992, 18444492273895866368, + (4,48): 18442240474082181120, 18437736874454810624, + (4,50): 18428729675200069632, 18410715276690587648, + (4,52): 18374686479671623680, 18302628885633695744, + (4,54): 18158513697557839872, 17870283321406128128, + (4,56): 17293822569102704640, 16140901064495857664, + (4,58): 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, + (5,0): 18446744073709551584, 18446744073709551552, + (5,2): 18446744073709551488, 18446744073709551360, + (5,4): 18446744073709551104, 18446744073709550592, + (5,6): 18446744073709549568, 18446744073709547520, + (5,8): 18446744073709543424, 18446744073709535232, + (5,10): 18446744073709518848, 18446744073709486080, + (5,12): 18446744073709420544, 18446744073709289472, + (5,14): 18446744073709027328, 18446744073708503040, + (5,16): 18446744073707454464, 18446744073705357312, + (5,18): 18446744073701163008, 18446744073692774400, + (5,20): 18446744073675997184, 18446744073642442752, + (5,22): 18446744073575333888, 18446744073441116160, + (5,24): 18446744073172680704, 18446744072635809792, + (5,26): 18446744071562067968, 18446744069414584320, + (5,28): 18446744065119617024, 18446744056529682432, + (5,30): 18446744039349813248, 18446744004990074880, + (5,32): 18446743936270598144, 18446743798831644672, + (5,34): 18446743523953737728, 18446742974197923840, + (5,36): 18446741874686296064, 18446739675663040512, + (5,38): 18446735277616529408, 18446726481523507200, + (5,40): 18446708889337462784, 18446673704965373952, + (5,42): 18446603336221196288, 18446462598732840960, + (5,44): 18446181123756130304, 18445618173802708992, + (5,46): 18444492273895866368, 18442240474082181120, + (5,48): 18437736874454810624, 18428729675200069632, + (5,50): 18410715276690587648, 18374686479671623680, + (5,52): 18302628885633695744, 18158513697557839872, + (5,54): 17870283321406128128, 17293822569102704640, + (5,56): 16140901064495857664, 13835058055282163712, + (5,58): 9223372036854775808, 0, 0, 0, 0, 0, + (6,0): 18446744073709551552, 18446744073709551488, + (6,2): 18446744073709551360, 18446744073709551104, + (6,4): 18446744073709550592, 18446744073709549568, + (6,6): 18446744073709547520, 18446744073709543424, + (6,8): 18446744073709535232, 18446744073709518848, + (6,10): 18446744073709486080, 18446744073709420544, + (6,12): 18446744073709289472, 18446744073709027328, + (6,14): 18446744073708503040, 18446744073707454464, + (6,16): 18446744073705357312, 18446744073701163008, + (6,18): 18446744073692774400, 18446744073675997184, + (6,20): 18446744073642442752, 18446744073575333888, + (6,22): 18446744073441116160, 18446744073172680704, + (6,24): 18446744072635809792, 18446744071562067968, + (6,26): 18446744069414584320, 18446744065119617024, + (6,28): 18446744056529682432, 18446744039349813248, + (6,30): 18446744004990074880, 18446743936270598144, + (6,32): 18446743798831644672, 18446743523953737728, + (6,34): 18446742974197923840, 18446741874686296064, + (6,36): 18446739675663040512, 18446735277616529408, + (6,38): 18446726481523507200, 18446708889337462784, + (6,40): 18446673704965373952, 18446603336221196288, + (6,42): 18446462598732840960, 18446181123756130304, + (6,44): 18445618173802708992, 18444492273895866368, + (6,46): 18442240474082181120, 18437736874454810624, + (6,48): 18428729675200069632, 18410715276690587648, + (6,50): 18374686479671623680, 18302628885633695744, + (6,52): 18158513697557839872, 17870283321406128128, + (6,54): 17293822569102704640, 16140901064495857664, + (6,56): 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, 0, + (7,0): 18446744073709551488, 18446744073709551360, + (7,2): 18446744073709551104, 18446744073709550592, + (7,4): 18446744073709549568, 18446744073709547520, + (7,6): 18446744073709543424, 18446744073709535232, + (7,8): 18446744073709518848, 18446744073709486080, + (7,10): 18446744073709420544, 18446744073709289472, + (7,12): 18446744073709027328, 18446744073708503040, + (7,14): 18446744073707454464, 18446744073705357312, + (7,16): 18446744073701163008, 18446744073692774400, + (7,18): 18446744073675997184, 18446744073642442752, + (7,20): 18446744073575333888, 18446744073441116160, + (7,22): 18446744073172680704, 18446744072635809792, + (7,24): 18446744071562067968, 18446744069414584320, + (7,26): 18446744065119617024, 18446744056529682432, + (7,28): 18446744039349813248, 18446744004990074880, + (7,30): 18446743936270598144, 18446743798831644672, + (7,32): 18446743523953737728, 18446742974197923840, + (7,34): 18446741874686296064, 18446739675663040512, + (7,36): 18446735277616529408, 18446726481523507200, + (7,38): 18446708889337462784, 18446673704965373952, + (7,40): 18446603336221196288, 18446462598732840960, + (7,42): 18446181123756130304, 18445618173802708992, + (7,44): 18444492273895866368, 18442240474082181120, + (7,46): 18437736874454810624, 18428729675200069632, + (7,48): 18410715276690587648, 18374686479671623680, + (7,50): 18302628885633695744, 18158513697557839872, + (7,52): 17870283321406128128, 17293822569102704640, + (7,54): 16140901064495857664, 13835058055282163712, + (7,56): 9223372036854775808, 0, 0, 0, 0, 0, 0, 0 + } + } + ATTRIBUTE "DummyDBL" { + DATATYPE H5T_IEEE_F64BE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + DATA { + (0,0): 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + (1,0): 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + (2,0): 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + (3,0): 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + (4,0): 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + (5,0): 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + (6,0): 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + (7,0): 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 + } + } +} +} diff --git a/tools/testfiles/tattrintsize.h5 b/tools/testfiles/tattrintsize.h5 new file mode 100644 index 0000000..04d6f4c Binary files /dev/null and b/tools/testfiles/tattrintsize.h5 differ -- cgit v0.12 From a30bf0f61a479d80be682c9272822fde0d54fd33 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 27 Jun 2012 14:24:23 -0500 Subject: [svn-r22497] Added new file --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index a63581d..fddd453 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1337,6 +1337,7 @@ ./tools/testfiles/tattr-3.ddl ./tools/testfiles/tattr-4_be.ddl ./tools/testfiles/tattr.h5 +./tools/testfiles/tattrintsize.h5 ./tools/testfiles/tattr4_be.h5 ./tools/testfiles/tattrreg.h5 ./tools/testfiles/tattrreg.ddl -- cgit v0.12 From afb0efe139cf4a5ac8b7c8433b5931dc67d8e2c7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 27 Jun 2012 14:27:19 -0500 Subject: [svn-r22498] Add new test to linux script --- tools/h5dump/testh5dump.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 016b4f1..5180782 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -91,6 +91,7 @@ $SRC_H5DUMP_TESTFILES/tarray6.h5 $SRC_H5DUMP_TESTFILES/tarray7.h5 $SRC_H5DUMP_TESTFILES/tarray8.h5 $SRC_H5DUMP_TESTFILES/tattr.h5 +$SRC_H5DUMP_TESTFILES/tattrintsize.h5 $SRC_H5DUMP_TESTFILES/tattr2.h5 $SRC_H5DUMP_TESTFILES/tattr4_be.h5 $SRC_H5DUMP_TESTFILES/tattrreg.h5 @@ -188,6 +189,7 @@ $SRC_H5DUMP_TESTFILES/tattr-1.ddl $SRC_H5DUMP_TESTFILES/tattr-2.ddl $SRC_H5DUMP_TESTFILES/tattr-3.ddl $SRC_H5DUMP_TESTFILES/tattr-4_be.ddl +$SRC_H5DUMP_TESTFILES/tattrintsize.ddl $SRC_H5DUMP_TESTFILES/tattrreg.ddl $SRC_H5DUMP_TESTFILES/tattrregR.ddl $SRC_H5DUMP_TESTFILES/tbin1.ddl @@ -568,6 +570,8 @@ COPY_TESTFILES_TO_TESTDIR # test for signed/unsigned datasets TOOLTEST packedbits.ddl --enable-error-stack packedbits.h5 +# test for signed/unsigned attributes +TOOLTEST tattrintsize.ddl --enable-error-stack tattrintsize.h5 # test for displaying groups TOOLTEST tgroup-1.ddl --enable-error-stack tgroup.h5 # test for displaying the selected groups -- cgit v0.12 From 2a3c0587ed70b615fd329cf8cc73571f90203f01 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 27 Jun 2012 14:41:21 -0500 Subject: [svn-r22499] Add seconf new file! --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index fddd453..a291444 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1337,6 +1337,7 @@ ./tools/testfiles/tattr-3.ddl ./tools/testfiles/tattr-4_be.ddl ./tools/testfiles/tattr.h5 +./tools/testfiles/tattrintsize.ddl ./tools/testfiles/tattrintsize.h5 ./tools/testfiles/tattr4_be.h5 ./tools/testfiles/tattrreg.h5 -- cgit v0.12 From 732ae085dce0e472f72fb767e541bf9bf8f42628 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Fri, 29 Jun 2012 15:39:42 -0500 Subject: [svn-r22504] Maintenance: See HELPDESK-643 issue in JIRA. NAG Fortran compiler doesn't like the current tH5E_F03.f90 file that has only comments and no executable statements. Removed tH5E_F03.f90 from the list of modules to build. Tested on jam with Intel compiler using --enable-fortran2003 flag. --- configure | 2 +- fortran/test/Makefile.am | 6 +++++- fortran/test/Makefile.in | 10 +++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/configure b/configure index ea85c37..10b6a26 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 22471 2012-06-18 20:01:59Z byrn . +# From configure.in Id: configure.in 22487 2012-06-24 14:29:36Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.9.123. # diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index b261785..b05d651 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -67,8 +67,12 @@ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \ tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 if FORTRAN_2003_CONDITIONAL_F +# NAG Fortran compiler doesn't like the current tH5E_F03.f90 file that has only comments +# and no executable statements. +# Removed from the list of modules to build. EIP 2012-06-28 +# tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \ - tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 + tH5F.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 endif diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 27198a8..f6a28cc 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -118,10 +118,9 @@ fortranlib_test_1_8_LDADD = $(LDADD) fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ $(LIBH5F) $(LIBHDF5) am__fortranlib_test_F03_SOURCES_DIST = fortranlib_test_F03.f90 \ - tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 + tH5F.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 @FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = fortranlib_test_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.$(OBJEXT) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5E_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5L_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5P_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT) @@ -492,8 +491,13 @@ fortranlib_test_SOURCES = fortranlib_test.f90 \ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \ tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 + +# NAG Fortran compiler doesn't like the current tH5E_F03.f90 file that has only comments +# and no executable statements. +# Removed from the list of modules to build. EIP 2012-06-28 +# tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 @FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 fflush1_SOURCES = fflush1.f90 fflush2_SOURCES = fflush2.f90 -- cgit v0.12 From 721e6524271af2d59385fcfc1c9f9093ef3e9ad9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 2 Jul 2012 12:35:11 -0500 Subject: [svn-r22506] HDFFV-7782: resolve names of tests files with tests - added two copies of references files and adjusted CMake and linux test script. Tested: local linux w/ CMake --- MANIFEST | 60 ++++++++++++++++++----------------- tools/h5import/CMakeLists.txt | 8 +++-- tools/h5import/h5importtestutil.sh | 10 +++--- tools/h5import/testfiles/txtin8.txt | 15 +++++++++ tools/h5import/testfiles/txtuin16.txt | 15 +++++++++ 5 files changed, 72 insertions(+), 36 deletions(-) create mode 100644 tools/h5import/testfiles/txtin8.txt create mode 100644 tools/h5import/testfiles/txtuin16.txt diff --git a/MANIFEST b/MANIFEST index a291444..c103fe9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1132,45 +1132,47 @@ ./tools/h5import/h5importtestutil.sh # testfiles for h5import -./tools/h5import/testfiles/binin32.h5 +./tools/h5import/testfiles/binfp64.conf +./tools/h5import/testfiles/binfp64.h5 +./tools/h5import/testfiles/binin16.conf ./tools/h5import/testfiles/binin16.h5 -./tools/h5import/testfiles/txtfp32.txt -./tools/h5import/testfiles/txtstr.conf -./tools/h5import/testfiles/txtfp32.conf -./tools/h5import/testfiles/binin8w.conf +./tools/h5import/testfiles/binin32.conf +./tools/h5import/testfiles/binin32.h5 +./tools/h5import/testfiles/binin8.conf ./tools/h5import/testfiles/binin8.h5 -./tools/h5import/testfiles/txtfp64.conf -./tools/h5import/testfiles/binuin32.conf -./tools/h5import/testfiles/txtuin32.txt +./tools/h5import/testfiles/binin8w.conf +./tools/h5import/testfiles/binin8w.h5 ./tools/h5import/testfiles/binuin16.conf -./tools/h5import/testfiles/txtstr.h5 +./tools/h5import/testfiles/binuin16.h5 +./tools/h5import/testfiles/binuin32.conf +./tools/h5import/testfiles/binuin32.h5 +./tools/h5import/testfiles/textpfe.conf +./tools/h5import/testfiles/textpfe.h5 +./tools/h5import/testfiles/textpfe64.txt +./tools/h5import/testfiles/txtfp32.conf ./tools/h5import/testfiles/txtfp32.h5 -./tools/h5import/testfiles/txtin32.h5 +./tools/h5import/testfiles/txtfp32.txt +./tools/h5import/testfiles/txtfp64.conf +./tools/h5import/testfiles/txtfp64.h5 +./tools/h5import/testfiles/txtfp64.txt +./tools/h5import/testfiles/txtin16.conf ./tools/h5import/testfiles/txtin16.h5 -./tools/h5import/testfiles/binin8w.h5 +./tools/h5import/testfiles/txtin16.txt +./tools/h5import/testfiles/txtin32.conf +./tools/h5import/testfiles/txtin32.h5 ./tools/h5import/testfiles/txtin32.txt -./tools/h5import/testfiles/binfp64.conf -./tools/h5import/testfiles/binin8.conf ./tools/h5import/testfiles/txtin8.conf -./tools/h5import/testfiles/binfp64.h5 -./tools/h5import/testfiles/txtstr.txt -./tools/h5import/testfiles/txtin32.conf -./tools/h5import/testfiles/txtin16.conf ./tools/h5import/testfiles/txtin8.h5 -./tools/h5import/testfiles/txtuin32.conf +./tools/h5import/testfiles/txtin8.txt ./tools/h5import/testfiles/txtuin16.conf -./tools/h5import/testfiles/binin32.conf -./tools/h5import/testfiles/binin16.conf -./tools/h5import/testfiles/txtfp64.h5 -./tools/h5import/testfiles/txtin16.txt -./tools/h5import/testfiles/txtfp64.txt -./tools/h5import/testfiles/binuin32.h5 -./tools/h5import/testfiles/binuin16.h5 -./tools/h5import/testfiles/txtuin32.h5 ./tools/h5import/testfiles/txtuin16.h5 -./tools/h5import/testfiles/textpfe.conf -./tools/h5import/testfiles/textpfe64.txt -./tools/h5import/testfiles/textpfe.h5 +./tools/h5import/testfiles/txtuin16.txt +./tools/h5import/testfiles/txtuin32.conf +./tools/h5import/testfiles/txtuin32.h5 +./tools/h5import/testfiles/txtuin32.txt +./tools/h5import/testfiles/txtstr.conf +./tools/h5import/testfiles/txtstr.h5 +./tools/h5import/testfiles/txtstr.txt # h5diff sources ./tools/h5diff/Makefile.am diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 0f0cc20..a96ebc4 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -52,7 +52,9 @@ IF (BUILD_TESTING) SET (HDF5_REFERENCE_TXT_FILES txtfp32.txt txtfp64.txt + txtuin16.txt txtuin32.txt + txtin8.txt txtin16.txt txtin32.txt textpfe64.txt @@ -203,19 +205,19 @@ IF (BUILD_TESTING) SET (last_test "H5IMPORT-h5importtest") # ----- TESTING "ASCII I32 rank 3 - Output BE " ; - ADD_H5_TEST (ASCII_I32 txtin16.txt txtin32.conf txtin32.h5) + ADD_H5_TEST (ASCII_I32 txtin32.txt txtin32.conf txtin32.h5) # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" ADD_H5_TEST (ASCII_I16 txtin16.txt txtin16.conf txtin16.h5) # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " - ADD_H5_TEST (ASCII_I8 txtin16.txt txtin8.conf txtin8.h5) + ADD_H5_TEST (ASCII_I8 txtin8.txt txtin8.conf txtin8.h5) # ----- TESTING "ASCII UI32 - rank 3 - Output BE" ADD_H5_TEST (ASCII_UI32 txtuin32.txt txtuin32.conf txtuin32.h5) # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " - ADD_H5_TEST (ASCII_UI16 txtuin32.txt txtuin16.conf txtuin16.h5) + ADD_H5_TEST (ASCII_UI16 txtuin16.txt txtuin16.conf txtuin16.h5) # ----- TESTING "ASCII F32 - rank 3 - Output LE " ADD_H5_TEST (ASCII_F32 txtfp32.txt txtfp32.conf txtfp32.h5) diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh index 943b194..ab12b81 100755 --- a/tools/h5import/h5importtestutil.sh +++ b/tools/h5import/h5importtestutil.sh @@ -94,7 +94,9 @@ $SRC_H5IMPORT_TESTFILES/textpfe.conf $SRC_H5IMPORT_TESTFILES/txtstr.conf $SRC_H5IMPORT_TESTFILES/txtfp32.txt $SRC_H5IMPORT_TESTFILES/txtfp64.txt +$SRC_H5IMPORT_TESTFILES/txtuin1632.txt $SRC_H5IMPORT_TESTFILES/txtuin32.txt +$SRC_H5IMPORT_TESTFILES/txtin8.txt $SRC_H5IMPORT_TESTFILES/txtin16.txt $SRC_H5IMPORT_TESTFILES/txtin32.txt $SRC_H5IMPORT_TESTFILES/textpfe64.txt @@ -174,20 +176,20 @@ $RUNSERIAL ./h5importtest ################################################ TESTING "ASCII I32 rank 3 - Output BE " ; -TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin32.conf -o txtin32.h5 +TOOLTEST $TESTDIR/txtin32.txt -c $TESTDIR/txtin32.conf -o txtin32.h5 TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5 TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " -TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin8.conf -o txtin8.h5 +TOOLTEST $TESTDIR/txtin8.txt -c $TESTDIR/txtin8.conf -o txtin8.h5 TESTING "ASCII UI32 - rank 3 - Output BE" TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5 TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " -TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5 +TOOLTEST $TESTDIR/txtuin16.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5 TESTING "ASCII F32 - rank 3 - Output LE " TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5 @@ -230,7 +232,7 @@ TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5 -rm -f txtin32.txt txtin16.txt *.bin *.h5 +rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.h5 rm -rf tmp_testfiles else echo "** h5import or h5importtest not available ***" diff --git a/tools/h5import/testfiles/txtin8.txt b/tools/h5import/testfiles/txtin8.txt new file mode 100644 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtin8.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 diff --git a/tools/h5import/testfiles/txtuin16.txt b/tools/h5import/testfiles/txtuin16.txt new file mode 100644 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtuin16.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 -- cgit v0.12 From 720769743e8f9abdc6f3f764c1f2c9332bf04337 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 2 Jul 2012 14:09:37 -0500 Subject: [svn-r22507] Correct file name typo --- tools/h5import/h5importtestutil.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh index ab12b81..37613dd 100755 --- a/tools/h5import/h5importtestutil.sh +++ b/tools/h5import/h5importtestutil.sh @@ -94,7 +94,7 @@ $SRC_H5IMPORT_TESTFILES/textpfe.conf $SRC_H5IMPORT_TESTFILES/txtstr.conf $SRC_H5IMPORT_TESTFILES/txtfp32.txt $SRC_H5IMPORT_TESTFILES/txtfp64.txt -$SRC_H5IMPORT_TESTFILES/txtuin1632.txt +$SRC_H5IMPORT_TESTFILES/txtuin16.txt $SRC_H5IMPORT_TESTFILES/txtuin32.txt $SRC_H5IMPORT_TESTFILES/txtin8.txt $SRC_H5IMPORT_TESTFILES/txtin16.txt -- cgit v0.12 From ce47ef777fe04aeaaf9ccbfd9a9643bbfe1d9fbd Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 2 Jul 2012 20:16:45 -0500 Subject: [svn-r22510] Enabled the compilation of tH5E_F03.f90 --- fortran/test/Makefile.am | 6 +----- fortran/test/Makefile.in | 10 +++------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index b05d651..b261785 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -67,12 +67,8 @@ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \ tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 if FORTRAN_2003_CONDITIONAL_F -# NAG Fortran compiler doesn't like the current tH5E_F03.f90 file that has only comments -# and no executable statements. -# Removed from the list of modules to build. EIP 2012-06-28 -# tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \ - tH5F.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 + tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 endif diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index f6a28cc..27198a8 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -118,9 +118,10 @@ fortranlib_test_1_8_LDADD = $(LDADD) fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ $(LIBH5F) $(LIBHDF5) am__fortranlib_test_F03_SOURCES_DIST = fortranlib_test_F03.f90 \ - tH5F.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 + tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 @FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = fortranlib_test_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.$(OBJEXT) \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5E_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5L_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5P_F03.$(OBJEXT) \ @FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT) @@ -491,13 +492,8 @@ fortranlib_test_SOURCES = fortranlib_test.f90 \ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \ tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 - -# NAG Fortran compiler doesn't like the current tH5E_F03.f90 file that has only comments -# and no executable statements. -# Removed from the list of modules to build. EIP 2012-06-28 -# tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 @FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5P_F03.f90 tH5T_F03.f90 fflush1_SOURCES = fflush1.f90 fflush2_SOURCES = fflush2.f90 -- cgit v0.12 From 862d74c6ffa1c965a6be8d24560eae9605252623 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 5 Jul 2012 09:36:53 -0500 Subject: [svn-r22514] Correct failure REGEX test to test value of TEST_EXPECT --- config/cmake/grepTest.cmake | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake index 9b5148c..365d9c3 100644 --- a/config/cmake/grepTest.cmake +++ b/config/cmake/grepTest.cmake @@ -43,18 +43,21 @@ MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}") # now grep the output with the reference FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +# TEST_REFERENCE should always be matched +STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) +STRING(COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) +IF (${TEST_RESULT} STREQUAL "0") + MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}") +ENDIF (${TEST_RESULT} STREQUAL "0") + STRING(REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) -IF (${TEST_EXPECT}) +IF (${TEST_EXPECT} STREQUAL "1") + # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match STRING(LENGTH "${TEST_MATCH}" TEST_RESULT) IF (NOT ${TEST_RESULT} STREQUAL "0") - MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_REFERENCE}") + MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") ENDIF (NOT ${TEST_RESULT} STREQUAL "0") -ELSE (${TEST_EXPECT}) - STRING(COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) - IF (${TEST_RESULT} STREQUAL "0") - MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}") - ENDIF (${TEST_RESULT} STREQUAL "0") -ENDIF (${TEST_EXPECT}) +ENDIF (${TEST_EXPECT} STREQUAL "0") # everything went fine... MESSAGE ("Passed: The output of ${TEST_PROGRAM} matched") -- cgit v0.12 From 6f5ba815f01f4f52301e0326b32f5a3bb08a7e90 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 5 Jul 2012 14:59:36 -0500 Subject: [svn-r22516] Add new testfiles for h5dump with eight varieties of ints and used in an Attribute and Compound datatypes. Tested: local linux using CMake --- MANIFEST | 4 + tools/h5dump/CMakeLists.txt | 12 + tools/h5dump/h5dumpgentest.c | 582 ++++++++++++++++++++++++++++++++++- tools/h5dump/testh5dump.sh.in | 10 +- tools/testfiles/tcmpdattrintsize.ddl | 316 +++++++++++++++++++ tools/testfiles/tcmpdattrintsize.h5 | Bin 0 -> 47016 bytes tools/testfiles/tcmpdintsize.ddl | 316 +++++++++++++++++++ tools/testfiles/tcmpdintsize.h5 | Bin 0 -> 49760 bytes 8 files changed, 1236 insertions(+), 4 deletions(-) create mode 100644 tools/testfiles/tcmpdattrintsize.ddl create mode 100644 tools/testfiles/tcmpdattrintsize.h5 create mode 100644 tools/testfiles/tcmpdintsize.ddl create mode 100644 tools/testfiles/tcmpdintsize.h5 diff --git a/MANIFEST b/MANIFEST index c103fe9..755f8ae 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1350,6 +1350,10 @@ ./tools/testfiles/tbitfields.h5 ./tools/testfiles/tchar.h5 ./tools/testfiles/tchar1.ddl +./tools/testfiles/tcmpdattrintsize.ddl +./tools/testfiles/tcmpdintsize.ddl +./tools/testfiles/tcmpdattrintsize.h5 +./tools/testfiles/tcmpdintsize.h5 ./tools/testfiles/tcomp-1.ddl ./tools/testfiles/tcomp-2.ddl ./tools/testfiles/tcomp-3.ddl diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index d6c43c0..3bc481d 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -83,6 +83,8 @@ IF (BUILD_TESTING) tboot2.ddl tchar1.ddl tchunked.ddl + tcmpdattrintsize.ddl + tcmpdintsize.ddl tcomp-1.ddl tcomp-2.ddl tcomp-3.ddl @@ -264,6 +266,8 @@ IF (BUILD_TESTING) tbigdims.h5 tbinary.h5 tchar.h5 + tcmpdattrintsize.h5 + tcmpdintsize.h5 tcompound.h5 tcompound_complex.h5 tdatareg.h5 @@ -750,6 +754,10 @@ IF (BUILD_TESTING) tchar1.out.err tchunked.out tchunked.out.err + tcmpdattrintsize.out + tcmpdattrintsize.out.err + tcmpdintsize.out + tcmpdintsize.out.err tcomp-1.out tcomp-1.out.err tcomp-2.out @@ -939,8 +947,12 @@ IF (BUILD_TESTING) # test for signed/unsigned datasets 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 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 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 f204499..715e0df 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -99,9 +99,8 @@ #define FILE67 "zerodim.h5" #define FILE68 "charsets.h5" #define FILE69 "tattrintsize.h5" - - - +#define FILE70 "tcmpdintsize.h5" +#define FILE71 "tcmpdattrintsize.h5" /*------------------------------------------------------------------------- * prototypes @@ -278,6 +277,29 @@ typedef struct s1_t { #define F66_YDIM64 64 #define F66_DUMMYDBL "DummyDBL" +/* "FILE70" macros and for FILE71 */ +/* Name of dataset to create in datafile */ +#define F70_DATASETNAME "CompoundIntSize" +#define F70_LENGTH 4 +#define F70_RANK 1 +#define F70_ARRAY_RANK 2 +#define F70_XDIM 8 +#define F70_DATASETU08 "DU08BITS" +#define F70_DATASETS08 "DS08BITS" +#define F70_YDIM8 8 +#define F70_DATASETU16 "DU16BITS" +#define F70_DATASETS16 "DS16BITS" +#define F70_YDIM16 16 +#define F70_DATASETU32 "DU32BITS" +#define F70_DATASETS32 "DS32BITS" +#define F70_YDIM32 32 +#define F70_DATASETU64 "DU64BITS" +#define F70_DATASETS64 "DS64BITS" +#define F70_YDIM64 64 +#define F70_DUMMYDBL "DummyDBL" +/* Name of dataset to create in datafile */ +#define F71_DATASETNAME "CompoundAttrIntSize" + static void gent_group(void) { @@ -7372,6 +7394,558 @@ gent_charsets(void) H5Fclose( fid ); } +static void gent_compound_intsizes(void) { + hid_t fid, dataset, space, root; + hsize_t dims[2]; + hsize_t array_dim8[]={F70_XDIM,F70_YDIM8}; /* Array dimensions */ + hsize_t array_dim16[]={F70_XDIM,F70_YDIM16}; /* Array dimensions */ + hsize_t array_dim32[]={F70_XDIM,F70_YDIM32}; /* Array dimensions */ + hsize_t array_dim64[]={F70_XDIM,F70_YDIM64}; /* Array dimensions */ + hid_t arrayu8_tid; /* Array datatype handle */ + hid_t arrayu16_tid; /* Array datatype handle */ + hid_t arrayu32_tid; /* Array datatype handle */ + hid_t arrayu64_tid; /* Array datatype handle */ + hid_t array8_tid; /* Array datatype handle */ + hid_t array16_tid; /* Array datatype handle */ + hid_t array32_tid; /* Array datatype handle */ + hid_t array64_tid; /* Array datatype handle */ + hid_t arraydbl_tid; /* Array datatype handle */ + uint8_t valu8bits; + uint16_t valu16bits; + uint32_t valu32bits; + uint64_t valu64bits; + int8_t val8bits; + int16_t val16bits; + int32_t val32bits; + int64_t val64bits; + /* Structure and array for compound types */ + typedef struct Array1Struct { + uint8_t dsetu8[F70_XDIM][F70_YDIM8]; + uint16_t dsetu16[F70_XDIM][F70_YDIM16]; + uint32_t dsetu32[F70_XDIM][F70_YDIM32]; + uint64_t dsetu64[F70_XDIM][F70_YDIM64]; + int8_t dset8[F70_XDIM][F70_YDIM8]; + int16_t dset16[F70_XDIM][F70_YDIM16]; + int32_t dset32[F70_XDIM][F70_YDIM32]; + int64_t dset64[F70_XDIM][F70_YDIM64]; + double dsetdbl[F70_XDIM][F70_YDIM8]; + } Array1Struct; + Array1Struct Array1[F70_LENGTH]; + + hid_t Array1Structid; /* File datatype identifier */ + herr_t status; /* Error checking variable */ + hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */ + + int m, n, o; /* Array init loop vars */ + + /* Initialize the data in the arrays/datastructure */ + for (m = 0; m < F70_LENGTH; m++) { + + /* Array of 8 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM8; + + valu8bits = (uint8_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu8[n][0] = valu8bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu8[n][o] = Array1[m].dsetu8[n][o-1] << 1; + } + valu8bits <<= 1; + } + + /* Array of 16 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM16; + + valu16bits = (uint16_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu16[n][0] = valu16bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu16[n][o] = Array1[m].dsetu16[n][o-1] << 1; + } + valu16bits <<= 1; + } + + /* Array of 32 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM32; + + valu32bits = (uint32_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu32[n][0] = valu32bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu32[n][o] = Array1[m].dsetu32[n][o-1] << 1; + } + valu32bits <<= 1; + } + + /* Array of 64 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM64; + + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu64[n][0] = valu64bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu64[n][o] = Array1[m].dsetu64[n][o-1] << 1; + } + valu64bits <<= 1; + } + + /* Array of 8 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM8; + + val8bits = (int8_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset8[n][0] = val8bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset8[n][o] = Array1[m].dset8[n][o-1] << 1; + } + val8bits <<= 1; + } + + /* Array of 16 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM16; + + val16bits = (int16_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset16[n][0] = val16bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset16[n][o] = Array1[m].dset16[n][o-1] << 1; + } + val16bits <<= 1; + } + + /* Array of 32 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM32; + + val32bits = (int32_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset32[n][0] = val32bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset32[n][o] = Array1[m].dset32[n][o-1] << 1; + } + val32bits <<= 1; + } + + /* Array of 64 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM64; + + val64bits = (int64_t) ~0L; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset64[n][0] = val64bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset64[n][o] = Array1[m].dset64[n][o-1] << 1; + } + val64bits <<= 1; + } + + /* Double Dummy set for failure tests */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM8; + + for(n = 0; n < dims[0]; n++) + for(o = 0; o < dims[1]; o++) + Array1[m].dsetdbl[n][o] = 0.0001 * o + n; + } + + /* Create the array data type for the 8 bits signed int array */ + array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8); + HDassert(array8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16); + HDassert(array16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32); + HDassert(array32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64); + HDassert(array64_tid >= 0); + + /* Create the array data type for the 8 bits signed int array */ + arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8); + HDassert(arrayu8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16); + HDassert(arrayu16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32); + HDassert(arrayu32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64); + HDassert(arrayu64_tid >= 0); + + /* Create the array data type for the 32 bits double array */ + arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8); + HDassert(arraydbl_tid >= 0); + + /* Create the dataspace */ + space = H5Screate_simple(F70_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the file */ + fid = H5Fcreate(FILE70, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid >= 0); + + /* Create the memory data type */ + Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); + HDassert(Array1Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F70_DATASETNAME, Array1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Array1Structid); + HDassert(status >= 0); + + status = H5Tclose(arrayu8_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu16_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu32_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu64_tid); + HDassert(status >= 0); + + status = H5Tclose(array8_tid); + HDassert(status >= 0); + + status = H5Tclose(array16_tid); + HDassert(status >= 0); + + status = H5Tclose(array32_tid); + HDassert(status >= 0); + + status = H5Tclose(array64_tid); + HDassert(status >= 0); + + status = H5Tclose(arraydbl_tid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Dclose(dataset); + HDassert(status >= 0); + + status = H5Fclose(fid); + HDassert(status >= 0); +} + +static void gent_compound_attr_intsizes(void) { + hid_t fid, attr, space, root; + hsize_t dims[2]; + hsize_t array_dim8[]={F70_XDIM,F70_YDIM8}; /* Array dimensions */ + hsize_t array_dim16[]={F70_XDIM,F70_YDIM16}; /* Array dimensions */ + hsize_t array_dim32[]={F70_XDIM,F70_YDIM32}; /* Array dimensions */ + hsize_t array_dim64[]={F70_XDIM,F70_YDIM64}; /* Array dimensions */ + hid_t arrayu8_tid; /* Array datatype handle */ + hid_t arrayu16_tid; /* Array datatype handle */ + hid_t arrayu32_tid; /* Array datatype handle */ + hid_t arrayu64_tid; /* Array datatype handle */ + hid_t array8_tid; /* Array datatype handle */ + hid_t array16_tid; /* Array datatype handle */ + hid_t array32_tid; /* Array datatype handle */ + hid_t array64_tid; /* Array datatype handle */ + hid_t arraydbl_tid; /* Array datatype handle */ + uint8_t valu8bits; + uint16_t valu16bits; + uint32_t valu32bits; + uint64_t valu64bits; + int8_t val8bits; + int16_t val16bits; + int32_t val32bits; + int64_t val64bits; + /* Structure and array for compound types */ + typedef struct Array1Struct { + uint8_t dsetu8[F70_XDIM][F70_YDIM8]; + uint16_t dsetu16[F70_XDIM][F70_YDIM16]; + uint32_t dsetu32[F70_XDIM][F70_YDIM32]; + uint64_t dsetu64[F70_XDIM][F70_YDIM64]; + int8_t dset8[F70_XDIM][F70_YDIM8]; + int16_t dset16[F70_XDIM][F70_YDIM16]; + int32_t dset32[F70_XDIM][F70_YDIM32]; + int64_t dset64[F70_XDIM][F70_YDIM64]; + double dsetdbl[F70_XDIM][F70_YDIM8]; + } Array1Struct; + Array1Struct Array1[F70_LENGTH]; + + hid_t Array1Structid; /* File datatype identifier */ + herr_t status; /* Error checking variable */ + hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */ + + int m, n, o; /* Array init loop vars */ + + /* Initialize the data in the arrays/datastructure */ + for (m = 0; m < F70_LENGTH; m++) { + + /* Array of 8 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM8; + + valu8bits = (uint8_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu8[n][0] = valu8bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu8[n][o] = Array1[m].dsetu8[n][o-1] << 1; + } + valu8bits <<= 1; + } + + /* Array of 16 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM16; + + valu16bits = (uint16_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu16[n][0] = valu16bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu16[n][o] = Array1[m].dsetu16[n][o-1] << 1; + } + valu16bits <<= 1; + } + + /* Array of 32 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM32; + + valu32bits = (uint32_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu32[n][0] = valu32bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu32[n][o] = Array1[m].dsetu32[n][o-1] << 1; + } + valu32bits <<= 1; + } + + /* Array of 64 bits unsigned int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM64; + + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dsetu64[n][0] = valu64bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dsetu64[n][o] = Array1[m].dsetu64[n][o-1] << 1; + } + valu64bits <<= 1; + } + + /* Array of 8 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM8; + + val8bits = (int8_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset8[n][0] = val8bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset8[n][o] = Array1[m].dset8[n][o-1] << 1; + } + val8bits <<= 1; + } + + /* Array of 16 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM16; + + val16bits = (int16_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset16[n][0] = val16bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset16[n][o] = Array1[m].dset16[n][o-1] << 1; + } + val16bits <<= 1; + } + + /* Array of 32 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM32; + + val32bits = (int32_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset32[n][0] = val32bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset32[n][o] = Array1[m].dset32[n][o-1] << 1; + } + val32bits <<= 1; + } + + /* Array of 64 bits signed int */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM64; + + val64bits = (int64_t) ~0L; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Array1[m].dset64[n][0] = val64bits; + for(o = 1; o < dims[1]; o++) { + Array1[m].dset64[n][o] = Array1[m].dset64[n][o-1] << 1; + } + val64bits <<= 1; + } + + /* Double Dummy set for failure tests */ + dims[0] = F70_XDIM; dims[1] = F70_YDIM8; + + for(n = 0; n < dims[0]; n++) + for(o = 0; o < dims[1]; o++) + Array1[m].dsetdbl[n][o] = 0.0001 * o + n; + } + + /* Create the array data type for the 8 bits signed int array */ + array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8); + HDassert(array8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16); + HDassert(array16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32); + HDassert(array32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64); + HDassert(array64_tid >= 0); + + /* Create the array data type for the 8 bits signed int array */ + arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8); + HDassert(arrayu8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16); + HDassert(arrayu16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32); + HDassert(arrayu32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64); + HDassert(arrayu64_tid >= 0); + + /* Create the array data type for the 32 bits double array */ + arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8); + HDassert(arraydbl_tid >= 0); + + /* Create the dataspace */ + space = H5Screate_simple(F70_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the file */ + fid = H5Fcreate(FILE71, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid >= 0); + + /* Create the memory data type */ + Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); + HDassert(Array1Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid); + HDassert(status >= 0); + + root = H5Gopen2(fid, "/", H5P_DEFAULT); + + /* Create the Attribute */ + attr = H5Acreate2(root, F71_DATASETNAME, Array1Structid, space, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the attribute */ + status = H5Awrite(attr, Array1Structid, Array1); + HDassert(status >= 0); + + status = H5Tclose(arrayu8_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu16_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu32_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu64_tid); + HDassert(status >= 0); + + status = H5Tclose(array8_tid); + HDassert(status >= 0); + + status = H5Tclose(array16_tid); + HDassert(status >= 0); + + status = H5Tclose(array32_tid); + HDassert(status >= 0); + + status = H5Tclose(array64_tid); + HDassert(status >= 0); + + status = H5Tclose(arraydbl_tid); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Array1Structid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Aclose(attr); + HDassert(status >= 0); + + status = H5Fclose(fid); + HDassert(status >= 0); +} + /*------------------------------------------------------------------------- * Function: main @@ -7451,6 +8025,8 @@ int main(void) gent_packedbits(); gent_attr_intsize(); gent_charsets(); + gent_compound_intsizes(); + gent_compound_attr_intsizes(); return 0; } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 5180782..3bd0dfd 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -91,13 +91,15 @@ $SRC_H5DUMP_TESTFILES/tarray6.h5 $SRC_H5DUMP_TESTFILES/tarray7.h5 $SRC_H5DUMP_TESTFILES/tarray8.h5 $SRC_H5DUMP_TESTFILES/tattr.h5 -$SRC_H5DUMP_TESTFILES/tattrintsize.h5 $SRC_H5DUMP_TESTFILES/tattr2.h5 $SRC_H5DUMP_TESTFILES/tattr4_be.h5 +$SRC_H5DUMP_TESTFILES/tattrintsize.h5 $SRC_H5DUMP_TESTFILES/tattrreg.h5 $SRC_H5DUMP_TESTFILES/tbigdims.h5 $SRC_H5DUMP_TESTFILES/tbinary.h5 $SRC_H5DUMP_TESTFILES/tchar.h5 +$SRC_H5DUMP_TESTFILES/tcmpdattrintsize.h5 +$SRC_H5DUMP_TESTFILES/tcmpdintsize.h5 $SRC_H5DUMP_TESTFILES/tcompound.h5 $SRC_H5DUMP_TESTFILES/tcompound_complex.h5 $SRC_H5DUMP_TESTFILES/tdatareg.h5 @@ -203,6 +205,8 @@ $SRC_H5DUMP_TESTFILES/tboot1.ddl $SRC_H5DUMP_TESTFILES/tboot2.ddl $SRC_H5DUMP_TESTFILES/tchar1.ddl $SRC_H5DUMP_TESTFILES/tchunked.ddl +$SRC_H5DUMP_TESTFILES/tcmpdattrintsize.ddl +$SRC_H5DUMP_TESTFILES/tcmpdintsize.ddl $SRC_H5DUMP_TESTFILES/tcomp-1.ddl $SRC_H5DUMP_TESTFILES/tcomp-2.ddl $SRC_H5DUMP_TESTFILES/tcomp-3.ddl @@ -570,8 +574,12 @@ COPY_TESTFILES_TO_TESTDIR # test for signed/unsigned datasets 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 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 displaying groups TOOLTEST tgroup-1.ddl --enable-error-stack tgroup.h5 # test for displaying the selected groups diff --git a/tools/testfiles/tcmpdattrintsize.ddl b/tools/testfiles/tcmpdattrintsize.ddl new file mode 100644 index 0000000..17b5b77 --- /dev/null +++ b/tools/testfiles/tcmpdattrintsize.ddl @@ -0,0 +1,316 @@ +HDF5 "tcmpdattrintsize.h5" { +GROUP "/" { + ATTRIBUTE "CompoundAttrIntSize" { + DATATYPE H5T_COMPOUND { + H5T_ARRAY { [8][8] H5T_STD_U8LE } "DU08BITS"; + H5T_ARRAY { [8][16] H5T_STD_U16LE } "DU16BITS"; + H5T_ARRAY { [8][32] H5T_STD_U32LE } "DU32BITS"; + H5T_ARRAY { [8][64] H5T_STD_U64LE } "DU64BITS"; + H5T_ARRAY { [8][8] H5T_STD_I8LE } "DS08BITS"; + H5T_ARRAY { [8][16] H5T_STD_I16LE } "DS16BITS"; + H5T_ARRAY { [8][32] H5T_STD_I32LE } "DS32BITS"; + H5T_ARRAY { [8][64] H5T_STD_I64LE } "DS64BITS"; + H5T_ARRAY { [8][8] H5T_IEEE_F64LE } "DummyDBL"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + }, + (1): { + [ 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + }, + (2): { + [ 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + }, + (3): { + [ 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + } + } + } +} +} diff --git a/tools/testfiles/tcmpdattrintsize.h5 b/tools/testfiles/tcmpdattrintsize.h5 new file mode 100644 index 0000000..40d4887 Binary files /dev/null and b/tools/testfiles/tcmpdattrintsize.h5 differ diff --git a/tools/testfiles/tcmpdintsize.ddl b/tools/testfiles/tcmpdintsize.ddl new file mode 100644 index 0000000..ba296e1 --- /dev/null +++ b/tools/testfiles/tcmpdintsize.ddl @@ -0,0 +1,316 @@ +HDF5 "tcmpdintsize.h5" { +GROUP "/" { + DATASET "CompoundIntSize" { + DATATYPE H5T_COMPOUND { + H5T_ARRAY { [8][8] H5T_STD_U8LE } "DU08BITS"; + H5T_ARRAY { [8][16] H5T_STD_U16LE } "DU16BITS"; + H5T_ARRAY { [8][32] H5T_STD_U32LE } "DU32BITS"; + H5T_ARRAY { [8][64] H5T_STD_U64LE } "DU64BITS"; + H5T_ARRAY { [8][8] H5T_STD_I8LE } "DS08BITS"; + H5T_ARRAY { [8][16] H5T_STD_I16LE } "DS16BITS"; + H5T_ARRAY { [8][32] H5T_STD_I32LE } "DS32BITS"; + H5T_ARRAY { [8][64] H5T_STD_I64LE } "DS64BITS"; + H5T_ARRAY { [8][8] H5T_IEEE_F64LE } "DummyDBL"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + }, + (1): { + [ 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + }, + (2): { + [ 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + }, + (3): { + [ 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 ], + [ 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 ], + [ 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 ], + [ 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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ -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 ], + [ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 ] + } + } + } +} +} diff --git a/tools/testfiles/tcmpdintsize.h5 b/tools/testfiles/tcmpdintsize.h5 new file mode 100644 index 0000000..0e7bef5 Binary files /dev/null and b/tools/testfiles/tcmpdintsize.h5 differ -- cgit v0.12 From 9e79829ab8a586914c52d252b662d8fe5824112f Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 9 Jul 2012 11:54:50 -0500 Subject: [svn-r22525] Snapshot version 1.9 release 124 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.in | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- windows/src/H5pubconf.h | 6 +++--- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.txt b/README.txt index 0186b6f..fcecd58 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.123 currently under development +HDF5 version 1.9.124 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 544c719..b83f4e1 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -431,7 +431,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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 9d32ebd..4ad3051 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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 10b6a26..32d384b 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Id: configure.in 22487 2012-06-24 14:29:36Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for HDF5 1.9.123. +# Generated by GNU Autoconf 2.68 for HDF5 1.9.124. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.123' -PACKAGE_STRING='HDF5 1.9.123' +PACKAGE_VERSION='1.9.124' +PACKAGE_STRING='HDF5 1.9.124' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1463,7 +1463,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.123 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.124 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1533,7 +1533,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.123:";; + short | recursive ) echo "Configuration of HDF5 1.9.124:";; esac cat <<\_ACEOF @@ -1726,7 +1726,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.123 +HDF5 configure 1.9.124 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2815,7 +2815,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.123, which was +It was created by HDF5 $as_me 1.9.124, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3636,7 +3636,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.123' + VERSION='1.9.124' cat >>confdefs.h <<_ACEOF @@ -30668,7 +30668,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.123, which was +This file was extended by HDF5 $as_me 1.9.124, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30734,7 +30734,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.123 +HDF5 config.status 1.9.124 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -33529,7 +33529,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.123 +HDF5 config.lt 1.9.124 configured by $0, generated by GNU Autoconf 2.68. Copyright (C) 2010 Free Software Foundation, Inc. diff --git a/configure.in b/configure.in index 953c488..975e848 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ dnl dnl NOTE: Don't forget to change the version number here when we do a dnl release!!! dnl -AC_INIT([HDF5], [1.9.123], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.124], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AM_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index dc267f8..e0fd502 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -478,7 +478,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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 5c4d5f7..f22d1c8 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -421,7 +421,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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 3685893..aeea150 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -436,7 +436,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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index adc4ee1..429ff08 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -420,7 +420,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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index e1913d0..fe9e703 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.123 currently under development +HDF5 version 1.9.124 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index deedbf8..b6ee623 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 123 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 124 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.123" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.124" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 6b1df70..fa003a9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -484,7 +484,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 = 113 +LT_VERS_REVISION = 114 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 965f2d6..1180249 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.123" +#define H5_PACKAGE_STRING "HDF5 1.9.124" /* 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.123" +#define H5_PACKAGE_VERSION "1.9.124" /* 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.123" +#define H5_VERSION "1.9.124" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index a1d3308..23592d1 100644 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -527,7 +527,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.123" +#define H5_PACKAGE_STRING "HDF5 1.9.124" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -536,7 +536,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.123" +#define H5_PACKAGE_VERSION "1.9.124" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "I64" @@ -707,7 +707,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.123" +#define H5_VERSION "1.9.124" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From 1a195c1ee0e9db43eb73495d069b68624df5eae6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 9 Jul 2012 12:25:16 -0500 Subject: [svn-r22526] ifdef around the text file generation in importtest. reordered tests so that both scripts are in similar order. Changed ADD_H5_TEST in CMake file to always delete the created h5 file. Tested: local linux --- tools/h5import/CMakeLists.txt | 76 ++++++++++++++++++-------------------- tools/h5import/h5importtest.c | 32 ++++++++++++---- tools/h5import/h5importtestutil.sh | 18 ++++----- 3 files changed, 69 insertions(+), 57 deletions(-) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index a96ebc4..bbe73a8 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -92,7 +92,7 @@ IF (BUILD_TESTING) ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${txt_file}") + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") #MESSAGE (STATUS " Copying ${txt_file}") ADD_CUSTOM_COMMAND ( TARGET h5import @@ -119,24 +119,22 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## MACRO (ADD_H5_TEST testname importfile conffile testfile) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5IMPORT-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${testfile} - ${testfile}.new - ${testfile}.new.err - ${testfile}.out - ${testfile}.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5IMPORT-${testname}-clear-objects") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5IMPORT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${testfile} + ${testfile}.new + ${testfile}.new.err + ${testfile}.out + ${testfile}.out.err + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5IMPORT-${testname}-clear-objects") - ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c testfiles/${conffile} -o ${testfile}) + ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c ${conffile} -o ${testfile}) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -192,8 +190,6 @@ IF (BUILD_TESTING) binin32.bin binuin16.bin binuin32.bin - txtin16.txt - txtin32.txt ${HDF5_REFERENCE_TEST_FILES} ) SET (last_test "H5IMPORT-clear-objects") @@ -205,52 +201,52 @@ IF (BUILD_TESTING) SET (last_test "H5IMPORT-h5importtest") # ----- TESTING "ASCII I32 rank 3 - Output BE " ; - ADD_H5_TEST (ASCII_I32 txtin32.txt txtin32.conf txtin32.h5) + ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5) # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" - ADD_H5_TEST (ASCII_I16 txtin16.txt txtin16.conf txtin16.h5) + ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5) # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " - ADD_H5_TEST (ASCII_I8 txtin8.txt txtin8.conf txtin8.h5) - - # ----- TESTING "ASCII UI32 - rank 3 - Output BE" - ADD_H5_TEST (ASCII_UI32 txtuin32.txt txtuin32.conf txtuin32.h5) + ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5) # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " - ADD_H5_TEST (ASCII_UI16 txtuin16.txt txtuin16.conf txtuin16.h5) + ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5) + + # ----- TESTING "ASCII UI32 - rank 3 - Output BE" + ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5) # ----- TESTING "ASCII F32 - rank 3 - Output LE " - ADD_H5_TEST (ASCII_F32 txtfp32.txt txtfp32.conf txtfp32.h5) + ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5) # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " - ADD_H5_TEST (ASCII_F64 txtfp64.txt txtfp64.conf txtfp64.h5) + ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5) # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " - ADD_H5_TEST (BINARY_F64 binfp64.bin binfp64.conf binfp64.h5) - - # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " - ADD_H5_TEST (BINARY_I16 binin16.bin binin16.conf binin16.h5) + ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5) # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " - ADD_H5_TEST (BINARY_I8 binin8.bin binin8.conf binin8.h5) + ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5) + + # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " + ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5) # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " - ADD_H5_TEST (BINARY_I32 binin32.bin binin32.conf binin32.h5) + ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5) # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " - ADD_H5_TEST (BINARY_UI16 binuin16.bin binuin16.conf binuin16.h5) + ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5) # ----- TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " - ADD_H5_TEST (BINARY_UI32 binuin32.bin binuin32.conf binuin32.h5) + ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5) # ----- TESTING "STR" - ADD_H5_TEST (STR txtstr.txt txtstr.conf txtstr.h5) + ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5) # ----- TESTING "BINARY I8 CR LF EOF" - ADD_H5_TEST (BINARY_I8_EOF binin8w.bin binin8w.conf binin8w.h5) + ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5) # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " - ADD_H5_TEST (ASCII_F64_R1 textpfe64.txt textpfe.conf textpfe.h5) + ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5) ENDIF (BUILD_TESTING) diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c index 434cba7..49f977c 100644 --- a/tools/h5import/h5importtest.c +++ b/tools/h5import/h5importtest.c @@ -165,21 +165,38 @@ main(void) #ifndef UNICOS +#ifdef REBUILDTEXTFILES /*------------------------------------------------------------------------- - * TOOLTEST txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 + * TOOLTEST txtin8.txt -c $srcdir/testfiles/txtin8.conf -o txtin8.h5 *------------------------------------------------------------------------- */ + sp = HDfopen("txtin8.txt", "w"); + for (k = 0; k < npln; k++) + { + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + (void) fprintf(sp, "%10u", b8i3[k][i][j]); + (void) fprintf(sp, "\n"); + } + } + (void) HDfclose(sp); + + /*------------------------------------------------------------------------- + * TOOLTEST txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 + *------------------------------------------------------------------------- + */ sp = HDfopen("txtin16.txt", "w"); for (k = 0; k < npln; k++) { - for (i = 0; i < nrow; i++) - { - for (j = 0; j < ncol; j++) - (void) fprintf(sp, "%10u", b16i3[k][i][j]); - (void) fprintf(sp, "\n"); - } + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + (void) fprintf(sp, "%10u", b16i3[k][i][j]); + (void) fprintf(sp, "\n"); + } } (void) HDfclose(sp); @@ -199,6 +216,7 @@ main(void) } } (void) HDfclose(sp); +#endif /*------------------------------------------------------------------------- * TOOLTEST binin32.bin -c $srcdir/testfiles/binin32.conf -o binin32.h5 diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh index 37613dd..7289b2a 100755 --- a/tools/h5import/h5importtestutil.sh +++ b/tools/h5import/h5importtestutil.sh @@ -181,20 +181,20 @@ TOOLTEST $TESTDIR/txtin32.txt -c $TESTDIR/txtin32.conf -o txtin32.h5 TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5 - TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " TOOLTEST $TESTDIR/txtin8.txt -c $TESTDIR/txtin8.conf -o txtin8.h5 -TESTING "ASCII UI32 - rank 3 - Output BE" -TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5 TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " TOOLTEST $TESTDIR/txtuin16.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5 +TESTING "ASCII UI32 - rank 3 - Output BE" +TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5 + + TESTING "ASCII F32 - rank 3 - Output LE " TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5 - TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " TOOLTEST $TESTDIR/txtfp64.txt -c $TESTDIR/txtfp64.conf -o txtfp64.h5 @@ -202,13 +202,11 @@ TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " TOOLTEST binfp64.bin -c $TESTDIR/binfp64.conf -o binfp64.h5 -TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " -TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o binin16.h5 - - TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " TOOLTEST binin8.bin -c $TESTDIR/binin8.conf -o binin8.h5 +TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " +TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o binin16.h5 TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " TOOLTEST binin32.bin -c $TESTDIR/binin32.conf -o binin32.h5 @@ -224,6 +222,7 @@ TOOLTEST binuin32.bin -c $TESTDIR/binuin32.conf -o binuin32.h5 TESTING "STR" TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5 + TESTING "BINARY I8 CR LF EOF" TOOLTEST binin8w.bin -c $TESTDIR/binin8w.conf -o binin8w.h5 @@ -231,8 +230,7 @@ TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5 - -rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.h5 +rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.h5 rm -rf tmp_testfiles else echo "** h5import or h5importtest not available ***" -- cgit v0.12 From b3cafaa61d32e7678a46c684f8fe1d02b40ebb12 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 9 Jul 2012 12:32:07 -0500 Subject: [svn-r22527] Update Ignore List for change to H5IMPORT tests --- config/cmake/CTestCustom.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index b54bedc..5537195 100755 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -53,6 +53,22 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE H5DUMP-XML-clearall-objects ######### tools/h5import ######### H5IMPORT-clear-objects + H5IMPORT-ASCII_I32-clear-objects + H5IMPORT-ASCII_I16-clear-objects + H5IMPORT-ASCII_I8-clear-objects + H5IMPORT-ASCII_UI16-clear-objects + H5IMPORT-ASCII_UI32-clear-objects + H5IMPORT-ASCII_F32-clear-objects + H5IMPORT-ASCII_F64-clear-objects + H5IMPORT-BINARY_F64-clear-objects + H5IMPORT-BINARY_I8-clear-objects + H5IMPORT-BINARY_I16-clear-objects + H5IMPORT-BINARY_I32-clear-objects + H5IMPORT-BINARY_UI16-clear-objects + H5IMPORT-BINARY_UI32-clear-objects + H5IMPORT-STR-clear-objects + H5IMPORT-BINARY_I8_EOF-clear-objects + H5IMPORT-ASCII_F64_R1-clear-objects ######### tools/h5jam ######### H5JAM-SETUP-N_twithub_u10_c-clear-objects H5JAM-SETUP-N_twithub_u10_c -- cgit v0.12 From 637df34074604c314cd55a3b0cad733e35255ceb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 9 Jul 2012 13:02:24 -0500 Subject: [svn-r22528] HDFFV-4206: h5dump -w0 needed to be tested within the get option function. Tested: local linux and all H5DUMP tests still work --- tools/h5dump/h5dump.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 2799d95..1a70d11 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1035,6 +1035,9 @@ parse_start: break; case 'w': h5tools_nCols = HDatoi(opt_arg); + if (h5tools_nCols==0) { + h5tools_nCols = 65535; + } last_was_dset = FALSE; break; case 'a': -- cgit v0.12 From 17eca872f13fb7e880438dca76f40d371293bc8a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 9 Jul 2012 14:41:17 -0500 Subject: [svn-r22531] HDFFV-5942: sort options with contents option Added static local variables in h5trav to hold the index_by and index_order values. Defaults are set. H5dump only use of the trav_print function, added two parameters and passed in the sort_by and sort_order variables. Tested: local linux --- MANIFEST | 2 ++ tools/h5dump/CMakeLists.txt | 2 ++ tools/h5dump/h5dump_ddl.c | 2 +- tools/h5dump/testh5dump.sh.in | 2 ++ tools/lib/h5trav.c | 16 +++++++++++++--- tools/lib/h5trav.h | 2 +- tools/testfiles/tordercontents1.ddl | 11 +++++++++++ tools/testfiles/tordercontents2.ddl | 11 +++++++++++ 8 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 tools/testfiles/tordercontents1.ddl create mode 100644 tools/testfiles/tordercontents2.ddl diff --git a/MANIFEST b/MANIFEST index 755f8ae..4c750a5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1471,6 +1471,8 @@ ./tools/testfiles/tall-2A.ddl ./tools/testfiles/tall-2B.ddl ./tools/testfiles/tcontents.ddl +./tools/testfiles/tordercontents1.ddl +./tools/testfiles/tordercontents2.ddl ./tools/testfiles/tfilters.h5 ./tools/testfiles/tchunked.ddl ./tools/testfiles/tcompact.ddl diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 3bc481d..d89db0d 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1096,6 +1096,8 @@ IF (BUILD_TESTING) # test for file contents ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) + ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5) + ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5) # tests for storage layout # compact diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 22d2a2b..c0a9884 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1294,7 +1294,7 @@ dump_fcontents(hid_t fid) } /* print objects in the files */ - h5trav_print(fid); + h5trav_print(fid, sort_by, sort_order); HDfprintf(rawoutstream, " %s\n",END); } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 3bd0dfd..8c7d754 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -720,6 +720,8 @@ TOOLTEST3 tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5 # test for file contents TOOLTEST tcontents.ddl --enable-error-stack -n tfcontents1.h5 +TOOLTEST tordercontents1.ddl --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5 +TOOLTEST tordercontents2.ddl --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5 # tests for storage layout # compact diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index ad8b9fe..ed2abeb 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -61,6 +61,13 @@ static void trav_table_addlink(trav_table_t *table, const char *path); /*------------------------------------------------------------------------- + * local variables + *------------------------------------------------------------------------- + */ +static H5_index_t trav_index_by = H5_INDEX_NAME; +static H5_iter_order_t trav_index_order = H5_ITER_INC; + +/*------------------------------------------------------------------------- * "h5trav info" public functions. used in h5diff *------------------------------------------------------------------------- */ @@ -255,12 +262,12 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, /* Check for iteration of links vs. visiting all links recursively */ if(recurse) { /* Visit all links in group, recursively */ - if(H5Lvisit_by_name(file_id, grp_name, H5_INDEX_NAME, H5_ITER_INC, traverse_cb, &udata, H5P_DEFAULT) < 0) + if(H5Lvisit_by_name(file_id, grp_name, trav_index_by, trav_index_order, traverse_cb, &udata, H5P_DEFAULT) < 0) return -1; } /* end if */ else { /* Iterate over links in group */ - if(H5Literate_by_name(file_id, grp_name, H5_INDEX_NAME, H5_ITER_INC, NULL, traverse_cb, &udata, H5P_DEFAULT) < 0) + if(H5Literate_by_name(file_id, grp_name, trav_index_by, trav_index_order, NULL, traverse_cb, &udata, H5P_DEFAULT) < 0) return -1; } /* end else */ @@ -948,8 +955,11 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) */ int -h5trav_print(hid_t fid) +h5trav_print(hid_t fid, H5_index_t print_index_by, H5_iter_order_t print_index_order) { + trav_index_by = print_index_by; + trav_index_order = print_index_order; + trav_print_udata_t print_udata; /* User data for traversal */ trav_visitor_t print_visitor; /* Visitor structure for printing objects */ diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index da8dc69..7311897 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -158,7 +158,7 @@ H5TOOLS_DLL int h5trav_getindext(const char *obj, const trav_table_t *travt); * "h5trav print" public functions *------------------------------------------------------------------------- */ -H5TOOLS_DLL int h5trav_print(hid_t fid); +H5TOOLS_DLL int h5trav_print(hid_t fid, H5_index_t print_index_by, H5_iter_order_t print_index_order); #ifdef __cplusplus } diff --git a/tools/testfiles/tordercontents1.ddl b/tools/testfiles/tordercontents1.ddl new file mode 100644 index 0000000..18c5589 --- /dev/null +++ b/tools/testfiles/tordercontents1.ddl @@ -0,0 +1,11 @@ +HDF5 "torderattr.h5" { +FILE_CONTENTS { + group / + dataset /d + dataset /dt + group /g + group /gt + datatype /t + datatype /tt + } +} diff --git a/tools/testfiles/tordercontents2.ddl b/tools/testfiles/tordercontents2.ddl new file mode 100644 index 0000000..430638b --- /dev/null +++ b/tools/testfiles/tordercontents2.ddl @@ -0,0 +1,11 @@ +HDF5 "torderattr.h5" { +FILE_CONTENTS { + group / + datatype /tt + datatype /t + group /gt + group /g + dataset /dt + dataset /d + } +} -- cgit v0.12 From 7417af566e402a521ab11f41e8196813a3f6b153 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 08:16:26 -0500 Subject: [svn-r22533] Correct order of declarations in functions. --- tools/lib/h5trav.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index ed2abeb..833b8c4 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -957,12 +957,12 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) int h5trav_print(hid_t fid, H5_index_t print_index_by, H5_iter_order_t print_index_order) { - trav_index_by = print_index_by; - trav_index_order = print_index_order; - trav_print_udata_t print_udata; /* User data for traversal */ trav_visitor_t print_visitor; /* Visitor structure for printing objects */ + trav_index_by = print_index_by; + trav_index_order = print_index_order; + /* Init user data for printing */ print_udata.fid = fid; -- cgit v0.12 From 8019ed0b59e9a363b9974922871366a720b45053 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 08:22:14 -0500 Subject: [svn-r22534] Correct contents of reference files --- tools/testfiles/tordercontents1.ddl | 23 ++++++++++++++++------- tools/testfiles/tordercontents2.ddl | 23 ++++++++++++++++------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/tools/testfiles/tordercontents1.ddl b/tools/testfiles/tordercontents1.ddl index 18c5589..14e12d6 100644 --- a/tools/testfiles/tordercontents1.ddl +++ b/tools/testfiles/tordercontents1.ddl @@ -1,11 +1,20 @@ -HDF5 "torderattr.h5" { +HDF5 "tfcontents1.h5" { FILE_CONTENTS { + datatype /#5616 group / - dataset /d - dataset /dt - group /g - group /gt - datatype /t - datatype /tt + dataset /dset + dataset /dset3 -> /dset + dataset /dset4 -> /dset + dataset /dsetmytype2 + ext link /extlink -> fname oname + group /g1 + dataset /g1/dset1 -> /dset + group /g1/g1.1 + dataset /g1/g1.1/dset2 -> /dset + group /g2 -> /g1/g1.1 + link /mylink -> mylink + datatype /mytype + link /softlink -> /dset + unknown type of UD link /udlink -> ??? } } diff --git a/tools/testfiles/tordercontents2.ddl b/tools/testfiles/tordercontents2.ddl index 430638b..6757338 100644 --- a/tools/testfiles/tordercontents2.ddl +++ b/tools/testfiles/tordercontents2.ddl @@ -1,11 +1,20 @@ -HDF5 "torderattr.h5" { +HDF5 "tfcontents1.h5" { FILE_CONTENTS { + datatype /#5616 group / - datatype /tt - datatype /t - group /gt - group /g - dataset /dt - dataset /d + unknown type of UD link /udlink -> ??? + link /softlink -> /dset + datatype /mytype + link /mylink -> mylink + group /g2 + dataset /g2/dset2 + group /g1 + group /g1/g1.1 -> /g2 + dataset /g1/dset1 -> /g2/dset2 + ext link /extlink -> fname oname + dataset /dsetmytype2 + dataset /dset4 -> /g2/dset2 + dataset /dset3 -> /g2/dset2 + dataset /dset -> /g2/dset2 } } -- cgit v0.12 From a0aca32d35ae9159fecf91cbe76baf8cc0c141db Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 08:57:58 -0500 Subject: [svn-r22535] added missing break to end of case statement --- tools/lib/h5tools_dump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 619a413..70d6c83 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2181,6 +2181,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ case H5T_CSET_RESERVED_14: case H5T_CSET_RESERVED_15: h5tools_str_append(buffer, "H5T_CSET_UNKNOWN;"); + break; case H5T_CSET_ERROR: h5tools_str_append(buffer, "H5T_CSET_ERROR;"); break; -- cgit v0.12 From a496d41ac708579ba755a5115b1b70046f4dbc4e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 09:22:40 -0500 Subject: [svn-r22537] Correct error string contents --- tools/lib/h5tools_dump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 70d6c83..0c0a49f 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2337,7 +2337,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level++; for (i = 0; i < nmembers; i++) { mname = H5Tget_member_name(type, i); - if((mtype = H5Tget_member_type(type, i))>=0) { + if((mtype = H5Tget_member_type(type, i)) >= 0) { ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, 0, 0); @@ -2374,7 +2374,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ case H5T_ENUM: if((super = H5Tget_super(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed"); h5tools_str_append(buffer, "H5T_ENUM %s", h5tools_dump_header_format->enumblockbegin); h5tools_render_element(stream, info, ctx, buffer, &curr_pos, ncols, 0, 0); @@ -2406,7 +2406,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ case H5T_VLEN: if((super = H5Tget_super(type)) < 0) - H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); + H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed"); h5tools_str_append(buffer, "H5T_VLEN %s ", h5tools_dump_header_format->vlenblockbegin); -- cgit v0.12 From 212cd31641ebfa073c1691bdbafa32db81a4498f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 09:31:22 -0500 Subject: [svn-r22539] Correct indentation --- tools/h5dump/h5dumpgentest.c | 4200 +++++++++++++++++++++--------------------- 1 file changed, 2100 insertions(+), 2100 deletions(-) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 715e0df..e240232 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -112,16 +112,16 @@ static int make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t tid, hid_t dcpl, void *buf); static int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name, - hid_t tid, void *buf); + hid_t tid, void *buf); static int write_dset( hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, - hid_t tid, void *buf ); + hid_t tid, void *buf ); /* a filter operation callback function */ static size_t myfilter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, - size_t UNUSED *buf_size, void UNUSED **buf); + const unsigned int UNUSED *cd_values, size_t nbytes, + size_t UNUSED *buf_size, void UNUSED **buf); /* a "set local" callback */ static herr_t @@ -131,35 +131,35 @@ set_local_myfilter(hid_t dcpl_id, hid_t tid, hid_t UNUSED sid); /* This message derives from H5Z */ const H5Z_class2_t H5Z_MYFILTER[1] = {{ - H5Z_CLASS_T_VERS, - MYFILTER_ID, /* Filter id number */ - 1, 1, - "myfilter", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - set_local_myfilter, /* The "set local" callback */ - myfilter, /* The actual filter function */ + H5Z_CLASS_T_VERS, + MYFILTER_ID, /* Filter id number */ + 1, 1, + "myfilter", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + set_local_myfilter, /* The "set local" callback */ + myfilter, /* The actual filter function */ }}; /* A UD link traversal function. Shouldn't actually be called. */ static hid_t UD_traverse(UNUSED const char * link_name, UNUSED hid_t cur_group, - UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id) + UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id) { -return -1; + return -1; } #define MY_LINKCLASS 187 const H5L_class_t UD_link_class[1] = {{ - H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ - (H5L_type_t)MY_LINKCLASS, /* Link type id number */ - "UD link class", /* name for debugging */ - NULL, /* Creation callback */ - NULL, /* Move/rename callback */ - NULL, /* Copy callback */ - UD_traverse, /* The actual traversal function */ - NULL, /* Deletion callback */ - NULL /* Query callback */ + H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ + (H5L_type_t)MY_LINKCLASS, /* Link type id number */ + "UD link class", /* name for debugging */ + NULL, /* Creation callback */ + NULL, /* Move/rename callback */ + NULL, /* Copy callback */ + UD_traverse, /* The actual traversal function */ + NULL, /* Deletion callback */ + NULL /* Query callback */ }}; @@ -188,18 +188,18 @@ const H5L_class_t UD_link_class[1] = {{ #define POINT1_NPOINTS 10 typedef enum{ - RED, - GREEN, - BLUE, - WHITE, - BLACK + RED, + GREEN, + BLUE, + WHITE, + BLACK } enumtype; /* Compound datatype */ typedef struct s1_t { - unsigned int a; - unsigned int b; - float c; + unsigned int a; + unsigned int b; + float c; } s1_t; @@ -363,8 +363,8 @@ gent_dataset(void) dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); for(i = 0; i < 10; i++) - for(j = 0; j < 20; j++) - dset1[i][j] = j + i; + for(j = 0; j < 20; j++) + dset1[i][j] = j + i; H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1); H5Sclose(space); @@ -376,8 +376,8 @@ gent_dataset(void) dataset = H5Dcreate2(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); for(i = 0; i < 30; i++) - for(j = 0; j < 20; j++) - dset2[i][j] = 0.0001 * j + i; + for(j = 0; j < 20; j++) + dset2[i][j] = 0.0001 * j + i; H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2); @@ -408,8 +408,8 @@ gent_dataset2(void) dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); for(i = 0; i < 10; i++) - for(j = 0; j < 20; j++) - dset1[i][j] = j; + for(j = 0; j < 20; j++) + dset1[i][j] = j; H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1); H5Sclose(space); @@ -422,8 +422,8 @@ gent_dataset2(void) dataset = H5Dcreate2(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); for(i = 0; i < 30; i++) - for(j = 0; j < 10; j++) - dset2[i][j] = j; + for(j = 0; j < 10; j++) + dset2[i][j] = j; H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2); @@ -536,9 +536,9 @@ static int gent_softlink2(void) int data2[NX][NY] = {{0,0},{0,1},{0,2},{3,3}}; herr_t status = SUCCEED; - /*----------------------------------------------------------------------- - * FILE - *------------------------------------------------------------------------*/ + /*----------------------------------------------------------------------- + * FILE + *------------------------------------------------------------------------*/ /* Create a new file */ fileid1 = H5Fcreate(FILE4_1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fileid1 < 0) @@ -548,9 +548,9 @@ static int gent_softlink2(void) goto out; } - /*----------------------------------------------------------------------- - * Groups - *------------------------------------------------------------------------*/ + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fileid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { @@ -567,9 +567,9 @@ static int gent_softlink2(void) goto out; } - /*----------------------------------------------------------------------- - * Named datatype - *------------------------------------------------------------------------*/ + /*----------------------------------------------------------------------- + * Named datatype + *------------------------------------------------------------------------*/ datatype = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(fileid1, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) @@ -579,9 +579,9 @@ static int gent_softlink2(void) goto out; } - /*----------------------------------------------------------------------- - * Datasets - *------------------------------------------------------------------------*/ + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ /* * Describe the size of the array and create the data space for fixed * size dataset. @@ -599,7 +599,7 @@ static int gent_softlink2(void) */ /* Create a new dataset as sample object */ dset1 = H5Dcreate2(fileid1, "/dset1", H5T_NATIVE_INT, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset1 < 0) { fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); @@ -620,7 +620,7 @@ static int gent_softlink2(void) */ /* Create a new dataset as sample object */ dset2 = H5Dcreate2(fileid1, "/dset2", H5T_NATIVE_INT, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset2 < 0) { fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); @@ -636,9 +636,9 @@ static int gent_softlink2(void) goto out; } - /*----------------------------------------------------------------------- - * Soft links - *------------------------------------------------------------------------*/ + /*----------------------------------------------------------------------- + * Soft links + *------------------------------------------------------------------------*/ /* * create various soft links under '/' root */ @@ -735,7 +735,7 @@ static int gent_softlink2(void) goto out; } -out: + out: /* * Close/release resources. */ @@ -782,7 +782,7 @@ out: dset2 g1.1 | dset3 -*/ + */ static void gent_hardlink(void) { @@ -813,7 +813,7 @@ static void gent_hardlink(void) H5Lcreate_hard(group, "/g2", H5L_SAME_LOC, "g1.1", H5P_DEFAULT, H5P_DEFAULT); H5Gclose(group); - /* create a link to the root group */ + /* create a link to the root group */ H5Lcreate_hard(fid, "/", H5L_SAME_LOC, "g3", H5P_DEFAULT, H5P_DEFAULT); H5Fclose(fid); } @@ -854,38 +854,38 @@ static void gent_udlink(void) | dset2 -*/ + */ static void gent_compound_dt(void) { /* test compound data type */ hid_t fid, group, dataset, space, space3, type, type2; hid_t array_dt; typedef struct { - int a; - float b; - double c; + int a; + float b; + double c; } dset1_t; dset1_t dset1[5]; typedef struct { - int a; - float b; + int a; + float b; } dset2_t; dset2_t dset2[5]; typedef struct { - int a[4]; - float b[5][6]; + int a[4]; + float b[5][6]; } dset3_t; dset3_t dset3[3][6]; typedef struct { - int a; - float b; + int a; + float b; } dset4_t; dset4_t dset4[5]; typedef struct { - int a; - float b; + int a; + float b; } dset5_t; dset5_t dset5[5]; @@ -979,13 +979,13 @@ static void gent_compound_dt(void) { /* test compound data type */ space3 = H5Screate_simple(2, dset3_dim, NULL); dataset = H5Dcreate2(group, "dset3", type, space3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); for(i = 0; i < (int)dset3_dim[0]; i++) - for(j = 0; j < (int)dset3_dim[1]; j++) { - for(k = 0; k < 4; k++) - dset3[i][j].a[k] = k + j + i; - for(k = 0; k < 5; k++) - for(l = 0; l < 6; l++) - dset3[i][j].b[k][l] = (float)((k + 1) + l + j + i); - } + for(j = 0; j < (int)dset3_dim[1]; j++) { + for(k = 0; k < 4; k++) + dset3[i][j].a[k] = k + j + i; + for(k = 0; k < 5; k++) + for(l = 0; l < 6; l++) + dset3[i][j].b[k][l] = (float)((k + 1) + l + j + i); + } H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3); H5Sclose(space3); H5Tclose(type); @@ -1040,38 +1040,38 @@ static void gent_compound_dt(void) { /* test compound data type */ | dset2 -*/ + */ static void gent_compound_dt2(void) { /* test compound data type */ hid_t fid, group, dataset, space, type, create_plist, type2; hid_t array_dt; typedef struct { - int a; - float b; - double c; + int a; + float b; + double c; } dset1_t; dset1_t dset1[10]; typedef struct { - int a; - float b; + int a; + float b; } dset2_t; dset2_t dset2[10]; typedef struct { - int a[4]; - float b[5][6]; + int a[4]; + float b[5][6]; } dset3_t; typedef struct { - int a; - float b; + int a; + float b; } dset4_t; dset4_t dset4[10]; typedef struct { - int a; - float b; + int a; + float b; } dset5_t; dset5_t dset5[10]; @@ -1226,7 +1226,7 @@ g1.2 : g1.2.1 extlink g1.2.1 : slink g2 : dset2.1 dset2.2 udlink -*/ + */ static void gent_all(void) { @@ -1368,7 +1368,7 @@ static void gent_all(void) o - group objects -*/ + */ static void gent_loop(void) { hid_t fid, group; @@ -1418,7 +1418,7 @@ static void gent_loop2(void) | | (g1) (dset2) (dset3) (elink) udlink dset1 link1 slink6 (dset1) (udlink) -*/ + */ static void gent_many(void) @@ -1435,9 +1435,9 @@ gent_many(void) hsize_t sdim, maxdim; typedef struct { /* compound type has members with rank > 1 */ - int a[2][2][2][2]; /* arrays are 2x2x2x2 */ - double b[2][2][2][2]; - double c[2][2][2][2]; + int a[2][2][2][2]; /* arrays are 2x2x2x2 */ + double b[2][2][2][2]; + double c[2][2][2][2]; } dset1_t; dset1_t dset1[6]; @@ -1617,13 +1617,13 @@ gent_many(void) } static hid_t mkstr(int size, H5T_str_t pad) { -hid_t type; + hid_t type; - if((type=H5Tcopy(H5T_C_S1)) < 0) return -1; - if(H5Tset_size(type, (size_t)size) < 0) return -1; - if(H5Tset_strpad(type, pad) < 0) return -1; + if((type=H5Tcopy(H5T_C_S1)) < 0) return -1; + if(H5Tset_size(type, (size_t)size) < 0) return -1; + if(H5Tset_strpad(type, pad) < 0) return -1; - return type; + return type; } static void gent_str(void) { @@ -1632,131 +1632,131 @@ static void gent_str(void) { hsize_t dims1[] = { 3, 4}; char string1[12][3] = {"s1","s2","s3","s4","s5","s6","s7","s8","s9", - "s0","s1","s2"}; + "s0","s1","s2"}; hsize_t dims2[]={20}; char string2[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", - "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", - "ab cd ef9", "ab cd ef0", "ab cd ef1", "ab cd ef2", - "ab cd ef3", "ab cd ef4", "ab cd ef5", "ab cd ef6", - "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; + "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", + "ab cd ef9", "ab cd ef0", "ab cd ef1", "ab cd ef2", + "ab cd ef3", "ab cd ef4", "ab cd ef5", "ab cd ef6", + "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; hsize_t dims3[] = { 27}; char string3[27][6] = {"abcd0", "abcd1", "abcd2", "abcd3", - "abcd4", "abcd5", "abcd6", "abcd7", - "abcd8", "abcd9", "abcd0", "abcd1", - "abcd2", "abcd3", "abcd4", "abcd5", - "abcd6", "abcd7", "abcd8", "abcd9", - "abcd0", "abcd1", "abcd2", "abcd3", - "abcd4", "abcd5", "abcd6"}; + "abcd4", "abcd5", "abcd6", "abcd7", + "abcd8", "abcd9", "abcd0", "abcd1", + "abcd2", "abcd3", "abcd4", "abcd5", + "abcd6", "abcd7", "abcd8", "abcd9", + "abcd0", "abcd1", "abcd2", "abcd3", + "abcd4", "abcd5", "abcd6"}; int i, j, k, l; hsize_t dims4[] = { 3 }; char string4[3][21] = { "s1234567890123456789", "s1234567890123456789", - "s1234567890123456789"}; + "s1234567890123456789"}; hsize_t dims5[] = { 3, 6}; typedef struct { - int a[8][10]; - char s[12][33]; + int a[8][10]; + char s[12][33]; } compound_t; compound_t comp1[3][6]; hsize_t mdims[2]; - fid = H5Fcreate(FILE13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - - /* string 1 : nullterm string */ - space = H5Screate_simple(2, dims1, NULL); - f_type = mkstr(5, H5T_STR_NULLTERM); - m_type = mkstr(3, H5T_STR_NULLTERM); - dataset = H5Dcreate2(fid, "/string1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string1); - H5Tclose(m_type); - H5Tclose(f_type); - H5Sclose(space); - H5Dclose(dataset); - - /* string 2 : space pad string */ - space = H5Screate_simple(1, dims2, NULL); - f_type = mkstr(11, H5T_STR_SPACEPAD); - m_type = mkstr(10, H5T_STR_NULLTERM); - dataset = H5Dcreate2(fid, "/string2", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string2); - H5Tclose(m_type); - H5Tclose(f_type); - H5Sclose(space); - H5Dclose(dataset); - - /* string 3 : null pad string */ - space = H5Screate_simple(1, dims3, NULL); - f_type = mkstr(8, H5T_STR_NULLPAD); - m_type = mkstr(6, H5T_STR_NULLTERM); - dataset = H5Dcreate2(fid, "/string3", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string3); - H5Tclose(m_type); - H5Tclose(f_type); - H5Sclose(space); - H5Dclose(dataset); - - /* string 4 : space pad long string */ - space = H5Screate_simple(1, dims4, NULL); - f_type = mkstr(168, H5T_STR_SPACEPAD); - m_type = mkstr(21, H5T_STR_NULLTERM); - dataset = H5Dcreate2(fid, "/string4", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4); - H5Tclose(m_type); - H5Tclose(f_type); - H5Sclose(space); - H5Dclose(dataset); - - /* compound data */ - space = H5Screate_simple(2, dims5, NULL); - f_type = H5Tcreate (H5T_COMPOUND, sizeof(compound_t)); - f_type2 = H5Tcreate (H5T_COMPOUND, sizeof(compound_t)); - - mdims[0] = 8; mdims[1] = 10; - - array_dt = H5Tarray_create2(H5T_STD_I32BE, 2, mdims); - H5Tinsert(f_type, "int_array", HOFFSET(compound_t, a), array_dt); - H5Tclose(array_dt); - - array_dt = H5Tarray_create2(H5T_NATIVE_INT, 2, mdims); - H5Tinsert(f_type2, "int_array", HOFFSET(compound_t, a), array_dt); - H5Tclose(array_dt); - - mdims[0] = 3; mdims[1] = 4; - - str_type = mkstr(32, H5T_STR_SPACEPAD); - array_dt = H5Tarray_create2(str_type, 2, mdims); - H5Tinsert(f_type, "string", HOFFSET(compound_t, s), array_dt); - H5Tclose(array_dt); - H5Tclose(str_type); - - str_type = mkstr(33, H5T_STR_NULLTERM); - array_dt = H5Tarray_create2(str_type, 2, mdims); - H5Tinsert(f_type2, "string", HOFFSET(compound_t, s), array_dt); - H5Tclose(array_dt); - H5Tclose(str_type); - - for(i = 0; i < 3; i++) - for(j = 0; j < 6; j++) { - for(k = 0 ; k < 8; k++) + fid = H5Fcreate(FILE13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* string 1 : nullterm string */ + space = H5Screate_simple(2, dims1, NULL); + f_type = mkstr(5, H5T_STR_NULLTERM); + m_type = mkstr(3, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid, "/string1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string1); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + + /* string 2 : space pad string */ + space = H5Screate_simple(1, dims2, NULL); + f_type = mkstr(11, H5T_STR_SPACEPAD); + m_type = mkstr(10, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid, "/string2", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string2); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + + /* string 3 : null pad string */ + space = H5Screate_simple(1, dims3, NULL); + f_type = mkstr(8, H5T_STR_NULLPAD); + m_type = mkstr(6, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid, "/string3", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string3); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + + /* string 4 : space pad long string */ + space = H5Screate_simple(1, dims4, NULL); + f_type = mkstr(168, H5T_STR_SPACEPAD); + m_type = mkstr(21, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid, "/string4", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + + /* compound data */ + space = H5Screate_simple(2, dims5, NULL); + f_type = H5Tcreate (H5T_COMPOUND, sizeof(compound_t)); + f_type2 = H5Tcreate (H5T_COMPOUND, sizeof(compound_t)); + + mdims[0] = 8; mdims[1] = 10; + + array_dt = H5Tarray_create2(H5T_STD_I32BE, 2, mdims); + H5Tinsert(f_type, "int_array", HOFFSET(compound_t, a), array_dt); + H5Tclose(array_dt); + + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 2, mdims); + H5Tinsert(f_type2, "int_array", HOFFSET(compound_t, a), array_dt); + H5Tclose(array_dt); + + mdims[0] = 3; mdims[1] = 4; + + str_type = mkstr(32, H5T_STR_SPACEPAD); + array_dt = H5Tarray_create2(str_type, 2, mdims); + H5Tinsert(f_type, "string", HOFFSET(compound_t, s), array_dt); + H5Tclose(array_dt); + H5Tclose(str_type); + + str_type = mkstr(33, H5T_STR_NULLTERM); + array_dt = H5Tarray_create2(str_type, 2, mdims); + H5Tinsert(f_type2, "string", HOFFSET(compound_t, s), array_dt); + H5Tclose(array_dt); + H5Tclose(str_type); + + for(i = 0; i < 3; i++) + for(j = 0; j < 6; j++) { + for(k = 0 ; k < 8; k++) for(l = 0; l < 10; l++) - comp1[i][j].a[k][l] = (l + j + k) * (l + j + k); - for(k = 0 ; k < 12; k++) - strcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678"); - } + comp1[i][j].a[k][l] = (l + j + k) * (l + j + k); + for(k = 0 ; k < 12; k++) + strcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678"); + } - dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(dataset, f_type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, comp1); + dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, f_type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, comp1); - H5Tclose(f_type); - H5Tclose(f_type2); - H5Sclose(space); - H5Dclose(dataset); + H5Tclose(f_type); + H5Tclose(f_type2); + H5Sclose(space); + H5Dclose(dataset); - H5Fclose(fid); + H5Fclose(fid); } /* @@ -1766,163 +1766,163 @@ static void gent_str(void) { | | | | \ \ string1 string3 string5 string2 string4 string6 -*/ + */ static void gent_str2(void) { -hid_t fid, group, attr, dataset, space, space2, mem_space, hyper_space; -hid_t fxdlenstr, fxdlenstr2, memtype; -hsize_t dims[1], size[1], stride[1], count[1], block[1]; -hsize_t start[1]; - - -int i; -char buf[LENSTR+10]; -char buf2[3*LENSTR2]; -hsize_t sdim; - - fid = H5Fcreate(FILE14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - - fxdlenstr = H5Tcopy(H5T_C_S1); - H5Tset_size(fxdlenstr, LENSTR); - H5Tset_cset(fxdlenstr, H5T_CSET_ASCII); - H5Tset_strpad(fxdlenstr, H5T_STR_NULLTERM); - - memtype = H5Tcopy(H5T_C_S1); - H5Tset_size(memtype, LENSTR); - H5Tset_cset(memtype, H5T_CSET_ASCII); - H5Tset_strpad(memtype, H5T_STR_NULLTERM); - - sdim = 10; - size[0] = sdim; - space = H5Screate_simple(1, size, NULL); - size[0] = 1; - mem_space = H5Screate_simple(1,size,NULL); - hyper_space = H5Scopy(space); - - /* dset1 */ - - group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - dataset = H5Dcreate2(group, "dset1", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - /* add attributes to dset1 */ - - fxdlenstr2 = H5Tcopy(H5T_C_S1); - H5Tset_size(fxdlenstr2, LENSTR2); - H5Tset_cset(fxdlenstr2, H5T_CSET_ASCII); - H5Tset_strpad(fxdlenstr2, H5T_STR_NULLTERM); - - dims[0] = 3; - space2 = H5Screate_simple(1, dims, NULL); - attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT); - sprintf(&(buf2[0*LENSTR2]), "0123456789"); - sprintf(&(buf2[1*LENSTR2]), "abcdefghij"); - sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ"); - H5Awrite(attr, fxdlenstr2, buf2); - H5Sclose(space2); - H5Tclose(fxdlenstr2); - H5Aclose(attr); - - stride[0]=1; - count[0]=1; - block[0]=1; - - for(i = 0; (hsize_t)i < sdim; i++) { - start[0] = i; - sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i); - H5Tset_size(memtype, HDstrlen(buf)+1); - H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); - H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); - } - H5Dclose(dataset); - H5Gclose(group); - - group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - dataset = H5Dcreate2(group, "dset2", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - for(i = 0; (hsize_t)i < sdim; i++) { - start[0] = i; - sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i); - H5Tset_size(memtype, HDstrlen(buf)+1); - H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); - H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); - } - H5Dclose(dataset); - H5Gclose(group); - - - H5Tclose(fxdlenstr); - fxdlenstr = H5Tcopy(H5T_C_S1); - H5Tset_size(fxdlenstr, LENSTR); - H5Tset_cset(fxdlenstr, H5T_CSET_ASCII); - H5Tset_strpad(fxdlenstr, H5T_STR_NULLPAD); - - group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - dataset = H5Dcreate2(group, "dset3", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - for(i = 0;(hsize_t) i < sdim; i++) { - start[0] = i; - sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i); - H5Tset_size(memtype, HDstrlen(buf)+1); - H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); - H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); - } - H5Dclose(dataset); - H5Gclose(group); - - - group = H5Gcreate2(fid, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - dataset = H5Dcreate2(group, "dset4", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - for(i = 0; (hsize_t)i < sdim; i++) { - start[0] = i; - sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i); - H5Tset_size(memtype, HDstrlen(buf)+1); - H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); - H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); - } - H5Dclose(dataset); - H5Gclose(group); - - H5Tclose(fxdlenstr); - fxdlenstr = H5Tcopy(H5T_C_S1); - H5Tset_size(fxdlenstr, LENSTR); - H5Tset_cset(fxdlenstr, H5T_CSET_ASCII); - H5Tset_strpad(fxdlenstr, H5T_STR_SPACEPAD); - - group = H5Gcreate2(fid, "/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - dataset = H5Dcreate2(group, "dset5", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - for(i = 0; (hsize_t)i < sdim; i++) { - start[0] = i; - sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); - H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); - H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); - } - H5Dclose(dataset); - H5Gclose(group); - - - group = H5Gcreate2(fid, "/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - dataset = H5Dcreate2(group, "dset6", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - for(i = 0; (hsize_t)i < sdim; i++) { - start[0] = i; - sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i); - H5Tset_size(memtype, HDstrlen(buf) + 1); - H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); - H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); - } - - H5Dclose(dataset); - H5Gclose(group); - H5Tclose(fxdlenstr); - H5Tclose(memtype); - H5Sclose(mem_space); - H5Sclose(hyper_space); - H5Sclose(space); - H5Fclose(fid); + hid_t fid, group, attr, dataset, space, space2, mem_space, hyper_space; + hid_t fxdlenstr, fxdlenstr2, memtype; + hsize_t dims[1], size[1], stride[1], count[1], block[1]; + hsize_t start[1]; + + + int i; + char buf[LENSTR+10]; + char buf2[3*LENSTR2]; + hsize_t sdim; + + fid = H5Fcreate(FILE14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + fxdlenstr = H5Tcopy(H5T_C_S1); + H5Tset_size(fxdlenstr, LENSTR); + H5Tset_cset(fxdlenstr, H5T_CSET_ASCII); + H5Tset_strpad(fxdlenstr, H5T_STR_NULLTERM); + + memtype = H5Tcopy(H5T_C_S1); + H5Tset_size(memtype, LENSTR); + H5Tset_cset(memtype, H5T_CSET_ASCII); + H5Tset_strpad(memtype, H5T_STR_NULLTERM); + + sdim = 10; + size[0] = sdim; + space = H5Screate_simple(1, size, NULL); + size[0] = 1; + mem_space = H5Screate_simple(1,size,NULL); + hyper_space = H5Scopy(space); + + /* dset1 */ + + group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(group, "dset1", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* add attributes to dset1 */ + + fxdlenstr2 = H5Tcopy(H5T_C_S1); + H5Tset_size(fxdlenstr2, LENSTR2); + H5Tset_cset(fxdlenstr2, H5T_CSET_ASCII); + H5Tset_strpad(fxdlenstr2, H5T_STR_NULLTERM); + + dims[0] = 3; + space2 = H5Screate_simple(1, dims, NULL); + attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT); + sprintf(&(buf2[0*LENSTR2]), "0123456789"); + sprintf(&(buf2[1*LENSTR2]), "abcdefghij"); + sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ"); + H5Awrite(attr, fxdlenstr2, buf2); + H5Sclose(space2); + H5Tclose(fxdlenstr2); + H5Aclose(attr); + + stride[0]=1; + count[0]=1; + block[0]=1; + + for(i = 0; (hsize_t)i < sdim; i++) { + start[0] = i; + sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i); + H5Tset_size(memtype, HDstrlen(buf)+1); + H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); + H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); + } + H5Dclose(dataset); + H5Gclose(group); + + group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(group, "dset2", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0; (hsize_t)i < sdim; i++) { + start[0] = i; + sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i); + H5Tset_size(memtype, HDstrlen(buf)+1); + H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); + H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); + } + H5Dclose(dataset); + H5Gclose(group); + + + H5Tclose(fxdlenstr); + fxdlenstr = H5Tcopy(H5T_C_S1); + H5Tset_size(fxdlenstr, LENSTR); + H5Tset_cset(fxdlenstr, H5T_CSET_ASCII); + H5Tset_strpad(fxdlenstr, H5T_STR_NULLPAD); + + group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(group, "dset3", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0;(hsize_t) i < sdim; i++) { + start[0] = i; + sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i); + H5Tset_size(memtype, HDstrlen(buf)+1); + H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); + H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); + } + H5Dclose(dataset); + H5Gclose(group); + + + group = H5Gcreate2(fid, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(group, "dset4", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0; (hsize_t)i < sdim; i++) { + start[0] = i; + sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i); + H5Tset_size(memtype, HDstrlen(buf)+1); + H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); + H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); + } + H5Dclose(dataset); + H5Gclose(group); + + H5Tclose(fxdlenstr); + fxdlenstr = H5Tcopy(H5T_C_S1); + H5Tset_size(fxdlenstr, LENSTR); + H5Tset_cset(fxdlenstr, H5T_CSET_ASCII); + H5Tset_strpad(fxdlenstr, H5T_STR_SPACEPAD); + + group = H5Gcreate2(fid, "/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(group, "dset5", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0; (hsize_t)i < sdim; i++) { + start[0] = i; + sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i); + H5Tset_size(memtype, HDstrlen(buf) + 1); + H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); + H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); + } + H5Dclose(dataset); + H5Gclose(group); + + + group = H5Gcreate2(fid, "/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(group, "dset6", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + for(i = 0; (hsize_t)i < sdim; i++) { + start[0] = i; + sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i); + H5Tset_size(memtype, HDstrlen(buf) + 1); + H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block); + H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf); + } + + H5Dclose(dataset); + H5Gclose(group); + H5Tclose(fxdlenstr); + H5Tclose(memtype); + H5Sclose(mem_space); + H5Sclose(hyper_space); + H5Sclose(space); + H5Fclose(fid); } static void gent_enum(void) @@ -1931,9 +1931,9 @@ static void gent_enum(void) hid_t file, type, space, dset; int val; enumtype data[] = {RED, GREEN, BLUE, GREEN, WHITE, - WHITE, BLACK, GREEN, BLUE, RED, - RED, BLUE, GREEN, BLACK, WHITE, - RED, WHITE, GREEN, GREEN, BLUE}; + WHITE, BLACK, GREEN, BLUE, RED, + RED, BLUE, GREEN, BLACK, WHITE, + RED, WHITE, GREEN, GREEN, BLUE}; hsize_t size[1] = {NELMTS(data)}; file = H5Fcreate(FILE15,H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1958,7 +1958,7 @@ static void gent_enum(void) static void gent_objref(void) { -/*some code is taken from enum.c in the test dir */ + /*some code is taken from enum.c in the test dir */ hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ @@ -1967,8 +1967,8 @@ static void gent_objref(void) hid_t tid1; /* Datatype ID */ hsize_t dims1[] = {SPACE1_DIM1}; hobj_ref_t *wbuf, /* buffer to write to disk */ - *rbuf, /* buffer read from disk */ - *tbuf; /* temp. buffer read from disk */ + *rbuf, /* buffer read from disk */ + *tbuf; /* temp. buffer read from disk */ uint32_t *tu32; /* Temporary pointer to uint32 data */ int i; /* counting variables */ const char *write_comment = "Foo!"; /* Comments for group */ @@ -2066,20 +2066,20 @@ static void gent_datareg(void) hid_t fid1; /* HDF5 File IDs */ hid_t dset1, /* Dataset ID */ - dset2; /* Dereferenced dataset ID */ + dset2; /* Dereferenced dataset ID */ hid_t sid1, /* Dataspace ID #1 */ - sid2; /* Dataspace ID #2 */ + sid2; /* Dataspace ID #2 */ hsize_t dims1[] = {SPACE1_DIM1}, - dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; + dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ hdset_reg_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ + *rbuf; /* buffer read from disk */ uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ - *drbuf; /* Buffer for reading numeric data from disk */ + *drbuf; /* Buffer for reading numeric data from disk */ uint8_t *tu8; /* Temporary pointer to uint8 data */ int i; /* counting variables */ @@ -2222,7 +2222,7 @@ static void gent_attrreg(void) */ sid1 = H5Screate (H5S_NULL); dset1 = H5Dcreate2 (fid1, "Dataset1", H5T_STD_I32LE, sid1, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT); H5Sclose (sid1); /* Create references */ @@ -2262,7 +2262,7 @@ static void gent_attrreg(void) /* Create the attribute and write the region references to it. */ attr1 = H5Acreate2 (dset1, "Attribute1", H5T_STD_REF_DSETREG, sid3, H5P_DEFAULT, - H5P_DEFAULT); + H5P_DEFAULT); H5Awrite (attr1, H5T_STD_REF_DSETREG, wbuf); /* Close attribute dataspace */ @@ -2290,18 +2290,18 @@ static void gent_attrreg(void) /*taken from Elena's compound test file*/ static void gent_nestcomp(void) { - /* Compound memeber of the compound datatype*/ + /* Compound memeber of the compound datatype*/ typedef struct cmp_t { - char a; - float b[2]; + char a; + float b[2]; } cmp_t; /* First structure and dataset*/ typedef struct s1_t { - int a; - float b; - double c; - cmp_t d; + int a; + float b; + double c; + cmp_t d; } s2_t; hid_t cmp_tid; /* Handle for the compound datatype */ hid_t char_id; /* Handle for the string datatype */ @@ -2377,7 +2377,7 @@ static void gent_nestcomp(void) */ status = H5Dwrite(dataset, s2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s1); if(status < 0) - fprintf(stderr, "gent_nestcomp H5Dwrite failed\n"); + fprintf(stderr, "gent_nestcomp H5Dwrite failed\n"); /* * Release resources @@ -2448,14 +2448,14 @@ static void gent_bitfields(void) /* bitfield_1 */ nelmts = sizeof(buf); if((type = H5Tcopy(H5T_STD_B8LE)) < 0 || - (space = H5Screate_simple(1, &nelmts, NULL)) < 0 || - (dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + (space = H5Screate_simple(1, &nelmts, NULL)) < 0 || + (dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; for(i = 0; i < sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i; if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - goto error; + goto error; if(H5Sclose(space) < 0) goto error; if(H5Tclose(type) < 0) goto error; if(H5Dclose(dset) < 0) goto error; @@ -2463,25 +2463,25 @@ static void gent_bitfields(void) /* bitfield_2 */ nelmts = sizeof(buf)/2; if((type = H5Tcopy(H5T_STD_B16LE)) < 0 || - (space = H5Screate_simple(1, &nelmts, NULL)) < 0 || - (dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + (space = H5Screate_simple(1, &nelmts, NULL)) < 0 || + (dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; for(i = 0; i < sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i; if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - goto error; + goto error; if(H5Sclose(space) < 0) goto error; if(H5Tclose(type) < 0) goto error; if(H5Dclose(dset) < 0) goto error; if(H5Gclose(grp) < 0) goto error; H5Fclose(file); - error: + error: H5E_BEGIN_TRY { - H5Gclose(grp); - H5Tclose(type); - H5Sclose(space); - H5Dclose(dset); + H5Gclose(grp); + H5Tclose(type); + H5Sclose(space); + H5Dclose(dset); } H5E_END_TRY; } @@ -2497,7 +2497,7 @@ static void gent_vldatatypes(void) /* Allocate and initialize VL dataset to write */ for(i = 0; i < SPACE1_DIM1; i++) { - int j; + int j; wdata[i].p = HDmalloc((i + 1) * sizeof(int)); wdata[i].len = i + 1; @@ -2524,7 +2524,7 @@ static void gent_vldatatypes(void) /* Allocate and initialize VL dataset to write */ for(i = 0; i < SPACE1_DIM1; i++) { - int j; + int j; wdata[i].p = HDmalloc((i + 1) * sizeof(float)); wdata[i].len = i + 1; @@ -2648,9 +2648,9 @@ gent_vldatatypes2(void) static void gent_vldatatypes3(void) { typedef struct { /* Struct that the VL sequences are composed of */ - int i; - float f; - hvl_t v; + int i; + float f; + hvl_t v; } s1; s1 wdata[SPACE1_DIM1]; /* Information to write */ hid_t fid1; /* HDF5 File IDs */ @@ -2718,8 +2718,8 @@ static void gent_vldatatypes3(void) static void gent_vldatatypes4(void) { typedef struct { /* Struct that the VL sequences are composed of */ - int i; - float f; + int i; + float f; } s1; hvl_t wdata[SPACE1_DIM1]; /* Information to write */ hid_t fid1; /* HDF5 File IDs */ @@ -2737,7 +2737,7 @@ static void gent_vldatatypes4(void) for(j=0; j<(i+1); j++) { ((s1 *)wdata[i].p)[j].i=i*10+j; ((s1 *)wdata[i].p)[j].f=(float)((i*20+j)/3.0); - } /* end for */ + } /* end for */ } /* end for */ /* Create file */ @@ -2848,7 +2848,7 @@ static void gent_vldatatypes5(void) via region reference for testing refion reference output. Note: this was added originally prepared for bug2092. before the fix h5dump didn't display array indices every 262 x N (N > 0) based on 2000x1000 dims. -*/ + */ #define SPACE_ARRAY1BIG_DIM 2000 #define ARRAY1BIG_DIM 1000 @@ -2864,7 +2864,7 @@ static void gent_array1_big(void) int i,j; /* counting variables */ herr_t ret; /* Generic return value */ - + /* for region reference dataset */ hid_t dset2; hid_t sid2; @@ -3089,8 +3089,8 @@ static void gent_array3(void) static void gent_array4(void) { typedef struct { /* Typedef for compound datatype */ - int i; - float f; + int i; + float f; } s2_t; s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */ hid_t fid1; /* HDF5 File IDs */ @@ -3155,8 +3155,8 @@ static void gent_array4(void) static void gent_array5(void) { typedef struct { /* Typedef for compound datatype */ - int i; - float f[ARRAY1_DIM1]; + int i; + float f[ARRAY1_DIM1]; } s2_t; s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */ hid_t fid1; /* HDF5 File IDs */ @@ -3374,7 +3374,7 @@ static void gent_array8(void) * elements within the array datatype. */ for (i=0; i= 0); - status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); - status = H5Aclose(aid); - status = H5Tclose(tid); - status = H5Sclose(sid); + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_attr(loc_id,1,dims,"enum",tid,0); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_attr(loc_id, 1, dims, "array", tid, buf6); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT - *------------------------------------------------------------------------- - */ - write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7); - write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8); + /* Allocate and initialize VL dataset to write */ + buf5[0].len = 1; + buf5[0].p = HDmalloc(1 * sizeof(int)); + ((int *)buf5[0].p)[0] = 1; + buf5[1].len = 2; + buf5[1].p = HDmalloc(2 * sizeof(int)); + ((int *)buf5[1].p)[0] = 2; + ((int *)buf5[1].p)[1] = 3; + + sid = H5Screate_simple(1, dims, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + status = H5Awrite(aid, tid, buf5); + HDassert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5); + HDassert(status >= 0); + status = H5Aclose(aid); + status = H5Tclose(tid); + status = H5Sclose(sid); -/*------------------------------------------------------------------------- - * 2D attributes - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 1, dims, "array", tid, buf6); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_STRING - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); - write_attr(loc_id,2,dims2,"string2D",tid,buf12); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7); + write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8); -/*------------------------------------------------------------------------- - * H5T_BITFIELD - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_STD_B8LE); - write_attr(loc_id,2,dims2,"bitfield2D",tid,buf22); - status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_OPAQUE - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_attr(loc_id,2,dims2,"opaque2D",tid,buf22); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * 2D attributes + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_attr(loc_id,2,dims2,"compound2D",tid,buf32); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, 2); + write_attr(loc_id,2,dims2,"string2D",tid,buf12); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_REFERENCE - *------------------------------------------------------------------------- - */ - /* Create references to dataset */ - if(dset_name) - { - for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) { - status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1); - } - } - write_attr(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); - } + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_STD_B8LE); + write_attr(loc_id,2,dims2,"bitfield2D",tid,buf22); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_attr(loc_id,2,dims2,"enum2D",tid,0); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_attr(loc_id,2,dims2,"opaque2D",tid,buf22); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_attr(loc_id,2,dims2,"compound2D",tid,buf32); + status = H5Tclose(tid); - /* Allocate and initialize VL dataset to write */ - n=0; - for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) { - int l; - - buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); - buf52[i][j].len = i + 1; - for(l = 0; l < i + 1; l++) - ((int *)buf52[i][j].p)[l] = n++; - } - } - - sid = H5Screate_simple(2, dims2, NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); - status = H5Awrite(aid, tid, buf52); - HDassert(status >= 0); - status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52); - HDassert(status >= 0); - status = H5Aclose(aid); - status = H5Tclose(tid); - status = H5Sclose(sid); + /*------------------------------------------------------------------------- + * H5T_REFERENCE + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if(dset_name) + { + for(i = 0; i < 3; i++) { + for(j = 0; j < 2; j++) { + status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1); + } + } + write_attr(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); + } -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_attr(loc_id, 2, dims2, "array2D", tid, buf62); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_attr(loc_id,2,dims2,"enum2D",tid,0); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT - *------------------------------------------------------------------------- - */ - write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72); - write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ + /* Allocate and initialize VL dataset to write */ + n=0; + for(i = 0; i < 3; i++) { + for(j = 0; j < 2; j++) { + int l; + + buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); + buf52[i][j].len = i + 1; + for(l = 0; l < i + 1; l++) + ((int *)buf52[i][j].p)[l] = n++; + } + } -/*------------------------------------------------------------------------- - * 3D attributes - *------------------------------------------------------------------------- - */ + sid = H5Screate_simple(2, dims2, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + status = H5Awrite(aid, tid, buf52); + HDassert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52); + HDassert(status >= 0); + status = H5Aclose(aid); + status = H5Tclose(tid); + status = H5Sclose(sid); -/*------------------------------------------------------------------------- - * H5T_STRING - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); - write_attr(loc_id,3,dims3,"string3D",tid,buf13); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 2, dims2, "array2D", tid, buf62); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_BITFIELD - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72); + write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); - n=1; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - buf23[i][j][k]=n++; - } - } - } - tid = H5Tcopy(H5T_STD_B8LE); - write_attr(loc_id,3,dims3,"bitfield3D",tid,buf23); - status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_OPAQUE - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_attr(loc_id,3,dims3,"opaque3D",tid,buf23); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * 3D attributes + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, 2); + write_attr(loc_id,3,dims3,"string3D",tid,buf13); + status = H5Tclose(tid); - n=1; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - buf33[i][j][k].a=n++; - buf33[i][j][k].b=n++; - } - } - } - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_attr(loc_id,3,dims3,"compound3D",tid,buf33); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_REFERENCE - *------------------------------------------------------------------------- - */ - /* Create references to dataset */ - if(dset_name) - { - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) - status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1); - } - } - write_attr(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); - } + n=1; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + buf23[i][j][k]=n++; + } + } + } + tid = H5Tcopy(H5T_STD_B8LE); + write_attr(loc_id,3,dims3,"bitfield3D",tid,buf23); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_attr(loc_id,3,dims3,"enum3D",tid,0); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_attr(loc_id,3,dims3,"opaque3D",tid,buf23); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ - /* Allocate and initialize VL dataset to write */ - n = 0; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - int l; - - buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); - buf53[i][j][k].len = i + 1; - for(l = 0; l < i + 1; l++) - ((int *)buf53[i][j][k].p)[l] = n++; - } - } - } - - sid = H5Screate_simple(3, dims3, NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); - status = H5Awrite(aid, tid, buf53); - HDassert(status >= 0); - status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53); - HDassert(status >= 0); - status = H5Aclose(aid); - status = H5Tclose(tid); - status = H5Sclose(sid); + n=1; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + buf33[i][j][k].a=n++; + buf33[i][j][k].b=n++; + } + } + } + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_attr(loc_id,3,dims3,"compound3D",tid,buf33); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ - n = 1; - for(i = 0; i < 24; i++) - for(j = 0; j < (int)dimarray[0]; j++) - buf63[i][j] = n++; + /*------------------------------------------------------------------------- + * H5T_REFERENCE + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if(dset_name) + { + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) + status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1); + } + } + write_attr(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); + } + + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_attr(loc_id,3,dims3,"enum3D",tid,0); + status = H5Tclose(tid); - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_attr(loc_id, 3, dims3, "array3D", tid, buf63); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT - *------------------------------------------------------------------------- - */ - n=1; f=1; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - buf73[i][j][k]=n++; - buf83[i][j][k]=f++; - } - } - } - write_attr(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); - write_attr(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); + /* Allocate and initialize VL dataset to write */ + n = 0; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + int l; + + buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); + buf53[i][j][k].len = i + 1; + for(l = 0; l < i + 1; l++) + ((int *)buf53[i][j][k].p)[l] = n++; + } + } + } + + sid = H5Screate_simple(3, dims3, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + status = H5Awrite(aid, tid, buf53); + HDassert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53); + HDassert(status >= 0); + status = H5Aclose(aid); + status = H5Tclose(tid); + status = H5Sclose(sid); + + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + n = 1; + for(i = 0; i < 24; i++) + for(j = 0; j < (int)dimarray[0]; j++) + buf63[i][j] = n++; + + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 3, dims3, "array3D", tid, buf63); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + n=1; f=1; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + buf73[i][j][k]=n++; + buf83[i][j][k]=f++; + } + } + } + write_attr(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); + write_attr(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); } @@ -4228,441 +4228,441 @@ static void write_attr_in(hid_t loc_id, */ static void write_dset_in(hid_t loc_id, - const char* dset_name, /* for saving reference to dataset*/ - hid_t fid) + const char* dset_name, /* for saving reference to dataset*/ + hid_t fid) { - /* Compound datatype */ - typedef struct s_t - { - char a; - double b; - } s_t; - - typedef enum - { - E_RED, - E_GREEN - } e_t; - - hid_t did; - hid_t sid; - hid_t tid; - hid_t plist_id; - herr_t status; - int val, i, j, k, n; - float f; - int fillvalue=2; - - /* create 1D attributes with dimension [2], 2 elements */ - hsize_t dims[1]={2}; - char buf1[2][2]= {"ab","de"}; /* string */ - char buf2[2]= {1,2}; /* bitfield, opaque */ - s_t buf3[2]= {{1,2},{3,4}}; /* compound */ - hobj_ref_t buf4[2]; /* reference */ - hvl_t buf5[2]; /* vlen */ - hsize_t dimarray[1]={3}; /* array dimension */ - int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */ - int buf7[2]= {1,2}; /* integer */ - float buf8[2]= {1,2}; /* float */ - - /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2]={3,2}; - char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */ - char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ - s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ - hobj_ref_t buf42[3][2]; /* reference */ - hvl_t buf52[3][2]; /* vlen */ - int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */ - int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */ - float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */ - - /* create 3D attributes with dimension [4][3][2], 24 elements */ - hsize_t dims3[3]={4,3,2}; - char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", - "rs","tu","vw","xz","AB","CD","EF","GH", - "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ - char buf23[4][3][2]; /* bitfield, opaque */ - s_t buf33[4][3][2]; /* compound */ - hobj_ref_t buf43[4][3][2]; /* reference */ - hvl_t buf53[4][3][2]; /* vlen */ - int buf63[24][3]; /* array */ - int buf73[4][3][2]; /* integer */ - float buf83[4][3][2]; /* float */ + /* Compound datatype */ + typedef struct s_t + { + char a; + double b; + } s_t; + typedef enum + { + E_RED, + E_GREEN + } e_t; -/*------------------------------------------------------------------------- - * 1D - *------------------------------------------------------------------------- - */ + hid_t did; + hid_t sid; + hid_t tid; + hid_t plist_id; + herr_t status; + int val, i, j, k, n; + float f; + int fillvalue=2; + + /* create 1D attributes with dimension [2], 2 elements */ + hsize_t dims[1]={2}; + char buf1[2][2]= {"ab","de"}; /* string */ + char buf2[2]= {1,2}; /* bitfield, opaque */ + s_t buf3[2]= {{1,2},{3,4}}; /* compound */ + hobj_ref_t buf4[2]; /* reference */ + hvl_t buf5[2]; /* vlen */ + hsize_t dimarray[1]={3}; /* array dimension */ + int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */ + int buf7[2]= {1,2}; /* integer */ + float buf8[2]= {1,2}; /* float */ + + /* create 2D attributes with dimension [3][2], 6 elements */ + hsize_t dims2[2]={3,2}; + char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */ + char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ + s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ + hobj_ref_t buf42[3][2]; /* reference */ + hvl_t buf52[3][2]; /* vlen */ + int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */ + int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */ + float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */ + + /* create 3D attributes with dimension [4][3][2], 24 elements */ + hsize_t dims3[3]={4,3,2}; + char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", + "rs","tu","vw","xz","AB","CD","EF","GH", + "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ + char buf23[4][3][2]; /* bitfield, opaque */ + s_t buf33[4][3][2]; /* compound */ + hobj_ref_t buf43[4][3][2]; /* reference */ + hvl_t buf53[4][3][2]; /* vlen */ + int buf63[24][3]; /* array */ + int buf73[4][3][2]; /* integer */ + float buf83[4][3][2]; /* float */ -/*------------------------------------------------------------------------- - * H5T_STRING - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); - write_dset(loc_id,1,dims,"string",tid,buf1); - status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_BITFIELD - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,1,dims,"bitfield",tid,buf2); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * 1D + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_OPAQUE - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,1,dims,"opaque",tid,buf2); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, 2); + write_dset(loc_id,1,dims,"string",tid,buf1); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,1,dims,"compound",tid,buf3); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_STD_B8LE); + write_dset(loc_id,1,dims,"bitfield",tid,buf2); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_REFERENCE - *------------------------------------------------------------------------- - */ - /* Create references to dataset */ - if(dset_name) - { - status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1); - status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1); - write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4); - } + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_dset(loc_id,1,dims,"opaque",tid,buf2); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,1,dims,"enum",tid,0); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_dset(loc_id,1,dims,"compound",tid,buf3); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_REFERENCE + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if(dset_name) + { + status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1); + status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1); + write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4); + } - /* Allocate and initialize VL dataset to write */ - - buf5[0].len = 1; - buf5[0].p = HDmalloc( 1 * sizeof(int)); - ((int *)buf5[0].p)[0]=1; - buf5[1].len = 2; - buf5[1].p = HDmalloc( 2 * sizeof(int)); - ((int *)buf5[1].p)[0]=2; - ((int *)buf5[1].p)[1]=3; - - sid = H5Screate_simple(1, dims, NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); - HDassert(status >= 0); - status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); - status = H5Dclose(did); - status = H5Tclose(tid); - status = H5Sclose(sid); + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_dset(loc_id,1,dims,"enum",tid,0); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_dset(loc_id, 1, dims, "array", tid, buf6); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT - *------------------------------------------------------------------------- - */ - write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); - write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); + /* Allocate and initialize VL dataset to write */ + buf5[0].len = 1; + buf5[0].p = HDmalloc( 1 * sizeof(int)); + ((int *)buf5[0].p)[0]=1; + buf5[1].len = 2; + buf5[1].p = HDmalloc( 2 * sizeof(int)); + ((int *)buf5[1].p)[0]=2; + ((int *)buf5[1].p)[1]=3; + + sid = H5Screate_simple(1, dims, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); + HDassert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5); + HDassert(status >= 0); + status = H5Dclose(did); + status = H5Tclose(tid); + status = H5Sclose(sid); -/*------------------------------------------------------------------------- - * 2D - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 1, dims, "array", tid, buf6); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_STRING - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); - write_dset(loc_id,2,dims2,"string2D",tid,buf12); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); + write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); -/*------------------------------------------------------------------------- - * H5T_BITFIELD - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22); - status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_OPAQUE - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,2,dims2,"opaque2D",tid,buf22); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * 2D + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,2,dims2,"compound2D",tid,buf32); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, 2); + write_dset(loc_id,2,dims2,"string2D",tid,buf12); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_REFERENCE - *------------------------------------------------------------------------- - */ - /* Create references to dataset */ - if(dset_name) - { - for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) { - status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1); - } - } - write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); - } + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_STD_B8LE); + write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,2,dims2,"enum2D",tid,0); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_dset(loc_id,2,dims2,"opaque2D",tid,buf22); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_dset(loc_id,2,dims2,"compound2D",tid,buf32); + status = H5Tclose(tid); - /* Allocate and initialize VL dataset to write */ - n=0; - for(i = 0; i < 3; i++) - for(j = 0; j < 2; j++) { - int l; - - buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); - buf52[i][j].len = i + 1; - for(l = 0; l < i + 1; l++) - ((int *)buf52[i][j].p)[l] = n++; - } - - sid = H5Screate_simple(2, dims2, NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52); - HDassert(status >= 0); - status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52); - HDassert(status >= 0); - status = H5Dclose(did); - status = H5Tclose(tid); - status = H5Sclose(sid); + /*------------------------------------------------------------------------- + * H5T_REFERENCE + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if(dset_name) + { + for(i = 0; i < 3; i++) { + for(j = 0; j < 2; j++) { + status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1); + } + } + write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); + } -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_dset(loc_id, 2, dims2, "array2D", tid, buf62); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_dset(loc_id,2,dims2,"enum2D",tid,0); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_INTEGER, write a fill value - *------------------------------------------------------------------------- - */ - plist_id = H5Pcreate(H5P_DATASET_CREATE); - status = H5Pset_fill_value(plist_id, H5T_NATIVE_INT, &fillvalue); - sid = H5Screate_simple(2, dims2, NULL); - did = H5Dcreate2(loc_id, "integer2D", H5T_NATIVE_INT, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT); - status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf72); - status = H5Pclose(plist_id); - status = H5Dclose(did); - status = H5Sclose(sid); + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_FLOAT - *------------------------------------------------------------------------- - */ + /* Allocate and initialize VL dataset to write */ + n=0; + for(i = 0; i < 3; i++) + for(j = 0; j < 2; j++) { + int l; - write_dset(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); + buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); + buf52[i][j].len = i + 1; + for(l = 0; l < i + 1; l++) + ((int *)buf52[i][j].p)[l] = n++; + } + sid = H5Screate_simple(2, dims2, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52); + HDassert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52); + HDassert(status >= 0); + status = H5Dclose(did); + status = H5Tclose(tid); + status = H5Sclose(sid); -/*------------------------------------------------------------------------- - * 3D - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 2, dims2, "array2D", tid, buf62); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_STRING - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, 2); - write_dset(loc_id,3,dims3,"string3D",tid,buf13); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_INTEGER, write a fill value + *------------------------------------------------------------------------- + */ + plist_id = H5Pcreate(H5P_DATASET_CREATE); + status = H5Pset_fill_value(plist_id, H5T_NATIVE_INT, &fillvalue); + sid = H5Screate_simple(2, dims2, NULL); + did = H5Dcreate2(loc_id, "integer2D", H5T_NATIVE_INT, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT); + status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf72); + status = H5Pclose(plist_id); + status = H5Dclose(did); + status = H5Sclose(sid); -/*------------------------------------------------------------------------- - * H5T_BITFIELD - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_FLOAT + *------------------------------------------------------------------------- + */ - n=1; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - buf23[i][j][k]=n++; - } - } - } - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23); - status = H5Tclose(tid); + write_dset(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); -/*------------------------------------------------------------------------- - * H5T_OPAQUE - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,3,dims3,"opaque3D",tid,buf23); - status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * 3D + *------------------------------------------------------------------------- + */ - n=1; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - buf33[i][j][k].a=n++; - buf33[i][j][k].b=n++; - } - } - } - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,3,dims3,"compound3D",tid,buf33); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, 2); + write_dset(loc_id,3,dims3,"string3D",tid,buf13); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_REFERENCE - *------------------------------------------------------------------------- - */ - /* Create references to dataset */ - if(dset_name) - { - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) - status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1); - } - } - write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); - } + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,3,dims3,"enum3D",tid,0); - status = H5Tclose(tid); + n=1; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + buf23[i][j][k]=n++; + } + } + } + tid = H5Tcopy(H5T_STD_B8LE); + write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23); + status = H5Tclose(tid); -/*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_dset(loc_id,3,dims3,"opaque3D",tid,buf23); + status = H5Tclose(tid); - /* Allocate and initialize VL dataset to write */ - n = 0; - for(i = 0; i < 4; i++) - for(j = 0; j < 3; j++) - for(k = 0; k < 2; k++) { - int l; - - buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); - buf53[i][j][k].len = i + 1; - for(l = 0; l < i + 1; l++) - ((int *)buf53[i][j][k].p)[l] = n++; - } - - sid = H5Screate_simple(3, dims3, NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53); - HDassert(status >= 0); - status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53); - HDassert(status >= 0); - status = H5Dclose(did); - status = H5Tclose(tid); - status = H5Sclose(sid); + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ - n=1; - for(i = 0; i < 24; i++) { - for(j = 0; j < (int)dimarray[0]; j++) { - buf63[i][j]=n++; - } - } + n=1; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + buf33[i][j][k].a=n++; + buf33[i][j][k].b=n++; + } + } + } + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_dset(loc_id,3,dims3,"compound3D",tid,buf33); + status = H5Tclose(tid); - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_dset(loc_id, 3, dims3, "array3D", tid, buf63); - status = H5Tclose(tid); + /*------------------------------------------------------------------------- + * H5T_REFERENCE + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if(dset_name) + { + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) + status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1); + } + } + write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); + } -/*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT - *------------------------------------------------------------------------- - */ - n=1; f=1; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { - buf73[i][j][k]=n++; - buf83[i][j][k]=f++; - } - } - } - write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); - write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_dset(loc_id,3,dims3,"enum3D",tid,0); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ + + /* Allocate and initialize VL dataset to write */ + n = 0; + for(i = 0; i < 4; i++) + for(j = 0; j < 3; j++) + for(k = 0; k < 2; k++) { + int l; + + buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); + buf53[i][j][k].len = i + 1; + for(l = 0; l < i + 1; l++) + ((int *)buf53[i][j][k].p)[l] = n++; + } + + sid = H5Screate_simple(3, dims3, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53); + HDassert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53); + HDassert(status >= 0); + status = H5Dclose(did); + status = H5Tclose(tid); + status = H5Sclose(sid); + + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + n=1; + for(i = 0; i < 24; i++) { + for(j = 0; j < (int)dimarray[0]; j++) { + buf63[i][j]=n++; + } + } + + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 3, dims3, "array3D", tid, buf63); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + n=1; f=1; + for(i = 0; i < 4; i++) { + for(j = 0; j < 3; j++) { + for(k = 0; k < 2; k++) { + buf73[i][j][k]=n++; + buf83[i][j][k]=f++; + } + } + } + write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); + write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); } @@ -4708,18 +4708,18 @@ static void gent_attr_all(void) root_id = H5Gopen2(fid, "/", H5P_DEFAULT); /*------------------------------------------------------------------------- - * write a series of attributes on the dataset, group - *------------------------------------------------------------------------- - */ + * write a series of attributes on the dataset, group + *------------------------------------------------------------------------- + */ write_attr_in(did,"dset",fid); write_attr_in(group_id,NULL,0); write_attr_in(root_id,NULL,0); /*------------------------------------------------------------------------- - * write a series of datasets on group 2 - *------------------------------------------------------------------------- - */ + * write a series of datasets on group 2 + *------------------------------------------------------------------------- + */ write_dset_in(group2_id,"/dset",fid); @@ -4753,27 +4753,27 @@ static void gent_attr_all(void) static int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name, - hid_t tid, void *buf) + hid_t tid, void *buf) { - hid_t aid; - hid_t sid; - herr_t status; + hid_t aid; + hid_t sid; + herr_t status; - /* Create a buf space */ - sid = H5Screate_simple(rank, dims, NULL); + /* Create a buf space */ + sid = H5Screate_simple(rank, dims, NULL); - /* Create the attribute */ - aid = H5Acreate2(loc_id, attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT); + /* Create the attribute */ + aid = H5Acreate2(loc_id, attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - /* Write the buf */ - if(buf) - status = H5Awrite(aid, tid, buf); + /* Write the buf */ + if(buf) + status = H5Awrite(aid, tid, buf); - /* Close */ - status = H5Aclose(aid); - status = H5Sclose(sid); + /* Close */ + status = H5Aclose(aid); + status = H5Sclose(sid); - return status; + return status; } /*------------------------------------------------------------------------- @@ -4792,7 +4792,7 @@ int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name, static int write_dset( hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, - hid_t tid, void *buf ) + hid_t tid, void *buf ) { hid_t did; hid_t sid; @@ -4820,23 +4820,23 @@ static void gent_compound_complex(void) { /* Structure and array for compound types */ typedef struct Array1Struct { - int a; - const char *b[F41_DIMb]; - char c[F41_ARRAY_DIMc]; - short d[F41_ARRAY_DIMd1][F41_ARRAY_DIMd2]; - float e; - double f[F41_ARRAY_DIMf]; - char g; + int a; + const char *b[F41_DIMb]; + char c[F41_ARRAY_DIMc]; + short d[F41_ARRAY_DIMd1][F41_ARRAY_DIMd2]; + float e; + double f[F41_ARRAY_DIMf]; + char g; } Array1Struct; Array1Struct Array1[F41_LENGTH]; /* Define the value of the string array */ const char *quote [F41_DIMb] = { - "A fight is a contract that takes two people to honor.", - "A combative stance means that you've accepted the contract.", - "In which case, you deserve what you get.", - " -- Professor Cheng Man-ch'ing" - }; + "A fight is a contract that takes two people to honor.", + "A combative stance means that you've accepted the contract.", + "In which case, you deserve what you get.", + " -- Professor Cheng Man-ch'ing" + }; /* Define the value of the character array */ char chararray [F41_ARRAY_DIMc] = {'H', 'e', 'l', 'l', 'o', '!'}; @@ -4863,24 +4863,24 @@ static void gent_compound_complex(void) Array1[m].a = m; for(n = 0; n < F41_DIMb; n++) { - Array1[m].b[n] = quote[n]; - } + Array1[m].b[n] = quote[n]; + } - for(n = 0; n < F41_ARRAY_DIMc; n++) { + for(n = 0; n < F41_ARRAY_DIMc; n++) { Array1[m].c[n] = chararray[n]; - } + } - for(n = 0; n < F41_ARRAY_DIMd1; n++) { - for(o = 0; o < F41_ARRAY_DIMd2; o++){ - Array1[m].d[n][o] = m + n + o; + for(n = 0; n < F41_ARRAY_DIMd1; n++) { + for(o = 0; o < F41_ARRAY_DIMd2; o++){ + Array1[m].d[n][o] = m + n + o; } } Array1[m].e = (float)( m * .96 ); - for(n = 0; n < F41_ARRAY_DIMf; n++) { + for(n = 0; n < F41_ARRAY_DIMf; n++) { Array1[m].f[n] = ( m * 1024.9637 ); - } + } Array1[m].g = 'm'; } @@ -4891,7 +4891,7 @@ static void gent_compound_complex(void) /* Create the file */ datafile = H5Fcreate(FILE41, H5F_ACC_TRUNC, H5P_DEFAULT, - H5P_DEFAULT); + H5P_DEFAULT); HDassert(datafile >= 0); /* Copy the array data type for the string array */ @@ -4928,40 +4928,40 @@ static void gent_compound_complex(void) /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, "a_name", - HOFFSET(Array1Struct, a), H5T_NATIVE_INT); + HOFFSET(Array1Struct, a), H5T_NATIVE_INT); HDassert(status >= 0); status = H5Tinsert(Array1Structid, "b_name", - HOFFSET(Array1Struct, b), str_array_id); + HOFFSET(Array1Struct, b), str_array_id); HDassert(status >= 0); status = H5Tinsert(Array1Structid, "c_name", - HOFFSET(Array1Struct, c), array1_tid); + HOFFSET(Array1Struct, c), array1_tid); HDassert(status >= 0); status = H5Tinsert(Array1Structid, "d_name", - HOFFSET(Array1Struct, d), array2_tid); + HOFFSET(Array1Struct, d), array2_tid); HDassert(status >= 0); status = H5Tinsert(Array1Structid, "e_name", - HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT); + HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT); HDassert(status >= 0); status = H5Tinsert(Array1Structid, "f_name", - HOFFSET(Array1Struct, f), array4_tid); + HOFFSET(Array1Struct, f), array4_tid); HDassert(status >= 0); status = H5Tinsert(Array1Structid, "g_name", - HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR); + HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR); HDassert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(datafile, F41_DATASETNAME, Array1Structid, - dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, - H5P_DEFAULT, Array1); + H5P_DEFAULT, Array1); HDassert(status >= 0); /* Release resources */ @@ -4996,106 +4996,106 @@ static void gent_compound_complex(void) static void gent_named_dtype_attr(void) { - hid_t fid; - hid_t did; - hid_t sid; - hid_t tid; - hid_t aid; - hid_t gid; - int data=8; - herr_t ret; - - /* Create a file */ - fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid>0); + hid_t fid; + hid_t did; + hid_t sid; + hid_t tid; + hid_t aid; + hid_t gid; + int data=8; + herr_t ret; -/*------------------------------------------------------------------------- - * datatype - *------------------------------------------------------------------------- - */ + /* Create a file */ + fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid>0); - /* Create a datatype to commit and use */ - tid=H5Tcopy(H5T_NATIVE_INT); - HDassert(tid>0); + /*------------------------------------------------------------------------- + * datatype + *------------------------------------------------------------------------- + */ - /* Commit datatype to file */ - ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + /* Create a datatype to commit and use */ + tid=H5Tcopy(H5T_NATIVE_INT); + HDassert(tid>0); - /* Create a hard link to the datatype */ - ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + /* Commit datatype to file */ + ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + HDassert(ret >= 0); - /* Create a scalar dataspace used for all objects */ - sid = H5Screate(H5S_SCALAR); - HDassert(sid > 0); + /* Create a hard link to the datatype */ + ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT); + HDassert(ret >= 0); - /* Create attribute on commited datatype */ - aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + /* Create a scalar dataspace used for all objects */ + sid = H5Screate(H5S_SCALAR); + HDassert(sid > 0); - /* Write data into the attribute */ - ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + /* Create attribute on commited datatype */ + aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT); + HDassert(aid > 0); -/*------------------------------------------------------------------------- - * dataset - *------------------------------------------------------------------------- - */ + /* Write data into the attribute */ + ret = H5Awrite(aid, H5T_NATIVE_INT, &data); + HDassert(ret >= 0); - /* Create dataset */ - did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(did > 0); + /*------------------------------------------------------------------------- + * dataset + *------------------------------------------------------------------------- + */ - /* Create attribute on dataset */ - aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + /* Create dataset */ + did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + HDassert(did > 0); - /* Write data into the attribute */ - ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + /* Create attribute on dataset */ + aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); + HDassert(aid > 0); -/*------------------------------------------------------------------------- - * group - *------------------------------------------------------------------------- - */ + /* Write data into the attribute */ + ret = H5Awrite(aid, H5T_NATIVE_INT, &data); + HDassert(ret >= 0); - /* Create a group */ - gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid > 0); + /*------------------------------------------------------------------------- + * group + *------------------------------------------------------------------------- + */ - /* Create attribute on group */ - aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + /* Create a group */ + gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + HDassert(gid > 0); - /* Write data into the attribute */ - ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + /* Create attribute on group */ + aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); + HDassert(aid > 0); -/*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ + /* Write data into the attribute */ + ret = H5Awrite(aid, H5T_NATIVE_INT, &data); + HDassert(ret >= 0); - /* Close attribute */ - ret = H5Aclose(aid); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ + + /* Close attribute */ + ret = H5Aclose(aid); + HDassert(ret >= 0); - /* Close dataset */ - ret = H5Dclose(did); - HDassert(ret >= 0); + /* Close dataset */ + ret = H5Dclose(did); + HDassert(ret >= 0); - /* Close dataspace */ - ret = H5Sclose(sid); - HDassert(ret >= 0); + /* Close dataspace */ + ret = H5Sclose(sid); + HDassert(ret >= 0); - /* Close datatype */ - ret = H5Tclose(tid); - HDassert(ret >= 0); + /* Close datatype */ + ret = H5Tclose(tid); + HDassert(ret >= 0); - /* Close file */ - ret = H5Fclose(fid); - HDassert(ret >= 0); + /* Close file */ + ret = H5Fclose(fid); + HDassert(ret >= 0); } @@ -5154,7 +5154,7 @@ static void gent_zero_dim_size(void) /* dataset */ dataset = H5Dcreate2(fid, "dset of 0 dimension size", H5T_STD_I32BE, space, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT); /* nothing should be written */ H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &dset_buf); @@ -5178,11 +5178,11 @@ static void gent_zero_dim_size(void) */ static int make_dset(hid_t loc_id, - const char *name, - hid_t sid, - hid_t tid, - hid_t dcpl, - void *buf) + const char *name, + hid_t sid, + hid_t tid, + hid_t dcpl, + void *buf) { hid_t dsid; @@ -5200,7 +5200,7 @@ int make_dset(hid_t loc_id, return 0; -out: + out: H5E_BEGIN_TRY { H5Dclose(dsid); } H5E_END_TRY; @@ -5219,38 +5219,38 @@ out: static void make_external(hid_t fid) { - hid_t dcpl; /*dataset creation property list */ - hid_t sid; /*dataspace ID */ - hid_t dsid; /*dataset ID */ - hsize_t cur_size[1]; /*data space current size */ - hsize_t max_size[1]; /*data space maximum size */ - hsize_t size; /*bytes reserved for data in the external file*/ - int ret; + hid_t dcpl; /*dataset creation property list */ + hid_t sid; /*dataspace ID */ + hid_t dsid; /*dataset ID */ + hsize_t cur_size[1]; /*data space current size */ + hsize_t max_size[1]; /*data space maximum size */ + hsize_t size; /*bytes reserved for data in the external file*/ + int ret; - cur_size[0] = max_size[0] = 100; - size = (max_size[0]*sizeof(int)/2); + cur_size[0] = max_size[0] = 100; + size = (max_size[0]*sizeof(int)/2); - dcpl = H5Pcreate(H5P_DATASET_CREATE); - ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size); - HDassert(ret >= 0); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size); + HDassert(ret >= 0); - ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size); - HDassert(ret >= 0); + ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size); + HDassert(ret >= 0); - sid = H5Screate_simple(1, cur_size, max_size); - HDassert(ret >= 0); + sid = H5Screate_simple(1, cur_size, max_size); + HDassert(ret >= 0); - dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - HDassert(ret >= 0); + dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + HDassert(ret >= 0); - H5Dclose(dsid); - HDassert(ret >= 0); + H5Dclose(dsid); + HDassert(ret >= 0); - H5Sclose(sid); - HDassert(ret >= 0); + H5Sclose(sid); + HDassert(ret >= 0); - H5Pclose(dcpl); - HDassert(ret >= 0); + H5Pclose(dcpl); + HDassert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5262,312 +5262,312 @@ make_external(hid_t fid) */ static void gent_filters(void) { - hid_t fid; /* file id */ - hid_t dcpl; /* dataset creation property list */ - hid_t sid; /* dataspace ID */ - hid_t tid; /* datatype ID */ + hid_t fid; /* file id */ + hid_t dcpl; /* dataset creation property list */ + hid_t sid; /* dataspace ID */ + hid_t tid; /* datatype ID */ #ifdef H5_HAVE_FILTER_SZIP - unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK; - unsigned szip_pixels_per_block=4; + unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK; + unsigned szip_pixels_per_block=4; #endif /* H5_HAVE_FILTER_SZIP */ - hsize_t dims1[RANK] = {DIM1,DIM2}; - hsize_t chunk_dims[RANK] = {CDIM1,CDIM2}; - int buf1[DIM1][DIM2]; - int i, j, n, ret; - - for(i=n=0; i=0); + /* create a file */ + fid = H5Fcreate(FILE44, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid>=0); - /* create a space */ - sid = H5Screate_simple(SPACE2_RANK, dims1, NULL); + /* create a space */ + sid = H5Screate_simple(SPACE2_RANK, dims1, NULL); - /* create a dataset creation property list; the same DCPL is used for all dsets */ - dcpl = H5Pcreate(H5P_DATASET_CREATE); + /* create a dataset creation property list; the same DCPL is used for all dsets */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); -/*------------------------------------------------------------------------- - * create a compact and contiguous storage layout dataset - * add a comment to the datasets - *------------------------------------------------------------------------- - */ - ret = H5Pset_layout(dcpl, H5D_COMPACT); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * create a compact and contiguous storage layout dataset + * add a comment to the datasets + *------------------------------------------------------------------------- + */ + ret = H5Pset_layout(dcpl, H5D_COMPACT); + HDassert(ret >= 0); - ret=make_dset(fid,"compact",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"compact",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); - ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT); - HDassert(ret >= 0); + ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT); + HDassert(ret >= 0); - ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS); - HDassert(ret >= 0); + ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS); + HDassert(ret >= 0); - ret=make_dset(fid,"contiguous",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"contiguous",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); - ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage", H5P_DEFAULT); - HDassert(ret >= 0); + ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage", H5P_DEFAULT); + HDassert(ret >= 0); - ret = H5Pset_layout(dcpl, H5D_CHUNKED); - HDassert(ret >= 0); + ret = H5Pset_layout(dcpl, H5D_CHUNKED); + HDassert(ret >= 0); - ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); + HDassert(ret >= 0); - ret=make_dset(fid,"chunked",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"chunked",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); - ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT); - HDassert(ret >= 0); + ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * make several dataset with filters - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * make several dataset with filters + *------------------------------------------------------------------------- + */ - /* set up chunk */ - ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + /* set up chunk */ + ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * SZIP - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * SZIP + *------------------------------------------------------------------------- + */ #ifdef H5_HAVE_FILTER_SZIP - if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); - - /* set szip data */ - ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block); - HDassert(ret >= 0); - - ret=make_dset(fid,"szip",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); - } + if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); + + /* set szip data */ + ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block); + HDassert(ret >= 0); + + ret=make_dset(fid,"szip",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); + } #endif /* H5_HAVE_FILTER_SZIP */ -/*------------------------------------------------------------------------- - * GZIP - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * GZIP + *------------------------------------------------------------------------- + */ #if defined (H5_HAVE_FILTER_DEFLATE) - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); - /* set deflate data */ - ret = H5Pset_deflate(dcpl, 9); - HDassert(ret >= 0); + /* set deflate data */ + ret = H5Pset_deflate(dcpl, 9); + HDassert(ret >= 0); - ret=make_dset(fid,"deflate",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"deflate",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); #endif -/*------------------------------------------------------------------------- - * shuffle - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * shuffle + *------------------------------------------------------------------------- + */ #if defined (H5_HAVE_FILTER_SHUFFLE) - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); - /* set the shuffle filter */ - ret = H5Pset_shuffle(dcpl); - HDassert(ret >= 0); + /* set the shuffle filter */ + ret = H5Pset_shuffle(dcpl); + HDassert(ret >= 0); - ret=make_dset(fid,"shuffle",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"shuffle",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); #endif -/*------------------------------------------------------------------------- - * checksum - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * checksum + *------------------------------------------------------------------------- + */ #if defined (H5_HAVE_FILTER_FLETCHER32) - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); - /* set the checksum filter */ - ret = H5Pset_fletcher32(dcpl); - HDassert(ret >= 0); + /* set the checksum filter */ + ret = H5Pset_fletcher32(dcpl); + HDassert(ret >= 0); - ret=make_dset(fid,"fletcher32",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"fletcher32",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); #endif -/*------------------------------------------------------------------------- - * nbit - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * nbit + *------------------------------------------------------------------------- + */ #if defined (H5_HAVE_FILTER_NBIT) - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); - - /* set the checksum filter */ - ret = H5Pset_nbit(dcpl); - HDassert(ret >= 0); - - tid=H5Tcopy(H5T_NATIVE_INT); - H5Tset_precision(tid,H5Tget_size(tid)-1); - ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1); - HDassert(ret >= 0); + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); + + /* set the checksum filter */ + ret = H5Pset_nbit(dcpl); + HDassert(ret >= 0); + + tid=H5Tcopy(H5T_NATIVE_INT); + H5Tset_precision(tid,H5Tget_size(tid)-1); + ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1); + HDassert(ret >= 0); #endif -/*------------------------------------------------------------------------- - * scaleoffset - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * scaleoffset + *------------------------------------------------------------------------- + */ #if defined (H5_HAVE_FILTER_SCALEOFFSET) - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); - /* set the scaleoffset filter */ - ret = H5Pset_scaleoffset(dcpl,H5Z_SO_INT,(int)H5Tget_size(H5T_NATIVE_INT)); - HDassert(ret >= 0); + /* set the scaleoffset filter */ + ret = H5Pset_scaleoffset(dcpl,H5Z_SO_INT,(int)H5Tget_size(H5T_NATIVE_INT)); + HDassert(ret >= 0); - ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); #endif -/*------------------------------------------------------------------------- - * all filters - *------------------------------------------------------------------------- - */ - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * all filters + *------------------------------------------------------------------------- + */ + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); #if defined (H5_HAVE_FILTER_SHUFFLE) - /* set the shuffle filter */ - ret = H5Pset_shuffle(dcpl); - HDassert(ret >= 0); + /* set the shuffle filter */ + ret = H5Pset_shuffle(dcpl); + HDassert(ret >= 0); #endif #ifdef H5_HAVE_FILTER_SZIP - if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { - szip_options_mask=H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK; - /* set szip data */ - ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block); - HDassert(ret >= 0); - } + if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { + szip_options_mask=H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK; + /* set szip data */ + ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block); + HDassert(ret >= 0); + } #endif /* H5_HAVE_FILTER_SZIP */ #if defined (H5_HAVE_FILTER_DEFLATE) - /* set deflate data */ - ret = H5Pset_deflate(dcpl, 5); - HDassert(ret >= 0); + /* set deflate data */ + ret = H5Pset_deflate(dcpl, 5); + HDassert(ret >= 0); #endif #if defined (H5_HAVE_FILTER_FLETCHER32) - /* set the checksum filter */ - ret = H5Pset_fletcher32(dcpl); - HDassert(ret >= 0); + /* set the checksum filter */ + ret = H5Pset_fletcher32(dcpl); + HDassert(ret >= 0); #endif #if defined (H5_HAVE_FILTER_NBIT) - /* set the nbit filter */ - ret = H5Pset_nbit(dcpl); - HDassert(ret >= 0); + /* set the nbit filter */ + ret = H5Pset_nbit(dcpl); + HDassert(ret >= 0); #endif - ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * user defined filter - *------------------------------------------------------------------------- - */ - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * user defined filter + *------------------------------------------------------------------------- + */ + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); - ret = H5Zregister (H5Z_MYFILTER); - HDassert(ret >= 0); + ret = H5Zregister (H5Z_MYFILTER); + HDassert(ret >= 0); - ret = H5Pset_filter (dcpl, MYFILTER_ID, 0, 0, NULL); - HDassert(ret >= 0); + ret = H5Pset_filter (dcpl, MYFILTER_ID, 0, 0, NULL); + HDassert(ret >= 0); - ret=make_dset(fid,"myfilter",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + ret=make_dset(fid,"myfilter",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); - /* remove the filters from the dcpl */ - ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); - HDassert(ret >= 0); + /* remove the filters from the dcpl */ + ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * make an external dataset - *------------------------------------------------------------------------- - */ - make_external(fid); + /*------------------------------------------------------------------------- + * make an external dataset + *------------------------------------------------------------------------- + */ + make_external(fid); -/*------------------------------------------------------------------------- - * H5D_ALLOC_TIME_EARLY - *------------------------------------------------------------------------- - */ - ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY); - HDassert(ret >= 0); - ret=make_dset(fid,"alloc_time_early",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * H5D_ALLOC_TIME_EARLY + *------------------------------------------------------------------------- + */ + ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY); + HDassert(ret >= 0); + ret=make_dset(fid,"alloc_time_early",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * H5D_ALLOC_TIME_INCR - *------------------------------------------------------------------------- - */ - ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR); - HDassert(ret >= 0); - ret=make_dset(fid,"alloc_time_incr",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * H5D_ALLOC_TIME_INCR + *------------------------------------------------------------------------- + */ + ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR); + HDassert(ret >= 0); + ret=make_dset(fid,"alloc_time_incr",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * H5D_ALLOC_TIME_LATE - *------------------------------------------------------------------------- - */ - ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE); - HDassert(ret >= 0); - ret=make_dset(fid,"alloc_time_late",sid,H5T_NATIVE_INT,dcpl,buf1); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * H5D_ALLOC_TIME_LATE + *------------------------------------------------------------------------- + */ + ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE); + HDassert(ret >= 0); + ret=make_dset(fid,"alloc_time_late",sid,H5T_NATIVE_INT,dcpl,buf1); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * commit a H5G_TYPE type with a comment - *------------------------------------------------------------------------- - */ - tid = H5Tcopy(H5T_STD_B8LE); - ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * commit a H5G_TYPE type with a comment + *------------------------------------------------------------------------- + */ + tid = H5Tcopy(H5T_STD_B8LE); + ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + HDassert(ret >= 0); - ret = H5Oset_comment_by_name(fid, "mytype", "This is a commited datatype", H5P_DEFAULT); - HDassert(ret >= 0); + ret = H5Oset_comment_by_name(fid, "mytype", "This is a commited datatype", H5P_DEFAULT); + HDassert(ret >= 0); - ret = H5Tclose(tid); - HDassert(ret >= 0); + ret = H5Tclose(tid); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - ret = H5Sclose(sid); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ + ret = H5Sclose(sid); + HDassert(ret >= 0); - ret = H5Pclose(dcpl); - HDassert(ret >= 0); + ret = H5Pclose(dcpl); + HDassert(ret >= 0); - ret = H5Fclose(fid); - HDassert(ret >= 0); + ret = H5Fclose(fid); + HDassert(ret >= 0); } @@ -5580,10 +5580,10 @@ static void gent_filters(void) */ static size_t myfilter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, - size_t UNUSED *buf_size, void UNUSED **buf) + const unsigned int UNUSED *cd_values, size_t nbytes, + size_t UNUSED *buf_size, void UNUSED **buf) { - return nbytes; + return nbytes; } @@ -5598,21 +5598,21 @@ myfilter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, static herr_t set_local_myfilter(hid_t dcpl_id, hid_t UNUSED tid, hid_t UNUSED sid) { - unsigned flags; /* Filter flags */ - size_t cd_nelmts = 0; /* Number of filter parameters */ - unsigned cd_values[2] = {5, 6}; /* Filter parameters */ + unsigned flags; /* Filter flags */ + size_t cd_nelmts = 0; /* Number of filter parameters */ + unsigned cd_values[2] = {5, 6}; /* Filter parameters */ - /* Get the filter's current parameters */ - if(H5Pget_filter_by_id2(dcpl_id, MYFILTER_ID, &flags, &cd_nelmts, cd_values, 0, NULL, NULL) < 0) - return(FAIL); + /* Get the filter's current parameters */ + if(H5Pget_filter_by_id2(dcpl_id, MYFILTER_ID, &flags, &cd_nelmts, cd_values, 0, NULL, NULL) < 0) + return(FAIL); - cd_nelmts = 2; + cd_nelmts = 2; - /* Modify the filter's parameters for this dataset */ - if(H5Pmodify_filter(dcpl_id, MYFILTER_ID, flags, cd_nelmts, cd_values) < 0) - return(FAIL); + /* Modify the filter's parameters for this dataset */ + if(H5Pmodify_filter(dcpl_id, MYFILTER_ID, flags, cd_nelmts, cd_values) < 0) + return(FAIL); - return(SUCCEED); + return(SUCCEED); } /*------------------------------------------------------------------------- @@ -5641,9 +5641,9 @@ static void gent_fcontents(void) /*------------------------------------------------------------------------- - * links - *------------------------------------------------------------------------- - */ + * links + *------------------------------------------------------------------------- + */ /* hard link to "dset" */ @@ -5692,9 +5692,9 @@ static void gent_fcontents(void) HDassert(ret >= 0); /*------------------------------------------------------------------------- - * datatypes - *------------------------------------------------------------------------- - */ + * datatypes + *------------------------------------------------------------------------- + */ tid = H5Tcopy(H5T_NATIVE_INT); ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); HDassert(ret >= 0); @@ -5714,9 +5714,9 @@ static void gent_fcontents(void) /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ + * close + *------------------------------------------------------------------------- + */ ret = H5Fclose(fid); @@ -5741,152 +5741,152 @@ static void gent_fcontents(void) */ static void gent_fvalues(void) { - /* compound datatype */ - typedef struct c_t - { - char a; - double b; - } c_t; - - - hid_t fid; /* file id */ - hid_t dcpl; /* dataset creation property list */ - hid_t sid; /* dataspace ID */ - hid_t tid; /* datatype ID */ - hid_t did; /* datasetID */ - hsize_t dims[1]={2}; - int buf[2]={1,2}; /* integer */ - int fillval1=-99; /* integer fill value */ - c_t buf2[2]={{1,2},{3,4}}; /* compound */ - c_t fillval2[1]={{1,2}}; /* compound fill value */ - hvl_t buf3[2]; /* vlen */ - hvl_t fillval3; /* vlen fill value */ - hsize_t dimarray[1]={3}; /* array dimension */ - int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */ - int ret; - - /* create a file */ - fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid>=0); - - /* create a space */ - sid = H5Screate_simple(1, dims, NULL); - - /* create a dataset creation property list */ - dcpl = H5Pcreate(H5P_DATASET_CREATE); + /* compound datatype */ + typedef struct c_t + { + char a; + double b; + } c_t; + + + hid_t fid; /* file id */ + hid_t dcpl; /* dataset creation property list */ + hid_t sid; /* dataspace ID */ + hid_t tid; /* datatype ID */ + hid_t did; /* datasetID */ + hsize_t dims[1]={2}; + int buf[2]={1,2}; /* integer */ + int fillval1=-99; /* integer fill value */ + c_t buf2[2]={{1,2},{3,4}}; /* compound */ + c_t fillval2[1]={{1,2}}; /* compound fill value */ + hvl_t buf3[2]; /* vlen */ + hvl_t fillval3; /* vlen fill value */ + hsize_t dimarray[1]={3}; /* array dimension */ + int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */ + int ret; + + /* create a file */ + fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid>=0); + + /* create a space */ + sid = H5Screate_simple(1, dims, NULL); + + /* create a dataset creation property list */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); + + /*------------------------------------------------------------------------- + * make datasets with fill value combinations + * H5D_FILL_TIME_IFSET + *------------------------------------------------------------------------- + */ + ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * make datasets with fill value combinations - * H5D_FILL_TIME_IFSET - *------------------------------------------------------------------------- - */ - ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET); - HDassert(ret >= 0); + ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); + HDassert(ret >= 0); - ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + ret=make_dset(fid,"fill_time_ifset",sid,H5T_NATIVE_INT,dcpl,buf); + HDassert(ret >= 0); - ret=make_dset(fid,"fill_time_ifset",sid,H5T_NATIVE_INT,dcpl,buf); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * H5D_FILL_TIME_NEVER + *------------------------------------------------------------------------- + */ + ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * H5D_FILL_TIME_NEVER - *------------------------------------------------------------------------- - */ - ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER); - HDassert(ret >= 0); + ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); + HDassert(ret >= 0); - ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + ret=make_dset(fid,"fill_time_never",sid,H5T_NATIVE_INT,dcpl,buf); + HDassert(ret >= 0); - ret=make_dset(fid,"fill_time_never",sid,H5T_NATIVE_INT,dcpl,buf); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * H5D_FILL_TIME_ALLOC + *------------------------------------------------------------------------- + */ + ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * H5D_FILL_TIME_ALLOC - *------------------------------------------------------------------------- - */ - ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC); - HDassert(ret >= 0); + ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); + HDassert(ret >= 0); - ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + ret=make_dset(fid,"fill_time_alloc",sid,H5T_NATIVE_INT,dcpl,buf); + HDassert(ret >= 0); - ret=make_dset(fid,"fill_time_alloc",sid,H5T_NATIVE_INT,dcpl,buf); - HDassert(ret >= 0); + ret = H5Pclose(dcpl); + HDassert(ret >= 0); - ret = H5Pclose(dcpl); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * dataset with no fill value + *------------------------------------------------------------------------- + */ + write_dset(fid,1,dims,"no_fill",H5T_NATIVE_INT,buf); -/*------------------------------------------------------------------------- - * dataset with no fill value - *------------------------------------------------------------------------- - */ - write_dset(fid,1,dims,"no_fill",H5T_NATIVE_INT,buf); + /*------------------------------------------------------------------------- + * dataset with a H5T_COMPOUND fill value + *------------------------------------------------------------------------- + */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); + tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t)); + H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE); + ret = H5Pset_fill_value(dcpl, tid, &fillval2); + HDassert(ret >= 0); + ret=make_dset(fid,"fill_compound",sid,tid,dcpl,buf2); + HDassert(ret >= 0); + ret = H5Tclose(tid); + HDassert(ret >= 0); + ret = H5Pclose(dcpl); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * dataset with a H5T_COMPOUND fill value - *------------------------------------------------------------------------- - */ - dcpl = H5Pcreate(H5P_DATASET_CREATE); - tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t)); - H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE); - ret = H5Pset_fill_value(dcpl, tid, &fillval2); - HDassert(ret >= 0); - ret=make_dset(fid,"fill_compound",sid,tid,dcpl,buf2); - HDassert(ret >= 0); - ret = H5Tclose(tid); - HDassert(ret >= 0); - ret = H5Pclose(dcpl); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * dataset with a H5T_VLEN fill value + *------------------------------------------------------------------------- + */ + buf3[0].len = 1; + buf3[0].p = HDmalloc( 1 * sizeof(int)); + ((int *)buf3[0].p)[0]=1; + buf3[1].len = 2; + buf3[1].p = HDmalloc(2 * sizeof(int)); + ((int *)buf3[1].p)[0] = 2; + ((int *)buf3[1].p)[1] = 3; -/*------------------------------------------------------------------------- - * dataset with a H5T_VLEN fill value - *------------------------------------------------------------------------- - */ - buf3[0].len = 1; - buf3[0].p = HDmalloc( 1 * sizeof(int)); - ((int *)buf3[0].p)[0]=1; - buf3[1].len = 2; - buf3[1].p = HDmalloc(2 * sizeof(int)); - ((int *)buf3[1].p)[0] = 2; - ((int *)buf3[1].p)[1] = 3; - - tid = H5Tvlen_create(H5T_NATIVE_INT); - dcpl = H5Pcreate(H5P_DATASET_CREATE); - - fillval3.p=NULL; fillval3.len=0; - ret = H5Pset_fill_value(dcpl, tid, &fillval3); - HDassert(ret >= 0); - - did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3); - HDassert(ret >= 0); - ret = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf3); - HDassert(ret >= 0); - ret = H5Dclose(did); - ret = H5Tclose(tid); - ret = H5Pclose(dcpl); - HDassert(ret >= 0); + tid = H5Tvlen_create(H5T_NATIVE_INT); + dcpl = H5Pcreate(H5P_DATASET_CREATE); -/*------------------------------------------------------------------------- - * dataset with a H5T_ARRAY fill value - *------------------------------------------------------------------------- - */ - tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); - write_dset(fid, 1, dims, "fill_array", tid, buf4); - ret = H5Tclose(tid); + fillval3.p=NULL; fillval3.len=0; + ret = H5Pset_fill_value(dcpl, tid, &fillval3); + HDassert(ret >= 0); + + did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3); + HDassert(ret >= 0); + ret = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf3); + HDassert(ret >= 0); + ret = H5Dclose(did); + ret = H5Tclose(tid); + ret = H5Pclose(dcpl); + HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * dataset with a H5T_ARRAY fill value + *------------------------------------------------------------------------- + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(fid, 1, dims, "fill_array", tid, buf4); + ret = H5Tclose(tid); -/*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - ret = H5Sclose(sid); - HDassert(ret >= 0); - ret = H5Fclose(fid); - HDassert(ret >= 0); + + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ + ret = H5Sclose(sid); + HDassert(ret >= 0); + ret = H5Fclose(fid); + HDassert(ret >= 0); } @@ -5899,103 +5899,103 @@ static void gent_fvalues(void) */ static void gent_string(void) { - /* compound datatype */ - typedef struct c_t - { - int a; - char str[255]; - } c_t; - - hid_t fid; /* file id */ - hid_t sid; /* dataspace ID */ - hid_t tid; /* datatype ID */ - hid_t str_tid; /* datatype ID */ - hid_t did; /* dataset ID */ - char buf1[]={"quote \" backspace\b form feed\f new line\n tab\t new line\n carriage return\r"}; - const char *buf2[SPACE1_DIM1]= { - "Four score and seven\n years ago our forefathers brought forth on this continent a new nation,", - "conceived in liberty\n and dedicated to the proposition that all men are created equal.", - "Now we are engaged\n in a great civil war,", - "testing whether that\n nation or any nation so conceived and so dedicated can long endure." - }; - c_t buf3 = {24, "Four score and seven\n years ago our forefathers brought forth on this continent a new nation"}; - char buf4[] = {"Four score and seven\n years ago our forefathers brought forth on this continent a new nation"}; - hsize_t dims1[] = {1}; - hsize_t dims2[] = {SPACE1_DIM1}; - hsize_t dims4[1]; - int ret; - - dims4[0] = sizeof(buf4); - - /* create a file */ - fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid>=0); + /* compound datatype */ + typedef struct c_t + { + int a; + char str[255]; + } c_t; + + hid_t fid; /* file id */ + hid_t sid; /* dataspace ID */ + hid_t tid; /* datatype ID */ + hid_t str_tid; /* datatype ID */ + hid_t did; /* dataset ID */ + char buf1[]={"quote \" backspace\b form feed\f new line\n tab\t new line\n carriage return\r"}; + const char *buf2[SPACE1_DIM1]= { + "Four score and seven\n years ago our forefathers brought forth on this continent a new nation,", + "conceived in liberty\n and dedicated to the proposition that all men are created equal.", + "Now we are engaged\n in a great civil war,", + "testing whether that\n nation or any nation so conceived and so dedicated can long endure." + }; + c_t buf3 = {24, "Four score and seven\n years ago our forefathers brought forth on this continent a new nation"}; + char buf4[] = {"Four score and seven\n years ago our forefathers brought forth on this continent a new nation"}; + hsize_t dims1[] = {1}; + hsize_t dims2[] = {SPACE1_DIM1}; + hsize_t dims4[1]; + int ret; -/*------------------------------------------------------------------------- - * str1 - *------------------------------------------------------------------------- - */ + dims4[0] = sizeof(buf4); - tid=H5Tcopy(H5T_C_S1); - ret = H5Tset_size(tid, sizeof(buf1)); - HDassert(ret >= 0); - write_dset(fid,1,dims1,"str1",tid,buf1); - HDassert(ret >= 0); - ret = H5Tclose(tid); - HDassert(ret >= 0); + /* create a file */ + fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid>=0); -/*------------------------------------------------------------------------- - * str2 - *------------------------------------------------------------------------- - */ - sid = H5Screate_simple(SPACE1_RANK, dims2, NULL); - tid = H5Tcopy(H5T_C_S1); - ret = H5Tset_size(tid, H5T_VARIABLE); - HDassert(ret >= 0); - did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2); - HDassert(ret >= 0); - ret = H5Tclose(tid); - HDassert(ret >= 0); - ret = H5Dclose(did); - HDassert(ret >= 0); - ret = H5Sclose(sid); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * str1 + *------------------------------------------------------------------------- + */ -/*------------------------------------------------------------------------- - * str3 - *------------------------------------------------------------------------- - */ - sid = H5Screate_simple(SPACE1_RANK, dims1, NULL); - tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t)); - str_tid = H5Tcopy( H5T_C_S1 ); - H5Tset_size( str_tid, 255 ); - H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT); - H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid ); - ret=make_dset(fid,"str3",sid,tid,H5P_DEFAULT,&buf3); - HDassert(ret >= 0); - ret = H5Tclose(tid); - HDassert(ret >= 0); - ret = H5Tclose(str_tid); - HDassert(ret >= 0); - ret = H5Sclose(sid); - HDassert(ret >= 0); + tid=H5Tcopy(H5T_C_S1); + ret = H5Tset_size(tid, sizeof(buf1)); + HDassert(ret >= 0); + write_dset(fid,1,dims1,"str1",tid,buf1); + HDassert(ret >= 0); + ret = H5Tclose(tid); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * str4 - *------------------------------------------------------------------------- - */ - sid = H5Screate_simple(SPACE1_RANK, dims4, NULL); - ret=make_dset(fid,"str4",sid,H5T_NATIVE_CHAR,H5P_DEFAULT,buf4); - ret = H5Sclose(sid); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * str2 + *------------------------------------------------------------------------- + */ + sid = H5Screate_simple(SPACE1_RANK, dims2, NULL); + tid = H5Tcopy(H5T_C_S1); + ret = H5Tset_size(tid, H5T_VARIABLE); + HDassert(ret >= 0); + did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2); + HDassert(ret >= 0); + ret = H5Tclose(tid); + HDassert(ret >= 0); + ret = H5Dclose(did); + HDassert(ret >= 0); + ret = H5Sclose(sid); + HDassert(ret >= 0); -/*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - ret = H5Fclose(fid); - HDassert(ret >= 0); + /*------------------------------------------------------------------------- + * str3 + *------------------------------------------------------------------------- + */ + sid = H5Screate_simple(SPACE1_RANK, dims1, NULL); + tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t)); + str_tid = H5Tcopy( H5T_C_S1 ); + H5Tset_size( str_tid, 255 ); + H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT); + H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid ); + ret=make_dset(fid,"str3",sid,tid,H5P_DEFAULT,&buf3); + HDassert(ret >= 0); + ret = H5Tclose(tid); + HDassert(ret >= 0); + ret = H5Tclose(str_tid); + HDassert(ret >= 0); + ret = H5Sclose(sid); + HDassert(ret >= 0); + + /*------------------------------------------------------------------------- + * str4 + *------------------------------------------------------------------------- + */ + sid = H5Screate_simple(SPACE1_RANK, dims4, NULL); + ret=make_dset(fid,"str4",sid,H5T_NATIVE_CHAR,H5P_DEFAULT,buf4); + ret = H5Sclose(sid); + HDassert(ret >= 0); + + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ + ret = H5Fclose(fid); + HDassert(ret >= 0); } @@ -6041,18 +6041,18 @@ static void gent_aindices(void) HDassert(fid>=0); /*------------------------------------------------------------------------- - * root datasets - *------------------------------------------------------------------------- - */ + * root datasets + *------------------------------------------------------------------------- + */ write_dset(fid,1,dims1,"1d",H5T_NATIVE_INT,buf1); write_dset(fid,2,dims2,"2d",H5T_NATIVE_INT,buf2); write_dset(fid,3,dims3,"3d",H5T_NATIVE_INT,buf3); write_dset(fid,4,dims4,"4d",H5T_NATIVE_INT,buf4); /*------------------------------------------------------------------------- - * test with group indentation - *------------------------------------------------------------------------- - */ + * test with group indentation + *------------------------------------------------------------------------- + */ gid[0] = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); gid[1] = H5Gcreate2(fid, "g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); gid[2] = H5Gcreate2(fid, "g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -6067,9 +6067,9 @@ static void gent_aindices(void) H5Gclose(gid[i]); /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ + * close + *------------------------------------------------------------------------- + */ ret = H5Fclose(fid); HDassert(ret >= 0); @@ -6135,45 +6135,45 @@ static void gent_longlinks(void) */ static int gent_ldouble(void) { - hid_t fid; - hid_t did; - hid_t tid; - hid_t sid; - hsize_t dims[1] = {3}; - long double buf[3] = {1,2,3}; + hid_t fid; + hid_t did; + hid_t tid; + hid_t sid; + hsize_t dims[1] = {3}; + long double buf[3] = {1,2,3}; - if((fid = H5Fcreate(FILE52, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + if((fid = H5Fcreate(FILE52, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; - if((sid = H5Screate_simple(1, dims, NULL)) < 0) - goto error; + if((sid = H5Screate_simple(1, dims, NULL)) < 0) + goto error; - if((tid = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) - goto error; + if((tid = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) + goto error; - if(H5Tget_size(tid) == 0) - goto error; + if(H5Tget_size(tid) == 0) + goto error; - if((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + if((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; - if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - goto error; + if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + goto error; - if(H5Sclose(sid) < 0) - goto error; - if(H5Tclose(tid) < 0) - goto error; - if(H5Dclose(did) < 0) - goto error; - if(H5Fclose(fid) < 0) - goto error; + if(H5Sclose(sid) < 0) + goto error; + if(H5Tclose(tid) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; - return 0; + return 0; -error: - printf("error !\n"); - return -1; + error: + printf("error !\n"); + return -1; } @@ -6192,48 +6192,48 @@ error: static void gent_binary(void) { - hid_t fid, sid, did, aid; - hsize_t dims[1] = {6}; - int ibuf[6] = {1,2,3,4,5,6}; - float fbuf[6] = {1,2,3,4,5,6}; - double dbuf[6] = {1,2,3,4,5,6}; + hid_t fid, sid, did, aid; + hsize_t dims[1] = {6}; + int ibuf[6] = {1,2,3,4,5,6}; + float fbuf[6] = {1,2,3,4,5,6}; + double dbuf[6] = {1,2,3,4,5,6}; - fid = H5Fcreate(FILE55, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - sid = H5Screate_simple(1, dims, NULL); + fid = H5Fcreate(FILE55, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + sid = H5Screate_simple(1, dims, NULL); -/*------------------------------------------------------------------------- - * integer - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * integer + *------------------------------------------------------------------------- + */ - did = H5Dcreate2(fid, "integer", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf); - H5Dclose(did); + did = H5Dcreate2(fid, "integer", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf); + H5Dclose(did); -/*------------------------------------------------------------------------- - * float - *------------------------------------------------------------------------- - */ - did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf); - H5Dclose(did); + /*------------------------------------------------------------------------- + * float + *------------------------------------------------------------------------- + */ + did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf); + H5Dclose(did); -/*------------------------------------------------------------------------- - * double - *------------------------------------------------------------------------- - */ - did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf); - /* create an attribute */ - aid = H5Acreate2(did, "attr", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT); - H5Aclose(aid); - H5Dclose(did); + /*------------------------------------------------------------------------- + * double + *------------------------------------------------------------------------- + */ + did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf); + /* create an attribute */ + aid = H5Acreate2(did, "attr", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT); + H5Aclose(aid); + H5Dclose(did); - /* close */ - H5Sclose(sid); - H5Fclose(fid); + /* close */ + H5Sclose(sid); + H5Fclose(fid); } /*------------------------------------------------------------------------- @@ -6334,7 +6334,7 @@ gent_bigdims(void) return; -out: + out: printf("Error.....\n"); H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -6410,10 +6410,10 @@ gent_group_creation_order(void) if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) goto out; -/*------------------------------------------------------------------------- - * create a group "2" - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a group "2" + *------------------------------------------------------------------------- + */ if((gid = H5Gcreate2(fid, "2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) @@ -6449,7 +6449,7 @@ gent_group_creation_order(void) goto out; gid = -1; - if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if(H5Gclose(gid) < 0) goto out; @@ -6461,10 +6461,10 @@ gent_group_creation_order(void) gid = -1; -/*------------------------------------------------------------------------- - * create a group "1" with H5P_CRT_ORDER_TRACKED set - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a group "1" with H5P_CRT_ORDER_TRACKED set + *------------------------------------------------------------------------- + */ if(H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) goto out; @@ -6502,7 +6502,7 @@ gent_group_creation_order(void) goto out; gid = -1; - if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if(H5Gclose(gid) < 0) goto out; @@ -6526,7 +6526,7 @@ gent_group_creation_order(void) return; -out: + out: printf("Error.....\n"); H5E_BEGIN_TRY { H5Gclose(gid); @@ -6593,10 +6593,10 @@ gent_attr_creation_order(void) if((sid = H5Screate(H5S_SCALAR)) < 0) goto out; -/*------------------------------------------------------------------------- - * create a dataset with creation order tracked for attributes and atributes in it - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a dataset with creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ /* create a dataset */ if((did = H5Dcreate2(fid, "dt", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) @@ -6619,10 +6619,10 @@ gent_attr_creation_order(void) did = -1; -/*------------------------------------------------------------------------- - * create a dataset without creation order tracked for attributes and atributes in it - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a dataset without creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ /* create a dataset */ if((did = H5Dcreate2(fid, "d", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -6646,10 +6646,10 @@ gent_attr_creation_order(void) -/*------------------------------------------------------------------------- - * create a group with creation order tracked for attributes and atributes in it - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a group with creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ if((gid = H5Gcreate2(fid, "gt", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) goto out; @@ -6670,10 +6670,10 @@ gent_attr_creation_order(void) goto out; gid = -1; -/*------------------------------------------------------------------------- - * create a group without creation order tracked for attributes and atributes in it - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a group without creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; @@ -6694,10 +6694,10 @@ gent_attr_creation_order(void) goto out; gid = -1; -/*------------------------------------------------------------------------- - * create a named datatype with creation order tracked for attributes and atributes in it - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a named datatype with creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) goto out; @@ -6721,10 +6721,10 @@ gent_attr_creation_order(void) goto out; tid = -1; -/*------------------------------------------------------------------------- - * create a named datatype without creation order tracked for attributes and atributes in it - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create a named datatype without creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) goto out; @@ -6748,10 +6748,10 @@ gent_attr_creation_order(void) goto out; tid = -1; -/*------------------------------------------------------------------------- - * add some attributes to the root group - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * add some attributes to the root group + *------------------------------------------------------------------------- + */ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) goto out; @@ -6771,10 +6771,10 @@ gent_attr_creation_order(void) goto out; gid = -1; -/*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ if(H5Sclose(sid) < 0) goto out; sid = -1; @@ -6795,7 +6795,7 @@ gent_attr_creation_order(void) return; -out: + out: printf("Error.....\n"); H5E_BEGIN_TRY { H5Gclose(gid); @@ -6824,35 +6824,35 @@ out: static void gent_fpformat(void) { - hid_t fid, sid, did; - hsize_t dims[1] = {6}; - double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0}; - float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0}; + hid_t fid, sid, did; + hsize_t dims[1] = {6}; + double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0}; + float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0}; - fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - sid = H5Screate_simple(1, dims, NULL); + fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + sid = H5Screate_simple(1, dims, NULL); -/*------------------------------------------------------------------------- - * double - *------------------------------------------------------------------------- - */ - did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf); - H5Dclose(did); + /*------------------------------------------------------------------------- + * double + *------------------------------------------------------------------------- + */ + did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf); + H5Dclose(did); -/*------------------------------------------------------------------------- - * float - *------------------------------------------------------------------------- - */ - did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf); - H5Dclose(did); + /*------------------------------------------------------------------------- + * float + *------------------------------------------------------------------------- + */ + did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf); + H5Dclose(did); - /* close */ - H5Sclose(sid); - H5Fclose(fid); + /* close */ + H5Sclose(sid); + H5Fclose(fid); } /*------------------------------------------------------------------------- @@ -6867,75 +6867,75 @@ gent_fpformat(void) static void gent_extlinks(void) { - hid_t source_fid, target_fid, far_fid, sid, did, gid, gid2, tid; - hsize_t dims[1] = {6}; - int buf[6] = {1, 2, 3, 4, 5, 6}; + hid_t source_fid, target_fid, far_fid, sid, did, gid, gid2, tid; + hsize_t dims[1] = {6}; + int buf[6] = {1, 2, 3, 4, 5, 6}; - /* create two files, a source and a target */ - source_fid = H5Fcreate(FILE61, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - target_fid = H5Fcreate(FILE62, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - far_fid = H5Fcreate(FILE63, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + /* create two files, a source and a target */ + source_fid = H5Fcreate(FILE61, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + target_fid = H5Fcreate(FILE62, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + far_fid = H5Fcreate(FILE63, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); -/*------------------------------------------------------------------------- - * create Groups, a Dataset, a committed Datatype, external links, and a - * cycle in the target - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create Groups, a Dataset, a committed Datatype, external links, and a + * cycle in the target + *------------------------------------------------------------------------- + */ - gid = H5Gcreate2(target_fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Gclose(H5Gcreate2(target_fid, "empty_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)); - sid = H5Screate_simple(1, dims, NULL); - did = H5Dcreate2(gid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); - H5Lcreate_external(FILE61, "/", gid, "elink_t1", H5P_DEFAULT, H5P_DEFAULT); - H5Lcreate_external(FILE61, "/ext_link4", gid, "elink_t2", H5P_DEFAULT, H5P_DEFAULT); + gid = H5Gcreate2(target_fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Gclose(H5Gcreate2(target_fid, "empty_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)); + sid = H5Screate_simple(1, dims, NULL); + did = H5Dcreate2(gid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + H5Lcreate_external(FILE61, "/", gid, "elink_t1", H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_external(FILE61, "/ext_link4", gid, "elink_t2", H5P_DEFAULT, H5P_DEFAULT); - gid2 = H5Gcreate2(gid, "subgroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Lcreate_hard(target_fid, "/group", gid2, "link_to_group", H5P_DEFAULT, H5P_DEFAULT); + gid2 = H5Gcreate2(gid, "subgroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_hard(target_fid, "/group", gid2, "link_to_group", H5P_DEFAULT, H5P_DEFAULT); - H5Dclose(did); - H5Sclose(sid); - H5Gclose(gid2); - H5Gclose(gid); + H5Dclose(did); + H5Sclose(sid); + H5Gclose(gid2); + H5Gclose(gid); - sid = H5Screate_simple(1, dims, NULL); - did = H5Dcreate2(target_fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); - H5Dclose(did); - H5Sclose(sid); + sid = H5Screate_simple(1, dims, NULL); + did = H5Dcreate2(target_fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + H5Dclose(did); + H5Sclose(sid); - tid = H5Tcopy(H5T_NATIVE_INT); - H5Tcommit2(target_fid, "type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Tclose(tid); + tid = H5Tcopy(H5T_NATIVE_INT); + H5Tcommit2(target_fid, "type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Tclose(tid); -/*------------------------------------------------------------------------- - * create external links in the source file pointing to the target objects - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * create external links in the source file pointing to the target objects + *------------------------------------------------------------------------- + */ - H5Lcreate_external(FILE62, "group", source_fid, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); - H5Lcreate_external(FILE62, "dset", source_fid, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); - H5Lcreate_external(FILE62, "type", source_fid, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); - H5Lcreate_external(FILE62, "group/elink_t2", source_fid, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); - H5Lcreate_external(FILE62, "empty_group", source_fid, "ext_link5", H5P_DEFAULT, H5P_DEFAULT); -/* external link to soft link which linked to a dataset */ - H5Lcreate_external(FILE4_1, "/soft_dset1", source_fid, "ext2soft_link1", H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_external(FILE62, "group", source_fid, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_external(FILE62, "dset", source_fid, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_external(FILE62, "type", source_fid, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_external(FILE62, "group/elink_t2", source_fid, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_external(FILE62, "empty_group", source_fid, "ext_link5", H5P_DEFAULT, H5P_DEFAULT); + /* external link to soft link which linked to a dataset */ + H5Lcreate_external(FILE4_1, "/soft_dset1", source_fid, "ext2soft_link1", H5P_DEFAULT, H5P_DEFAULT); -/* external link to dangle soft link */ - H5Lcreate_external(FILE4_1, "/soft_dangle", source_fid, "ext2softdangle_link1", H5P_DEFAULT, H5P_DEFAULT); + /* external link to dangle soft link */ + H5Lcreate_external(FILE4_1, "/soft_dangle", source_fid, "ext2softdangle_link1", H5P_DEFAULT, H5P_DEFAULT); -/*------------------------------------------------------------------------- - * create external link in the "far" file pointing to the source file - *------------------------------------------------------------------------- - */ - H5Lcreate_external(FILE61, "/", far_fid, "src_file", H5P_DEFAULT, H5P_DEFAULT); + /*------------------------------------------------------------------------- + * create external link in the "far" file pointing to the source file + *------------------------------------------------------------------------- + */ + H5Lcreate_external(FILE61, "/", far_fid, "src_file", H5P_DEFAULT, H5P_DEFAULT); - /* close */ - H5Fclose(source_fid); - H5Fclose(target_fid); - H5Fclose(far_fid); + /* close */ + H5Fclose(source_fid); + H5Fclose(target_fid); + H5Fclose(far_fid); } /*------------------------------------------------------------------------- @@ -6948,21 +6948,21 @@ gent_extlinks(void) static void gent_fs_strategy_threshold(void) { - hid_t fid; /* File id */ - hid_t fcpl; /* File creation property */ + hid_t fid; /* File id */ + hid_t fcpl; /* File creation property */ - /* Create file-creation template */ - fcpl = H5Pcreate(H5P_FILE_CREATE); + /* Create file-creation template */ + fcpl = H5Pcreate(H5P_FILE_CREATE); - /* Set file space information */ - H5Pset_file_space(fcpl, STRATEGY, (hsize_t)THRESHOLD10); + /* Set file space information */ + H5Pset_file_space(fcpl, STRATEGY, (hsize_t)THRESHOLD10); - /* Create the file with the specified strategy and threshold */ - fid = H5Fcreate(FILE65, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT); + /* Create the file with the specified strategy and threshold */ + fid = H5Fcreate(FILE65, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT); - /* close */ - H5Fclose(fid); - H5Pclose(fcpl); + /* close */ + H5Fclose(fid); + H5Pclose(fcpl); } /*------------------------------------------------------------------------- @@ -7002,11 +7002,11 @@ gent_packedbits(void) 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; + dsetu8[i][0] = valu8bits; + for(j = 1; j < dims[1]; j++) { + dsetu8[i][j] = dsetu8[i][j-1] << 1; + } + valu8bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8); @@ -7020,11 +7020,11 @@ gent_packedbits(void) 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; + dsetu16[i][0] = valu16bits; + for(j = 1; j < dims[1]; j++) { + dsetu16[i][j] = dsetu16[i][j-1] << 1; + } + valu16bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16); @@ -7038,11 +7038,11 @@ gent_packedbits(void) 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; + dsetu32[i][0] = valu32bits; + for(j = 1; j < dims[1]; j++) { + dsetu32[i][j] = dsetu32[i][j-1] << 1; + } + valu32bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32); @@ -7056,11 +7056,11 @@ gent_packedbits(void) 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; + dsetu64[i][0] = valu64bits; + for(j = 1; j < dims[1]; j++) { + dsetu64[i][j] = dsetu64[i][j-1] << 1; + } + valu64bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64); @@ -7074,11 +7074,11 @@ gent_packedbits(void) 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; + dset8[i][0] = val8bits; + for(j = 1; j < dims[1]; j++) { + dset8[i][j] = dset8[i][j-1] << 1; + } + val8bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8); @@ -7092,11 +7092,11 @@ gent_packedbits(void) 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; + dset16[i][0] = val16bits; + for(j = 1; j < dims[1]; j++) { + dset16[i][j] = dset16[i][j-1] << 1; + } + val16bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16); @@ -7110,11 +7110,11 @@ gent_packedbits(void) 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; + dset32[i][0] = val32bits; + for(j = 1; j < dims[1]; j++) { + dset32[i][j] = dset32[i][j-1] << 1; + } + val32bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32); @@ -7128,11 +7128,11 @@ gent_packedbits(void) 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; + dset64[i][0] = val64bits; + for(j = 1; j < dims[1]; j++) { + dset64[i][j] = dset64[i][j-1] << 1; + } + val64bits <<= 1; } H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64); @@ -7145,8 +7145,8 @@ gent_packedbits(void) dataset = H5Dcreate2(fid, F66_DUMMYDBL, H5T_IEEE_F64BE, 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; + for(j = 0; j < dims[1]; j++) + dsetdbl[i][j] = 0.0001 * j + i; H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl); @@ -7194,7 +7194,7 @@ gent_attr_intsize(void) 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; + dsetu8[i][j] = dsetu8[i][j-1] << 1; } valu8bits <<= 1; } @@ -7212,7 +7212,7 @@ gent_attr_intsize(void) 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; + dsetu16[i][j] = dsetu16[i][j-1] << 1; } valu16bits <<= 1; } @@ -7230,7 +7230,7 @@ gent_attr_intsize(void) 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; + dsetu32[i][j] = dsetu32[i][j-1] << 1; } valu32bits <<= 1; } @@ -7248,7 +7248,7 @@ gent_attr_intsize(void) 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; + dsetu64[i][j] = dsetu64[i][j-1] << 1; } valu64bits <<= 1; } @@ -7266,7 +7266,7 @@ gent_attr_intsize(void) 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; + dset8[i][j] = dset8[i][j-1] << 1; } val8bits <<= 1; } @@ -7284,7 +7284,7 @@ gent_attr_intsize(void) 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; + dset16[i][j] = dset16[i][j-1] << 1; } val16bits <<= 1; } @@ -7302,7 +7302,7 @@ gent_attr_intsize(void) 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; + dset32[i][j] = dset32[i][j-1] << 1; } val32bits <<= 1; } @@ -7320,7 +7320,7 @@ gent_attr_intsize(void) 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; + dset64[i][j] = dset64[i][j-1] << 1; } val64bits <<= 1; } @@ -7335,8 +7335,8 @@ gent_attr_intsize(void) attr = H5Acreate2(root, F66_DUMMYDBL, H5T_IEEE_F64BE, 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; + for(j = 0; j < dims[1]; j++) + dsetdbl[i][j] = 0.0001 * j + i; H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl); @@ -7541,8 +7541,8 @@ static void gent_compound_intsizes(void) { dims[0] = F70_XDIM; dims[1] = F70_YDIM8; for(n = 0; n < dims[0]; n++) - for(o = 0; o < dims[1]; o++) - Array1[m].dsetdbl[n][o] = 0.0001 * o + n; + for(o = 0; o < dims[1]; o++) + Array1[m].dsetdbl[n][o] = 0.0001 * o + n; } /* Create the array data type for the 8 bits signed int array */ @@ -7816,8 +7816,8 @@ static void gent_compound_attr_intsizes(void) { dims[0] = F70_XDIM; dims[1] = F70_YDIM8; for(n = 0; n < dims[0]; n++) - for(o = 0; o < dims[1]; o++) - Array1[m].dsetdbl[n][o] = 0.0001 * o + n; + for(o = 0; o < dims[1]; o++) + Array1[m].dsetdbl[n][o] = 0.0001 * o + n; } /* Create the array data type for the 8 bits signed int array */ -- cgit v0.12 From bb696c61acd4b092a3239ee026dd0df0fdc781c3 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Tue, 10 Jul 2012 10:37:14 -0500 Subject: [svn-r22541] Purpose: HDFFV-7602 - GMQS: HDF5 command tools: Provide framework for reusable test files among tools Stage2 working for h5dump tool. Description: Update cmake script to fetch test files from any tools to a test directory and run test in organized manner. Also keep the apperance similiar to shell script for better maintainance. Tested: CMake (Windows and jam) --- tools/h5dump/CMakeLists.txt | 824 ++++++++++++++++++++++---------------------- 1 file changed, 413 insertions(+), 411 deletions(-) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index d89db0d..339a31f 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -43,362 +43,369 @@ IF (BUILD_TESTING) # Copy all the HDF5 files from the test directory into the source directory # -------------------------------------------------------------------- SET (HDF5_REFERENCE_FILES - charsets.ddl - file_space.ddl - filter_fail.ddl - packedbits.ddl - tall-1.ddl - tall-2.ddl - tall-2A.ddl - tall-2B.ddl - tall-3.ddl - tall-4s.ddl - tall-5s.ddl - tall-6.ddl - tallfilters.ddl - tarray1.ddl - tarray1_big.ddl - tarray2.ddl - tarray3.ddl - tarray4.ddl - tarray5.ddl - tarray6.ddl - tarray7.ddl - tarray8.ddl - tattr-1.ddl - tattrintsize.ddl - tattr-2.ddl - tattr-3.ddl - tattr-4_be.ddl - tattrreg.ddl - tattrregR.ddl - tbin1.ddl - tbin1.ddl - tbin2.ddl - tbin3.ddl - tbin4.ddl - tbinregR.ddl - tbigdims.ddl - tboot1.ddl - tboot2.ddl - tchar1.ddl - tchunked.ddl - tcmpdattrintsize.ddl - tcmpdintsize.ddl - tcomp-1.ddl - tcomp-2.ddl - tcomp-3.ddl - tcomp-4.ddl - tcompact.ddl - tcontents.ddl - tcontiguos.ddl - tdatareg.ddl - tdataregR.ddl - tdeflate.ddl - tdset-1.ddl - tdset-2.ddl - tdset-3s.ddl - tempty.ddl - texceedsubstart.ddl - texceedsubcount.ddl - texceedsubstride.ddl - texceedsubblock.ddl - texternal.ddl - textlinksrc.ddl - textlinkfar.ddl - textlink.ddl - tfamily.ddl - tfill.ddl - tfletcher32.ddl - tfpformat.ddl - tgroup-1.ddl - tgroup-2.ddl - tgrp_comments.ddl - thlink-1.ddl - thlink-2.ddl - thlink-3.ddl - thlink-4.ddl - thlink-5.ddl - thyperslab.ddl - tindicesno.ddl - tindicessub1.ddl - tindicessub2.ddl - tindicessub3.ddl - tindicessub4.ddl - tindicesyes.ddl - tlarge_objname.ddl - #tldouble.ddl - tlonglinks.ddl - tloop-1.ddl - tmulti.ddl - tmultifile.ddl -# tqmarkfile.ddl -# tstarfile.ddl - tnamed_dtype_attr.ddl - tnestcomp-1.ddl - tnbit.ddl - tno-subset.ddl - tnullspace.ddl - zerodim.ddl - tordergr1.ddl - tordergr2.ddl - tordergr3.ddl - tordergr4.ddl - tordergr5.ddl - torderattr1.ddl - torderattr2.ddl - torderattr3.ddl - torderattr4.ddl - tperror.ddl - treference.ddl - tsaf.ddl - tscaleoffset.ddl - tshuffle.ddl - tslink-1.ddl - tslink-2.ddl - tslink-D.ddl - tsplit_file.ddl - tstr-1.ddl - tstr-2.ddl - tstring.ddl - tstring2.ddl - tstringe.ddl - tszip.ddl - tudlink-1.ddl - tudlink-2.ddl - tuserfilter.ddl - tvldtypes1.ddl - tvldtypes2.ddl - tvldtypes3.ddl - tvldtypes4.ddl - tvldtypes5.ddl - tvlstr.ddl - tvms.ddl - h5dump-help.txt - out3.h5import + ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2B.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompact.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontents.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontiguos.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregR.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdeflate.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-3s.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstart.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubcount.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstride.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubblock.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texternal.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfill.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfletcher32.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesno.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesyes.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.ddl + #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ddl + #${HDF5_TOOLS_SRC_DIR}/testfiles/tqmarkfile.ddl + #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl + ${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/tscaleoffset.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-D.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstringe.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tszip.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tuserfilter.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt + ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import ) SET (HDF5_XML_REFERENCE_FILES - tall.h5.xml - tall-2A.h5.xml - tarray1.h5.xml - tarray2.h5.xml - tarray3.h5.xml - tarray6.h5.xml - tarray7.h5.xml - tattr.h5.xml - tbitfields.h5.xml - tcompound_complex.h5.xml - tcompound.h5.xml - tcompound2.h5.xml - tdatareg.h5.xml - tdset.h5.xml - tdset2.h5.xml - tempty.h5.xml - tempty-dtd.h5.xml - tempty-dtd-2.h5.xml - tempty-dtd-uri.h5.xml - tempty-nons.h5.xml - tempty-nons-2.h5.xml - tempty-nons-uri.h5.xml - tempty-ns.h5.xml - tempty-ns-2.h5.xml - tenum.h5.xml - textlink.h5.xml - tfpformat.h5.xml - tgroup.h5.xml - thlink.h5.xml - tloop.h5.xml - tloop2.h5.xml - tmany.h5.xml - tname-amp.h5.xml - tname-apos.h5.xml - tnamed_dtype_attr.h5.xml - tname-gt.h5.xml - tname-lt.h5.xml - tname-quot.h5.xml - tname-sp.h5.xml - tnestedcomp.h5.xml - tnodata.h5.xml - tobjref.h5.xml - topaque.h5.xml - torderattr1.h5.xml - torderattr2.h5.xml - torderattr3.h5.xml - torderattr4.h5.xml - tref.h5.xml - tref-escapes.h5.xml - tref-escapes-at.h5.xml - tsaf.h5.xml - tslink.h5.xml - tstr.h5.xml - tstr2.h5.xml - tstring.h5.xml - tstring-at.h5.xml - tudlink.h5.xml - tvldtypes1.h5.xml - tvldtypes2.h5.xml - tvldtypes3.h5.xml - tvldtypes4.h5.xml - tvldtypes5.h5.xml - tvlstr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml ) SET (HDF5_REFERENCE_TEST_FILES - charsets.h5 - file_space.h5 - filter_fail.h5 - packedbits.h5 - taindices.h5 - tall.h5 - tarray1.h5 - tarray1_big.h5 - tarray2.h5 - tarray3.h5 - tarray4.h5 - tarray5.h5 - tarray6.h5 - tarray7.h5 - tarray8.h5 - tattr.h5 - tattr2.h5 - tattr4_be.h5 - tattrintsize.h5 - tattrreg.h5 - tbigdims.h5 - tbinary.h5 - tchar.h5 - tcmpdattrintsize.h5 - tcmpdintsize.h5 - tcompound.h5 - tcompound_complex.h5 - tdatareg.h5 - tdset.h5 - tempty.h5 - tsoftlinks.h5 - textlinkfar.h5 - textlinksrc.h5 - textlinktar.h5 - textlink.h5 - tfamily00000.h5 - tfamily00001.h5 - tfamily00002.h5 - tfamily00003.h5 - tfamily00004.h5 - tfamily00005.h5 - tfamily00006.h5 - tfamily00007.h5 - tfamily00008.h5 - tfamily00009.h5 - tfamily00010.h5 - tfcontents1.h5 - tfcontents2.h5 - tfilters.h5 - tfpformat.h5 - tfvalues.h5 - tgroup.h5 - tgrp_comments.h5 - thlink.h5 - thyperslab.h5 - tlarge_objname.h5 - #tldouble.h5 - tlonglinks.h5 - tloop.h5 - tmulti-b.h5 - tmulti-g.h5 - tmulti-l.h5 - tmulti-o.h5 - tmulti-r.h5 - tmulti-s.h5 - tnamed_dtype_attr.h5 - tnestedcomp.h5 - tno-subset.h5 - tnullspace.h5 - zerodim.h5 - torderattr.h5 - tordergr.h5 - tsaf.h5 - tslink.h5 - tsplit_file-m.h5 - tsplit_file-r.h5 - tstr.h5 - tstr2.h5 - tstr3.h5 - tudlink.h5 - tvldtypes1.h5 - tvldtypes2.h5 - tvldtypes3.h5 - tvldtypes4.h5 - tvldtypes5.h5 - tvlstr.h5 - tvms.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/taindices.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfvalues.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.h5 + #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-g.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-l.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-o.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-r.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5 + ${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/tslink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5 ) SET (HDF5_XML_REFERENCE_TEST_FILES - tbitfields.h5 - tcompound2.h5 - tdset2.h5 - tenum.h5 - textlink.h5 - tloop2.h5 - tmany.h5 - tname-amp.h5 - tname-apos.h5 - tname-gt.h5 - tname-lt.h5 - tname-quot.h5 - tname-sp.h5 - tnodata.h5 - tobjref.h5 - topaque.h5 - tref.h5 - tref-escapes.h5 - tref-escapes-at.h5 - tstring.h5 - tstring-at.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5 ) - FOREACH (ddl_file ${HDF5_REFERENCE_FILES}) - SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}") - #MESSAGE (STATUS " Copying ${ddl_file}") + # make test dir + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + # + # copy test files from source dir to test dir + # + FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${tst_h5_file}") ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_file} ${ddldest} + ARGS -E copy_if_different ${tst_h5_file} ${dest} ) - ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES}) + ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) - FOREACH (xml_file ${HDF5_XML_REFERENCE_FILES}) - SET (xmldest "${PROJECT_BINARY_DIR}/${xml_file}") - #MESSAGE (STATUS " Copying ${xml_file}") + FOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${tst_other_file}") ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${xml_file} ${xmldest} + ARGS -E copy_if_different ${tst_other_file} ${dest} ) - ENDFOREACH (xml_file ${HDF5_XML_REFERENCE_FILES}) - - FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") + ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) + + # + # copy XML test files from source dir to test dir + # + FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${tst_xml_h5_file}") ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest} + ARGS -E copy_if_different ${tst_xml_h5_file} ${dest} ) - ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - - FOREACH (h5_xml_file ${HDF5_XML_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_xml_file}") - #MESSAGE (STATUS " Copying ${h5_xml_file}") + ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) + + FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${tst_xml_other_file}") ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_xml_file} ${dest} + ARGS -E copy_if_different ${tst_xml_other_file} ${dest} ) - ENDFOREACH (h5_xml_file ${HDF5_XML_REFERENCE_TEST_FILES}) - + ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + # -------------------------------------------------------------------- # Special file handling # -------------------------------------------------------------------- @@ -406,18 +413,18 @@ IF (BUILD_TESTING) TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/tbin1LE.ddl + ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/tbin1LE.ddl ) IF (WIN32 AND NOT CYGWIN) FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/tbinregR.exp "${TEST_STREAM}") + FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/tbinregR.exp "${TEST_STREAM}") ELSE (WIN32 AND NOT CYGWIN) ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/tbinregR.exp + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/tbinregR.exp ) ENDIF (WIN32 AND NOT CYGWIN) @@ -426,69 +433,70 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- #-- Copy all the HDF5 files from the test directory into the source directory SET (HDF5_REFERENCE_PBITS - tnofilename-with-packed-bits.ddl - tpbitsArray.ddl - tpbitsCompound.ddl - tpbitsIncomplete.ddl - tpbitsLengthExceeded.ddl - tpbitsCharLengthExceeded.ddl - tpbitsIntLengthExceeded.ddl - tpbitsLongLengthExceeded.ddl - tpbitsLengthPositive.ddl - tpbitsMax.ddl - tpbitsMaxExceeded.ddl - tpbitsOffsetExceeded.ddl - tpbitsCharOffsetExceeded.ddl - tpbitsIntOffsetExceeded.ddl - tpbitsLongOffsetExceeded.ddl - tpbitsOffsetNegative.ddl - tpbitsOverlapped.ddl - tpbitsSigned.ddl - tpbitsUnsigned.ddl - tpbitsSignedInt.ddl - tpbitsUnsignedInt.ddl - tpbitsSignedLong.ddl - tpbitsUnsignedLong.ddl - tpbitsSignedLongLong.ddl - tpbitsUnsignedLongLong.ddl - tpbitsSignedWhole.ddl - tpbitsUnsignedWhole.ddl - tpbitsSignedIntWhole.ddl - tpbitsUnsignedIntWhole.ddl - tpbitsSignedLongWhole.ddl - tpbitsUnsignedLongWhole.ddl - tpbitsSignedLongLongWhole.ddl - tpbitsUnsignedLongLongWhole.ddl - tpbitsSignedLongLongWhole1.ddl - tpbitsUnsignedLongLongWhole1.ddl - tpbitsSignedLongLongWhole63.ddl - tpbitsUnsignedLongLongWhole63.ddl - tpbitsSigned4.ddl - tpbitsUnsigned4.ddl - tpbitsSignedInt8.ddl - tpbitsUnsignedInt8.ddl - tpbitsSignedLong16.ddl - tpbitsUnsignedLong16.ddl - tpbitsSignedLongLong32.ddl - tpbitsUnsignedLongLong32.ddl - tpbitsSigned2.ddl - tpbitsUnsigned2.ddl - tpbitsSignedInt4.ddl - tpbitsUnsignedInt4.ddl - tpbitsSignedLong8.ddl - tpbitsUnsignedLong8.ddl - tpbitsSignedLongLong16.ddl - tpbitsUnsignedLongLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl ) FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) - SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_pbits}") + GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) + SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}") #MESSAGE (STATUS " Translating ${ddl_pbits}") ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_pbits} ${ddldest} + ARGS -E copy_if_different ${ddl_pbits} ${ddldest} ) ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) @@ -502,6 +510,7 @@ IF (BUILD_TESTING) # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5DUMP-${testname} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -510,14 +519,14 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-clear-h5dump-${testname}-objects COMMAND ${CMAKE_COMMAND} - -E remove h5dump-${testname}.out h5dump-${testname}.out.err + -E remove ./testfiles/h5dump-${testname}.out ./testfiles/h5dump-${testname}.out.err ) ADD_TEST ( NAME H5DUMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=h5dump-${testname}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=h5dump-${testname}.txt" @@ -544,6 +553,7 @@ IF (BUILD_TESTING) # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT ${resultcode} STREQUAL "0") SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") ENDIF (NOT ${resultcode} STREQUAL "0") @@ -555,14 +565,14 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-clear-${resultfile}-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err + -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err ) ADD_TEST ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}.ddl" @@ -575,8 +585,9 @@ IF (BUILD_TESTING) MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) ADD_TEST ( NAME H5DUMP-output-${resultfile} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${targetfile} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.txt ${PROJECT_BINARY_DIR}/testfiles/${targetfile} ) + SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -585,7 +596,7 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-output-cmp-${resultfile} COMMAND ${CMAKE_COMMAND} - -E compare_files ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${resultfile}.exp + -E compare_files ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.txt ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.exp ) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS ${last_test}) @@ -599,14 +610,14 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-clear-${resultfile}-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err + -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err ) ADD_TEST ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}.ddl" @@ -633,6 +644,7 @@ IF (BUILD_TESTING) MACRO (ADD_XML_H5_TEST resultfile resultcode) IF (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $ --xml ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT ${resultcode} STREQUAL "0") SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") ENDIF (NOT ${resultcode} STREQUAL "0") @@ -644,14 +656,14 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-XML-clear-${resultfile}-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err + -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err ) ADD_TEST ( NAME H5DUMP-XML-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=--xml;${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}.xml" @@ -736,8 +748,6 @@ IF (BUILD_TESTING) tattr-3.out.err tattr-4_be.out tattr-4_be.out.err - tattrintsize.out - tattrintsize.out.err tattrreg.out tattrreg.out.err tattrregR.out @@ -754,10 +764,6 @@ IF (BUILD_TESTING) tchar1.out.err tchunked.out tchunked.out.err - tcmpdattrintsize.out - tcmpdattrintsize.out.err - tcmpdintsize.out - tcmpdintsize.out.err tcomp-1.out tcomp-1.out.err tcomp-2.out @@ -947,12 +953,6 @@ IF (BUILD_TESTING) # test for signed/unsigned datasets 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 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 displaying groups ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5) # test for displaying the selected groups @@ -1096,8 +1096,6 @@ IF (BUILD_TESTING) # test for file contents ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) - ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5) - ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5) # tests for storage layout # compact @@ -1230,13 +1228,15 @@ IF (BUILD_TESTING) SET (last_test "H5DUMP-tbin1") ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove out1.h5) + ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/out1.h5) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-clear-out1 PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") ADD_TEST (NAME H5DUMP-h5import-out1 COMMAND h5import out1.bin -c out3.h5import -o out1.h5) + SET_TESTS_PROPERTIES (H5DUMP-h5import-out1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") SET_TESTS_PROPERTIES (H5DUMP-h5import-out1 PROPERTIES DEPENDS H5DUMP-clear-out1) ADD_TEST (NAME H5DUMP-h5diff-out1 COMMAND h5diff tbinary.h5 out1.h5 /integer /integer) + SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1 PROPERTIES DEPENDS H5DUMP-h5import-out1) SET (last_test "H5DUMP-h5diff-out1") @@ -1257,13 +1257,15 @@ IF (BUILD_TESTING) SET (last_test "H5DUMP-tbin3") ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove out3.h5) + ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/out3.h5) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-clear-out3 PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") ADD_TEST (NAME H5DUMP-h5import-out3 COMMAND h5import out3.bin -c out3.h5import -o out3.h5) + SET_TESTS_PROPERTIES (H5DUMP-h5import-out3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") SET_TESTS_PROPERTIES (H5DUMP-h5import-out3 PROPERTIES DEPENDS H5DUMP-clear-out3) ADD_TEST (NAME H5DUMP-h5diff-out3 COMMAND h5diff tbinary.h5 out3.h5 /integer /integer -q) + SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3 PROPERTIES DEPENDS H5DUMP-h5import-out3) SET (last_test "H5DUMP-h5diff-out3") -- cgit v0.12 From 87fe8971ed82bf82b74ff91c3f77b0eb02848ed6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 12:12:06 -0500 Subject: [svn-r22544] Add test to verify use of named datatypes HDFFV-2687 Tested: local linux with cmake --- MANIFEST | 2 + tools/h5dump/CMakeLists.txt | 31 ++++++ tools/h5dump/h5dumpgentest.c | 148 +++++++++++++++++++++++++ tools/h5dump/testh5dump.sh.in | 5 + tools/testfiles/tnestedcmpddt.ddl | 220 ++++++++++++++++++++++++++++++++++++++ tools/testfiles/tnestedcmpddt.h5 | Bin 0 -> 16536 bytes 6 files changed, 406 insertions(+) create mode 100644 tools/testfiles/tnestedcmpddt.ddl create mode 100644 tools/testfiles/tnestedcmpddt.h5 diff --git a/MANIFEST b/MANIFEST index 4c750a5..30c124f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1431,6 +1431,8 @@ ./tools/testfiles/tnbit.ddl ./tools/testfiles/tnestcomp-1.ddl ./tools/testfiles/tnestedcomp.h5 +./tools/testfiles/tnestedcmpddt.ddl +./tools/testfiles/tnestedcmpddt.h5 ./tools/testfiles/tno-subset.h5 ./tools/testfiles/tno-subset.ddl ./tools/testfiles/tnullspace.h5 diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 339a31f..2af52b7 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -69,6 +69,7 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl @@ -82,6 +83,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl @@ -133,6 +136,7 @@ IF (BUILD_TESTING) #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl @@ -146,6 +150,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl @@ -258,10 +264,13 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 @@ -304,6 +313,7 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5 @@ -748,6 +758,8 @@ IF (BUILD_TESTING) tattr-3.out.err tattr-4_be.out tattr-4_be.out.err + tattrintsize.out + tattrintsize.out.err tattrreg.out tattrreg.out.err tattrregR.out @@ -764,6 +776,10 @@ IF (BUILD_TESTING) tchar1.out.err tchunked.out tchunked.out.err + tcmpdattrintsize.out + tcmpdattrintsize.out.err + tcmpdintsize.out + tcmpdintsize.out.err tcomp-1.out tcomp-1.out.err tcomp-2.out @@ -866,6 +882,8 @@ IF (BUILD_TESTING) tnamed_dtype_attr.out.err tnestcomp-1.out tnestcomp-1.out.err + tnestedcmpddt.out + tnestedcmpddt.out.err tnbit.out tnbit.out.err tno-subset.out @@ -892,6 +910,10 @@ IF (BUILD_TESTING) torderattr3.out.err torderattr4.out torderattr4.out.err + tordercontents1.out + tordercontents1.out.err + tordercontents2.out + tordercontents2.out.err tperror.out tperror.out.err treference.out @@ -953,6 +975,12 @@ IF (BUILD_TESTING) # test for signed/unsigned datasets 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 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 displaying groups ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5) # test for displaying the selected groups @@ -1004,6 +1032,7 @@ IF (BUILD_TESTING) #test for the nested compound type ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5) + ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5) # test for options # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) @@ -1096,6 +1125,8 @@ IF (BUILD_TESTING) # test for file contents ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) + ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5) + ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5) # tests for storage layout # compact diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index e240232..d7dfdbc 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -101,6 +101,7 @@ #define FILE69 "tattrintsize.h5" #define FILE70 "tcmpdintsize.h5" #define FILE71 "tcmpdattrintsize.h5" +#define FILE72 "tnestedcmpddt.h5" /*------------------------------------------------------------------------- * prototypes @@ -7946,6 +7947,151 @@ static void gent_compound_attr_intsizes(void) { HDassert(status >= 0); } +static void gent_nested_compound_dt(void) { /* test nested data type */ + hid_t fid, group, dataset, space, type, create_plist, type1, type2; + hid_t array_dt, enum_dt; + enumtype val; + + typedef struct { + int a; + float b; + } dset1_t; + dset1_t dset1[10]; + + typedef struct { + int a; + float b; + enumtype c; + } dset2_t; + dset2_t dset2[10]; + + typedef struct { + int a[4]; + float b[5][6]; + dset1_t c; + } dset3_t; + dset3_t dset3[10]; + + enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE}; + dset1_t dset5[10]; + + int i; + unsigned ndims; + hsize_t dim[2]; + + hsize_t sdim, maxdim; + + sdim = 10; + for(i = 0; i < (int)sdim; i++) { + dset1[i].a = i; + dset1[i].b = (float)(i*i); + + dset2[i].a = i; + dset2[i].b = (float)(i+ i*0.1); + dset2[i].c = GREEN; + + dset3[i].a[0] = i; + dset3[i].b[0][0] = (float)(i*1.0); + dset3[i].c.a = i; + dset3[i].c.b = (float)(i*1.0); + } + + fid = H5Fcreate(FILE72, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + create_plist = H5Pcreate(H5P_DATASET_CREATE); + + sdim = 2; + H5Pset_chunk(create_plist, 1, &sdim); + + + sdim = 6; + maxdim = H5S_UNLIMITED; + + space = H5Screate_simple(1, &sdim, &maxdim); + + type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0])); + H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32BE); + H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE); + + dataset = H5Dcreate2(fid, "/dset1", type, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); + + H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1); + + H5Tclose(type); + H5Dclose(dataset); + + /* Create the shared enumerated datatype. */ + enum_dt = H5Tenum_create (H5T_NATIVE_INT); + val = (enumtype) RED; + H5Tenum_insert (enum_dt, "Red", &val); + val = (enumtype) GREEN; + H5Tenum_insert (enum_dt, "Green", &val); + val = (enumtype) BLUE; + H5Tenum_insert (enum_dt, "Blue", &val); + val = (enumtype) WHITE; + H5Tenum_insert (enum_dt, "White", &val); + val = (enumtype) BLACK; + H5Tenum_insert (enum_dt, "Black", &val); + H5Tcommit2(fid, "enumtype", enum_dt, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset2[0])); + + H5Tinsert(type2, "a_name", HOFFSET(dset2_t, a), H5T_NATIVE_INT); + H5Tinsert(type2, "b_name", HOFFSET(dset2_t, b), H5T_NATIVE_FLOAT); + H5Tinsert(type2, "c_name", HOFFSET(dset2_t, c), enum_dt); + + dataset = H5Dcreate2(fid, "/dset2", type2, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); + + H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2); + + H5Tclose(type2); + + dataset = H5Dcreate2(fid, "/dset4", enum_dt, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); + H5Dwrite(dataset, enum_dt, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset4); + + H5Tclose(enum_dt); + H5Dclose(dataset); + + /* shared data type 1 */ + type1 = H5Tcreate(H5T_COMPOUND, sizeof(dset1_t)); + H5Tinsert(type1, "int_name", HOFFSET(dset1_t, a), H5T_STD_I32BE); + H5Tinsert(type1, "float_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE); + H5Tcommit2(fid, "type1", type1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + group = H5Gcreate2(fid, "/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t)); + + ndims = 1; dim[0] = 4; + array_dt = H5Tarray_create2(H5T_STD_I32BE, ndims, dim); + H5Tinsert(type2, "int_name", HOFFSET(dset3_t, a), array_dt); + H5Tclose(array_dt); + + ndims = 2; dim[0] = 5; dim[1] = 6; + array_dt = H5Tarray_create2(H5T_IEEE_F32BE, ndims, dim); + H5Tinsert(type2, "float_name", HOFFSET(dset3_t, b), array_dt); + H5Tclose(array_dt); + + H5Tinsert (type2, "cmpd_name", HOFFSET (dset3_t, c), type1); + + dataset = H5Dcreate2(group, "dset3", type2, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); + + H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3); + + dataset = H5Dcreate2(fid, "/dset5", type1, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); + H5Dwrite(dataset, type1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset5); + + H5Tclose(type1); + H5Tclose(type2); + H5Sclose(space); + H5Dclose(dataset); + H5Gclose(group); + + H5Pclose(create_plist); + + H5Fclose(fid); + +} /*------------------------------------------------------------------------- * Function: main @@ -8028,6 +8174,8 @@ int main(void) gent_compound_intsizes(); gent_compound_attr_intsizes(); + gent_nested_compound_dt(); + return 0; } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 8c7d754..2b7250d 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -142,6 +142,7 @@ $SRC_H5DUMP_TESTFILES/tmulti-r.h5 $SRC_H5DUMP_TESTFILES/tmulti-s.h5 $SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5 $SRC_H5DUMP_TESTFILES/tnestedcomp.h5 +$SRC_H5DUMP_TESTFILES/tnestedcmpddt.h5 $SRC_H5DUMP_TESTFILES/tno-subset.h5 $SRC_H5DUMP_TESTFILES/tnullspace.h5 $SRC_H5DUMP_TESTFILES/zerodim.h5 @@ -258,6 +259,7 @@ $SRC_H5DUMP_TESTFILES/tqmarkfile.ddl $SRC_H5DUMP_TESTFILES/tstarfile.ddl $SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.ddl $SRC_H5DUMP_TESTFILES/tnestcomp-1.ddl +$SRC_H5DUMP_TESTFILES/tnestedcmpddt.ddl $SRC_H5DUMP_TESTFILES/tnbit.ddl $SRC_H5DUMP_TESTFILES/tno-subset.ddl $SRC_H5DUMP_TESTFILES/tnullspace.ddl @@ -271,6 +273,8 @@ $SRC_H5DUMP_TESTFILES/torderattr1.ddl $SRC_H5DUMP_TESTFILES/torderattr2.ddl $SRC_H5DUMP_TESTFILES/torderattr3.ddl $SRC_H5DUMP_TESTFILES/torderattr4.ddl +$SRC_H5DUMP_TESTFILES/tordercontents1.ddl +$SRC_H5DUMP_TESTFILES/tordercontents2.ddl $SRC_H5DUMP_TESTFILES/tperror.ddl $SRC_H5DUMP_TESTFILES/treference.ddl $SRC_H5DUMP_TESTFILES/tsaf.ddl @@ -629,6 +633,7 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5 #test for the nested compound type TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5 +TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5 # test for options # JIRA HDFFV-7936 TOOLTEST tall-1.ddl --enable-error-stack tall.h5 diff --git a/tools/testfiles/tnestedcmpddt.ddl b/tools/testfiles/tnestedcmpddt.ddl new file mode 100644 index 0000000..4091d04 --- /dev/null +++ b/tools/testfiles/tnestedcmpddt.ddl @@ -0,0 +1,220 @@ +HDF5 "tnestedcmpddt.h5" { +GROUP "/" { + DATASET "dset1" { + DATATYPE H5T_COMPOUND { + H5T_STD_I32BE "a_name"; + H5T_IEEE_F32BE "b_name"; + } + DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } + DATA { + (0): { + 0, + 0 + }, + (1): { + 16777216, + 4.6006e-41 + }, + (2): { + 33554432, + 4.60074e-41 + }, + (3): { + 50331648, + 5.8308e-42 + }, + (4): { + 67108864, + 4.60088e-41 + }, + (5): { + 83886080, + 7.18376e-41 + } + } + } + DATASET "dset2" { + DATATYPE H5T_COMPOUND { + H5T_STD_I32LE "a_name"; + H5T_IEEE_F32LE "b_name"; + H5T_ENUM { + H5T_STD_I32LE; + "Red" 0; + "Green" 1; + "Blue" 2; + "White" 3; + "Black" 4; + } "c_name"; + } + DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } + DATA { + (0): { + 0, + 0, + Green + }, + (1): { + 1, + 1.1, + Green + }, + (2): { + 2, + 2.2, + Green + }, + (3): { + 3, + 3.3, + Green + }, + (4): { + 4, + 4.4, + Green + }, + (5): { + 5, + 5.5, + Green + } + } + } + DATASET "dset4" { + DATATYPE "/enumtype" + DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } + DATA { + (0): Red, Green, Blue, Green, White, Blue + } + } + DATASET "dset5" { + DATATYPE "/type1" + DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } + DATA { + (0): { + -1434300087, + -1.69532e-21 + }, + (1): { + -965921664, + -7.63504e-06 + }, + (2): { + 0, + 1.01342e-41 + }, + (3): { + 485220918, + 2.64926e-23 + }, + (4): { + 970376557, + 1.19312e-07 + }, + (5): { + 1438754980, + 5.37334e+08 + } + } + } + DATATYPE "enumtype" H5T_ENUM { + H5T_STD_I32LE; + "Red" 0; + "Green" 1; + "Blue" 2; + "White" 3; + "Black" 4; + }; + GROUP "group1" { + DATASET "dset3" { + DATATYPE H5T_COMPOUND { + H5T_ARRAY { [4] H5T_STD_I32BE } "int_name"; + H5T_ARRAY { [5][6] H5T_IEEE_F32BE } "float_name"; + H5T_COMPOUND { + H5T_STD_I32BE "int_name"; + H5T_IEEE_F32BE "float_name"; + } "cmpd_name"; + } + DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } + DATA { + (0): { + [ 0, 14745599, 0, 12648447 ], + [ 0, 1.18468e-38, 0, 9.18341e-41, 0, 9.14754e-41, + 0, 9.07579e-41, 0, 8.9323e-41, 0, 8.64531e-41, + 0, 8.07134e-41, 0, 6.9234e-41, 0, 4.62751e-41, + 0, 3.57331e-43, 0, 3.5593e-43, 0, 3.53127e-43, + 0, 3.47522e-43, 0, 3.36312e-43, 0, 3.13891e-43 ], + { + 0, + 0 + } + }, + (1): { + [ 16777216, 128, 0, 0 ], + [ 4.6006e-41, 0, 0, 0, 0, 0, + 0, 0, -8, -nan, -2.35099e-38, -nan, + 2.35099e-38, -nan, 2.34181e-38, -nan, 2.32344e-38, -nan, + 2.2867e-38, -nan, 2.21324e-38, -nan, 2.0663e-38, -nan, + 1.77242e-38, -nan, 1.18468e-38, -nan, 9.18341e-41, -nan ], + { + 16777216, + 4.6006e-41 + } + }, + (2): { + [ 33554432, -1, 63743, -1 ], + [ 8.96831e-44, -nan, 8.07134e-41, -nan, 6.9234e-41, -nan, + 4.62751e-41, -nan, 3.57331e-43, -nan, 3.5593e-43, -nan, + 3.53127e-43, -nan, 3.47522e-43, -nan, 3.36312e-43, -nan, + 3.13891e-43, -nan, 2.69049e-43, -nan, 1.79366e-43, -nan, + 0, -nan, 0, -1.70141e+38, 0, -1.06338e+37 ], + { + 33554432, + 8.96831e-44 + } + }, + (3): { + [ 50331648, -251658241, 0, -520093697 ], + [ 2.30486e-41, -8, 0, -2.35099e-38, 0, 2.35099e-38, + 0, 2.34181e-38, 0, 2.32344e-38, 0, 2.2867e-38, + 0, 2.21324e-38, 0, 2.0663e-38, 0, 1.77242e-38, + 0, 1.18468e-38, 0, 9.18341e-41, 0, 9.14754e-41, + 0, 9.07579e-41, 0, 8.9323e-41, 0, 8.64531e-41 ], + { + 50331648, + 2.30486e-41 + } + }, + (4): { + [ 67108864, 49407, 0, 33023 ], + [ 4.60074e-41, 3.57331e-43, 0, 3.5593e-43, 0, 3.53127e-43, + 0, 3.47522e-43, 0, 3.36312e-43, 0, 3.13891e-43, + 0, 2.69049e-43, 0, 1.79366e-43, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2.35099e-38, -nan ], + { + 67108864, + 4.60074e-41 + } + }, + (5): { + [ 83886080, -1, 16580607, -1 ], + [ 5.74869e-41, -nan, 2.21324e-38, -nan, 2.0663e-38, -nan, + 1.77242e-38, -nan, 1.18468e-38, -nan, 9.18341e-41, -nan, + 9.14754e-41, -nan, 9.07579e-41, -nan, 8.9323e-41, -nan, + 8.64531e-41, -nan, 8.07134e-41, -nan, 6.9234e-41, -nan, + 4.62751e-41, -nan, 3.57331e-43, -nan, 3.5593e-43, -nan ], + { + 83886080, + 5.74869e-41 + } + } + } + } + } + DATATYPE "type1" H5T_COMPOUND { + H5T_STD_I32BE "int_name"; + H5T_IEEE_F32BE "float_name"; + } +} +} diff --git a/tools/testfiles/tnestedcmpddt.h5 b/tools/testfiles/tnestedcmpddt.h5 new file mode 100644 index 0000000..f0429ba Binary files /dev/null and b/tools/testfiles/tnestedcmpddt.h5 differ -- cgit v0.12 From a7f482142e9c6031cb54dae58ef7e193a5ece1ca Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 13:36:01 -0500 Subject: [svn-r22545] Enable H5IMPORT-clear-objects for valgrind Tested: local linux --- config/cmake/CTestCustom.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index 5537195..b0b9b83 100755 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -52,7 +52,7 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE H5DUMP_PACKED_BITS-clearall-objects H5DUMP-XML-clearall-objects ######### tools/h5import ######### - H5IMPORT-clear-objects + #H5IMPORT-clear-objects H5IMPORT-ASCII_I32-clear-objects H5IMPORT-ASCII_I16-clear-objects H5IMPORT-ASCII_I8-clear-objects -- cgit v0.12 From 912daba46405bdee90f58b61aa1c270bea21d65d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 13:58:20 -0500 Subject: [svn-r22546] Correct generation of testfile --- tools/h5dump/h5dumpgentest.c | 16 +++++---- tools/testfiles/tnestedcmpddt.ddl | 74 +++++++++++++++++++------------------- tools/testfiles/tnestedcmpddt.h5 | Bin 16536 -> 16536 bytes 3 files changed, 47 insertions(+), 43 deletions(-) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index d7dfdbc..da78089 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -7966,7 +7966,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ dset2_t dset2[10]; typedef struct { - int a[4]; + int a[5]; float b[5][6]; dset1_t c; } dset3_t; @@ -7975,7 +7975,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE}; dset1_t dset5[10]; - int i; + int i, j, k; unsigned ndims; hsize_t dim[2]; @@ -7987,11 +7987,15 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ dset1[i].b = (float)(i*i); dset2[i].a = i; - dset2[i].b = (float)(i+ i*0.1); + dset2[i].b = (float)(i+i*0.1); dset2[i].c = GREEN; - dset3[i].a[0] = i; - dset3[i].b[0][0] = (float)(i*1.0); + for(j = 0; j < 5; j++) { + dset3[i].a[j] = i*j; + for(k = 0; k < 6; k++) { + dset3[i].b[j][k] = (float)(i*j*k*1.0); + } + } dset3[i].c.a = i; dset3[i].c.b = (float)(i*1.0); } @@ -8062,7 +8066,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t)); - ndims = 1; dim[0] = 4; + ndims = 1; dim[0] = 5; array_dt = H5Tarray_create2(H5T_STD_I32BE, ndims, dim); H5Tinsert(type2, "int_name", HOFFSET(dset3_t, a), array_dt); H5Tclose(array_dt); diff --git a/tools/testfiles/tnestedcmpddt.ddl b/tools/testfiles/tnestedcmpddt.ddl index 4091d04..8f1af21 100644 --- a/tools/testfiles/tnestedcmpddt.ddl +++ b/tools/testfiles/tnestedcmpddt.ddl @@ -128,7 +128,7 @@ GROUP "/" { GROUP "group1" { DATASET "dset3" { DATATYPE H5T_COMPOUND { - H5T_ARRAY { [4] H5T_STD_I32BE } "int_name"; + H5T_ARRAY { [5] H5T_STD_I32BE } "int_name"; H5T_ARRAY { [5][6] H5T_IEEE_F32BE } "float_name"; H5T_COMPOUND { H5T_STD_I32BE "int_name"; @@ -138,72 +138,72 @@ GROUP "/" { DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } DATA { (0): { - [ 0, 14745599, 0, 12648447 ], - [ 0, 1.18468e-38, 0, 9.18341e-41, 0, 9.14754e-41, - 0, 9.07579e-41, 0, 8.9323e-41, 0, 8.64531e-41, - 0, 8.07134e-41, 0, 6.9234e-41, 0, 4.62751e-41, - 0, 3.57331e-43, 0, 3.5593e-43, 0, 3.53127e-43, - 0, 3.47522e-43, 0, 3.36312e-43, 0, 3.13891e-43 ], + [ 0, 0, 0, 0, 0 ], + [ 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 ], { 0, 0 } }, (1): { - [ 16777216, 128, 0, 0 ], - [ 4.6006e-41, 0, 0, 0, 0, 0, - 0, 0, -8, -nan, -2.35099e-38, -nan, - 2.35099e-38, -nan, 2.34181e-38, -nan, 2.32344e-38, -nan, - 2.2867e-38, -nan, 2.21324e-38, -nan, 2.0663e-38, -nan, - 1.77242e-38, -nan, 1.18468e-38, -nan, 9.18341e-41, -nan ], + [ 0, 16777216, 33554432, 50331648, 67108864 ], + [ 0, 0, 0, 0, 0, 0, + 0, 4.6006e-41, 8.96831e-44, 2.30486e-41, 4.60074e-41, 5.74869e-41, + 0, 8.96831e-44, 4.60074e-41, 6.89663e-41, 9.10844e-44, 1.15705e-41, + 0, 2.30486e-41, 6.89663e-41, 5.8308e-42, 2.305e-41, 4.02691e-41, + 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41 ], { 16777216, 4.6006e-41 } }, (2): { - [ 33554432, -1, 63743, -1 ], - [ 8.96831e-44, -nan, 8.07134e-41, -nan, 6.9234e-41, -nan, - 4.62751e-41, -nan, 3.57331e-43, -nan, 3.5593e-43, -nan, - 3.53127e-43, -nan, 3.47522e-43, -nan, 3.36312e-43, -nan, - 3.13891e-43, -nan, 2.69049e-43, -nan, 1.79366e-43, -nan, - 0, -nan, 0, -1.70141e+38, 0, -1.06338e+37 ], + [ 0, 33554432, 67108864, 100663296, 134217728 ], + [ 0, 0, 0, 0, 0, 0, + 0, 8.96831e-44, 4.60074e-41, 6.89663e-41, 9.10844e-44, 1.15705e-41, + 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41, + 0, 6.89663e-41, 2.305e-41, 5.17486e-41, 6.89677e-41, 8.61869e-41, + 0, 9.10844e-44, 4.60088e-41, 6.89677e-41, 9.24857e-44, 1.15719e-41 ], { 33554432, 8.96831e-44 } }, (3): { - [ 50331648, -251658241, 0, -520093697 ], - [ 2.30486e-41, -8, 0, -2.35099e-38, 0, 2.35099e-38, - 0, 2.34181e-38, 0, 2.32344e-38, 0, 2.2867e-38, - 0, 2.21324e-38, 0, 2.0663e-38, 0, 1.77242e-38, - 0, 1.18468e-38, 0, 9.18341e-41, 0, 9.14754e-41, - 0, 9.07579e-41, 0, 8.9323e-41, 0, 8.64531e-41 ], + [ 0, 50331648, 100663296, 150994944, 201326592 ], + [ 0, 0, 0, 0, 0, 0, + 0, 2.30486e-41, 6.89663e-41, 5.8308e-42, 2.305e-41, 4.02691e-41, + 0, 6.89663e-41, 2.305e-41, 5.17486e-41, 6.89677e-41, 8.61869e-41, + 0, 5.8308e-42, 5.17486e-41, 7.75773e-41, 5.8322e-42, 1.87466e-41, + 0, 2.305e-41, 6.89677e-41, 5.8322e-42, 2.30514e-41, 4.02705e-41 ], { 50331648, 2.30486e-41 } }, (4): { - [ 67108864, 49407, 0, 33023 ], - [ 4.60074e-41, 3.57331e-43, 0, 3.5593e-43, 0, 3.53127e-43, - 0, 3.47522e-43, 0, 3.36312e-43, 0, 3.13891e-43, - 0, 2.69049e-43, 0, 1.79366e-43, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -2.35099e-38, -nan ], + [ 0, 67108864, 134217728, 201326592, 268435456 ], + [ 0, 0, 0, 0, 0, 0, + 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41, + 0, 9.10844e-44, 4.60088e-41, 6.89677e-41, 9.24857e-44, 1.15719e-41, + 0, 2.305e-41, 6.89677e-41, 5.8322e-42, 2.30514e-41, 4.02705e-41, + 0, 4.60088e-41, 9.24857e-44, 2.30514e-41, 4.60102e-41, 5.74897e-41 ], { 67108864, 4.60074e-41 } }, (5): { - [ 83886080, -1, 16580607, -1 ], - [ 5.74869e-41, -nan, 2.21324e-38, -nan, 2.0663e-38, -nan, - 1.77242e-38, -nan, 1.18468e-38, -nan, 9.18341e-41, -nan, - 9.14754e-41, -nan, 9.07579e-41, -nan, 8.9323e-41, -nan, - 8.64531e-41, -nan, 8.07134e-41, -nan, 6.9234e-41, -nan, - 4.62751e-41, -nan, 3.57331e-43, -nan, 3.5593e-43, -nan ], + [ 0, 83886080, 167772160, 251658240, 335544320 ], + [ 0, 0, 0, 0, 0, 0, + 0, 5.74869e-41, 1.15705e-41, 4.02691e-41, 5.74883e-41, 7.18376e-41, + 0, 1.15705e-41, 5.74883e-41, 8.61869e-41, 1.15719e-41, 2.59212e-41, + 0, 4.02691e-41, 8.61869e-41, 1.87466e-41, 4.02705e-41, 5.39023e-41, + 0, 5.74883e-41, 1.15719e-41, 4.02705e-41, 5.74897e-41, 7.1839e-41 ], { 83886080, 5.74869e-41 diff --git a/tools/testfiles/tnestedcmpddt.h5 b/tools/testfiles/tnestedcmpddt.h5 index f0429ba..4d992bc 100644 Binary files a/tools/testfiles/tnestedcmpddt.h5 and b/tools/testfiles/tnestedcmpddt.h5 differ -- cgit v0.12 From 59da54f0fd240bad4811df23af2f62d96d9a2f09 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 14:31:54 -0500 Subject: [svn-r22547] Remove clear-objects from ignore list (like h5import) --- config/cmake/CTestCustom.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index b0b9b83..6b6acc2 100755 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -37,11 +37,9 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE hl_test-clear-objects hl_fortran_test-clear-objects ######### tools/h5copy ######### - H5COPY-clearall-objects H5COPY-clear-refs H5COPY-clear-ext-links H5COPY-clear-misc - H5COPY-clear-samefile ######### tools/h5diff ######### H5DIFF-clearall-objects ######### tools/h5dump ######### @@ -52,7 +50,6 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE H5DUMP_PACKED_BITS-clearall-objects H5DUMP-XML-clearall-objects ######### tools/h5import ######### - #H5IMPORT-clear-objects H5IMPORT-ASCII_I32-clear-objects H5IMPORT-ASCII_I16-clear-objects H5IMPORT-ASCII_I8-clear-objects -- cgit v0.12 From 91d63fa0ae9cfe13ef73bd6d4c05b1e47b4a6ebf Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Jul 2012 14:51:56 -0500 Subject: [svn-r22548] added test for "-w0" option Tested: local linux --- MANIFEST | 2 + tools/h5dump/CMakeLists.txt | 4 ++ tools/h5dump/testh5dump.sh.in | 4 ++ tools/testfiles/twidedisplay.ddl | 130 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 tools/testfiles/twidedisplay.ddl diff --git a/MANIFEST b/MANIFEST index 30c124f..22e6fae 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1517,6 +1517,8 @@ ./tools/testfiles/tbigdims.ddl ./tools/testfiles/tbigdims.h5 ./tools/testfiles/thyperslab.h5 +./tools/testfiles/twidedisplay.ddl + # h5dump packed bits validation ./tools/testfiles/tnofilename-with-packed-bits.ddl ./tools/testfiles/tpbitsLengthPositive.ddl diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 2af52b7..0da418d 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -177,6 +177,7 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import ) @@ -973,6 +974,9 @@ IF (BUILD_TESTING) ADD_HELP_TEST(help 0 -h) + # test for maximum display datasets + ADD_H5_TEST (twidedisplay 0 -w0 --enable-error-stack packedbits.h5) + # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) # test for compound signed/unsigned datasets diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 2b7250d..8d99458 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -163,6 +163,7 @@ $SRC_H5DUMP_TESTFILES/tvldtypes4.h5 $SRC_H5DUMP_TESTFILES/tvldtypes5.h5 $SRC_H5DUMP_TESTFILES/tvlstr.h5 $SRC_H5DUMP_TESTFILES/tvms.h5 +$SRC_H5DUMP_TESTFILES/twidedisplay.ddl " LIST_OTHER_TEST_FILES=" @@ -576,6 +577,9 @@ COPY_TESTFILES_TO_TESTDIR #TOOLTEST h5dump-help.txt -h +# test for maximum display datasets +TOOLTEST twidedisplay.ddl -w0 --enable-error-stack packedbits.h5 + # test for signed/unsigned datasets TOOLTEST packedbits.ddl --enable-error-stack packedbits.h5 # test for compound signed/unsigned datasets diff --git a/tools/testfiles/twidedisplay.ddl b/tools/testfiles/twidedisplay.ddl new file mode 100644 index 0000000..1e6ffee --- /dev/null +++ b/tools/testfiles/twidedisplay.ddl @@ -0,0 +1,130 @@ +HDF5 "packedbits.h5" { +GROUP "/" { + DATASET "DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, + (1,0): -2, -4, -8, -16, -32, -64, -128, 0, + (2,0): -4, -8, -16, -32, -64, -128, 0, 0, + (3,0): -8, -16, -32, -64, -128, 0, 0, 0, + (4,0): -16, -32, -64, -128, 0, 0, 0, 0, + (5,0): -32, -64, -128, 0, 0, 0, 0, 0, + (6,0): -64, -128, 0, 0, 0, 0, 0, 0, + (7,0): -128, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + DATA { + (0,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, + (1,0): -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, + (2,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, + (3,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, + (4,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, + (5,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, + (6,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, + (7,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_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + DATA { + (0,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, + (1,0): -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, + (2,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, + (3,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, + (4,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, + (5,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, + (6,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, + (7,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_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + DATA { + (0,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, + (1,0): 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, + (2,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, + (3,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, + (4,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, + (5,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, + (6,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, + (7,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_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + DATA { + (0,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, + (1,0): 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, + (2,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, + (3,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, + (4,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, + (5,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, + (6,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, + (7,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_IEEE_F64BE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + DATA { + (0,0): 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, + (1,0): 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007, + (2,0): 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007, + (3,0): 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007, + (4,0): 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007, + (5,0): 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007, + (6,0): 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007, + (7,0): 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 + } + } +} +} -- cgit v0.12 From 61cb9cc54727f9b7658eaadd2abaeedb100b9fc1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Jul 2012 09:03:53 -0500 Subject: [svn-r22550] Correct datatypes in generator and update files for test. Tested: local linux with cmake --- tools/h5dump/h5dumpgentest.c | 14 ++-- tools/testfiles/tnestedcmpddt.ddl | 130 +++++++++++++++++++------------------- tools/testfiles/tnestedcmpddt.h5 | Bin 16536 -> 16536 bytes 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index da78089..a9b5a62 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -8014,8 +8014,8 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ space = H5Screate_simple(1, &sdim, &maxdim); type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0])); - H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32BE); - H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE); + H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32LE); + H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32LE); dataset = H5Dcreate2(fid, "/dset1", type, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); @@ -8058,8 +8058,8 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ /* shared data type 1 */ type1 = H5Tcreate(H5T_COMPOUND, sizeof(dset1_t)); - H5Tinsert(type1, "int_name", HOFFSET(dset1_t, a), H5T_STD_I32BE); - H5Tinsert(type1, "float_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE); + H5Tinsert(type1, "int_name", HOFFSET(dset1_t, a), H5T_STD_I32LE); + H5Tinsert(type1, "float_name", HOFFSET(dset1_t, b), H5T_IEEE_F32LE); H5Tcommit2(fid, "type1", type1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); group = H5Gcreate2(fid, "/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -8067,12 +8067,12 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t)); ndims = 1; dim[0] = 5; - array_dt = H5Tarray_create2(H5T_STD_I32BE, ndims, dim); + array_dt = H5Tarray_create2(H5T_STD_I32LE, ndims, dim); H5Tinsert(type2, "int_name", HOFFSET(dset3_t, a), array_dt); H5Tclose(array_dt); ndims = 2; dim[0] = 5; dim[1] = 6; - array_dt = H5Tarray_create2(H5T_IEEE_F32BE, ndims, dim); + array_dt = H5Tarray_create2(H5T_IEEE_F32LE, ndims, dim); H5Tinsert(type2, "float_name", HOFFSET(dset3_t, b), array_dt); H5Tclose(array_dt); @@ -8083,7 +8083,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3); dataset = H5Dcreate2(fid, "/dset5", type1, space, H5P_DEFAULT, create_plist, H5P_DEFAULT); - H5Dwrite(dataset, type1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset5); + H5Dwrite(dataset, type1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1); H5Tclose(type1); H5Tclose(type2); diff --git a/tools/testfiles/tnestedcmpddt.ddl b/tools/testfiles/tnestedcmpddt.ddl index 8f1af21..db949f0 100644 --- a/tools/testfiles/tnestedcmpddt.ddl +++ b/tools/testfiles/tnestedcmpddt.ddl @@ -2,8 +2,8 @@ HDF5 "tnestedcmpddt.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_COMPOUND { - H5T_STD_I32BE "a_name"; - H5T_IEEE_F32BE "b_name"; + H5T_STD_I32LE "a_name"; + H5T_IEEE_F32LE "b_name"; } DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } DATA { @@ -12,24 +12,24 @@ GROUP "/" { 0 }, (1): { - 16777216, - 4.6006e-41 + 1, + 1 }, (2): { - 33554432, - 4.60074e-41 + 2, + 4 }, (3): { - 50331648, - 5.8308e-42 + 3, + 9 }, (4): { - 67108864, - 4.60088e-41 + 4, + 16 }, (5): { - 83886080, - 7.18376e-41 + 5, + 25 } } } @@ -92,28 +92,28 @@ GROUP "/" { DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } DATA { (0): { - -1434300087, - -1.69532e-21 + 0, + 0 }, (1): { - -965921664, - -7.63504e-06 + 1, + 1 }, (2): { - 0, - 1.01342e-41 + 2, + 4 }, (3): { - 485220918, - 2.64926e-23 + 3, + 9 }, (4): { - 970376557, - 1.19312e-07 + 4, + 16 }, (5): { - 1438754980, - 5.37334e+08 + 5, + 25 } } } @@ -128,11 +128,11 @@ GROUP "/" { GROUP "group1" { DATASET "dset3" { DATATYPE H5T_COMPOUND { - H5T_ARRAY { [5] H5T_STD_I32BE } "int_name"; - H5T_ARRAY { [5][6] H5T_IEEE_F32BE } "float_name"; + H5T_ARRAY { [5] H5T_STD_I32LE } "int_name"; + H5T_ARRAY { [5][6] H5T_IEEE_F32LE } "float_name"; H5T_COMPOUND { - H5T_STD_I32BE "int_name"; - H5T_IEEE_F32BE "float_name"; + H5T_STD_I32LE "int_name"; + H5T_IEEE_F32LE "float_name"; } "cmpd_name"; } DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } @@ -150,71 +150,71 @@ GROUP "/" { } }, (1): { - [ 0, 16777216, 33554432, 50331648, 67108864 ], + [ 0, 1, 2, 3, 4 ], [ 0, 0, 0, 0, 0, 0, - 0, 4.6006e-41, 8.96831e-44, 2.30486e-41, 4.60074e-41, 5.74869e-41, - 0, 8.96831e-44, 4.60074e-41, 6.89663e-41, 9.10844e-44, 1.15705e-41, - 0, 2.30486e-41, 6.89663e-41, 5.8308e-42, 2.305e-41, 4.02691e-41, - 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41 ], + 0, 1, 2, 3, 4, 5, + 0, 2, 4, 6, 8, 10, + 0, 3, 6, 9, 12, 15, + 0, 4, 8, 12, 16, 20 ], { - 16777216, - 4.6006e-41 + 1, + 1 } }, (2): { - [ 0, 33554432, 67108864, 100663296, 134217728 ], + [ 0, 2, 4, 6, 8 ], [ 0, 0, 0, 0, 0, 0, - 0, 8.96831e-44, 4.60074e-41, 6.89663e-41, 9.10844e-44, 1.15705e-41, - 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41, - 0, 6.89663e-41, 2.305e-41, 5.17486e-41, 6.89677e-41, 8.61869e-41, - 0, 9.10844e-44, 4.60088e-41, 6.89677e-41, 9.24857e-44, 1.15719e-41 ], + 0, 2, 4, 6, 8, 10, + 0, 4, 8, 12, 16, 20, + 0, 6, 12, 18, 24, 30, + 0, 8, 16, 24, 32, 40 ], { - 33554432, - 8.96831e-44 + 2, + 2 } }, (3): { - [ 0, 50331648, 100663296, 150994944, 201326592 ], + [ 0, 3, 6, 9, 12 ], [ 0, 0, 0, 0, 0, 0, - 0, 2.30486e-41, 6.89663e-41, 5.8308e-42, 2.305e-41, 4.02691e-41, - 0, 6.89663e-41, 2.305e-41, 5.17486e-41, 6.89677e-41, 8.61869e-41, - 0, 5.8308e-42, 5.17486e-41, 7.75773e-41, 5.8322e-42, 1.87466e-41, - 0, 2.305e-41, 6.89677e-41, 5.8322e-42, 2.30514e-41, 4.02705e-41 ], + 0, 3, 6, 9, 12, 15, + 0, 6, 12, 18, 24, 30, + 0, 9, 18, 27, 36, 45, + 0, 12, 24, 36, 48, 60 ], { - 50331648, - 2.30486e-41 + 3, + 3 } }, (4): { - [ 0, 67108864, 134217728, 201326592, 268435456 ], + [ 0, 4, 8, 12, 16 ], [ 0, 0, 0, 0, 0, 0, - 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41, - 0, 9.10844e-44, 4.60088e-41, 6.89677e-41, 9.24857e-44, 1.15719e-41, - 0, 2.305e-41, 6.89677e-41, 5.8322e-42, 2.30514e-41, 4.02705e-41, - 0, 4.60088e-41, 9.24857e-44, 2.30514e-41, 4.60102e-41, 5.74897e-41 ], + 0, 4, 8, 12, 16, 20, + 0, 8, 16, 24, 32, 40, + 0, 12, 24, 36, 48, 60, + 0, 16, 32, 48, 64, 80 ], { - 67108864, - 4.60074e-41 + 4, + 4 } }, (5): { - [ 0, 83886080, 167772160, 251658240, 335544320 ], + [ 0, 5, 10, 15, 20 ], [ 0, 0, 0, 0, 0, 0, - 0, 5.74869e-41, 1.15705e-41, 4.02691e-41, 5.74883e-41, 7.18376e-41, - 0, 1.15705e-41, 5.74883e-41, 8.61869e-41, 1.15719e-41, 2.59212e-41, - 0, 4.02691e-41, 8.61869e-41, 1.87466e-41, 4.02705e-41, 5.39023e-41, - 0, 5.74883e-41, 1.15719e-41, 4.02705e-41, 5.74897e-41, 7.1839e-41 ], + 0, 5, 10, 15, 20, 25, + 0, 10, 20, 30, 40, 50, + 0, 15, 30, 45, 60, 75, + 0, 20, 40, 60, 80, 100 ], { - 83886080, - 5.74869e-41 + 5, + 5 } } } } } DATATYPE "type1" H5T_COMPOUND { - H5T_STD_I32BE "int_name"; - H5T_IEEE_F32BE "float_name"; + H5T_STD_I32LE "int_name"; + H5T_IEEE_F32LE "float_name"; } } } diff --git a/tools/testfiles/tnestedcmpddt.h5 b/tools/testfiles/tnestedcmpddt.h5 index 4d992bc..f2af756 100644 Binary files a/tools/testfiles/tnestedcmpddt.h5 and b/tools/testfiles/tnestedcmpddt.h5 differ -- cgit v0.12 From 4b29d11f7452334575bdd3b2199f356f238e72cf Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Jul 2012 10:16:14 -0500 Subject: [svn-r22552] update comment --- tools/h5dump/h5dumpgentest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index a9b5a62..fcbf8f1 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -262,7 +262,7 @@ typedef struct s1_t { #define STRATEGY H5F_FILE_SPACE_AGGR_VFD /* File space handling strategy */ #define THRESHOLD10 10 /* Free space section threshold */ -/* "FILE66" macros */ +/* "FILE66" macros and for FILE69 */ #define F66_XDIM 8 #define F66_DATASETU08 "DU08BITS" #define F66_DATASETS08 "DS08BITS" -- cgit v0.12 From d987b06112740a5994576ff0fb7949f01542fc43 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Jul 2012 15:12:31 -0500 Subject: [svn-r22556] HDFFV-7936: added error files in h5dump folder and adjusted scripts to compare error files. Tested: local linux with cmake, jam with make check --- MANIFEST | 34 +++ tools/h5dump/CMakeLists.txt | 336 +++++++++++++-------- tools/h5dump/errfiles/filter_fail.err | 21 ++ tools/h5dump/errfiles/tall-1.err | 25 ++ tools/h5dump/errfiles/tall-2A.err | 25 ++ tools/h5dump/errfiles/tall-2B.err | 25 ++ tools/h5dump/errfiles/tarray1_big.err | 67 ++++ tools/h5dump/errfiles/tattr-3.err | 8 + tools/h5dump/errfiles/tattrregR.err | 45 +++ tools/h5dump/errfiles/tcomp-3.err | 16 + tools/h5dump/errfiles/tdataregR.err | 45 +++ tools/h5dump/errfiles/tdset-2.err | 33 ++ tools/h5dump/errfiles/texceedsubblock.err | 1 + tools/h5dump/errfiles/texceedsubcount.err | 1 + tools/h5dump/errfiles/texceedsubstart.err | 1 + tools/h5dump/errfiles/texceedsubstride.err | 1 + tools/h5dump/errfiles/textlink.err | 50 +++ tools/h5dump/errfiles/textlinkfar.err | 243 +++++++++++++++ tools/h5dump/errfiles/textlinksrc.err | 243 +++++++++++++++ tools/h5dump/errfiles/tgroup-2.err | 20 ++ .../errfiles/tnofilename-with-packed-bits.err | 1 + tools/h5dump/errfiles/tpbitsCharLengthExceeded.err | 1 + tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err | 1 + tools/h5dump/errfiles/tpbitsIncomplete.err | 1 + tools/h5dump/errfiles/tpbitsIntLengthExceeded.err | 1 + tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err | 1 + tools/h5dump/errfiles/tpbitsLengthExceeded.err | 1 + tools/h5dump/errfiles/tpbitsLengthPositive.err | 1 + tools/h5dump/errfiles/tpbitsLongLengthExceeded.err | 1 + tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err | 1 + tools/h5dump/errfiles/tpbitsMaxExceeded.err | 1 + tools/h5dump/errfiles/tpbitsOffsetExceeded.err | 1 + tools/h5dump/errfiles/tpbitsOffsetNegative.err | 1 + tools/h5dump/errfiles/tperror.err | 33 ++ tools/h5dump/errfiles/tslink-D.err | 25 ++ tools/h5dump/testh5dump.sh.in | 136 +++++++-- tools/h5dump/testh5dumppbits.sh.in | 82 ++++- tools/testfiles/filter_fail.ddl | 21 -- tools/testfiles/tattr-3.ddl | 8 - tools/testfiles/tdset-2.ddl | 33 -- tools/testfiles/textlink.ddl | 50 --- tools/testfiles/tgroup-2.ddl | 1 - tools/testfiles/tperror.ddl | 33 -- tools/testfiles/tslink-D.ddl | 25 -- 44 files changed, 1370 insertions(+), 330 deletions(-) create mode 100644 tools/h5dump/errfiles/filter_fail.err create mode 100644 tools/h5dump/errfiles/tall-1.err create mode 100644 tools/h5dump/errfiles/tall-2A.err create mode 100644 tools/h5dump/errfiles/tall-2B.err create mode 100644 tools/h5dump/errfiles/tarray1_big.err create mode 100644 tools/h5dump/errfiles/tattr-3.err create mode 100644 tools/h5dump/errfiles/tattrregR.err create mode 100644 tools/h5dump/errfiles/tcomp-3.err create mode 100644 tools/h5dump/errfiles/tdataregR.err create mode 100644 tools/h5dump/errfiles/tdset-2.err create mode 100644 tools/h5dump/errfiles/texceedsubblock.err create mode 100644 tools/h5dump/errfiles/texceedsubcount.err create mode 100644 tools/h5dump/errfiles/texceedsubstart.err create mode 100644 tools/h5dump/errfiles/texceedsubstride.err create mode 100644 tools/h5dump/errfiles/textlink.err create mode 100644 tools/h5dump/errfiles/textlinkfar.err create mode 100644 tools/h5dump/errfiles/textlinksrc.err create mode 100644 tools/h5dump/errfiles/tgroup-2.err create mode 100644 tools/h5dump/errfiles/tnofilename-with-packed-bits.err create mode 100644 tools/h5dump/errfiles/tpbitsCharLengthExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsIncomplete.err create mode 100644 tools/h5dump/errfiles/tpbitsIntLengthExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsLengthExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsLengthPositive.err create mode 100644 tools/h5dump/errfiles/tpbitsLongLengthExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsMaxExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsOffsetExceeded.err create mode 100644 tools/h5dump/errfiles/tpbitsOffsetNegative.err create mode 100644 tools/h5dump/errfiles/tperror.err create mode 100644 tools/h5dump/errfiles/tslink-D.err diff --git a/MANIFEST b/MANIFEST index 22e6fae..a52d61e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1519,6 +1519,40 @@ ./tools/testfiles/thyperslab.h5 ./tools/testfiles/twidedisplay.ddl +# h5dump test error files +./tools/h5dump/errfiles/filter_fail.err +./tools/h5dump/errfiles/tall-1.err +./tools/h5dump/errfiles/tall-2A.err +./tools/h5dump/errfiles/tall-2B.err +./tools/h5dump/errfiles/tarray1_big.err +./tools/h5dump/errfiles/tattrregR.err +./tools/h5dump/errfiles/tcomp-3.err +./tools/h5dump/errfiles/tdataregR.err +./tools/h5dump/errfiles/tdset-2.err +./tools/h5dump/errfiles/texceedsubblock.err +./tools/h5dump/errfiles/texceedsubcount.err +./tools/h5dump/errfiles/texceedsubstart.err +./tools/h5dump/errfiles/texceedsubstride.err +./tools/h5dump/errfiles/textlink.err +./tools/h5dump/errfiles/textlinkfar.err +./tools/h5dump/errfiles/textlinksrc.err +./tools/h5dump/errfiles/tgroup-2.err +./tools/h5dump/errfiles/tnofilename-with-packed-bits.err +./tools/h5dump/errfiles/tpbitsCharLengthExceeded.err +./tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err +./tools/h5dump/errfiles/tpbitsIncomplete.err +./tools/h5dump/errfiles/tpbitsIntLengthExceeded.err +./tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err +./tools/h5dump/errfiles/tpbitsLengthExceeded.err +./tools/h5dump/errfiles/tpbitsLengthPositive.err +./tools/h5dump/errfiles/tpbitsLongLengthExceeded.err +./tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err +./tools/h5dump/errfiles/tpbitsMaxExceeded.err +./tools/h5dump/errfiles/tpbitsOffsetExceeded.err +./tools/h5dump/errfiles/tpbitsOffsetNegative.err +./tools/h5dump/errfiles/tperror.err +./tools/h5dump/errfiles/tslink-D.err + # h5dump packed bits validation ./tools/testfiles/tnofilename-with-packed-bits.ddl ./tools/testfiles/tpbitsLengthPositive.ddl diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 0da418d..75e2c08 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -181,71 +181,6 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import ) - SET (HDF5_XML_REFERENCE_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml - ) SET (HDF5_REFERENCE_TEST_FILES ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5 @@ -336,28 +271,26 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5 ) - SET (HDF5_XML_REFERENCE_TEST_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5 + SET (HDF5_ERROR_REFERENCE_TEST_FILES + ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err + ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err + ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err + ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err + ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err + ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err + ${PROJECT_SOURCE_DIR}/errfiles/textlink.err + ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err + ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err + ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err + ${PROJECT_SOURCE_DIR}/errfiles/tperror.err + ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err ) # make test dir @@ -390,9 +323,110 @@ IF (BUILD_TESTING) ) ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) + FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${tst_error_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${tst_error_file} ${dest} + ) + ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) + # # copy XML test files from source dir to test dir # + SET (HDF5_XML_REFERENCE_TEST_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5 + ) + SET (HDF5_XML_REFERENCE_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml + ) + FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME) SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") @@ -498,11 +532,26 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl ) + SET (HDF5_ERROR_REFERENCE_PBITS + ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err + ) FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}") - #MESSAGE (STATUS " Translating ${ddl_pbits}") + #MESSAGE (STATUS " Copying ${ddl_pbits}") ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD @@ -510,6 +559,18 @@ IF (BUILD_TESTING) ARGS -E copy_if_different ${ddl_pbits} ${ddldest} ) ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) + + FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) + GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) + SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${ddl_pbits}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${ddl_pbits} ${ddldest} + ) + ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) ############################################################################## ############################################################################## @@ -530,8 +591,9 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-clear-h5dump-${testname}-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/h5dump-${testname}.out ./testfiles/h5dump-${testname}.out.err + -E remove h5dump-${testname}.out h5dump-${testname}.out.err ) + SET_TESTS_PROPERTIES (H5DUMP-clear-h5dump-${testname}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") ADD_TEST ( NAME H5DUMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" @@ -576,8 +638,9 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-clear-${resultfile}-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err + -E remove ${resultfile}.out ${resultfile}.out.err ) + SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") ADD_TEST ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -621,8 +684,9 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-clear-${resultfile}-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err + -E remove ${resultfile}.out ${resultfile}.out.err ) + SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") ADD_TEST ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -639,6 +703,31 @@ IF (BUILD_TESTING) ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_MASK_TEST file) + MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-clear-${resultfile}-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_ERRREF=${resultfile}.err" + -D "TEST_MASK_ERROR=true" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5ERR_MASK_TEST file) + MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) IF (${testtype} STREQUAL "SKIP") IF (NOT HDF5_ENABLE_USING_MEMCHECKER) @@ -667,8 +756,9 @@ IF (BUILD_TESTING) ADD_TEST ( NAME H5DUMP-XML-clear-${resultfile}-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err + -E remove ${resultfile}.out ${resultfile}.out.err ) + SET_TESTS_PROPERTIES (H5DUMP-XML-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") ADD_TEST ( NAME H5DUMP-XML-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -696,7 +786,7 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ### ############################################################################## ############################################################################## @@ -966,6 +1056,7 @@ IF (BUILD_TESTING) tvms.out tvms.out.err ) + SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -975,7 +1066,7 @@ IF (BUILD_TESTING) ADD_HELP_TEST(help 0 -h) # test for maximum display datasets - ADD_H5_TEST (twidedisplay 0 -w0 --enable-error-stack packedbits.h5) + ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5) # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) @@ -988,21 +1079,19 @@ IF (BUILD_TESTING) # test for displaying groups ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5) # test for displaying the selected groups - # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5) - # cannot use TEST_MASK_ERROR and --enable-error-stack on this test because group names are similar to version numbers - ADD_H5_TEST (tgroup-2 1 --group=/g2 --group / -g /y tgroup.h5) + ADD_H5ERR_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5) # test for displaying simple space datasets ADD_H5_TEST (tdset-1 0 --enable-error-stack tdset.h5) # test for displaying selected datasets - ADD_H5_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5) + ADD_H5ERR_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5) # test for displaying attributes ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5) # test for displaying the selected attributes of string type and scalar space ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5) # test for header and error messages - ADD_H5_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) + ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) # test for displaying attributes in shared datatype (also in group and dataset) ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5) # test for displaying at least 9 attributes on root from a be machine @@ -1015,7 +1104,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5) ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5) # test for displaying dangling soft links - ADD_H5_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5) + ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5) # tests for hard links ADD_H5_TEST (thlink-1 0 --enable-error-stack thlink.h5) @@ -1029,8 +1118,7 @@ IF (BUILD_TESTING) # test for named data types ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5) # test for unamed type - # JIRA HDFFV-7936 ADD_H5_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") - ADD_H5_TEST (tcomp-3 0 "-t;/#6632;-g;/group2;tcompound.h5") + ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") # test complicated compound datatype ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5) @@ -1039,9 +1127,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5) # test for options - # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) - # cannot use TEST_MASK_ERROR and --enable-error-stack on this test because group/dataset names are similar to version numbers - ADD_H5_TEST (tall-1 0 tall.h5) + ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5) ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5) @@ -1068,8 +1154,7 @@ IF (BUILD_TESTING) # test for files with array data ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5) # # added for bug# 2092 - tarray1_big.h5 - # JIRA HDFFV-7936 ADD_H5_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5) - ADD_H5_TEST (tarray1_big 0 -R tarray1_big.h5) + ADD_H5ERR_MASK_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5) ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5) ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5) ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5) @@ -1098,13 +1183,10 @@ IF (BUILD_TESTING) ADD_H5_TEST (tlarge_objname 0 --enable-error-stack -w157 tlarge_objname.h5) # test '-A' to suppress data but print attr's - # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5) - # cannot use TEST_MASK_ERROR and --enable-error-stack on this test because group/dataset names are similar to version numbers - ADD_H5_TEST (tall-2A 0 -A tall.h5) + ADD_H5ERR_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5) # test '-r' to print attributes in ASCII instead of decimal - # JIRA HDFFV-7936 ADD_H5_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5) - ADD_H5_TEST (tall-2B 0 -A -r tall.h5) + ADD_H5ERR_MASK_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5) # test Subsetting ADD_H5_TEST (tall-4s 0 --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5) @@ -1125,7 +1207,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5) # test -p with a non existing dataset - ADD_H5_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5) + ADD_H5ERR_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5) # test for file contents ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) @@ -1326,19 +1408,17 @@ IF (BUILD_TESTING) out1.h5 out3.h5 ) + SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-clear-objects") ENDIF (NOT HDF5_NOCLEANUP) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-clear-objects") # test for dataset region references ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5) - # JIRA HDFFV-7936 ADD_H5_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5) - ADD_H5_TEST (tdataregR 0 -R tdatareg.h5) - ADD_H5_TEST (tattrreg 0 --enable-error-stack tattrreg.h5) - # JIRA HDFFV-7936 ADD_H5_TEST (tattrregR 0 --enable-error-stack -R tattrreg.h5) - ADD_H5_TEST (tattrregR 0 -R tattrreg.h5) + ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5) + ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5) ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o) # tests for group creation order @@ -1359,16 +1439,14 @@ IF (BUILD_TESTING) ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5) # tests for traversal of external links - # JIRA HDFFV-7936 ADD_H5_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5) - ADD_H5_TEST (textlinksrc 0 textlinksrc.h5) - # JIRA HDFFV-7936 ADD_H5_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5) - ADD_H5_TEST (textlinkfar 0 textlinkfar.h5) + ADD_H5ERR_MASK_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5) + ADD_H5ERR_MASK_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5) # test for dangling external links - ADD_H5_MASK_TEST (textlink 0 --enable-error-stack textlink.h5) + ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5) # test for error stack display (BZ2048) - ADD_H5_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5) + ADD_H5ERR_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5) # test for -o -y for dataset with attributes ADD_H5_TEST (tall-6 0 --enable-error-stack -y -o data -d /g1/g1.1/dset1.1.1 tall.h5) @@ -1487,6 +1565,7 @@ IF (BUILD_TESTING) tpbitsUnsignedLongLong16.out tpbitsUnsignedLongLong16.out.err ) + SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -1707,6 +1786,7 @@ IF (BUILD_TESTING) tvlstr.h5.out tvlstr.h5.out.err ) + SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") diff --git a/tools/h5dump/errfiles/filter_fail.err b/tools/h5dump/errfiles/filter_fail.err new file mode 100644 index 0000000..8f0f990 --- /dev/null +++ b/tools/h5dump/errfiles/filter_fail.err @@ -0,0 +1,21 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Dread(): can't read data + major: Dataset + minor: Read failed + #001: (file name) line (number) in H5D__read(): can't read data + major: Dataset + minor: Read failed + #002: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk + major: Low-level I/O + minor: Read failed + #003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed + major: Data filters + minor: Filter operation failed + #004: (file name) line (number) in H5Z_pipeline(): required filter 'filter_fail_test' is not registered + major: Data filters + minor: Read failed +h5dump error: unable to print data +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5tools_dump_simple_dset(): H5Dread failed + major: Failure in tools library + minor: error in function diff --git a/tools/h5dump/errfiles/tall-1.err b/tools/h5dump/errfiles/tall-1.err new file mode 100644 index 0000000..ba691d0 --- /dev/null +++ b/tools/h5dump/errfiles/tall-1.err @@ -0,0 +1,25 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + major: Links + minor: Unable to open file diff --git a/tools/h5dump/errfiles/tall-2A.err b/tools/h5dump/errfiles/tall-2A.err new file mode 100644 index 0000000..ba691d0 --- /dev/null +++ b/tools/h5dump/errfiles/tall-2A.err @@ -0,0 +1,25 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + major: Links + minor: Unable to open file diff --git a/tools/h5dump/errfiles/tall-2B.err b/tools/h5dump/errfiles/tall-2B.err new file mode 100644 index 0000000..ba691d0 --- /dev/null +++ b/tools/h5dump/errfiles/tall-2B.err @@ -0,0 +1,25 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + major: Links + minor: Unable to open file diff --git a/tools/h5dump/errfiles/tarray1_big.err b/tools/h5dump/errfiles/tarray1_big.err new file mode 100644 index 0000000..457afdd --- /dev/null +++ b/tools/h5dump/errfiles/tarray1_big.err @@ -0,0 +1,67 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function + #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function + #002: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function diff --git a/tools/h5dump/errfiles/tattr-3.err b/tools/h5dump/errfiles/tattr-3.err new file mode 100644 index 0000000..ce8ddda --- /dev/null +++ b/tools/h5dump/errfiles/tattr-3.err @@ -0,0 +1,8 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Aopen(): unable to load attribute info from object header for attribute: 'attr' + major: Attribute + minor: Unable to initialize object + #001: (file name) line (number) in H5O_attr_open_by_name(): can't locate attribute: 'attr' + major: Attribute + minor: Object not found +h5dump error: unable to open attribute "attr" diff --git a/tools/h5dump/errfiles/tattrregR.err b/tools/h5dump/errfiles/tattrregR.err new file mode 100644 index 0000000..7ab9afd --- /dev/null +++ b/tools/h5dump/errfiles/tattrregR.err @@ -0,0 +1,45 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function + #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function diff --git a/tools/h5dump/errfiles/tcomp-3.err b/tools/h5dump/errfiles/tcomp-3.err new file mode 100644 index 0000000..ee47ee5 --- /dev/null +++ b/tools/h5dump/errfiles/tcomp-3.err @@ -0,0 +1,16 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Topen2(): not found + major: Datatype + minor: Object not found + #001: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5G_loc_find_cb(): object '#6632' doesn't exist + major: Symbol table + minor: Object not found diff --git a/tools/h5dump/errfiles/tdataregR.err b/tools/h5dump/errfiles/tdataregR.err new file mode 100644 index 0000000..7ab9afd --- /dev/null +++ b/tools/h5dump/errfiles/tdataregR.err @@ -0,0 +1,45 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Rdereference2(): unable to dereference object + major: References + minor: Unable to initialize object + #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information + major: References + minor: Read failed + #002: (file name) line (number) in H5HG_read(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #003: (file name) line (number) in H5HG_protect(): unable to protect global heap + major: Heap + minor: Unable to protect metadata + #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed. + major: Object cache + minor: Unable to protect metadata + #005: (file name) line (number) in H5C_protect(): incorrect cache entry type + major: Object cache + minor: Inappropriate type +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function + #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed + major: Failure in tools library + minor: error in function diff --git a/tools/h5dump/errfiles/tdset-2.err b/tools/h5dump/errfiles/tdset-2.err new file mode 100644 index 0000000..d9b92f3 --- /dev/null +++ b/tools/h5dump/errfiles/tdset-2.err @@ -0,0 +1,33 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Dopen2(): not found + major: Dataset + minor: Object not found + #001: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist + major: Symbol table + minor: Object not found +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Lget_info(): unable to get link info + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5L_get_info(): name doesn't exist + major: Symbol table + minor: Object already exists + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist + major: Symbol table + minor: Object not found +h5dump error: unable to get link info from "dset3" diff --git a/tools/h5dump/errfiles/texceedsubblock.err b/tools/h5dump/errfiles/texceedsubblock.err new file mode 100644 index 0000000..4c87ab9 --- /dev/null +++ b/tools/h5dump/errfiles/texceedsubblock.err @@ -0,0 +1 @@ +h5dump error: number of block dims (2) exceed dataset dims (1) diff --git a/tools/h5dump/errfiles/texceedsubcount.err b/tools/h5dump/errfiles/texceedsubcount.err new file mode 100644 index 0000000..de1c9d1 --- /dev/null +++ b/tools/h5dump/errfiles/texceedsubcount.err @@ -0,0 +1 @@ +h5dump error: number of count dims (2) exceed dataset dims (1) diff --git a/tools/h5dump/errfiles/texceedsubstart.err b/tools/h5dump/errfiles/texceedsubstart.err new file mode 100644 index 0000000..4555224 --- /dev/null +++ b/tools/h5dump/errfiles/texceedsubstart.err @@ -0,0 +1 @@ +h5dump error: number of start dims (2) exceed dataset dims (1) diff --git a/tools/h5dump/errfiles/texceedsubstride.err b/tools/h5dump/errfiles/texceedsubstride.err new file mode 100644 index 0000000..32d5725 --- /dev/null +++ b/tools/h5dump/errfiles/texceedsubstride.err @@ -0,0 +1 @@ +h5dump error: number of stride dims (2) exceed dataset dims (1) diff --git a/tools/h5dump/errfiles/textlink.err b/tools/h5dump/errfiles/textlink.err new file mode 100644 index 0000000..03c0550 --- /dev/null +++ b/tools/h5dump/errfiles/textlink.err @@ -0,0 +1,50 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'filename', temp_file_name = 'filename' + major: Links + minor: Unable to open file +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'anotherfile', temp_file_name = 'anotherfile' + major: Links + minor: Unable to open file diff --git a/tools/h5dump/errfiles/textlinkfar.err b/tools/h5dump/errfiles/textlinkfar.err new file mode 100644 index 0000000..969e17c --- /dev/null +++ b/tools/h5dump/errfiles/textlinkfar.err @@ -0,0 +1,243 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #008: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #009: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #010: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #011: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #012: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed + major: Links + minor: Link traversal failure + #013: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link + major: Symbol table + minor: Object not found + #014: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #015: (file name) line (number) in H5G_traverse_slink_cb(): component not found + major: Symbol table + minor: Object not found +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #005: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #006: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #007: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #008: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #012: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #013: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #014: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #015: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #019: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #020: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #021: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #022: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #026: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #027: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #028: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #029: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #031: (file name) line (number) in H5G__traverse_special(): too many links + major: Links + minor: Too many soft links in path +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #005: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #006: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #007: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #008: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #012: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #013: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #014: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #015: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #019: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #020: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #021: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #022: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #026: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #027: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #028: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #029: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #031: (file name) line (number) in H5G__traverse_special(): too many links + major: Links + minor: Too many soft links in path diff --git a/tools/h5dump/errfiles/textlinksrc.err b/tools/h5dump/errfiles/textlinksrc.err new file mode 100644 index 0000000..969e17c --- /dev/null +++ b/tools/h5dump/errfiles/textlinksrc.err @@ -0,0 +1,243 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #008: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #009: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #010: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #011: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #012: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed + major: Links + minor: Link traversal failure + #013: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link + major: Symbol table + minor: Object not found + #014: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #015: (file name) line (number) in H5G_traverse_slink_cb(): component not found + major: Symbol table + minor: Object not found +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #005: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #006: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #007: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #008: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #012: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #013: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #014: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #015: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #019: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #020: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #021: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #022: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #026: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #027: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #028: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #029: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #031: (file name) line (number) in H5G__traverse_special(): too many links + major: Links + minor: Too many soft links in path +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #005: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #006: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #007: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #008: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #012: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #013: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #014: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #015: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #019: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #020: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #021: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #022: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #026: (file name) line (number) in H5L_extern_traverse(): unable to open object + major: Symbol table + minor: Can't open object + #027: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #028: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #029: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #031: (file name) line (number) in H5G__traverse_special(): too many links + major: Links + minor: Too many soft links in path diff --git a/tools/h5dump/errfiles/tgroup-2.err b/tools/h5dump/errfiles/tgroup-2.err new file mode 100644 index 0000000..3659b5c --- /dev/null +++ b/tools/h5dump/errfiles/tgroup-2.err @@ -0,0 +1,20 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Gopen2(): unable to open group + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5G__open_name(): group not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #005: (file name) line (number) in H5G_loc_find_cb(): object 'y' doesn't exist + major: Symbol table + minor: Object not found +h5dump error: unable to open group "/y" diff --git a/tools/h5dump/errfiles/tnofilename-with-packed-bits.err b/tools/h5dump/errfiles/tnofilename-with-packed-bits.err new file mode 100644 index 0000000..84a7011 --- /dev/null +++ b/tools/h5dump/errfiles/tnofilename-with-packed-bits.err @@ -0,0 +1 @@ +h5dump error: missing file name diff --git a/tools/h5dump/errfiles/tpbitsCharLengthExceeded.err b/tools/h5dump/errfiles/tpbitsCharLengthExceeded.err new file mode 100644 index 0000000..e5854ea --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsCharLengthExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(9) too large. Max is 8 diff --git a/tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err new file mode 100644 index 0000000..e5854ea --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(9) too large. Max is 8 diff --git a/tools/h5dump/errfiles/tpbitsIncomplete.err b/tools/h5dump/errfiles/tpbitsIncomplete.err new file mode 100644 index 0000000..e0abee5 --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsIncomplete.err @@ -0,0 +1 @@ +h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/h5dump/errfiles/tpbitsIntLengthExceeded.err b/tools/h5dump/errfiles/tpbitsIntLengthExceeded.err new file mode 100644 index 0000000..7dd88ed --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsIntLengthExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(17) too large. Max is 16 diff --git a/tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err new file mode 100644 index 0000000..7dd88ed --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(17) too large. Max is 16 diff --git a/tools/h5dump/errfiles/tpbitsLengthExceeded.err b/tools/h5dump/errfiles/tpbitsLengthExceeded.err new file mode 100644 index 0000000..d4673f2 --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsLengthExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/h5dump/errfiles/tpbitsLengthPositive.err b/tools/h5dump/errfiles/tpbitsLengthPositive.err new file mode 100644 index 0000000..4928007 --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsLengthPositive.err @@ -0,0 +1 @@ +h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/h5dump/errfiles/tpbitsLongLengthExceeded.err b/tools/h5dump/errfiles/tpbitsLongLengthExceeded.err new file mode 100644 index 0000000..0318f79 --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsLongLengthExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(33) too large. Max is 32 diff --git a/tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err new file mode 100644 index 0000000..0318f79 --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset+length value(33) too large. Max is 32 diff --git a/tools/h5dump/errfiles/tpbitsMaxExceeded.err b/tools/h5dump/errfiles/tpbitsMaxExceeded.err new file mode 100644 index 0000000..a8d12fc --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsMaxExceeded.err @@ -0,0 +1 @@ +h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/h5dump/errfiles/tpbitsOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsOffsetExceeded.err new file mode 100644 index 0000000..b7d6dad --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsOffsetExceeded.err @@ -0,0 +1 @@ +h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/h5dump/errfiles/tpbitsOffsetNegative.err b/tools/h5dump/errfiles/tpbitsOffsetNegative.err new file mode 100644 index 0000000..8a027c1 --- /dev/null +++ b/tools/h5dump/errfiles/tpbitsOffsetNegative.err @@ -0,0 +1 @@ +h5dump error: Bad mask list(-1,1) diff --git a/tools/h5dump/errfiles/tperror.err b/tools/h5dump/errfiles/tperror.err new file mode 100644 index 0000000..19a7a73 --- /dev/null +++ b/tools/h5dump/errfiles/tperror.err @@ -0,0 +1,33 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Dopen2(): not found + major: Dataset + minor: Object not found + #001: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist + major: Symbol table + minor: Object not found +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Lget_info(): unable to get link info + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5L_get_info(): name doesn't exist + major: Symbol table + minor: Object already exists + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist + major: Symbol table + minor: Object not found +h5dump error: unable to get link info from "bogus" diff --git a/tools/h5dump/errfiles/tslink-D.err b/tools/h5dump/errfiles/tslink-D.err new file mode 100644 index 0000000..b98e324 --- /dev/null +++ b/tools/h5dump/errfiles/tslink-D.err @@ -0,0 +1,25 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Dopen2(): not found + major: Dataset + minor: Object not found + #001: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #004: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link + major: Symbol table + minor: Object not found + #006: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #007: (file name) line (number) in H5G_traverse_slink_cb(): component not found + major: Symbol table + minor: Object not found diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 8d99458..dbecb3b 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -55,6 +55,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" # testfiles source dirs for tools SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES" SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_ERRORFILES="$srcdir/errfiles" SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles" SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles" SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" @@ -306,10 +307,32 @@ $SRC_H5DUMP_TESTFILES/out3.h5import $SRC_H5DUMP_TESTFILES/tbinregR.exp " +LIST_ERROR_TEST_FILES=" +${SRC_H5DUMP_ERRORFILES}/filter_fail.err +${SRC_H5DUMP_ERRORFILES}/tall-1.err +${SRC_H5DUMP_ERRORFILES}/tall-2A.err +${SRC_H5DUMP_ERRORFILES}/tall-2B.err +${SRC_H5DUMP_ERRORFILES}/tarray1_big.err +${SRC_H5DUMP_ERRORFILES}/tattrregR.err +${SRC_H5DUMP_ERRORFILES}/tcomp-3.err +${SRC_H5DUMP_ERRORFILES}/tdataregR.err +${SRC_H5DUMP_ERRORFILES}/tdset-2.err +${SRC_H5DUMP_ERRORFILES}/texceedsubblock.err +${SRC_H5DUMP_ERRORFILES}/texceedsubcount.err +${SRC_H5DUMP_ERRORFILES}/texceedsubstart.err +${SRC_H5DUMP_ERRORFILES}/texceedsubstride.err +${SRC_H5DUMP_ERRORFILES}/textlink.err +${SRC_H5DUMP_ERRORFILES}/textlinkfar.err +${SRC_H5DUMP_ERRORFILES}/textlinksrc.err +${SRC_H5DUMP_ERRORFILES}/tgroup-2.err +${SRC_H5DUMP_ERRORFILES}/tperror.err +${SRC_H5DUMP_ERRORFILES}/tslink-D.err +" + # # copy test files and expected output files from source dirs to test dir # -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML" +COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES" COPY_TESTFILES_TO_TESTDIR() { @@ -500,6 +523,69 @@ TOOLTEST3() { } +# same as TOOLTEST3 but filters error stack output and compares to an error file +# Extract file name, line number, version and thread IDs because they may be different +TOOLTEST4() { + + expect="$TESTDIR/$1" + expect_err="$TESTDIR/`basename $1 .ddl`.err" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.oerr" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + #cat $actual_ext >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + if $CMP $expect_err $actual_ext; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi + +} + # Print a "SKIP" message SKIP() { TESTING $DUMPER $@ @@ -578,7 +664,7 @@ COPY_TESTFILES_TO_TESTDIR #TOOLTEST h5dump-help.txt -h # test for maximum display datasets -TOOLTEST twidedisplay.ddl -w0 --enable-error-stack packedbits.h5 +TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5 # test for signed/unsigned datasets TOOLTEST packedbits.ddl --enable-error-stack packedbits.h5 @@ -591,19 +677,19 @@ TOOLTEST tcmpdattrintsize.ddl --enable-error-stack tcmpdattrintsize.h5 # test for displaying groups TOOLTEST tgroup-1.ddl --enable-error-stack tgroup.h5 # test for displaying the selected groups -TOOLTEST tgroup-2.ddl --group=/g2 --group / -g /y tgroup.h5 +TOOLTEST4 tgroup-2.ddl --enable-error-stack --group=/g2 --group / -g /y tgroup.h5 # test for displaying simple space datasets TOOLTEST tdset-1.ddl --enable-error-stack tdset.h5 # test for displaying selected datasets -TOOLTEST3 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5 +TOOLTEST4 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5 # test for displaying attributes TOOLTEST tattr-1.ddl --enable-error-stack tattr.h5 # test for displaying the selected attributes of string type and scalar space TOOLTEST tattr-2.ddl --enable-error-stack -a "/\/attr1" --attribute /attr4 --attribute=/attr5 tattr.h5 # test for header and error messages -TOOLTEST3 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5 +TOOLTEST4 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5 # test for displaying at least 9 attributes on root from a BE machine TOOLTEST tattr-4_be.ddl --enable-error-stack tattr4_be.h5 # test for displaying attributes in shared datatype (also in group and dataset) @@ -616,7 +702,7 @@ TOOLTEST tudlink-1.ddl --enable-error-stack tudlink.h5 TOOLTEST tslink-2.ddl --enable-error-stack -l slink2 tslink.h5 TOOLTEST tudlink-2.ddl --enable-error-stack -l udlink2 tudlink.h5 # test for displaying dangling soft links -TOOLTEST3 tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5 +TOOLTEST4 tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5 # tests for hard links TOOLTEST thlink-1.ddl --enable-error-stack thlink.h5 @@ -630,8 +716,7 @@ TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5 # test for named data types TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5 # test for unamed type -# JIRA HDFFV-7936 TOOLTEST tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 -TOOLTEST tcomp-3.ddl -t /#6632 -g /group2 tcompound.h5 +TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 # test complicated compound datatype TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5 @@ -640,8 +725,7 @@ TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5 TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5 # test for options -# JIRA HDFFV-7936 TOOLTEST tall-1.ddl --enable-error-stack tall.h5 -TOOLTEST tall-1.ddl tall.h5 +TOOLTEST4 tall-1.ddl --enable-error-stack tall.h5 TOOLTEST tall-2.ddl --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5 TOOLTEST tall-3.ddl --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5 @@ -668,8 +752,7 @@ TOOLTEST tvlstr.ddl --enable-error-stack tvlstr.h5 # test for files with array data TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5 # # added for bug# 2092 - tarray1_big.h -# JIRA HDFFV-7936 TOOLTEST tarray1_big.ddl --enable-error-stack -R tarray1_big.h5 -TOOLTEST tarray1_big.ddl -R tarray1_big.h5 +TOOLTEST4 tarray1_big.ddl --enable-error-stack -R tarray1_big.h5 TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5 TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5 TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5 @@ -680,7 +763,7 @@ TOOLTEST tarray8.ddl --enable-error-stack tarray8.h5 # test for wildcards in filename (does not work with cmake) # inconsistent across platforms TOOLTEST3 tstarfile.ddl --enable-error-stack -H -d Dataset1 tarr*.h5 -TOOLTEST3 tqmarkfile.ddl --enable-error-stack -H -d Dataset1 tarray?.h5 +TOOLTEST4 tqmarkfile.ddl --enable-error-stack -H -d Dataset1 tarray?.h5 TOOLTEST tmultifile.ddl --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5 # test for files with empty data @@ -698,18 +781,16 @@ TOOLTEST tmulti.ddl --enable-error-stack --filedriver=multi tmulti TOOLTEST tlarge_objname.ddl --enable-error-stack -w157 tlarge_objname.h5 # test '-A' to suppress data but print attr's -# JIRA HDFFV-7936 TOOLTEST tall-2A.ddl --enable-error-stack -A tall.h5 -TOOLTEST tall-2A.ddl -A tall.h5 +TOOLTEST4 tall-2A.ddl --enable-error-stack -A tall.h5 # test '-r' to print attributes in ASCII instead of decimal -# JIRA HDFFV-7936 TOOLTEST tall-2B.ddl --enable-error-stack -A -r tall.h5 -TOOLTEST tall-2B.ddl -A -r tall.h5 +TOOLTEST4 tall-2B.ddl --enable-error-stack -A -r tall.h5 # test Subsetting TOOLTEST tall-4s.ddl --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5 TOOLTEST tall-5s.ddl --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5 TOOLTEST tdset-3s.ddl --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5 -TOOLTEST tno-subset.ddl --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5 +TOOLTEST tno-subset.ddl --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5 # test printing characters in ASCII instead of decimal TOOLTEST tchar1.ddl --enable-error-stack -r tchar.h5 @@ -725,7 +806,7 @@ TOOLTEST tboot2.ddl --enable-error-stack -B tfcontents2.h5 TOOLTEST file_space.ddl --enable-error-stack -B file_space.h5 # test -p with a non existing dataset -TOOLTEST3 tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5 +TOOLTEST4 tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5 # test for file contents TOOLTEST tcontents.ddl --enable-error-stack -n tfcontents1.h5 @@ -881,11 +962,9 @@ fi # test for dataset region references TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5 -# JIRA HDFFV-7936 TOOLTEST tdataregR.ddl --enable-error-stack -R tdatareg.h5 -TOOLTEST tdataregR.ddl -R tdatareg.h5 +TOOLTEST4 tdataregR.ddl --enable-error-stack -R tdatareg.h5 TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5 -# JIRA HDFFV-7936 TOOLTEST tattrregR.ddl --enable-error-stack -R tattrreg.h5 -TOOLTEST tattrregR.ddl -R tattrreg.h5 +TOOLTEST4 tattrregR.ddl --enable-error-stack -R tattrreg.h5 TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5 @@ -912,17 +991,14 @@ TOOLTEST torderattr4.ddl --enable-error-stack -H --sort_by=creation_order --sort TOOLTEST tfpformat.ddl --enable-error-stack -m %.7f tfpformat.h5 # tests for traversal of external links -# JIRA HDFFV-7936 TOOLTEST textlinksrc.ddl --enable-error-stack textlinksrc.h5 -TOOLTEST textlinksrc.ddl textlinksrc.h5 -# JIRA HDFFV-7936 TOOLTEST textlinkfar.ddl --enable-error-stack textlinkfar.h5 -TOOLTEST textlinkfar.ddl textlinkfar.h5 +TOOLTEST4 textlinksrc.ddl --enable-error-stack textlinksrc.h5 +TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5 # test for dangling external links -# JIRA HDFFV-7936 TOOLTEST textlink.ddl --enable-error-stack textlink.h5 -TOOLTEST3 textlink.ddl --enable-error-stack textlink.h5 +TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5 # test for error stack display (BZ2048) -TOOLTEST3 filter_fail.ddl --enable-error-stack filter_fail.h5 +TOOLTEST4 filter_fail.ddl --enable-error-stack filter_fail.h5 # test for -o -y for dataset with attributes TOOLTEST tall-6.ddl --enable-error-stack -y -o data -d /g1/g1.1/dset1.1.1 tall.h5 diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in index 393fcc1..991fe7a 100644 --- a/tools/h5dump/testh5dumppbits.sh.in +++ b/tools/h5dump/testh5dumppbits.sh.in @@ -55,6 +55,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" # testfiles source dirs for tools SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES" SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_ERRORFILES="$srcdir/errfiles" SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles" SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles" SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" @@ -134,10 +135,26 @@ $SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong16.ddl $SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong16.ddl " +LIST_ERROR_TEST_FILES=" +${SRC_H5DUMP_ERRORFILES}/tnofilename-with-packed-bits.err +${SRC_H5DUMP_ERRORFILES}/tpbitsCharLengthExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsCharOffsetExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsIncomplete.err +${SRC_H5DUMP_ERRORFILES}/tpbitsIntLengthExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsIntOffsetExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsLengthExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsLengthPositive.err +${SRC_H5DUMP_ERRORFILES}/tpbitsLongLengthExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsLongOffsetExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsMaxExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsOffsetExceeded.err +${SRC_H5DUMP_ERRORFILES}/tpbitsOffsetNegative.err +" + # # copy test files and expected output files from source dirs to test dir # -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML" +COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES" COPY_TESTFILES_TO_TESTDIR() { @@ -328,6 +345,69 @@ TOOLTEST3() { } +# same as TOOLTEST3 but filters error stack output and compares to an error file +# Extract file name, line number, version and thread IDs because they may be different +TOOLTEST4() { + + expect="$TESTDIR/$1" + expect_err="$TESTDIR/`basename $1 .ddl`.err" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.oerr" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + #cat $actual_ext >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + if $CMP $expect_err $actual_ext; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi + +} + # Print a "SKIP" message SKIP() { TESTING $DUMPER $@ diff --git a/tools/testfiles/filter_fail.ddl b/tools/testfiles/filter_fail.ddl index 1fc0506..3a456f5 100644 --- a/tools/testfiles/filter_fail.ddl +++ b/tools/testfiles/filter_fail.ddl @@ -8,24 +8,3 @@ GROUP "/" { } } } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dread(): can't read data - major: Dataset - minor: Read failed - #001: (file name) line (number) in H5D__read(): can't read data - major: Dataset - minor: Read failed - #002: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk - major: Low-level I/O - minor: Read failed - #003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed - major: Data filters - minor: Filter operation failed - #004: (file name) line (number) in H5Z_pipeline(): required filter 'filter_fail_test' is not registered - major: Data filters - minor: Read failed -h5dump error: unable to print data -H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5tools_dump_simple_dset(): H5Dread failed - major: Failure in tools library - minor: error in function diff --git a/tools/testfiles/tattr-3.ddl b/tools/testfiles/tattr-3.ddl index a19f69a..943dc0d 100644 --- a/tools/testfiles/tattr-3.ddl +++ b/tools/testfiles/tattr-3.ddl @@ -6,11 +6,3 @@ ATTRIBUTE "attr2" { ATTRIBUTE "attr" { } } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Aopen(): unable to load attribute info from object header for attribute: 'attr' - major: Attribute - minor: Unable to initialize object - #001: (file name) line (number) in H5O_attr_open_by_name(): can't locate attribute: 'attr' - major: Attribute - minor: Object not found -h5dump error: unable to open attribute "attr" diff --git a/tools/testfiles/tdset-2.ddl b/tools/testfiles/tdset-2.ddl index 2034a43..dfda95e 100644 --- a/tools/testfiles/tdset-2.ddl +++ b/tools/testfiles/tdset-2.ddl @@ -8,36 +8,3 @@ DATASET "/dset2" { DATASPACE SIMPLE { ( 30, 20 ) / ( 30, 20 ) } } } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found - major: Dataset - minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object - major: Symbol table - minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #004: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist - major: Symbol table - minor: Object not found -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Lget_info(): unable to get link info - major: Symbol table - minor: Object not found - #001: (file name) line (number) in H5L_get_info(): name doesn't exist - major: Symbol table - minor: Object already exists - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist - major: Symbol table - minor: Object not found -h5dump error: unable to get link info from "dset3" diff --git a/tools/testfiles/textlink.ddl b/tools/testfiles/textlink.ddl index 4718adb..5459b30 100644 --- a/tools/testfiles/textlink.ddl +++ b/tools/testfiles/textlink.ddl @@ -10,53 +10,3 @@ GROUP "/" { } } } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Oopen(): unable to open object - major: Symbol table - minor: Can't open object - #001: (file name) line (number) in H5O_open_name(): object not found - major: Symbol table - minor: Object not found - #002: (file name) line (number) in H5G_loc_find(): can't find object - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed - major: Links - minor: Link traversal failure - #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed - major: Links - minor: Link traversal failure - #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID - major: Symbol table - minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'filename', temp_file_name = 'filename' - major: Links - minor: Unable to open file -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Oopen(): unable to open object - major: Symbol table - minor: Can't open object - #001: (file name) line (number) in H5O_open_name(): object not found - major: Symbol table - minor: Object not found - #002: (file name) line (number) in H5G_loc_find(): can't find object - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed - major: Links - minor: Link traversal failure - #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed - major: Links - minor: Link traversal failure - #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID - major: Symbol table - minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'anotherfile', temp_file_name = 'anotherfile' - major: Links - minor: Unable to open file diff --git a/tools/testfiles/tgroup-2.ddl b/tools/testfiles/tgroup-2.ddl index c4af7bb..2ac8ac6 100644 --- a/tools/testfiles/tgroup-2.ddl +++ b/tools/testfiles/tgroup-2.ddl @@ -40,4 +40,3 @@ GROUP "/" { GROUP "/y" { } } -h5dump error: unable to open group "/y" diff --git a/tools/testfiles/tperror.ddl b/tools/testfiles/tperror.ddl index 16a7d8e..0cb961c 100644 --- a/tools/testfiles/tperror.ddl +++ b/tools/testfiles/tperror.ddl @@ -1,35 +1,2 @@ HDF5 "tfcontents1.h5" { } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found - major: Dataset - minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object - major: Symbol table - minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #004: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist - major: Symbol table - minor: Object not found -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Lget_info(): unable to get link info - major: Symbol table - minor: Object not found - #001: (file name) line (number) in H5L_get_info(): name doesn't exist - major: Symbol table - minor: Object already exists - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist - major: Symbol table - minor: Object not found -h5dump error: unable to get link info from "bogus" diff --git a/tools/testfiles/tslink-D.ddl b/tools/testfiles/tslink-D.ddl index a1d999a..9d90262 100644 --- a/tools/testfiles/tslink-D.ddl +++ b/tools/testfiles/tslink-D.ddl @@ -3,28 +3,3 @@ SOFTLINK "/slink1" { LINKTARGET "somevalue" } } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found - major: Dataset - minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object - major: Symbol table - minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): special link traversal failed - major: Links - minor: Link traversal failure - #004: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed - major: Links - minor: Link traversal failure - #005: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link - major: Symbol table - minor: Object not found - #006: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #007: (file name) line (number) in H5G_traverse_slink_cb(): component not found - major: Symbol table - minor: Object not found -- cgit v0.12 From 7bed6ec213a78e60ec9c98d71b10037199e19a45 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Jul 2012 15:46:12 -0500 Subject: [svn-r22557] Add missing test file --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index a52d61e..402e1c2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1525,6 +1525,7 @@ ./tools/h5dump/errfiles/tall-2A.err ./tools/h5dump/errfiles/tall-2B.err ./tools/h5dump/errfiles/tarray1_big.err +./tools/h5dump/errfiles/tattr-3.err ./tools/h5dump/errfiles/tattrregR.err ./tools/h5dump/errfiles/tcomp-3.err ./tools/h5dump/errfiles/tdataregR.err -- cgit v0.12 From f1850c6156f8e12793d1f2f0fe1050a037aa2964 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 08:32:47 -0500 Subject: [svn-r22560] Changes to allow tests to compare error files! --- config/cmake/runTest.cmake | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 139819f..40a72f1 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -24,7 +24,9 @@ IF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE) MESSAGE (FATAL_ERROR "Require TEST_REFERENCE to be defined") ENDIF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE) -SET (ERROR_APPEND 1) +IF (NOT TEST_ERRREF) + SET (ERROR_APPEND 1) +ENDIF (NOT TEST_ERRREF) MESSAGE (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") @@ -74,7 +76,11 @@ IF (TEST_MASK_MOD) ENDIF (TEST_MASK_MOD) IF (TEST_MASK_ERROR) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + IF (NOT TEST_ERRREF) + FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + ELSE (NOT TEST_ERRREF) + FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + ENDIF (NOT TEST_ERRREF) STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") @@ -82,7 +88,11 @@ IF (TEST_MASK_ERROR) STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + IF (NOT TEST_ERRREF) + FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + ELSE (NOT TEST_ERRREF) + FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + ENDIF (NOT TEST_ERRREF) ENDIF (TEST_MASK_ERROR) IF (TEST_FILTER) @@ -109,6 +119,21 @@ IF (NOT TEST_SKIP_COMPARE) IF (NOT ${TEST_RESULT} STREQUAL 0) MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not match ${TEST_REFERENCE}") ENDIF (NOT ${TEST_RESULT} STREQUAL 0) + + IF (TEST_ERRREF) + # now compare the error output with the error reference + EXECUTE_PROCESS ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} + RESULT_VARIABLE TEST_RESULT + ) + + MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}") + + # again, if return value is !=0 scream and shout + IF (NOT ${TEST_RESULT} STREQUAL 0) + MESSAGE (FATAL_ERROR "Failed: The error output of ${TEST_PROGRAM} did not match ${TEST_ERRREF}") + ENDIF (NOT ${TEST_RESULT} STREQUAL 0) + ENDIF (TEST_ERRREF) ENDIF (NOT TEST_SKIP_COMPARE) # everything went fine... -- cgit v0.12 From fa28c69b555fd9b59bf757d3f5bf67bf4b5a0c9f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 08:52:31 -0500 Subject: [svn-r22561] Add errfile to list. Create missing errfile, edit ddl file for test only on linux (not using cmake). --- MANIFEST | 1 + tools/h5dump/errfiles/tqmarkfile.err | 33 +++++++++++++++++++++++++++++++++ tools/h5dump/testh5dump.sh.in | 2 ++ tools/testfiles/tqmarkfile.ddl | 33 --------------------------------- 4 files changed, 36 insertions(+), 33 deletions(-) create mode 100644 tools/h5dump/errfiles/tqmarkfile.err diff --git a/MANIFEST b/MANIFEST index 402e1c2..50b9a74 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1552,6 +1552,7 @@ ./tools/h5dump/errfiles/tpbitsOffsetExceeded.err ./tools/h5dump/errfiles/tpbitsOffsetNegative.err ./tools/h5dump/errfiles/tperror.err +./tools/h5dump/errfiles/tqmarkfile.err ./tools/h5dump/errfiles/tslink-D.err # h5dump packed bits validation diff --git a/tools/h5dump/errfiles/tqmarkfile.err b/tools/h5dump/errfiles/tqmarkfile.err new file mode 100644 index 0000000..06519fb --- /dev/null +++ b/tools/h5dump/errfiles/tqmarkfile.err @@ -0,0 +1,33 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Dopen2(): not found + major: Dataset + minor: Object not found + #001: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5G_loc_find_cb(): object 'Dataset1' doesn't exist + major: Symbol table + minor: Object not found +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Lget_info(): unable to get link info + major: Symbol table + minor: Object not found + #001: (file name) line (number) in H5L_get_info(): name doesn't exist + major: Symbol table + minor: Object already exists + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + major: Symbol table + minor: Callback failed + #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist + major: Symbol table + minor: Object not found +h5dump error: unable to get link info from "Dataset1" diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index dbecb3b..752bff9 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -313,6 +313,7 @@ ${SRC_H5DUMP_ERRORFILES}/tall-1.err ${SRC_H5DUMP_ERRORFILES}/tall-2A.err ${SRC_H5DUMP_ERRORFILES}/tall-2B.err ${SRC_H5DUMP_ERRORFILES}/tarray1_big.err +${SRC_H5DUMP_ERRORFILES}/tattr-3.err ${SRC_H5DUMP_ERRORFILES}/tattrregR.err ${SRC_H5DUMP_ERRORFILES}/tcomp-3.err ${SRC_H5DUMP_ERRORFILES}/tdataregR.err @@ -326,6 +327,7 @@ ${SRC_H5DUMP_ERRORFILES}/textlinkfar.err ${SRC_H5DUMP_ERRORFILES}/textlinksrc.err ${SRC_H5DUMP_ERRORFILES}/tgroup-2.err ${SRC_H5DUMP_ERRORFILES}/tperror.err +${SRC_H5DUMP_ERRORFILES}/tqmarkfile.err ${SRC_H5DUMP_ERRORFILES}/tslink-D.err " diff --git a/tools/testfiles/tqmarkfile.ddl b/tools/testfiles/tqmarkfile.ddl index e7771cb..885be5f 100644 --- a/tools/testfiles/tqmarkfile.ddl +++ b/tools/testfiles/tqmarkfile.ddl @@ -48,36 +48,3 @@ DATASET "Dataset1" { } HDF5 "tarray8.h5" { } -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found - major: Dataset - minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object - major: Symbol table - minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #004: (file name) line (number) in H5G_loc_find_cb(): object 'Dataset1' doesn't exist - major: Symbol table - minor: Object not found -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Lget_info(): unable to get link info - major: Symbol table - minor: Object not found - #001: (file name) line (number) in H5L_get_info(): name doesn't exist - major: Symbol table - minor: Object already exists - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed - major: Symbol table - minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed - major: Symbol table - minor: Callback failed - #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist - major: Symbol table - minor: Object not found -h5dump error: unable to get link info from "Dataset1" -- cgit v0.12 From 4bba12dbee46b5ea8a383ec90b42ab98f722d9e1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 08:56:25 -0500 Subject: [svn-r22562] tattr-3err file missing from list in cmake --- tools/h5dump/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 75e2c08..28d1ca2 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -278,6 +278,7 @@ IF (BUILD_TESTING) ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err + ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err -- cgit v0.12 From b54b3fcf290d532de381e135254dfc343d338d24 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 10:38:44 -0500 Subject: [svn-r22563] HDFFV-8095: index order of links wrong Create setters for indexing options in h5trav.c to be set before the obj table is created. Revert h5trav_print to remove now duplicated parameters. Added test and testfiles. Tested: local linux with cmake --- MANIFEST | 4 ++++ tools/h5dump/CMakeLists.txt | 8 ++++++++ tools/h5dump/h5dump.c | 3 +++ tools/h5dump/h5dump_ddl.c | 2 +- tools/h5dump/testh5dump.sh.in | 8 ++++++++ tools/lib/h5trav.c | 22 ++++++++++++++++++---- tools/lib/h5trav.h | 3 ++- 7 files changed, 44 insertions(+), 6 deletions(-) diff --git a/MANIFEST b/MANIFEST index 50b9a74..c1c4eff 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1475,6 +1475,8 @@ ./tools/testfiles/tcontents.ddl ./tools/testfiles/tordercontents1.ddl ./tools/testfiles/tordercontents2.ddl +./tools/testfiles/torderlinks1.ddl +./tools/testfiles/torderlinks2.ddl ./tools/testfiles/tfilters.h5 ./tools/testfiles/tchunked.ddl ./tools/testfiles/tcompact.ddl @@ -1539,6 +1541,8 @@ ./tools/h5dump/errfiles/textlinksrc.err ./tools/h5dump/errfiles/tgroup-2.err ./tools/h5dump/errfiles/tnofilename-with-packed-bits.err +./tools/h5dump/errfiles/orderlinks1.err +./tools/h5dump/errfiles/orderlinks2.err ./tools/h5dump/errfiles/tpbitsCharLengthExceeded.err ./tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err ./tools/h5dump/errfiles/tpbitsIncomplete.err diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 28d1ca2..b8a2d4c 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -152,6 +152,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl @@ -289,6 +291,8 @@ IF (BUILD_TESTING) ${PROJECT_SOURCE_DIR}/errfiles/textlink.err ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err + ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err + ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err ${PROJECT_SOURCE_DIR}/errfiles/tperror.err ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err @@ -1436,6 +1440,10 @@ IF (BUILD_TESTING) ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5) ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5) + # tests for link references and order + ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5) + ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5) + # tests for floating point user defined printf format ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 1a70d11..cd52743 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1464,6 +1464,9 @@ main(int argc, const char *argv[]) h5tools_setstatus(EXIT_FAILURE); goto done; } + /* Initialize indexing options */ + h5trav_set_index(sort_by, sort_order); + while(opt_ind < argc) { fname = HDstrdup(argv[opt_ind++]); diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index c0a9884..22d2a2b 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1294,7 +1294,7 @@ dump_fcontents(hid_t fid) } /* print objects in the files */ - h5trav_print(fid, sort_by, sort_order); + h5trav_print(fid); HDfprintf(rawoutstream, " %s\n",END); } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 752bff9..612b9ab 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -277,6 +277,8 @@ $SRC_H5DUMP_TESTFILES/torderattr3.ddl $SRC_H5DUMP_TESTFILES/torderattr4.ddl $SRC_H5DUMP_TESTFILES/tordercontents1.ddl $SRC_H5DUMP_TESTFILES/tordercontents2.ddl +$SRC_H5DUMP_TESTFILES/torderlinks1.ddl +$SRC_H5DUMP_TESTFILES/torderlinks2.ddl $SRC_H5DUMP_TESTFILES/tperror.ddl $SRC_H5DUMP_TESTFILES/treference.ddl $SRC_H5DUMP_TESTFILES/tsaf.ddl @@ -326,6 +328,8 @@ ${SRC_H5DUMP_ERRORFILES}/textlink.err ${SRC_H5DUMP_ERRORFILES}/textlinkfar.err ${SRC_H5DUMP_ERRORFILES}/textlinksrc.err ${SRC_H5DUMP_ERRORFILES}/tgroup-2.err +${SRC_H5DUMP_ERRORFILES}/torderlinks1.err +${SRC_H5DUMP_ERRORFILES}/torderlinks2.err ${SRC_H5DUMP_ERRORFILES}/tperror.err ${SRC_H5DUMP_ERRORFILES}/tqmarkfile.err ${SRC_H5DUMP_ERRORFILES}/tslink-D.err @@ -989,6 +993,10 @@ TOOLTEST torderattr2.ddl --enable-error-stack -H --sort_by=name --sort_order=des TOOLTEST torderattr3.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5 TOOLTEST torderattr4.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5 +# tests for link references and order +TOOLTEST4 torderlinks1.ddl --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5 +TOOLTEST4 torderlinks2.ddl --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5 + # tests for floating point user defined printf format TOOLTEST tfpformat.ddl --enable-error-stack -m %.7f tfpformat.h5 diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 833b8c4..170e612 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -67,6 +67,23 @@ static void trav_table_addlink(trav_table_t *table, static H5_index_t trav_index_by = H5_INDEX_NAME; static H5_iter_order_t trav_index_order = H5_ITER_INC; + +/*------------------------------------------------------------------------- + * Function: h5trav_set_index + * + * Purpose: Set indexing properties for the objects & links in the file + * + * Return: none + * + *------------------------------------------------------------------------- + */ +void +h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order) +{ + trav_index_by = print_index_by; + trav_index_order = print_index_order; +} + /*------------------------------------------------------------------------- * "h5trav info" public functions. used in h5diff *------------------------------------------------------------------------- @@ -955,14 +972,11 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) */ int -h5trav_print(hid_t fid, H5_index_t print_index_by, H5_iter_order_t print_index_order) +h5trav_print(hid_t fid) { trav_print_udata_t print_udata; /* User data for traversal */ trav_visitor_t print_visitor; /* Visitor structure for printing objects */ - trav_index_by = print_index_by; - trav_index_order = print_index_order; - /* Init user data for printing */ print_udata.fid = fid; diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 7311897..ce44bc9 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -131,6 +131,7 @@ extern "C" { * "h5trav general" public functions *------------------------------------------------------------------------- */ +H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order); H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recurse, h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata); @@ -158,7 +159,7 @@ H5TOOLS_DLL int h5trav_getindext(const char *obj, const trav_table_t *travt); * "h5trav print" public functions *------------------------------------------------------------------------- */ -H5TOOLS_DLL int h5trav_print(hid_t fid, H5_index_t print_index_by, H5_iter_order_t print_index_order); +H5TOOLS_DLL int h5trav_print(hid_t fid); #ifdef __cplusplus } -- cgit v0.12 From 6e0eb24b7bc48bea6c12e221e4b8416d3bb08f06 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 10:40:15 -0500 Subject: [svn-r22564] HDFFV-8095: index order of links wrong Create setters for indexing options in h5trav.c to be set before the obj table is created. Revert h5trav_print to remove now duplicated parameters. Added test and testfiles. Tested: local linux with cmake --- tools/h5dump/errfiles/torderlinks1.err | 25 ++++++++++++++++ tools/h5dump/errfiles/torderlinks2.err | 25 ++++++++++++++++ tools/testfiles/torderlinks1.ddl | 52 ++++++++++++++++++++++++++++++++++ tools/testfiles/torderlinks2.ddl | 52 ++++++++++++++++++++++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 tools/h5dump/errfiles/torderlinks1.err create mode 100644 tools/h5dump/errfiles/torderlinks2.err create mode 100644 tools/testfiles/torderlinks1.ddl create mode 100644 tools/testfiles/torderlinks2.ddl diff --git a/tools/h5dump/errfiles/torderlinks1.err b/tools/h5dump/errfiles/torderlinks1.err new file mode 100644 index 0000000..780c7e6 --- /dev/null +++ b/tools/h5dump/errfiles/torderlinks1.err @@ -0,0 +1,25 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname' + major: Links + minor: Unable to open file diff --git a/tools/h5dump/errfiles/torderlinks2.err b/tools/h5dump/errfiles/torderlinks2.err new file mode 100644 index 0000000..780c7e6 --- /dev/null +++ b/tools/h5dump/errfiles/torderlinks2.err @@ -0,0 +1,25 @@ +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Oopen(): unable to open object + major: Symbol table + minor: Can't open object + #001: (file name) line (number) in H5O_open_name(): object not found + major: Symbol table + minor: Object not found + #002: (file name) line (number) in H5G_loc_find(): can't find object + major: Symbol table + minor: Object not found + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + major: Symbol table + minor: Object not found + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed + major: Links + minor: Link traversal failure + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + major: Links + minor: Link traversal failure + #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID + major: Symbol table + minor: Unable to find atom information (already closed?) + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname' + major: Links + minor: Unable to open file diff --git a/tools/testfiles/torderlinks1.ddl b/tools/testfiles/torderlinks1.ddl new file mode 100644 index 0000000..eaf6eea --- /dev/null +++ b/tools/testfiles/torderlinks1.ddl @@ -0,0 +1,52 @@ +HDF5 "tfcontents1.h5" { +GROUP "/" { + DATATYPE "#5616" H5T_STD_I32BE; + DATASET "dset" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): 1, 2, 3, 4 + } + } + DATASET "dset3" { + HARDLINK "/dset" + } + DATASET "dset4" { + HARDLINK "/dset" + } + DATASET "dsetmytype2" { + DATATYPE "/#5616" + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): 1, 2, 3, 4 + } + } + EXTERNAL_LINK "extlink" { + TARGETFILE "fname" + TARGETPATH "oname" + } + GROUP "g1" { + DATASET "dset1" { + HARDLINK "/dset" + } + GROUP "g1.1" { + DATASET "dset2" { + HARDLINK "/dset" + } + } + } + GROUP "g2" { + HARDLINK "/g1/g1.1" + } + SOFTLINK "mylink" { + LINKTARGET "mylink" + } + DATATYPE "mytype" H5T_STD_I32BE; + SOFTLINK "softlink" { + LINKTARGET "/dset" + } + USERDEFINED_LINK "udlink" { + LINKCLASS 187 + } +} +} diff --git a/tools/testfiles/torderlinks2.ddl b/tools/testfiles/torderlinks2.ddl new file mode 100644 index 0000000..dd68208 --- /dev/null +++ b/tools/testfiles/torderlinks2.ddl @@ -0,0 +1,52 @@ +HDF5 "tfcontents1.h5" { +GROUP "/" { + DATATYPE "#5616" H5T_STD_I32BE; + USERDEFINED_LINK "udlink" { + LINKCLASS 187 + } + SOFTLINK "softlink" { + LINKTARGET "/dset" + } + DATATYPE "mytype" H5T_STD_I32BE; + SOFTLINK "mylink" { + LINKTARGET "mylink" + } + GROUP "g2" { + DATASET "dset2" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): 1, 2, 3, 4 + } + } + } + GROUP "g1" { + GROUP "g1.1" { + HARDLINK "/g2" + } + DATASET "dset1" { + HARDLINK "/g2/dset2" + } + } + EXTERNAL_LINK "extlink" { + TARGETFILE "fname" + TARGETPATH "oname" + } + DATASET "dsetmytype2" { + DATATYPE "/#5616" + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): 1, 2, 3, 4 + } + } + DATASET "dset4" { + HARDLINK "/g2/dset2" + } + DATASET "dset3" { + HARDLINK "/g2/dset2" + } + DATASET "dset" { + HARDLINK "/g2/dset2" + } +} +} -- cgit v0.12 From 1942f47bcfa0739e97efba02197136e1ecbb4a29 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 11:51:30 -0500 Subject: [svn-r22566] correct typo of new files names --- MANIFEST | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST b/MANIFEST index c1c4eff..9b2c36e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1541,8 +1541,8 @@ ./tools/h5dump/errfiles/textlinksrc.err ./tools/h5dump/errfiles/tgroup-2.err ./tools/h5dump/errfiles/tnofilename-with-packed-bits.err -./tools/h5dump/errfiles/orderlinks1.err -./tools/h5dump/errfiles/orderlinks2.err +./tools/h5dump/errfiles/trderlinks1.err +./tools/h5dump/errfiles/torderlinks2.err ./tools/h5dump/errfiles/tpbitsCharLengthExceeded.err ./tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err ./tools/h5dump/errfiles/tpbitsIncomplete.err -- cgit v0.12 From 210d04b05f1ea3a172acf531519a36ee39c982b3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 15:30:30 -0500 Subject: [svn-r22567] HDFFV-7784: add attributes to the list of file contents option for h5dump. This is accomplished by adding an optional value to the option (-n) Created test and reference files. Tested: local linux with cmake --- MANIFEST | 2 + tools/h5dump/CMakeLists.txt | 14 +++ tools/h5dump/h5dump.c | 8 +- tools/h5dump/h5dump_ddl.c | 129 ++++++++++------------- tools/h5dump/testh5dump.sh.in | 4 + tools/lib/h5trav.c | 93 +++++++++++++++- tools/lib/h5trav.h | 1 + tools/testfiles/h5dump-help.txt | 1 + tools/testfiles/tattrcontents1.ddl | 21 ++++ tools/testfiles/tattrcontents2.ddl | 21 ++++ tools/testfiles/tnofilename-with-packed-bits.ddl | 1 + tools/testfiles/tpbitsIncomplete.ddl | 1 + tools/testfiles/tpbitsLengthExceeded.ddl | 1 + tools/testfiles/tpbitsLengthPositive.ddl | 1 + tools/testfiles/tpbitsMaxExceeded.ddl | 1 + tools/testfiles/tpbitsOffsetExceeded.ddl | 1 + tools/testfiles/tpbitsOffsetNegative.ddl | 1 + 17 files changed, 224 insertions(+), 77 deletions(-) create mode 100644 tools/testfiles/tattrcontents1.ddl create mode 100644 tools/testfiles/tattrcontents2.ddl diff --git a/MANIFEST b/MANIFEST index 9b2c36e..ef76775 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1472,6 +1472,8 @@ ./tools/testfiles/tattr2.h5 ./tools/testfiles/tall-2A.ddl ./tools/testfiles/tall-2B.ddl +./tools/testfiles/tattrcontents1.ddl +./tools/testfiles/tattrcontents2.ddl ./tools/testfiles/tcontents.ddl ./tools/testfiles/tordercontents1.ddl ./tools/testfiles/tordercontents2.ddl diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index b8a2d4c..88d28c4 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -69,6 +69,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents2.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl @@ -854,6 +856,10 @@ IF (BUILD_TESTING) tattr-3.out.err tattr-4_be.out tattr-4_be.out.err + tattrcontents1.out + tattrcontents1.out.err + tattrcontents2.out + tattrcontents2.out.err tattrintsize.out tattrintsize.out.err tattrreg.out @@ -1010,6 +1016,10 @@ IF (BUILD_TESTING) tordercontents1.out.err tordercontents2.out tordercontents2.out.err + torderlinks1.out + torderlinks1.out.err + torderlinks2.out + torderlinks2.out.err tperror.out tperror.out.err treference.out @@ -1060,6 +1070,8 @@ IF (BUILD_TESTING) tvlstr.out.err tvms.out tvms.out.err + twidedisplay.out + twidedisplay.out.err ) SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") IF (NOT "${last_test}" STREQUAL "") @@ -1218,6 +1230,8 @@ IF (BUILD_TESTING) ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5) ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5) + ADD_H5_TEST (tattrcontents1 0 --enable-error-stack -n 1 --sort_order=ascending tall.h5) + ADD_H5_TEST (tattrcontents2 0 --enable-error-stack -n 1 --sort_order=descending tall.h5) # tests for storage layout # compact diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index cd52743..15d862e 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -71,11 +71,11 @@ struct handler_t { */ /* The following initialization makes use of C language cancatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char *s_opts = "hnpeyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:b*F:s:S:Aq:z:m:RECM:"; +static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:b*F:s:S:Aq:z:m:RECM:"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "hel", no_arg, 'h' }, - { "contents", no_arg, 'n' }, + { "contents", optional_arg, 'n' }, { "properties", no_arg, 'p' }, { "boot-block", no_arg, 'B' }, { "boot-bloc", no_arg, 'B' }, @@ -235,6 +235,7 @@ usage(const char *prog) HDfprintf(rawoutstream, " OPTIONS\n"); HDfprintf(rawoutstream, " -h, --help Print a usage message and exit\n"); HDfprintf(rawoutstream, " -n, --contents Print a list of the file contents and exit\n"); + HDfprintf(rawoutstream, " Optional value 1 also prints attributes.\n"); HDfprintf(rawoutstream, " -B, --superblock Print the content of the super block\n"); HDfprintf(rawoutstream, " -H, --header Print the header only; no data is displayed\n"); HDfprintf(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n"); @@ -999,6 +1000,9 @@ parse_start: case 'n': display_fi = TRUE; last_was_dset = FALSE; + if ( opt_arg != NULL) { + h5trav_set_verbose(HDatoi(opt_arg)); + } break; case 'p': display_dcpl = TRUE; diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 22d2a2b..6f5fd3f 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -543,6 +543,56 @@ done: } /*------------------------------------------------------------------------- + * Function: attr_iteration + * + * Purpose: Iterate and display attributes within the specified group + * + * Return: void + * + *------------------------------------------------------------------------- + */ +void +attr_iteration(hid_t gid, unsigned attr_crt_order_flags) +{ + /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set + in the group for attributes, then, sort by creation order, otherwise by name */ + + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg("error getting attribute information\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end if */ + } /* end if */ + else { + if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg("error getting attribute information\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end if */ + } /* end else */ +} + +/*------------------------------------------------------------------------- + * Function: link_iteration + * + * Purpose: Iterate and display links within the specified group + * + * Return: void + * + *------------------------------------------------------------------------- + */ +void +link_iteration(hid_t gid, unsigned crt_order_flags) +{ + + /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set + in the group, then, sort by creation order, otherwise by name */ + if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED)) + H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL); + else + H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL); +} + +/*------------------------------------------------------------------------- * Function: dump_named_datatype * * Purpose: Dump named datatype @@ -659,21 +709,7 @@ dump_named_datatype(hid_t tid, const char *name) /* print attributes */ dump_indent += COL; - /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set - in the datatype's create property list for attributes, then, sort by creation order, otherwise by name */ - - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { - if(H5Aiterate2(tid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end if */ - else { - if(H5Aiterate2(tid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end else */ + attr_iteration(tid, attr_crt_order_flags); dump_indent -= COL; @@ -829,53 +865,13 @@ dump_group(hid_t gid, const char *name) } else { found_obj->displayed = TRUE; - /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set - in the group for attributes, then, sort by creation order, otherwise by name */ - - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { - if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end if */ - else { - if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end else */ - - /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set - in the group, then, sort by creation order, otherwise by name */ - if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL); - else - H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL); + attr_iteration(gid, attr_crt_order_flags); + link_iteration(gid, crt_order_flags); } } else { - /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set - in the group for attributes, then, sort by creation order, otherwise by name */ - - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { - if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end if */ - else { - if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end else */ - - /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set - in the group, then, sort by creation order, otherwise by name */ - if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED)) - H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL); - else - H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL); + attr_iteration(gid, attr_crt_order_flags); + link_iteration(gid, crt_order_flags); } dump_indent -= COL; @@ -1050,20 +1046,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) H5Tclose(type); if (!bin_output) { - /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set - in the group for attributes, then, sort by creation order, otherwise by name */ - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { - if(H5Aiterate2(did, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end if */ - else { - if(H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end else */ + attr_iteration(did, attr_crt_order_flags); } ctx.indent_level--; dump_indent -= COL; diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 612b9ab..8d2fb20 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -194,6 +194,8 @@ $SRC_H5DUMP_TESTFILES/tattr-1.ddl $SRC_H5DUMP_TESTFILES/tattr-2.ddl $SRC_H5DUMP_TESTFILES/tattr-3.ddl $SRC_H5DUMP_TESTFILES/tattr-4_be.ddl +$SRC_H5DUMP_TESTFILES/tattrcontents1.ddl +$SRC_H5DUMP_TESTFILES/tattrcontents2.ddl $SRC_H5DUMP_TESTFILES/tattrintsize.ddl $SRC_H5DUMP_TESTFILES/tattrreg.ddl $SRC_H5DUMP_TESTFILES/tattrregR.ddl @@ -818,6 +820,8 @@ TOOLTEST4 tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5 TOOLTEST tcontents.ddl --enable-error-stack -n tfcontents1.h5 TOOLTEST tordercontents1.ddl --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5 TOOLTEST tordercontents2.ddl --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5 +TOOLTEST tattrcontents1.ddl --enable-error-stack -n 1 --sort_order=ascending tall.h5 +TOOLTEST tattrcontents2.ddl --enable-error-stack -n 1 --sort_order=descending tall.h5 # tests for storage layout # compact diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 170e612..0215c46 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -48,6 +48,9 @@ typedef struct { hid_t fid; /* File ID being traversed */ } trav_print_udata_t; +/* format for hsize_t */ +#define HSIZE_T_FORMAT "%"H5_PRINTF_LL_WIDTH"u" + /*------------------------------------------------------------------------- * local functions *------------------------------------------------------------------------- @@ -67,6 +70,7 @@ static void trav_table_addlink(trav_table_t *table, static H5_index_t trav_index_by = H5_INDEX_NAME; static H5_iter_order_t trav_index_order = H5_ITER_INC; +static int trav_verbosity = 0; /*------------------------------------------------------------------------- * Function: h5trav_set_index @@ -85,6 +89,21 @@ h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order) } /*------------------------------------------------------------------------- + * Function: h5trav_set_verbose + * + * Purpose: Set verbosity of file contents 1=>attributes + * + * Return: none + * + *------------------------------------------------------------------------- + */ +void +h5trav_set_verbose(int print_verbose) +{ + trav_verbosity = print_verbose; +} + +/*------------------------------------------------------------------------- * "h5trav info" public functions. used in h5diff *------------------------------------------------------------------------- */ @@ -845,6 +864,72 @@ void trav_table_free( trav_table_t *table ) HDfree(table); } +static herr_t +trav_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *op_data) +{ + char *buf; + + buf = (char*)op_data; + if((strlen(buf)==1) && (*buf=='/')) + printf(" %-10s %s%s", "attribute", buf, attr_name); + else + printf(" %-10s %s/%s", "attribute", buf, attr_name); + +#ifdef H5TRAV_PRINT_SPACE + if(trav_verbosity < 2) { +#endif + printf("\n"); +#ifdef H5TRAV_PRINT_SPACE + } + else { + hid_t attr = -1; + hid_t space = -1; + hsize_t size[H5S_MAX_RANK]; + int ndims; + int i; + H5S_class_t space_type; + + if((attr = H5Aopen(obj, attr_name, H5P_DEFAULT))) { + space = H5Aget_space(attr); + + /* Data space */ + ndims = H5Sget_simple_extent_dims(space, size, NULL); + space_type = H5Sget_simple_extent_type(space); + switch(space_type) { + case H5S_SCALAR: + /* scalar dataspace */ + printf(" scalar\n"); + break; + + case H5S_SIMPLE: + /* simple dataspace */ + printf(" {"); + for (i=0; i 0) + H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, NULL, trav_attr, path, H5P_DEFAULT); + } else /* Print the link's original name */ printf(" -> %s\n", already_visited); diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index ce44bc9..c416cf8 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -160,6 +160,7 @@ H5TOOLS_DLL int h5trav_getindext(const char *obj, const trav_table_t *travt); *------------------------------------------------------------------------- */ H5TOOLS_DLL int h5trav_print(hid_t fid); +H5TOOLS_DLL void h5trav_set_verbose(int print_verbose); #ifdef __cplusplus } diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index d8551ca..43808e7 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tattrcontents1.ddl b/tools/testfiles/tattrcontents1.ddl new file mode 100644 index 0000000..e118d89 --- /dev/null +++ b/tools/testfiles/tattrcontents1.ddl @@ -0,0 +1,21 @@ +HDF5 "tall.h5" { +FILE_CONTENTS { + group / + attribute /attr1 + attribute /attr2 + group /g1 + group /g1/g1.1 + dataset /g1/g1.1/dset1.1.1 + attribute /g1/g1.1/dset1.1.1/attr1 + attribute /g1/g1.1/dset1.1.1/attr2 + dataset /g1/g1.1/dset1.1.2 + group /g1/g1.2 + ext link /g1/g1.2/extlink -> somefile somepath + group /g1/g1.2/g1.2.1 + link /g1/g1.2/g1.2.1/slink -> somevalue + group /g2 + dataset /g2/dset2.1 + dataset /g2/dset2.2 + unknown type of UD link /g2/udlink -> ??? + } +} diff --git a/tools/testfiles/tattrcontents2.ddl b/tools/testfiles/tattrcontents2.ddl new file mode 100644 index 0000000..4076385 --- /dev/null +++ b/tools/testfiles/tattrcontents2.ddl @@ -0,0 +1,21 @@ +HDF5 "tall.h5" { +FILE_CONTENTS { + group / + attribute /attr2 + attribute /attr1 + group /g2 + unknown type of UD link /g2/udlink -> ??? + dataset /g2/dset2.2 + dataset /g2/dset2.1 + group /g1 + group /g1/g1.2 + group /g1/g1.2/g1.2.1 + link /g1/g1.2/g1.2.1/slink -> somevalue + ext link /g1/g1.2/extlink -> somefile somepath + group /g1/g1.1 + dataset /g1/g1.1/dset1.1.2 + dataset /g1/g1.1/dset1.1.1 + attribute /g1/g1.1/dset1.1.1/attr2 + attribute /g1/g1.1/dset1.1.1/attr1 + } +} diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index 050a3a3..f74483f 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index 5608d2b..31a386d 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index f89b65f..b2ab900 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index ba32aa6..2140ab7 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index 16f953d..598b2cd 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index 446fe2d..a8192e9 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index 747cf99..60e31ec 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -2,6 +2,7 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed -A, --onlyattr Print the header and value of attributes -- cgit v0.12 From a947f3b755367540802f71cda4cda6f4ea87d76c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Jul 2012 16:50:26 -0500 Subject: [svn-r22568] fix another typo - due to wrong edit state! --- MANIFEST | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index ef76775..dece0ee 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1543,7 +1543,7 @@ ./tools/h5dump/errfiles/textlinksrc.err ./tools/h5dump/errfiles/tgroup-2.err ./tools/h5dump/errfiles/tnofilename-with-packed-bits.err -./tools/h5dump/errfiles/trderlinks1.err +./tools/h5dump/errfiles/torderlinks1.err ./tools/h5dump/errfiles/torderlinks2.err ./tools/h5dump/errfiles/tpbitsCharLengthExceeded.err ./tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err -- cgit v0.12 From f48ae2195a01583710eac3b439d7a862cfba2eef Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 13 Jul 2012 08:58:18 -0500 Subject: [svn-r22569] On windows read/write error reference file just like reference file before comparision. This will set the line endings. --- config/cmake/runTest.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 40a72f1..d0cc335 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -121,6 +121,11 @@ IF (NOT TEST_SKIP_COMPARE) ENDIF (NOT ${TEST_RESULT} STREQUAL 0) IF (TEST_ERRREF) + IF (WIN32 AND NOT MINGW) + FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE}.err TEST_STREAM) + FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE}.err "${TEST_STREAM}") + ENDIF (WIN32 AND NOT MINGW) + # now compare the error output with the error reference EXECUTE_PROCESS ( COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} -- cgit v0.12 From c7513e17769563106991822acd597fa2fe81101b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 13 Jul 2012 09:12:17 -0500 Subject: [svn-r22570] Correct name of error reference file --- config/cmake/runTest.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index d0cc335..4738523 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -122,8 +122,8 @@ IF (NOT TEST_SKIP_COMPARE) IF (TEST_ERRREF) IF (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE}.err TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE}.err "${TEST_STREAM}") + FILE (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) + FILE (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") ENDIF (WIN32 AND NOT MINGW) # now compare the error output with the error reference -- cgit v0.12 From feb79ce8ea30f6cd3c85861b67f6f7fca772b3f7 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 13 Jul 2012 17:10:57 -0500 Subject: [svn-r22575] Issue 8068 - A user reported some random data in the padding of fill value. The problem happened in H5P_get_fill_value. I believe it's because the background buffer wasn't big enough. So I corrected it in this checkin. Tested on jam and koala - simple change. --- src/H5Pdcpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 32793e6..54654c5 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1563,8 +1563,8 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value/*out*/, else { if(NULL == (buf = H5MM_malloc(H5T_get_size(fill.type)))) HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") - if(H5T_path_bkg(tpath)) - bkg = value; + if(H5T_path_bkg(tpath) && NULL == (bkg = H5MM_malloc(H5T_get_size(fill.type)))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") } /* end else */ HDmemcpy(buf, fill.buf, H5T_get_size(fill.type)); -- cgit v0.12 From d06dd112915987516eb3f457c51db959b22a1f62 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 16 Jul 2012 10:08:03 -0500 Subject: [svn-r22577] Windows compilers require declarations at top of routine. --- tools/h5dump/h5dumpgentest.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index fcbf8f1..63329f4 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -7369,22 +7369,21 @@ gent_charsets(void) const char *utf8_p_; } CharSetInfo; - sid = H5Screate_simple( 1, dim, NULL ); - fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); - hid_t charset_dtid = H5Tcreate( H5T_COMPOUND, sizeof( CharSetInfo ) ); - hid_t ascii_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE ); + hid_t utf8_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE ); + const char * writeData[] = { "ascii", "utf8", }; + + sid = H5Screate_simple( 1, dim, NULL ); + fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); status = H5Tset_cset( ascii_dtid, H5T_CSET_ASCII ); H5Tinsert( charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_ ), ascii_dtid ); - hid_t utf8_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE ); status = H5Tset_cset( utf8_dtid, H5T_CSET_UTF8 ); H5Tinsert( charset_dtid, "utf8", HOFFSET( CharSetInfo, utf8_p_ ), utf8_dtid ); did = H5Dcreate2( fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT ); - const char * writeData[] = { "ascii", "utf8", }; status = H5Dwrite( did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData ); H5Tclose( charset_dtid ); -- cgit v0.12 From 2e3ab09a520ff87ec709b5997273ce7f3b99d9ed Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 16 Jul 2012 13:21:05 -0500 Subject: [svn-r22581] HDFFV-588: hdump restrictions on filename for split files. Added text and example to usage. Tested: local linux --- CMakeLists.txt | 1 + tools/h5dump/h5dump.c | 26 ++++++++++++++++++------ tools/testfiles/h5dump-help.txt | 26 ++++++++++++++++++------ tools/testfiles/tnofilename-with-packed-bits.ddl | 26 ++++++++++++++++++------ tools/testfiles/tpbitsIncomplete.ddl | 26 ++++++++++++++++++------ tools/testfiles/tpbitsLengthExceeded.ddl | 26 ++++++++++++++++++------ tools/testfiles/tpbitsLengthPositive.ddl | 26 ++++++++++++++++++------ tools/testfiles/tpbitsMaxExceeded.ddl | 26 ++++++++++++++++++------ tools/testfiles/tpbitsOffsetExceeded.ddl | 26 ++++++++++++++++++------ tools/testfiles/tpbitsOffsetNegative.ddl | 26 ++++++++++++++++++------ 10 files changed, 181 insertions(+), 54 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 810ba1b..0346ff3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -984,6 +984,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}") ELSE (WIN32) SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") + SET (CPACK_ARCHIVE_COMPONENT_INSTALL ON) SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 15d862e..23fd1d9 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -297,10 +297,20 @@ usage(const char *prog) HDfprintf(rawoutstream, " number of dimensions in the dataspace being queried\n"); HDfprintf(rawoutstream, "\n"); HDfprintf(rawoutstream, " D - is the file driver to use in opening the file. Acceptable values\n"); - HDfprintf(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n"); - HDfprintf(rawoutstream, " the file driver flag, the file will be opened with each driver in\n"); - HDfprintf(rawoutstream, " turn and in the order specified above until one driver succeeds\n"); - HDfprintf(rawoutstream, " in opening the file.\n"); + HDfprintf(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n"); + HDfprintf(rawoutstream, " the file driver flag, the file will be opened with each driver in\n"); + HDfprintf(rawoutstream, " turn and in the order specified above until one driver succeeds\n"); + HDfprintf(rawoutstream, " in opening the file.\n"); + HDfprintf(rawoutstream, " These are the letters that are appended to the file name(without .h5) when opening\n"); + HDfprintf(rawoutstream, " names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are:\n"); + HDfprintf(rawoutstream, " m: All meta data when using the split driver.\n"); + HDfprintf(rawoutstream, " s: The userblock, superblock, and driver info block\n"); + HDfprintf(rawoutstream, " b: B-tree nodes\n"); + HDfprintf(rawoutstream, " r: Dataset raw data\n"); + HDfprintf(rawoutstream, " g: Global heap\n"); + HDfprintf(rawoutstream, " l: local heap (object names)\n"); + HDfprintf(rawoutstream, " o: object headers\n"); + HDfprintf(rawoutstream, "\n"); HDfprintf(rawoutstream, " F - is a filename.\n"); HDfprintf(rawoutstream, " P - is the full path from the root group to the object.\n"); HDfprintf(rawoutstream, " N - is an integer greater than 1.\n"); @@ -337,9 +347,13 @@ usage(const char *prog) HDfprintf(rawoutstream, "\n"); HDfprintf(rawoutstream, " h5dump -d /dset -M 0,1,4,3 quux.h5\n"); HDfprintf(rawoutstream, "\n"); - HDfprintf(rawoutstream, " 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5\n"); + HDfprintf(rawoutstream, " 5) Dataset foo in files file1.h5 file2.h5 file3.h5\n"); + HDfprintf(rawoutstream, "\n"); + HDfprintf(rawoutstream, " h5dump -d /foo file1.h5 file2.h5 file3.h5\n"); + HDfprintf(rawoutstream, "\n"); + HDfprintf(rawoutstream, " 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5\n"); HDfprintf(rawoutstream, "\n"); - HDfprintf(rawoutstream, " h5dump -d /foo multi1.h5 multi2.h5 multi3.h5\n"); + HDfprintf(rawoutstream, " h5dump -d /foo -f split splitfile\n"); HDfprintf(rawoutstream, "\n"); } diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index 43808e7..5e0a8f1 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,7 +112,11 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index f74483f..a82c94e 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: missing file name diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index 31a386d..72d54fc 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index b2ab900..d8b627c 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index 2140ab7..39cef23 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index 598b2cd..5f35825 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index a8192e9..92cc816 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index 60e31ec..c318834 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -62,10 +62,20 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + These are the letters that are appended to the file name(without .h5) when opening + names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: + m: All meta data when using the split driver. + s: The userblock, superblock, and driver info block + b: B-tree nodes + r: Dataset raw data + g: Global heap + l: local heap (object names) + o: object headers + F - is a filename. P - is the full path from the root group to the object. N - is an integer greater than 1. @@ -102,8 +112,12 @@ usage: h5dump [OPTIONS] files h5dump -d /dset -M 0,1,4,3 quux.h5 - 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5 + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - h5dump -d /foo multi1.h5 multi2.h5 multi3.h5 + h5dump -d /foo -f split splitfile h5dump error: Bad mask list(-1,1) -- cgit v0.12 From 75f4e51a1a076ea2f1602619e2a7d7bcce13c2f1 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 16 Jul 2012 14:54:26 -0500 Subject: [svn-r22582] Description: Refactor ID class registration to be more like how other "class"s in the library are registered, and clean up compiler warnings. Tested on: Mac OSX/64 10.7.4 (amazon) w/debug (Too minor to require h5comittest) --- src/H5A.c | 17 +- src/H5AC.c | 12 +- src/H5Abtree2.c | 20 +-- src/H5Adeprec.c | 12 +- src/H5Aint.c | 76 ++++----- src/H5C.c | 6 +- src/H5D.c | 2 - src/H5Dfill.c | 4 +- src/H5Dint.c | 11 +- src/H5Dpkg.h | 3 - src/H5E.c | 66 +++++--- src/H5F.c | 54 +++++- src/H5FD.c | 12 +- src/H5G.c | 13 +- src/H5I.c | 218 ++++++++++++++----------- src/H5Ipkg.h | 2 +- src/H5Iprivate.h | 56 ++++--- src/H5Pint.c | 24 ++- src/H5R.c | 51 +++++- src/H5S.c | 49 +++++- src/H5T.c | 488 +++++++++++++++++++++++++++++-------------------------- src/H5Tpkg.h | 3 - test/tid.c | 18 +- 23 files changed, 742 insertions(+), 475 deletions(-) diff --git a/src/H5A.c b/src/H5A.c index 63a908d..e1aeaac 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -41,9 +41,6 @@ /* Local Macros */ /****************/ -/* The number of reserved IDs in dataset ID group */ -#define H5A_RESERVED_ATOMS 0 - /******************/ /* Local Typedefs */ @@ -94,6 +91,16 @@ H5FL_DEFINE(H5A_shared_t); /* Declare a free list to manage blocks of type conversion data */ H5FL_BLK_DEFINE(attr_buf); +/* Attribute ID class */ +static const H5I_class_t H5I_ATTR_CLS[1] = {{ + H5I_ATTR, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5A_close /* Callback routine for closing objects of this class */ +}}; + + /*------------------------------------------------------------------------- * Function: H5A_init @@ -143,7 +150,7 @@ H5A_init_interface(void) /* * Create attribute ID type. */ - if(H5I_register_type(H5I_ATTR, (size_t)H5I_ATTRID_HASHSIZE, H5A_RESERVED_ATOMS, (H5I_free_t)H5A_close) < H5I_FILE) + if(H5I_register_type(H5I_ATTR_CLS) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to initialize interface") done: @@ -172,7 +179,7 @@ H5A_term_interface(void) { int n = 0; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { if((n = H5I_nmembers(H5I_ATTR))>0) { diff --git a/src/H5AC.c b/src/H5AC.c index 51c4ce5..99caf28 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -342,14 +342,14 @@ done: FUNC_LEAVE_NOAPI(ret_value) #else /* H5_HAVE_PARALLEL */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ - assert(H5P_LST_DATASET_XFER_g!=(-1)); + HDassert(H5P_LST_DATASET_XFER_g!=(-1)); - H5AC_dxpl_id=H5P_DATASET_XFER_DEFAULT; - H5AC_noblock_dxpl_id=H5P_DATASET_XFER_DEFAULT; - H5AC_ind_dxpl_id=H5P_DATASET_XFER_DEFAULT; + H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT; + H5AC_noblock_dxpl_id = H5P_DATASET_XFER_DEFAULT; + H5AC_ind_dxpl_id = H5P_DATASET_XFER_DEFAULT; FUNC_LEAVE_NOAPI(SUCCEED) #endif /* H5_HAVE_PARALLEL */ @@ -376,7 +376,7 @@ H5AC_term_interface(void) { int n = 0; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR if (H5_interface_initialize_g) { #ifdef H5_HAVE_PARALLEL diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index 5a15c20..9b7dba6 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -222,7 +222,7 @@ H5A_dense_btree2_name_store(void *_nrecord, const void *_udata) const H5A_bt2_ud_ins_t *udata = (const H5A_bt2_ud_ins_t *)_udata; H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Copy user information info native record */ nrecord->id = udata->id; @@ -255,7 +255,7 @@ H5A_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec) const H5A_dense_bt2_name_rec_t *bt2_rec = (const H5A_dense_bt2_name_rec_t *)_bt2_rec; herr_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(bt2_udata); @@ -323,7 +323,7 @@ H5A_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void UNUSED *ct { const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Encode the record's fields */ HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN); @@ -354,7 +354,7 @@ H5A_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void UNUSED *ct { H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Decode the record's fields */ HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN); @@ -386,7 +386,7 @@ H5A_dense_btree2_name_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dx { const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u, %08lx}\n", indent, "", fwidth, "Record:", @@ -415,7 +415,7 @@ H5A_dense_btree2_corder_store(void *_nrecord, const void *_udata) const H5A_bt2_ud_ins_t *udata = (const H5A_bt2_ud_ins_t *)_udata; H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Copy user information info native record */ nrecord->id = udata->id; @@ -447,7 +447,7 @@ H5A_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec) const H5A_dense_bt2_corder_rec_t *bt2_rec = (const H5A_dense_bt2_corder_rec_t *)_bt2_rec; herr_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(bt2_udata); @@ -483,7 +483,7 @@ H5A_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void UNUSED * { const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Encode the record's fields */ HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN); @@ -513,7 +513,7 @@ H5A_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void UNUSED * { H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Decode the record's fields */ HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN); @@ -544,7 +544,7 @@ H5A_dense_btree2_corder_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED { const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth, "Record:", diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index 22faaa2..7202edf 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -35,7 +35,7 @@ #define H5O_PACKAGE /*suppress error about including H5Opkg */ /* Interface initialization */ -#define H5_INTERFACE_INIT_FUNC H5A_init_deprec_interface +#define H5_INTERFACE_INIT_FUNC H5A__init_deprec_interface /***********/ @@ -87,9 +87,9 @@ /*-------------------------------------------------------------------------- NAME - H5A_init_deprec_interface -- Initialize interface-specific information + H5A__init_deprec_interface -- Initialize interface-specific information USAGE - herr_t H5A_init_deprec_interface() + herr_t H5A__init_deprec_interface() RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -98,12 +98,12 @@ DESCRIPTION --------------------------------------------------------------------------*/ static herr_t -H5A_init_deprec_interface(void) +H5A__init_deprec_interface(void) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR FUNC_LEAVE_NOAPI(H5A_init()) -} /* H5A_init_deprec_interface() */ +} /* H5A__init_deprec_interface() */ #ifndef H5_NO_DEPRECATED_SYMBOLS diff --git a/src/H5Aint.c b/src/H5Aint.c index 74c5590..9503a1c 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -90,14 +90,14 @@ typedef struct { /* Local Prototypes */ /********************/ -static herr_t H5A_compact_build_table_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, +static herr_t H5A__compact_build_table_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, unsigned *oh_flags_ptr, void *_udata/*in,out*/); static herr_t H5A_dense_build_table_cb(const H5A_t *attr, void *_udata); -static int H5A_attr_cmp_name_inc(const void *attr1, const void *attr2); -static int H5A_attr_cmp_name_dec(const void *attr1, const void *attr2); -static int H5A_attr_cmp_corder_inc(const void *attr1, const void *attr2); -static int H5A_attr_cmp_corder_dec(const void *attr1, const void *attr2); -static herr_t H5A_attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, +static int H5A__attr_cmp_name_inc(const void *attr1, const void *attr2); +static int H5A__attr_cmp_name_dec(const void *attr1, const void *attr2); +static int H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2); +static int H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2); +static herr_t H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_order_t order); /*********************/ @@ -119,7 +119,7 @@ H5FL_SEQ_DEFINE(H5A_t_ptr); /*------------------------------------------------------------------------- - * Function: H5A_compact_build_table_cb + * Function: H5A__compact_build_table_cb * * Purpose: Object header iterator callback routine to copy attribute * into table. @@ -137,13 +137,13 @@ H5FL_SEQ_DEFINE(H5A_t_ptr); *------------------------------------------------------------------------- */ static herr_t -H5A_compact_build_table_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, +H5A__compact_build_table_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5A_compact_bt_ud_t *udata = (H5A_compact_bt_ud_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check args */ HDassert(mesg); @@ -176,7 +176,7 @@ H5A_compact_build_table_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_compact_build_table_cb() */ +} /* end H5A__compact_build_table_cb() */ /*------------------------------------------------------------------------- @@ -225,7 +225,7 @@ H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type, /* Iterate over existing attributes, checking for attribute with same name */ op.op_type = H5O_MESG_OP_LIB; - op.u.lib_op = H5A_compact_build_table_cb; + op.u.lib_op = H5A__compact_build_table_cb; if(H5O_msg_iterate_real(f, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0) HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error building attribute table") @@ -235,7 +235,7 @@ H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type, /* Don't sort an empty table. */ if(atable->nattrs > 0) { /* Sort attribute table in correct iteration order */ - if(H5A_attr_sort_table(atable, idx_type, order) < 0) + if(H5A__attr_sort_table(atable, idx_type, order) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table") } /* end if */ @@ -359,7 +359,7 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table") /* Sort attribute table in correct iteration order */ - if(H5A_attr_sort_table(atable, idx_type, order) < 0) + if(H5A__attr_sort_table(atable, idx_type, order) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table") } /* end if */ else @@ -375,7 +375,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_attr_cmp_name_inc + * Function: H5A__attr_cmp_name_inc * * Purpose: Callback routine for comparing two attribute names, in * increasing alphabetic order @@ -393,17 +393,17 @@ done: *------------------------------------------------------------------------- */ static int -H5A_attr_cmp_name_inc(const void *attr1, const void *attr2) +H5A__attr_cmp_name_inc(const void *attr1, const void *attr2) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR FUNC_LEAVE_NOAPI(HDstrcmp((*(const H5A_t * const *)attr1)->shared->name, (*(const H5A_t * const *)attr2)->shared->name)) -} /* end H5A_attr_cmp_name_inc() */ +} /* end H5A__attr_cmp_name_inc() */ /*------------------------------------------------------------------------- - * Function: H5A_attr_cmp_name_dec + * Function: H5A__attr_cmp_name_dec * * Purpose: Callback routine for comparing two attribute names, in * decreasing alphabetic order @@ -421,17 +421,17 @@ H5A_attr_cmp_name_inc(const void *attr1, const void *attr2) *------------------------------------------------------------------------- */ static int -H5A_attr_cmp_name_dec(const void *attr1, const void *attr2) +H5A__attr_cmp_name_dec(const void *attr1, const void *attr2) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR FUNC_LEAVE_NOAPI(HDstrcmp((*(const H5A_t * const *)attr2)->shared->name, (*(const H5A_t * const *)attr1)->shared->name)) -} /* end H5A_attr_cmp_name_dec() */ +} /* end H5A__attr_cmp_name_dec() */ /*------------------------------------------------------------------------- - * Function: H5A_attr_cmp_corder_inc + * Function: H5A__attr_cmp_corder_inc * * Purpose: Callback routine for comparing two attributes, in * increasing creation order @@ -448,11 +448,11 @@ H5A_attr_cmp_name_dec(const void *attr1, const void *attr2) *------------------------------------------------------------------------- */ static int -H5A_attr_cmp_corder_inc(const void *attr1, const void *attr2) +H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2) { int ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR if((*(const H5A_t * const *)attr1)->shared->crt_idx < (*(const H5A_t * const *)attr2)->shared->crt_idx) ret_value = -1; @@ -462,11 +462,11 @@ H5A_attr_cmp_corder_inc(const void *attr1, const void *attr2) ret_value = 0; FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_attr_cmp_corder_inc() */ +} /* end H5A__attr_cmp_corder_inc() */ /*------------------------------------------------------------------------- - * Function: H5A_attr_cmp_corder_dec + * Function: H5A__attr_cmp_corder_dec * * Purpose: Callback routine for comparing two attributes, in * decreasing creation order @@ -483,11 +483,11 @@ H5A_attr_cmp_corder_inc(const void *attr1, const void *attr2) *------------------------------------------------------------------------- */ static int -H5A_attr_cmp_corder_dec(const void *attr1, const void *attr2) +H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2) { int ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR if((*(const H5A_t * const *)attr1)->shared->crt_idx < (*(const H5A_t * const *)attr2)->shared->crt_idx) ret_value = 1; @@ -497,11 +497,11 @@ H5A_attr_cmp_corder_dec(const void *attr1, const void *attr2) ret_value = 0; FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_attr_cmp_corder_dec() */ +} /* end H5A__attr_cmp_corder_dec() */ /*------------------------------------------------------------------------- - * Function: H5A_attr_sort_table + * Function: H5A__attr_sort_table * * Purpose: Sort table containing a list of attributes for an object * @@ -514,10 +514,10 @@ H5A_attr_cmp_corder_dec(const void *attr1, const void *attr2) *------------------------------------------------------------------------- */ static herr_t -H5A_attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, +H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_order_t order) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(atable); @@ -525,24 +525,24 @@ H5A_attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, /* Pick appropriate comparison routine */ if(idx_type == H5_INDEX_NAME) { if(order == H5_ITER_INC) - HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A_attr_cmp_name_inc); + HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_name_inc); else if(order == H5_ITER_DEC) - HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A_attr_cmp_name_dec); + HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_name_dec); else HDassert(order == H5_ITER_NATIVE); } /* end if */ else { HDassert(idx_type == H5_INDEX_CRT_ORDER); if(order == H5_ITER_INC) - HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A_attr_cmp_corder_inc); + HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_corder_inc); else if(order == H5_ITER_DEC) - HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A_attr_cmp_corder_dec); + HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_corder_dec); else HDassert(order == H5_ITER_NATIVE); } /* end else */ FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_attr_sort_table() */ +} /* end H5A__attr_sort_table() */ /*------------------------------------------------------------------------- @@ -756,7 +756,7 @@ H5A_set_version(const H5F_t *f, H5A_t *attr) hbool_t type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */ hbool_t use_latest_format; /* Flag indicating the newest file format should be used */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_NOERR /* check arguments */ HDassert(f); diff --git a/src/H5C.c b/src/H5C.c index 5323cab..f651fb2 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -5881,7 +5881,7 @@ static void H5C_adjust_flush_dependency_rc(H5C_cache_entry_t * cache_entry, unsigned old_child_height, unsigned new_child_height) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity checks */ HDassert(cache_entry); @@ -9274,7 +9274,7 @@ H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag) H5C_cache_entry_t *next_entry_ptr; /* entry pointer */ unsigned u; /* Local index variable */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Assertions */ HDassert(0); /* This function is not yet used. We shouldn't be in here yet. */ @@ -9433,7 +9433,7 @@ H5C_retag_copied_metadata(H5C_t * cache_ptr, haddr_t metadata_tag) { unsigned u; /* Local index variable */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(cache_ptr); diff --git a/src/H5D.c b/src/H5D.c index da050ab..d204712 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -47,8 +47,6 @@ /* Local Prototypes */ /********************/ -static herr_t H5D__init_pub_interface(void); - /*********************/ /* Package Variables */ diff --git a/src/H5Dfill.c b/src/H5Dfill.c index 0d9c9e7..2edb363 100644 --- a/src/H5Dfill.c +++ b/src/H5Dfill.c @@ -646,7 +646,7 @@ done: static herr_t H5D__fill_release(H5D_fill_buf_info_t *fb_info) { - FUNC_ENTER_PACKAGE + FUNC_ENTER_PACKAGE_NOERR /* Check args */ HDassert(fb_info); @@ -684,7 +684,7 @@ H5D__fill_release(H5D_fill_buf_info_t *fb_info) herr_t H5D__fill_term(H5D_fill_buf_info_t *fb_info) { - FUNC_ENTER_PACKAGE + FUNC_ENTER_PACKAGE_NOERR /* Check args */ HDassert(fb_info); diff --git a/src/H5Dint.c b/src/H5Dint.c index 62d0f09..f313e52 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -106,6 +106,15 @@ H5FL_EXTERN(H5D_chunk_info_t); /* Define a static "default" dataset structure to use to initialize new datasets */ static H5D_shared_t H5D_def_dset; +/* Dataset ID class */ +static const H5I_class_t H5I_DATASET_CLS[1] = {{ + H5I_DATASET, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5D_close /* Callback routine for closing objects of this class */ +}}; + /*------------------------------------------------------------------------- @@ -159,7 +168,7 @@ H5D__init_interface(void) FUNC_ENTER_STATIC /* Initialize the atom group for the dataset IDs */ - if(H5I_register_type(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS, (H5I_free_t)H5D_close)id_list); + type_ptr = H5FL_FREE(H5I_id_type_t, type_ptr); + H5I_id_type_list_g[type] = NULL; + } /* end if */ } /* end for */ } /* end if */ @@ -232,15 +239,64 @@ H5I_term_interface(void) H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func) { + H5I_class_t *cls = NULL; /* New ID class */ + H5I_type_t new_type; /* New ID type value */ H5I_type_t ret_value; /* Return value */ FUNC_ENTER_API(H5I_BADID) H5TRACE3("It", "zIux", hash_size, reserved, free_func); - /* Call H5I_register_type with a value of 0 to get a new type */ - ret_value = H5I_register_type((H5I_type_t)0, hash_size, reserved, free_func); + /* Generate a new H5I_type_t value */ + + /* Increment the number of types*/ + if(H5I_next_type < H5I_MAX_NUM_TYPES) { + new_type = H5I_next_type; + H5_INC_ENUM(H5I_type_t, H5I_next_type); + } /* end if */ + else { + hbool_t done; /* Indicate that search was successful */ + int i; /* Local index variable */ + + /* Look for a free type to give out */ + done = FALSE; + for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES && done == FALSE; i++) { + if(NULL == H5I_id_type_list_g[i]) { + /* Found a free type ID */ + new_type = (H5I_type_t)i; + done = TRUE; + } /* end if */ + } /* end for */ + + /* Verify that we found a type to give out */ + if(done == FALSE) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded.") + } /* end else */ + + /* Allocate new ID class */ + if(NULL == (cls = H5FL_MALLOC(H5I_class_t))) + HGOTO_ERROR(H5E_ATOM, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed") + + /* Initialize class fields */ + cls->type_id = new_type; + cls->flags = H5I_CLASS_IS_APPLICATION; + cls->hash_size = hash_size; + cls->reserved = reserved; + cls->free_func = free_func; + + /* Register the new ID class */ + if(H5I_register_type(cls) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, H5I_BADID, "can't initialize ID class") + + /* Set return value */ + ret_value = new_type; done: + /* Clean up on error */ + if(ret_value < 0) { + if(cls) + cls = H5FL_FREE(H5I_class_t, cls); + } /* end if */ + FUNC_LEAVE_API(ret_value) } /* end H5Iregister_type() */ @@ -248,17 +304,9 @@ done: /*------------------------------------------------------------------------- * Function: H5I_register_type * - * Purpose: Creates a new type of ID's to give out. A specific number - * (RESERVED) of type entries may be reserved to enable "constant" - * values to be handed out which are valid IDs in the type, but - * which do not map to any data structures and are not allocated - * dynamically later. TYPE_ID is the H5I_type_t value of the type - * to be initialized. If this value is zero, a new type is created. - * If this value is one of the library types, that type is - * initialized or its reference count is incremented (if it is already - * initialized). HASH_SIZE is the minimum hash table size to - * use for the type. FREE_FUNC is called with an object pointer - * when the object is removed from the type. + * Purpose: Creates a new type of ID's to give out. + * The class is initialized or its reference count is incremented + * (if it is already initialized). * * Return: Success: Type ID of the new type * Failure: H5I_BADID @@ -269,75 +317,44 @@ done: * *------------------------------------------------------------------------- */ -H5I_type_t -H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved, - H5I_free_t free_func) +herr_t +H5I_register_type(const H5I_class_t *cls) { - H5I_id_type_t *type_ptr = NULL; /*ptr to the atomic type*/ - H5I_type_t ret_value = H5I_BADID; /* type ID to return */ - - FUNC_ENTER_NOAPI(H5I_BADID) + H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/ + herr_t ret_value = SUCCEED; /* Return value */ - /* Check that type_id is either a library type or zero */ - if(type_id < 0 || type_id >= H5I_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_BADID, "invalid type ID") - - if(type_id == 0) { /* Generate a new H5I_type_t value */ - /* Increment the number of types*/ - if(H5I_next_type < MAX_NUM_TYPES) { - ret_value = H5I_next_type; - H5_INC_ENUM(H5I_type_t, H5I_next_type); - } - else { - hbool_t done; /* Indicate that search was successful */ - int i; /* Local index variable */ - - /* Look for a free type to give out */ - done = FALSE; - for(i = H5I_NTYPES; i < MAX_NUM_TYPES && done == FALSE; i++) { - if(NULL == H5I_id_type_list_g[i]) { - /* Found a free type ID */ - ret_value = (H5I_type_t)i; - done = TRUE; - } /* end if */ - } /* end for */ + FUNC_ENTER_NOAPI(FAIL) - /* Verify that we found a type to give out */ - if(done == FALSE) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded.") - } /* end else */ - } /* end if */ - else /* type_id is a library type; use this value. */ - ret_value = type_id; + /* Sanity check */ + HDassert(cls); + HDassert(cls->type_id > 0 && cls->type_id < H5I_MAX_NUM_TYPES); /* Initialize the type */ /* Check arguments */ #ifdef HASH_SIZE_POWER_2 - if(!POWER_OF_TWO(hash_size) || hash_size == 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_BADID, "invalid hash size") + if(!POWER_OF_TWO(cls->hash_size) || cls->hash_size == 1) + HGOTO_ERROR(H5E_ATOM, H5E_BADRANGE, FAIL, "invalid hash size") #endif /* HASH_SIZE_POWER_2 */ - if(NULL == H5I_id_type_list_g[ret_value]) { + if(NULL == H5I_id_type_list_g[cls->type_id]) { /* Allocate the type information for new type */ - if(NULL == (type_ptr = (H5I_id_type_t *)H5MM_calloc(sizeof(H5I_id_type_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "memory allocation failed") - H5I_id_type_list_g[ret_value] = type_ptr; + if(NULL == (type_ptr = (H5I_id_type_t *)H5FL_CALLOC(H5I_id_type_t))) + HGOTO_ERROR(H5E_ATOM, H5E_CANTALLOC, FAIL, "ID type allocation failed") + H5I_id_type_list_g[cls->type_id] = type_ptr; } /* end if */ else { /* Get the pointer to the existing type */ - type_ptr = H5I_id_type_list_g[ret_value]; + type_ptr = H5I_id_type_list_g[cls->type_id]; } /* end else */ + /* Initialize the ID type structure for new types */ if(type_ptr->count == 0) { - /* Initialize the ID type structure for new types */ - type_ptr->hash_size = hash_size; - type_ptr->reserved = reserved; + type_ptr->cls = cls; type_ptr->wrapped = 0; type_ptr->ids = 0; - type_ptr->nextid = reserved; - type_ptr->free_func = free_func; - type_ptr->id_list = (H5I_id_info_t **)H5MM_calloc(hash_size * sizeof(H5I_id_info_t *)); + type_ptr->nextid = cls->reserved; + type_ptr->id_list = (H5I_id_info_t **)H5MM_calloc(cls->hash_size * sizeof(H5I_id_info_t *)); if(NULL == type_ptr->id_list) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "memory allocation failed") } /* end if */ @@ -346,10 +363,11 @@ H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved, type_ptr->count++; done: - if(ret_value == H5I_BADID) { /* Clean up on error */ - if(type_ptr != NULL) { - H5MM_xfree(type_ptr->id_list); - H5MM_xfree(type_ptr); + if(ret_value < 0) { /* Clean up on error */ + if(type_ptr) { + if(type_ptr->id_list) + H5MM_xfree(type_ptr->id_list); + (void)H5FL_FREE(H5I_id_type_t, type_ptr); } /* end if */ } /* end if */ @@ -566,7 +584,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) * counts. Ignore the return value from from the free method and remove * object from type regardless if FORCE is non-zero. */ - for(i = 0; i < type_ptr->hash_size; i++) { + for(i = 0; i < type_ptr->cls->hash_size; i++) { H5I_id_info_t *cur; /* Current node being worked with */ H5I_id_info_t *next; /* Next node in list */ @@ -584,7 +602,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) /* Check for a 'free' function and call it, if it exists */ /* (Casting away const OK -QAK) */ - if(type_ptr->free_func && (type_ptr->free_func)((void *)cur->obj_ptr) < 0) { + if(type_ptr->cls->free_func && (type_ptr->cls->free_func)((void *)cur->obj_ptr) < 0) { if(force) { #ifdef H5I_DEBUG if(H5DEBUG(I)) { @@ -723,12 +741,17 @@ H5I_destroy_type(H5I_type_t type) HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type") /* Close/clear/destroy all IDs for this type */ - H5I_clear_type(type, TRUE, FALSE); - H5E_clear_stack(NULL); /*don't care about errors*/ + H5E_BEGIN_TRY { + H5I_clear_type(type, TRUE, FALSE); + } H5E_END_TRY /*don't care about errors*/ - H5MM_xfree(type_ptr->id_list); + /* Check if we should release the ID class */ + if(type_ptr->cls->flags & H5I_CLASS_IS_APPLICATION) + type_ptr->cls = H5FL_FREE(H5I_class_t, (void *)type_ptr->cls); - H5MM_free(type_ptr); + type_ptr->id_list = H5MM_xfree(type_ptr->id_list); + + type_ptr = H5FL_FREE(H5I_id_type_t, type_ptr); H5I_id_type_list_g[type] = NULL; done: @@ -824,7 +847,7 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref) id_ptr->next = NULL; /* hash bucket already full, prepend to front of chain */ - hash_loc = type_ptr->nextid % (unsigned)type_ptr->hash_size; + hash_loc = type_ptr->nextid % (unsigned)type_ptr->cls->hash_size; if(type_ptr->id_list[hash_loc] != NULL) id_ptr->next = type_ptr->id_list[hash_loc]; @@ -840,7 +863,7 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref) */ if(type_ptr->nextid > (unsigned)ID_MASK) { type_ptr->wrapped = 1; - type_ptr->nextid = type_ptr->reserved; + type_ptr->nextid = type_ptr->cls->reserved; } /* end if */ /* @@ -854,14 +877,14 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref) * we check all possible values and didn't find any free ones *then* * we can fail. */ - for(i = type_ptr->reserved; i < ID_MASK; i++) { + for(i = type_ptr->cls->reserved; i < ID_MASK; i++) { /* Handle end of range by wrapping to beginning */ if(type_ptr->nextid > (unsigned)ID_MASK) - type_ptr->nextid = type_ptr->reserved; + type_ptr->nextid = type_ptr->cls->reserved; /* new ID to check for */ next_id = H5I_MAKE(type, type_ptr->nextid); - hash_loc = (unsigned)H5I_LOC(type_ptr->nextid, type_ptr->hash_size); + hash_loc = (unsigned)H5I_LOC(type_ptr->nextid, type_ptr->cls->hash_size); curr_id = type_ptr->id_list[hash_loc]; if(curr_id == NULL) break; /* Ha! this is not likely... */ @@ -1205,7 +1228,7 @@ H5I_remove(hid_t id) HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "invalid type") /* Get the bucket in which the ID is located */ - hash_loc = (unsigned)H5I_LOC(id, type_ptr->hash_size); + hash_loc = (unsigned)H5I_LOC(id, type_ptr->cls->hash_size); curr_id = type_ptr->id_list[hash_loc]; if(NULL == curr_id) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "invalid ID") @@ -1336,7 +1359,7 @@ H5I_dec_ref(hid_t id) */ if(1 == id_ptr->count) { /* (Casting away const OK -QAK) */ - if(!type_ptr->free_func || (type_ptr->free_func)((void *)id_ptr->obj_ptr) >= 0) { + if(!type_ptr->cls->free_func || (type_ptr->cls->free_func)((void *)id_ptr->obj_ptr) >= 0) { H5I_remove(id); ret_value = 0; } /* end if */ @@ -1933,13 +1956,12 @@ H5I_search_cb(void *obj, hid_t id, void *_udata) H5I_search_ud_t *udata = (H5I_search_ud_t *)_udata; /* User data for callback */ int ret_value; /* Callback return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR ret_value = (*udata->app_cb)(obj, id, udata->app_key); if(ret_value > 0) udata->ret_obj = obj; -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5I_search_cb() */ @@ -2045,7 +2067,7 @@ H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_re unsigned u; /* Counter */ /* Start at the beginning of the array */ - for(u = 0; u < type_ptr->hash_size; u++) { + for(u = 0; u < type_ptr->cls->hash_size; u++) { H5I_id_info_t *id_ptr; /* Ptr to the new ID */ id_ptr = type_ptr->id_list[u]; @@ -2110,7 +2132,7 @@ H5I_find_id(hid_t id) HGOTO_DONE(NULL); /* Get the bucket in which the ID is located */ - hash_loc = (unsigned)H5I_LOC(id, type_ptr->hash_size); + hash_loc = (unsigned)H5I_LOC(id, type_ptr->cls->hash_size); id_ptr = type_ptr->id_list[hash_loc]; /* Scan the bucket's linked list for a match */ @@ -2297,9 +2319,9 @@ H5I_debug(H5I_type_t type) /* Header */ fprintf(stderr, " count = %u\n", type_ptr->count); - fprintf(stderr, " reserved = %u\n", type_ptr->reserved); + fprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved); fprintf(stderr, " wrapped = %u\n", type_ptr->wrapped); - fprintf(stderr, " hash_size = %lu\n", (unsigned long)type_ptr->hash_size); + fprintf(stderr, " hash_size = %lu\n", (unsigned long)type_ptr->cls->hash_size); fprintf(stderr, " ids = %u\n", type_ptr->ids); fprintf(stderr, " nextid = %u\n", type_ptr->nextid); diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h index f17a4b0..dc8e867 100644 --- a/src/H5Ipkg.h +++ b/src/H5Ipkg.h @@ -46,7 +46,7 @@ #define TYPE_BITS 7 #define TYPE_MASK ((1< 0 && type < H5I_NTYPES) -/* Default sizes of the hash-tables for various atom types */ -#define H5I_ERRSTACK_HASHSIZE 64 -#define H5I_FILEID_HASHSIZE 64 -#define H5I_TEMPID_HASHSIZE 64 -#define H5I_DATATYPEID_HASHSIZE 64 -#define H5I_DATASPACEID_HASHSIZE 64 -#define H5I_DATASETID_HASHSIZE 64 -#define H5I_OID_HASHSIZE 64 -#define H5I_GROUPID_HASHSIZE 64 -#define H5I_ATTRID_HASHSIZE 64 -#define H5I_REFID_HASHSIZE 64 -#define H5I_VFL_HASHSIZE 64 -#define H5I_GENPROPCLS_HASHSIZE 64 -#define H5I_GENPROPOBJ_HASHSIZE 128 -#define H5I_ERRCLS_HASHSIZE 64 -#define H5I_ERRMSG_HASHSIZE 64 -#define H5I_ERRSTK_HASHSIZE 64 - -/* Private Functions in H5I.c */ -H5_DLL H5I_type_t H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved, H5I_free_t free_func); +/* Flags for ID class */ +#define H5I_CLASS_IS_APPLICATION 0x01 + + +/****************************/ +/* Library Private Typedefs */ +/****************************/ + +typedef struct H5I_class_t { + H5I_type_t type_id; /* Class ID for the type */ + unsigned flags; /* Class behavior flags */ + size_t hash_size; /* Minimum hash table size for the type */ + unsigned reserved; /* Number of reserved IDs for this type */ + /* [A specific number of type entries may be + * reserved to enable "constant" values to be + * handed out which are valid IDs in the type, + * but which do not map to any data structures + * and are not allocated dynamically later.] + */ + H5I_free_t free_func; /* Free function for object's of this type */ +} H5I_class_t; + + +/*****************************/ +/* Library-private Variables */ +/*****************************/ + + +/***************************************/ +/* Library-private Function Prototypes */ +/***************************************/ +H5_DLL herr_t H5I_register_type(const H5I_class_t *cls); H5_DLL int H5I_nmembers(H5I_type_t type); H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref); H5_DLL int H5I_destroy_type(H5I_type_t type); diff --git a/src/H5Pint.c b/src/H5Pint.c index b216ab3..dae7b08 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -38,6 +38,7 @@ #include "H5MMprivate.h" /* Memory management */ #include "H5Ppkg.h" /* Property lists */ + /****************/ /* Local Macros */ /****************/ @@ -236,6 +237,25 @@ H5FL_DEFINE_STATIC(H5P_genprop_t); /* Declare a free list to manage the H5P_genplist_t struct */ H5FL_DEFINE_STATIC(H5P_genplist_t); +/* Generic Property Class ID class */ +static const H5I_class_t H5I_GENPROPCLS_CLS[1] = {{ + H5I_GENPROP_CLS, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5P_close_class /* Callback routine for closing objects of this class */ +}}; + +/* Generic Property List ID class */ +static const H5I_class_t H5I_GENPROPLST_CLS[1] = {{ + H5I_GENPROP_LST, /* ID class value */ + 0, /* Class flags */ + 128, /* Minimum hash size for class */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5P_close /* Callback routine for closing objects of this class */ +}}; + + /*-------------------------------------------------------------------------- NAME @@ -357,9 +377,9 @@ H5P_init_interface(void) /* * Initialize the Generic Property class & object groups. */ - if(H5I_register_type(H5I_GENPROP_CLS, (size_t)H5I_GENPROPCLS_HASHSIZE, 0, (H5I_free_t)H5P_close_class) < 0) + if(H5I_register_type(H5I_GENPROPCLS_CLS) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group") - if(H5I_register_type(H5I_GENPROP_LST, (size_t)H5I_GENPROPOBJ_HASHSIZE, 0, (H5I_free_t)H5P_close) < 0) + if(H5I_register_type(H5I_GENPROPLST_CLS) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group") /* Repeatedly pass over the list of property list classes for the library, diff --git a/src/H5R.c b/src/H5R.c index 57eab83..8fac4bf 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -13,12 +13,19 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/****************/ +/* Module Setup */ +/****************/ + #define H5R_PACKAGE /*suppress error about including H5Rpkg */ /* Interface initialization */ #define H5_INTERFACE_INIT_FUNC H5R_init_interface +/***********/ +/* Headers */ +/***********/ #include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Dprivate.h" /* Datasets */ @@ -30,18 +37,52 @@ #include "H5Rpkg.h" /* References */ #include "H5Sprivate.h" /* Dataspaces */ -/* Local macro definitions */ -/* Number of reserved IDs in ID group */ -#define H5R_RESERVED_ATOMS 0 +/****************/ +/* Local Macros */ +/****************/ + + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Local Prototypes */ +/********************/ -/* Static functions */ static herr_t H5R_create(void *ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id); static H5S_t * H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref); static ssize_t H5R_get_name(H5F_t *file, hid_t lapl_id, hid_t dxpl_id, hid_t id, H5R_type_t ref_type, const void *_ref, char *name, size_t size); + +/*********************/ +/* Package Variables */ +/*********************/ + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/*******************/ +/* Local Variables */ +/*******************/ + +/* Reference ID class */ +static const H5I_class_t H5I_REFERENCE_CLS[1] = {{ + H5I_REFERENCE, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 0, /* # of reserved IDs for class */ + NULL /* Callback routine for closing objects of this class */ +}}; + + /*------------------------------------------------------------------------- * Function: H5R_init @@ -89,7 +130,7 @@ H5R_init_interface(void) FUNC_ENTER_NOAPI_NOINIT /* Initialize the atom group for the file IDs */ - if(H5I_register_type(H5I_REFERENCE, (size_t)H5I_REFID_HASHSIZE, H5R_RESERVED_ATOMS, (H5I_free_t)NULL) < 0) + if(H5I_register_type(H5I_REFERENCE_CLS) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to initialize interface"); done: diff --git a/src/H5S.c b/src/H5S.c index 5d99066..7ef1da4 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -13,12 +13,19 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/****************/ +/* Module Setup */ +/****************/ + #define H5S_PACKAGE /*suppress error about including H5Spkg */ /* Interface initialization */ #define H5_INTERFACE_INIT_FUNC H5S_init_interface +/***********/ +/* Headers */ +/***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ @@ -28,26 +35,48 @@ #include "H5Oprivate.h" /* Object headers */ #include "H5Spkg.h" /* Dataspaces */ -/* Local macro definitions */ -/* Number of reserved IDs in ID group */ -#define H5S_RESERVED_ATOMS 2 +/****************/ +/* Local Macros */ +/****************/ /* Version of datatype encoding */ #define H5S_ENCODE_VERSION 0 -/* Local static function prototypes */ + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Local Prototypes */ +/********************/ static herr_t H5S_set_extent_simple (H5S_t *space, unsigned rank, const hsize_t *dims, const hsize_t *max); static htri_t H5S_is_simple(const H5S_t *sdim); static herr_t H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc); static H5S_t *H5S_decode(const unsigned char *buf); + +/*********************/ +/* Package Variables */ +/*********************/ + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ #ifdef H5_HAVE_PARALLEL /* Global vars whose value can be set from environment variable also */ hbool_t H5S_mpi_opt_types_g = TRUE; #endif /* H5_HAVE_PARALLEL */ + +/*******************/ +/* Local Variables */ +/*******************/ + /* Declare a free list to manage the H5S_extent_t struct */ H5FL_DEFINE(H5S_extent_t); @@ -57,6 +86,16 @@ H5FL_DEFINE(H5S_t); /* Declare a free list to manage the array's of hsize_t's */ H5FL_ARR_DEFINE(hsize_t,H5S_MAX_RANK); +/* Dataspace ID class */ +static const H5I_class_t H5I_DATASPACE_CLS[1] = {{ + H5I_DATASPACE, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 2, /* # of reserved IDs for class */ + (H5I_free_t)H5S_close /* Callback routine for closing objects of this class */ +}}; + + /*-------------------------------------------------------------------------- NAME @@ -78,7 +117,7 @@ H5S_init_interface(void) FUNC_ENTER_NOAPI_NOINIT /* Initialize the atom group for the file IDs */ - if(H5I_register_type(H5I_DATASPACE, (size_t)H5I_DATASPACEID_HASHSIZE, H5S_RESERVED_ATOMS, (H5I_free_t)H5S_close) < 0) + if(H5I_register_type(H5I_DATASPACE_CLS) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize interface") #ifdef H5_HAVE_PARALLEL diff --git a/src/H5T.c b/src/H5T.c index 73a1470..b2d97bc 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -51,233 +51,11 @@ #include #endif /* H5_HAVE_SYS_FPU_H */ -/* - * Predefined data types. These are initialized at runtime in H5Tinit.c and - * by H5T_init_interface() in this source file. - * - * If more of these are added, the new ones must be added to the list of - * types to reset in H5T_term_interface(). - */ -hid_t H5T_IEEE_F32BE_g = FAIL; -hid_t H5T_IEEE_F32LE_g = FAIL; -hid_t H5T_IEEE_F64BE_g = FAIL; -hid_t H5T_IEEE_F64LE_g = FAIL; - -hid_t H5T_VAX_F32_g = FAIL; -hid_t H5T_VAX_F64_g = FAIL; - -hid_t H5T_STD_I8BE_g = FAIL; -hid_t H5T_STD_I8LE_g = FAIL; -hid_t H5T_STD_I16BE_g = FAIL; -hid_t H5T_STD_I16LE_g = FAIL; -hid_t H5T_STD_I32BE_g = FAIL; -hid_t H5T_STD_I32LE_g = FAIL; -hid_t H5T_STD_I64BE_g = FAIL; -hid_t H5T_STD_I64LE_g = FAIL; -hid_t H5T_STD_U8BE_g = FAIL; -hid_t H5T_STD_U8LE_g = FAIL; -hid_t H5T_STD_U16BE_g = FAIL; -hid_t H5T_STD_U16LE_g = FAIL; -hid_t H5T_STD_U32BE_g = FAIL; -hid_t H5T_STD_U32LE_g = FAIL; -hid_t H5T_STD_U64BE_g = FAIL; -hid_t H5T_STD_U64LE_g = FAIL; -hid_t H5T_STD_B8BE_g = FAIL; -hid_t H5T_STD_B8LE_g = FAIL; -hid_t H5T_STD_B16BE_g = FAIL; -hid_t H5T_STD_B16LE_g = FAIL; -hid_t H5T_STD_B32BE_g = FAIL; -hid_t H5T_STD_B32LE_g = FAIL; -hid_t H5T_STD_B64BE_g = FAIL; -hid_t H5T_STD_B64LE_g = FAIL; -hid_t H5T_STD_REF_OBJ_g = FAIL; -hid_t H5T_STD_REF_DSETREG_g = FAIL; -hid_t H5T_UNIX_D32BE_g = FAIL; -hid_t H5T_UNIX_D32LE_g = FAIL; -hid_t H5T_UNIX_D64BE_g = FAIL; -hid_t H5T_UNIX_D64LE_g = FAIL; - -hid_t H5T_C_S1_g = FAIL; - -hid_t H5T_FORTRAN_S1_g = FAIL; - -hid_t H5T_NATIVE_SCHAR_g = FAIL; -hid_t H5T_NATIVE_UCHAR_g = FAIL; -hid_t H5T_NATIVE_SHORT_g = FAIL; -hid_t H5T_NATIVE_USHORT_g = FAIL; -hid_t H5T_NATIVE_INT_g = FAIL; -hid_t H5T_NATIVE_UINT_g = FAIL; -hid_t H5T_NATIVE_LONG_g = FAIL; -hid_t H5T_NATIVE_ULONG_g = FAIL; -hid_t H5T_NATIVE_LLONG_g = FAIL; -hid_t H5T_NATIVE_ULLONG_g = FAIL; -hid_t H5T_NATIVE_FLOAT_g = FAIL; -hid_t H5T_NATIVE_DOUBLE_g = FAIL; -#if H5_SIZEOF_LONG_DOUBLE !=0 -hid_t H5T_NATIVE_LDOUBLE_g = FAIL; -#endif -hid_t H5T_NATIVE_B8_g = FAIL; -hid_t H5T_NATIVE_B16_g = FAIL; -hid_t H5T_NATIVE_B32_g = FAIL; -hid_t H5T_NATIVE_B64_g = FAIL; -hid_t H5T_NATIVE_OPAQUE_g = FAIL; -hid_t H5T_NATIVE_HADDR_g = FAIL; -hid_t H5T_NATIVE_HSIZE_g = FAIL; -hid_t H5T_NATIVE_HSSIZE_g = FAIL; -hid_t H5T_NATIVE_HERR_g = FAIL; -hid_t H5T_NATIVE_HBOOL_g = FAIL; - -hid_t H5T_NATIVE_INT8_g = FAIL; -hid_t H5T_NATIVE_UINT8_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST8_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST8_g = FAIL; -hid_t H5T_NATIVE_INT_FAST8_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST8_g = FAIL; - -hid_t H5T_NATIVE_INT16_g = FAIL; -hid_t H5T_NATIVE_UINT16_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST16_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST16_g = FAIL; -hid_t H5T_NATIVE_INT_FAST16_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST16_g = FAIL; - -hid_t H5T_NATIVE_INT32_g = FAIL; -hid_t H5T_NATIVE_UINT32_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST32_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST32_g = FAIL; -hid_t H5T_NATIVE_INT_FAST32_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST32_g = FAIL; - -hid_t H5T_NATIVE_INT64_g = FAIL; -hid_t H5T_NATIVE_UINT64_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST64_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST64_g = FAIL; -hid_t H5T_NATIVE_INT_FAST64_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST64_g = FAIL; - -/* - * Alignment constraints for native types. These are initialized at run time - * in H5Tinit.c. These alignments are mainly for offsets in HDF5 compound - * datatype or C structures, which are different from the alignments for memory - * address below this group of variables. - */ -size_t H5T_NATIVE_SCHAR_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_UCHAR_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_SHORT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_USHORT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_INT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_LONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_ULONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_LLONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_ULLONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g = 0; -#if H5_SIZEOF_LONG_DOUBLE !=0 -size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g = 0; -#endif - -size_t H5T_POINTER_COMP_ALIGN_g = 0; -size_t H5T_HVL_COMP_ALIGN_g = 0; -size_t H5T_HOBJREF_COMP_ALIGN_g = 0; -size_t H5T_HDSETREGREF_COMP_ALIGN_g = 0; - -/* - * Alignment constraints for native types. These are initialized at run time - * in H5Tinit.c - */ -size_t H5T_NATIVE_SCHAR_ALIGN_g = 0; -size_t H5T_NATIVE_UCHAR_ALIGN_g = 0; -size_t H5T_NATIVE_SHORT_ALIGN_g = 0; -size_t H5T_NATIVE_USHORT_ALIGN_g = 0; -size_t H5T_NATIVE_INT_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_ALIGN_g = 0; -size_t H5T_NATIVE_LONG_ALIGN_g = 0; -size_t H5T_NATIVE_ULONG_ALIGN_g = 0; -size_t H5T_NATIVE_LLONG_ALIGN_g = 0; -size_t H5T_NATIVE_ULLONG_ALIGN_g = 0; -size_t H5T_NATIVE_FLOAT_ALIGN_g = 0; -size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0; -#if H5_SIZEOF_LONG_DOUBLE !=0 -size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; -#endif - -/* - * Alignment constraints for C9x types. These are initialized at run time in - * H5Tinit.c if the types are provided by the system. Otherwise we set their - * values to 0 here (no alignment calculated). - */ -size_t H5T_NATIVE_INT8_ALIGN_g = 0; -size_t H5T_NATIVE_UINT8_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST8_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST8_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST8_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST8_ALIGN_g = 0; - -size_t H5T_NATIVE_INT16_ALIGN_g = 0; -size_t H5T_NATIVE_UINT16_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST16_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST16_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST16_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST16_ALIGN_g = 0; - -size_t H5T_NATIVE_INT32_ALIGN_g = 0; -size_t H5T_NATIVE_UINT32_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST32_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST32_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST32_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST32_ALIGN_g = 0; - -size_t H5T_NATIVE_INT64_ALIGN_g = 0; -size_t H5T_NATIVE_UINT64_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST64_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST64_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST64_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0; - -/* Useful floating-point values for conversion routines */ -/* (+/- Inf for all floating-point types) */ -float H5T_NATIVE_FLOAT_POS_INF_g = 0.0; -float H5T_NATIVE_FLOAT_NEG_INF_g = 0.0; -double H5T_NATIVE_DOUBLE_POS_INF_g = 0.0; -double H5T_NATIVE_DOUBLE_NEG_INF_g = 0.0; - - -/* - * The path database. Each path has a source and destination data type pair - * which is used as the key by which the `entries' array is sorted. - */ -static struct { - int npaths; /*number of paths defined */ - size_t apaths; /*number of paths allocated */ - H5T_path_t **path; /*sorted array of path pointers */ - int nsoft; /*number of soft conversions defined */ - size_t asoft; /*number of soft conversions allocated */ - H5T_soft_t *soft; /*unsorted array of soft conversions */ -} H5T_g; - -/* The native endianess of the platform */ -H5T_order_t H5T_native_order_g = H5T_ORDER_ERROR; - -/* Declare the free list for H5T_t's and H5T_shared_t's */ -H5FL_DEFINE(H5T_t); -H5FL_DEFINE(H5T_shared_t); - -/* Declare the free list for H5T_path_t's */ -H5FL_DEFINE(H5T_path_t); - -/* Static local functions */ -static herr_t H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, - H5T_t *dst, H5T_conv_t func, hid_t dxpl_id); -static herr_t H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, - H5T_t *dst, H5T_conv_t func, hid_t dxpl_id, hbool_t api_call); -static htri_t H5T_compiler_conv(H5T_t *src, H5T_t *dst); -static herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc); -static H5T_t *H5T_decode(const unsigned char *buf); -static herr_t H5T_set_size(H5T_t *dt, size_t size); +/****************/ +/* Local Macros */ +/****************/ -/* Local macro definitions */ #define H5T_ENCODE_VERSION 0 /* @@ -500,6 +278,264 @@ static herr_t H5T_set_size(H5T_t *dt, size_t size); HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom") \ } + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Local Prototypes */ +/********************/ +static herr_t H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, + H5T_t *dst, H5T_conv_t func, hid_t dxpl_id); +static herr_t H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, + H5T_t *dst, H5T_conv_t func, hid_t dxpl_id, hbool_t api_call); +static htri_t H5T_compiler_conv(H5T_t *src, H5T_t *dst); +static herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc); +static H5T_t *H5T_decode(const unsigned char *buf); +static herr_t H5T_set_size(H5T_t *dt, size_t size); + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + +/* The native endianess of the platform */ +H5T_order_t H5T_native_order_g = H5T_ORDER_ERROR; + + +/*********************/ +/* Package Variables */ +/*********************/ + +/* + * Predefined data types. These are initialized at runtime in H5Tinit.c and + * by H5T_init_interface() in this source file. + * + * If more of these are added, the new ones must be added to the list of + * types to reset in H5T_term_interface(). + */ +hid_t H5T_IEEE_F32BE_g = FAIL; +hid_t H5T_IEEE_F32LE_g = FAIL; +hid_t H5T_IEEE_F64BE_g = FAIL; +hid_t H5T_IEEE_F64LE_g = FAIL; + +hid_t H5T_VAX_F32_g = FAIL; +hid_t H5T_VAX_F64_g = FAIL; + +hid_t H5T_STD_I8BE_g = FAIL; +hid_t H5T_STD_I8LE_g = FAIL; +hid_t H5T_STD_I16BE_g = FAIL; +hid_t H5T_STD_I16LE_g = FAIL; +hid_t H5T_STD_I32BE_g = FAIL; +hid_t H5T_STD_I32LE_g = FAIL; +hid_t H5T_STD_I64BE_g = FAIL; +hid_t H5T_STD_I64LE_g = FAIL; +hid_t H5T_STD_U8BE_g = FAIL; +hid_t H5T_STD_U8LE_g = FAIL; +hid_t H5T_STD_U16BE_g = FAIL; +hid_t H5T_STD_U16LE_g = FAIL; +hid_t H5T_STD_U32BE_g = FAIL; +hid_t H5T_STD_U32LE_g = FAIL; +hid_t H5T_STD_U64BE_g = FAIL; +hid_t H5T_STD_U64LE_g = FAIL; +hid_t H5T_STD_B8BE_g = FAIL; +hid_t H5T_STD_B8LE_g = FAIL; +hid_t H5T_STD_B16BE_g = FAIL; +hid_t H5T_STD_B16LE_g = FAIL; +hid_t H5T_STD_B32BE_g = FAIL; +hid_t H5T_STD_B32LE_g = FAIL; +hid_t H5T_STD_B64BE_g = FAIL; +hid_t H5T_STD_B64LE_g = FAIL; +hid_t H5T_STD_REF_OBJ_g = FAIL; +hid_t H5T_STD_REF_DSETREG_g = FAIL; + +hid_t H5T_UNIX_D32BE_g = FAIL; +hid_t H5T_UNIX_D32LE_g = FAIL; +hid_t H5T_UNIX_D64BE_g = FAIL; +hid_t H5T_UNIX_D64LE_g = FAIL; + +hid_t H5T_C_S1_g = FAIL; + +hid_t H5T_FORTRAN_S1_g = FAIL; + +hid_t H5T_NATIVE_SCHAR_g = FAIL; +hid_t H5T_NATIVE_UCHAR_g = FAIL; +hid_t H5T_NATIVE_SHORT_g = FAIL; +hid_t H5T_NATIVE_USHORT_g = FAIL; +hid_t H5T_NATIVE_INT_g = FAIL; +hid_t H5T_NATIVE_UINT_g = FAIL; +hid_t H5T_NATIVE_LONG_g = FAIL; +hid_t H5T_NATIVE_ULONG_g = FAIL; +hid_t H5T_NATIVE_LLONG_g = FAIL; +hid_t H5T_NATIVE_ULLONG_g = FAIL; +hid_t H5T_NATIVE_FLOAT_g = FAIL; +hid_t H5T_NATIVE_DOUBLE_g = FAIL; +#if H5_SIZEOF_LONG_DOUBLE !=0 +hid_t H5T_NATIVE_LDOUBLE_g = FAIL; +#endif +hid_t H5T_NATIVE_B8_g = FAIL; +hid_t H5T_NATIVE_B16_g = FAIL; +hid_t H5T_NATIVE_B32_g = FAIL; +hid_t H5T_NATIVE_B64_g = FAIL; +hid_t H5T_NATIVE_OPAQUE_g = FAIL; +hid_t H5T_NATIVE_HADDR_g = FAIL; +hid_t H5T_NATIVE_HSIZE_g = FAIL; +hid_t H5T_NATIVE_HSSIZE_g = FAIL; +hid_t H5T_NATIVE_HERR_g = FAIL; +hid_t H5T_NATIVE_HBOOL_g = FAIL; + +hid_t H5T_NATIVE_INT8_g = FAIL; +hid_t H5T_NATIVE_UINT8_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST8_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST8_g = FAIL; +hid_t H5T_NATIVE_INT_FAST8_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST8_g = FAIL; + +hid_t H5T_NATIVE_INT16_g = FAIL; +hid_t H5T_NATIVE_UINT16_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST16_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST16_g = FAIL; +hid_t H5T_NATIVE_INT_FAST16_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST16_g = FAIL; + +hid_t H5T_NATIVE_INT32_g = FAIL; +hid_t H5T_NATIVE_UINT32_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST32_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST32_g = FAIL; +hid_t H5T_NATIVE_INT_FAST32_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST32_g = FAIL; + +hid_t H5T_NATIVE_INT64_g = FAIL; +hid_t H5T_NATIVE_UINT64_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST64_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST64_g = FAIL; +hid_t H5T_NATIVE_INT_FAST64_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST64_g = FAIL; + +/* + * Alignment constraints for native types. These are initialized at run time + * in H5Tinit.c. These alignments are mainly for offsets in HDF5 compound + * datatype or C structures, which are different from the alignments for memory + * address below this group of variables. + */ +size_t H5T_NATIVE_SCHAR_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_UCHAR_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_SHORT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_USHORT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_INT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_LONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_ULONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_LLONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_ULLONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g = 0; +#if H5_SIZEOF_LONG_DOUBLE !=0 +size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g = 0; +#endif + +size_t H5T_POINTER_COMP_ALIGN_g = 0; +size_t H5T_HVL_COMP_ALIGN_g = 0; +size_t H5T_HOBJREF_COMP_ALIGN_g = 0; +size_t H5T_HDSETREGREF_COMP_ALIGN_g = 0; + +/* + * Alignment constraints for native types. These are initialized at run time + * in H5Tinit.c + */ +size_t H5T_NATIVE_SCHAR_ALIGN_g = 0; +size_t H5T_NATIVE_UCHAR_ALIGN_g = 0; +size_t H5T_NATIVE_SHORT_ALIGN_g = 0; +size_t H5T_NATIVE_USHORT_ALIGN_g = 0; +size_t H5T_NATIVE_INT_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_ALIGN_g = 0; +size_t H5T_NATIVE_LONG_ALIGN_g = 0; +size_t H5T_NATIVE_ULONG_ALIGN_g = 0; +size_t H5T_NATIVE_LLONG_ALIGN_g = 0; +size_t H5T_NATIVE_ULLONG_ALIGN_g = 0; +size_t H5T_NATIVE_FLOAT_ALIGN_g = 0; +size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0; +#if H5_SIZEOF_LONG_DOUBLE !=0 +size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; +#endif + +/* + * Alignment constraints for C9x types. These are initialized at run time in + * H5Tinit.c if the types are provided by the system. Otherwise we set their + * values to 0 here (no alignment calculated). + */ +size_t H5T_NATIVE_INT8_ALIGN_g = 0; +size_t H5T_NATIVE_UINT8_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST8_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST8_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST8_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST8_ALIGN_g = 0; + +size_t H5T_NATIVE_INT16_ALIGN_g = 0; +size_t H5T_NATIVE_UINT16_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST16_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST16_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST16_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST16_ALIGN_g = 0; + +size_t H5T_NATIVE_INT32_ALIGN_g = 0; +size_t H5T_NATIVE_UINT32_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST32_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST32_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST32_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST32_ALIGN_g = 0; + +size_t H5T_NATIVE_INT64_ALIGN_g = 0; +size_t H5T_NATIVE_UINT64_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST64_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST64_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST64_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0; + +/* Useful floating-point values for conversion routines */ +/* (+/- Inf for all floating-point types) */ +float H5T_NATIVE_FLOAT_POS_INF_g = 0.0; +float H5T_NATIVE_FLOAT_NEG_INF_g = 0.0; +double H5T_NATIVE_DOUBLE_POS_INF_g = 0.0; +double H5T_NATIVE_DOUBLE_NEG_INF_g = 0.0; + +/* Declare the free list for H5T_t's and H5T_shared_t's */ +H5FL_DEFINE(H5T_t); +H5FL_DEFINE(H5T_shared_t); + + +/*******************/ +/* Local Variables */ +/*******************/ + +/* + * The path database. Each path has a source and destination data type pair + * which is used as the key by which the `entries' array is sorted. + */ +static struct { + int npaths; /*number of paths defined */ + size_t apaths; /*number of paths allocated */ + H5T_path_t **path; /*sorted array of path pointers */ + int nsoft; /*number of soft conversions defined */ + size_t asoft; /*number of soft conversions allocated */ + H5T_soft_t *soft; /*unsorted array of soft conversions */ +} H5T_g; + +/* Declare the free list for H5T_path_t's */ +H5FL_DEFINE_STATIC(H5T_path_t); + +/* Datatype ID class */ +static const H5I_class_t H5I_DATATYPE_CLS[1] = {{ + H5I_DATATYPE, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 8, /* # of reserved IDs for class */ + (H5I_free_t)H5T_close /* Callback routine for closing objects of this class */ +}}; + + /*------------------------------------------------------------------------- * Function: H5T_init @@ -743,7 +779,7 @@ H5T_init_interface(void) FUNC_ENTER_NOAPI_NOINIT /* Initialize the atom group for the file IDs */ - if(H5I_register_type(H5I_DATATYPE, (size_t)H5I_DATATYPEID_HASHSIZE, H5T_RESERVED_ATOMS, (H5I_free_t)H5T_close)<0) + if(H5I_register_type(H5I_DATATYPE_CLS) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") /* Make certain there aren't too many classes of datatypes defined */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 6736920..b9364d6 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -46,9 +46,6 @@ /* Other public headers needed by this file */ #include "H5Spublic.h" /* Dataspace functions */ -/* Number of reserved IDs in ID group */ -#define H5T_RESERVED_ATOMS 8 - /* Length of debugging name buffer */ #define H5T_NAMELEN 32 diff --git a/test/tid.c b/test/tid.c index 97b28ca..87f3d37 100644 --- a/test/tid.c +++ b/test/tid.c @@ -451,11 +451,11 @@ out: /* Test boundary cases with lots of types */ -/* Type IDs range from H5I_NTYPES to MAX_NUM_TYPES. The system will assign */ -/* IDs in sequential order until MAX_NUM_TYPES IDs have been given out, at which */ +/* Type IDs range from H5I_NTYPES to H5I_MAX_NUM_TYPES. The system will assign */ +/* IDs in sequential order until H5I_MAX_NUM_TYPES IDs have been given out, at which */ /* point it will search for type IDs that were allocated but have since been */ /* deleted. */ -/* This test will allocate IDs up to MAX_NUM_TYPES, ensure that IDs wrap around */ +/* This test will allocate IDs up to H5I_MAX_NUM_TYPES, ensure that IDs wrap around */ /* to low values successfully, ensure that an error is thrown when all possible */ /* type IDs are taken, then ensure that deleting types frees up their IDs. */ /* Note that this test depends on the implementation of IDs, so may break */ @@ -463,7 +463,7 @@ out: /* Also note that if someone else registered a user-defined type and forgot to */ /* destroy it, this test will mysteriously fail (because it will expect there to */ /* be one more "free" type ID than there is). */ -/* H5I_NTYPES is defined in h5public.h, MAX_NUM_TYPES is defined in h5pkg.h */ +/* H5I_NTYPES is defined in h5public.h, H5I_MAX_NUM_TYPES is defined in h5pkg.h */ static int test_id_type_list(void) { H5I_type_t startType; /* The first type ID we were assigned in this test */ @@ -477,14 +477,14 @@ static int test_id_type_list(void) goto out; /* Sanity check */ - if(startType >= MAX_NUM_TYPES || startType < H5I_NTYPES) + if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES) { /* Error condition, throw an error */ CHECK(1, 1, "H5Iregister_type"); goto out; } - /* Create types up to MAX_NUM_TYPES */ - for(i = startType + 1; i < MAX_NUM_TYPES; i++) + /* Create types up to H5I_MAX_NUM_TYPES */ + for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++) { currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); CHECK(currentType, H5I_BADID, "H5Iregister_type"); @@ -519,7 +519,7 @@ static int test_id_type_list(void) goto out; /* Cleanup. Destroy all types. */ - for(i = H5I_NTYPES; i < MAX_NUM_TYPES; i++) + for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++) H5Idestroy_type((H5I_type_t) i); return 0; @@ -527,7 +527,7 @@ static int test_id_type_list(void) out: /* Cleanup. For simplicity, just destroy all types and ignore errors. */ H5E_BEGIN_TRY - for(i = H5I_NTYPES; i < MAX_NUM_TYPES; i++) + for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++) H5Idestroy_type((H5I_type_t) i); H5E_END_TRY return -1; -- cgit v0.12