summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-13 22:34:23 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-13 22:34:23 (GMT)
commit08359be858ae9e4595dab1f4a7718017d9af7663 (patch)
treebbe033fd134cfda5943dff96ef2a7f5f10d743e9
parent55822485c64197a6c2c4a623824fcdcd10a57d31 (diff)
downloadhdf5-08359be858ae9e4595dab1f4a7718017d9af7663.zip
hdf5-08359be858ae9e4595dab1f4a7718017d9af7663.tar.gz
hdf5-08359be858ae9e4595dab1f4a7718017d9af7663.tar.bz2
[svn-r23347] ported revision 23248:23346 from the trunk
-rw-r--r--CMakeLists.txt6
-rw-r--r--COPYING2
-rw-r--r--CTestConfig.cmake2
-rw-r--r--MANIFEST21
-rw-r--r--Makefile.in2
-rw-r--r--README.txt2
-rwxr-xr-xbin/checkposix2
-rwxr-xr-xbin/cmakehdf59
-rw-r--r--c++/Makefile.in2
-rw-r--r--c++/examples/Makefile.in2
-rw-r--r--c++/src/Makefile.in4
-rw-r--r--c++/test/Makefile.in2
-rwxr-xr-xconfig/cmake/CTestCustom.cmake67
-rw-r--r--config/cmake/grepTest.cmake2
-rwxr-xr-xconfig/cmake/mccacheinit.cmake7
-rw-r--r--config/cmake/userblockTest.cmake10
-rw-r--r--config/lt_vers.am2
-rwxr-xr-xconfigure203
-rw-r--r--configure.ac185
-rw-r--r--examples/Makefile.in2
-rw-r--r--fortran/Makefile.in2
-rw-r--r--fortran/examples/Makefile.in2
-rw-r--r--fortran/src/CMakeLists.txt1
-rw-r--r--fortran/src/H5Aff.f902
-rw-r--r--fortran/src/H5Aff_F03.f902
-rw-r--r--fortran/src/H5Aff_F90.f902
-rw-r--r--fortran/src/H5Dff.f902
-rw-r--r--fortran/src/H5Dff_F03.f902
-rw-r--r--fortran/src/H5Dff_F90.f902
-rw-r--r--fortran/src/H5Eff.f902
-rw-r--r--fortran/src/H5Eff_F03.f902
-rw-r--r--fortran/src/H5Eff_F90.f902
-rw-r--r--fortran/src/H5FDmpioff.f902
-rw-r--r--fortran/src/H5Ff.c34
-rw-r--r--fortran/src/H5Fff.f902
-rw-r--r--fortran/src/H5Fff_F03.f90104
-rw-r--r--fortran/src/H5Fff_F90.f9043
-rw-r--r--fortran/src/H5Gff.f902
-rw-r--r--fortran/src/H5Iff.f902
-rw-r--r--fortran/src/H5Lf.c2
-rw-r--r--fortran/src/H5Lff.f902
-rw-r--r--fortran/src/H5Lff_F03.f902
-rw-r--r--fortran/src/H5Lff_F90.f902
-rw-r--r--fortran/src/H5Off.f902
-rw-r--r--fortran/src/H5Off_F03.f902
-rw-r--r--fortran/src/H5Off_F90.f902
-rw-r--r--fortran/src/H5Pf.c38
-rw-r--r--fortran/src/H5Pff.f9023
-rw-r--r--fortran/src/H5Pff_F03.f902
-rw-r--r--fortran/src/H5Pff_F90.f902
-rw-r--r--fortran/src/H5Rff.f902
-rw-r--r--fortran/src/H5Rff_F03.f902
-rw-r--r--fortran/src/H5Rff_F90.f902
-rw-r--r--fortran/src/H5Sff.f902
-rw-r--r--fortran/src/H5Tff.f902
-rw-r--r--fortran/src/H5Tff_F03.f902
-rw-r--r--fortran/src/H5Tff_F90.f902
-rw-r--r--fortran/src/H5Zff.f902
-rw-r--r--fortran/src/H5_ff.f902
-rw-r--r--fortran/src/H5_ff_F03.f902
-rw-r--r--fortran/src/H5f90proto.h6
-rw-r--r--fortran/src/H5match_types.c13
-rw-r--r--fortran/src/HDF5.f901
-rw-r--r--fortran/src/Makefile.am9
-rw-r--r--fortran/src/Makefile.in26
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/CMakeLists.txt1
-rw-r--r--fortran/test/Makefile.am2
-rw-r--r--fortran/test/Makefile.in9
-rw-r--r--fortran/test/fortranlib_test_F03.f9010
-rw-r--r--fortran/test/tH5F_F03.f90175
-rw-r--r--fortran/test/tH5P.f90842
-rw-r--r--fortran/test/tH5P_F03.f90141
-rw-r--r--fortran/test/tH5T_F03.f9034
-rw-r--r--fortran/testpar/Makefile.in2
-rw-r--r--hl/Makefile.in2
-rw-r--r--hl/c++/Makefile.in2
-rw-r--r--hl/c++/examples/Makefile.in2
-rw-r--r--hl/c++/src/Makefile.in4
-rw-r--r--hl/c++/test/Makefile.in2
-rw-r--r--hl/examples/Makefile.in2
-rw-r--r--hl/fortran/Makefile.in2
-rw-r--r--hl/fortran/examples/Makefile.in2
-rw-r--r--hl/fortran/src/Makefile.in4
-rw-r--r--hl/fortran/test/Makefile.in2
-rw-r--r--hl/src/Makefile.in4
-rw-r--r--hl/test/Makefile.in2
-rw-r--r--hl/tools/Makefile.in2
-rw-r--r--hl/tools/gif2h5/Makefile.in2
-rw-r--r--perform/Makefile.in2
-rw-r--r--release_docs/CMake.txt435
-rw-r--r--release_docs/INSTALL_Windows.txt3
-rw-r--r--release_docs/INSTALL_parallel28
-rw-r--r--release_docs/RELEASE.txt22
-rw-r--r--release_docs/USING_CMake.txt84
-rw-r--r--release_docs/USING_Windows.txt643
-rw-r--r--src/H5FDstdio.c23
-rw-r--r--src/H5HFdbg.c18
-rw-r--r--src/H5Lexternal.c47
-rw-r--r--src/H5Ocopy.c2
-rw-r--r--src/H5Oname.c12
-rw-r--r--src/H5T.c4
-rw-r--r--src/H5private.h55
-rw-r--r--src/H5public.h4
-rw-r--r--src/H5system.c12
-rw-r--r--src/Makefile.in4
-rw-r--r--test/CMakeLists.txt20
-rw-r--r--test/Makefile.in2
-rw-r--r--test/testframe.c4
-rw-r--r--test/testhdf5.h2
-rw-r--r--test/testlibinfo.sh.in5
-rw-r--r--test/tfile.c11
-rw-r--r--test/th5o.c4
-rw-r--r--test/th5s.c11
-rw-r--r--test/tsohm.c14
-rw-r--r--testpar/Makefile.in2
-rw-r--r--tools/Makefile.in2
-rw-r--r--tools/h5copy/CMakeLists.txt409
-rw-r--r--tools/h5copy/Makefile.in2
-rw-r--r--tools/h5copy/testfiles/h5copy_misc1.out2
-rw-r--r--tools/h5copy/testh5copy.sh.in367
-rw-r--r--tools/h5diff/CMakeLists.txt30
-rw-r--r--tools/h5diff/Makefile.in2
-rw-r--r--tools/h5diff/testfiles/h5diff_706.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_708.txt2
-rw-r--r--tools/h5dump/CMakeLists.txt308
-rw-r--r--tools/h5dump/Makefile.in2
-rw-r--r--tools/h5import/CMakeLists.txt264
-rw-r--r--tools/h5import/Makefile.in2
-rw-r--r--tools/h5jam/CMakeLists.txt532
-rw-r--r--tools/h5jam/Makefile.in2
-rw-r--r--tools/h5jam/testh5jam.sh.in31
-rw-r--r--tools/h5ls/CMakeLists.txt5
-rw-r--r--tools/h5ls/Makefile.in2
-rw-r--r--tools/h5repack/CMakeLists.txt397
-rw-r--r--tools/h5repack/Makefile.in2
-rw-r--r--tools/h5repack/h5repack.sh.in357
-rw-r--r--tools/h5stat/CMakeLists.txt5
-rw-r--r--tools/h5stat/Makefile.in2
-rw-r--r--tools/lib/Makefile.in2
-rw-r--r--tools/lib/h5diff_attr.c7
-rw-r--r--tools/lib/h5tools_dump.c2
-rw-r--r--tools/lib/h5tools_str.c379
-rw-r--r--tools/misc/CMakeLists.txt281
-rw-r--r--tools/misc/Makefile.in2
-rw-r--r--tools/misc/testh5mkgrp.sh.in126
-rw-r--r--tools/testfiles/h5mkgrp_help.ls4
-rw-r--r--tools/testfiles/h5mkgrp_nested_lp.ls (renamed from tools/testfiles/h5mkgrp_nested_latest.ls)5
-rw-r--r--tools/testfiles/h5mkgrp_nested_mult_lp.ls (renamed from tools/testfiles/h5mkgrp_nested_mult_latest.ls)5
-rw-r--r--tools/testfiles/h5mkgrp_nested_mult_p.ls (renamed from tools/testfiles/h5mkgrp_nested_mult.ls)5
-rw-r--r--tools/testfiles/h5mkgrp_nested_p.ls (renamed from tools/testfiles/h5mkgrp_nested.ls)5
-rw-r--r--tools/testfiles/h5mkgrp_several.ls5
-rw-r--r--tools/testfiles/h5mkgrp_several_l.ls (renamed from tools/testfiles/h5mkgrp_several_latest.ls)5
-rw-r--r--tools/testfiles/h5mkgrp_several_p.ls10
-rw-r--r--tools/testfiles/h5mkgrp_several_v.ls10
-rw-r--r--tools/testfiles/h5mkgrp_single.ls5
-rw-r--r--tools/testfiles/h5mkgrp_single_l.ls (renamed from tools/testfiles/h5mkgrp_single_latest.ls)5
-rw-r--r--tools/testfiles/h5mkgrp_single_p.ls7
-rw-r--r--tools/testfiles/h5mkgrp_single_v.ls7
-rw-r--r--tools/testfiles/h5mkgrp_version.ls4
-rw-r--r--vms/src/h5pubconf.h6
161 files changed, 4016 insertions, 3224 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef4e1c7..60655ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -563,9 +563,9 @@ IF (HDF5_ENABLE_Z_LIB_SUPPORT)
IF (NOT H5_ZLIB_HEADER)
IF (NOT ZLIB_USE_EXTERNAL)
FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
- IF (NOT ZLIB_FOUND)
- FIND_PACKAGE (ZLIB) # Legacy find
- ENDIF (NOT ZLIB_FOUND)
+ IF (NOT ZLIB_FOUND)
+ FIND_PACKAGE (ZLIB) # Legacy find
+ ENDIF (NOT ZLIB_FOUND)
ENDIF (NOT ZLIB_USE_EXTERNAL)
IF (ZLIB_FOUND)
SET (H5_HAVE_FILTER_DEFLATE 1)
diff --git a/COPYING b/COPYING
index 9e816c8..25e79e7 100644
--- a/COPYING
+++ b/COPYING
@@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-Copyright 2006-2012 by The HDF Group.
+Copyright 2006-2013 by The HDF Group.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 8d00095..5d8f25c 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -20,6 +20,8 @@ SET (CTEST_DROP_SITE_CDASH TRUE)
SET (UPDATE_TYPE svn)
SET (VALGRIND_COMMAND "/usr/bin/valgrind")
SET (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
+SET (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
+SET (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
SET (CTEST_TEST_TIMEOUT 3600 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
diff --git a/MANIFEST b/MANIFEST
index 86a3238..f15fa29 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -293,6 +293,8 @@
./fortran/src/H5FDmpioff.f90
./fortran/src/H5Ff.c
./fortran/src/H5Fff.f90
+./fortran/src/H5Fff_F90.f90
+./fortran/src/H5Fff_F03.f90
./fortran/src/H5Gf.c
./fortran/src/H5Gff.f90
./fortran/src/H5If.c
@@ -354,6 +356,7 @@
./fortran/test/tH5E_F03.f90
./fortran/test/tH5E.f90
./fortran/test/tH5F.f90
+./fortran/test/tH5F_F03.f90
./fortran/test/tH5G.f90
./fortran/test/tH5G_1_8.f90
./fortran/test/tH5I.f90
@@ -2138,16 +2141,18 @@
./tools/h5copy/testfiles/h5copy_misc1.out
# test files for h5mkgrp
-./tools/testfiles/h5mkgrp_help.ls
-./tools/testfiles/h5mkgrp_nested.ls
-./tools/testfiles/h5mkgrp_nested_latest.ls
-./tools/testfiles/h5mkgrp_nested_mult.ls
-./tools/testfiles/h5mkgrp_nested_mult_latest.ls
+./tools/testfiles/h5mkgrp_nested_p.ls
+./tools/testfiles/h5mkgrp_nested_lp.ls
+./tools/testfiles/h5mkgrp_nested_mult_p.ls
+./tools/testfiles/h5mkgrp_nested_mult_lp.ls
./tools/testfiles/h5mkgrp_several.ls
-./tools/testfiles/h5mkgrp_several_latest.ls
+./tools/testfiles/h5mkgrp_several_v.ls
+./tools/testfiles/h5mkgrp_several_p.ls
+./tools/testfiles/h5mkgrp_several_l.ls
./tools/testfiles/h5mkgrp_single.ls
-./tools/testfiles/h5mkgrp_single_latest.ls
-./tools/testfiles/h5mkgrp_version.ls
+./tools/testfiles/h5mkgrp_single_v.ls
+./tools/testfiles/h5mkgrp_single_p.ls
+./tools/testfiles/h5mkgrp_single_l.ls
# high level libraries
diff --git a/Makefile.in b/Makefile.in
index 7144e95..2ecc508 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -263,6 +263,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -314,7 +315,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/README.txt b/README.txt
index 224be1b..b3a5451 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.144 currently under development
+HDF5 version 1.9.148 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/bin/checkposix b/bin/checkposix
index 3912e9f..b295d7d 100755
--- a/bin/checkposix
+++ b/bin/checkposix
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!/usr/bin/perl -w
require 5.003;
#
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index cdd75c0..c024ad1 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -58,7 +58,7 @@ EOF
#==========
#==========
cat > $cfgfile <<'EOF'
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -84,7 +84,12 @@ set (REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
# Use multiple CPU cores to build
-SET (CTEST_BUILD_FLAGS "-j4")
+include(ProcessorCount)
+ProcessorCount(N)
+if(NOT N EQUAL 0)
+ set(CTEST_BUILD_FLAGS -j${N})
+ set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif()
# -----------------------------------------------------------
# -- Get environment
diff --git a/c++/Makefile.in b/c++/Makefile.in
index 8c82ca9..232299d 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -227,6 +227,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -278,7 +279,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index e9bbf47..e8aa093 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -194,6 +194,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -245,7 +246,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index 76b7717..b025f0b 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -269,6 +269,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -320,7 +321,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 134
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
# Include src directory
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index 00a8056..ef1455c 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -230,6 +230,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -281,7 +282,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index c33201f..ec7b10e 100755
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -38,35 +38,15 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE
hl_test-clear-objects
hl_fortran_test-clear-objects
######### tools/h5copy #########
- H5COPY-clear-refs
- H5COPY-clear-ext-links
- H5COPY-clear-misc
+ H5COPY-clearall-objects
######### tools/h5diff #########
H5DIFF-clearall-objects
######### tools/h5dump #########
H5DUMP-clearall-objects
- H5DUMP-clear-out1
- H5DUMP-clear-out3
- H5DUMP-clear-objects
H5DUMP_PACKED_BITS-clearall-objects
H5DUMP-XML-clearall-objects
######### tools/h5import #########
- 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
+ H5IMPORT-clear-objects
######### tools/h5jam #########
H5JAM-SETUP-N_twithub_u10_c-clear-objects
H5JAM-SETUP-N_twithub_u10_c
@@ -225,47 +205,8 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE
######### tools/h5stat #########
H5STAT-clearall-objects
######### tools/misc #########
- h5repart_20K-clear-objects
- h5repart_5K-clear-objects
- h5repart_sec2-clear-objects
- H5MKGRP_CMP-clear-h5mkgrp_help
- H5MKGRP_CMP-clear-h5mkgrp_version
- H5MKGRP-clear-h5mkgrp_single
- H5MKGRP-h5mkgrp_single #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_single #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_single-v
- H5MKGRP-h5mkgrp_single-v #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_single-v #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_single-p
- H5MKGRP-h5mkgrp_single-p #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_single-p #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_single_latest-l
- H5MKGRP-h5mkgrp_single_latest-l #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_single_latest-l #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_several
- H5MKGRP-h5mkgrp_several #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_several #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_several-v
- H5MKGRP-h5mkgrp_several-v #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_several-v #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_several-p
- H5MKGRP-h5mkgrp_several-p #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_several-p #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_several_latest-l
- H5MKGRP-h5mkgrp_several_latest-l #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_several_latest-l #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_nested-p
- H5MKGRP-h5mkgrp_nested-p #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_nested-p #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_nested_latest-lp
- H5MKGRP-h5mkgrp_nested_latest-lp #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_nested_latest-lp #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_nested_mult-p
- H5MKGRP-h5mkgrp_nested_mult-p #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_nested_mult-p #uses runTest.cmake
- H5MKGRP-clear-h5mkgrp_nested_mult_latest-lp
- H5MKGRP-h5mkgrp_nested_mult_latest-lp #uses runTest.cmake
- H5MKGRP-h5ls-h5mkgrp_nested_mult_latest-lp #uses runTest.cmake
+ H5REPART-clearall-objects
+ H5MKGRP-clearall-objects
######### examples #########
EXAMPLES-clear-objects
cpp_ex-clear-objects
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
index 365d9c3..74ac912 100644
--- a/config/cmake/grepTest.cmake
+++ b/config/cmake/grepTest.cmake
@@ -57,7 +57,7 @@ IF (${TEST_EXPECT} STREQUAL "1")
IF (NOT ${TEST_RESULT} STREQUAL "0")
MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
ENDIF (NOT ${TEST_RESULT} STREQUAL "0")
-ENDIF (${TEST_EXPECT} STREQUAL "0")
+ENDIF (${TEST_EXPECT} STREQUAL "1")
# everything went fine...
MESSAGE ("Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index b472acf..8ca3879 100755
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -8,6 +8,8 @@ SET (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+
SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
@@ -58,7 +60,7 @@ SET (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
-SET (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
+SET (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
@@ -74,3 +76,6 @@ SET (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
SET (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
+SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+
+SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index 5e8a808..8910bb2 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -65,17 +65,17 @@ IF (TEST_CHECKUB STREQUAL "YES")
COMMAND ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_UFILE}.cmp
+ OUTPUT_FILE ${TEST_HFILE}-ub.cmp
OUTPUT_VARIABLE TEST_ERROR
ERROR_VARIABLE TEST_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#cat $ufile >> $cmpfile
FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
- FILE (APPEND ${TEST_UFILE}.cmp "${TEST_STREAM}")
+ FILE (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}")
ELSE (NOT TEST_O_STRING_LEN STREQUAL "0")
FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
- FILE (WRITE ${TEST_UFILE}.cmp ${TEST_STREAM})
+ FILE (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM})
ENDIF (NOT TEST_O_STRING_LEN STREQUAL "0")
#$JAM_BIN/getub -c $size $hfile > $tfile
@@ -91,14 +91,14 @@ IF (TEST_CHECKUB STREQUAL "YES")
# now compare the outputs
EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_UFILE}.cmp ${TEST_HFILE}.cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
RESULT_VARIABLE TEST_RESULT
)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}+${TEST_O_STRING_LEN}")
# if the return value is !=${TEST_EXPECT} bail out
IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_UFILE} did not match ${TEST_HFILE}.\n${TEST_ERROR}")
+ MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
ELSE (TEST_CHECKUB STREQUAL "YES")
# call 'ubsize' to get the size of the user block
diff --git a/config/lt_vers.am b/config/lt_vers.am
index d94d73c..37b5b68 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 = 134
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/configure b/configure
index 157dcc1..3af799b 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF5 1.9.144.
+# Generated by GNU Autoconf 2.69 for HDF5 1.9.148.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.9.144'
-PACKAGE_STRING='HDF5 1.9.144'
+PACKAGE_VERSION='1.9.148'
+PACKAGE_STRING='HDF5 1.9.148'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -681,7 +681,7 @@ INSTRUMENT_LIBRARY
TRACE_API
DEBUG_PKG
H5_LONE_COLON
-PTHREAD
+HAVE_PTHREAD
BUILD_SHARED_SZIP_CONDITIONAL_FALSE
BUILD_SHARED_SZIP_CONDITIONAL_TRUE
LL_PATH
@@ -1484,7 +1484,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures HDF5 1.9.144 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.148 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1554,7 +1554,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.9.144:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.148:";;
esac
cat <<\_ACEOF
@@ -1750,7 +1750,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.9.144
+HDF5 configure 1.9.148
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2844,7 +2844,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by HDF5 $as_me 1.9.144, which was
+It was created by HDF5 $as_me 1.9.148, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3676,7 +3676,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.9.144'
+ VERSION='1.9.148'
cat >>confdefs.h <<_ACEOF
@@ -25326,11 +25326,14 @@ if test "x$ac_cv_header_dmalloc_h" = xyes; then :
#define HAVE_DMALLOC_H 1
_ACEOF
+else
+ unset HAVE_DMALLOC
fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_shutdown in -ldmalloc" >&5
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_shutdown in -ldmalloc" >&5
$as_echo_n "checking for dmalloc_shutdown in -ldmalloc... " >&6; }
if ${ac_cv_lib_dmalloc_dmalloc_shutdown+:} false; then :
$as_echo_n "(cached) " >&6
@@ -25385,7 +25388,7 @@ else
unset HAVE_DMALLOC
fi
-
+ fi
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
as_fn_error $? "couldn't find dmalloc library" "$LINENO" 5
fi
@@ -25440,18 +25443,19 @@ if test "x$ac_cv_header_dmalloc_h" = xyes; then :
_ACEOF
else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_DMALLOC
fi
done
- if test -n "$dmalloc_lib"; then
- LDFLAGS="$LDFLAGS -L$dmalloc_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
- fi
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test -n "$dmalloc_lib"; then
+ LDFLAGS="$LDFLAGS -L$dmalloc_lib"
+ AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
+ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_shutdown in -ldmalloc" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_shutdown in -ldmalloc" >&5
$as_echo_n "checking for dmalloc_shutdown in -ldmalloc... " >&6; }
if ${ac_cv_lib_dmalloc_dmalloc_shutdown+:} false; then :
$as_echo_n "(cached) " >&6
@@ -25506,6 +25510,7 @@ else
LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC
fi
+ fi
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
as_fn_error $? "couldn't find dmalloc library" "$LINENO" 5
@@ -25540,11 +25545,14 @@ if test "x$ac_cv_header_zlib_h" = xyes; then :
#define HAVE_ZLIB_H 1
_ACEOF
HAVE_ZLIB_H="yes"
+else
+ unset HAVE_ZLIB
fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
+ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
$as_echo_n "checking for compress2 in -lz... " >&6; }
if ${ac_cv_lib_z_compress2+:} false; then :
$as_echo_n "(cached) " >&6
@@ -25599,14 +25607,17 @@ else
unset HAVE_ZLIB
fi
- ac_fn_c_check_func "$LINENO" "compress2" "ac_cv_func_compress2"
+ fi
+ if test -z "$HAVE_ZLIB"; then
+ if test -n "$HDF5_CONFIG_ABORT"; then
+ as_fn_error $? "couldn't find zlib library" "$LINENO" 5
+ fi
+ else
+ ac_fn_c_check_func "$LINENO" "compress2" "ac_cv_func_compress2"
if test "x$ac_cv_func_compress2" = xyes; then :
HAVE_COMPRESS2="yes"
fi
-
- if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- as_fn_error $? "couldn't find zlib library" "$LINENO" 5
fi
;;
no)
@@ -25620,8 +25631,8 @@ $as_echo "suppressed" >&6; }
HAVE_ZLIB="yes"
case "$withval" in
*,*)
- zlib_inc="`echo $withval |cut -f1 -d,`"
- zlib_lib="`echo $withval |cut -f2 -d, -s`"
+ zlib_inc="`echo $withval | cut -f1 -d,`"
+ zlib_lib="`echo $withval | cut -f2 -d, -s`"
;;
*)
if test -n "$withval"; then
@@ -25659,7 +25670,7 @@ if test "x$ac_cv_header_zlib_h" = xyes; then :
_ACEOF
HAVE_ZLIB_H="yes"
else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_ZLIB
fi
done
@@ -25670,7 +25681,8 @@ done
AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
+ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
$as_echo_n "checking for compress2 in -lz... " >&6; }
if ${ac_cv_lib_z_compress2+:} false; then :
$as_echo_n "(cached) " >&6
@@ -25725,14 +25737,18 @@ else
LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB
fi
- ac_fn_c_check_func "$LINENO" "compress2" "ac_cv_func_compress2"
+ fi
+
+ if test -z "$HAVE_ZLIB"; then
+ if test -n "$HDF5_CONFIG_ABORT"; then
+ as_fn_error $? "couldn't find zlib library" "$LINENO" 5
+ fi
+ else
+ ac_fn_c_check_func "$LINENO" "compress2" "ac_cv_func_compress2"
if test "x$ac_cv_func_compress2" = xyes; then :
HAVE_COMPRESS2="yes"
fi
-
- if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- as_fn_error $? "couldn't find zlib library" "$LINENO" 5
fi
;;
esac
@@ -25741,13 +25757,13 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2"
$as_echo "#define HAVE_FILTER_DEFLATE 1" >>confdefs.h
- USE_FILTER_DEFLATE="yes"
+ USE_FILTER_DEFLATE="yes"
- ## Add "deflate" to external filter list
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ ## Add "deflate" to external filter list
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -25778,11 +25794,14 @@ if test "x$ac_cv_header_szlib_h" = xyes; then :
#define HAVE_SZLIB_H 1
_ACEOF
HAVE_SZLIB_H="yes"
+else
+ unset HAVE_SZLIB
fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
+ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
$as_echo_n "checking for SZ_BufftoBuffCompress in -lsz... " >&6; }
if ${ac_cv_lib_sz_SZ_BufftoBuffCompress+:} false; then :
$as_echo_n "(cached) " >&6
@@ -25837,7 +25856,7 @@ else
unset HAVE_SZLIB
fi
-
+ fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
as_fn_error $? "couldn't find szlib library" "$LINENO" 5
fi
@@ -25892,7 +25911,7 @@ if test "x$ac_cv_header_szlib_h" = xyes; then :
_ACEOF
HAVE_SZLIB_H="yes"
else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZIP
fi
done
@@ -25903,7 +25922,8 @@ done
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
+ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
$as_echo_n "checking for SZ_BufftoBuffCompress in -lsz... " >&6; }
if ${ac_cv_lib_sz_SZ_BufftoBuffCompress+:} false; then :
$as_echo_n "(cached) " >&6
@@ -25958,6 +25978,7 @@ else
LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB
fi
+ fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
as_fn_error $? "couldn't find szlib library" "$LINENO" 5
@@ -25966,22 +25987,22 @@ fi
esac
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
- ## SZLIB library is available. Check if it can encode
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5
+ ## SZLIB library is available. Check if it can encode
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5
$as_echo_n "checking for szlib encoder... " >&6; }
- ## Set LD_LIBRARY_PATH so encoder test can find the library and run.
- ## Also add LL_PATH substitution to Makefiles so they can use the
- ## path as well, for testing examples.
- if test -z "$LD_LIBRARY_PATH"; then
+ ## Set LD_LIBRARY_PATH so encoder test can find the library and run.
+ ## Also add LL_PATH substitution to Makefiles so they can use the
+ ## path as well, for testing examples.
+ if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
- else
+ else
export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH"
- fi
+ fi
- LL_PATH="$LD_LIBRARY_PATH"
+ LL_PATH="$LD_LIBRARY_PATH"
- if ${hdf5_cv_szlib_can_encode+:} false; then :
+ if ${hdf5_cv_szlib_can_encode+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -26020,31 +26041,30 @@ fi
$as_echo "#define HAVE_FILTER_SZIP 1" >>confdefs.h
- USE_FILTER_SZIP="yes"
+ USE_FILTER_SZIP="yes"
- if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ if test ${hdf5_cv_szlib_can_encode} = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- fi
- if test ${hdf5_cv_szlib_can_encode} = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- fi
+ fi
- ## Add "szip" to external filter list
- if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ ## Add "szip" to external filter list
+ if test ${hdf5_cv_szlib_can_encode} = "yes"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- if test ${hdf5_cv_szlib_can_encode} = "no"; then
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
-
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ fi
fi
if test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"; then
@@ -26150,7 +26170,7 @@ rm -f confcache
## and/or a library path. If the library path is specified then it must
## be preceded by a comma.
##
- PTHREAD=yes
+ HAVE_PTHREAD=yes
# Check whether --with-pthread was given.
if test "${with_pthread+set}" = set; then :
@@ -26170,11 +26190,14 @@ if test "x$ac_cv_header_pthread_h" = xyes; then :
#define HAVE_PTHREAD_H 1
_ACEOF
+else
+ unset HAVE_PTHREAD
fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
if ${ac_cv_lib_pthread_pthread_self+:} false; then :
$as_echo_n "(cached) " >&6
@@ -26226,16 +26249,17 @@ _ACEOF
LIBS="-lpthread $LIBS"
else
- unset PTHREAD
+ unset HAVE_PTHREAD
fi
+ fi
;;
no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread" >&5
$as_echo_n "checking for pthread... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
$as_echo "suppressed" >&6; }
- unset PTHREAD
+ unset HAVE_PTHREAD
;;
*)
case "$withval" in
@@ -26274,7 +26298,7 @@ if test "x$ac_cv_header_pthread_h" = xyes; then :
_ACEOF
else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset PTHREAD
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset HAVE_PTHREAD
fi
done
@@ -26289,19 +26313,20 @@ if test "x$ac_cv_header_pthread_h" = xyes; then :
_ACEOF
else
- unset PTHREAD
+ unset HAVE_PTHREAD
fi
done
fi
- if test -n "$pthread_lib"; then
- saved_LDFLAGS="$LDFLAGS"
- saved_AM_LDFLAGS="$AM_LDFLAGS"
- LDFLAGS="$LDFLAGS -L$pthread_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test -n "$pthread_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ saved_AM_LDFLAGS="$AM_LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$pthread_lib"
+ AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
if ${ac_cv_lib_pthread_pthread_self+:} false; then :
$as_echo_n "(cached) " >&6
@@ -26353,12 +26378,11 @@ _ACEOF
LIBS="-lpthread $LIBS"
else
- LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset PTHREAD
+ LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_PTHREAD
fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
if ${ac_cv_lib_pthread_pthread_self+:} false; then :
$as_echo_n "(cached) " >&6
@@ -26410,9 +26434,10 @@ _ACEOF
LIBS="-lpthread $LIBS"
else
- unset PTHREAD
+ unset HAVE_PTHREAD
fi
+ fi
fi
;;
esac
@@ -31776,7 +31801,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.144, which was
+This file was extended by HDF5 $as_me 1.9.148, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31842,7 +31867,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.144
+HDF5 config.status 1.9.148
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -34617,7 +34642,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-HDF5 config.lt 1.9.144
+HDF5 config.lt 1.9.148
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
diff --git a/configure.ac b/configure.ac
index 6b6d3a3..e8ede42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.144], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.148], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -1616,9 +1616,10 @@ AC_ARG_WITH([dmalloc],
case $withval in
yes)
HAVE_DMALLOC="yes"
- AC_CHECK_HEADERS([dmalloc.h])
- AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC])
-
+ AC_CHECK_HEADERS([dmalloc.h],, [unset HAVE_DMALLOC])
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC])
+ fi
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find dmalloc library])
fi
@@ -1662,14 +1663,16 @@ case $withval in
AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc"
fi
- AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"])
+ AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_DMALLOC])
- if test -n "$dmalloc_lib"; then
- LDFLAGS="$LDFLAGS -L$dmalloc_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
- fi
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test -n "$dmalloc_lib"; then
+ LDFLAGS="$LDFLAGS -L$dmalloc_lib"
+ AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
+ fi
- AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC])
+ AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC])
+ fi
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find dmalloc library])
@@ -1693,12 +1696,16 @@ AC_ARG_WITH([zlib],
case $withval in
yes)
HAVE_ZLIB="yes"
- AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"])
- AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
- AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
-
- if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR([couldn't find zlib library])
+ AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"], [unset HAVE_ZLIB])
+ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+ fi
+ if test -z "$HAVE_ZLIB"; then
+ if test -n "$HDF5_CONFIG_ABORT"; then
+ AC_MSG_ERROR([couldn't find zlib library])
+ fi
+ else
+ AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
fi
;;
no)
@@ -1710,8 +1717,8 @@ case $withval in
HAVE_ZLIB="yes"
case "$withval" in
*,*)
- zlib_inc="`echo $withval |cut -f1 -d,`"
- zlib_lib="`echo $withval |cut -f2 -d, -s`"
+ zlib_inc="`echo $withval | cut -f1 -d,`"
+ zlib_lib="`echo $withval | cut -f2 -d, -s`"
;;
*)
if test -n "$withval"; then
@@ -1742,32 +1749,37 @@ case $withval in
AC_CHECK_HEADERS([zlib.h],
[HAVE_ZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_ZLIB])
if test -n "$zlib_lib"; then
LDFLAGS="$LDFLAGS -L$zlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib"
fi
- AC_CHECK_LIB([z], [compress2],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB])
- AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
+ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([z], [compress2],,
+ [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB])
+ fi
- if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR([couldn't find zlib library])
+ if test -z "$HAVE_ZLIB"; then
+ if test -n "$HDF5_CONFIG_ABORT"; then
+ AC_MSG_ERROR([couldn't find zlib library])
+ fi
+ else
+ AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
fi
;;
esac
if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then
- AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled])
- USE_FILTER_DEFLATE="yes"
+ AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled])
+ USE_FILTER_DEFLATE="yes"
- ## Add "deflate" to external filter list
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ ## Add "deflate" to external filter list
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -1787,9 +1799,10 @@ AC_ARG_WITH([szlib],
case $withval in
yes)
HAVE_SZLIB="yes"
- AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"])
- AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
-
+ AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB])
+ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
+ fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find szlib library])
fi
@@ -1835,15 +1848,17 @@ case $withval in
AC_CHECK_HEADERS([szlib.h],
[HAVE_SZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZIP])
if test -n "$szlib_lib"; then
LDFLAGS="$LDFLAGS -L$szlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
- AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
+ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
+ [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
+ fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find szlib library])
@@ -1852,21 +1867,21 @@ case $withval in
esac
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
- ## SZLIB library is available. Check if it can encode
- AC_MSG_CHECKING([for szlib encoder])
+ ## SZLIB library is available. Check if it can encode
+ AC_MSG_CHECKING([for szlib encoder])
- ## Set LD_LIBRARY_PATH so encoder test can find the library and run.
- ## Also add LL_PATH substitution to Makefiles so they can use the
- ## path as well, for testing examples.
- if test -z "$LD_LIBRARY_PATH"; then
+ ## Set LD_LIBRARY_PATH so encoder test can find the library and run.
+ ## Also add LL_PATH substitution to Makefiles so they can use the
+ ## path as well, for testing examples.
+ if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
- else
+ else
export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH"
- fi
+ fi
- AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH"
+ AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH"
- AC_CACHE_VAL([hdf5_cv_szlib_can_encode],
+ AC_CACHE_VAL([hdf5_cv_szlib_can_encode],
[AC_TRY_RUN([
#include <szlib.h>
@@ -1880,31 +1895,30 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
}
], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)])
- AC_DEFINE([HAVE_FILTER_SZIP], [1],
+ AC_DEFINE([HAVE_FILTER_SZIP], [1],
[Define if support for szip filter is enabled])
- USE_FILTER_SZIP="yes"
+ USE_FILTER_SZIP="yes"
- if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- AC_MSG_RESULT([yes])
- fi
- if test ${hdf5_cv_szlib_can_encode} = "no"; then
- AC_MSG_RESULT([no])
- fi
+ if test ${hdf5_cv_szlib_can_encode} = "yes"; then
+ AC_MSG_RESULT([yes])
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ AC_MSG_RESULT([no])
+ fi
- ## Add "szip" to external filter list
- if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
- fi
- if test ${hdf5_cv_szlib_can_encode} = "no"; then
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ ## Add "szip" to external filter list
+ if test ${hdf5_cv_szlib_can_encode} = "yes"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
-
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ fi
fi
AM_CONDITIONAL([BUILD_SHARED_SZIP_CONDITIONAL], [test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"])
@@ -1919,7 +1933,7 @@ AC_CACHE_SAVE
## and/or a library path. If the library path is specified then it must
## be preceded by a comma.
##
-AC_SUBST([PTHREAD]) PTHREAD=yes
+AC_SUBST([HAVE_PTHREAD]) HAVE_PTHREAD=yes
AC_ARG_WITH([pthread],
[AS_HELP_STRING([--with-pthread=DIR],
[Use the Pthreads library [default=no]])],,
@@ -1927,13 +1941,15 @@ AC_ARG_WITH([pthread],
case "$withval" in
yes)
- AC_CHECK_HEADERS([pthread.h])
- AC_CHECK_LIB([pthread], [pthread_self],, [unset PTHREAD])
+ AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD])
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD])
+ fi
;;
no)
AC_MSG_CHECKING([for pthread])
AC_MSG_RESULT([suppressed])
- unset PTHREAD
+ unset HAVE_PTHREAD
;;
*)
case "$withval" in
@@ -1963,21 +1979,22 @@ case "$withval" in
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$pthread_inc"
AM_CPPFLAGS="$AM_CPPFLAGS -I$pthread_inc"
- AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset PTHREAD])
+ AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset HAVE_PTHREAD])
else
- AC_CHECK_HEADERS([pthread.h],, [unset PTHREAD])
+ AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD])
fi
- if test -n "$pthread_lib"; then
- saved_LDFLAGS="$LDFLAGS"
- saved_AM_LDFLAGS="$AM_LDFLAGS"
- LDFLAGS="$LDFLAGS -L$pthread_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
- AC_CHECK_LIB([pthread], [pthread_self],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset PTHREAD])
-
- else
- AC_CHECK_LIB([pthread], [pthread_self],, [unset PTHREAD])
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test -n "$pthread_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ saved_AM_LDFLAGS="$AM_LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$pthread_lib"
+ AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
+ AC_CHECK_LIB([pthread], [pthread_self],,
+ [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_PTHREAD])
+ else
+ AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD])
+ fi
fi
;;
esac
diff --git a/examples/Makefile.in b/examples/Makefile.in
index b6dfab5..064cb84 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -194,6 +194,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -245,7 +246,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 806eb30..acab031 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -231,6 +231,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -282,7 +283,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 5f6124c..93a2af1 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -202,6 +202,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -253,7 +254,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 765bb65..c41916a 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -188,6 +188,7 @@ SET (f90_F_SRCS
${HDF5_F90_SRC_SOURCE_DIR}/H5Aff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Eff${F_STATUS}.f90
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Lff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Off${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff${F_STATUS}.f90
diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90
index 1926dd1..25f7fa7 100644
--- a/fortran/src/H5Aff.f90
+++ b/fortran/src/H5Aff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90
index b9e6c92..26c911a 100644
--- a/fortran/src/H5Aff_F03.f90
+++ b/fortran/src/H5Aff_F03.f90
@@ -61,7 +61,7 @@
! (B)
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Aff_F90.f90 b/fortran/src/H5Aff_F90.f90
index 7e14f7a..974b023 100644
--- a/fortran/src/H5Aff_F90.f90
+++ b/fortran/src/H5Aff_F90.f90
@@ -33,7 +33,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90
index b1e1df1..3ad868c 100644
--- a/fortran/src/H5Dff.f90
+++ b/fortran/src/H5Dff.f90
@@ -30,7 +30,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90
index 61d5dfc..be4bd69 100644
--- a/fortran/src/H5Dff_F03.f90
+++ b/fortran/src/H5Dff_F03.f90
@@ -74,7 +74,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90
index 3bb0fc0..46ea3ad 100644
--- a/fortran/src/H5Dff_F90.f90
+++ b/fortran/src/H5Dff_F90.f90
@@ -42,7 +42,7 @@
! (3)
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90
index 2e137df..7b56376 100644
--- a/fortran/src/H5Eff.f90
+++ b/fortran/src/H5Eff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5E function to the module you must add the function name
-! to the Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Eff_F03.f90 b/fortran/src/H5Eff_F03.f90
index 164f203..3ba3ce96 100644
--- a/fortran/src/H5Eff_F03.f90
+++ b/fortran/src/H5Eff_F03.f90
@@ -33,7 +33,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5E function to the module you must add the function name
-! to the Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Eff_F90.f90 b/fortran/src/H5Eff_F90.f90
index e698a84..158ec12 100644
--- a/fortran/src/H5Eff_F90.f90
+++ b/fortran/src/H5Eff_F90.f90
@@ -28,7 +28,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90
index d9faef3..5c81bc8 100644
--- a/fortran/src/H5FDmpioff.f90
+++ b/fortran/src/H5FDmpioff.f90
@@ -26,7 +26,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 1259d4d..4910aca 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -679,3 +679,37 @@ nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size)
done:
return ret_value;
}
+
+/****if* H5Ff/h5fget_file_image_c
+ * NAME
+ * h5fget_file_image_c
+ * PURPOSE
+ * Calls h5fget_file_image
+ * INPUTS
+ * file_id - Target file identifier.
+ * buf_ptr - Pointer to the buffer into which the image of the HDF5 file is to be copied.
+ * buf_len - Size of the supplied buffer.
+ * OUTPUTS
+ * buf_req - The size in bytes of the buffer required to store the file image.
+ * RETURNS
+ * 0 on success, -1 on failure
+ * AUTHOR
+ * M. Scot Breitenfeld
+ * November 26, 2012
+ * SOURCE
+*/
+int_f
+nh5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req)
+/******/
+{
+ herr_t ret_value=0; /* Return value */
+
+ /*
+ * Call h5fget_file_image function
+ */
+ if ((*buf_req = (size_t_f)H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ return ret_value;
+}
diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90
index 0c70ad4..faa1967 100644
--- a/fortran/src/H5Fff.f90
+++ b/fortran/src/H5Fff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5F function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90
new file mode 100644
index 0000000..1ccd39a
--- /dev/null
+++ b/fortran/src/H5Fff_F03.f90
@@ -0,0 +1,104 @@
+!****h* ROBODoc/H5F (F03)
+!
+! NAME
+! H5F_PROVISIONAL
+!
+! PURPOSE
+! This file contains Fortran 2003 interfaces for H5F functions.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! NOTES
+! *** IMPORTANT ***
+! If you add a new H5T function you must add the function name to the
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
+! This is needed for Windows based operating systems.
+!
+!*****
+
+
+MODULE H5F_PROVISIONAL
+
+ USE H5GLOBAL
+ USE, INTRINSIC :: ISO_C_BINDING
+
+
+CONTAINS
+!****s* H5F (F03)/h5fget_file_image_f_F03
+!
+! NAME
+! h5fget_file_image_f
+!
+! PURPOSE
+! Retrieves a copy of the image of an existing, open file.
+!
+! Inputs:
+! file_id - Target file identifier.
+! buf_ptr - Pointer to the buffer into which the image of the HDF5 file is to be copied.
+! buf_len - Size of the supplied buffer.
+!
+! Outputs:
+! hdferr - error code:
+! 0 on success and -1 on failure
+! Optional:
+! buf_size - The size in bytes of the buffer required to store the file image.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! November 26, 2012
+!
+! Fortran2003 Interface:
+ SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size)
+ USE, INTRINSIC :: ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: file_id
+ TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr
+ INTEGER(SIZE_T) , INTENT(IN) :: buf_len
+ INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: buf_size
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+
+ INTEGER(SIZE_T) :: buf_size_default
+
+ INTERFACE
+ INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size)
+ USE, INTRINSIC :: ISO_C_BINDING
+ USE H5GLOBAL
+ !DEC$IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILE_IMAGE_C'::h5fget_file_image_c
+ !DEC$ENDIF
+ INTEGER(HID_T) , INTENT(IN) :: file_id
+ TYPE(C_PTR) , VALUE :: buf_ptr
+ INTEGER(SIZE_T) , INTENT(IN) :: buf_len
+ INTEGER(SIZE_T), INTENT(IN) :: buf_size
+ END FUNCTION h5fget_file_image_c
+ END INTERFACE
+
+
+ IF(PRESENT(buf_size))THEN
+ buf_ptr = C_NULL_PTR
+ ENDIF
+
+ hdferr = h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size_default)
+
+ IF(PRESENT(buf_size))THEN
+ buf_size = buf_size_default
+ ENDIF
+
+ END SUBROUTINE h5fget_file_image_f
+
+END MODULE H5F_PROVISIONAL
diff --git a/fortran/src/H5Fff_F90.f90 b/fortran/src/H5Fff_F90.f90
new file mode 100644
index 0000000..b6e659b
--- /dev/null
+++ b/fortran/src/H5Fff_F90.f90
@@ -0,0 +1,43 @@
+!****h* ROBODoc/H5F (F90)
+!
+! NAME
+! H5F_PROVISIONAL
+!
+! PURPOSE
+! This file contains Fortran 90 interfaces for H5F functions. It
+! containsthe same functions as H5Fff_F03.f90, when applicable,
+! but excludes the Fortran 2003 functions and the interface listings.
+! This file will be compiled instead of H5Fff_F03.f90 if Fortran 2003
+! functions are not enabled.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! NOTES
+! *** IMPORTANT ***
+! If you add a new H5F function you must add the function name to the
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
+! This is needed for Windows based operating systems.
+!
+!*****
+
+
+MODULE H5F_PROVISIONAL
+
+ USE H5GLOBAL
+ IMPLICIT NONE
+
+END MODULE H5F_PROVISIONAL
diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90
index 155185a..d4d7496 100644
--- a/fortran/src/H5Gff.f90
+++ b/fortran/src/H5Gff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5G function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90
index 86e88b9..7c9a843 100644
--- a/fortran/src/H5Iff.f90
+++ b/fortran/src/H5Iff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5I function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index e5b01ed..c5138b6 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -725,7 +725,7 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
if(NULL == (c_name = (char *)HDmalloc(c_size)))
HGOTO_DONE(FAIL)
- if((*size = (size_t)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
+ if((*size = (size_t_f)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
(H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0)
HGOTO_DONE(FAIL)
diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90
index 8043d74..4660e52 100644
--- a/fortran/src/H5Lff.f90
+++ b/fortran/src/H5Lff.f90
@@ -27,7 +27,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5L function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Lff_F03.f90 b/fortran/src/H5Lff_F03.f90
index e2c54a7..83f80ac 100644
--- a/fortran/src/H5Lff_F03.f90
+++ b/fortran/src/H5Lff_F03.f90
@@ -32,7 +32,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Lff_F90.f90 b/fortran/src/H5Lff_F90.f90
index c802af7..dd62b7b 100644
--- a/fortran/src/H5Lff_F90.f90
+++ b/fortran/src/H5Lff_F90.f90
@@ -30,7 +30,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90
index ce8c55c..1437e9f 100644
--- a/fortran/src/H5Off.f90
+++ b/fortran/src/H5Off.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5O function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90
index f4ddd3e..0cf4d46 100644
--- a/fortran/src/H5Off_F03.f90
+++ b/fortran/src/H5Off_F03.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Off_F90.f90 b/fortran/src/H5Off_F90.f90
index 53553d6..5688c5d 100644
--- a/fortran/src/H5Off_F90.f90
+++ b/fortran/src/H5Off_F90.f90
@@ -30,7 +30,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 6fc8487..dba2aa4 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1937,28 +1937,29 @@ DONE:
/****if* H5Pf/h5pset_external_c
* NAME
- * h5pset_external_c
+ * h5pset_external_c
* PURPOSE
- * Call H5Pset_external to add an external file to the
- * list of external files.
+ * Call H5Pset_external to add an external file to the
+ * list of external files.
* INPUTS
- * prp_id - property list identifier
- * name - Name of an external file
- * namelen - length of name
- * offset - Offset, in bytes, from the beginning of the file
- * to the location in the file where the data starts.
- * bytes - Number of bytes reserved in the file for the data.
+ * prp_id - property list identifier
+ * name - Name of an external file
+ * namelen - length of name
+ * offset - Offset, in bytes, from the beginning of the file
+ * to the location in the file where the data starts.
+ * bytes - Number of bytes reserved in the file for the data.
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* Xiangyang Su
- * Wednesday, February 23, 2000
+ * Wednesday, February 23, 2000
* HISTORY
- *
+ * Changed type of 'offset' from int_f to off_t_f -- MSB January 9, 2012
+ *
* SOURCE
*/
int_f
-nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, int_f* offset, hsize_t_f*bytes)
+nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes)
/******/
{
int ret_value = -1;
@@ -2029,14 +2030,14 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
/****if* H5Pf/h5pget_external_c
* NAME
- * h5pget_external_c
+ * h5pget_external_c
* PURPOSE
- * Call H5Pget_external to get nformation about an external file.
+ * Call H5Pget_external to get nformation about an external file.
* INPUTS
* prp_id - property list identifier
* name_size - length of name
* idx - External file index.
- *OUTPUT
+ * OUTPUT
* name - Name of an external file
* offset - Offset, in bytes, from the beginning of the file
* to the location in the file where the data starts.
@@ -2047,11 +2048,12 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
* Xiangyang Su
* Wednesday, February 23, 2000
* HISTORY
+ * Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
*
* SOURCE
*/
int_f
-nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, int_f* offset, hsize_t_f*bytes)
+nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes)
/******/
{
int ret_value = -1;
@@ -2079,7 +2081,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name,
if (status < 0) goto DONE;
- *offset = (int_f)c_offset;
+ *offset = (off_t_f)c_offset;
*bytes = (hsize_t_f)size;
/* Note: if the size of the fortran buffer is larger then the returned string
* from the function then we need to give HD5packFstring the fortran buffer size so
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index 4254b7f..a3c9a60 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -27,7 +27,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
@@ -2329,14 +2329,16 @@ CONTAINS
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
-! port). March 14, 2001
+! port). March 14, 2001
+!
+! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
!
! Fortran90 Interface:
- SUBROUTINE h5pset_external_f(prp_id, name, offset,bytes, hdferr)
+ SUBROUTINE h5pset_external_f(prp_id, name, offset, bytes, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file
- INTEGER, INTENT(IN) :: offset ! Offset, in bytes, from the beginning
+ INTEGER(OFF_T), INTENT(IN) :: offset ! Offset, in bytes, from the beginning
! of the file to the location in the file
! where the data starts.
INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the
@@ -2347,9 +2349,6 @@ CONTAINS
INTEGER :: namelen
-! INTEGER, EXTERNAL :: h5pset_external_c
-! MS FORTRAN needs explicit interface for C functions called here.
-!
INTERFACE
INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes)
USE H5GLOBAL
@@ -2360,7 +2359,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: prp_id
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER :: namelen
- INTEGER, INTENT(IN) :: offset
+ INTEGER(OFF_T), INTENT(IN) :: offset
INTEGER(HSIZE_T), INTENT(IN) :: bytes
END FUNCTION h5pset_external_c
END INTERFACE
@@ -2453,7 +2452,9 @@ CONTAINS
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
-! port). March 14, 2001
+! port). March 14, 2001
+!
+! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
!
! Fortran90 Interface:
SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr)
@@ -2462,7 +2463,7 @@ CONTAINS
INTEGER, INTENT(IN) :: idx ! External file index.
INTEGER(SIZE_T), INTENT(IN) :: name_size ! Maximum length of name array
CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of an external file
- INTEGER, INTENT(OUT) :: offset ! Offset, in bytes, from the beginning
+ INTEGER(OFF_T), INTENT(OUT) :: offset ! Offset, in bytes, from the beginning
! of the file to the location in the file
! where the data starts.
INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the
@@ -2485,7 +2486,7 @@ CONTAINS
INTEGER, INTENT(IN) :: idx
INTEGER(SIZE_T), INTENT(IN) :: name_size
CHARACTER(LEN=*), INTENT(OUT) :: name
- INTEGER, INTENT(OUT) :: offset
+ INTEGER(OFF_T), INTENT(OUT) :: offset
INTEGER(HSIZE_T), INTENT(OUT) :: bytes
END FUNCTION h5pget_external_c
END INTERFACE
diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90
index b601e69..7fb6ff9 100644
--- a/fortran/src/H5Pff_F03.f90
+++ b/fortran/src/H5Pff_F03.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Pff_F90.f90 b/fortran/src/H5Pff_F90.f90
index ebdd185..5b75643 100644
--- a/fortran/src/H5Pff_F90.f90
+++ b/fortran/src/H5Pff_F90.f90
@@ -29,7 +29,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file '*hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90
index 89ffc10..64f1365 100644
--- a/fortran/src/H5Rff.f90
+++ b/fortran/src/H5Rff.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5R function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90
index 88ec8cf..dd36699 100644
--- a/fortran/src/H5Rff_F03.f90
+++ b/fortran/src/H5Rff_F03.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5R function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90
index 0190e57..ab074b9 100644
--- a/fortran/src/H5Rff_F90.f90
+++ b/fortran/src/H5Rff_F90.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5R function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90
index 9ef8ca8..1bae584 100644
--- a/fortran/src/H5Sff.f90
+++ b/fortran/src/H5Sff.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5S function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90
index fd857a8..89bd972 100644
--- a/fortran/src/H5Tff.f90
+++ b/fortran/src/H5Tff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5T function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90
index 902e2ac..d16553a 100644
--- a/fortran/src/H5Tff_F03.f90
+++ b/fortran/src/H5Tff_F03.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5T function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90
index 021773d..a95b31f 100644
--- a/fortran/src/H5Tff_F90.f90
+++ b/fortran/src/H5Tff_F90.f90
@@ -30,7 +30,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90
index ec68286..7b67b5b 100644
--- a/fortran/src/H5Zff.f90
+++ b/fortran/src/H5Zff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5Z function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90
index c51b039..f9c20ac 100644
--- a/fortran/src/H5_ff.f90
+++ b/fortran/src/H5_ff.f90
@@ -30,7 +30,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5_ff_F03.f90 b/fortran/src/H5_ff_F03.f90
index f3e7098..d418ed5 100644
--- a/fortran/src/H5_ff_F03.f90
+++ b/fortran/src/H5_ff_F03.f90
@@ -27,7 +27,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 9340c2a..4b02b6c 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -93,6 +93,7 @@ typedef struct H5O_info_t_f {
#define nh5fget_obj_count_c H5_FC_FUNC_(h5fget_obj_count_c, H5FGET_OBJ_COUNT_C)
#define nh5fget_obj_ids_c H5_FC_FUNC_(h5fget_obj_ids_c, H5FGET_OBJ_IDS_C)
#define nh5fget_freespace_c H5_FC_FUNC_(h5fget_freespace_c, H5FGET_FREESPACE_C)
+#define nh5fget_file_image_c H5_FC_FUNC_(h5fget_file_image_c, H5FGET_FILE_IMAGE_C)
#define nh5fget_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C)
#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C)
@@ -108,6 +109,7 @@ H5_FCDLL int_f nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id);
H5_FCDLL int_f nh5fget_obj_count_c (hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count);
H5_FCDLL int_f nh5fget_obj_ids_c (hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs);
H5_FCDLL int_f nh5fget_freespace_c (hid_t_f *file_id, hssize_t_f *free_space);
+H5_FCDLL int_f nh5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req);
H5_FCDLL int_f nh5fflush_c (hid_t_f *obj_id, int_f *scope);
H5_FCDLL int_f nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen);
H5_FCDLL int_f nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size);
@@ -1063,9 +1065,9 @@ H5_FCDLL int_f nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags
H5_FCDLL int_f nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters);
H5_FCDLL int_f nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id);
H5_FCDLL int_f nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name);
-H5_FCDLL int_f nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, int_f* offset, hsize_t_f*bytes);
+H5_FCDLL int_f nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes);
H5_FCDLL int_f nh5pget_external_count_c (hid_t_f *prp_id, int_f* count);
-H5_FCDLL int_f nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, int_f* offset, hsize_t_f*bytes);
+H5_FCDLL int_f nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes);
H5_FCDLL int_f nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
H5_FCDLL int_f nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
H5_FCDLL int_f nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 4c83d21..eb30775 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -321,6 +321,19 @@ int main(void)
return -1;
#endif
+ /* off_t */
+#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8
+ writeToFiles("OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_OFF_T >= 4
+ writeToFiles("OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_OFF_T >= 2
+ writeToFiles("OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_OFF_T >= 1
+ writeToFiles("OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+#else
+ /* Error: couldn't find a size for off_t */
+ return -1;
+#endif
/* size_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8
diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90
index cb3d8bf..75af333 100644
--- a/fortran/src/HDF5.f90
+++ b/fortran/src/HDF5.f90
@@ -30,6 +30,7 @@
MODULE HDF5
USE H5GLOBAL
USE H5F
+ USE H5F_PROVISIONAL
USE H5G
USE H5E
USE H5E_PROVISIONAL
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index e6ef610..12c38e2 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -76,7 +76,7 @@ libhdf5_fortran_la_SOURCES=H5f90global.f90 \
H5_DBLE_Interface$(F_DBLE).f90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c \
- H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
+ H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
# HDF5 Fortran library depends on HDF5 Library.
@@ -201,6 +201,7 @@ H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo
H5Aff$(F_STATUS).lo: $(srcdir)/H5Aff$(F_STATUS).f90 H5f90global.lo
H5Dff$(F_STATUS).lo: $(srcdir)/H5Dff$(F_STATUS).f90 H5f90global.lo
H5Eff$(F_STATUS).lo: $(srcdir)/H5Eff$(F_STATUS).f90 H5f90global.lo
+H5Fff$(F_STATUS).lo: $(srcdir)/H5Fff$(F_STATUS).f90 H5f90global.lo
H5Lff$(F_STATUS).lo: $(srcdir)/H5Lff$(F_STATUS).f90 H5f90global.lo
H5Off$(F_STATUS).lo: $(srcdir)/H5Off$(F_STATUS).f90 H5f90global.lo
H5Pff$(F_STATUS).lo: $(srcdir)/H5Pff$(F_STATUS).f90 H5f90global.lo
@@ -217,11 +218,11 @@ H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo
H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo
-H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
+H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo
@@ -230,7 +231,7 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 6a816b0..c41653f 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -128,9 +128,10 @@ am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \
H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \
H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \
H5Tf.c H5Zf.c H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 \
- H5Eff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 H5Off$(F_STATUS).f90 \
- H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 \
- HDF5.f90 H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90
+ H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
+ H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 \
+ H5Tff$(F_STATUS).f90 HDF5.f90 H5FDmpiof.c HDF5mpio.f90 \
+ H5FDmpioff.f90
@BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo
@BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \
@BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo
@@ -141,9 +142,9 @@ am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \
H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo \
H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo \
H5Zf.lo H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo \
- H5Eff$(F_STATUS).lo H5Lff$(F_STATUS).lo H5Off$(F_STATUS).lo \
- H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Tff$(F_STATUS).lo \
- $(am__objects_1)
+ H5Eff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Lff$(F_STATUS).lo \
+ H5Off$(F_STATUS).lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo \
+ H5Tff$(F_STATUS).lo $(am__objects_1)
libhdf5_fortran_la_OBJECTS = $(am_libhdf5_fortran_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -319,6 +320,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -370,7 +372,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -517,7 +518,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 = 134
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
@@ -556,7 +557,7 @@ libhdf5_fortran_la_SOURCES = H5f90global.f90 \
H5_DBLE_Interface$(F_DBLE).f90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c \
- H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
+ H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
@@ -1101,6 +1102,7 @@ H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo
H5Aff$(F_STATUS).lo: $(srcdir)/H5Aff$(F_STATUS).f90 H5f90global.lo
H5Dff$(F_STATUS).lo: $(srcdir)/H5Dff$(F_STATUS).f90 H5f90global.lo
H5Eff$(F_STATUS).lo: $(srcdir)/H5Eff$(F_STATUS).f90 H5f90global.lo
+H5Fff$(F_STATUS).lo: $(srcdir)/H5Fff$(F_STATUS).f90 H5f90global.lo
H5Lff$(F_STATUS).lo: $(srcdir)/H5Lff$(F_STATUS).f90 H5f90global.lo
H5Off$(F_STATUS).lo: $(srcdir)/H5Off$(F_STATUS).f90 H5f90global.lo
H5Pff$(F_STATUS).lo: $(srcdir)/H5Pff$(F_STATUS).f90 H5f90global.lo
@@ -1117,11 +1119,11 @@ H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo
H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo
-H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
+H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo
@@ -1130,7 +1132,7 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index bf7596d..4ce185b 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -228,6 +228,7 @@ H5F_mp_H5FGET_ACCESS_PLIST_F
H5F_mp_H5FIS_HDF5_F
H5F_mp_H5FGET_NAME_F
H5F_mp_H5FGET_FILESIZE_F
+@H5_NOF03EXP@H5F_PROVISIONAL_mp_H5FGET_FILE_IMAGE_F
; H5G
H5G_mp_H5GOPEN_F
H5G_mp_H5GCREATE_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 5b41a32..5b9ca11 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -105,6 +105,7 @@ IF (HDF5_ENABLE_F2003)
fortranlib_test_F03.f90
tH5F.f90
tH5E_F03.f90
+ tH5F_F03.f90
tH5L_F03.f90
tH5O_F03.f90
tH5P_F03.f90
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 42dd127..84f55e5 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -68,7 +68,7 @@ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \
if FORTRAN_2003_CONDITIONAL_F
fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \
- tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
+ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
endif
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index b9f05e3..6c226bc 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -136,11 +136,12 @@ 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 tH5O_F03.f90 tH5P_F03.f90 \
- tH5T_F03.f90
+ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 \
+ tH5P_F03.f90 tH5T_F03.f90
@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = fortranlib_test_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5E_F03.$(OBJEXT) \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5L_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5P_F03.$(OBJEXT) \
@@ -304,6 +305,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -355,7 +357,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -527,7 +528,7 @@ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \
tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90
@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \
-@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
fflush1_SOURCES = fflush1.f90
fflush2_SOURCES = fflush2.f90
diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.f90
index 606b050..1d9615f 100644
--- a/fortran/test/fortranlib_test_F03.f90
+++ b/fortran/test/fortranlib_test_F03.f90
@@ -145,7 +145,10 @@ PROGRAM fortranlibtest_F03
CALL test_nbit(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing nbit filter', total_error)
-
+ ret_total_error = 0
+ CALL external_test_offset(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing external dataset with offset', total_error)
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing GROUP interface '
@@ -163,6 +166,11 @@ PROGRAM fortranlibtest_F03
CALL obj_info(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing object info functions ', total_error)
+ ret_total_error = 0
+ CALL test_get_file_image(ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing get file image ', total_error)
+
+
WRITE(*,*)
WRITE(*,*) ' ============================================ '
diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90
new file mode 100644
index 0000000..dea9a5d
--- /dev/null
+++ b/fortran/test/tH5F_F03.f90
@@ -0,0 +1,175 @@
+!****h* root/fortran/test/tH5F_F03.f90
+!
+! NAME
+! tH5F_F03.f90
+!
+! FUNCTION
+! Test FORTRAN HDF5 H5F APIs which are dependent on FORTRAN 2003
+! features.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! NOTES
+! Tests the H5F APIs functionalities of:
+! h5fget_file_image_f
+!
+! CONTAINS SUBROUTINES
+! test_get_file_image
+!
+!*****
+
+! *****************************************
+! *** H 5 F T E S T S
+! *****************************************
+
+SUBROUTINE test_get_file_image(total_error)
+ !
+ ! Tests the wrapper for h5fget_file_image
+ !
+ USE HDF5
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+
+ INTEGER, INTENT(INOUT) :: total_error ! returns error
+
+ CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: file_image_ptr ! Image from file
+ CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: image_ptr ! Image from h5fget_file_image_f
+
+ INTEGER, DIMENSION(1:100), TARGET :: data ! Write data
+ INTEGER :: i, file_sz
+ INTEGER(hid_t) :: file_id = -1 ! File identifier
+ INTEGER(hid_t) :: dset_id = -1 ! Dataset identifier
+ INTEGER(hid_t) :: space_id = -1 ! Dataspace identifier
+ INTEGER(hsize_t), DIMENSION(1:2) :: dims ! Dataset dimensions
+ INTEGER(size_t) :: itmp_a, itmp_b ! General purpose integers
+ INTEGER(size_t) :: image_size ! Size of image
+ TYPE(C_PTR) :: f_ptr ! Pointer
+ INTEGER(hid_t) :: fapl ! File access property
+ INTEGER :: error ! Error flag
+
+
+ RETURN ! DEBUG, PGI COMPILERS seem to have a bug in the INQUIRE functions,
+ ! waiting for an answer from PGI how to resolve the problem.
+
+ ! Create new properties for file access
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+
+ ! Set standard I/O driver
+ CALL h5pset_fapl_stdio_f(fapl, error)
+ CALL check("h5pset_fapl_stdio_f", error, total_error)
+
+ ! Create the file
+ CALL h5fcreate_f("tget_file_image.h5", H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl)
+ CALL check("h5fcreate_f", error, total_error)
+
+ ! Set up data space for new data set
+ dims(1:2) = (/10,10/)
+
+ CALL h5screate_simple_f(2, dims, space_id, error)
+ CALL check("h5screate_simple_f", error, total_error)
+
+ ! Create a dataset
+ CALL h5dcreate_f(file_id, "dset 0", H5T_NATIVE_INTEGER, space_id, dset_id, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Write some data to the data set
+ DO i = 1, 100
+ data(i) = i
+ ENDDO
+
+ f_ptr = C_LOC(data(1))
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, f_ptr, error)
+ CALL check("h5dwrite_f",error, total_error)
+
+ ! Flush the file
+ CALL h5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error)
+ CALL check("h5fflush_f",error, total_error)
+
+ ! Open the test file using standard I/O calls
+ OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM')
+ ! Get the size of the test file
+ !
+ ! Since we use the eoa to calculate the image size, the file size
+ ! may be larger. This is OK, as long as (in this specialized instance)
+ ! the remainder of the file is all '\0's.
+ !
+ ! With latest mods to truncate call in core file drive,
+ ! file size should match image size; get the file size
+ INQUIRE(UNIT=10, SIZE=file_sz)
+ CLOSE(UNIT=10)
+
+ ! I. Get buffer size needed to hold the buffer
+
+ ! A. Preferred way to get the size
+ f_ptr = C_NULL_PTR
+ CALL h5fget_file_image_f(file_id, f_ptr, INT(0, size_t), error, image_size)
+ CALL check("h5fget_file_image_f",error, total_error)
+ CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error)
+
+ ! B. f_ptr set to point to an incorrect buffer, should pass anyway
+ f_ptr = C_LOC(data(1))
+ itmp_a = 1
+ CALL h5fget_file_image_f(file_id, f_ptr, itmp_a, error, image_size)
+ CALL check("h5fget_file_image_f",error, total_error)
+ CALL VERIFY("h5fget_file_image_f", INT(itmp_a), 1, total_error) ! Routine should not change the value
+ CALL VERIFY("h5fget_file_image_f", file_sz, INT(image_size), total_error)
+
+ ! Allocate a buffer of the appropriate size
+ ALLOCATE(image_ptr(1:image_size))
+
+ ! Load the image of the file into the buffer
+ f_ptr = C_LOC(image_ptr(1)(1:1))
+ CALL h5fget_file_image_f(file_id, f_ptr, image_size, error)
+ CALL check("h5fget_file_image_f",error, total_error)
+
+ ! Close dset and space
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5sclose_f(space_id, error)
+ CALL check("h5sclose_f", error, total_error)
+ ! Close the test file
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error, total_error)
+
+ ! Allocate a buffer for the test file image
+ ALLOCATE(file_image_ptr(1:image_size))
+
+ ! Open the test file using standard I/O calls
+ OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM')
+
+ ! Read the test file from disk into the buffer
+ DO i = 1, image_size
+ READ(10) file_image_ptr(i)
+ ENDDO
+
+ CLOSE(10)
+
+ ! verify the file and the image contain the same data
+ DO i = 1, image_size
+ ! convert one byte to an unsigned integer
+ IF( ICHAR(file_image_ptr(i)) .NE. ICHAR(image_ptr(i)))THEN
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! release resources
+ DEALLOCATE(file_image_ptr,image_ptr)
+
+END SUBROUTINE test_get_file_image
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90
index 3faaac2..4c78334 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.f90
@@ -27,385 +27,376 @@
!
!*****
- SUBROUTINE external_test(cleanup, total_error)
+SUBROUTINE external_test(cleanup, total_error)
! This subroutine tests following functionalities:
! h5pset_external_f, h5pget_external_count_f,
! h5pget_external_f
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
-
- CHARACTER(LEN=8), PARAMETER :: filename = "external"
- CHARACTER(LEN=80) :: fix_filename
- INTEGER(HID_T) :: file_id
- INTEGER(HID_T) :: plist_id
- INTEGER(HID_T) :: space_id
- INTEGER(HID_T) :: dataset_id
- INTEGER(HSIZE_T), DIMENSION(1) :: cur_size !data space current size
- INTEGER(HSIZE_T), DIMENSION(1) :: max_size !data space maximum size
- CHARACTER(LEN=256) :: name !external file name
- INTEGER :: file_offset !external file offset
- INTEGER(HSIZE_T) :: file_size !sizeof external file segment
- INTEGER :: error !error code
- INTEGER(SIZE_T) :: int_size !size of integer
- INTEGER(HSIZE_T) :: file_bytes !Number of bytes reserved
- !in the file for the data
- INTEGER :: RANK = 1 !dataset rank
- INTEGER :: count !number of external files for the
- !specified dataset
- INTEGER(SIZE_T) :: namesize
- INTEGER(HSIZE_T) :: size, buf_size
- INTEGER :: idx
-
- buf_size = 4*1024*1024
-
- !
- !Create file "external.h5" using default properties.
- !
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
- CALL check("h5fcreate_f",error,total_error)
-
-
- CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error)
- CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_buffer_f(plist_id, buf_size, error)
- CALL check("h5pset_buffer_f", error, total_error)
- CALL h5pget_buffer_f(plist_id, size, error)
- CALL check("h5pget_buffer_f", error, total_error)
- if (size .ne.buf_size) then
- total_error = total_error + 1
- write(*,*) "h5pget_buffer_f returned wrong size, error"
- endif
- CALL h5pclose_f(plist_id, error)
- CALL check("h5pclose_f", error, total_error)
-
- CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
- CALL check("h5pcreate_f",error,total_error)
- cur_size(1) =100
- max_size(1) = 100;
- call h5tget_size_f(H5T_NATIVE_INTEGER, int_size, error)
- CALL check("h5tget_size_f",error,total_error)
- file_size = int_size * max_size(1);
- CALL h5pset_external_f(plist_id, "ext1.data", 0, file_size, error)
- CALL check("h5pset_external_f",error,total_error)
- CALL h5screate_simple_f(RANK, cur_size, space_id, error, max_size)
- CALL check("h5screate_simple_f", error, total_error)
- CALL h5dcreate_f(file_id, "dset1", H5T_NATIVE_INTEGER, space_id, &
- dataset_id, error, plist_id)
- CALL check("h5dcreate_f", error, total_error)
-
- CALL h5dclose_f(dataset_id, error)
- CALL check("h5dclose_f", error, total_error)
- CALL h5pclose_f(plist_id, error)
- CALL check("h5pclose_f", error, total_error)
- CALL h5sclose_f(space_id, error)
- CALL check("h5sclose_f", error, total_error)
- CALL h5fclose_f(file_id, error)
-
- CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error)
- CALL h5dopen_f(file_id, "dset1", dataset_id, error)
- CALL check("h5dopen_f",error,total_error)
-
- ! Read dataset creation information
- CALL h5dget_create_plist_f(dataset_id, plist_id, error)
- CALL check("h5dget_create_plist_f",error,total_error)
- CALL h5pget_external_count_f(plist_id, count, error)
- CALL check("h5pget_external_count_f",error,total_error)
- if(count .ne. 1 ) then
- write (*,*) "got external_count is not correct"
- total_error = total_error + 1
- end if
- namesize = 10
- idx = 0
- CALL h5pget_external_f(plist_id, idx, namesize, name, file_offset, &
- file_bytes, error)
- CALL check("h5pget_external_f",error,total_error)
- if(file_offset .ne. 0 ) then
- write (*,*) "got external file offset is not correct"
- total_error = total_error + 1
- end if
- if(file_bytes .ne. file_size ) then
- write (*,*) "got external file size is not correct"
- total_error = total_error + 1
- end if
-
- CALL h5dclose_f(dataset_id, error)
- CALL check("h5dclose_f", error, total_error)
- CALL h5pclose_f(plist_id, error)
- CALL check("h5pclose_f", error, total_error)
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f", error, total_error)
-
-
- if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "external"
+ CHARACTER(LEN=80) :: fix_filename
+ INTEGER(HID_T) :: file_id
+ INTEGER(HID_T) :: plist_id
+ INTEGER(HID_T) :: space_id
+ INTEGER(HID_T) :: dataset_id
+ INTEGER(HSIZE_T), DIMENSION(1) :: cur_size !data space current size
+ INTEGER(HSIZE_T), DIMENSION(1) :: max_size !data space maximum size
+ CHARACTER(LEN=256) :: name !external file name
+ INTEGER(OFF_T) :: file_offset !external file offset
+ INTEGER(HSIZE_T) :: file_size !sizeof external file segment
+ INTEGER :: error !error code
+ INTEGER(SIZE_T) :: int_size !size of integer
+ INTEGER(HSIZE_T) :: file_bytes !Number of bytes reserved
+ !in the file for the data
+ INTEGER :: RANK = 1 !dataset rank
+ INTEGER :: count !number of external files for the
+ !specified dataset
+ INTEGER(SIZE_T) :: namesize
+ INTEGER(HSIZE_T) :: size, buf_size
+ INTEGER :: idx
+
+ buf_size = 4*1024*1024
+
+ !
+ !Create file "external.h5" using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ STOP "Cannot modify filename"
+ ENDIF
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_buffer_f(plist_id, buf_size, error)
+ CALL check("h5pset_buffer_f", error, total_error)
+ CALL h5pget_buffer_f(plist_id, size, error)
+ CALL check("h5pget_buffer_f", error, total_error)
+ IF (size .NE.buf_size) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5pget_buffer_f returned wrong size, error"
+ ENDIF
+ CALL h5pclose_f(plist_id, error)
+ CALL check("h5pclose_f", error, total_error)
+
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
+ CALL check("h5pcreate_f",error,total_error)
+ cur_size(1) =100
+ max_size(1) = 100
+ CALL h5tget_size_f(H5T_NATIVE_INTEGER, int_size, error)
+ CALL check("h5tget_size_f",error,total_error)
+ file_size = int_size * max_size(1)
+ CALL h5pset_external_f(plist_id, "ext1.data", INT(0,off_t), file_size, error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5screate_simple_f(RANK, cur_size, space_id, error, max_size)
+ CALL check("h5screate_simple_f", error, total_error)
+ CALL h5dcreate_f(file_id, "dset1", H5T_NATIVE_INTEGER, space_id, &
+ dataset_id, error, plist_id)
+ CALL check("h5dcreate_f", error, total_error)
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5pclose_f(plist_id, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5sclose_f(space_id, error)
+ CALL check("h5sclose_f", error, total_error)
+ CALL h5fclose_f(file_id, error)
+
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error)
+ CALL h5dopen_f(file_id, "dset1", dataset_id, error)
+ CALL check("h5dopen_f",error,total_error)
+
+ ! Read dataset creation information
+ CALL h5dget_create_plist_f(dataset_id, plist_id, error)
+ CALL check("h5dget_create_plist_f",error,total_error)
+ CALL h5pget_external_count_f(plist_id, count, error)
+ CALL check("h5pget_external_count_f",error,total_error)
+ IF(count .NE. 1 ) THEN
+ WRITE (*,*) "got external_count is not correct"
+ total_error = total_error + 1
+ END IF
+ namesize = 10
+ idx = 0
+ CALL h5pget_external_f(plist_id, idx, namesize, name, file_offset, &
+ file_bytes, error)
+ CALL check("h5pget_external_f",error,total_error)
+ IF(file_offset .NE. 0 ) THEN
+ WRITE (*,*) "got external file offset is not correct"
+ total_error = total_error + 1
+ END IF
+ IF(file_bytes .NE. file_size ) THEN
+ WRITE (*,*) "got external file size is not correct"
+ total_error = total_error + 1
+ END IF
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5pclose_f(plist_id, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
+END SUBROUTINE external_test
+
+SUBROUTINE multi_file_test(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+
+ CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name
+ CHARACTER(LEN=80) :: fix_filename
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dspace_id ! Dataspace identifier
+ INTEGER(HID_T) :: dtype_id ! Datatype identifier
+ INTEGER(HID_T) :: fapl, fapl_1 ! File access property list identifier
+ INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_map, memb_map_out
+ INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_fapl, memb_fapl_out
+ CHARACTER(LEN=20), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_name, memb_name_out
+ REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_addr, memb_addr_out
+ !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F) :: memb_addr
+ LOGICAL :: relax = .TRUE.
+ LOGICAL :: relax_out = .TRUE.
+
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
+ INTEGER :: rank = 2 ! Dataset rank
+
+ INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
+ INTEGER :: error ! Error flag
+ INTEGER(HID_T) :: driver
+ INTEGER :: i, j !general purpose integers
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+ INTEGER :: mdc_nelmts
+ INTEGER(SIZE_T) :: rdcc_nelmts
+ INTEGER(SIZE_T) :: rdcc_nbytes
+ REAL :: rdcc_w0
+ memb_fapl = H5P_DEFAULT_F
+ memb_map = H5FD_MEM_SUPER_F
+ memb_addr = 0.
+ memb_map(H5FD_MEM_SUPER_F) = H5FD_MEM_SUPER_F
+ memb_addr(H5FD_MEM_SUPER_F) = 0.
+ memb_map(H5FD_MEM_BTREE_F) = H5FD_MEM_BTREE_F
+ memb_addr(H5FD_MEM_BTREE_F) = 0.1
+ memb_map(H5FD_MEM_DRAW_F) = H5FD_MEM_DRAW_F
+ memb_addr(H5FD_MEM_DRAW_F) = 0.5
+ memb_map(H5FD_MEM_GHEAP_F) = H5FD_MEM_GHEAP_F
+ memb_addr(H5FD_MEM_GHEAP_F) = 0.2
+ memb_map(H5FD_MEM_LHEAP_F) = H5FD_MEM_LHEAP_F
+ memb_addr(H5FD_MEM_LHEAP_F) = 0.3
+ memb_map(H5FD_MEM_OHDR_F) = H5FD_MEM_OHDR_F
+ memb_addr(H5FD_MEM_OHDR_F) = 0.4
+
+ memb_name = ' '
+ memb_name(H5FD_MEM_SUPER_F) = '%s-s.h5'
+ memb_name(H5FD_MEM_BTREE_F) = '%s-b.h5'
+ memb_name(H5FD_MEM_DRAW_F) = '%s-r.h5'
+ memb_name(H5FD_MEM_GHEAP_F) = '%s-g.h5'
+ memb_name(H5FD_MEM_LHEAP_F) = '%s-l.h5'
+ memb_name(H5FD_MEM_OHDR_F) = '%s-o.h5'
+
+ !
+ ! Initialize the dset_data array.
+ !
+ DO i = 1, 4
+ DO j = 1, 6
+ dset_data(i,j) = (i-1)*6 + j
+ END DO
+ END DO
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ WRITE(*,*) "Cannot modify filename"
+ STOP
+ ENDIF
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_fapl_multi_f(fapl, memb_map, memb_fapl, memb_name, memb_addr, relax, error)
+ CALL check("h5pset_fapl_multi_f", error, total_error)
+ CALL h5pget_fapl_multi_f(fapl, memb_map_out, memb_fapl_out, memb_name_out, &
+ memb_addr_out, relax_out, error)
+ CALL check("h5pget_fapl_multi_f", error, total_error)
+ CALL h5pget_driver_f(fapl, driver, error)
+ CALL check("h5pget_driver_f",error, total_error)
+ IF(driver .NE. H5FD_MULTI_F) THEN
+ WRITE(*,*) "Wrong value for driver"
+ ENDIF
+ !
+ ! Let's check h5pget(set)cache_f APIs here for now
+ !
+ CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
+ rdcc_w0, error)
+ CALL check("h5pget_cache_f", error, total_error)
+
+ !
+ ! Set cache to some number
+ !
+ rdcc_nbytes = 1024*1024
+ CALL h5pset_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
+ rdcc_w0, error)
+ CALL check("h5pset_cache_f", error, total_error)
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = fapl)
+ CALL check("h5fcreate_f", error, total_error)
+ IF(error .NE. 0) THEN
+ WRITE(*,*) "Cannot create file using multi-file driver... Exiting...."
+ total_error = 1
+ CALL h5pclose_f(fapl, error)
RETURN
- END SUBROUTINE external_test
-
- SUBROUTINE multi_file_test(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
-
- CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name
- CHARACTER(LEN=80) :: fix_filename
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
- INTEGER(HID_T) :: dspace_id ! Dataspace identifier
- INTEGER(HID_T) :: dtype_id ! Datatype identifier
- INTEGER(HID_T) :: fapl, fapl_1 ! File access property list identifier
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_map, memb_map_out
- INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_fapl, memb_fapl_out
- CHARACTER(LEN=20), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_name, memb_name_out
- REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_addr, memb_addr_out
- !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F) :: memb_addr
- LOGICAL :: relax = .TRUE.
- LOGICAL :: relax_out = .TRUE.
-
- INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
- INTEGER :: rank = 2 ! Dataset rank
-
- INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
- INTEGER :: error ! Error flag
- INTEGER(HID_T) :: driver
- INTEGER :: i, j !general purpose integers
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
- INTEGER :: mdc_nelmts
- INTEGER(SIZE_T) :: rdcc_nelmts
- INTEGER(SIZE_T) :: rdcc_nbytes
- REAL :: rdcc_w0
- memb_fapl = H5P_DEFAULT_F
- memb_map = H5FD_MEM_SUPER_F
- memb_addr = 0.
- memb_map(H5FD_MEM_SUPER_F) = H5FD_MEM_SUPER_F
- memb_addr(H5FD_MEM_SUPER_F) = 0.
- memb_map(H5FD_MEM_BTREE_F) = H5FD_MEM_BTREE_F
- memb_addr(H5FD_MEM_BTREE_F) = 0.1
- memb_map(H5FD_MEM_DRAW_F) = H5FD_MEM_DRAW_F
- memb_addr(H5FD_MEM_DRAW_F) = 0.5
- memb_map(H5FD_MEM_GHEAP_F) = H5FD_MEM_GHEAP_F
- memb_addr(H5FD_MEM_GHEAP_F) = 0.2
- memb_map(H5FD_MEM_LHEAP_F) = H5FD_MEM_LHEAP_F
- memb_addr(H5FD_MEM_LHEAP_F) = 0.3
- memb_map(H5FD_MEM_OHDR_F) = H5FD_MEM_OHDR_F
- memb_addr(H5FD_MEM_OHDR_F) = 0.4
-
- memb_name = ' '
- memb_name(H5FD_MEM_SUPER_F) = '%s-s.h5'
- memb_name(H5FD_MEM_BTREE_F) = '%s-b.h5'
- memb_name(H5FD_MEM_DRAW_F) = '%s-r.h5'
- memb_name(H5FD_MEM_GHEAP_F) = '%s-g.h5'
- memb_name(H5FD_MEM_LHEAP_F) = '%s-l.h5'
- memb_name(H5FD_MEM_OHDR_F) = '%s-o.h5'
-
- !
- ! Initialize the dset_data array.
- !
- do i = 1, 4
- do j = 1, 6
- dset_data(i,j) = (i-1)*6 + j;
- end do
- end do
-
- !
- ! Create a new file using default properties.
- !
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_fapl_multi_f(fapl, memb_map, memb_fapl, memb_name, memb_addr, relax, error)
- CALL check("h5pset_fapl_multi_f", error, total_error)
- CALL h5pget_fapl_multi_f(fapl, memb_map_out, memb_fapl_out, memb_name_out, &
- memb_addr_out, relax_out, error)
- CALL check("h5pget_fapl_multi_f", error, total_error)
- CALL h5pget_driver_f(fapl, driver, error)
- CALL check("h5pget_driver_f",error, total_error)
- if(driver .ne. H5FD_MULTI_F) then
- write(*,*) "Wrong value for driver"
- endif
- !
- ! Let's check h5pget(set)cache_f APIs here for now
- !
- CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
- rdcc_w0, error)
- CALL check("h5pget_cache_f", error, total_error)
-
-
- ! Set cache to some number
- !
- rdcc_nbytes = 1024*1024
- CALL h5pset_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
- rdcc_w0, error)
- CALL check("h5pset_cache_f", error, total_error)
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = fapl)
- CALL check("h5fcreate_f", error, total_error)
- if(error .ne. 0) then
- write(*,*) "Cannot create file using multi-file driver... Exiting...."
- total_error = 1
- call h5pclose_f(fapl, error)
- return
- endif
-
- !
- ! Create the dataspace.
- !
- CALL h5screate_simple_f(rank, dims, dspace_id, error)
- CALL check("h5screate_simple_f", error, total_error)
-
-
- !
- ! Create the dataset with default properties.
- !
- CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
- dset_id, error)
- CALL check("h5dcreate_f", error, total_error)
-
- !
- ! Write the dataset.
- !
- data_dims(1) = 4
- data_dims(2) = 6
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
- CALL check("h5dwrite_f", error, total_error)
-
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f", error, total_error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(dspace_id, error)
- CALL check("h5sclose_f", error, total_error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f", error, total_error)
- CALL h5pclose_f(fapl, error)
- CALL check("h5pclose_f", error, total_error)
- !
- ! Open the existing file.
- !
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_fapl_multi_f(fapl, relax, error)
- CALL check("h5pset_fapl_multi_f", error, total_error)
- CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error, access_prp = fapl)
- CALL check("h5fopen_f", error, total_error)
- !
- CALL h5fget_access_plist_f(file_id, fapl_1, error)
- CALL check("h5fget_access_plist_f", error, total_error)
- !It doesn't work on Windows.
- !CALL h5pget_fapl_multi_f(fapl_1, memb_map_out, memb_fapl_out, memb_name_out, &
- ! memb_addr_out, relax_out, error)
- ! write(*,*) memb_map_out
- ! write(*,*) memb_fapl_out
- ! write(*,*) memb_name_out
- ! write(*,*) memb_addr_out
- ! CALL check("h5pget_fapl_multi_f", error, total_error)
-
- !
- ! Open the existing dataset.
- !
- CALL h5dopen_f(file_id, dsetname, dset_id, error)
- CALL check("h5dopen_f", error, total_error)
-
- !
- ! Get the dataset type.
- !
- CALL h5dget_type_f(dset_id, dtype_id, error)
- CALL check("h5dget_type_f", error, total_error)
-
- !
- ! Get the data space.
- !
- CALL h5dget_space_f(dset_id, dspace_id, error)
- CALL check("h5dget_space_f", error, total_error)
-
- !
- ! Read the dataset.
- !
- CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
- CALL check("h5dread_f", error, total_error)
-
- !
- !Compare the data.
- !
- do i = 1, 4
- do j = 1, 6
- IF (data_out(i,j) .NE. dset_data(i, j)) THEN
- write(*, *) "dataset test error occured"
- write(*,*) "data read is not the same as the data writen"
- END IF
- end do
- end do
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f", error, total_error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(dspace_id, error)
- CALL check("h5sclose_f", error, total_error)
-
- !
- ! Terminate access to the data type.
- !
- CALL h5tclose_f(dtype_id, error)
- CALL check("h5tclose_f", error, total_error)
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f", error, total_error)
- CALL h5pclose_f(fapl, error)
- CALL check("h5pclose_f", error, total_error)
- CALL h5pclose_f(fapl_1, error)
- CALL check("h5pclose_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
-
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-b', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-g', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-l', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-o', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-r', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-s', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
-
- RETURN
- END SUBROUTINE multi_file_test
+ ENDIF
+ !
+ ! Create the dataspace.
+ !
+ CALL h5screate_simple_f(rank, dims, dspace_id, error)
+ CALL check("h5screate_simple_f", error, total_error)
+ !
+ ! Create the dataset with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
+ dset_id, error)
+ CALL check("h5dcreate_f", error, total_error)
+ !
+ ! Write the dataset.
+ !
+ data_dims(1) = 4
+ data_dims(2) = 6
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
+ CALL check("h5dwrite_f", error, total_error)
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(dspace_id, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f", error, total_error)
+ CALL h5pclose_f(fapl, error)
+ CALL check("h5pclose_f", error, total_error)
+ !
+ ! Open the existing file.
+ !
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_fapl_multi_f(fapl, relax, error)
+ CALL check("h5pset_fapl_multi_f", error, total_error)
+ CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error, access_prp = fapl)
+ CALL check("h5fopen_f", error, total_error)
+ !
+ CALL h5fget_access_plist_f(file_id, fapl_1, error)
+ CALL check("h5fget_access_plist_f", error, total_error)
+ !It doesn't work on Windows.
+ !CALL h5pget_fapl_multi_f(fapl_1, memb_map_out, memb_fapl_out, memb_name_out, &
+ ! memb_addr_out, relax_out, error)
+ ! write(*,*) memb_map_out
+ ! write(*,*) memb_fapl_out
+ ! write(*,*) memb_name_out
+ ! write(*,*) memb_addr_out
+ ! CALL check("h5pget_fapl_multi_f", error, total_error)
+
+ !
+ ! Open the existing dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+ CALL check("h5dopen_f", error, total_error)
+
+ !
+ ! Get the dataset type.
+ !
+ CALL h5dget_type_f(dset_id, dtype_id, error)
+ CALL check("h5dget_type_f", error, total_error)
+
+ !
+ ! Get the data space.
+ !
+ CALL h5dget_space_f(dset_id, dspace_id, error)
+ CALL check("h5dget_space_f", error, total_error)
+
+ !
+ ! Read the dataset.
+ !
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
+ CALL check("h5dread_f", error, total_error)
+
+ !
+ !Compare the data.
+ !
+ DO i = 1, 4
+ DO j = 1, 6
+ IF (data_out(i,j) .NE. dset_data(i, j)) THEN
+ WRITE(*, *) "dataset test error occured"
+ WRITE(*,*) "data read is not the same as the data writen"
+ END IF
+ END DO
+ END DO
+
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(dspace_id, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ !
+ ! Terminate access to the data type.
+ !
+ CALL h5tclose_f(dtype_id, error)
+ CALL check("h5tclose_f", error, total_error)
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f", error, total_error)
+ CALL h5pclose_f(fapl, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5pclose_f(fapl_1, error)
+ CALL check("h5pclose_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-b', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-g', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-l', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-o', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-r', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-s', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+ RETURN
+END SUBROUTINE multi_file_test
!-------------------------------------------------------------------------
! Function: test_chunk_cache
@@ -432,24 +423,24 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
-
+
CHARACTER(LEN=14), PARAMETER :: filename="chunk_cache"
CHARACTER(LEN=80) :: fix_filename
- INTEGER(hid_t) :: fid = -1 ! /* File ID */
+ INTEGER(hid_t) :: fid = -1 ! File ID
INTEGER(hid_t) :: file
- INTEGER(hid_t) :: fapl_local = -1 ! /* Local fapl */
- INTEGER(hid_t) :: fapl_def = -1 ! /* Default fapl */
- INTEGER(hid_t) :: dcpl = -1 !/* Dataset creation property list ID */
- INTEGER(hid_t) :: dapl1 = -1 !/* Dataset access property list ID */
- INTEGER(hid_t) :: dapl2 = -1 !/* Dataset access property list ID */
- INTEGER(hid_t) :: sid = -1 !/* Dataspace ID */
- INTEGER(hid_t) :: dsid = -1 !/* Dataset ID */
- INTEGER(hsize_t), DIMENSION(1:1) :: chunk_dim, NDIM = (/100/) !/* Dataset and chunk dimensions */
- INTEGER(size_t) :: nslots_1, nslots_2, nslots_3, nslots_4 !/* rdcc number of elements */
- INTEGER(size_t) :: nbytes_1, nbytes_2, nbytes_3, nbytes_4 !/* rdcc number of bytes */
+ INTEGER(hid_t) :: fapl_local = -1 ! Local fapl
+ INTEGER(hid_t) :: fapl_def = -1 ! Default fapl
+ INTEGER(hid_t) :: dcpl = -1 ! Dataset creation property list ID
+ INTEGER(hid_t) :: dapl1 = -1 ! Dataset access property list ID
+ INTEGER(hid_t) :: dapl2 = -1 ! Dataset access property list ID
+ INTEGER(hid_t) :: sid = -1 ! Dataspace ID
+ INTEGER(hid_t) :: dsid = -1 ! Dataset ID
+ INTEGER(hsize_t), DIMENSION(1:1) :: chunk_dim, NDIM = (/100/) ! Dataset and chunk dimensions
+ INTEGER(size_t) :: nslots_1, nslots_2, nslots_3, nslots_4 ! rdcc number of elements
+ INTEGER(size_t) :: nbytes_1, nbytes_2, nbytes_3, nbytes_4 ! rdcc number of bytes
INTEGER :: mdc_nelmts
- INTEGER(size_t) ::nlinks !/* Number of link traversals */
- REAL :: w0_1, w0_2, w0_3, w0_4; !/* rdcc preemption policy */
+ INTEGER(size_t) ::nlinks ! Number of link traversals
+ REAL :: w0_1, w0_2, w0_3, w0_4 ! rdcc preemption policy
INTEGER :: error
INTEGER(size_t) rdcc_nelmts
INTEGER(size_t) rdcc_nbytes
@@ -462,7 +453,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
STOP
ENDIF
- !/* Create a default fapl and dapl */
+ ! Create a default fapl and dapl
CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl_def, error)
CALL check("H5Pcreate_f", error, total_error)
CALL H5Pcreate_f(H5P_DATASET_ACCESS_F, dapl1, error)
@@ -481,7 +472,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
- ! /* Set a lapl property on dapl1 (to verify inheritance) */
+ ! Set a lapl property on dapl1 (to verify inheritance)
CALL H5Pset_nlinks_f(dapl1, 134_size_t , error)
CALL check("H5Pset_nlinks_f", error, total_error)
CALL H5Pget_nlinks_f(dapl1, nlinks, error)
@@ -494,7 +485,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
! Turn off the chunk cache, so all the chunks are immediately written to disk
CALL H5Pget_cache_f(fapl_local, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, error)
CALL check("H5Pget_cache_f", error, total_error)
- rdcc_nbytes = 0;
+ rdcc_nbytes = 0
CALL H5Pset_cache_f(fapl_local, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, error)
CALL check("H5Pset_cache_f", error, total_error)
@@ -506,29 +497,29 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Pset_cache_f(fapl_local, 0, nslots_2, nbytes_2, w0_2, error)
CALL check("H5Pset_cache_f", error, total_error)
- !/* Create file */
+ ! Create file
CALL H5Fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error, H5P_DEFAULT_F, fapl_local)
CALL check("H5Fcreate_f", error, total_error)
- !/* Create dataset creation property list */
+ ! Create dataset creation property list
CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
CALL check("H5Pcreate_f", error, total_error)
- !/* Set chunking */
- chunk_dim(1) = 10;
+ ! Set chunking
+ chunk_dim(1) = 10
CALL H5Pset_chunk_f(dcpl, 1, chunk_dim, error)
CALL check("H5Pset_chunk_f", error, total_error)
- !/* Create 1-D dataspace */
+ ! Create 1-D dataspace
ndim(1) = 100
CALL H5Screate_simple_f(1, ndim, sid, error)
CALL check("H5Pcreate_f", error, total_error)
- ! /* Create dataset with default dapl */
+ ! Create dataset with default dapl
CALL H5Dcreate_f(fid, "dset", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, dapl1)
CALL check("H5Pcreate_f", error, total_error)
- ! /* Retrieve dapl from dataset, verify cache values are the same as on fapl_local */
+ ! Retrieve dapl from dataset, verify cache values are the same as on fapl_local
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error)
@@ -538,7 +529,8 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IF(w0_2.NE.w0_4)THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
! Set new values on dapl1. nbytes will be set to default, so the file
! property will override this setting
@@ -550,7 +542,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Pset_chunk_cache_f(dapl1, nslots_3, nbytes_3, w0_3, error)
CALL check("H5Pset_chunk_cache_f", error, total_error)
- ! Close dataset, reopen with dapl1. Note the use of a dapl with H5Oopen */
+ ! Close dataset, reopen with dapl1. Note the use of a dapl with H5Oopen
CALL H5Dclose_f(dsid, error)
CALL H5Oopen_f(fid, "dset", dsid, error, dapl1)
@@ -569,10 +561,12 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IF(w0_3.NE.w0_4)THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f4", .TRUE., .FALSE., total_error)
ENDIF
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
! Close dataset, reopen with H5P_DEFAULT as dapl
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
CALL H5Oopen_f(fid, "dset", dsid, error)
CALL check("H5Oopen_f", error, total_error)
@@ -587,10 +581,12 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IF(w0_2.NE.w0_4)THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
! Similary, test use of H5Dcreate2 with H5P_DEFAULT
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
CALL H5Dcreate_f(fid, "dset2", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F)
CALL check("H5Pcreate_f", error, total_error)
@@ -615,8 +611,10 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
! Close and reopen file with new fapl_local
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
- CALL H5Fclose_f(fid,error); CALL check("h5fclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
+ CALL H5Fclose_f(fid,error)
+ CALL check("h5fclose_f", error, total_error)
CALL H5Fopen_f (fix_filename, H5F_ACC_RDWR_F, fid, error, fapl_local)
CALL check("h5fopen_f", error, total_error)
@@ -628,7 +626,8 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL h5dopen_f (fid, "dset", dsid, error, dapl2)
CALL check("h5dopen_f", error, total_error)
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error) ! Close dapl2, to avoid id leak
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error) ! Close dapl2, to avoid id leak
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
@@ -647,11 +646,13 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Pset_chunk_cache_f(dapl2, nslots_2, nbytes_2, w0_2, error)
CALL check("H5Pset_chunk_cache_f", error, total_error)
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
CALL h5dopen_f (fid, "dset", dsid, error, dapl2)
CALL check("h5dopen_f", error, total_error)
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
@@ -665,17 +666,24 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
! Close
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
- CALL H5Sclose_f(sid,error); CALL check("H5Sclose_f", error, total_error)
- CALL H5Pclose_f(fapl_local,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(fapl_def,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(dapl1,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(dcpl,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Fclose_f(fid,error); CALL check("H5Fclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
+ CALL H5Sclose_f(sid,error)
+ CALL check("H5Sclose_f", error, total_error)
+ CALL H5Pclose_f(fapl_local,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(fapl_def,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl1,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dcpl,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Fclose_f(fid,error)
+ CALL check("H5Fclose_f", error, total_error)
IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE test_chunk_cache
-
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90
index aec8a26..02ca9dc 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.f90
@@ -362,3 +362,144 @@ SUBROUTINE test_genprop_class_callback(total_error)
CALL check("h5pclose_class_f", error, total_error)
END SUBROUTINE test_genprop_class_callback
+
+!-------------------------------------------------------------------------
+! Function: external_test_offset
+!
+! Purpose: Tests APIs:
+! h5pset_external_f (with offsets not equal to zero), h5pget_external_f
+!
+! Return: Success: 0
+! Failure: -1
+!
+! FORTRAN Programmer: M. Scot Breitenfeld
+! January 10, 2012
+!-------------------------------------------------------------------------
+!
+SUBROUTINE external_test_offset(cleanup,total_error)
+
+ USE ISO_C_BINDING
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: total_error
+ LOGICAL, INTENT(IN) :: cleanup
+
+ INTEGER(hid_t) :: fapl=-1 ! file access property list
+ INTEGER(hid_t) :: file=-1 ! file to write to
+ INTEGER(hid_t) :: dcpl=-1 ! dataset creation properties
+ INTEGER(hid_t) :: space=-1 ! data space
+ INTEGER(hid_t) :: dset=-1 ! dataset
+ INTEGER(hid_t) :: grp=-1 ! group to emit diagnostics
+ INTEGER(size_t) :: i, j ! miscellaneous counters
+ CHARACTER(LEN=180) :: filename ! file names
+ INTEGER, DIMENSION(1:25) :: part ! raw data buffers
+ INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers
+ INTEGER(hsize_t), DIMENSION(1:1) :: cur_size ! current data space size
+ INTEGER(hid_t) :: hs_space ! hyperslab data space
+ INTEGER(hsize_t), DIMENSION(1:1) :: hs_start = (/30/) ! hyperslab starting offset
+ INTEGER(hsize_t), DIMENSION(1:1) :: hs_count = (/25/) ! hyperslab size
+ CHARACTER(LEN=1) :: ichr1 ! character conversion holder
+ INTEGER :: error ! error status
+ TYPE(C_PTR) :: f_ptr ! fortran pointer
+
+ CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:30) :: temparray
+
+ temparray(1:30)(1:1) = '0' ! 1 byte character
+
+ ! Write the data to external files directly
+ DO i = 1, 4
+ DO j = 1, 25
+ part(j) = (i-1)*25+(j-1)
+ ENDDO
+ WRITE(ichr1,'(I1.1)') i
+ filename = "extern_"//ichr1//"a.raw"
+ OPEN(10, FILE=filename, ACCESS='STREAM', form='UNFORMATTED')
+
+ WRITE(10) temparray(1:(i-1)*10)
+ WRITE(10) part
+ CLOSE(10)
+ ENDDO
+ !
+ ! Create the file and an initial group.
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL h5fcreate_f('extren_raw.h5', H5F_ACC_TRUNC_F, file, error, access_prp=fapl)
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5gcreate_f(file, "emit-diagnostics", grp, error)
+ CALL check("h5gcreate_f",error, total_error)
+
+ ! Create the dataset
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+
+ cur_size(1) = 100
+ CALL h5screate_simple_f(1, cur_size, space, error)
+ CALL check("h5screate_simple_f", error, total_error)
+ CALL h5dcreate_f(file, "dset1", H5T_NATIVE_INTEGER, space, dset,error,dcpl_id=dcpl)
+ CALL check("h5dcreate_f", error, total_error)
+
+ !
+ ! Read the entire dataset and compare with the original
+ whole(:) = 0
+ f_ptr = C_LOC(whole(1))
+ CALL h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space_id=space, file_space_id=space)
+ CALL check("h5dread_f", error, total_error)
+
+ DO i = 1, 100
+ IF(whole(i) .NE. i-1)THEN
+ WRITE(*,*) "Incorrect value(s) read."
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+ !
+ ! Read the middle of the dataset
+ CALL h5scopy_f(space, hs_space, error)
+ CALL check("h5scopy_f", error, total_error)
+ CALL h5sselect_hyperslab_f(hs_space, H5S_SELECT_SET_F, hs_start, hs_count, error)
+ CALL check("h5sselect_hyperslab_f", error, total_error)
+
+ whole(:) = 0
+ f_ptr = C_LOC(whole(1))
+ CALL h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space_id=hs_space, file_space_id=hs_space)
+ CALL check("h5dread_f", error, total_error)
+
+ CALL h5sclose_f(hs_space, error)
+ CALL check("h5sclose_f", error, total_error)
+ DO i = hs_start(1)+1, hs_start(1)+hs_count(1)
+ IF(whole(i) .NE. i-1)THEN
+ WRITE(*,*) "Incorrect value(s) read."
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5pclose_f(dcpl, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5sclose_f(space, error)
+ CALL check("h5sclose_f", error, total_error)
+ CALL h5fclose_f(file, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ ! cleanup
+ DO i = 1, 4
+ WRITE(ichr1,'(I1.1)') i
+ filename = "extern_"//ichr1//"a.raw"
+ CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ ENDDO
+ IF(cleanup) CALL h5_cleanup_f("extren_raw.h5", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+END SUBROUTINE external_test_offset
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index 7336cf7..f7efcc4 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -405,7 +405,7 @@ END SUBROUTINE test_array_compound_atomic
CALL check("h5tarray_create_f", error, total_error)
! Insert character array field
- CALL h5tinsert_f(tid2, "c", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1))), tid4, error)
+ CALL h5tinsert_f(tid2, "c", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1)(1:1))), tid4, error)
CALL check("h5tinsert2_f", error, total_error)
! Close array of floats field datatype
@@ -551,7 +551,7 @@ END SUBROUTINE test_array_compound_atomic
CALL H5Tget_member_offset_f(tid2, 2, off, error)
CALL check("H5Tget_member_offset_f", error, total_error)
CALL VERIFY("H5Tget_member_offset_f",INT(off),&
- INT(H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1)))), total_error)
+ INT(H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1)(1:1)))), total_error)
! Check the 3rd field's datatype
CALL H5Tget_member_type_f(tid2, 2, mtid2, error)
@@ -1710,7 +1710,7 @@ SUBROUTINE t_opaque(total_error)
!
CALL h5dcreate_f(file, dataset, dtype, space, dset, error)
CALL check("h5dcreate_f",error, total_error)
- f_ptr = C_LOC(wdata(1))
+ f_ptr = C_LOC(wdata(1)(1:1))
CALL h5dwrite_f(dset, dtype, f_ptr, error)
CALL check("h5dwrite_f",error, total_error)
!
@@ -1774,7 +1774,7 @@ SUBROUTINE t_opaque(total_error)
!
! Read the data.
!
- f_ptr = C_LOC(rdata(1))
+ f_ptr = C_LOC(rdata(1)(1:1))
CALL h5dread_f(dset, dtype, f_ptr, error)
CALL check("H5Dread_f",error, total_error)
!
@@ -2123,7 +2123,7 @@ SUBROUTINE t_regref(total_error)
CALL h5screate_simple_f(1, dims3, memspace, error)
CALL check("h5screate_simple_f",error, total_error)
- f_ptr = C_LOC(rdata2(1))
+ f_ptr = C_LOC(rdata2(1)(1:1))
CALL h5dread_f( dset2, H5T_NATIVE_INTEGER_1, f_ptr, error, memspace, space)
CALL check("H5Dread_f",error, total_error)
CALL verifystring("h5dread_f",rdata2(1)(1:npoints),TRIM(chrref_correct(i)), total_error)
@@ -2473,24 +2473,24 @@ SUBROUTINE t_vlstring_readwrite(total_error)
! Initialize array of C pointers
- wdata(1) = C_LOC(A(1))
- wdata(2) = C_LOC(B(1))
- wdata(3) = C_LOC(C(1))
- wdata(4) = C_LOC(D(1))
+ wdata(1) = C_LOC(A(1)(1:1))
+ wdata(2) = C_LOC(B(1)(1:1))
+ wdata(3) = C_LOC(C(1)(1:1))
+ wdata(4) = C_LOC(D(1)(1:1))
data_w(1) = A(1)
data_w(2) = B(1)
data_w(3) = C(1)
data_w(4) = D(1)
- wdata2D(1,1) = C_LOC(A11(1))
- wdata2D(1,2) = C_LOC(A12(1))
- wdata2D(1,3) = C_LOC(A13(1))
- wdata2D(1,4) = C_LOC(A14(1))
- wdata2D(2,1) = C_LOC(A21(1))
- wdata2D(2,2) = C_LOC(A22(1))
- wdata2D(2,3) = C_LOC(A23(1))
- wdata2D(2,4) = C_LOC(A24(1))
+ wdata2D(1,1) = C_LOC(A11(1)(1:1))
+ wdata2D(1,2) = C_LOC(A12(1)(1:1))
+ wdata2D(1,3) = C_LOC(A13(1)(1:1))
+ wdata2D(1,4) = C_LOC(A14(1)(1:1))
+ wdata2D(2,1) = C_LOC(A21(1)(1:1))
+ wdata2D(2,2) = C_LOC(A22(1)(1:1))
+ wdata2D(2,3) = C_LOC(A23(1)(1:1))
+ wdata2D(2,4) = C_LOC(A24(1)(1:1))
data2D_w(1,1) = A11(1)
data2D_w(1,2) = A12(1)
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 1cbc87e..9a93367 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -229,6 +229,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -280,7 +281,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/Makefile.in b/hl/Makefile.in
index dddd693..786bfba 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -231,6 +231,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -282,7 +283,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 4a33b33..60baefe 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -227,6 +227,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -278,7 +279,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index f617fec..8297d0a 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -193,6 +193,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -244,7 +245,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 149fd6d..89aee46 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -260,6 +260,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -311,7 +312,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -458,7 +458,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 = 134
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
# Include src directory
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 0213f38..f8ad89b 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -226,6 +226,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -277,7 +278,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index f6126d4..2713377 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -193,6 +193,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -244,7 +245,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 6fe288c..8b7f728 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -231,6 +231,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -282,7 +283,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index 7dd855b..9f08f21 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -194,6 +194,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -245,7 +246,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index d1b1977..fc734df 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -276,6 +276,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -327,7 +328,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -474,7 +474,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 = 134
+LT_VERS_REVISION = 138
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/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index 7e69b79..2acee8c 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -240,6 +240,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -291,7 +292,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index afef6f7..bd46a70 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -259,6 +259,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -310,7 +311,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 134
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
# This library is our main target.
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index ad3f370..30b329e 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -267,6 +267,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -318,7 +319,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index 23baa17..eca7b8f 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -228,6 +228,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -279,7 +280,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index 8b98276..3d7e7fe 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -242,6 +242,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -293,7 +294,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/perform/Makefile.in b/perform/Makefile.in
index 230469c..4cc5b2b 100644
--- a/perform/Makefile.in
+++ b/perform/Makefile.in
@@ -268,6 +268,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -319,7 +320,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/release_docs/CMake.txt b/release_docs/CMake.txt
index 029d16d..81dfb61 100644
--- a/release_docs/CMake.txt
+++ b/release_docs/CMake.txt
@@ -10,7 +10,7 @@ Notes: This short instruction is written for users who want to quickly build
www.cmake.org.
CMake uses the command line, however the visual CMake tool is
- recommended for the configuration step. The steps are similiar for
+ recommended for the configuration step. The steps are similar for
all the operating systems supported by CMake.
NOTES:
@@ -25,14 +25,14 @@ Notes: This short instruction is written for users who want to quickly build
Please send us any comments on how CMake support can be improved on
any system. Visit the KitWare site for more information about CMake.
- 3. If you are building HDF5 on Windows, do NOT use or execute any
- files from the windows folder.
-
- 4. Build and test results can be submitted to our CDash server at:
+ 3. Build and test results can be submitted to our CDash server at:
cdash.hdfgroup.uiuc.edu.
Please read the HDF and CDash document at:
www.hdfgroup.org/CDash/HowToSubmit.
+ 4. See the appendix at the bottom of this file for examples of using
+ a ctest script for building and testing.
+
========================================================================
Preconditions
@@ -44,8 +44,7 @@ Notes: This short instruction is written for users who want to quickly build
2. If you plan to use Zlib or Szip;
A. Download the packages and install them
in a central location. For example on Windows, create a folder extlibs
- and install the packages there. Windows users should also read Section V
- in INSTALL_Windows.txt.
+ and install the packages there.
B. Use source packages from a SVN server by adding the following CMake
options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
@@ -81,8 +80,9 @@ Notes: This short instruction is written for users who want to quickly build
available in your Start menu. For Linux, UNIX, and Mac users the
executable is named "cmake-gui" and can be found where CMake was
installed.
- Specify the source and build directories. It is recommemded that you
- choose a build directory different then the source directory
+ Specify the source and build directories.
+ ***** It is recommemded that you choose a build directory ******
+ ***** different then the source directory ******
(for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then
use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5).
@@ -119,24 +119,46 @@ Notes: This short instruction is written for users who want to quickly build
* <HDF5OPTION>:BOOL=[ON | OFF]
<cacheinit.cmake> is:
- # This is the CMakeCache file.
- ########################
- # EXTERNAL cache entries
- ########################
- SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
- SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
- SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
- SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
- SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
- SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
- SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
- SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
- SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
- SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
- SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
- SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
- SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
- SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+ # This is the CMakeCache file.
+ ########################
+ # EXTERNAL cache entries
+ ########################
+ SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
+ SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+ SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+ SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+ SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+ SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+ SET (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+ SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+ SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+ SET (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
+ SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+ SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+ SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+ SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+ SET (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
+ SET (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
+ SET (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+ SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+ SET (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+ SET (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
+ SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+ SET (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
+ SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+ SET (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
+ SET (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
+ SET (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
+ SET (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+ SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
+ SET (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
+ SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
+ SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
+ SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
+ SET (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+ SET (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+ SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+ SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
2. Configure the cache settings
@@ -323,6 +345,365 @@ IF (HDF5_ENABLE_SZIP_SUPPORT)
************************************************************************
+ APPENDIX
+
+Below are examples of the ctest scripts used by The HDF Group.
+See the script, cmakehdf5, in the bin folder for a smaller and limited
+function shell script version of the following general scripts.
+The example is for a linux machine, but the same scripts can be used on
+a windows machine by adjusting the CTEST_CMAKE_GENERATOR option in the
+product specific script.
+
+************************************************************************
+
+CTestScript.cmake: common ctest script used to build, test and package
+========================================================================
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+########################################################
+# This dashboard is maintained by The HDF Group
+# For any comments please contact cdashhelp@hdfgroup.org
+#
+########################################################
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------
+if(NOT SITE_OS_NAME)
+ ## machine name not provided - attempt to discover with uname
+ ## -- set hostname
+ ## --------------------------
+ find_program(HOSTNAME_CMD NAMES hostname)
+ exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+ set(CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
+ find_program(UNAME NAMES uname)
+ macro(getuname name flag)
+ exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+ endmacro(getuname)
+
+ getuname(osname -s)
+ getuname(osrel -r)
+ getuname(cpu -m)
+ message("Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+
+ set(CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
+ if(USE_AUTOTOOLS)
+ set(CTEST_BUILD_NAME "AT-${CTEST_BUILD_NAME}")
+ endif(USE_AUTOTOOLS)
+ if(SITE_BUILDNAME_SUFFIX)
+ set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+ endif(SITE_BUILDNAME_SUFFIX)
+ set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
+else(NOT SITE_OS_NAME)
+ ## machine name provided
+ ## --------------------------
+ if(CMAKE_HOST_UNIX)
+ set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+ else(CMAKE_HOST_UNIX)
+ set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
+ endif(CMAKE_HOST_UNIX)
+ if(SITE_BUILDNAME_SUFFIX)
+ set(CTEST_BUILD_NAME ${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX})
+ endif()
+ set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+endif(NOT SITE_OS_NAME)
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if(APPLE)
+ # Compiler choice
+ execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ SET(ENV{CC} "${XCODE_CC}")
+ SET(ENV{CXX} "${XCODE_CXX}")
+ # Shared fortran is not supported, build static
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif(APPLE)
+
+#-----------------------------------------------------------------------------
+## cygwin does not handle the find_package() call
+## --------------------------
+if(NOT SITE_CYGWIN})
+ find_package (Subversion)
+ set(CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
+else(NOT SITE_CYGWIN})
+ set(CTEST_UPDATE_COMMAND "/usr/bin/svn")
+endif(NOT SITE_CYGWIN})
+
+#-----------------------------------------------------------------------------
+set(NEED_REPOSITORY_CHECKOUT 0)
+set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
+ ## Uncompress source if tar file provided
+ ## --------------------------
+ if(WIN32)
+ set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe")
+ message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_USE_TAR_SOURCE}.zip]")
+ execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else(WIN32)
+ message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
+ execute_process(COMMAND tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif(WIN32)
+
+ if(NOT rv EQUAL 0)
+ message("extracting... [error-(${rv}) clean up]")
+ file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message(FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+ endif(NOT rv EQUAL 0)
+
+ file(RENAME ${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+ set(LOCAL_SKIP_UPDATE "TRUE")
+else (CTEST_USE_TAR_SOURCE)
+ ## use subversion to get source
+ ## --------------------------
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+
+ if (${NEED_REPOSITORY_CHECKOUT})
+ set (CTEST_CHECKOUT_COMMAND
+ "${CTEST_UPDATE_COMMAND} co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r HEAD")
+ else (${NEED_REPOSITORY_CHECKOUT})
+ set (CTEST_CHECKOUT_COMMAND "${CTEST_UPDATE_COMMAND} update")
+ endif (${NEED_REPOSITORY_CHECKOUT})
+endif (CTEST_USE_TAR_SOURCE)
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+#include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
+ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+
+# Use multiple CPU cores to build
+include(ProcessorCount)
+ProcessorCount(N)
+if(NOT N EQUAL 0)
+ if(NOT WIN32)
+ set(CTEST_BUILD_FLAGS -j${N})
+ endif(NOT WIN32)
+ set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif()
+
+#-----------------------------------------------------------------------------
+# Send the main script as a note.
+if(USE_AUTOTOOLS)
+ ## autotools builds need to use make and does not use the cacheinit.cmake file
+ ## -- make command
+ ## -----------------
+ find_program(MAKE NAMES make)
+
+ list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ )
+else(USE_AUTOTOOLS)
+ list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+ )
+endif(USE_AUTOTOOLS)
+
+#-----------------------------------------------------------------------------
+# Check for required variables.
+# --------------------------
+foreach(req
+ CTEST_CMAKE_GENERATOR
+ CTEST_SITE
+ CTEST_BUILD_NAME
+ )
+ if(NOT DEFINED ${req})
+ message(FATAL_ERROR "The containing script must set ${req}")
+ endif(NOT DEFINED ${req})
+endforeach(req)
+
+#-----------------------------------------------------------------------------
+# Initialize the CTEST commands
+#------------------------------
+if(USE_AUTOTOOLS)
+ set(CTEST_CONFIGURE_COMMAND "${CTEST_SOURCE_DIRECTORY}/configure ${ADD_BUILD_OPTIONS}")
+ set(CTEST_BUILD_COMMAND "${MAKE} ${CTEST_BUILD_FLAGS}")
+ ## -- CTest Config
+ #configure_file($ENV{HOME}/CTestConfiguration/CTestConfig.cmake ${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
+ configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ ## -- CTest Testfile
+# configure_file(${CTEST_SCRIPT_DIRECTORY}/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
+ file(WRITE ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake "ADD_TEST(makecheck \"${MAKE}\" \"${CTEST_BUILD_FLAGS}\" \"-i\" \"check\")")
+else(USE_AUTOTOOLS)
+ if(LOCAL_MEMCHECK_TEST)
+ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+ else(LOCAL_MEMCHECK_TEST)
+ find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+ endif(LOCAL_MEMCHECK_TEST)
+endif(USE_AUTOTOOLS)
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set($ENV{LC_MESSAGES} "en_EN")
+
+# Print summary information.
+foreach(v
+ CTEST_SITE
+ CTEST_BUILD_NAME
+ CTEST_SOURCE_DIRECTORY
+ CTEST_BINARY_DIRECTORY
+ CTEST_CMAKE_GENERATOR
+ CTEST_BUILD_CONFIGURATION
+ CTEST_GIT_COMMAND
+ CTEST_CHECKOUT_COMMAND
+ CTEST_CONFIGURE_COMMAND
+ CTEST_SCRIPT_DIRECTORY
+ CTEST_USE_LAUNCHERS
+ )
+ set(vars "${vars} ${v}=[${${v}}]\n")
+endforeach(v)
+message("Dashboard script configuration:\n${vars}\n")
+
+#-----------------------------------------------------------------------------
+if(${MODEL} STREQUAL "Continuous")
+ ## Continuous mode is used for commit test processing
+ ## --------------------------
+ while (${CTEST_ELAPSED_TIME} LESS 36000)
+ set(START_TIME ${CTEST_ELAPSED_TIME})
+ CTEST_START (Continuous)
+ CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
+ set (CTEST_CHECKOUT_COMMAND) # checkout on first iteration only
+ message("Dashboard updated files: ${res}\n")
+ if(res GREATER 0)
+ CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+ CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+ CTEST_SUBMIT (PARTS Update Configure Notes)
+ CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ CTEST_SUBMIT (PARTS Build)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ CTEST_SUBMIT (PARTS Test)
+
+ execute_process (COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION}
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE cpackResult
+ OUTPUT_VARIABLE cpackLog
+ ERROR_VARIABLE cpackLog.err
+ )
+ file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ endif(${res} GREATER 0)
+
+ CTEST_SLEEP(${START_TIME} 300 ${CTEST_ELAPSED_TIME})
+ endwhile (${CTEST_ELAPSED_TIME} LESS 36000)
+#-----------------------------------------------------------------------------
+else(${MODEL} STREQUAL "Continuous")
+#-----------------------------------------------------------------------------
+ ## NORMAL process
+ ## -- LOCAL_SKIP_UPDATE skips updating the source folder from svn
+ ## -- LOCAL_NO_SUBMIT skips reporting to CDash server
+ ## -- LOCAL_SKIP_TEST skips the test process (only builds)
+ ## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
+ ## -- LOCAL_COVERAGE_TEST executes code coverage process
+ ## --------------------------
+ CTEST_START (${MODEL} TRACK ${MODEL})
+ if(NOT LOCAL_SKIP_UPDATE)
+ CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+ endif(NOT LOCAL_SKIP_UPDATE)
+ CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+ CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Update Configure Notes)
+ endif(NOT LOCAL_NO_SUBMIT)
+ CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Build)
+ endif(NOT LOCAL_NO_SUBMIT)
+ if(NOT LOCAL_SKIP_TEST)
+ if(NOT LOCAL_MEMCHECK_TEST)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Test)
+ endif(NOT LOCAL_NO_SUBMIT)
+ else(NOT LOCAL_MEMCHECK_TEST)
+ CTEST_MEMCHECK (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS MemCheck)
+ endif(NOT LOCAL_NO_SUBMIT)
+ endif(NOT LOCAL_MEMCHECK_TEST)
+ if(LOCAL_COVERAGE_TEST)
+ CTEST_COVERAGE (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Coverage)
+ endif(NOT LOCAL_NO_SUBMIT)
+ endif(LOCAL_COVERAGE_TEST)
+ endif(NOT LOCAL_SKIP_TEST)
+ if(NOT LOCAL_MEMCHECK_TEST)
+ ##-----------------------------------------------
+ ## Package the product
+ ##-----------------------------------------------
+ execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE cpackResult
+ OUTPUT_VARIABLE cpackLog
+ ERROR_VARIABLE cpackLog.err
+ )
+ file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ endif(NOT LOCAL_MEMCHECK_TEST)
+endif(${MODEL} STREQUAL "Continuous")
+#-----------------------------------------------------------------------------
+
+message("DONE:CTestScript")
+************************************************************************
+
+************************************************************************
+Product specific script, HDF518Static.cmake, that uses the
+CTestScript.cmake file (see above). Usage:
+"ctest -S HDF518Static.cmake,hdf518 -C Release -O hdf518static.log"
+where hdf518 is the source folder relative to the location of these scripts
+========================================================================
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+
+# CTEST_SCRIPT_ARG is the source folder passed on the command line
+set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
+set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/buildstatic)
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+set(CTEST_BUILD_CONFIGURATION "Release")
+set(MODEL "Experimental")
+
+# build generator name, see cmake generator list
+set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+
+# machine description, can be removed on linux
+set(CTEST_SITE "machine.domain")
+set(SITE_OS_NAME "os name")
+set(SITE_OS_VERSION "os version")
+set(SITE_OS_BITS "os size")
+set(SITE_COMPILER_NAME "compiler name")
+set(SITE_COMPILER_VERSION "compiler version")
+
+# extra CDash build name description
+set(SITE_BUILDNAME_SUFFIX "STATIC")
+
+# needed for source updates, change as required
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
+
+# options to add/change from the cacheinit.cmake in the config/cmake folder
+set(ADD_BUILD_OPTIONS "-DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8_static")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_ANSI_CFLAGS:STRING=-fPIC -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\"")
+
+# include common script file
+include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+
+message("DONE")
+
+************************************************************************
Need further assistance, send email to help@hdfgroup.org
diff --git a/release_docs/INSTALL_Windows.txt b/release_docs/INSTALL_Windows.txt
index 967675f..4344ea4 100644
--- a/release_docs/INSTALL_Windows.txt
+++ b/release_docs/INSTALL_Windows.txt
@@ -9,8 +9,5 @@ We now recommend that users build, test and install HDF5 using CMake.
Instructions for building and testing HDF5 using CMake can be found in
the CMake.txt file found in this folder.
-The old solutions and projects found in the windows\ folder will be
-maintained for legacy users until HDF5 1.10.
-
The old INSTALL_Windows documentation can be found in the
obsolete_windows_docs\ folder located with this document.
diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel
index b2e1eec..eacaf68 100644
--- a/release_docs/INSTALL_parallel
+++ b/release_docs/INSTALL_parallel
@@ -17,12 +17,14 @@ of running the parallel test suites.
1.1. Requirements
-----------------
-PHDF5 requires an MPI compiler with MPI-IO support and a parallel file system.
-If you don't know yet, you should first consult with your system support staff
-of information how to compile an MPI program, how to run an MPI application,
-and how to access the parallel file system. There are sample MPI-IO C and
-Fortran programs in the appendix section of "Sample programs". You can use
-them to run simple tests of your MPI compilers and the parallel file system.
+PHDF5 requires an MPI compiler with MPI-IO support and a POSIX compliant
+(Ref. 1) parallel file system. If you don't know yet, you should first consult
+with your system support staff of information how to compile an MPI program,
+how to run an MPI application, and how to access the parallel file system.
+There are sample MPI-IO C and Fortran programs in the appendix section of
+"Sample programs". You can use them to run simple tests of your MPI compilers
+and the parallel file system. Also, the t_posix_compliant test in testpar
+verifies if the file system is POSIX compliant.
1.2. Further Help
@@ -274,6 +276,20 @@ if the tests should use directory /PFS/user/me, do
shell initial files like .profile, .cshrc, etc.)
+Reference
+---------
+1. POSIX Compliant. A good explanation is by Donald Lewin,
+ After a write() to a regular file has successfully returned, any
+ successful read() from each byte position on the file that was modified
+ by that write() will return the date that was written by the write(). A
+ subsequent write() to the same byte will overwrite the file data. If a
+ read() of a file data can be proven by any means [e.g., MPI_Barrier()]
+ to occur after a write() of that data, it must reflect that write(),
+ even if the calls are made by a different process.
+ Lewin, D. (1994). "POSIX Programmer's Guide (pg. 513-4)". O'Reilly
+ & Associates.
+
+
Appendix A. Sample programs
---------------------------
Here are sample MPI-IO C and Fortran programs. You may use them to run simple
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index fa0e6ec..1f4016c 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.144 currently under development
+HDF5 version 1.9.148 currently under development
================================================================================
@@ -751,9 +751,12 @@ Bug Fixes since HDF5-1.8.0 release
Tools
-----
+ - h5diff: Fixed to return correct exit code 1 when detect unique extra
+ attribute. Prior to this fix, h5diff returned exit code 0 indicating
+ two files are identical. HDFFV-7643 (JKM 2013/02/15)
- h5diff: Improved speed when comparing HDF5 files with lots of
- attributes. Much slower performance was identified with release version
- from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19)
+ attributes. Much slower performance was identified with release
+ version from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19)
- h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if
source file contains chunked dataset and a chunk dim is bigger than
the dataset dim. Another issue is that the command changed max dims
@@ -1068,6 +1071,19 @@ Bug Fixes since HDF5-1.8.0 release
in "New Features" section.
(BMR - 2008/08/10)
+ Testing
+ -------
+ - In some Mac system, testlibinfo.sh failed with this error:
+ Check file ../src/.libs/libhdf5.7.dylib
+ strings: object: ../src/.libs/libhdf5.7.dylib malformed object \
+ (unknown load command 15)
+ The strings command of Mac inspects library files and older
+ versions of strings may not know newer library format, resulting
+ in errors. Fixed by sending the library file as stdin to the strings
+ coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305)
+
+ - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation
+ faulted when used before. (AKC - 2013/02/12 HDFFV-8267)
Supported Platforms
diff --git a/release_docs/USING_CMake.txt b/release_docs/USING_CMake.txt
index 4397750..0e980ea 100644
--- a/release_docs/USING_CMake.txt
+++ b/release_docs/USING_CMake.txt
@@ -4,14 +4,14 @@
Notes: This short instruction is written for users who want to quickly build
HDF5 Applications from the HDF5 Examples package using the CMake tools.
- Users can adapt these instructions for their own applicaltions, see the
+ Users can adapt these instructions for their own applications, see the
"Minimum Project Files" section.
More information about using CMake can be found at the KitWare site,
www.cmake.org.
CMake uses the command line, however the visual CMake tool is
- available for the configuration step. The steps are similiar for
+ available for the configuration step. The steps are similar for
all the operating systems supported by CMake.
NOTES:
@@ -31,6 +31,10 @@ Notes: This short instruction is written for users who want to quickly build
Please read the HDF and CDash document at:
www.hdfgroup.org/CDash/HowToSubmit.
+ 4. See the appendix at the bottom of this file for an example of using
+ a ctest script for building and testing. See CMake.txt for more
+ information.
+
========================================================================
Preconditions
@@ -62,7 +66,7 @@ Notes: This short instruction is written for users who want to quickly build
available in your Start menu. For Linux, UNIX, and Mac users the
executable is named "cmake-gui" and can be found where CMake was
installed.
- Specify the source and build directories. It is recommemded that you
+ Specify the source and build directories. It is recommended that you
choose a build directory different then the source directory
(for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then
use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5).
@@ -156,7 +160,7 @@ Notes: This short instruction is written for users who want to quickly build
========================================================================
- Using HDF5 Libraries with Visual Studio 2008
+ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008
========================================================================
8. Set up path for external libraries and headers
@@ -168,11 +172,11 @@ Notes: This short instruction is written for users who want to quickly build
and select "x64".
8.2 Find the box "Show directories for", choose "Include files", add the
- header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\include)
+ header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.x\include)
to the included directories.
8.3 Find the box "Show directories for", choose "Library files", add the
- library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\lib)
+ library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.x\lib)
to the library directories.
8.4 If using Fortran libraries, you will also need to setup the path
@@ -180,10 +184,28 @@ Notes: This short instruction is written for users who want to quickly build
========================================================================
+ Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010
+========================================================================
+
+ 9. Set up path for external libraries and headers
+
+ The path settings will need to be in project property sheets per project.
+ Go to "Project" and select "Properties", find "Configuration Properties",
+ and then "VC++ Directories".
+
+ 9.1 If you are building on 64-bit Windows, find the "Platform" dropdown
+ and select "x64".
+
+ 9.2 Add the header path to the "Include Directories" setting.
+
+ 9.3 Add the library path to the "Library Directories" setting.
+
+
+========================================================================
Minimum C Project Files for CMake
========================================================================
- 9. Create a CMakeLists.txt file at the source root.
+ 10. Create a CMakeLists.txt file at the source root.
..........................................................................
cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5MyApp C CXX)
@@ -196,7 +218,55 @@ ADD_EXECUTABLE (hdf_example ${PROJECT_SOURCE_DIR}/hdf_example.c)
TARGET_LINK_LIBRARIES (hdf_example ${LINK_LIBS})
..........................................................................
+
+************************************************************************
+ APPENDIX
+
+Below ia an example of the ctest script used by The HDF Group. See the
+Appendix in the CMake.txt file for the CTestScript.cmake file used by this
+script.
+
************************************************************************
+Product specific script, HDF518Example.cmake, that uses the
+CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
+"ctest -S HDF518Example.cmake,hdf518Examples -C Release -O hdf518EX.log"
+where hdf518Examples is the source folder relative to the location of these scripts
+========================================================================
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+
+set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
+set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+set(CTEST_BUILD_CONFIGURATION "Release")
+set(MODEL "Experimental")
+
+# build generator name, see cmake generator list
+set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+
+# machine description, can be removed on linux
+set(CTEST_SITE "machine.domain")
+set(SITE_OS_NAME "os name")
+set(SITE_OS_VERSION "os version")
+set(SITE_OS_BITS "os size")
+set(SITE_COMPILER_NAME "compiler name")
+set(SITE_COMPILER_VERSION "compiler version")
+
+
+# needed for source updates, change as required
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5-examples/trunk/1_8")
+
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5Examples-1.8")
+
+# location of the installed hdf5 (cmake configuration folder)
+set(ENV{HDF5_DIR} "/usr/share/cmake/hdf5")
+
+include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+
+message("DONE")
+
Need further assistance, send email to help@hdfgroup.org
diff --git a/release_docs/USING_Windows.txt b/release_docs/USING_Windows.txt
index 9afbeb1..97ac4ad 100644
--- a/release_docs/USING_Windows.txt
+++ b/release_docs/USING_Windows.txt
@@ -4,626 +4,10 @@
* (Full Version) *
***********************************************************************
-The following instructions assume that the HDF5 binary code package from
-HDF website (http://hdfgroup.org) is used.
+We now recommend that users build, test and install HDF5 using CMake.
-Warnings:
-Please read CAREFULLY about the following preconditions and notes first.
-
-Contents:
-
- Section : Preconditions and Notes
- Section I : What do we provide?
- Section II : How to build examples (optional)
- Section III : How to build an application using the HDF5 library or DLL
- Section IV : How to build HDF5 for 64-bit Windows
- Section V : How to build HDF5 applications using Visual Studio 2010
- Section VI : Misc.
-
-
-========================================================================
- Preconditions and Notes
-========================================================================
-
-Preconditions:
-
- 1. Installed Microsoft Visual Studio. This document is written for Visual
- Studio 2008. Express Editions may work with the project files
- but not from the command line. We do not support the Express Editions.
-
- 2. (Optional) Installed Intel Compiler 10.1 or 11.1 if you want to use HDF5
- Fortran libraries.
-
- 3. Install Winzip or 7-zip for extracting source tarball.
-
- Note: 1. 7zip is an open-source alternative to WinZip. Some of the
- advanced functionality is disabled in WinZip unless you buy the
- software. With 7zip, most of this functionality is included for
- free.
-
- 5. Set up a directory structure to unpack the library. For example:
-
- c:\ (any drive)
- MyHDFstuff\ (any folder name)
-
- 6. Download the hdf5-1.8.x binary code package and use 7zip or WinZip to
- extract the HDF5 package into c:\MyHDFstuff. This creates a directory
- called 'hdf5-1.8.x' under MyHDFstuff which contains several files and
- directories. Rename "hdf5-1.8.x" to "hdf5".
-
- 7. HDF5 provide options to do in-memory compression within HDF5 library.
- Currently, two external compression libraries Zlib and Szip can be used
- with HDF5.
-
- 7.1 HDF5 uses Zlib version 1.2.5 for compression and Zlib is
- distributed with HDF5 library in 1.8.x release.
-
- 7.2 HDF5 uses Szip version 2.1 for compression and Szip compression
- software is provided with HDF5 products in 1.8.x release.
-
- Please note that Szip is not a totally open-source free software.
- For licensing issue of Szip, please check "Licensing terms" at
- http://hdfgroup.org/doc_resource/SZIP/index.html.
-
- Szip compression feature inside HDF5 is enabled by default.
-
- 8. Define the following environment variables:
-
- HDF5_EXT_ZLIB
- HDF5_EXT_SZIP
-
- In this section, Zlib and Szip compression packages are assumed to be
- used. Please read Section V as well as this section if you do not want
- to use compression feature inside HDF5.
-
- To define these environment variables:
-
- Click "Start", click "Control Panel", and then double-click "System".
- On the "Advanced" tab, click "Environment Variables".
-
- If you are logged on as administrator to the local computer AND want to
- let all other users use these two environment variables, click "New"
- under "System Variables" box; otherwise, click "New" under "User
- Variables" box.
-
- In the New Variable window, set "Variable name" as HDF5_EXT_ZLIB and
- "Variable value" as zlib.lib, then click OK.
-
- Similarly, you can set:
-
- HDF5_EXT_SZIP environment variable as szip.lib
-
- Notes:
-
- a. You will have to close and reopen running programs for the new
- environment variable settings to take effect.
-
- b. c:\zlib\zlib.dll and c:\szip\dll\szip.dll should be copied
- into a location that the application can find.
-
- 9. Set up path for libraries and headers
-
- Invoke Microsoft Visual Studio and go to "Tools" and select "Options",
- find "Projects", and then "VC++ Directories".
-
- 9.1 If you are building on 64-bit Windows, find the "Platform" dropdown
- and select "x64".
-
- 9.2 Find the box "Show directories for", choose "Include files", if you
- can not find your HDF5 header path (for example,
- c:\MyHDFstuff\include) from the directory list, add the
- header path (c:\MyHDFstuff\include) to the included
- directories.
-
- 9.3 Find the box "Show directories for", choose "Library files". If you
- cannot find your HDF5 library path (for example,
- c:\MyHDFstuff\dll for dynamic-shared and c:\MyHDFstuff\lib for static)
- from the directory list, add the library
- path (c:\MyHDFstuff\dll or c:\MyHDFstuff\lib) to the library directories.
-
- 9.4 If building Fortran applications, you will also need to setup the path
- for the Intel Fortran compiler. Please see Section VI.
-
- NOTE:
- If you are using VS2010, the path settings will need to be in project
- property sheets per project. Go to "Project" and select "Properties", find
- "Configuration Properties", and then "VC++ Directories".
-
- 9.1 If you are building on 64-bit Windows, find the "Platform" dropdown
- and select "x64".
- 9.2 Add the header path to the "Include Directories" setting.
- 9.3 Add the library path to the "Library Directories" setting.
-
-Notes:
-
- 1. HDF4-related tools are not built and released with HDF5 library packages
- any more. To obtain HDF4 related tools, please check
- http://hdfgroup.org/h4toh5/ and ftp://ftp.hdfgroup.org/HDF5/h4toh5
-
- 2. For Fortran users, Intel Fortran Compiler 10.1 is currently supported
- -- please see Section VI. Intel Compiler 11.1 can be used but the project files
- must be upgraded within the Visual Studio IDE.
-
- 3. The szip and zlib dlls must be in the PATH for using the tools (including static).
-
-
-========================================================================
- Section I: What do we provide?
-========================================================================
-
- 1. Provide
-
- HDF5 static library:
- release version
-
- HDF5 Dynamic Link Library(DLL):
- release version as well as export libraries for DLL
-
- HDF5 High-Level Library (Optional):
- HDF5 C++ Library
- HDF5 HL-Fortran Library
-
- HDF5 tools:
- HDF5 tools
-
- HDF5 tool library:
- release version
-
- HDF5 tool export library for DLL:
- release version
-
- 2. Examples (Included in the binary distribution as a zip file)
-
- Unpack the examples, hdf5-examples.zip, into your "hdf5" folder
- (c:\MyHDFstuff\hdf5).
- The resulting structure under this folder should be:
- c++
- c++/examples
- examples
- fortran
- fortran/examples
- hl
- hl/c++
- hl/c++/examples
- hl/examples
- hl/fortran
- hl/fortran/examples
- windows
- windows/c++
- windows/c++/examples
- windows/examples
- windows/fortran
- windows/fortran/examples
- windows/hl
- windows/hl/examples
- windows/hl/fortran
- windows/hl/fortran/examples
- hdf5build_examples.bat
- InstallExamples.bat
-
- HDF5 examples:
- Simple HDF5 C/C++/Fortran and High level C/Fortran examples
-
-========================================================================
- Section II: How To Build Examples (Optional)
-========================================================================
-
-Simple examples have been provided for users to test HDF5 C/C++/Fortran and
-High level C/Fortran library and tools.
-
-Note:
- 1) To build HDF5 C++ examples, HDF5 C++ library must have been installed in
- Step I.
-
- 2) To build HDF5 Fortran or HL Fortran examples, please see Section VI,
- Step 3.
-
- 3) To build HDF5 High Level C examples, HDF5 High level library must have
- been installed in step I.
-
- 4) By default, the HDF5 binary distribution only includes the release
- versions of HDF5 C/C++ libraries and DLLs.
-
-To build and test HDF5 C examples:
-----------------------------------
- 1. Invoke Microsoft Visual Studio, go to "File" and select the "Open
- Solution" option.
-
- Then open the solution
- c:\MyHDFstuff\hdf5examples\windows\examples\allexamples\allexamples.sln.
-
- 2. Select "Build", and "Configuration Manager".
-
- To build release versions of C examples.
-
- In "Active Solution Configuration", select "Release". Select "Close".
- Select "Build" -> "Build Solution" or "Rebuild Solution" to build
- release version of project "allexamples".
-
- When the release build is done, there should be the following
- subdirectories in c:\MyHDFstuff\hdf5examples\examples\
-
- attributetest
- attributetestdll
- chunkread
- chunkreaddll
- compoundtest
- compoundtestdll
- extendwritetest
- extendwritetestdll
- grouptest
- grouptestdll
- readtest
- readtestdll
- selectest
- selectestdll
- writetest
- writetestdll
-
- 3. Invoke a command prompt window and run the batch file InstallExamples.bat
- which resides in the top level directory (c:\MyHDFstuff\hdf5examples). This file
- creates new directories, examplesREL, examplesRELDLL in the
- c:\MyHDFstuff\hdf5examples\examples directory and places
- all the executables in it.
-
- 4. We provide a batch file named testExamples.bat and an expected examples
- tests output file named testExamples_exp_output.txt in
- c:\MyHDFstuff\hdf5\examples directory for you to test HDF5 C examples.
-
- testExamples.bat batch file has options:
-
- testExamples release -- for release version
-
- testExamples release dll -- for release DLL version
-
- Invoke a command prompt and run testExamples.bat with appropriate options.
- You should get "All HDF5 C examples tests passed." when the C examples are
- built successfully. Otherwise, the difference between the expected
- outputs and actual outputs will be given.
-
-To build and test HDF5 C++ examples:
-------------------------------------
-
- 1. Invoke Microsoft Visual Studio, go to "File" and select the "Open
- Solution" option.
-
- Then open the solution
- c:\MyHDFstuff\hdf5examples\windows\examples\allexamples\allcppexamples.sln.
-
- 2. Select "Build", and "Configuration Manager".
-
- To build release versions of C examples.
-
- In "Active Solution Configuration", select "Release". Select "Close".
- Select "Build" -> "Build Solution" or "Rebuild Solution" to build
- release version of project "allcppexamples".
-
- When the release build is done, there should be the following
- subdirectories in c:\MyHDFstuff\hdf5examples\c++\examples\
-
- chunks
- chunksdll
- compound
- compounddll
- create
- createdll
- extend_ds
- extend_dsll
- h5group
- h5groupdll
- readdata
- readdatadll
- writedata
- writedatadll
-
- 3. Invoke a command prompt window and run the batch file
- InstallcppExamples.bat which resides in the top level directory
- (c:\MyHDFstuff\hdf5examples). This file creates new directories,
- cppexamplesREL, cppexamplesRELDLL in the
- c:\MyHDFstuff\hdf5examples\c++\examples directory and places all
- the executables in it.
-
- 4. We provide a batch file named testcppExamples.bat in
- c:\MyHDFstuff\hdf5examples\c++\examples directory for you to test HDF5 C++
- examples.
-
- testcppExamples.bat batch file has options:
-
- testcppExamples release -- for release version
-
- testcppExamples release dll -- for release DLL version
-
- Invoke a command prompt and run testcppExamples.bat with appropriate
- options. You should get "All HDF5 C++ examples tests passed." when the
- C++ examples are built successfully. Otherwise, the difference between
- the expected outputs and actual outputs will be given.
-
-
-To build and test HDF5 High Level C examples:
----------------------------------------------
-
- 1. Invoke Microsoft Visual Studio, go to "File" and select the "Open
- Solution" option.
-
- Then open the solution
- c:\MyHDFstuff\hdf5examples\windows\hl\examples\allhlcexamples\allhlcexamples.sln
-
- 2. Select "Build", and "Configuration Manager".
-
- To build release versions of C examples.
-
- In "Active Solution Configuration", select "Release". Select "Close".
- Select "Build" -> "Build Solution" or "Rebuild Solution" to build
- release version of project "allhlcexamples".
-
- When the release build is done, binaries will be built in the
- following subdirectories of c:\MyHDFstuff\hdf5\examples\
-
- ex_image[1-2](dll)
- ex_lite1(dll)
- ex_table[01-12](dll)
- ex_ds1(dll)
- ptExample[FL+VL](dll)
-
- 3. Invoke a command prompt and run the batch file Install_hlcexamples.bat
- which resides in the top level directory (c:\MyHDFstuff\hdf5examples). This file
- creates new directories, HLCexamplesRELEASE, HLCexamplesRELEASEDLL in the
- c:\MyHDFstuff\hdf5examples\hl\examples directory and places all the executables in
- it.
-
- 4. We provide a batch file named test_hl_cexamples.bat in
- c:\MyHDFstuff\hdf5examples\hl\examples directory for you to test HDF5 high level C
- examples.
-
- test_hl_cexamples.bat batch file has options:
-
- Options purpose
-
- test_hl_cexamples release -- for release version
-
- test_hl_cexamples release dll -- for release DLL version
-
- Invoke a command prompt window and run test_hl_cexamples with
- appropriate options.
-
- Invoke a command prompt and run testExamples.bat with appropriate options.
- You should get "All of the HL C Examples Passed!" when the HL C examples
- are built successfully. Otherwise, the difference between the expected
- outputs and actual outputs will be given.
-
-
-========================================================================
- Section III: Building an application using the HDF5 library or DLL
-========================================================================
-
-Waring: The instructions below will only describe how to build an application
- using the release version of the HDF5 library or DLL. To use the debug
- version of the HDF5 library or DLL, you need to substitute the release
- version of the HDF5 library or DLL with the debug version.
-
-
-To build an application that uses the HDF5 static library the following
-locations will need to be specified for locating header files and linking with
-the HDF static library, for example:
-
-c:\MyHDFstuff\hdf5\hdf5lib\release\include
-c:\MyHDFstuff\hdf5\hdf5lib\release\lib
-
-We assume that you will use Zlib and Szip compression with HDF5 library.
-
-1. Specifying Include Directories
-
-To specify the include directories in the settings for your Visual Studio
-project, you may choose one of the following two methods.
-
- Method One: Project-wide Settings
-
- 1. Open your project in Microsoft Visual Studio and make sure it is the
- active project.
-
- 2. Go to the Project menu and chose the "Properties" option.
-
- 3. Choose the build configuration you would like to modify in the drop
- down menu labeled "Configuration:"
-
- 4. Choose the "C/C++" tab, and select "General".
-
- 5. In a text-area labeled with "Additional Include Directories:", add
- HDF5, Zlib, and Szip header files directories. For example:
-
- c:\MyHDFstuff\hdf5\hdf5lib\release\include
- c:\zlib\include
- c:\szip\include
-
- Then click OK.
-
- 6. (Optional) To use HDF5 Fortran static library, the location of
- Fortran module files should be specified by following Project->
- Settings->Fortran->Preprocessor, and in the text-area labeled
- "Additional Include Directories", add HDF5 Fortran module files
- directories. For example:
-
- c:\MyHDFstuff\hdf5\hdf5lib\release\include
-
- Method Two: Visual Studio Settings
-
- 1. In Visual STudio, go to Tools->Options->Projects->
- VC++ Directories. Under "Show Directories For", select "Include files"
-
- 2. Insert the correct HDF5, Zlib, Szip paths for headers(include). For
- example,
-
- c:\MyHDFstuff\hdf5\hdf5lib\release\include
- c:\zlib\include
- c:\szip\include
-
-
-2. Specifying Library Directories
-
-To specify the library directories in the settings for your Visual Studio
-project, you may choose one of the following two methods.
-
- Method One: Project-wide Settings
-
- 1. Open your project in Microsoft Visual Studio and make sure it is the
- active project.
-
- 2. Go to the Project menu and chose the "Properties" option.
-
- 3. Choose the build configuration you would like to modify in the drop
- down menu labeled "Configuration:"
-
- 4. Choose the "Linker" tab, and select "General".
-
- 5. In a text-area labeled with "Additional Library Directories:", add
- HDF5, Zlib, and Szip library files directories. For example:
-
- c:\MyHDFstuff\hdf5\hdf5lib\release\lib
- c:\zlib\dll
- c:\szip\dll
-
- Note: To link with HDF5 DLLs rathern that static libraries, simply
- specify the "dll" directory rather than "lib", and link with the
- corresponding DLL link library below.
-
- Then click OK.
-
-
- Method Two: Visual Studio Settings
-
- 1. In Visual STudio, go to Tools->Options->Projects->
- VC++ Directories. Under "Show Directories For", select "Library files"
-
- 2. Insert the correct HDF5, Zlib, Szip paths for link libraries. For
- example,
-
- c:\MyHDFstuff\hdf5\hdf5lib\release\lib
- c:\zlib\dll
- c:\szip\dll
-
- Note: To link with HDF5 DLLs rathern that static libraries, simply
- specify the "dll" directory rather than "lib", and link with the
- corresponding DLL link library below.
-
-
-3. Specifying Libraries to Link
-
- To link the HDF5 static library with your application:
-
- 1. In Visual Studio, go to the Project menu and choose "Properties".
-
- 2. Find the "Link" option and "Input" category. In the "Additional
- Dependencies" field, insert "zlib.lib, libszip.lib, hdf5.lib".
-
- 3. (Optional) Also insert "hdf5_cpp.lib" if you want to use HDF5 C++
- static library.
-
- 4. (Optional) Also insert "hdf5_fortran.lib" if you want to use HDF5
- Fortran static library.
-
- 5. (Optional) Also insert "hdf5_hl.lib" if you want to use HDF5 high
- level static library.
-
- 6. (Optional) Also insert "hdf5_hl_cpp.lib" if you want to use HDF5 High
- Level C++ static library.
-
- 7. (Optional) Also insert "hdf5_hl_fortran.lib" if you want to use HDF5
- High Level Fortran static library.
-
-
- To link the HDF5 DLL library with your application:
-
- 1. Follow the steps for linking the HDF5 static library as shown above,
- except now link the export library that is created with the DLL.
-
- The export library is called hdf5dll.lib for HDF5 C libray,
- hdf5_cppdll.lib for HDF5 C++ library, and hdf5_fortrandll.lib
- for HDF5 Fortran library.
-
- 2. In the Project Properties dialog, go to the C/C++ > Preprocessor
- subsection. In the "Preprocessor Definitions" box, add "_HDF5USEDLL_"
- to the list.
-
- 3. (Optional) Also add HDF5CPP_USEDLL to use HDF5 C++ DLL.
-
- 4. (Optional) Also add _HDF5USEHLDLL_ to use HDF5 high level DLL.
-
- 5. (Optional) Also add HDF5USE_HLCPPDLL use HDF5 high level C++ DLL.
-
- 6. (Optional) Follow Project->Settings->Fortran->Category->General->
- Predefined Preprocess or Symbols, and add "HDF5F90_WINDOWS" to use HDF5
- Fortran DLL.
-
- 7. Place the DLLs in a location that Windows will be able to locate. The
- searched path and order for DLL's is
-
- a) The directory where the executable module for the current
- process is located.
- b) The current directory.
- c} The Windows system directory. The GetSystemDirectory function
- retrieves the path of this directory.
- d) The Windows directory. The GetWindowsDirectory function
- retrieves the path of this directory.
- e) The directories listed in the PATH environment variable.
-
-
-========================================================================
- Section IV: How to build HDF5 for 64-bit Windows
-========================================================================
-
-HDF5 is available for 64-bit Windows in Visual Studio 2008.
-
-Prerequisites:
-
- 1. A 64-bit Windows machine.
-
- 2. Microsoft Visual Studio 2008 installed with x64 Extensions.
-
-
-Building:
-
- Building 64-bit Windows binaries is very similar to the process for 32-bit.
- Therefore, you may follow the instructions in Section II with the following
- modifications.
-
- 1. The x64 platform must be selected in the build configuration for
- debug and release versions. Before building, go to "Build",
- "Configuration Manager". In the "Active solution platform" box,
- select "x64", and press "Close".
-
- 2. 64-bit HDF5 applications must be built with 64-bit external libraries.
- You must add the include and
- library paths for x64 configurations as you have in the
- "Prerequisites" section. This is also true for Intel Fortran if
- Fortran libraries are to be built.
-
-========================================================================
- Section V: How to build HDF5 applications using Visual Studio 2010
-========================================================================
-Building with Visual Studio 2010 is very similar to building with Visual Studio
-2008, with some minor changes. Therefore, follow the build instructions above,
-with the following considerations:
-
- 1. Visual Studio 2010 uses a new format for project files, but Visual Studio
- 2008 project files can be converted. The HDF5 project files
- will need to be converted on first use. To do so:
-
- 1.1. Open the HDF5 Visual Studio 2008 solution file as in Section II
- (all.sln)
-
- NOTE. Intel Fortran 11.1 currently does not integrate with Visual Studio 2010.
-
- 1.2. You will be prompted with an automatic conversion wizard. Click
- through, accepting the default values. You may choose to create
- backups of the project files, although it isn't necessary.
-
- 1.3. When it is finished, it should state that all projects were
- converted successfully with no errors. Warnings can be ignored.
-
- 2. Once the project files have been converted you will need to create project
- property sheets for the library and include paths. Then build and test normally.
- Note that the converted project files aren't backwards compatible with
- previous versions of Visual Studio.
+Instructions for building and testing HDF5 applications using CMake can be found in
+the USING_CMake.txt file found in this folder.
========================================================================
@@ -635,26 +19,7 @@ with the following considerations:
Here are some helpful notes if you are not familiar with
using the Visual C++ Development Environment.
- 1.1 Project name and location issues:
-
- It is recommended that you use the given directory structure for building
- HDF5 Examples. However, it is possible to create your own structure. If you must
- install all.sln and all.vcproj in another directory, relative to hdf5
- directory, you will be asked to locate the sub-project files, when you open
- the project all.sln.
-
- If you want to rename "all" (the entire project), you will need to modify
- two files all.sln and all.vcproj as text (contrary to the explicit warnings
- in the files).
-
-
- 1.2 Settings... details:
-
- If you create your own project, the necessary settings can be read
- from the all.vcproj file (as text), or from the Project Settings in the
- Visual Studio project settings dialog.
-
- 1.3 FAQ
+ 1.1 FAQ
Many other common questions and hints are located online and being updated
in the HDF5 FAQ. For Windows-specific questions, please see:
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 4e484c2..8f4f7f0 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -415,23 +415,36 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
/* Get the file descriptor (needed for truncate and some Windows information) */
file->fd = fileno(file->fp);
- if(file->fd < 0)
+ if(file->fd < 0) {
+ free(file);
+ fclose(f);
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get file descriptor", NULL);
+ } /* end if */
#ifdef H5_HAVE_WIN32_API
file->hFile = (HANDLE)_get_osfhandle(file->fd);
- if(INVALID_HANDLE_VALUE == file->hFile)
+ if(INVALID_HANDLE_VALUE == file->hFile) {
+ free(file);
+ fclose(f);
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get Windows file handle", NULL);
+ } /* end if */
- if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get Windows file desinformationcriptor", NULL);
+ if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo)) {
+ free(file);
+ fclose(f);
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get Windows file descriptor information", NULL);
+ } /* end if */
file->nFileIndexHigh = fileinfo.nFileIndexHigh;
file->nFileIndexLow = fileinfo.nFileIndexLow;
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
#else /* H5_HAVE_WIN32_API */
- fstat(file->fd, &sb);
+ if(fstat(file->fd, &sb) < 0) {
+ free(file);
+ fclose(f);
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL)
+ } /* end if */
file->device = sb.st_dev;
#ifdef H5_VMS
file->inode[0] = sb.st_ino[0];
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 76c7b96..5d68fd1 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -187,7 +187,7 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
void
H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -381,7 +381,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
size_t start, end; /* Start & end of the overlapping area */
size_t len; /* Length of the overlapping area */
size_t overlap; /* Track any overlaps */
- unsigned u; /* Local index variable */
+ size_t u; /* Local index variable */
/* Calculate the starting & ending */
if(sect_start < dblock_start)
@@ -396,7 +396,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Calculate the length */
len = end - start;
- sprintf(temp_str, "Section #%u:", (unsigned)udata->sect_count);
+ HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
temp_str,
start, len);
@@ -530,7 +530,7 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth,
"Percent of available space for data used:",
- (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) / (double)(dblock->size - blk_prefix_size)));
+ ((double)100.0f * (double)((dblock->size - blk_prefix_size) - amount_free) / (double)(dblock->size - blk_prefix_size)));
/*
* Print the data in a VMS-style octal dump.
@@ -569,7 +569,7 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
char temp_str[64]; /* Temporary string, for formatting */
size_t u, v; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -614,13 +614,13 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
else
HDfprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
for(u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) {
- sprintf(temp_str, "Row #%u: (block size: %lu)", (unsigned)u, (unsigned long)hdr->man_dtable.row_block_size[u]);
+ HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u, (unsigned long)hdr->man_dtable.row_block_size[u]);
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str);
for(v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
- sprintf(temp_str, "Col #%u:", (unsigned)v);
+ HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
if(hdr->filter_len > 0)
HDfprintf(stream, "%*s%-*s %9a/%6Zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
temp_str,
@@ -642,13 +642,13 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
H5V_log2_of2(hdr->man_dtable.cparam.width);
for(u = hdr->man_dtable.max_direct_rows; u < iblock->nrows; u++) {
num_indirect_rows = (H5V_log2_gen(hdr->man_dtable.row_block_size[u]) - first_row_bits) + 1;
- sprintf(temp_str, "Row #%u: (# of rows: %u)", (unsigned)u, num_indirect_rows);
+ HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u, num_indirect_rows);
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str);
for(v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
- sprintf(temp_str, "Col #%u:", (unsigned)v);
+ HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6),
temp_str,
iblock->ents[off].addr);
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index 62e7a5e..a1245ba 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -102,7 +102,7 @@ H5L_getenv_prefix_name(char **env_prefix/*in,out*/)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- strret = HDstrchr(*env_prefix, COLON_SEPC);
+ strret = HDstrchr(*env_prefix, H5_COLON_SEPC);
if (strret == NULL) {
retptr = *env_prefix;
*env_prefix = strret;
@@ -144,14 +144,9 @@ H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/)
if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer")
- /* Copy the prefix into the buffer */
- HDstrcpy(*full_name, prefix);
-
- if (!CHECK_DELIMITER(prefix[prefix_len-1]))
- HDstrcat(*full_name, DIR_SEPS);
-
- /* Add the external link's filename to the prefix supplied */
- HDstrcat(*full_name, file_name);
+ /* Compose the full file name */
+ HDsnprintf(*full_name, (prefix_len + fname_len + 2), "%s%s%s", prefix,
+ (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -319,24 +314,32 @@ H5L_extern_traverse(const char UNUSED *link_name, hid_t cur_group,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* target file_name is an absolute pathname: see RM for detailed description */
- if(CHECK_ABSOLUTE(file_name) || CHECK_ABS_PATH(file_name)) {
+ if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
/* Try opening file */
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
- char *ptr = NULL;
+ char *ptr;
H5E_clear_stack(NULL);
/* get last component of file_name */
- GET_LAST_DELIMITER(file_name, ptr)
+ H5_GET_LAST_DELIMITER(file_name, ptr)
HDassert(ptr);
- HDstrcpy(temp_file_name, ++ptr);
+
+ /* Increment past delimiter */
+ ptr++;
+
+ /* Copy into the temp. file name */
+ HDstrncpy(temp_file_name, ptr, HDstrlen(ptr) + 1);
} /* end if */
} /* end if */
- else if(CHECK_ABS_DRIVE(file_name)) {
+ else if(H5_CHECK_ABS_DRIVE(file_name)) {
+ /* Try opening file */
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
+
H5E_clear_stack(NULL);
+
/* strip "<drive-letter>:" */
- HDstrcpy(temp_file_name, &file_name[2]);
+ HDstrncpy(temp_file_name, &file_name[2], (HDstrlen(file_name) - 2) + 1);
} /* end if */
} /* end if */
@@ -414,7 +417,7 @@ H5L_extern_traverse(const char UNUSED *link_name, hid_t cur_group,
HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, FAIL, "can't duplicate resolved file name string")
/* get last component of file_name */
- GET_LAST_DELIMITER(actual_file_name, ptr)
+ H5_GET_LAST_DELIMITER(actual_file_name, ptr)
if(!ptr)
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name)
@@ -543,6 +546,8 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
char *norm_obj_name = NULL; /* Pointer to normalized current name */
void *ext_link_buf = NULL; /* Buffer to contain external link */
size_t buf_size; /* Size of buffer to hold external link */
+ size_t file_name_len; /* Length of file name string */
+ size_t norm_obj_name_len; /* Length of normalized object name string */
uint8_t *p; /* Pointer into external link buffer */
herr_t ret_value = SUCCEED; /* Return value */
@@ -565,16 +570,18 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "can't normalize object name")
/* Combine the filename and link name into a single buffer to give to the UD link */
- buf_size = 1 + (HDstrlen(file_name) + 1) + (HDstrlen(norm_obj_name) + 1);
+ file_name_len = HDstrlen(file_name) + 1;
+ norm_obj_name_len = HDstrlen(norm_obj_name) + 1;
+ buf_size = 1 + file_name_len + norm_obj_name_len;
if(NULL == (ext_link_buf = H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate udata buffer")
/* Encode the external link information */
p = (uint8_t *)ext_link_buf;
*p++ = (H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL; /* External link version & flags */
- HDstrcpy((char *)p, file_name); /* Name of file containing external link's object */
- p += HDstrlen(file_name) + 1;
- HDstrcpy((char *)p, norm_obj_name); /* External link's object */
+ HDstrncpy((char *)p, file_name, file_name_len); /* Name of file containing external link's object */
+ p += file_name_len;
+ HDstrncpy((char *)p, norm_obj_name, norm_obj_name_len); /* External link's object */
/* Create an external link */
if(H5L_create_ud(&link_loc, link_name, ext_link_buf, buf_size, H5L_TYPE_EXTERNAL, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index f643842..dc79e47 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -1245,7 +1245,7 @@ H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
new_oloc.addr = dst_oloc->addr;
/* Pick a default name for the new object */
- sprintf(tmp_obj_name, "~obj_pointed_by_%llu", (unsigned long long)dst_oloc->addr);
+ HDsnprintf(tmp_obj_name, sizeof(tmp_obj_name), "~obj_pointed_by_%llu", (unsigned long long)dst_oloc->addr);
/* Create a link to the newly copied object */
/* Note: since H5O_copy_header_map actually copied the target object, it
diff --git a/src/H5Oname.c b/src/H5Oname.c
index fb44000..c1cb8c8 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -97,10 +97,10 @@ H5O_name_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
HDassert(p);
/* decode */
- if(NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))) ||
- NULL == (mesg->s = (char *)H5MM_malloc(HDstrlen((const char *)p) + 1)))
+ if(NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if(NULL == (mesg->s = (char *)H5MM_strdup((const char *)p)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- HDstrcpy(mesg->s, (const char *)p);
/* Set return value */
ret_value = mesg;
@@ -138,9 +138,9 @@ H5O_name_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, cons
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(p);
- assert(mesg && mesg->s);
+ HDassert(f);
+ HDassert(p);
+ HDassert(mesg && mesg->s);
/* encode */
HDstrcpy((char*)p, mesg->s);
diff --git a/src/H5T.c b/src/H5T.c
index 5801c3f..65460ed 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -4389,7 +4389,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
H5T_g.apaths = 128;
if(NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for no-op conversion path")
- HDstrcpy(H5T_g.path[0]->name, "no-op");
+ HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op");
H5T_g.path[0]->func = H5T__conv_noop;
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
if(H5T__conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
@@ -4457,7 +4457,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
path->name[H5T_NAMELEN - 1] = '\0';
} /* end if */
else
- HDstrcpy(path->name, "NONAME");
+ HDsnprintf(path->name, sizeof(path->name), "NONAME");
if(NULL == (path->src = H5T_copy(src, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path")
if(NULL == (path->dst = H5T_copy(dst, H5T_COPY_ALL)))
diff --git a/src/H5private.h b/src/H5private.h
index 3bc8722..f1f5dbb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1473,19 +1473,20 @@ extern char *strdup(const char *s);
#if defined(H5_HAVE_WINDOW_PATH)
/* directory delimiter for Windows: slash and backslash are acceptable on Windows */
-#define DIR_SLASH_SEPC '/'
-#define DIR_SEPC '\\'
-#define DIR_SEPS "\\"
-#define CHECK_DELIMITER(SS) ((SS == DIR_SEPC)||(SS == DIR_SLASH_SEPC))
-#define CHECK_ABSOLUTE(NAME) ((isalpha(NAME[0])) && (NAME[1] == ':') && (CHECK_DELIMITER(NAME[2])))
-#define CHECK_ABS_DRIVE(NAME) ((isalpha(NAME[0])) && (NAME[1] == ':'))
-#define CHECK_ABS_PATH(NAME) (CHECK_DELIMITER(NAME[0]))
-
-#define GET_LAST_DELIMITER(NAME, ptr) { \
+#define H5_DIR_SLASH_SEPC '/'
+#define H5_DIR_SEPC '\\'
+#define H5_DIR_SEPS "\\"
+#define H5_CHECK_DELIMITER(SS) ((SS == H5_DIR_SEPC) || (SS == H5_DIR_SLASH_SEPC))
+#define H5_CHECK_ABSOLUTE(NAME) ((HDisalpha(NAME[0])) && (NAME[1] == ':') && (H5_CHECK_DELIMITER(NAME[2])))
+#define H5_CHECK_ABS_DRIVE(NAME) ((HDisalpha(NAME[0])) && (NAME[1] == ':'))
+#define H5_CHECK_ABS_PATH(NAME) (H5_CHECK_DELIMITER(NAME[0]))
+
+#define H5_GET_LAST_DELIMITER(NAME, ptr) { \
char *slash, *backslash; \
- slash = strrchr(NAME, DIR_SLASH_SEPC); \
- backslash = strrchr(NAME, DIR_SEPC); \
- if (backslash > slash) \
+ \
+ slash = HDstrrchr(NAME, H5_DIR_SLASH_SEPC); \
+ backslash = HDstrrchr(NAME, H5_DIR_SEPC); \
+ if(backslash > slash) \
(ptr = backslash); \
else \
(ptr = slash); \
@@ -1495,27 +1496,27 @@ extern char *strdup(const char *s);
/* OpenVMS pathname: <disk name>$<partition>:[path]<file name>
* i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */
-#define DIR_SEPC ']'
-#define DIR_SEPS "]"
-#define CHECK_DELIMITER(SS) (SS == DIR_SEPC)
-#define CHECK_ABSOLUTE(NAME) (strrchr(NAME, ':') && strrchr(NAME, '['))
-#define CHECK_ABS_DRIVE(NAME) (0)
-#define CHECK_ABS_PATH(NAME) (0)
-#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, DIR_SEPC);
+#define H5_DIR_SEPC ']'
+#define H5_DIR_SEPS "]"
+#define H5_CHECK_DELIMITER(SS) (SS == H5_DIR_SEPC)
+#define H5_CHECK_ABSOLUTE(NAME) (HDstrrchr(NAME, ':') && HDstrrchr(NAME, '['))
+#define H5_CHECK_ABS_DRIVE(NAME) (0)
+#define H5_CHECK_ABS_PATH(NAME) (0)
+#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
#else
-#define DIR_SEPC '/'
-#define DIR_SEPS "/"
-#define CHECK_DELIMITER(SS) (SS == DIR_SEPC)
-#define CHECK_ABSOLUTE(NAME) (CHECK_DELIMITER(*NAME))
-#define CHECK_ABS_DRIVE(NAME) (0)
-#define CHECK_ABS_PATH(NAME) (0)
-#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, DIR_SEPC);
+#define H5_DIR_SEPC '/'
+#define H5_DIR_SEPS "/"
+#define H5_CHECK_DELIMITER(SS) (SS == H5_DIR_SEPC)
+#define H5_CHECK_ABSOLUTE(NAME) (H5_CHECK_DELIMITER(*NAME))
+#define H5_CHECK_ABS_DRIVE(NAME) (0)
+#define H5_CHECK_ABS_PATH(NAME) (0)
+#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
#endif
-#define COLON_SEPC ':'
+#define H5_COLON_SEPC ':'
/* Use FUNC to safely handle variations of C99 __func__ keyword handling */
diff --git a/src/H5public.h b/src/H5public.h
index 63439c4..f66508d 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 144 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 148 /* 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.144" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.148" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/H5system.c b/src/H5system.c
index 83cecba..3ffe411 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -707,7 +707,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
* OpenVMS: <disk name>$<partition>:[path]<file name>
* i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c
*/
- if(CHECK_ABSOLUTE(name)) {
+ if(H5_CHECK_ABSOLUTE(name)) {
if(NULL == (full_path = (char *)H5MM_strdup(name)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end if */
@@ -726,7 +726,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
* Unix: does not apply
* OpenVMS: does not apply
*/
- if(CHECK_ABS_DRIVE(name)) {
+ if(H5_CHECK_ABS_DRIVE(name)) {
drive = name[0] - 'A' + 1;
retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN);
HDstrcpy(new_name, &name[2]);
@@ -737,7 +737,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
* Unix: does not apply
* OpenVMS: does not apply
*/
- else if(CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) {
+ else if(H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) {
sprintf(cwdpath, "%c:%c", (drive+'A'-1), name[0]);
retcwd = cwdpath;
HDstrcpy(new_name, &name[1]);
@@ -773,8 +773,8 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
else
HDstrncat(full_path, new_name, HDstrlen(new_name));
#else
- if(!CHECK_DELIMITER(cwdpath[cwdlen - 1]))
- HDstrncat(full_path, DIR_SEPS, HDstrlen(DIR_SEPS));
+ if(!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1]))
+ HDstrncat(full_path, H5_DIR_SEPS, HDstrlen(H5_DIR_SEPS));
HDstrncat(full_path, new_name, HDstrlen(new_name));
#endif
} /* end if */
@@ -784,7 +784,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
if(full_path) {
char *ptr = NULL;
- GET_LAST_DELIMITER(full_path, ptr)
+ H5_GET_LAST_DELIMITER(full_path, ptr)
HDassert(ptr);
*++ptr = '\0';
*extpath = full_path;
diff --git a/src/Makefile.in b/src/Makefile.in
index f7fe1d8..3c9098f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -324,6 +324,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -375,7 +376,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -522,7 +522,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 = 134
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index aa92371..6af1e94 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -223,8 +223,24 @@ ADD_TEST (
tsohm_dst.h5
tsohm_src.h5
)
-ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
-SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+
+IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
+ SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ ADD_TEST (NAME testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
+ SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ ADD_TEST (NAME testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
+ SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ ADD_TEST (NAME testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
+ SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
+ SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
##############################################################################
##############################################################################
diff --git a/test/Makefile.in b/test/Makefile.in
index 458ede6..81681ef 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -598,6 +598,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -649,7 +650,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/test/testframe.c b/test/testframe.c
index 5835b73..8ab7a5b 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -155,8 +155,8 @@ void TestUsage(void)
print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n",
TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
- print_func(" [-[e]x[clude] name+] \n");
- print_func(" [-o[nly] name+] \n");
+ print_func(" [-[e]x[clude] name]+ \n");
+ print_func(" [-o[nly] name]+ \n");
print_func(" [-b[egin] name] \n");
print_func(" [-s[ummary]] \n");
print_func(" [-c[leanoff]] \n");
diff --git a/test/testhdf5.h b/test/testhdf5.h
index c92c0f0..907fce9 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -142,7 +142,7 @@
if(VERBOSE_HI) \
print_func(" Call to routine: %15s at line %4d in %s returned " \
"invalid result\n", where, (int)__LINE__, __FILE__); \
- TestErrPrintf("*** UNEXPECTED RESULT from %s at line %4d in %s\n" \
+ TestErrPrintf("*** UNEXPECTED RESULT from %s at line %4d in %s\n", \
where, (int)__LINE__, __FILE__); \
} while(0)
diff --git a/test/testlibinfo.sh.in b/test/testlibinfo.sh.in
index fba1794..b7aa6c4 100644
--- a/test/testlibinfo.sh.in
+++ b/test/testlibinfo.sh.in
@@ -53,7 +53,10 @@ SKIP() {
# Function definitions
CHECK_LIBINFO(){
LINEMSG $1
- if strings $1 | grep "SUMMARY OF THE HDF5 CONFIGURATION" > /dev/null; then
+ # Some systems, like Mac, the strings command inspects library files. Older
+ # versions of strings may not know newer library format, resulting in
+ # command errors. Make it read the file as stdin to avoid the problem.
+ if strings < $1 | grep "SUMMARY OF THE HDF5 CONFIGURATION" > /dev/null; then
echo " PASSED"
else
echo " FAILED"
diff --git a/test/tfile.c b/test/tfile.c
index 8ee0b64..e669bd0 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -526,6 +526,9 @@ test_file_open(void)
/* Close dataset from first open */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
+
+ ret = H5Pclose(fapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
} /* test_file_open() */
/****************************************************************
@@ -1060,6 +1063,9 @@ test_get_file_id(void)
VERIFY(fid2, FAIL, "H5Iget_file_id");
/* Close objects */
+ ret = H5Pclose(plist);
+ CHECK(ret, FAIL, "H5Pclose");
+
ret = H5Tclose(datatype_id);
CHECK(ret, FAIL, "H5Tclose");
@@ -2855,7 +2861,7 @@ test_filespace_sects(void)
test_free_sections(fapl_stdio, filename);
/* close fapl and remove the file */
- h5_cleanup(FILENAME, fapl_split);
+ h5_cleanup(FILENAME, fapl_stdio);
/* CORE */
MESSAGE(5, ("Testing File free space information for a core file\n"));
@@ -3223,6 +3229,9 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
+
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
} /* end test_libver_bounds_real() */
/****************************************************************
diff --git a/test/th5o.c b/test/th5o.c
index c46751e..a470f4c 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -111,6 +111,8 @@ test_h5o_open(void)
CHECK(dspace, FAIL, "H5Dget_space");
/* Close the IDs */
+ ret = H5Sclose(dspace);
+ CHECK(ret, FAIL, "H5Sclose");
ret = H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
ret = H5Tclose(dtype);
@@ -324,6 +326,8 @@ test_h5o_open_by_addr(void)
CHECK(dspace, FAIL, "H5Dget_space");
/* Close the IDs */
+ ret = H5Sclose(dspace);
+ CHECK(ret, FAIL, "H5Sclose");
ret = H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
ret = H5Tclose(dtype);
diff --git a/test/th5s.c b/test/th5s.c
index a026545..ebbaa37 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -182,14 +182,13 @@ test_h5s_basic(void)
fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK_I(fid1, "H5Fopen");
if (fid1 >= 0){
- dset1 = H5Dopen2(fid1, "dset", H5P_DEFAULT);
- VERIFY(dset1, FAIL, "H5Dopen2");
- ret = H5Fclose(fid1);
- CHECK_I(ret, "H5Fclose");
+ dset1 = H5Dopen2(fid1, "dset", H5P_DEFAULT);
+ VERIFY(dset1, FAIL, "H5Dopen2");
+ ret = H5Fclose(fid1);
+ CHECK_I(ret, "H5Fclose");
}
else
- printf("***cannot open the pre-created H5S_MAX_RANK test file (%s)\n",
- testfile);
+ printf("***cannot open the pre-created H5S_MAX_RANK test file (%s)\n", testfile);
}
/* Verify that incorrect dimensions don't work */
diff --git a/test/tsohm.c b/test/tsohm.c
index fddb552..eb5f7c5 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -1280,6 +1280,9 @@ static void size2_verify_plist1(hid_t plist)
ret = memcmp(&fill1, &fill1_correct, sizeof(fill1_correct));
VERIFY(ret, 0, memcmp);
+
+ ret = H5Tclose(dtype1_id);
+ CHECK_I(ret, "H5Tclose");
}
/*-------------------------------------------------------------------------
@@ -1348,6 +1351,9 @@ static void size2_verify_plist2(hid_t plist)
ret = HDmemcmp(&fill2, &fill2_correct, (size_t)DTYPE2_SIZE);
VERIFY(ret, 0, memcmp);
+
+ ret = H5Tclose(dtype2_id);
+ CHECK_I(ret, "H5Tclose");
}
#ifdef NOT_NOW
@@ -3138,6 +3144,8 @@ static void test_sohm_extlink_helper(hid_t src_fcpl_id, hid_t dst_fcpl_id)
/* Close the dataset and both files to make sure everything gets flushed
* out of memory
*/
+ ret = H5Sclose(space_id);
+ CHECK_I(ret, "H5Sclose");
ret = H5Dclose(dset_id);
CHECK_I(ret, "H5Dclose");
ret = H5Fclose(src_file_id);
@@ -3195,6 +3203,9 @@ test_sohm_extlink(void)
test_sohm_extlink_helper(fcpl_id, H5P_DEFAULT);
test_sohm_extlink_helper(H5P_DEFAULT, fcpl_id);
test_sohm_extlink_helper(fcpl_id, fcpl_id);
+
+ ret = H5Pclose(fcpl_id);
+ CHECK_I(ret, "H5Pclose");
}
@@ -3782,6 +3793,9 @@ test_sohm_extend_dset(void)
CHECK_I(ret, "test_sohm_extend_dset_helper");
ret = test_sohm_extend_dset_helper(fcpl_id, TRUE);
CHECK_I(ret, "test_sohm_extend_dset_helper");
+
+ ret = H5Pclose(fcpl_id);
+ CHECK_I(ret, "H5Pclose");
}
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 394b3b1..2fbf5fc 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -255,6 +255,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -306,7 +307,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 70e11ae..46c7d53 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -228,6 +228,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -279,7 +280,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 970cc12..7f68e76 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -44,9 +44,6 @@ IF (BUILD_TESTING)
SET (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.out.ls
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.out.ls
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.out.ls
)
FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
@@ -62,20 +59,6 @@ IF (BUILD_TESTING)
ARGS -E copy_if_different ${listfiles} ${dest}
)
ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
- #
- # This section can be removed, but leave here for a reference later.
- # Purpose: '-l3' ignores top 3 lines when copy text file.
- #
- #FOREACH (listfiles ${LIST_OTHER_TEST_FILES})
- # SET (lsdest "${PROJECT_BINARY_DIR}/testfiles/${listfiles}")
- # ADD_CUSTOM_COMMAND (
- # TARGET h5copy
- # POST_BUILD
- # COMMAND ${XLATE_UTILITY}
- # ARGS ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/${listfiles} ${lsdest} -l3
- # )
- #ENDFOREACH (listfiles ${LIST_OTHER_TEST_FILES})
##############################################################################
##############################################################################
@@ -86,89 +69,189 @@ IF (BUILD_TESTING)
#
# Perform h5copy according to passing parmeters
#
- MACRO (ADD_H5_F_TEST testname resultcode infile outfile fparam vparam sparam srcname dparam dstname)
+ MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY_F-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
ADD_TEST (
NAME H5COPY_F-${testname}
- COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${outfile} ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY_F-${testname}")
- ADD_H5_DIFF_TEST (${testname} ${resultcode} ${last_test} ${infile} ${outfile} ${srcname} ${dstname})
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
+ ADD_TEST (
+ NAME H5COPY_F-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ )
+ SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_F_TEST)
- MACRO (ADD_H5_TEST testname resultcode infile outfile vparam sparam srcname dparam dstname)
+ MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
ADD_TEST (
NAME H5COPY-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${outfile} ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-${testname}")
- ADD_H5_DIFF_TEST (${testname} ${resultcode} ${last_test} ${infile} ${outfile} ${srcname} ${dstname})
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
+ ADD_TEST (
+ NAME H5COPY-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ )
+ SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST)
- MACRO (ADD_H5_DIFF_TEST testname resultcode testdepends infile outfile srcname dstname)
+ MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY-${testname}-prefill
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ )
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY-${testname}
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ )
+ SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
IF (NOT ${resultcode} STREQUAL "2")
ADD_TEST (
- NAME H5COPY-DIFF_${testname}
- COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${outfile} ${srcname} ${dstname}
+ NAME H5COPY-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
- SET_TESTS_PROPERTIES(H5COPY-DIFF_${testname} PROPERTIES DEPENDS ${testdepends})
- SET (last_test "H5COPY-DIFF_${testname}")
+ SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-DIFF_${testname} PROPERTIES WILL_FAIL "true")
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
ENDIF (${resultcode} STREQUAL "1")
ENDIF (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_DIFF_TEST)
+ ENDMACRO (ADD_H5_TEST2)
+
+ MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- #
- # Test result with h5ls
- #
- MACRO (ADD_H5LS_TEST file filetest)
- # If using memchecker add tests without using scripts
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}-prefill
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ )
IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5COPY-h5ls_${file}-${filetest} COMMAND $<TARGET_FILE:h5ls> -Svr ./testfiles/${file}.out.h5)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ )
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
ADD_TEST (
- NAME H5COPY-h5ls_${file}-${filetest}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
- -D "TEST_ARGS=-Svr;./testfiles/${file}.out.h5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${file}.out.out"
- -D "TEST_EXPECT=0"
- -D "TEST_REFERENCE=./testfiles/${file}.out.ls"
- -D "TEST_MASK=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ NAME H5COPY_SAME-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-h5ls_${file}-${filetest} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-h5ls_${file}-${filetest}")
- ENDMACRO (ADD_H5LS_TEST)
+ SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
+ ENDMACRO (ADD_H5_TEST_SAME)
#
# Similiar to ADD_H5_TEST macro. Compare to outputs from source & target
# files instead of checking with h5ls.
#
- MACRO (ADD_H5_CMP_TEST testname resultcode infile outfile vparam sparam srcname dparam dstname)
+ MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${outfile} ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
+ ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
IF (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
ENDIF (${resultcode} STREQUAL "1")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ ./testfiles/${testname}.out.out
+ ./testfiles/${testname}.out.out.err
+ )
ADD_TEST (
NAME H5COPY-CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5copy>"
- -D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${outfile};${vparam};${sparam};${srcname};${dparam};${dstname}"
+ -D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=./testfiles/${testname}.out.out"
-D "TEST_EXPECT=${resultcode}"
@@ -176,11 +259,8 @@ IF (BUILD_TESTING)
-D "TEST_MASK=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
+ SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-CMP-${testname}")
ENDMACRO (ADD_H5_CMP_TEST)
##############################################################################
@@ -197,172 +277,135 @@ IF (BUILD_TESTING)
SET (HDF_EXT_SRC_FILE h5copy_extlinks_src)
SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${HDF_FILE1}.out.h5
- ./testfiles/${HDF_FILE1}.out.out
- ./testfiles/${HDF_FILE1}.out.out.err
- ./testfiles/${HDF_FILE2}.out.h5
- ./testfiles/${HDF_FILE2}.out.out
- ./testfiles/${HDF_FILE2}.out.out.err
- ./testfiles/${HDF_EXT_SRC_FILE}.out.h5
- ./testfiles/${HDF_EXT_SRC_FILE}.out.out
- ./testfiles/${HDF_EXT_SRC_FILE}.out.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clearall-objects")
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ simple.out.h5
+ chunk.out.h5
+ compact.out.h5
+ compound.out.h5
+ compressed.out.h5
+ named_vl.out.h5
+ nested_vl.out.h5
+ simple_top.out.h5
+ dsrename.out.h5
+ grp_empty.out.h5
+ grp_dsets.out.h5
+ grp_nested.out.h5
+ simple_group.out.h5
+ grp_rename.out.h5
+ grp_dsets_rename.out.h5
+ A_B1_simple.out.h5
+ A_B2_simple2.out.h5
+ C_D_simple.out.h5
+ E_F_grp_dsets.out.h5
+ G_H_grp_nested.out.h5
+ region_ref.out.h5
+ ext_link.out.h5
+ ext_link_f.out.h5
+ ext_dangle_noobj.out.h5
+ ext_dangle_noobj_f.out.h5
+ ext_dangle_nofile.out.h5
+ ext_dangle_nofile_f.out.h5
+ ext_link_group.out.h5
+ ext_link_group_f.out.h5
+ samefile1.out.h5
+ samefile2.out.h5
+ h5copy_misc1.out.h5
+ h5copy_misc1.out.out
+ h5copy_misc1.out.out.err
+ )
+ SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5COPY-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# "Test copying various forms of datasets"
- ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s simple -d simple)
- ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s chunk -d chunk)
- ADD_H5_TEST (compact 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s compact -d compact)
- ADD_H5_TEST (compound 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s compound -d compound)
- ADD_H5_TEST (compressed 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s compressed -d compressed)
- ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s named_vl -d named_vl)
- ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s nested_vl -d nested_vl)
+ ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple)
+ ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 -v -s chunk -d chunk)
+ ADD_H5_TEST (compact 0 ${HDF_FILE1}.h5 -v -s compact -d compact)
+ ADD_H5_TEST (compound 0 ${HDF_FILE1}.h5 -v -s compound -d compound)
+ ADD_H5_TEST (compressed 0 ${HDF_FILE1}.h5 -v -s compressed -d compressed)
+ ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 -v -s named_vl -d named_vl)
+ ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 -v -s nested_vl -d nested_vl)
# "Test copying dataset within group in source file to root of destination"
- ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s grp_dsets/simple -d simple_top)
+ ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 -v -s grp_dsets/simple -d simple_top)
# "Test copying & renaming dataset"
- ADD_H5_TEST (rename 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s compound -d rename)
+ ADD_H5_TEST (dsrename 0 ${HDF_FILE1}.h5 -v -s compound -d rename)
# "Test copying empty, 'full' & 'nested' groups"
- ADD_H5_TEST (grp_empty 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s grp_empty -d grp_empty)
- ADD_H5_TEST (grp_dsets 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s grp_dsets -d grp_dsets)
- ADD_H5_TEST (grp_nested 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s grp_nested -d grp_nested)
+ ADD_H5_TEST (grp_empty 0 ${HDF_FILE1}.h5 -v -s grp_empty -d grp_empty)
+ ADD_H5_TEST (grp_dsets 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_dsets)
+ ADD_H5_TEST (grp_nested 0 ${HDF_FILE1}.h5 -v -s grp_nested -d grp_nested)
# "Test copying dataset within group in source file to group in destination"
- ADD_H5_TEST (simple_group 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s /grp_dsets/simple -d /grp_dsets/simple_group)
+ ADD_H5_TEST2 (simple_group 0 ${HDF_FILE1}.h5 grp_dsets grp_dsets -v -s /grp_dsets/simple -d /grp_dsets/simple_group)
# "Test copying & renaming group"
- ADD_H5_TEST (grp_rename 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s grp_dsets -d grp_rename)
+ ADD_H5_TEST (grp_rename 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_rename)
# "Test copying 'full' group hierarchy into group in destination file"
- ADD_H5_TEST (grp_dsets_rename 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s grp_dsets -d /grp_rename/grp_dsets)
+ ADD_H5_TEST2 (grp_dsets_rename 0 ${HDF_FILE1}.h5 grp_dsets grp_rename -v -s grp_dsets -d /grp_rename/grp_dsets)
# "Test copying objects into group hier. that doesn't exist yet in destination file"
- ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -vp -s simple -d /A/B1/simple)
- ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -vp -s simple -d /A/B2/simple2)
- ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -vp -s /grp_dsets/simple -d /C/D/simple)
- ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -vp -s /grp_dsets -d /E/F/grp_dsets)
- ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -vp -s /grp_nested -d /G/H/grp_nested)
-
- # Verify that the file created above is correct
- ADD_H5LS_TEST (${HDF_FILE1} basic)
+ ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B1/simple)
+ ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B2/simple2)
+ ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple)
+ ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets -d /E/F/grp_dsets)
+ ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 -vp -s /grp_nested -d /G/H/grp_nested)
############# COPY REFERENCES ##############
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-clear-refs
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${HDF_FILE2}.out.h5
- ./testfiles/${HDF_FILE2}.out.out
- ./testfiles/${HDF_FILE2}.out.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clear-refs PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clear-refs")
-
# "Test copying object and region references"
- ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ${HDF_FILE2}.out.h5 ref -v -s / -d /COPY)
-
- # Verify that the file created above is correct
- ADD_H5LS_TEST (${HDF_FILE2} refs)
+ ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ref -v -s / -d /COPY)
############# COPY EXT LINKS ##############
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-clear-ext-links
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${HDF_EXT_SRC_FILE}.out.h5
- ./testfiles/${HDF_EXT_SRC_FILE}.out.out
- ./testfiles/${HDF_EXT_SRC_FILE}.out.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clear-ext-links PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clear-ext-links")
-
# "Test copying external link directly without -f ext"
- ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 -v -s /group_ext/extlink_dset -d /copy1_dset)
+ ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_dset -d /copy1_dset)
# "Test copying external link directly with -f ext"
- ADD_H5_F_TEST (ext_link_f 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 ext -v -s /group_ext/extlink_dset -d /copy2_dset)
+ ADD_H5_F_TEST (ext_link_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_dset -d /copy2_dset)
# "Test copying dangling external link (no obj) directly without -f ext"
- ADD_H5_TEST (ext_dangle_noobj 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_1)
+ ADD_H5_TEST (ext_dangle_noobj 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_1)
# "Test copying dangling external link (no obj) directly with -f ext"
- ADD_H5_F_TEST (ext_dangle_noobj_f 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 ext -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2)
+ ADD_H5_F_TEST (ext_dangle_noobj_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2)
# "Test copying dangling external link (no file) directly without -f ext"
- ADD_H5_TEST (ext_dangle_nofile 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_1)
+ ADD_H5_TEST (ext_dangle_nofile 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_1)
# "Test copying dangling external link (no file) directly with -f ext"
- ADD_H5_F_TEST (ext_dangle_nofile_f 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 ext -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2)
+ ADD_H5_F_TEST (ext_dangle_nofile_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2)
# "Test copying a group contains external links without -f ext"
- ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 -v -s /group_ext -d /copy1_group)
+ ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext -d /copy1_group)
# "Test copying a group contains external links with -f ext"
- ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ${HDF_EXT_SRC_FILE}.out.h5 ext -v -s /group_ext -d /copy2_group)
-
- # Verify that the file created above is correct
- ADD_H5LS_TEST (${HDF_EXT_SRC_FILE} links)
+ ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group)
############# Test misc. ##############
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-clear-misc
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/h5copy_misc1.out.out
- ./testfiles/h5copy_misc1.out.out.err
- ./testfiles/${HDF_FILE1}.out.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clear-misc PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clear-misc")
#-----------------------------------------------------------------
# "Test copying object into group which doesn't exist, without -p"
#
- ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s /simple -d /g1/g2/simple)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-clear-samefile
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${HDF_FILE1}.out.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clear-samefile PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clear-samefile")
+ ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 -v -s /simple -d /g1/g2/simple)
#-------------------------------------------
# "Test copying objects to the same file "
#
- # create temporary test file with some objects
- ADD_H5_TEST (samefile1_pre 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s /simple -d /simple)
- ADD_H5_TEST (samefile2_pre 0 ${HDF_FILE1}.h5 ${HDF_FILE1}.out.h5 -v -s /grp_dsets -d /grp_dsets)
- # actual test cases
# - dataset
- ADD_H5_TEST (samefile1 0 ${HDF_FILE1}.out.h5 ${HDF_FILE1}.out.h5 -v -s /simple -d /simple_cp)
+ ADD_H5_TEST_SAME (samefile1 0 ${HDF_FILE1}.h5 /simple /simple -v -s /simple -d /simple_cp)
# - group with some datasets
- ADD_H5_TEST (samefile2 0 ${HDF_FILE1}.out.h5 ${HDF_FILE1}.out.h5 -v -s /grp_dsets -d /grp_dsets_cp)
+ ADD_H5_TEST_SAME (samefile2 0 ${HDF_FILE1}.h5 /grp_dsets /grp_dsets -v -s /grp_dsets -d /grp_dsets_cp)
ENDIF (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index da9d0b7..3278f80 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -234,6 +234,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -285,7 +286,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5copy/testfiles/h5copy_misc1.out b/tools/h5copy/testfiles/h5copy_misc1.out
index 10dd1a6..1624f2b 100644
--- a/tools/h5copy/testfiles/h5copy_misc1.out
+++ b/tools/h5copy/testfiles/h5copy_misc1.out
@@ -1,3 +1,3 @@
-Copying file <./testfiles/h5copytst.h5> and object </simple> to file <./testfiles/h5copytst.out.h5> and object </g1/g2/simple>
+Copying file <./testfiles/h5copytst.h5> and object </simple> to file <./testfiles/h5copy_misc1.out.h5> and object </g1/g2/simple>
Error in copy...Exiting
h5copy error: group </g1> doesn't exist. Use -p to create parent groups.
diff --git a/tools/h5copy/testh5copy.sh.in b/tools/h5copy/testh5copy.sh.in
index c7acd9a..d30d8d8 100644
--- a/tools/h5copy/testh5copy.sh.in
+++ b/tools/h5copy/testh5copy.sh.in
@@ -57,9 +57,6 @@ $SRC_H5COPY_TESTFILES/h5copy_extlinks_trg.h5
# List of expect files that will be copied over to local test dir
LIST_OTHER_TEST_FILES="
-$SRC_H5COPY_TESTFILES/h5copy_extlinks_src.out.ls
-$SRC_H5COPY_TESTFILES/h5copy_ref.out.ls
-$SRC_H5COPY_TESTFILES/h5copytst.out.ls
$SRC_H5COPY_TESTFILES/h5copy_misc1.out
"
@@ -151,15 +148,6 @@ VERIFY()
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Verifying".
#
-VERIFY_H5LS()
-{
- SPACES=" "
- echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012'
-}
-
-# Print a line-line message left justified in a field of 70 characters
-# beginning with the word "Verifying".
-#
VERIFY_OUTPUT()
{
SPACES=" "
@@ -183,24 +171,34 @@ TOOLTEST()
{
actualout="$TESTDIR/tooltest.actualout"
actualerr="$TESTDIR/tooltest.actualerr"
- runh5diff=yes
- if [ "$1" = -i ]; then
- inputfile=$2
- else
- runh5diff=no
- fi
- if [ "$3" = -o ]; then
- outputfile=$4
- else
- runh5diff=no
- fi
+ runh5diff=yes
+ if [ "$1" = -i ]; then
+ inputfile=$2
+ else
+ if [ "$1" = -f ]; then
+ inputfile=$4
+ else
+ inputfile=$3
+ fi
+ runh5diff=no
+ fi
+ if [ "$3" = -o ]; then
+ outputfile=$4
+ else
+ if [ "$1" = -f ]; then
+ outputfile=$6
+ else
+ outputfile=$5
+ fi
+ runh5diff=no
+ fi
TESTING $H5COPY $@
(
- echo "#############################"
- echo " output for '$H5COPY $@'"
- echo "#############################"
- $RUNSERIAL $H5COPY_BIN $@
+ echo "#############################"
+ echo " output for '$H5COPY $@'"
+ echo "#############################"
+ $RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
RET=$?
if [ $RET != 0 ]; then
@@ -210,15 +208,141 @@ TOOLTEST()
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
+
+ if [ $runh5diff != no ]; then
+ H5DIFFTEST $inputfile $outputfile $7 $9
+ fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actualout $actualerr
+ rm -f $actualout $actualerr $outputfile
+ fi
+ fi
+}
+
+# TOOLTEST back-to-back
+TOOLTEST_PREFILL()
+{
+ actualout="$TESTDIR/tooltest.actualout"
+ actualerr="$TESTDIR/tooltest.actualerr"
+ runh5diff=yes
+ if [ "$1" = -i ]; then
+ inputfile=$2
+ else
+ runh5diff=no
+ fi
+ if [ "$3" = -o ]; then
+ outputfile=$4
+ else
+ runh5diff=no
+ fi
+
+ grp_name=$5
+ grp_name2=$6
+ obj_name=$7
+ obj_name2=$8
+
+ TESTING $H5COPY $@
+ (
+ echo "#############################"
+ echo " output for '$H5COPY $@'"
+ echo "#############################"
+ $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2
+ ) > $actualout 2> $actualerr
+ RET=$?
+ if [ $RET != 0 ]; then
+ echo "*FAILED*"
+ echo "failed result is:"
+ cat $actualout
+ nerrors="`expr $nerrors + 1`"
+ else
+ TESTING $H5COPY $@
+ (
+ echo "#############################"
+ echo " output for '$H5COPY $@'"
+ echo "#############################"
+ $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2
+ ) > $actualout 2> $actualerr
+ RET=$?
+ if [ $RET != 0 ]; then
+ echo "*FAILED*"
+ echo "failed result is:"
+ cat $actualout
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+
+ if [ $runh5diff != no ]; then
+ H5DIFFTEST $inputfile $outputfile $obj_name $obj_name2
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actualout $actualerr $outputfile
+ fi
fi
fi
+}
+
+# TOOLTEST back-to-back
+TOOLTEST_SAME()
+{
+ actualout="$TESTDIR/tooltest.actualout"
+ actualerr="$TESTDIR/tooltest.actualerr"
+ runh5diff=yes
+ if [ "$1" = -i ]; then
+ inputfile=$2
+ else
+ runh5diff=no
+ fi
+ if [ "$3" = -o ]; then
+ outputfile=$4
+ else
+ runh5diff=no
+ fi
- if [ $runh5diff != no ]; then
- H5DIFFTEST $inputfile $outputfile $7 $9
+ grp_name=$5
+ grp_name2=$6
+
+ TESTING $H5COPY $@
+ (
+ echo "#############################"
+ echo " output for '$H5COPY $@'"
+ echo "#############################"
+ $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name
+ ) > $actualout 2> $actualerr
+ RET=$?
+ if [ $RET != 0 ]; then
+ echo "*FAILED*"
+ echo "failed result is:"
+ cat $actualout
+ nerrors="`expr $nerrors + 1`"
+ else
+ TESTING $H5COPY $@
+ (
+ echo "#############################"
+ echo " output for '$H5COPY $@'"
+ echo "#############################"
+ $RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2
+ ) > $actualout 2> $actualerr
+ RET=$?
+ if [ $RET != 0 ]; then
+ echo "*FAILED*"
+ echo "failed result is:"
+ cat $actualout
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+
+ if [ $runh5diff != no ]; then
+ H5DIFFTEST $outputfile $outputfile $grp_name $grp_name2
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actualout $actualerr $outputfile
+ fi
+ fi
fi
}
@@ -259,18 +383,18 @@ TOOLTEST_FAIL()
actualerr_sav=${actualerr}-sav
shift
if [ "$1" = -i ]; then
- inputfile=$2
+ inputfile=$2
fi
if [ "$3" = -o ]; then
- outputfile=$4
+ outputfile=$4
fi
TESTING $H5COPY $@
(
- #echo "#############################"
- #echo " output for '$H5COPY $@'"
- #echo "#############################"
- $RUNSERIAL $H5COPY_BIN $@
+ #echo "#############################"
+ #echo " output for '$H5COPY $@'"
+ #echo "#############################"
+ $RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
RET=$?
@@ -298,7 +422,7 @@ TOOLTEST_FAIL()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actualout $actualerr $actualout_sav $actualerr_sav
+ rm -f $actualout $actualerr $actualout_sav $actualerr_sav $outputfile
fi
}
@@ -311,10 +435,10 @@ H5DIFFTEST()
$RUNSERIAL $H5DIFF_BIN -q "$@"
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
+ echo " PASSED"
fi
}
@@ -327,50 +451,13 @@ H5DIFFTEST_FAIL()
RET=$?
if [ $h5haveexitcode = 'yes' -a $RET != 1 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
+ echo " PASSED"
fi
}
-# Call the h5ls tool to verify the correct output data in the destination file
-#
-H5LSTEST()
-{
- expect="$TESTDIR/`basename $1 .h5`.ls"
- actual="$TESTDIR/`basename $1 .h5`.ls.actualout"
-
- # Stderr is included in stdout so that the diff can detect
- # any unexpected output from that stream too.
- #
- # Note: The modification time and storage utilization are masked off
- # so that the output is more portable
- VERIFY_H5LS $@
- (
- $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
- ) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' |sed 's/Storage:.*/Storage: <details removed for portability>/' >$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
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.ls) 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
- fi
-}
-
# Copy single datasets of various forms from one group to another,
# adding object copied to the destination file each time
#
@@ -379,82 +466,54 @@ H5LSTEST()
COPY_OBJECTS()
{
TESTFILE="$TESTDIR/h5copytst.h5"
- FILEOUT="$TESTDIR/`basename h5copytst.h5 .h5`.out.h5"
-
- # Remove any output file left over from previous test run
- rm -f $FILEOUT
- echo "Testing from `basename $TESTFILE` to `basename $FILEOUT` for the following tests:"
echo "Test copying various forms of datasets"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s simple -d simple
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s chunk -d chunk
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s compact -d compact
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s compound -d compound
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s compressed -d compressed
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s named_vl -d named_vl
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s nested_vl -d nested_vl
+ TOOLTEST -i $TESTFILE -o $TESTDIR/simple.out.h5 -v -s simple -d simple
+ TOOLTEST -i $TESTFILE -o $TESTDIR/chunk.out.h5 -v -s chunk -d chunk
+ TOOLTEST -i $TESTFILE -o $TESTDIR/compact.out.h5 -v -s compact -d compact
+ TOOLTEST -i $TESTFILE -o $TESTDIR/compound.out.h5 -v -s compound -d compound
+ TOOLTEST -i $TESTFILE -o $TESTDIR/compressed.out.h5 -v -s compressed -d compressed
+ TOOLTEST -i $TESTFILE -o $TESTDIR/named_vl.out.h5 -v -s named_vl -d named_vl
+ TOOLTEST -i $TESTFILE -o $TESTDIR/nested_vl.out.h5 -v -s nested_vl -d nested_vl
echo "Test copying dataset within group in source file to root of destination"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s grp_dsets/simple -d simple_top
+ TOOLTEST -i $TESTFILE -o $TESTDIR/simple_top.out.h5 -v -s grp_dsets/simple -d simple_top
echo "Test copying & renaming dataset"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s compound -d rename
+ TOOLTEST -i $TESTFILE -o $TESTDIR/dsrename.out.h5 -v -s compound -d rename
echo "Test copying empty, 'full' & 'nested' groups"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s grp_empty -d grp_empty
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_dsets
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s grp_nested -d grp_nested
+ TOOLTEST -i $TESTFILE -o $TESTDIR/grp_empty.out.h5 -v -s grp_empty -d grp_empty
+ TOOLTEST -i $TESTFILE -o $TESTDIR/grp_dsets.out.h5 -v -s grp_dsets -d grp_dsets
+ TOOLTEST -i $TESTFILE -o $TESTDIR/grp_nested.out.h5 -v -s grp_nested -d grp_nested
echo "Test copying dataset within group in source file to group in destination"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /grp_dsets/simple -d /grp_dsets/simple_group
+ TOOLTEST_PREFILL -i $TESTFILE -o $TESTDIR/simple_group.out.h5 grp_dsets grp_dsets /grp_dsets/simple /grp_dsets/simple_group
echo "Test copying & renaming group"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename
+ TOOLTEST -i $TESTFILE -o $TESTDIR/grp_rename.out.h5 -v -s grp_dsets -d grp_rename
echo "Test copying 'full' group hierarchy into group in destination file"
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets
+ TOOLTEST_PREFILL -i $TESTFILE -o $TESTDIR/grp_dsets_rename.out.h5 grp_dsets grp_rename grp_dsets /grp_rename/grp_dsets
echo "Test copying objects into group hier. that doesn't exist yet in destination file"
- TOOLTEST -i $TESTFILE -o $FILEOUT -vp -s simple -d /A/B1/simple
- TOOLTEST -i $TESTFILE -o $FILEOUT -vp -s simple -d /A/B2/simple2
- TOOLTEST -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets/simple -d /C/D/simple
- TOOLTEST -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets
- TOOLTEST -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested
-
- # Verify that the file created above is correct
- H5LSTEST $FILEOUT
-
- # Remove output file created, if the "no cleanup" environment variable is
- # not defined
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $FILEOUT
- fi
+ TOOLTEST -i $TESTFILE -o $TESTDIR/A_B1_simple.out.h5 -vp -s simple -d /A/B1/simple
+ TOOLTEST -i $TESTFILE -o $TESTDIR/A_B2_simple2.out.h5 -vp -s simple -d /A/B2/simple2
+ TOOLTEST -i $TESTFILE -o $TESTDIR/C_D_simple.out.h5 -vp -s /grp_dsets/simple -d /C/D/simple
+ TOOLTEST -i $TESTFILE -o $TESTDIR/E_F_grp_dsets.out.h5 -vp -s /grp_dsets -d /E/F/grp_dsets
+ TOOLTEST -i $TESTFILE -o $TESTDIR/G_H_grp_nested.out.h5 -vp -s /grp_nested -d /G/H/grp_nested
}
# Copy references in various way.
-# adding to the destination file each time compare the result
#
# Assumed arguments:
# <none>
COPY_REFERENCES()
{
TESTFILE="$TESTDIR/h5copy_ref.h5"
- FILEOUT="$TESTDIR/`basename h5copy_ref.h5 .h5`.out.h5"
-
- # Remove any output file left over from previous test run
- rm -f $FILEOUT
echo "Test copying object and region references"
- TOOLTEST -f ref -i $TESTFILE -o $FILEOUT -v -s / -d /COPY
-
- # Verify that the file created above is correct
- H5LSTEST $FILEOUT
-
- # Remove output file created, if the "no cleanup" environment variable is
- # not defined
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $FILEOUT
- fi
+ TOOLTEST_F -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
}
# Copy external links.
@@ -465,43 +524,30 @@ COPY_REFERENCES()
COPY_EXT_LINKS()
{
TESTFILE="$TESTDIR/h5copy_extlinks_src.h5"
- FILEOUT="$TESTDIR/`basename h5copy_extlinks_src.h5 .h5`.out.h5"
-
- # Remove any output file left over from previous test run
- rm -f $FILEOUT
echo "Test copying external link directly without -f ext"
- TOOLTEST -v -i $TESTFILE -o $FILEOUT -s /group_ext/extlink_dset -d /copy1_dset
+ TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link.out.h5 -s /group_ext/extlink_dset -d /copy1_dset
echo "Test copying external link directly with -f ext"
- TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -s /group_ext/extlink_dset -d /copy2_dset
+ TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
echo "Test copying dangling external link (no obj) directly without -f ext"
- TOOLTEST -v -i $TESTFILE -o $FILEOUT -s /group_ext/extlink_notyet1 -d /copy_dangle1_1
+ TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_noobj.out.h5 -s /group_ext/extlink_notyet1 -d /copy_dangle1_1
echo "Test copying dangling external link (no obj) directly with -f ext"
- TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
+ TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
echo "Test copying dangling external link (no file) directly without -f ext"
- TOOLTEST -v -i $TESTFILE -o $FILEOUT -s /group_ext/extlink_notyet2 -d /copy_dangle2_1
+ TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_nofile.out.h5 -s /group_ext/extlink_notyet2 -d /copy_dangle2_1
echo "Test copying dangling external link (no file) directly with -f ext"
- TOOLTEST -f ext -i $TESTFILE -o $FILEOUT -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
+ TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
echo "Test copying a group contains external links without -f ext"
- TOOLTEST -v -i $TESTFILE -o $FILEOUT -s /group_ext -d /copy1_group
+ TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link_group.out.h5 -s /group_ext -d /copy1_group
echo "Test copying a group contains external links with -f ext"
- TOOLTEST -f ext -v -i $TESTFILE -o $FILEOUT -s /group_ext -d /copy2_group
-
- # Verify that the file created above is correct
- H5LSTEST $FILEOUT
-
- # Remove output file created, if the "no cleanup" environment variable is
- # not defined
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $FILEOUT
- fi
+ TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
}
# Test misc.
@@ -511,28 +557,13 @@ COPY_EXT_LINKS()
TEST_MISC()
{
TESTFILE="$TESTDIR/h5copytst.h5"
- FILEOUT="$TESTDIR/`basename h5copytst.h5 .h5`.out.h5"
-
- # Remove any output file left over from previous test run
- rm -f $FILEOUT
echo "Test copying object into group which doesn't exist, without -p"
- TOOLTEST_FAIL h5copy_misc1.out -v -i $TESTFILE -o $FILEOUT -s /simple -d /g1/g2/simple
+ TOOLTEST_FAIL h5copy_misc1.out -i $TESTFILE -o $TESTDIR/h5copy_misc1.out.h5 -v -s /simple -d /g1/g2/simple
echo "Test copying objects to the same file "
- rm -f $FILEOUT
- # create temporary test file ($FILEOUT) with some objects
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /simple -d /simple
- TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /grp_dsets -d /grp_dsets
- # actual test cases
- TOOLTEST -i $FILEOUT -o $FILEOUT -v -s /simple -d /simple_cp
- TOOLTEST -i $FILEOUT -o $FILEOUT -v -s /grp_dsets -d /grp_dsets_cp
-
- # Remove output file created, if the "no cleanup" environment variable is
- # not defined
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $FILEOUT
- fi
+ TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile1.out.h5 /simple /simple_cp
+ TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile2.out.h5 /grp_dsets /grp_dsets_cp
}
##############################################################################
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 87eca15..8eb5ad1 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -344,10 +344,9 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DIFF-clear-${resultfile}-objects
+ NAME H5DIFF-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
)
@@ -363,7 +362,7 @@ IF (BUILD_TESTING)
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (H5_HAVE_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
@@ -381,10 +380,9 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "PH5DIFF-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME PH5DIFF-clear-${resultfile}-objects
+ NAME PH5DIFF-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${resultfile}_p.out ./testfiles/${resultfile}_p.out.err
)
@@ -402,7 +400,7 @@ IF (BUILD_TESTING)
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
)
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_PH5_TEST file)
@@ -413,15 +411,14 @@ IF (BUILD_TESTING)
# If using memchecker add tests without using scripts
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DIFF-clear-${testname}-objects
+ NAME H5DIFF-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err
)
# if there was a previous test
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-clear-${testname}-objects PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-clear-${testname}-objects")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
@@ -429,10 +426,13 @@ IF (BUILD_TESTING)
SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-${testname}")
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_NO_OUTPUT_TEST)
##############################################################################
@@ -1092,13 +1092,13 @@ ADD_H5_TEST (h5diff_704 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F
ADD_H5_TEST (h5diff_705 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /dset)
# same attr number , all different attr name
-ADD_H5_TEST (h5diff_706 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype)
+ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype)
# different attr number , same attr name (intersected)
ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2)
# different attr number , all different attr name
-ADD_H5_TEST (h5diff_708 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
+ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
# when no attributes exist in both objects
ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g4)
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 4676341..5567ceb 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -241,6 +241,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -292,7 +293,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5diff/testfiles/h5diff_706.txt b/tools/h5diff/testfiles/h5diff_706.txt
index 38eeac5..5825150 100644
--- a/tools/h5diff/testfiles/h5diff_706.txt
+++ b/tools/h5diff/testfiles/h5diff_706.txt
@@ -10,4 +10,4 @@ datatype: </ntype> and </ntype>
x integer1
x integer4
Attributes status: 0 common, 3 only in obj1, 3 only in obj2
-EXIT CODE: 0
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_708.txt b/tools/h5diff/testfiles/h5diff_708.txt
index add386b..a10a8b7 100644
--- a/tools/h5diff/testfiles/h5diff_708.txt
+++ b/tools/h5diff/testfiles/h5diff_708.txt
@@ -14,4 +14,4 @@ group : </g3> and </g3>
x integer10
x integer3
Attributes status: 0 common, 3 only in obj1, 2 only in obj2
-EXIT CODE: 0
+EXIT CODE: 1
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 56f49ac..3f39ae3 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -680,11 +680,11 @@ IF (BUILD_TESTING)
SET (last_test "H5DUMP-${testname}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DUMP-clear-h5dump-${testname}-objects
+ NAME H5DUMP-h5dump-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove h5dump-${testname}.out h5dump-${testname}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-h5dump-${testname}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -696,7 +696,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=h5dump-${testname}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-clear-h5dump-${testname}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_HELP_TEST)
@@ -724,14 +724,13 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DUMP-clear-${resultfile}-objects
+ NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
+ -E remove ${resultfile}.bin ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -743,7 +742,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
@@ -758,14 +757,13 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DUMP-clear-${resultfile}-objects
+ NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -777,49 +775,96 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
ADD_TEST (
- NAME H5DUMP-output-cmp-${resultfile}
+ NAME H5DUMP-${resultfile}-output-cmp
COMMAND ${CMAKE_COMMAND}
-E compare_files ${resultfile}.txt ${resultfile}.exp
)
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-${resultfile})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_EXPORT file)
+ MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${ddlfile}.txt ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${resultfile}.txt ${resultfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-output-cmp-ddl
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${ddlfile}.txt ${ddlfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_EXPORT_DDL file)
+
MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
- ADD_TEST (
- NAME H5DUMP-output-${resultfile}
- COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}
- )
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-output-${resultfile}")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
+ NAME H5DUMP-output-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.txt
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-output-${resultfile}
+ COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
+ ADD_TEST (
NAME H5DUMP-output-cmp-${resultfile}
COMMAND ${CMAKE_COMMAND}
-E compare_files ${resultfile}.txt ${resultfile}.exp
)
SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-output-cmp-${resultfile}")
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_EXPORT_TEST file)
MACRO (ADD_H5_MASK_TEST resultfile resultcode)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DUMP-clear-${resultfile}-objects
+ NAME H5DUMP-${resultfile}-clear-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/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -832,18 +877,18 @@ IF (BUILD_TESTING)
-D "TEST_MASK_ERROR=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
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
+ NAME H5DUMP-${resultfile}-clear-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")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -857,10 +902,40 @@ IF (BUILD_TESTING)
-D "TEST_MASK_ERROR=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_TEST file)
+ MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-IMPORT-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${conffile}.out ${conffile}.out.err ${resultfile}.bin ${resultfile}.h5
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-IMPORT-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${conffile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${conffile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
+ ADD_TEST (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
+ ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer)
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_IMPORT file)
+
MACRO (ADD_H5_PBITS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
@@ -869,17 +944,16 @@ IF (BUILD_TESTING)
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${resultfile}")
+ IF (NOT "${last_pbits_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
+ ENDIF (NOT "${last_pbits_test}" STREQUAL "")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DUMP-clear-${resultfile}-objects
+ NAME H5DUMP-${resultfile}-clear-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/pbits")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -891,7 +965,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_PBITS_TEST file)
@@ -915,17 +989,16 @@ IF (BUILD_TESTING)
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-XML-${resultfile}")
+ IF (NOT "${last_xml_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
+ ENDIF (NOT "${last_xml_test}" STREQUAL "")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5DUMP-XML-clear-${resultfile}-objects
+ NAME H5DUMP-XML-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
ADD_TEST (
NAME H5DUMP-XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -937,7 +1010,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${resultfile}.xml"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_XML_H5_TEST file)
@@ -1017,6 +1090,8 @@ IF (BUILD_TESTING)
tattrreg.out.err
tattrregR.out
tattrregR.out.err
+ tbin1LE.bin
+ tbinregR.txt
tbinregR.out
tbinregR.out.err
tbigdims.out
@@ -1151,7 +1226,7 @@ IF (BUILD_TESTING)
tnoddlfile.out.err
trawdatafile.out
trawdatafile.out.err
- twithddlfile.txt
+ trawdatafile.txt
tno-subset.out
tno-subset.out.err
tnullspace.out
@@ -1268,22 +1343,7 @@ IF (BUILD_TESTING)
ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-clear-twithddlfile-export
- COMMAND ${CMAKE_COMMAND}
- -E remove twithddl.txt
- )
- SET_TESTS_PROPERTIES (H5DUMP-clear-twithddlfile-export PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_H5_TEST_EXPORT (twithddlfile packedbits.h5 0 --enable-error-stack --ddl=twithddl.txt -y -o)
- ADD_TEST (
- NAME H5DUMP-output-cmp-meta-twithddlfile
- COMMAND ${CMAKE_COMMAND}
- -E compare_files twithddl.txt twithddl.exp
- )
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-meta-twithddlfile PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-meta-twithddlfile PROPERTIES DEPENDS "H5DUMP-clear-twithddlfile-export")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o)
# test for maximum display datasets
ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5)
@@ -1534,110 +1594,32 @@ IF (BUILD_TESTING)
ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
# test for binary output
- ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o out1LE.bin -b LE tbinary.h5)
+ ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5)
# test for string binary output
ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o)
ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o)
# NATIVE default. the NATIVE test can be validated with h5import/h5diff
- ADD_TEST (NAME H5DUMP-clear-objects-tbin1 COMMAND ${CMAKE_COMMAND} -E remove out1.bin)
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin1 PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin1 0 --enable-error-stack -d integer -o out1.bin -b tbinary.h5)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5DUMP-tbin1 PROPERTIES DEPENDS H5DUMP-clear-objects-tbin1)
- SET (last_test "H5DUMP-tbin1")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out1D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out1D.h5)
- SET_TESTS_PROPERTIES (H5DUMP-clear-out1D PROPERTIES DEPENDS H5DUMP-tbin1)
- ADD_TEST (NAME H5DUMP-h5import-out1D COMMAND h5import out1.bin -c tbin1.out -o out1D.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out1D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out1D PROPERTIES DEPENDS H5DUMP-clear-out1D)
- ADD_TEST (NAME H5DUMP-h5diff-out1D COMMAND h5diff tbinary.h5 out1D.h5 /integer /integer)
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1D PROPERTIES DEPENDS H5DUMP-h5import-out1D)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
+ ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b)
+
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out1.h5)
- SET_TESTS_PROPERTIES (H5DUMP-clear-out1 PROPERTIES DEPENDS H5DUMP-tbin1)
- 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/std")
- 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/std")
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1 PROPERTIES DEPENDS H5DUMP-h5import-out1)
+ ADD_TEST (NAME H5DUMP-tbin2-bin-clear-objects COMMAND ${CMAKE_COMMAND} -E remove out2.bin)
+ SET_TESTS_PROPERTIES (H5DUMP-tbin2-bin-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o out2.bin tbinary.h5)
+ SET_TESTS_PROPERTIES (H5DUMP-tbin2 PROPERTIES DEPENDS H5DUMP-tbin2-bin-clear-objects)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-objects-tbin2 COMMAND ${CMAKE_COMMAND} -E remove out2.bin)
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin2 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin2 PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o out2.bin tbinary.h5)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5DUMP-tbin2 PROPERTIES DEPENDS H5DUMP-clear-objects-tbin2)
- SET (last_test "H5DUMP-tbin2")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
# the NATIVE test can be validated with h5import/h5diff
- ADD_TEST (NAME H5DUMP-clear-objects-tbin3 COMMAND ${CMAKE_COMMAND} -E remove out3.bin)
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin3 PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin3 0 --enable-error-stack -d integer -o out3.bin -b NATIVE tbinary.h5)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5DUMP-tbin3 PROPERTIES DEPENDS H5DUMP-clear-objects-tbin3)
- SET (last_test "H5DUMP-tbin3")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out3D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out3D.h5)
- SET_TESTS_PROPERTIES (H5DUMP-clear-out3D PROPERTIES DEPENDS H5DUMP-tbin3)
- ADD_TEST (NAME H5DUMP-h5import-out3D COMMAND h5import out3.bin -c tbin3.out -o out3D.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out3D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out3D PROPERTIES DEPENDS H5DUMP-clear-out3D)
- ADD_TEST (NAME H5DUMP-h5diff-out3D COMMAND h5diff tbinary.h5 out3D.h5 /integer /integer -q)
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3D PROPERTIES DEPENDS H5DUMP-h5import-out3D)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
+ ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE)
+
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out3.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out3 PROPERTIES DEPENDS H5DUMP-tbin3)
- 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/std")
- 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/std")
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3 PROPERTIES DEPENDS H5DUMP-h5import-out3)
+ ADD_TEST (NAME H5DUMP-tbin4-bin-clear-objects COMMAND ${CMAKE_COMMAND} -E remove out4.bin)
+ SET_TESTS_PROPERTIES (H5DUMP-tbin4-bin-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o out4.bin tbinary.h5)
+ SET_TESTS_PROPERTIES (H5DUMP-tbin4 PROPERTIES DEPENDS H5DUMP-tbin4-bin-clear-objects)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-objects-tbin4 COMMAND ${CMAKE_COMMAND} -E remove out4.bin)
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin4 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects-tbin4 PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o out4.bin tbinary.h5)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5DUMP-tbin4 PROPERTIES DEPENDS H5DUMP-clear-objects-tbin4)
- SET (last_test "H5DUMP-tbin4")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
@@ -1793,10 +1775,10 @@ IF (BUILD_TESTING)
tpbitsUnsignedLongLong16.out.err
)
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP_PACKED_BITS-clearall-objects")
+ IF (NOT "${last_pbits_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
+ ENDIF (NOT "${last_pbits_test}" STREQUAL "")
+ SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# test failure handling
@@ -2014,9 +1996,9 @@ IF (BUILD_TESTING)
tvlstr.h5.out.err
)
SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ IF (NOT "${last_xml_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
+ ENDIF (NOT "${last_xml_test}" STREQUAL "")
SET (last_test "H5DUMP-XML-clearall-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index 6b4a6e6..4741683 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -240,6 +240,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -291,7 +292,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 235cb9f..97f7be9 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -128,31 +128,29 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
MACRO (ADD_H5_TEST testname importfile conffile testfile)
- 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 $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5IMPORT-${testname}")
-
- # If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # If using memchecker skip macro based tests
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5IMPORT-H5DMP-${testname}
+ NAME H5IMPORT-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${testfile}
+ ${testfile}.new
+ ${testfile}.new.err
+ ${testfile}.out
+ ${testfile}.out.err
+ )
+
+ ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects)
+
+ ADD_TEST (
+ NAME H5IMPORT-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${testfile}"
@@ -163,9 +161,9 @@ IF (BUILD_TESTING)
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-H5DMP-${testname} PROPERTIES DEPENDS H5IMPORT-${testname})
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname})
ADD_TEST (
- NAME H5IMPORT-H5DMP_CMP-${testname}
+ NAME H5IMPORT-${testname}-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=testfiles/${testfile}"
@@ -176,13 +174,12 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${testfile}.new"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-H5DMP_CMP-${testname} PROPERTIES DEPENDS H5IMPORT-H5DMP-${testname})
- SET (last_test "H5IMPORT-H5DMP_CMP-${testname}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST testname importfile conffile testfile)
MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
- # If using memchecker add tests without using scripts
+ # If using memchecker skip tests
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5IMPORT-DUMP-${testname}-clear-objects
@@ -197,13 +194,10 @@ IF (BUILD_TESTING)
d${testfile}.dff
d${testfile}.dff.err
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
IF ("${ARGN}" STREQUAL "BINARY")
ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-H5DUMP
+ NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;testfiles/${testfile}"
@@ -215,7 +209,7 @@ IF (BUILD_TESTING)
)
ELSE ("${ARGN}" STREQUAL "BINARY")
ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-H5DUMP
+ NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}"
@@ -226,7 +220,7 @@ IF (BUILD_TESTING)
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF ("${ARGN}" STREQUAL "BINARY")
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DUMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
ADD_TEST (
NAME H5IMPORT-DUMP-${testname}
@@ -239,10 +233,10 @@ IF (BUILD_TESTING)
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DUMP")
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP")
ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-H5DIFF
+ NAME H5IMPORT-DUMP-${testname}-H5DFF
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
-D "TEST_ARGS:STRING=-v;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
@@ -253,21 +247,17 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=testfiles/d${testfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DIFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
- SET (last_test "H5IMPORT-DUMP-${testname}-H5DIFF")
- ELSE (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile}"
- )
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile)
MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
- )
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
# --------------------------------------------------------------------
@@ -283,27 +273,171 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5IMPORT-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- binfp64.bin
- binin8.bin
- binin8w.bin
- binin16.bin
- binin32.bin
- binuin16.bin
- binuin32.bin
- ${HDF5_REFERENCE_TEST_FILES}
- )
- SET (last_test "H5IMPORT-clear-objects")
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5IMPORT-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ binfp64.bin
+ binin8.bin
+ binin8w.bin
+ binin16.bin
+ binin32.bin
+ binuin16.bin
+ binuin32.bin
+ txtin32.h5
+ txtin32.h5.new
+ txtin32.h5.new.err
+ txtin32.h5.out
+ txtin32.h5.out.err
+ txtin16.h5
+ txtin16.h5.new
+ txtin16.h5.new.err
+ txtin16.h5.out
+ txtin16.h5.out.err
+ txtin8.h5
+ txtin8.h5.new
+ txtin8.h5.new.err
+ txtin8.h5.out
+ txtin8.h5.out.err
+ txtuin16.h5
+ txtuin16.h5.new
+ txtuin16.h5.new.err
+ txtuin16.h5.out
+ txtuin16.h5.out.err
+ txtuin32.h5
+ txtuin32.h5.new
+ txtuin32.h5.new.err
+ txtuin32.h5.out
+ txtuin32.h5.out.err
+ txtfp32.h5
+ txtfp32.h5.new
+ txtfp32.h5.new.err
+ txtfp32.h5.out
+ txtfp32.h5.out.err
+ txtfp64.h5
+ txtfp64.h5.new
+ txtfp64.h5.new.err
+ txtfp64.h5.out
+ txtfp64.h5.out.err
+ binfp64.h5
+ binfp64.h5.new
+ binfp64.h5.new.err
+ binfp64.h5.out
+ binfp64.h5.out.err
+ binin8.h5
+ binin8.h5.new
+ binin8.h5.new.err
+ binin8.h5.out
+ binin8.h5.out.err
+ binin8w.h5
+ binin8w.h5.new
+ binin8w.h5.new.err
+ binin8w.h5.out
+ binin8w.h5.out.err
+ binin16.h5
+ binin16.h5.new
+ binin16.h5.new.err
+ binin16.h5.out
+ binin16.h5.out.err
+ binin32.h5
+ binin32.h5.new
+ binin32.h5.new.err
+ binin32.h5.out
+ binin32.h5.out.err
+ binuin16.h5
+ binuin16.h5.new
+ binuin16.h5.new.err
+ binuin16.h5.out
+ binuin16.h5.out.err
+ binuin32.h5
+ binuin32.h5.new
+ binuin32.h5.new.err
+ binuin32.h5.out
+ binuin32.h5.out.err
+ txtstr.h5
+ txtstr.h5.new
+ txtstr.h5.new.err
+ txtstr.h5.out
+ txtstr.h5.out.err
+ textpfe.h5
+ textpfe.h5.new
+ textpfe.h5.new.err
+ textpfe.h5.out
+ textpfe.h5.out.err
+ dbinfp64.h5
+ dbinfp64.h5.bin
+ dbinfp64.h5.imp
+ dbinfp64.h5.imp.err
+ dbinfp64.h5.dmp
+ dbinfp64.h5.dmp.err
+ dbinfp64.h5.dff
+ dbinfp64.h5.dff.err
+ dbinin8.h5
+ dbinin8.h5.bin
+ dbinin8.h5.imp
+ dbinin8.h5.imp.err
+ dbinin8.h5.dmp
+ dbinin8.h5.dmp.err
+ dbinin8.h5.dff
+ dbinin8.h5.dff.err
+ dbinin8w.h5
+ dbinin8w.h5.bin
+ dbinin8w.h5.imp
+ dbinin8w.h5.imp.err
+ dbinin8w.h5.dmp
+ dbinin8w.h5.dmp.err
+ dbinin8w.h5.dff
+ dbinin8w.h5.dff.err
+ dbinin16.h5
+ dbinin16.h5.bin
+ dbinin16.h5.imp
+ dbinin16.h5.imp.err
+ dbinin16.h5.dmp
+ dbinin16.h5.dmp.err
+ dbinin16.h5.dff
+ dbinin16.h5.dff.err
+ dbinin32.h5
+ dbinin32.h5.bin
+ dbinin32.h5.imp
+ dbinin32.h5.imp.err
+ dbinin32.h5.dmp
+ dbinin32.h5.dmp.err
+ dbinin32.h5.dff
+ dbinin32.h5.dff.err
+ dbinuin16.h5
+ dbinuin16.h5.bin
+ dbinuin16.h5.imp
+ dbinuin16.h5.imp.err
+ dbinuin16.h5.dmp
+ dbinuin16.h5.dmp.err
+ dbinuin16.h5.dff
+ dbinuin16.h5.dff.err
+ dbinuin32.h5
+ dbinuin32.h5.bin
+ dbinuin32.h5.imp
+ dbinuin32.h5.imp.err
+ dbinuin32.h5.dmp
+ dbinuin32.h5.dmp.err
+ dbinuin32.h5.dff
+ dbinuin32.h5.dff.err
+ dtxtstr.h5
+ dtxtstr.h5.bin
+ dtxtstr.h5.imp
+ dtxtstr.h5.imp.err
+ dtxtstr.h5.dmp
+ dtxtstr.h5.dmp.err
+ dtxtstr.h5.dff
+ dtxtstr.h5.dff.err
+ )
+ SET (last_test "H5IMPORT-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5IMPORT-h5importtest")
# ----- TESTING "ASCII I32 rank 3 - Output BE " ;
ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index 16e8901..9ad2341 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -234,6 +234,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -285,7 +286,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 437fed3..95777b3 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -112,6 +112,13 @@ IF (BUILD_TESTING)
ENDIF (NOT "${resultcode}" STREQUAL "0")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
+ NAME H5JAM-${expectfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${expectfile}.out
+ ${expectfile}.out.err
+ )
+ ADD_TEST (
NAME H5JAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5jam>"
@@ -122,6 +129,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
+ SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (TEST_H5JAM_OUTPUT)
@@ -138,6 +146,13 @@ IF (BUILD_TESTING)
ENDIF (NOT "${resultcode}" STREQUAL "0")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
+ NAME H5JAM-UNJAM-${expectfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${expectfile}.out
+ ${expectfile}.out.err
+ )
+ ADD_TEST (
NAME H5JAM-UNJAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
@@ -148,50 +163,38 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
+ SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (TEST_H5UNJAM_OUTPUT)
- MACRO (CLEANUP testname)
- ADD_TEST (
- NAME H5JAM-CLEANUP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${ARGN}
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-CLEANUP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5JAM-CLEANUP-${testname}-clear-objects")
- ENDMACRO(CLEANUP testname testfile)
-
- MACRO (CHECKFILE testname expected actual)
+ MACRO (CHECKFILE testname testdepends expected actual)
# If using memchecker add tests without using scripts
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5JAM-CHECKFILE-${testname}-clear-objects
+ NAME H5JAM-${testname}-CHECKFILE-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- ${expected}.new
- ${expected}.new.err
+ ${actual}.new
+ ${actual}.new.err
${actual}.out
${actual}.out.err
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends})
ADD_TEST (
- NAME H5JAM-CHECKFILE-H5DMP-${testname}
+ NAME H5JAM-${testname}-CHECKFILE-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=testfiles/${expected}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${expected}.new"
+ -D "TEST_OUTPUT=${actual}.new"
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-H5DMP-${testname} PROPERTIES DEPENDS H5JAM-CHECKFILE-${testname}-clear-objects)
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
ADD_TEST (
- NAME H5JAM-CHECKFILE-H5DMP_CMP-${testname}
+ NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${actual}"
@@ -199,168 +202,210 @@ IF (BUILD_TESTING)
-D "TEST_OUTPUT=${actual}.out"
-D "TEST_EXPECT=0"
-D "TEST_FILTER=(^(HDF5)[^\n]*)"
- -D "TEST_REFERENCE=${expected}.new"
+ -D "TEST_REFERENCE=${actual}.new"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-H5DMP_CMP-${testname} PROPERTIES DEPENDS H5JAM-CHECKFILE-H5DMP-${testname})
- SET (last_test "H5JAM-CHECKFILE-H5DMP_CMP-${testname}")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(CHECKFILE testname expected actual)
-
- MACRO (SETUP testname infile outfile)
- ADD_TEST (
- NAME H5JAM-SETUP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-SETUP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
- NAME H5JAM-SETUP-${testname}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${infile} ${PROJECT_BINARY_DIR}/${outfile}
- )
- SET_TESTS_PROPERTIES (H5JAM-SETUP-${testname} PROPERTIES DEPENDS H5JAM-SETUP-${testname}-clear-objects)
- SET (last_test "H5JAM-SETUP-${testname}")
- ENDMACRO(SETUP testname infile outfile)
+ ENDMACRO(CHECKFILE testname testdepends expected actual)
- MACRO (CHECK_UB_1 testname testfile ufile)
+ MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5JAM-CHECK_UB_1-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${testfile}.len.txt
- ${testfile}.cmp
- ${ufile}.cmp
+ NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${infile}
+ )
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-SETUP
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects)
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-CHECK_UB_1-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
+ IF (NOT "${ufile}" STREQUAL "NONE")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM_D-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
+ SET (compare_test ${ufile})
+ ELSE (NOT "${ufile}" STREQUAL "NONE")
+ IF (NOT "${ARGN}" STREQUAL "--delete")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM_D-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
+ -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${outfile}.ufile.txt"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
+ SET (compare_test "${outfile}.ufile.txt")
+ ELSE (NOT "${ARGN}" STREQUAL "--delete")
+ ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ SET (compare_test "")
+ ENDIF (NOT "${ARGN}" STREQUAL "--delete")
+ ENDIF (NOT "${ufile}" STREQUAL "NONE")
+ IF (NOT "${compare_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${infile}.len.txt
+ ${infile}.cmp
+ ${infile}-ub.cmp
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-CHECK_UB_1
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
+ -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
+ -D "TEST_CHECKUB=YES"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_HFILE=${infile}"
+ -D "TEST_UFILE=${compare_test}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OFILE="
+ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
+ ENDIF (NOT "${compare_test}" STREQUAL "")
+
ADD_TEST (
- NAME H5JAM-CHECK_UB_1-${testname}
+ NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
-D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
- -D "TEST_CHECKUB=YES"
+ -D "TEST_CHECKUB=NO"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_HFILE=${testfile}"
- -D "TEST_UFILE=${ufile}"
+ -D "TEST_HFILE=${outfile}"
-D "TEST_EXPECT=0"
- -D "TEST_OFILE=${ARGN}"
+ -D "TEST_UFILE=NULL"
+ -D "TEST_OFILE=NULL"
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-CHECK_UB_1-${testname} PROPERTIES DEPENDS H5JAM-CHECK_UB_1-${testname}-clear-objects)
- SET (last_test "H5JAM-CHECK_UB_1-${testname}")
+ IF (NOT "${compare_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
+ ELSE (NOT "${compare_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
+ ENDIF (NOT "${compare_test}" STREQUAL "")
+
+ CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(CHECK_UB_1 testname testfile ufile)
+ ENDMACRO(UNJAMTEST testname infile ufile outfile)
- MACRO (CHECK_NOUB testname testfile)
+ MACRO (JAMTEST testname jamfile infile chkfile outfile)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5JAM-CHECK_NOUB-${testname}
+ NAME H5JAM-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
+ SET (compare_test ${outfile})
+ SET (compare_orig testfiles/${infile})
+ IF ("${ARGN}" STREQUAL "--clobber")
+ SET (compare_orig "")
+ ENDIF ("${ARGN}" STREQUAL "--clobber")
+
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${compare_test}.len.txt
+ ${compare_test}.cmp
+ ${compare_test}-ub.cmp
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}")
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECK_UB_1
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
-D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
- -D "TEST_CHECKUB=NO"
+ -D "TEST_CHECKUB=YES"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_HFILE=${testfile}"
+ -D "TEST_HFILE=${compare_test}"
+ -D "TEST_UFILE=testfiles/${jamfile}"
-D "TEST_EXPECT=0"
- -D "TEST_UFILE=NULL"
- -D "TEST_OFILE=NULL"
+ -D "TEST_OFILE=${compare_orig}"
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-CHECK_NOUB-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5JAM-CHECK_NOUB-${testname}")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
+ CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile})
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(CHECK_NOUB testname testfile)
+ ENDMACRO (JAMTEST testname jamfile infile outfile)
- MACRO (UNJAMTEST testname infile ufile outfile)
- ADD_TEST (
- NAME H5JAM-UNJAM-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- IF (NOT "${ufile}" STREQUAL "NONE")
+ MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5JAM-UNJAM_D-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
+ NAME H5JAM-${testname}_NONE-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${chkfile} ${chkfile}.cpy.h5
)
- SET_TESTS_PROPERTIES (H5JAM-UNJAM_D-${testname}-clear-objects PROPERTIES DEPENDS H5JAM-UNJAM-${testname}-clear-objects)
- ADD_TEST (NAME H5JAM-UNJAM-${testname} COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${testname} PROPERTIES DEPENDS H5JAM-UNJAM_D-${testname}-clear-objects)
- SET (compare_test ${ufile})
- ELSE (NOT "${ufile}" STREQUAL "NONE")
- IF (NOT "${ARGN}" STREQUAL "--delete")
- ADD_TEST (
- NAME H5JAM-UNJAM_D-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
- )
- SET_TESTS_PROPERTIES (H5JAM-UNJAM_D-${testname}-clear-objects PROPERTIES DEPENDS H5JAM-UNJAM-${testname}-clear-objects)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-UNJAM-${testname} COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-UNJAM-${testname}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
- -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${outfile}.ufile.txt"
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${testname} PROPERTIES DEPENDS H5JAM-UNJAM_D-${testname}-clear-objects)
- SET (compare_test "${outfile}.ufile.txt")
- ELSE (NOT "${ARGN}" STREQUAL "--delete")
- ADD_TEST (NAME H5JAM-UNJAM-${testname} COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${testname} PROPERTIES DEPENDS H5JAM-UNJAM-${testname}-clear-objects)
- SET (compare_test "")
- ENDIF (NOT "${ARGN}" STREQUAL "--delete")
- ENDIF (NOT "${ufile}" STREQUAL "NONE")
- SET (last_test "H5JAM-UNJAM-${testname}")
- IF (NOT "${compare_test}" STREQUAL "")
- CHECK_UB_1 (${testname} ${infile} ${compare_test})
- ENDIF (NOT "${compare_test}" STREQUAL "")
- CHECK_NOUB (${testname} ${outfile})
- ENDMACRO(UNJAMTEST testname infile ufile outfile)
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-SETUP
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects)
- MACRO (JAMTEST testname jamfile infile outfile)
- ADD_TEST (
- NAME H5JAM-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5JAM-${testname}-clear-objects")
- IF ("${outfile}" STREQUAL "NONE")
ADD_TEST (
- NAME H5JAM-NONE_COPY-${testname}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${infile} ${infile}.cpy.h5
+ NAME H5JAM-${testname}_NONE_COPY
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5
)
- SET_TESTS_PROPERTIES (H5JAM-NONE_COPY-${testname} PROPERTIES DEPENDS ${last_test})
- SET (last_test "H5JAM-NONE_COPY-${testname}")
- ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${infile} ${ARGN})
- SET (compare_test ${infile})
- SET (compare_orig ${infile}.cpy.h5)
- ELSE ("${outfile}" STREQUAL "NONE")
- ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
- SET (compare_test ${outfile})
- SET (compare_orig testfiles/${infile})
- ENDIF ("${outfile}" STREQUAL "NONE")
- SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS ${last_test})
- SET (last_test "H5JAM-${testname}")
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
- CHECK_UB_1 (${testname} ${compare_test} testfiles/${jamfile} ${compare_orig})
- ENDMACRO (JAMTEST testname jamfile infile outfile)
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
+
+ ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
+
+ SET (compare_test ${chkfile})
+ SET (compare_orig ${chkfile}.cpy.h5)
+ IF ("${ARGN}" STREQUAL "--clobber")
+ SET (compare_orig "")
+ ENDIF ("${ARGN}" STREQUAL "--clobber")
+
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${compare_test}.len.txt
+ ${compare_test}.cmp
+ ${compare_test}-ub.cmp
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE")
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-CHECK_UB_1
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
+ -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
+ -D "TEST_CHECKUB=YES"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_HFILE=${compare_test}"
+ -D "TEST_UFILE=testfiles/${jamfile}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OFILE=${compare_orig}"
+ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
+ CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
##############################################################################
##############################################################################
@@ -377,118 +422,45 @@ IF (BUILD_TESTING)
# don't allow HDF5 format file as an user block file
TEST_H5JAM_OUTPUT(h5jam-ub-nohdf5 1 -i testfiles/tall.h5 -u testfiles/tall.h5 -o tall-tmp.h5)
- JAMTEST (tall_u10 u10.txt tall.h5 ta2.h5)
- CHECKFILE (tall_u10 tall.h5 ta2.h5)
-# CLEANUP (tall_u10 ta2.h5)
- JAMTEST (tall_u511 u511.txt tall.h5 ta3.h5)
- CHECKFILE (tall_u511 tall.h5 ta3.h5)
-# CLEANUP (tall_u511 ta3.h5)
- JAMTEST (tall_u512 u512.txt tall.h5 ta4.h5)
- CHECKFILE (tall_u512 tall.h5 ta4.h5)
-# CLEANUP (tall_u512 ta4.h5)
- JAMTEST (tall_u513 u513.txt tall.h5 ta5.h5)
- CHECKFILE (tall_u513 tall.h5 ta5.h5)
-# CLEANUP (tall_u513 ta5.h5)
-
- SETUP (ta_u10 tall.h5 ta.h5)
- JAMTEST (ta_u10 u10.txt ta.h5 NONE)
- CHECKFILE (ta_u10 tall.h5 ta.h5)
- SETUP (ta_u511 tall.h5 ta.h5 NOCLEAN)
- JAMTEST (ta_u511 u511.txt ta.h5 NONE)
- CHECKFILE (ta_u511 tall.h5 ta.h5)
- SETUP (ta_u512 tall.h5 ta.h5 NOCLEAN)
- JAMTEST (ta_u512 u512.txt ta.h5 NONE)
- CHECKFILE (ta_u512 tall.h5 ta.h5)
- SETUP (ta_u513 tall.h5 ta.h5 NOCLEAN)
- JAMTEST (ta_u513 u513.txt ta.h5 NONE)
- CHECKFILE (ta_u513 tall.h5 ta.h5)
-# CLEANUP (ta ta.h5)
-
- JAMTEST (twithub_u10 u10.txt twithub.h5 tax2.h5)
- CHECKFILE (twithub_u10 tall.h5 tax2.h5)
-# CLEANUP (twithub_u10 tax2.h5)
- JAMTEST (twithub_u511 u511.txt twithub.h5 tax3.h5)
- CHECKFILE (twithub_u511 tall.h5 tax3.h5)
-# CLEANUP (twithub_u511 tax3.h5)
- JAMTEST (twithub_u512 u512.txt twithub.h5 tax4.h5)
- CHECKFILE (twithub_u512 tall.h5 tax4.h5)
-# CLEANUP (twithub_u512 tax4.h5)
- JAMTEST (twithub_u513 u513.txt twithub.h5 tax5.h5)
- CHECKFILE (twithub_u513 tall.h5 tax5.h5)
-# CLEANUP (twithub_u513 tax5.h5)
-
- JAMTEST (twithub513_u10 u10.txt twithub513.h5 tax6.h5)
- CHECKFILE (twithub513_u10 tall.h5 tax6.h5)
-# CLEANUP (twithub513_u10 tax6.h5)
- JAMTEST (twithub513_u511 u511.txt twithub513.h5 tax7.h5)
- CHECKFILE (twithub513_u511 tall.h5 tax7.h5)
-# CLEANUP (twithub513_u511 tax7.h5)
- JAMTEST (twithub513_u512 u512.txt twithub513.h5 tax8.h5)
- CHECKFILE (twithub513_u512 tall.h5 tax8.h5)
-# CLEANUP (twithub513_u512 tax8.h5)
- JAMTEST (twithub513_u513 u513.txt twithub513.h5 tax9.h5)
- CHECKFILE (twithub513_u513 tall.h5 tax9.h5)
-# CLEANUP (twithub513_u513 tax9.h5)
-
- JAMTEST (twithub_u10_c u10.txt twithub.h5 taz2.h5 --clobber)
- CHECKFILE (twithub_u10_c tall.h5 taz2.h5)
-# CLEANUP (twithub_u10_c taz2.h5)
- JAMTEST (twithub_u511_c u511.txt twithub.h5 taz3.h5 --clobber)
- CHECKFILE (twithub_u511_c tall.h5 taz3.h5)
-# CLEANUP (twithub_u511_c taz3.h5)
- JAMTEST (twithub_u512_c u512.txt twithub.h5 taz4.h5 --clobber)
- CHECKFILE (twithub_u512_c tall.h5 taz4.h5)
-# CLEANUP (twithub_u512_c taz4.h5)
- JAMTEST (twithub_u513_c u513.txt twithub.h5 taz5.h5 --clobber)
- CHECKFILE (twithub_u513_c tall.h5 taz5.h5)
-# CLEANUP (twithub_u513_c taz5.h5)
-
- JAMTEST (twithub513_u10_c u10.txt twithub513.h5 taz6.h5 --clobber)
- CHECKFILE (twithub513_u10_c tall.h5 taz6.h5)
-# CLEANUP (twithub513_u10_c taz6.h5)
- JAMTEST (twithub513_u511_c u511.txt twithub513.h5 taz7.h5 --clobber)
- CHECKFILE (twithub513_u511_c tall.h5 taz7.h5)
-# CLEANUP (twithub513_u511_c taz7.h5)
- JAMTEST (twithub513_u512_c u512.txt twithub513.h5 taz8.h5 --clobber)
- CHECKFILE (twithub513_u512_c tall.h5 taz8.h5)
-# CLEANUP (twithub513_u512_c taz8.h5)
- JAMTEST (twithub513_u513_c u513.txt twithub513.h5 taz9.h5 --clobber)
- CHECKFILE (twithub513_u513_c tall.h5 taz9.h5)
-# CLEANUP (twithub513_u513_c taz9.h5)
-
- SETUP (N_twithub_u10_c twithub.h5 tay2.h5)
- JAMTEST (N_twithub_u10_c u10.txt tay2.h5 NONE --clobber)
- CHECKFILE (N_twithub_u10_c tall.h5 tay2.h5)
-# CLEANUP (N_twithub_u10_c tay2.h5)
- SETUP (N_twithub_u511_c twithub.h5 tay3.h5)
- JAMTEST (N_twithub_u511_c u511.txt tay3.h5 NONE --clobber)
- CHECKFILE (N_twithub_u511_c tall.h5 tay3.h5)
-# CLEANUP (N_twithub_u511_c tay3.h5)
- SETUP (N_twithub_u512_c twithub.h5 tay4.h5)
- JAMTEST (N_twithub_u512_c u512.txt tay4.h5 NONE --clobber)
- CHECKFILE (N_twithub_u512_c tall.h5 tay4.h5)
-# CLEANUP (N_twithub_u512_c tay4.h5)
- SETUP (N_twithub_u513_c twithub.h5 tay5.h5)
- JAMTEST (N_twithub_u513_c u513.txt tay5.h5 NONE --clobber)
- CHECKFILE (N_twithub_u513_c tall.h5 tay5.h5)
-# CLEANUP (N_twithub_u513_c tay5.h5)
-
- SETUP (N_twithub513_u10_c twithub513.h5 tay6.h5)
- JAMTEST (N_twithub513_u10_c u10.txt tay6.h5 NONE --clobber)
- CHECKFILE (N_twithub513_u10_c tall.h5 tay6.h5)
-# CLEANUP (N_twithub513_u10_c tay6.h5)
- SETUP (N_twithub513_u511_c twithub513.h5 tay7.h5)
- JAMTEST (N_twithub513_u511_c u511.txt tay7.h5 NONE --clobber)
- CHECKFILE (N_twithub513_u511_c tall.h5 tay7.h5)
-# CLEANUP (N_twithub513_u511_c tay7.h5)
- SETUP (N_twithub513_u512_c twithub513.h5 tay8.h5)
- JAMTEST (N_twithub513_u512_c u512.txt tay8.h5 NONE --clobber)
- CHECKFILE (N_twithub513_u512_c tall.h5 tay8.h5)
-# CLEANUP (N_twithub513_u512_c tay8.h5)
- SETUP (N_twithub513_u513_c twithub513.h5 tay9.h5)
- JAMTEST (N_twithub513_u513_c u513.txt tay9.h5 NONE --clobber)
- CHECKFILE (N_twithub513_u513_c tall.h5 tay9.h5)
-# CLEANUP (N_twithub513_u513_c tay9.h5)
+ JAMTEST (tall_u10 u10.txt tall.h5 tall.h5 ta2.h5)
+ JAMTEST (tall_u511 u511.txt tall.h5 tall.h5 ta3.h5)
+ JAMTEST (tall_u512 u512.txt tall.h5 tall.h5 ta4.h5)
+ JAMTEST (tall_u513 u513.txt tall.h5 tall.h5 ta5.h5)
+
+ JAMTEST_NONE (N_ta_u10 u10.txt tall.h5 tall.h5 ta6.h5)
+ JAMTEST_NONE (N_ta_u511 u511.txt tall.h5 tall.h5 ta7.h5)
+ JAMTEST_NONE (N_ta_u512 u512.txt tall.h5 tall.h5 ta8.h5)
+ JAMTEST_NONE (N_ta_u513 u513.txt tall.h5 tall.h5 ta9.h5)
+
+ JAMTEST (twithub_u10 u10.txt twithub.h5 tall.h5 tax2.h5)
+ JAMTEST (twithub_u511 u511.txt twithub.h5 tall.h5 tax3.h5)
+ JAMTEST (twithub_u512 u512.txt twithub.h5 tall.h5 tax4.h5)
+ JAMTEST (twithub_u513 u513.txt twithub.h5 tall.h5 tax5.h5)
+
+ JAMTEST (twithub513_u10 u10.txt twithub513.h5 tall.h5 tax6.h5)
+ JAMTEST (twithub513_u511 u511.txt twithub513.h5 tall.h5 tax7.h5)
+ JAMTEST (twithub513_u512 u512.txt twithub513.h5 tall.h5 tax8.h5)
+ JAMTEST (twithub513_u513 u513.txt twithub513.h5 tall.h5 tax9.h5)
+
+ JAMTEST (twithub_u10_c u10.txt twithub.h5 tall.h5 taz2.h5 --clobber)
+ JAMTEST (twithub_u511_c u511.txt twithub.h5 tall.h5 taz3.h5 --clobber)
+ JAMTEST (twithub_u512_c u512.txt twithub.h5 tall.h5 taz4.h5 --clobber)
+ JAMTEST (twithub_u513_c u513.txt twithub.h5 tall.h5 taz5.h5 --clobber)
+
+ JAMTEST (twithub513_u10_c u10.txt twithub513.h5 tall.h5 taz6.h5 --clobber)
+ JAMTEST (twithub513_u511_c u511.txt twithub513.h5 tall.h5 taz7.h5 --clobber)
+ JAMTEST (twithub513_u512_c u512.txt twithub513.h5 tall.h5 taz8.h5 --clobber)
+ JAMTEST (twithub513_u513_c u513.txt twithub513.h5 tall.h5 taz9.h5 --clobber)
+
+ JAMTEST_NONE (N_twithub_u10_c u10.txt tall.h5 twithub.h5 tay2.h5 --clobber)
+ JAMTEST_NONE (N_twithub_u511_c u511.txt tall.h5 twithub.h5 tay3.h5 --clobber)
+ JAMTEST_NONE (N_twithub_u512_c u512.txt tall.h5 twithub.h5 tay4.h5 --clobber)
+ JAMTEST_NONE (N_twithub_u513_c u513.txt tall.h5 twithub.h5 tay5.h5 --clobber)
+
+ JAMTEST_NONE (N_twithub513_u10_c u10.txt tall.h5 twithub513.h5 tay6.h5 --clobber)
+ JAMTEST_NONE (N_twithub513_u511_c u511.txt tall.h5 twithub513.h5 tay7.h5 --clobber)
+ JAMTEST_NONE (N_twithub513_u512_c u512.txt tall.h5 twithub513.h5 tay8.h5 --clobber)
+ JAMTEST_NONE (N_twithub513_u513_c u513.txt tall.h5 twithub513.h5 tay9.h5 --clobber)
#-------------------------------
# Testing h5unjam
@@ -496,32 +468,14 @@ IF (BUILD_TESTING)
# help page
TEST_H5UNJAM_OUTPUT(h5unjam-help 0 -h)
- SETUP (twithub_tall twithub.h5 tai1.h5)
- UNJAMTEST (twithub_tall tai1.h5 o10.txt taa1.h5)
- CHECKFILE (twithub_tall tall.h5 taa1.h5)
-# CLEANUP (twithub_tall taa1.h5 tai1.h5 o10.txt)
- SETUP (twithub513_tall twithub513.h5 tai2.h5)
- UNJAMTEST (twithub513_tall tai2.h5 o512.txt taa2.h5)
- CHECKFILE (twithub513_tall tall.h5 taa2.h5)
-# CLEANUP (twithub513_tall taa2.h5 tai2.h5 o512.txt)
-
- SETUP (N_twithub_tall twithub.h5 tai3.h5)
- UNJAMTEST (N_twithub_tall tai3.h5 NONE taa3.h5)
- CHECKFILE (N_twithub_tall tall.h5 taa3.h5)
-# CLEANUP (N_twithub_tall taa3.h5 tai3.h5)
- SETUP (N_twithub513_tall twithub513.h5 tai4.h5)
- UNJAMTEST (N_twithub513_tall tai4.h5 NONE taa4.h5)
- CHECKFILE (N_twithub513_tall tall.h5 taa4.h5)
-# CLEANUP (N_twithub513_tall taa4.h5 tai4.h5)
-
- SETUP (D_twithub_tall twithub.h5 taj2.h5)
- UNJAMTEST (D_twithub_tall taj2.h5 NONE tac2.h5 --delete)
- CHECKFILE (D_twithub_tall tall.h5 tac2.h5)
-# CLEANUP (D_twithub_tall tac2.h5 taj2.h5)
- SETUP (D_twithub513_tall twithub513.h5 taj3.h5)
- UNJAMTEST (D_twithub513_tall taj3.h5 NONE tac3.h5 --delete)
- CHECKFILE (D_twithub513_tall tall.h5 tac3.h5)
-# CLEANUP (D_twithub513_tall tac3.h5 taj3.h5)
+ UNJAMTEST (twithub_tall twithub.h5 tai1.h5 o10.txt tall.h5 taa1.h5)
+ UNJAMTEST (twithub513_tall twithub513.h5 tai2.h5 o512.txt tall.h5 taa2.h5)
+
+ UNJAMTEST (N_twithub_tall twithub.h5 tai3.h5 NONE tall.h5 taa3.h5)
+ UNJAMTEST (N_twithub513_tall twithub513.h5 tai4.h5 NONE tall.h5 taa4.h5)
+
+ UNJAMTEST (D_twithub_tall twithub.h5 taj2.h5 NONE tall.h5 tac2.h5 --delete)
+ UNJAMTEST (D_twithub513_tall twithub513.h5 taj3.h5 NONE tall.h5 tac3.h5 --delete)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index ff8b089..fd170fd 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -248,6 +248,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -299,7 +300,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in
index b2c6bec..86edbee 100644
--- a/tools/h5jam/testh5jam.sh.in
+++ b/tools/h5jam/testh5jam.sh.in
@@ -377,7 +377,7 @@ JAMTEST() {
compare_orig="xxofile.h5"
cleanup="$cleanup $compare_orig"
else
- # output goes to $4, compare ofile to ubfile
+ # output goes to $3, compare ofile to ubfile
ofile="$3"
compare_test="$ofile"
compare_orig="$ifile"
@@ -539,19 +539,22 @@ JAMTEST $TESTDIR/u513.txt $TESTDIR/tall.h5 ta5.h5
CHECKFILE $TESTDIR/tall.h5 ta5.h5
CLEANUP ta5.h5
-SETUP $TESTDIR/tall.h5 ta.h5
-JAMTEST $TESTDIR/u10.txt ta.h5
-CHECKFILE $TESTDIR/tall.h5 ta.h5
-SETUP $TESTDIR/tall.h5 ta.h5
-JAMTEST $TESTDIR/u511.txt ta.h5
-CHECKFILE $TESTDIR/tall.h5 ta.h5
-SETUP $TESTDIR/tall.h5 ta.h5
-JAMTEST $TESTDIR/u512.txt ta.h5
-CHECKFILE $TESTDIR/tall.h5 ta.h5
-SETUP $TESTDIR/tall.h5 ta.h5
-JAMTEST $TESTDIR/u513.txt ta.h5
-CHECKFILE $TESTDIR/tall.h5 ta.h5
-CLEANUP ta.h5
+SETUP $TESTDIR/tall.h5 ta6.h5
+JAMTEST $TESTDIR/u10.txt ta6.h5
+CHECKFILE $TESTDIR/tall.h5 ta6.h5
+CLEANUP ta6.h5
+SETUP $TESTDIR/tall.h5 ta7.h5
+JAMTEST $TESTDIR/u511.txt ta7.h5
+CHECKFILE $TESTDIR/tall.h5 ta7.h5
+CLEANUP ta7.h5
+SETUP $TESTDIR/tall.h5 ta8.h5
+JAMTEST $TESTDIR/u512.txt ta8.h5
+CHECKFILE $TESTDIR/tall.h5 ta8.h5
+CLEANUP ta8.h5
+SETUP $TESTDIR/tall.h5 ta9.h5
+JAMTEST $TESTDIR/u513.txt ta9.h5
+CHECKFILE $TESTDIR/tall.h5 ta9.h5
+CLEANUP ta9.h5
JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 tax2.h5
CHECKFILE $TESTDIR/tall.h5 tax2.h5
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 5cce6cb..70943b5 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -145,10 +145,9 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5LS-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5LS-clear-${resultfile}-objects
+ NAME H5LS-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
)
@@ -163,7 +162,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${resultfile}.ls"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 7aa4329..1861b03 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -228,6 +228,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -279,7 +280,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 7166357..156f6d8 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -150,24 +150,23 @@ IF (BUILD_TESTING)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5REPACK-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}"
+ NAME H5REPACK_OLD-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ELSE (${testtype} STREQUAL "SKIP")
ADD_TEST (
- NAME H5REPACK-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}
+ NAME H5REPACK_OLD-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
ADD_TEST (
- NAME H5REPACK-DIFF_${testname}
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}
+ NAME H5REPACK_OLD-${testname}_DFF
+ COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- SET_TESTS_PROPERTIES (H5REPACK-DIFF_${testname} PROPERTIES DEPENDS H5REPACK-${testname})
- SET (last_test "H5REPACK-DIFF_${testname}")
+ SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname})
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST_OLD)
@@ -176,23 +175,22 @@ IF (BUILD_TESTING)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}"
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ELSE (${testtype} STREQUAL "SKIP")
ADD_TEST (
NAME H5REPACK-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
ADD_TEST (
- NAME H5REPACK-DIFF_${testname}
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}
+ NAME H5REPACK-${testname}_DFF
+ COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- SET_TESTS_PROPERTIES (H5REPACK-DIFF_${testname} PROPERTIES DEPENDS H5REPACK-${testname})
- SET (last_test "H5REPACK-DIFF_${testname}")
+ SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST)
@@ -200,22 +198,22 @@ IF (BUILD_TESTING)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5REPACK-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}"
+ NAME H5REPACK_CMP-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ELSE (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out.${resultfile})
+ ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5REPACK-${testname}
+ NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
- -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out.${resultfile}"
+ -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${resultfile}.out"
+ -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
@@ -223,9 +221,8 @@ IF (BUILD_TESTING)
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-${testname}")
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
@@ -234,28 +231,37 @@ IF (BUILD_TESTING)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}"
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ELSE (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
+ COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
IF (${resultcode} STREQUAL "0")
ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out.${testfile}"
+ -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${testfile}-v.out"
+ -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK_VERIFY_LAYOUT-${testname}")
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
ELSE (${resultcode} STREQUAL "0")
IF (${testfilter} STREQUAL "CHUNKED")
SET (nottestfilter "(CONTIGUOUS|COMPACT)")
@@ -267,21 +273,18 @@ IF (BUILD_TESTING)
SET (nottestfilter "(CONTIGUOUS|CHUNK)")
ENDIF (${testfilter} STREQUAL "COMPACT")
ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT_ALL-${testname}
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-pH;testfiles/out.${testfile}"
+ -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${testfile}-v.out"
+ -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${nottestfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT_ALL-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK_VERIFY_LAYOUT_ALL-${testname}")
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
ENDIF (${resultcode} STREQUAL "0")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDIF (${testtype} STREQUAL "SKIP")
@@ -289,25 +292,21 @@ IF (BUILD_TESTING)
MACRO (ADD_H5_TEST_META testname testfile)
ADD_TEST (
- NAME H5REPACK-${testname}_N
- COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out_N.${testname}.h5
+ NAME H5REPACK_META-${testname}_N
+ COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname}_N PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
ADD_TEST (
- NAME H5REPACK-${testname}_M
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out_M.${testname}.h5
+ NAME H5REPACK_META-${testname}_M
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname}_M PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (NAME H5REPACK-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out_M.${testname}.h5)
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES WILL_FAIL "true")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-${testname}")
+ SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_M PROPERTIES DEPENDS H5REPACK_META-${testname}_N)
+
+ ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
+ SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true")
+ SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
ENDMACRO (ADD_H5_TEST_META)
##############################################################################
@@ -316,43 +315,158 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # --------------------------------------------------------------------
+ # test file names
+ # --------------------------------------------------------------------
+ SET (INFO_FILE testfiles/h5repack.info)
+
+ SET (FILE0 h5repack_fill.h5)
+ SET (FILE1 h5repack_objs.h5)
+ SET (FILE2 h5repack_attr.h5)
+ SET (FILE3 h5repack_hlink.h5)
+ SET (FILE4 h5repack_layout.h5)
+ SET (FILE5 h5repack_early.h5)
+ SET (FILE7 h5repack_szip.h5)
+ SET (FILE8 h5repack_deflate.h5)
+ SET (FILE9 h5repack_shuffle.h5)
+ SET (FILE10 h5repack_fletcher.h5)
+ SET (FILE11 h5repack_filters.h5)
+ SET (FILE12 h5repack_nbit.h5)
+ SET (FILE13 h5repack_soffset.h5)
+ SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
+ SET (FILE15 h5repack_named_dtypes.h5)
+ SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
+ SET (FILE18 h5repack_layout2.h5)
+ SET (FILE_REF h5repack_refs.h5)
+ SET (FILE_ATTR_REF h5repack_attr_refs.h5)
+
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5REPACK-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- ./testfiles/h5repack_filters.h5.out
- ./testfiles/h5repack_filters.h5.out.err
- ./testfiles/h5repack_layout.h5-v.out
- ./testfiles/h5repack_layout.h5-v.out.err
- ./testfiles/h5repack_layout2.h5-v.out
- ./testfiles/h5repack_layout2.h5-v.out.err
- ./testfiles/h5repack_layout3.h5-v.out
- ./testfiles/h5repack_layout3.h5-v.out.err
- ./testfiles/out.tfamily%05d.h5
- ./testfiles/out.h5diff_attr1.h5
- ./testfiles/out.h5repack_attr.h5
- ./testfiles/out.h5repack_attr_refs.h5
- ./testfiles/out.h5repack_deflate.h5
- ./testfiles/out.h5repack_early.h5
- ./testfiles/out.h5repack_fill.h5
- ./testfiles/out.h5repack_filters.h5
- ./testfiles/out.h5repack_fletcher.h5
- ./testfiles/out.h5repack_hlink.h5
- ./testfiles/out.h5repack_layout.h5
- ./testfiles/out.h5repack_layouto.h5
- ./testfiles/out.h5repack_layout2.h5
- ./testfiles/out.h5repack_layout3.h5
- ./testfiles/out.h5repack_named_dtypes.h5
- ./testfiles/out.h5repack_nbit.h5
- ./testfiles/out.h5repack_objs.h5
- ./testfiles/out.h5repack_refs.h5
- ./testfiles/out.h5repack_shuffle.h5
- ./testfiles/out.h5repack_soffset.h5
- ./testfiles/out_M.meta_short.h5
- ./testfiles/out_N.meta_short.h5
- ./testfiles/out_M.meta_long.h5
- ./testfiles/out_N.meta_long.h5
+ ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out
+ ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err
+ ./testfiles/h5repack_layout.h5-chunk_18x13-v.out
+ ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err
+ ./testfiles/h5repack_layout.h5-chunk_20x10-v.out
+ ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err
+ ./testfiles/h5repack_layout.h5-chunk_compa-v.out
+ ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-chunk_conti-v.out
+ ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-compa-v.out
+ ./testfiles/h5repack_layout.h5-compa-v.out.err
+ ./testfiles/h5repack_layout.h5-conti-v.out
+ ./testfiles/h5repack_layout.h5-conti-v.out.err
+ ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out
+ ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err
+ ./testfiles/h5repack_layout.h5-dset2_compa-v.out
+ ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-dset2_conti-v.out
+ ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out
+ ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out
+ ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out
+ ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out
+ ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out
+ ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out
+ ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-layout_long_switches-v.out
+ ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err
+ ./testfiles/h5repack_layout.h5-layout_short_switches-v.out
+ ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err
+ ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out
+ ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err
+ ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out
+ ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err
+ ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out
+ ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err
+ ./testfiles/h5repack_layout3.h5-chunk2compa-v.out
+ ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err
+ ./testfiles/h5repack_layout3.h5-chunk2conti-v.out
+ ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err
+ ./testfiles/h5repack_layout3.h5-error1-v.out
+ ./testfiles/h5repack_layout3.h5-error1-v.out.err
+ ./testfiles/h5repack_layout3.h5-error2-v.out
+ ./testfiles/h5repack_layout3.h5-error2-v.out.err
+ ./testfiles/h5repack_layout3.h5-error3-v.out
+ ./testfiles/h5repack_layout3.h5-error3-v.out.err
+ ./testfiles/out-family.tfamily%05d.h5
+ ./testfiles/out-HDFFV-7840.h5diff_attr1.h5
+ ./testfiles/out-attr.h5repack_attr.h5
+ ./testfiles/out-native_attr.h5repack_attr.h5
+ ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5
+ ./testfiles/out-deflate_copy.h5repack_deflate.h5
+ ./testfiles/out-deflate_remove.h5repack_deflate.h5
+ ./testfiles/out-early.h5repack_early.h5
+ ./testfiles/out-fill.h5repack_fill.h5
+ ./testfiles/out-native_fill.h5repack_fill.h5
+ ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5
+ ./testfiles/out-fletcher_copy.h5repack_fletcher.h5
+ ./testfiles/out-fletcher_remove.h5repack_fletcher.h5
+ ./testfiles/out-hlink.h5repack_hlink.h5
+ ./testfiles/out-chunk_18x13.h5repack_layout.h5
+ ./testfiles/out-chunk_20x10.h5repack_layout.h5
+ ./testfiles/out-chunk_compa.h5repack_layout.h5
+ ./testfiles/out-chunk_conti.h5repack_layout.h5
+ ./testfiles/out-compa.h5repack_layout.h5
+ ./testfiles/out-conti.h5repack_layout.h5
+ ./testfiles/out-deflate_file.h5repack_layout.h5
+ ./testfiles/out-deflate_limit.h5repack_layout.h5
+ ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5
+ ./testfiles/out-dset2_compa.h5repack_layout.h5
+ ./testfiles/out-dset2_conti.h5repack_layout.h5
+ ./testfiles/out-dset_compa_chunk.h5repack_layout.h5
+ ./testfiles/out-dset_compa_compa.h5repack_layout.h5
+ ./testfiles/out-dset_compa_conti.h5repack_layout.h5
+ ./testfiles/out-dset_conti_chunk.h5repack_layout.h5
+ ./testfiles/out-dset_conti_compa.h5repack_layout.h5
+ ./testfiles/out-dset_conti_conti.h5repack_layout.h5
+ ./testfiles/out-fletcher_all.h5repack_layout.h5
+ ./testfiles/out-fletcher_individual.h5repack_layout.h5
+ ./testfiles/out-global_filters.h5repack_layout.h5
+ ./testfiles/out-gzip_all.h5repack_layout.h5
+ ./testfiles/out-gzip_individual.h5repack_layout.h5
+ ./testfiles/out-layout.h5repack_layout.h5
+ ./testfiles/out-layout_long_switches.h5repack_layout.h5
+ ./testfiles/out-layout_short_switches.h5repack_layout.h5
+ ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5
+ ./testfiles/out-shuffle_all.h5repack_layout.h5
+ ./testfiles/out-shuffle_individual.h5repack_layout.h5
+ ./testfiles/out-upgrade_layout.h5repack_layouto.h5
+ ./testfiles/out-contig_small_compa.h5repack_layout2.h5
+ ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5
+ ./testfiles/out-chunk2chunk.h5repack_layout3.h5
+ ./testfiles/out-chunk2compa.h5repack_layout3.h5
+ ./testfiles/out-chunk2conti.h5repack_layout3.h5
+ ./testfiles/out-error1.h5repack_layout3.h5
+ ./testfiles/out-error2.h5repack_layout3.h5
+ ./testfiles/out-error3.h5repack_layout3.h5
+ ./testfiles/out-error4.h5repack_layout3.h5
+ ./testfiles/out-committed_dt.h5repack_named_dtypes.h5
+ ./testfiles/out-nbit_add.h5repack_nbit.h5
+ ./testfiles/out-nbit_copy.h5repack_nbit.h5
+ ./testfiles/out-nbit_remove.h5repack_nbit.h5
+ ./testfiles/out-add_alignment.h5repack_objs.h5
+ ./testfiles/out-add_userblock.h5repack_objs.h5
+ ./testfiles/out-objs.h5repack_objs.h5
+ ./testfiles/out-gt_mallocsize.h5repack_objs.h5
+ ./testfiles/out-bug1814.h5repack_refs.h5
+ ./testfiles/out-shuffle_copy.h5repack_shuffle.h5
+ ./testfiles/out-shuffle_remove.h5repack_shuffle.h5
+ ./testfiles/out-scale_add.h5repack_soffset.h5
+ ./testfiles/out-scale_copy.h5repack_soffset.h5
+ ./testfiles/out-scale_remove.h5repack_soffset.h5
+ ./testfiles/out-meta_short_M.meta_short.h5
+ ./testfiles/out-meta_short_N.meta_short.h5
+ ./testfiles/out-meta_long_M.meta_long.h5
+ ./testfiles/out-meta_long_N.meta_long.h5
# from the h5repacktst
h5repack_attr.h5
h5repack_attr_out.h5
@@ -398,32 +512,6 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-clearall-objects")
-
- # --------------------------------------------------------------------
- # test file names
- # --------------------------------------------------------------------
- SET (INFO_FILE testfiles/h5repack.info)
-
- SET (FILE0 h5repack_fill.h5)
- SET (FILE1 h5repack_objs.h5)
- SET (FILE2 h5repack_attr.h5)
- SET (FILE3 h5repack_hlink.h5)
- SET (FILE4 h5repack_layout.h5)
- SET (FILE5 h5repack_early.h5)
- SET (FILE7 h5repack_szip.h5)
- SET (FILE8 h5repack_deflate.h5)
- SET (FILE9 h5repack_shuffle.h5)
- SET (FILE10 h5repack_fletcher.h5)
- SET (FILE11 h5repack_filters.h5)
- SET (FILE12 h5repack_nbit.h5)
- SET (FILE13 h5repack_soffset.h5)
- SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
- SET (FILE15 h5repack_named_dtypes.h5)
- SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
- SET (FILE18 h5repack_layout2.h5)
- SET (FILE_REF h5repack_refs.h5)
- SET (FILE_ATTR_REF h5repack_attr_refs.h5)
ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
IF (HDF5_ENABLE_SZIP_SUPPORT)
@@ -438,15 +526,10 @@ IF (BUILD_TESTING)
SET (passRegex "no")
SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-testh5repack_detect_szip")
+ SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
SET (last_test "H5REPACK-h5repacktest")
#
@@ -740,47 +823,29 @@ IF (BUILD_TESTING)
#########################################################
# layout options (these files have no filters)
#########################################################
- ADD_H5_TEST (dset2_chunk_20x10 "TEST" ${FILE4} --layout=dset2:CHUNK=20x10)
- ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED)
- ADD_H5_TEST (chunk_20x10 "TEST" ${FILE4} -l CHUNK=20x10)
- ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED)
- ADD_H5_TEST (dset2_conti "TEST" ${FILE4} -l dset2:CONTI)
- ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS)
- ADD_H5_TEST (conti "TEST" ${FILE4} -l CONTI)
- ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS)
- ADD_H5_TEST (dset2_compa "TEST" ${FILE4} -l dset2:COMPA)
- ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT)
- ADD_H5_TEST (compa "TEST" ${FILE4} -l COMPA)
- ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT)
+ ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED --layout=dset2:CHUNK=20x10)
+ ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED -l CHUNK=20x10)
+ ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS -l dset2:CONTI)
+ ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS -l CONTI)
+ ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT -l dset2:COMPA)
+ ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT -l COMPA)
################################################################
# layout conversions (file has no filters)
###############################################################
- ADD_H5_TEST (dset_compa_conti "TEST" ${FILE4} -l dset_compact:CONTI)
- ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS)
- ADD_H5_TEST (dset_compa_chunk "TEST" ${FILE4} -l dset_compact:CHUNK=2x5)
- ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED)
- ADD_H5_TEST (dset_compa_compa "TEST" ${FILE4} -l dset_compact:COMPA)
- ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT)
- ADD_H5_TEST (dset_conti_compa "TEST" ${FILE4} -l dset_contiguous:COMPA)
- ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT)
- ADD_H5_TEST (dset_conti_chunk "TEST" ${FILE4} -l dset_contiguous:CHUNK=3x6)
- ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED)
- ADD_H5_TEST (dset_conti_conti "TEST" ${FILE4} -l dset_contiguous:CONTI)
- ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS)
- ADD_H5_TEST (chunk_compa "TEST" ${FILE4} -l dset_chunk:COMPA)
- ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT)
- ADD_H5_TEST (chunk_conti "TEST" ${FILE4} -l dset_chunk:CONTI)
- ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS)
- ADD_H5_TEST (chunk_18x13 "TEST" ${FILE4} -l dset_chunk:CHUNK=18x13)
- ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED)
+ ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS -l dset_compact:CONTI)
+ ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED -l dset_compact:CHUNK=2x5)
+ ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT -l dset_compact:COMPA)
+ ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT -l dset_contiguous:COMPA)
+ ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6)
+ ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI)
+ ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT -l dset_chunk:COMPA)
+ ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS -l dset_chunk:CONTI)
+ ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13)
# test convert small size dataset ( < 1k) to compact layout without -m
- ADD_H5_TEST (contig_small_compa "TEST" ${FILE18} -l contig_small:COMPA)
- ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT)
-
- ADD_H5_TEST (contig_small_fixed_compa "TEST" ${FILE18} -l chunked_small_fixed:COMPA)
- ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT)
+ ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA)
+ ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA)
#---------------------------------------------------------------------------
# Test file contains chunked datasets (need multiple dsets) with
@@ -788,17 +853,14 @@ IF (BUILD_TESTING)
# Use first dset to test.
#---------------------------------------------------------------------------
# chunk to chunk - specify chunk dim bigger than any current dim
-ADD_H5_TEST (chunk2chunk "TEST" h5repack_layout3.h5 -l chunk_unlimit1:CHUNK=100x300)
-ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK)
+ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
# chunk to contiguous
-ADD_H5_TEST (chunk2conti "TEST" h5repack_layout3.h5 -l chunk_unlimit1:CONTI)
-ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI)
+ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
# chunk to compact - convert big dataset (should be > 64k) for this purpose,
# should remain as original layout (chunk)
-ADD_H5_TEST (chunk2compa "TEST" h5repack_layout3.h5 -l chunk_unlimit1:COMPA)
-ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK)
+ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
#--------------------------------------------------------------------------
# Test -f for some specific cases. Chunked dataset with unlimited max dims.
@@ -808,16 +870,13 @@ ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUN
# - should not change max dims from unlimit
# chunk dim is bigger than dataset dim. ( dset size < 64k )
-ADD_H5_TEST (error1 "TEST" h5repack_layout3.h5 -f chunk_unlimit1:NONE)
-ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED)
+ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE)
# chunk dim is bigger than dataset dim. ( dset size > 64k )
-ADD_H5_TEST (error2 "TEST" h5repack_layout3.h5 -f chunk_unlimit2:NONE)
-ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED)
+ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE)
# chunk dims are smaller than dataset dims. ( dset size < 64k )
-ADD_H5_TEST (error3 "TEST" h5repack_layout3.h5 -f chunk_unlimit3:NONE)
-ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED)
+ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE)
# file input - should not fail
ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
@@ -829,22 +888,20 @@ ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
ADD_H5_TEST (native_attr "TEST" ${FILE2} -n)
# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg ${FILE4} --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
+ SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
SET (TESTTYPE "TEST")
IF (NOT USE_FILTER_DEFLATE)
SET (TESTTYPE "SKIP")
ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (layout_long_switches ${TESTTYPE} ${arg})
- ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED)
+ ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
SET (TESTTYPE "TEST")
IF (NOT USE_FILTER_DEFLATE)
SET (TESTTYPE "SKIP")
ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (layout_short_switches ${TESTTYPE} ${arg})
- ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED)
+ ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# several global filters
SET (arg ${FILE4} --filter GZIP=1 --filter SHUF)
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 389339f..fe3a11c 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -248,6 +248,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -299,7 +300,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index a732ffb..dc90426 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -189,7 +189,9 @@ SKIP() {
DIFFTEST()
{
VERIFY h5diff output $@
- $RUNSERIAL $H5DIFF_BIN -q "$@"
+ (
+ $RUNSERIAL $H5DIFF_BIN -q "$@"
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -208,44 +210,57 @@ DIFFTEST()
TOOLTEST()
{
echo $@
- TOOLTEST_MAIN $@
- outfile=$TESTDIR/out.$1
- rm -f $outfile
-}
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ shift
+ shift
-# TOOLTEST main function, doesn't delete $output file
-TOOLTEST_MAIN()
-{
# Run test.
TESTING $H5REPACK $@
-
- infile=$TESTDIR/$1
- outfile=$TESTDIR/out.$1
- shift
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
+ rm -f $outfile
}
#------------------------------------------
# Verifying layouts of a dataset
VERIFY_LAYOUT_DSET()
{
- outfile=$TESTDIR/out.$1
- layoutfile=$TESTDIR/layout.$1
- dset=$2
- expectlayout=$3
+ layoutfile=$TESTDIR/layout-$1.$2
+ dset=$3
+ expectlayout=$4
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ shift
+ shift
+ shift
+ shift
+
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ DIFFTEST $infile $outfile
+ fi
#---------------------------------
# check the layout from a dataset
VERIFY "a dataset layout"
- $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile
+ (
+ $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile
+ )
$GREP $expectlayout $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " PASSED"
@@ -262,17 +277,35 @@ VERIFY_LAYOUT_DSET()
# Verifying layouts from entire file
VERIFY_LAYOUT_ALL()
{
- outfile=$TESTDIR/out.$1
- layoutfile=$TESTDIR/layout.$1
- expectlayout=$2
+ outfile=$TESTDIR/out-$1.$2
+ layoutfile=$TESTDIR/layout-$1.$2
+ expectlayout=$3
+ shift
+ shift
+ shift
+
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ DIFFTEST $infile $outfile
+ fi
+
#---------------------------------
# check the layout from a dataset
# check if the other layouts still exsit
VERIFY "layouts"
+ (
# if CONTIGUOUS
if [ $expectlayout = "CONTIGUOUS" ]; then
- $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile
+ TESTING $H5DUMP_BIN -pH $outfile
+ (
+ $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile
+ )
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
@@ -287,7 +320,10 @@ VERIFY_LAYOUT_ALL()
else
# if COMPACT
if [ $expectlayout = "COMPACT" ]; then
- $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile
+ TESTING $H5DUMP_BIN -pH $outfile
+ (
+ $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile
+ )
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
@@ -302,7 +338,10 @@ VERIFY_LAYOUT_ALL()
else
# if CHUNKED
if [ $expectlayout = "CHUNKED" ]; then
- $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile
+ TESTING $H5DUMP_BIN -pH $outfile
+ (
+ $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile
+ )
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
@@ -317,6 +356,7 @@ VERIFY_LAYOUT_ALL()
fi
fi
fi
+ )
# clean up tmp files
rm -f $outfile
@@ -327,13 +367,16 @@ VERIFY_LAYOUT_ALL()
#
TOOLTEST0()
{
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ shift
+ shift
+
# Run test.
TESTING $H5REPACK $@
-
- infile=$TESTDIR/$1
- outfile=$TESTDIR/out.$1
- shift
- $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@"
+ (
+ $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@"
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -351,13 +394,16 @@ TOOLTEST0()
#
TOOLTEST1()
{
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ shift
+ shift
+
# Run test.
TESTING $H5REPACK $@
-
- infile=$TESTDIR/$1
- outfile=$TESTDIR/out.$1
- shift
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -374,16 +420,20 @@ TOOLTEST1()
#
TOOLTESTV()
{
- # Run test.
- TESTING $H5REPACK $@
- expect="$TESTDIR/$1.ddl"
- actual="$TESTDIR/`basename $1 .ddl`.out"
- actual_err="$TESTDIR/`basename $1 .ddl`.err"
+ expect="$TESTDIR/$2.ddl"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
- infile=$TESTDIR/$1
- outfile=$TESTDIR/out.$1
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ shift
shift
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile >$actual 2>$actual_err
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -427,17 +477,41 @@ TOOLTESTV()
# Verify the output file of second run is larger than the one of 1st run.
TOOLTEST_META()
{
- input_file=$1
- outfile="$TESTDIR/out.$1"
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ shift
+ shift
- # Use TOOLTEST_MAIN to run because it does not remove the output file.
- # 1st run, without metadata option
- TOOLTEST_MAIN $1
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN $infile $outfile
+ )
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ DIFFTEST $infile $outfile
+ fi
# get the size of the first output file
size1=`wc -c $outfile | cut -d' ' -f1`
# 2nd run with metadata option
- TOOLTEST_MAIN $*
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ DIFFTEST $infile $outfile
+ fi
# get the size of the second output file
size2=`wc -c $outfile | cut -d' ' -f1`
@@ -492,12 +566,12 @@ fi
COPY_TESTFILES_TO_TESTDIR
# copy files (these files have no filters)
-TOOLTEST h5repack_fill.h5
-TOOLTEST h5repack_objs.h5
-TOOLTEST h5repack_attr.h5
-TOOLTEST h5repack_hlink.h5
-TOOLTEST h5repack_layout.h5
-TOOLTEST h5repack_early.h5
+TOOLTEST fill h5repack_fill.h5
+TOOLTEST objs h5repack_objs.h5
+TOOLTEST attr h5repack_attr.h5
+TOOLTEST hlink h5repack_hlink.h5
+TOOLTEST layout h5repack_layout.h5
+TOOLTEST early h5repack_early.h5
# use h5repack_layout.h5 to write some filters (this file has no filters)
@@ -507,7 +581,7 @@ arg="h5repack_layout.h5 -f dset1:GZIP=1 -l dset1:CHUNK=20x10"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST gzip_individual $arg
fi
# gzip for all
@@ -515,7 +589,7 @@ arg="h5repack_layout.h5 -f GZIP=1"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST gzip_all $arg
fi
# szip with individual object
@@ -523,7 +597,7 @@ arg="h5repack_layout.h5 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST szip_individual $arg
fi
# szip for all
@@ -531,7 +605,7 @@ arg="h5repack_layout.h5 -f SZIP=8,NN"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST szip_all $arg
fi
# shuffle with individual object
@@ -539,7 +613,7 @@ arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST shuffle_individual $arg
fi
@@ -548,7 +622,7 @@ arg="h5repack_layout.h5 -f SHUF"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST shuffle_all $arg
fi
# fletcher32 with individual object
@@ -556,7 +630,7 @@ arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST fletcher_individual $arg
fi
# fletcher32 for all
@@ -564,7 +638,7 @@ arg="h5repack_layout.h5 -f FLET"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST fletcher_all $arg
fi
# all filters
@@ -572,7 +646,7 @@ arg="h5repack_layout.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST all_filters $arg
fi
# verbose gzip with individual object
@@ -581,7 +655,7 @@ if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
# compare output
- TOOLTESTV $arg
+ TOOLTESTV gzip_verbose_filters $arg
fi
###########################################################
@@ -593,7 +667,7 @@ arg="h5repack_szip.h5"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST szip_copy $arg
fi
# szip remove
@@ -601,7 +675,7 @@ arg="h5repack_szip.h5 --filter=dset_szip:NONE"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST szip_remove $arg
fi
# deflate copy
@@ -609,7 +683,7 @@ arg="h5repack_deflate.h5"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST deflate_copy $arg
fi
# deflate remove
@@ -617,7 +691,7 @@ arg="h5repack_deflate.h5 -f dset_deflate:NONE"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST deflate_remove $arg
fi
# shuffle copy
@@ -625,7 +699,7 @@ arg="h5repack_shuffle.h5"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST shuffle_copy $arg
fi
# shuffle remove
@@ -633,7 +707,7 @@ arg="h5repack_shuffle.h5 -f dset_shuffle:NONE"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST shuffle_remove $arg
fi
# fletcher32 copy
@@ -641,7 +715,7 @@ arg="h5repack_fletcher.h5"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST fletcher_copy $arg
fi
# fletcher32 remove
@@ -649,7 +723,7 @@ arg="h5repack_fletcher.h5 -f dset_fletcher32:NONE"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST fletcher_remove $arg
fi
# nbit copy
@@ -657,7 +731,7 @@ arg="h5repack_nbit.h5"
if test $USE_FILTER_NBIT != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST nbit_copy $arg
fi
# nbit remove
@@ -665,7 +739,7 @@ arg="h5repack_nbit.h5 -f dset_nbit:NONE"
if test $USE_FILTER_NBIT != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST nbit_remove $arg
fi
# nbit add
@@ -673,7 +747,7 @@ arg="h5repack_nbit.h5 -f dset_int31:NBIT"
if test $USE_FILTER_NBIT != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST nbit_add $arg
fi
# scaleoffset copy
@@ -681,7 +755,7 @@ arg="h5repack_soffset.h5"
if test $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST scale_copy $arg
fi
# scaleoffset add
@@ -689,7 +763,7 @@ arg="h5repack_soffset.h5 -f dset_none:SOFF=31,IN"
if test $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST scale_add $arg
fi
# scaleoffset remove
@@ -697,7 +771,7 @@ arg="h5repack_soffset.h5 -f dset_scaleoffset:NONE"
if test $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST scale_remove $arg
fi
# remove all filters
@@ -705,7 +779,7 @@ arg="h5repack_filters.h5 -f NONE"
if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST remove_all $arg
fi
#filter conversions
@@ -714,14 +788,14 @@ arg="h5repack_deflate.h5 -f dset_deflate:SZIP=8,NN"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST deflate_convert $arg
fi
arg="h5repack_szip.h5 -f dset_szip:GZIP=1"
if test $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST szip_convert $arg
fi
@@ -730,7 +804,7 @@ arg="h5repack_layout.h5 -f GZIP=1 -m 1024"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST deflate_limit $arg
fi
#file
@@ -738,67 +812,50 @@ arg="h5repack_layout.h5 -e $TESTDIR/h5repack.info"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST deflate_file $arg
fi
#########################################################
# layout options (these files have no filters)
#########################################################
-TOOLTEST_MAIN h5repack_layout.h5 --layout dset2:CHUNK=20x10
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset2 CHUNKED
+VERIFY_LAYOUT_DSET dset2_chunk_20x10 h5repack_layout.h5 dset2 CHUNKED --layout dset2:CHUNK=20x10
-TOOLTEST_MAIN h5repack_layout.h5 -l CHUNK=20x10
-VERIFY_LAYOUT_ALL h5repack_layout.h5 CHUNKED
+VERIFY_LAYOUT_ALL chunk_20x10 h5repack_layout.h5 CHUNKED -l CHUNK=20x10
-TOOLTEST_MAIN h5repack_layout.h5 -l dset2:CONTI
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset2 CONTIGUOUS
+VERIFY_LAYOUT_DSET dset2_conti h5repack_layout.h5 dset2 CONTIGUOUS -l dset2:CONTI
-TOOLTEST_MAIN h5repack_layout.h5 -l CONTI
-VERIFY_LAYOUT_ALL h5repack_layout.h5 CONTIGUOUS
+VERIFY_LAYOUT_ALL conti h5repack_layout.h5 CONTIGUOUS -l CONTI
-TOOLTEST_MAIN h5repack_layout.h5 -l dset2:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset2 COMPACT
+VERIFY_LAYOUT_DSET dset2_compa h5repack_layout.h5 dset2 COMPACT -l dset2:COMPA
-TOOLTEST_MAIN h5repack_layout.h5 -l COMPA
-VERIFY_LAYOUT_ALL h5repack_layout.h5 COMPACT
+VERIFY_LAYOUT_ALL compa h5repack_layout.h5 COMPACT -l COMPA
################################################################
# layout conversions (file has no filters)
###############################################################
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_compact:CONTI
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_compact CONTIGUOUS
+VERIFY_LAYOUT_DSET dset_compa_conti h5repack_layout.h5 dset_compact CONTIGUOUS -l dset_compact:CONTI
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_compact:CHUNK=2x5
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_compact CHUNKED
+VERIFY_LAYOUT_DSET dset_compa_chunk h5repack_layout.h5 dset_compact CHUNKED -l dset_compact:CHUNK=2x5
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_compact:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_compact COMPACT
+VERIFY_LAYOUT_DSET dset_compa_compa h5repack_layout.h5 dset_compact COMPACT -l dset_compact:COMPA
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_contiguous:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_contiguous COMPACT
+VERIFY_LAYOUT_DSET dset_conti_compa h5repack_layout.h5 dset_contiguous COMPACT -l dset_contiguous:COMPA
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_contiguous:CHUNK=3x6
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_contiguous CHUNKED
+VERIFY_LAYOUT_DSET dset_conti_chunk h5repack_layout.h5 dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_contiguous:CONTI
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_contiguous CONTIGUOUS
+VERIFY_LAYOUT_DSET dset_conti_conti h5repack_layout.h5 dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_chunk:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_chunk COMPACT
+VERIFY_LAYOUT_DSET chunk_compa h5repack_layout.h5 dset_chunk COMPACT -l dset_chunk:COMPA
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_chunk:CONTI
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_chunk CONTIGUOUS
+VERIFY_LAYOUT_DSET chunk_conti h5repack_layout.h5 dset_chunk CONTIGUOUS -l dset_chunk:CONTI
-TOOLTEST_MAIN h5repack_layout.h5 -l dset_chunk:CHUNK=18x13
-VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_chunk CHUNKED
+VERIFY_LAYOUT_DSET chunk_18x13 h5repack_layout.h5 dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13
# test convert small size dataset ( < 1k) to compact layout without -m
-TOOLTEST_MAIN h5repack_layout2.h5 -l contig_small:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout2.h5 contig_small COMPACT
+VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT -l contig_small:COMPA
-TOOLTEST_MAIN h5repack_layout2.h5 -l chunked_small_fixed:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout2.h5 chunked_small_fixed COMPACT
+VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA
#---------------------------------------------------------------------------
# Test file contains chunked datasets (need multiple dsets) with
@@ -806,17 +863,14 @@ VERIFY_LAYOUT_DSET h5repack_layout2.h5 chunked_small_fixed COMPACT
# Use first dset to test.
#---------------------------------------------------------------------------
# chunk to chunk - specify chunk dim bigger than any current dim
-TOOLTEST_MAIN h5repack_layout3.h5 -l chunk_unlimit1:CHUNK=100x300
-VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CHUNK
+VERIFY_LAYOUT_DSET chunk2chunk h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300
# chunk to contiguous
-TOOLTEST_MAIN h5repack_layout3.h5 -l chunk_unlimit1:CONTI
-VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CONTI
+VERIFY_LAYOUT_DSET chunk2conti h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI
# chunk to compact - convert big dataset (should be > 64k) for this purpose,
# should remain as original layout (chunk)
-TOOLTEST_MAIN h5repack_layout3.h5 -l chunk_unlimit1:COMPA
-VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CHUNK
+VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA
#--------------------------------------------------------------------------
# Test -f for some specific cases. Chunked dataset with unlimited max dims.
@@ -826,24 +880,22 @@ VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CHUNK
# - should not change max dims from unlimit
# chunk dim is bigger than dataset dim. ( dset size < 64k )
-TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit1:NONE
-VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED
+VERIFY_LAYOUT_DSET error1 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE
# chunk dim is bigger than dataset dim. ( dset size > 64k )
-TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit2:NONE
-VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED
+VERIFY_LAYOUT_DSET error2 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE
# chunk dims are smaller than dataset dims. ( dset size < 64k )
-TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit3:NONE
-VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED
+#TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit3:NONE
+VERIFY_LAYOUT_DSET error3 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE
# file input - should not fail
-TOOLTEST h5repack_layout3.h5 -f NONE
+TOOLTEST error4 h5repack_layout3.h5 -f NONE
# Native option
# Do not use FILE1, as the named dtype will be converted to native, and h5diff will
# report a difference.
-TOOLTEST h5repack_fill.h5 -n
-TOOLTEST h5repack_attr.h5 -n
+TOOLTEST native_fill h5repack_fill.h5 -n
+TOOLTEST native_attr h5repack_attr.h5 -n
# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
@@ -851,8 +903,7 @@ arg="h5repack_layout.h5 --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --nati
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST_MAIN $arg
- VERIFY_LAYOUT_ALL h5repack_layout.h5 CHUNKED
+ VERIFY_LAYOUT_ALL layout_long_switches h5repack_layout.h5 CHUNKED --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]
fi
# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
@@ -860,8 +911,7 @@ arg="h5repack_layout.h5 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dty
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST_MAIN $arg
- VERIFY_LAYOUT_ALL h5repack_layout.h5 CHUNKED
+ VERIFY_LAYOUT_ALL layout_short_switches h5repack_layout.h5 CHUNKED -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]
fi
# several global filters
@@ -870,7 +920,7 @@ arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF"
if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
- TOOLTEST $arg
+ TOOLTEST global_filters $arg
fi
# syntax of -i infile -o outfile
@@ -879,46 +929,47 @@ arg="h5repack_layout.h5 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dty
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST0 $arg
+ TOOLTEST0 old_style_layout_short_switches $arg
fi
# add a userblock to file
-arg="h5repack_objs.h5 -u ublock.bin -b 2048"
-TOOLTEST $arg
+arg="h5repack_objs.h5 -u $TESTDIR/ublock.bin -b 2048"
+TOOLTEST add_userblock $arg
# add alignment
arg="h5repack_objs.h5 -t 1 -a 1 "
-TOOLTEST $arg
+TOOLTEST add_alignment $arg
# Check repacking file with old version of layout message (should get upgraded
# to new version and be readable, etc.)
-TOOLTEST h5repack_layouto.h5
+TOOLTEST pgrade_layout h5repack_layouto.h5
# test for datum size > H5TOOLS_MALLOCSIZE
-TOOLTEST h5repack_objs.h5 -f GZIP=1
+TOOLTEST gt_mallocsize h5repack_objs.h5 -f GZIP=1
# Check repacking file with committed datatypes in odd configurations
-TOOLTEST h5repack_named_dtypes.h5
+TOOLTEST committed_dt h5repack_named_dtypes.h5
# tests family driver (file is located in common testfiles folder, uses TOOLTEST1
-TOOLTEST1 tfamily%05d.h5
+TOOLTEST1 family tfamily%05d.h5
# test various references (bug 1814 and 1726)
-TOOLTEST h5repack_refs.h5
+TOOLTEST bug1814 h5repack_refs.h5
# test attribute with various references (bug1797 / HDFFV-5932)
# the references in attribute of compund or vlen datatype
-TOOLTEST h5repack_attr_refs.h5
+TOOLTEST HDFFV-5932 h5repack_attr_refs.h5
# Add test for memory leak in attirbute. This test is verified by CTEST.
# 1. leak from vlen string
# 2. leak from compound type without reference member
# (HDFFV-7840, )
# Note: this test is experimental for sharing test file among tools
-TOOLTEST h5diff_attr1.h5
+TOOLTEST HDFFV-7840 h5diff_attr1.h5
# tests for metadata block size option
-TOOLTEST_META h5repack_layout.h5 --metadata_block_size=8192
+TOOLTEST_META meta_short h5repack_layout.h5 -M 8192
+TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 9afb365..447df70 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -99,10 +99,9 @@ IF (BUILD_TESTING)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5STAT-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5STAT-clear-${resultfile}-objects
+ NAME H5STAT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
@@ -117,7 +116,7 @@ IF (BUILD_TESTING)
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-clear-${resultfile}-objects")
+ SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 389e460..ec77732 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -263,6 +263,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -314,7 +315,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 6a76e1d..743e158 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -226,6 +226,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -277,7 +278,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 130a0d8..4899200 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -350,6 +350,13 @@ hsize_t diff_attr(hid_t loc1_id,
if( build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
goto error;
+ /* if detect any unique extra attr */
+ if(match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2)
+ {
+ /* exit will be 1 */
+ options->contents = 0;
+ }
+
for(u = 0; u < (unsigned)match_list_attrs->nattrs; u++)
{
if( (match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1]) )
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index f83c664..dbb5f98 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -302,7 +302,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
*/
curr_pos = ctx->sm_pos;
- if (region_output && H5Tequal(type, H5T_STD_REF_DSETREG)) {
+ if (region_output && (size == H5R_DSET_REG_REF_BUF_SIZE)) {
for (i = 0; i < nelmts; i++, ctx->cur_elmt++, elmt_counter++) {
void* memref = mem + i * size;
char ref_name[1024];
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 1646351..e17ae89 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -685,7 +685,8 @@ char *
h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t container,
hid_t type, void *vp, h5tools_context_t *ctx)
{
- size_t n, offset, size=0, nelmts, start;
+ size_t nsize, offset, size=0, nelmts, start;
+ H5T_sign_t nsign;
char *name;
unsigned char *ucp_vp = (unsigned char *)vp;
char *cp_vp = (char *)vp;
@@ -715,15 +716,16 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
/* Append value depending on data type */
start = h5tools_str_len(str);
+ nsize = H5Tget_size(type);
+ nsign = H5Tget_sign(type);
if (info->raw) {
size_t i;
- n = H5Tget_size(type);
- if (1 == n) {
+ if (1 == nsize) {
h5tools_str_append(str, OPT(info->fmt_raw, "0x%02x"), ucp_vp[0]);
}
else {
- for (i = 0; i < n; i++) {
+ for (i = 0; i < nsize; i++) {
if (i)
h5tools_str_append(str, ":");
h5tools_str_append(str, OPT(info->fmt_raw, "%02x"), ucp_vp[i]);
@@ -735,20 +737,23 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
return NULL;
switch (type_class) {
case H5T_FLOAT:
- if (H5Tequal(type, H5T_NATIVE_FLOAT)) {
+ if (sizeof(float) == nsize) {
+ /* if (H5Tequal(type, H5T_NATIVE_FLOAT)) */
float tempfloat;
HDmemcpy(&tempfloat, vp, sizeof(float));
h5tools_str_append(str, OPT(info->fmt_float, "%g"), tempfloat);
}
- else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) {
+ else if (sizeof(double) == nsize) {
+ /* if (H5Tequal(type, H5T_NATIVE_DOUBLE)) */
double tempdouble;
HDmemcpy(&tempdouble, vp, sizeof(double));
h5tools_str_append(str, OPT(info->fmt_double, "%g"), tempdouble);
#if H5_SIZEOF_LONG_DOUBLE !=0
}
- else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) {
+ else if (sizeof(long double) == nsize) {
+ /* if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) */
long double templdouble;
HDmemcpy(&templdouble, vp, sizeof(long double));
@@ -833,147 +838,140 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
break;
case H5T_INTEGER:
- if (H5Tequal(type, H5T_NATIVE_INT)) {
- HDmemcpy(&tempint, vp, sizeof(int));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(int))
- tempint = 0;
- else
- tempint = (tempint >> packed_data_offset) & packed_data_mask;
- }
- h5tools_str_append(str, OPT(info->fmt_int, "%d"), tempint);
- }
- else if (H5Tequal(type, H5T_NATIVE_UINT)) {
- HDmemcpy(&tempuint, vp, sizeof(unsigned int));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(unsigned int))
- tempuint = 0;
- else
- tempuint = (tempuint >> packed_data_offset) & packed_data_mask;
- }
- h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
- }
- else if (info->ascii && (H5Tequal(type, H5T_NATIVE_SCHAR) || H5Tequal(type, H5T_NATIVE_UCHAR))) {
- h5tools_print_char(str, info, (char) (*ucp_vp));
- }
- else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
- signed char tempchar;
- HDmemcpy(&tempchar, cp_vp, sizeof(char));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(char))
- tempchar = 0;
- else
- tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
- }
-#ifdef H5_VMS
- h5tools_str_append(str, OPT(info->fmt_schar, "%hd"), tempchar);
-#else
- h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
-#endif
- }
- else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
- unsigned char tempuchar;
- HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(unsigned char))
- tempuchar = 0;
- else
- tempuchar = (tempuchar >> packed_data_offset) & packed_data_mask;
- }
- h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), tempuchar);
- }
- else if (H5Tequal(type, H5T_NATIVE_SHORT)) {
- short tempshort;
-
- HDmemcpy(&tempshort, vp, sizeof(short));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(short))
- tempshort = 0;
- else
- tempshort = (tempshort >> packed_data_offset) & packed_data_mask;
- }
- h5tools_str_append(str, OPT(info->fmt_short, "%d"), tempshort);
- }
- else if (H5Tequal(type, H5T_NATIVE_USHORT)) {
- unsigned short tempushort;
-
- HDmemcpy(&tempushort, vp, sizeof(unsigned short));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(unsigned short))
- tempushort = 0;
- else
- tempushort = (tempushort >> packed_data_offset) & packed_data_mask;
- }
- h5tools_str_append(str, OPT(info->fmt_ushort, "%u"), tempushort);
- }
- else if (H5Tequal(type, H5T_NATIVE_LONG)) {
- HDmemcpy(&templong, vp, sizeof(long));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(long))
- templong = 0;
- else
- templong = (templong >> packed_data_offset) & packed_data_mask;
+ if (sizeof(char) == nsize) {
+ /* if ((H5Tequal(type, H5T_NATIVE_SCHAR) || H5Tequal(type, H5T_NATIVE_UCHAR))) */
+ if (info->ascii) {
+ h5tools_print_char(str, info, (char) (*ucp_vp));
}
- h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
- }
- else if (H5Tequal(type, H5T_NATIVE_ULONG)) {
- HDmemcpy(&tempulong, vp, sizeof(unsigned long));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(unsigned long))
- tempulong = 0;
- else
- tempulong = (tempulong >> packed_data_offset) & packed_data_mask;
+ else if(H5T_SGN_NONE == nsign) {
+ /* if (H5Tequal(type, H5T_NATIVE_UCHAR)) */
+ unsigned char tempuchar;
+ HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(unsigned char))
+ tempuchar = 0;
+ else
+ tempuchar = (tempuchar >> packed_data_offset) & packed_data_mask;
+ }
+ h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), tempuchar);
}
- h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
- }
- else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
- HDmemcpy(&templlong, vp, sizeof(long long));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(long long))
- templlong = 0;
- else
- templlong = (templlong >> packed_data_offset) & packed_data_mask;
+ else {
+ /* if (H5Tequal(type, H5T_NATIVE_SCHAR)) */
+ signed char tempchar;
+ HDmemcpy(&tempchar, cp_vp, sizeof(char));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(char))
+ tempchar = 0;
+ else
+ tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
+ }
+ #ifdef H5_VMS
+ h5tools_str_append(str, OPT(info->fmt_schar, "%hd"), tempchar);
+ #else
+ h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
+ #endif
}
- h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
- }
- else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
- HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
- if (packed_bits_num) {
- if (packed_data_offset >= 8 * sizeof(unsigned long long))
- tempullong = 0;
- else
- tempullong = (tempullong >> packed_data_offset) & packed_data_mask;
+ } /* end if (sizeof(char) == nsize) */
+ else if (sizeof(int) == nsize) {
+ if(H5T_SGN_NONE == nsign) {
+ /* if (H5Tequal(type, H5T_NATIVE_UINT)) */
+ HDmemcpy(&tempuint, vp, sizeof(unsigned int));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(unsigned int))
+ tempuint = 0;
+ else
+ tempuint = (tempuint >> packed_data_offset) & packed_data_mask;
+ }
+ h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
}
- h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
- }
- else if (H5Tequal(type, H5T_NATIVE_HSSIZE)) {
- if (sizeof(hssize_t) == sizeof(int)) {
+ else {
+ /* if (H5Tequal(type, H5T_NATIVE_INT)) */
HDmemcpy(&tempint, vp, sizeof(int));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(int))
+ tempint = 0;
+ else
+ tempint = (tempint >> packed_data_offset) & packed_data_mask;
+ }
h5tools_str_append(str, OPT(info->fmt_int, "%d"), tempint);
}
- else if (sizeof(hssize_t) == sizeof(long)) {
- HDmemcpy(&templong, vp, sizeof(long));
- h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
+ } /* end if (sizeof(int) == nsize) */
+ else if (sizeof(short) == nsize) {
+ if(H5T_SGN_NONE == nsign) {
+ /* if (H5Tequal(type, H5T_NATIVE_USHORT)) */
+ unsigned short tempushort;
+
+ HDmemcpy(&tempushort, vp, sizeof(unsigned short));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(unsigned short))
+ tempushort = 0;
+ else
+ tempushort = (tempushort >> packed_data_offset) & packed_data_mask;
+ }
+ h5tools_str_append(str, OPT(info->fmt_ushort, "%u"), tempushort);
}
else {
- HDmemcpy(&templlong, vp, sizeof(long long));
- h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
- }
- }
- else if (H5Tequal(type, H5T_NATIVE_HSIZE)) {
- if (sizeof(hsize_t) == sizeof(int)) {
- HDmemcpy(&tempuint, vp, sizeof(unsigned int));
- h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
+ /* if (H5Tequal(type, H5T_NATIVE_SHORT)) */
+ short tempshort;
+
+ HDmemcpy(&tempshort, vp, sizeof(short));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(short))
+ tempshort = 0;
+ else
+ tempshort = (tempshort >> packed_data_offset) & packed_data_mask;
+ }
+ h5tools_str_append(str, OPT(info->fmt_short, "%d"), tempshort);
}
- else if (sizeof(hsize_t) == sizeof(long)) {
- HDmemcpy(&tempulong, vp, sizeof(long));
+ } /* end if (sizeof(short) == nsize) */
+ else if (sizeof(long) == nsize) {
+ if(H5T_SGN_NONE == nsign) {
+ /* if (H5Tequal(type, H5T_NATIVE_ULONG)) */
+ HDmemcpy(&tempulong, vp, sizeof(unsigned long));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(unsigned long))
+ tempulong = 0;
+ else
+ tempulong = (tempulong >> packed_data_offset) & packed_data_mask;
+ }
h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
}
else {
+ /* if (H5Tequal(type, H5T_NATIVE_LONG)) */
+ HDmemcpy(&templong, vp, sizeof(long));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(long))
+ templong = 0;
+ else
+ templong = (templong >> packed_data_offset) & packed_data_mask;
+ }
+ h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
+ }
+ } /* end if (sizeof(long) == nsize) */
+ else if (sizeof(long long) == nsize) {
+ if(H5T_SGN_NONE == nsign) {
+ /* if (H5Tequal(type, H5T_NATIVE_ULLONG)) */
HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(unsigned long long))
+ tempullong = 0;
+ else
+ tempullong = (tempullong >> packed_data_offset) & packed_data_mask;
+ }
h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
}
- }
+ else {
+ /* if (H5Tequal(type, H5T_NATIVE_LLONG)) */
+ HDmemcpy(&templlong, vp, sizeof(long long));
+ if (packed_bits_num) {
+ if (packed_data_offset >= 8 * sizeof(long long))
+ templlong = 0;
+ else
+ templlong = (templlong >> packed_data_offset) & packed_data_mask;
+ }
+ h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
+ }
+ } /* end if (sizeof(long long) == nsize) */
break;
case H5T_COMPOUND:
{
@@ -1024,75 +1022,71 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
else {
size_t i;
- n = H5Tget_size(type);
- if (1 == n) {
+ if (1 == nsize) {
h5tools_str_append(str, "0x%02x", ucp_vp[0]);
}
else {
- for (i = 0; i < n; i++)
+ for (i = 0; i < nsize; i++)
h5tools_str_append(str, "%s%02x", i ? ":" : "", ucp_vp[i]);
}
}
}
break;
case H5T_REFERENCE:
- if (H5Tequal(type, H5T_STD_REF_DSETREG)) {
- if (h5tools_str_is_zero(vp, H5Tget_size(type))) {
- h5tools_str_append(str, "NULL");
- }
- else {
- h5tools_str_sprint_region(str, info, container, vp);
- }
+ if (h5tools_str_is_zero(vp, nsize)) {
+ h5tools_str_append(str, "NULL");
}
- else if (H5Tequal(type, H5T_STD_REF_OBJ)) {
- /*
- * Object references -- show the type and OID of the referenced
- * object.
- */
- if (h5tools_str_is_zero(vp, H5Tget_size(type))) {
- h5tools_str_append(str, "NULL");
+ else {
+ if (nsize == H5R_DSET_REG_REF_BUF_SIZE) {
+ /* if (H5Tequal(type, H5T_STD_REF_DSETREG)) */
+ h5tools_str_sprint_region(str, info, container, vp);
}
- else {
- H5O_info_t oi;
- const char *path;
-
- obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
- H5Oget_info(obj, &oi);
-
- /* Print object type and close object */
- switch (oi.type) {
- case H5O_TYPE_GROUP:
- h5tools_str_append(str, H5_TOOLS_GROUP);
- break;
-
- case H5O_TYPE_DATASET:
- h5tools_str_append(str, H5_TOOLS_DATASET);
- break;
-
- case H5O_TYPE_NAMED_DATATYPE:
- h5tools_str_append(str, H5_TOOLS_DATATYPE);
- break;
-
- default:
- h5tools_str_append(str, "%u-", (unsigned) oi.type);
- break;
- } /* end switch */
- H5Oclose(obj);
-
- /* Print OID */
- if (info->obj_hidefileno)
- h5tools_str_append(str, info->obj_format, oi.addr);
- else
- h5tools_str_append(str, info->obj_format, oi.fileno, oi.addr);
-
- /* Print name */
- path = lookup_ref_path(*(haddr_t *) vp);
- if (path) {
- h5tools_str_append(str, " ");
- h5tools_str_append(str, path);
- h5tools_str_append(str, " ");
- } /* end if */
- } /* end else */
+ else if (nsize == H5R_OBJ_REF_BUF_SIZE) {
+ /* if (H5Tequal(type, H5T_STD_REF_OBJ)) */
+ /*
+ * Object references -- show the type and OID of the referenced
+ * object.
+ */
+ H5O_info_t oi;
+ const char *path;
+
+ obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
+ H5Oget_info(obj, &oi);
+
+ /* Print object type and close object */
+ switch (oi.type) {
+ case H5O_TYPE_GROUP:
+ h5tools_str_append(str, H5_TOOLS_GROUP);
+ break;
+
+ case H5O_TYPE_DATASET:
+ h5tools_str_append(str, H5_TOOLS_DATASET);
+ break;
+
+ case H5O_TYPE_NAMED_DATATYPE:
+ h5tools_str_append(str, H5_TOOLS_DATATYPE);
+ break;
+
+ default:
+ h5tools_str_append(str, "%u-", (unsigned) oi.type);
+ break;
+ } /* end switch */
+ H5Oclose(obj);
+
+ /* Print OID */
+ if (info->obj_hidefileno)
+ h5tools_str_append(str, info->obj_format, oi.addr);
+ else
+ h5tools_str_append(str, info->obj_format, oi.fileno, oi.addr);
+
+ /* Print name */
+ path = lookup_ref_path(*(haddr_t *) vp);
+ if (path) {
+ h5tools_str_append(str, " ");
+ h5tools_str_append(str, path);
+ h5tools_str_append(str, " ");
+ } /* end if */
+ } /* end else if (H5Tequal(type, H5T_STD_REF_OBJ)) */
}
break;
case H5T_ARRAY:
@@ -1206,12 +1200,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
{
/* All other types get printed as hexadecimal */
size_t i;
- n = H5Tget_size(type);
- if (1 == n) {
+ if (1 == nsize) {
h5tools_str_append(str, "0x%02x", ucp_vp[0]);
}
else {
- for (i = 0; i < n; i++)
+ for (i = 0; i < nsize; i++)
h5tools_str_append(str, "%s%02x", i ? ":" : "", ucp_vp[i]);
}
}
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index d310d3d..e778d2f 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -62,7 +62,7 @@ IF (BUILD_TESTING)
SET_TARGET_PROPERTIES (h5repart_test PROPERTIES FOLDER tools)
# --------------------------------------------------------------------
- # Copy all the HDF5 files from the test directory into the source directory
+ # Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
SET (HDF5_REFERENCE_TEST_FILES
family_file00000.h5
@@ -97,37 +97,43 @@ IF (BUILD_TESTING)
ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
SET (HDF5_MKGRP_TEST_FILES
- #h5mkgrp_help
+ #h5mkgrp_help.txt
#h5mkgrp_version
- h5mkgrp_single
- h5mkgrp_single_latest
- h5mkgrp_several
- h5mkgrp_several_latest
- h5mkgrp_nested
- h5mkgrp_nested_latest
- h5mkgrp_nested_mult
- h5mkgrp_nested_mult_latest
+ h5mkgrp_single.ls
+ h5mkgrp_single_v.ls
+ h5mkgrp_single_p.ls
+ h5mkgrp_single_l.ls
+ h5mkgrp_several.ls
+ h5mkgrp_several_v.ls
+ h5mkgrp_several_p.ls
+ h5mkgrp_several_l.ls
+ h5mkgrp_nested_p.ls
+ h5mkgrp_nested_lp.ls
+ h5mkgrp_nested_mult_p.ls
+ h5mkgrp_nested_mult_lp.ls
)
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/../testfiles")
+ # make test dir
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_mkgrp_file}")
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
#MESSAGE (STATUS " Copying ${h5_mkgrp_file}")
ADD_CUSTOM_COMMAND (
TARGET h5mkgrp
POST_BUILD
- COMMAND ${XLATE_UTILITY}
- ARGS ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file}.ls ${dest}.ls -l3
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
)
ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
ADD_CUSTOM_COMMAND (
TARGET h5mkgrp
POST_BUILD
- COMMAND ${XLATE_UTILITY}
- ARGS ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/h5mkgrp_help.txt -l0
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt
)
- CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/h5mkgrp_version.txt @ONLY)
+ CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
##############################################################################
##############################################################################
@@ -136,102 +142,71 @@ IF (BUILD_TESTING)
##############################################################################
MACRO (ADD_H5_TEST resultfile resultcode resultoption)
- IF (NOT ${resultoption} STREQUAL " ")
- ADD_TEST (
- NAME H5MKGRP-clear-${resultfile}${resultoption}
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5
- ${PROJECT_BINARY_DIR}/${resultfile}.out
- ${PROJECT_BINARY_DIR}/${resultfile}.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5MKGRP-clear-${resultfile}${resultoption} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
- NAME H5MKGRP-${resultfile}${resultoption}
- COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN}
- )
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile}${resultoption})
- SET (last_test "H5MKGRP-${resultfile}${resultoption}")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5MKGRP-h5ls-${resultfile}${resultoption}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
- -D "TEST_ARGS:STRING=-v;-r;../testfiles/${resultfile}.h5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_MASK_MOD=true"
- -D "TEST_REFERENCE=${resultfile}.ls"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5MKGRP-h5ls-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-${resultfile}${resultoption})
- SET (last_test "H5MKGRP-h5ls-${resultfile}${resultoption}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (NOT ${resultoption} STREQUAL " ")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
- NAME H5MKGRP-clear-${resultfile}
+ NAME H5MKGRP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5
- ${PROJECT_BINARY_DIR}/${resultfile}.out
- ${PROJECT_BINARY_DIR}/${resultfile}.out.err
+ ${resultfile}.h5
+ ${resultfile}.out
+ ${resultfile}.out.err
)
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5MKGRP-${resultfile}
+ COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5MKGRP-clear-${resultfile} PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
ADD_TEST (
- NAME H5MKGRP-${resultfile}
- COMMAND $<TARGET_FILE:h5mkgrp> ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN}
+ NAME H5MKGRP-${resultfile}-h5ls
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_MASK_MOD=true"
+ -D "TEST_REFERENCE=${resultfile}.ls"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile})
- SET (last_test "H5MKGRP-${resultfile}")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5MKGRP-h5ls-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
- -D "TEST_ARGS:STRING=-v;-r;../testfiles/${resultfile}.h5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_MASK_MOD=true"
- -D "TEST_REFERENCE=${resultfile}.ls"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5MKGRP-h5ls-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile})
- SET (last_test "H5MKGRP-h5ls-${resultfile}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDIF (NOT ${resultoption} STREQUAL " ")
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption)
MACRO (ADD_H5_CMP resultfile resultcode)
- ADD_TEST (
- NAME H5MKGRP_CMP-clear-${resultfile}
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5
- ${PROJECT_BINARY_DIR}/${resultfile}.out
- ${PROJECT_BINARY_DIR}/${resultfile}.out.err
- )
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
+ NAME H5MKGRP_CMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.h5
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ ADD_TEST (
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>"
-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}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
+ SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-clear-${resultfile})
ENDMACRO (ADD_H5_CMP resultfile resultcode)
##############################################################################
@@ -242,71 +217,115 @@ IF (BUILD_TESTING)
# Remove any output file left over from previous test run
ADD_TEST (
- NAME h5repart_20K-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- fst_family00000.h5
+ NAME H5REPART-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ fst_family00000.h5
+ scd_family00000.h5
+ scd_family00001.h5
+ scd_family00002.h5
+ scd_family00003.h5
+ family_to_sec2.h5
)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5REPART-clearall-objects")
+
# repartition family member size to 20,000 bytes.
- ADD_TEST (NAME h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
- SET_TESTS_PROPERTIES (h5repart_20K PROPERTIES DEPENDS h5repart_20K-clear-objects)
+ ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME h5repart_5K-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- scd_family00000.h5
- scd_family00001.h5
- scd_family00002.h5
- scd_family00003.h5
- )
- SET_TESTS_PROPERTIES (h5repart_5K-clear-objects PROPERTIES DEPENDS h5repart_20K)
# repartition family member size to 5 KB.
- ADD_TEST (NAME h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
- SET_TESTS_PROPERTIES (h5repart_5K PROPERTIES DEPENDS h5repart_5K-clear-objects)
+ ADD_TEST (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME h5repart_sec2-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- family_to_sec2.h5
- )
- SET_TESTS_PROPERTIES (h5repart_sec2-clear-objects PROPERTIES DEPENDS h5repart_5K)
# convert family file to sec2 file of 20,000 bytes
- ADD_TEST (NAME h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
- SET_TESTS_PROPERTIES (h5repart_sec2 PROPERTIES DEPENDS h5repart_sec2-clear-objects)
+ ADD_TEST (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects)
# test the output files repartitioned above.
- ADD_TEST (NAME h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
- SET_TESTS_PROPERTIES (h5repart_test PROPERTIES DEPENDS h5repart_sec2)
+ ADD_TEST (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
h5repart_test
)
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5MKGRP-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5mkgrp_help.out
+ h5mkgrp_help.out.err
+ h5mkgrp_version.out
+ h5mkgrp_version.out.err
+ h5mkgrp_single.h5
+ h5mkgrp_single.out
+ h5mkgrp_single.out.err
+ h5mkgrp_single_v.h5
+ h5mkgrp_single_v.out
+ h5mkgrp_single_v.out.err
+ h5mkgrp_single_p.h5
+ h5mkgrp_single_p.out
+ h5mkgrp_single_p.out.err
+ h5mkgrp_single_l.h5
+ h5mkgrp_single_l.out
+ h5mkgrp_single_l.out.err
+ h5mkgrp_several.h5
+ h5mkgrp_several.out
+ h5mkgrp_several.out.err
+ h5mkgrp_several_v.h5
+ h5mkgrp_several_v.out
+ h5mkgrp_several_v.out.err
+ h5mkgrp_several_p.h5
+ h5mkgrp_several_p.out
+ h5mkgrp_several_p.out.err
+ h5mkgrp_several_l.h5
+ h5mkgrp_several_l.out
+ h5mkgrp_several_l.out.err
+ h5mkgrp_nested_p.h5
+ h5mkgrp_nested_p.out
+ h5mkgrp_nested_p.out.err
+ h5mkgrp_nested_lp.h5
+ h5mkgrp_nested_lp.out
+ h5mkgrp_nested_lp.out.err
+ h5mkgrp_nested_mult_p.h5
+ h5mkgrp_nested_mult_p.out
+ h5mkgrp_nested_mult_p.out.err
+ h5mkgrp_nested_mult_lp.h5
+ h5mkgrp_nested_mult_lp.out
+ h5mkgrp_nested_mult_lp.out.err
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5MKGRP-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# Check that help & version is displayed properly
ADD_H5_CMP (h5mkgrp_help 0 "-h")
ADD_H5_CMP (h5mkgrp_version 0 "-V")
# Create single group at root level
- ADD_H5_TEST (h5mkgrp_single 0 " " single)
- ADD_H5_TEST (h5mkgrp_single 0 "-v" single)
- ADD_H5_TEST (h5mkgrp_single 0 "-p" single)
- ADD_H5_TEST (h5mkgrp_single_latest 0 "-l" latest)
+ ADD_H5_TEST (h5mkgrp_single 0 "" single)
+ ADD_H5_TEST (h5mkgrp_single_v 0 "-v" single)
+ ADD_H5_TEST (h5mkgrp_single_p 0 "-p" single)
+ ADD_H5_TEST (h5mkgrp_single_l 0 "-l" latest)
# Create several groups at root level
- ADD_H5_TEST (h5mkgrp_several 0 " " one two)
- ADD_H5_TEST (h5mkgrp_several 0 "-v" one two)
- ADD_H5_TEST (h5mkgrp_several 0 "-p" one two)
- ADD_H5_TEST (h5mkgrp_several_latest 0 "-l" one two)
+ ADD_H5_TEST (h5mkgrp_several 0 "" one two)
+ ADD_H5_TEST (h5mkgrp_several_v 0 "-v" one two)
+ ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two)
+ ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two)
# Create various nested groups
- ADD_H5_TEST (h5mkgrp_nested 0 "-p" /one/two)
- ADD_H5_TEST (h5mkgrp_nested_latest 0 "-lp" /one/two)
- ADD_H5_TEST (h5mkgrp_nested_mult 0 "-p" /one/two /three/four)
- ADD_H5_TEST (h5mkgrp_nested_mult_latest 0 "-lp" /one/two /three/four)
+ ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two)
+ ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two)
+ ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four)
+ ADD_H5_TEST (h5mkgrp_nested_mult_lp 0 "-lp" /one/two /three/four)
ENDIF (BUILD_TESTING)
##############################################################################
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 8c2e1c1..3320276 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -288,6 +288,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -339,7 +340,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in
index dc127e8..5ec1a28 100644
--- a/tools/misc/testh5mkgrp.sh.in
+++ b/tools/misc/testh5mkgrp.sh.in
@@ -31,15 +31,85 @@ H5LS=h5ls # The h5ls tool name
H5LS_ARGS=-vr # Arguments to the h5ls tool
H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary
+CMP='cmp'
+DIFF='diff -c'
+CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
nerrors=0
verbose=yes
-INDIR=$srcdir/../testfiles
-OUTDIR=../testfiles
+# source dirs
+SRC_TOOLS="$srcdir/../"
+
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+# testfiles source dirs for tools
+SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/misc/testfiles"
+
+TESTDIR=./testfiles
+test -d $TESTDIR || mkdir -p $TESTDIR
+
+######################################################################
+# test files
+# --------------------------------------------------------------------
+# All the test files copy from source directory to test directory
+# NOTE: Keep this framework to add/remove test files.
+# Any test files from other tools can be used in this framework.
+# This list are also used for checking exist.
+# Comment '#' without space can be used.
+# --------------------------------------------------------------------
+
CMP='cmp -s'
DIFF='diff -c'
-test -d $OUTDIR || mkdir $OUTDIR
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="
+$SRC_H5MKGRP_TESTFILES/h5mkgrp_help.txt
+$SRC_TOOLS_TESTFILES/h5mkgrp_single.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_single_v.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_single_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_single_l.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several_v.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several_l.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_lp.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_mult_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_mult_lp.ls
+"
+
+COPY_TESTFILES_TO_TESTDIR()
+{
+ # copy test files. Used -f to make sure get a new copy
+ for tstfile in $COPY_TESTFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ fi
+ done
+}
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
@@ -71,9 +141,7 @@ TOOLTEST()
{
TESTING $H5MKGRP $@
(
- echo "#############################"
- echo " output for '$H5MKGRP $@'"
- echo "#############################"
+ cd $TESTDIR
$RUNSERIAL $H5MKGRP_BIN $@
) > output.out
RET=$?
@@ -96,17 +164,15 @@ TOOLTEST()
#
H5LSTEST()
{
- expect="$INDIR/`basename $1 .h5`.ls"
- actual="$OUTDIR/`basename $1 .h5`.out"
+ expect="$TESTDIR/`basename $1 .h5`.ls"
+ actual="$TESTDIR/`basename $1 .h5`.out"
actual_sav=${actual}-sav
# Stderr is included in stdout so that the diff can detect
# any unexpected output from that stream too.
VERIFY_H5LS $@
(
- echo "#############################"
- echo "Expected output for '$H5LS $@'"
- echo "#############################"
+ cd $TESTDIR
$RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual
@@ -142,7 +208,7 @@ H5LSTEST()
# $* are groups to create
RUNTEST()
{
- FILEOUT=$OUTDIR/$1
+ FILEOUT=$1
shift
H5MKGRP_ARGS=$1
shift
@@ -158,9 +224,8 @@ RUNTEST()
# Remove output file created, if the "no cleanup" environment variable is
# not defined
-echo "FILEOUT=" $FILEOUT
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $FILEOUT
+ rm -f $TESTDIR/$FILEOUT
fi
}
@@ -172,16 +237,17 @@ echo "FILEOUT=" $FILEOUT
# $* are groups to create
CMPTEST()
{
- FILEOUT=$OUTDIR/$1
- expect="$srcdir/testfiles/`basename $1 .h5`.txt"
- actual="$OUTDIR/`basename $1 .h5`.out"
- actual_err="$OUTDIR/`basename $1 .h5`.err"
+ FILEOUT=$1
+ expect="$TESTDIR/`basename $1 .h5`.txt"
+ actual="$TESTDIR/`basename $1 .h5`.out"
+ actual_err="$TESTDIR/`basename $1 .h5`.err"
shift
# Stderr is included in stdout so that the diff can detect
# any unexpected output from that stream too.
TESTING $H5MKGRP $@
(
+ cd $TESTDIR
$RUNSERIAL $H5MKGRP_BIN $@
) >$actual 2>$actual_err
cat $actual_err >> $actual
@@ -208,28 +274,30 @@ CMPTEST()
##############################################################################
### T H E T E S T S ###
##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
# Check that help & version is displayed properly
CMPTEST h5mkgrp_help.h5 "-h"
-RUNTEST h5mkgrp_version.h5 "-V"
+#CMPTEST h5mkgrp_version.h5 "-V"
# Create single group at root level
RUNTEST h5mkgrp_single.h5 " " single
-RUNTEST h5mkgrp_single.h5 "-v" single
-RUNTEST h5mkgrp_single.h5 "-p" single
-RUNTEST h5mkgrp_single_latest.h5 "-l" latest
+RUNTEST h5mkgrp_single_v.h5 "-v" single
+RUNTEST h5mkgrp_single_p.h5 "-p" single
+RUNTEST h5mkgrp_single_l.h5 "-l" latest
# Create several groups at root level
RUNTEST h5mkgrp_several.h5 " " one two
-RUNTEST h5mkgrp_several.h5 "-v" one two
-RUNTEST h5mkgrp_several.h5 "-p" one two
-RUNTEST h5mkgrp_several_latest.h5 "-l" one two
+RUNTEST h5mkgrp_several_v.h5 "-v" one two
+RUNTEST h5mkgrp_several_p.h5 "-p" one two
+RUNTEST h5mkgrp_several_l.h5 "-l" one two
# Create various nested groups
-RUNTEST h5mkgrp_nested.h5 "-p" /one/two
-RUNTEST h5mkgrp_nested_latest.h5 "-lp" /one/two
-RUNTEST h5mkgrp_nested_mult.h5 "-p" /one/two /three/four
-RUNTEST h5mkgrp_nested_mult_latest.h5 "-lp" /one/two /three/four
+RUNTEST h5mkgrp_nested_p.h5 "-p" /one/two
+RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two
+RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four
+RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four
if test $nerrors -eq 0 ; then
diff --git a/tools/testfiles/h5mkgrp_help.ls b/tools/testfiles/h5mkgrp_help.ls
deleted file mode 100644
index ad2bd0f..0000000
--- a/tools/testfiles/h5mkgrp_help.ls
+++ /dev/null
@@ -1,4 +0,0 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_help.h5'
-#############################
-../testfiles/h5mkgrp_help.h5: unable to open file
diff --git a/tools/testfiles/h5mkgrp_nested_latest.ls b/tools/testfiles/h5mkgrp_nested_lp.ls
index c00292d..1fe8ce8 100644
--- a/tools/testfiles/h5mkgrp_nested_latest.ls
+++ b/tools/testfiles/h5mkgrp_nested_lp.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_nested_latest.h5'
-#############################
-Opened "../testfiles/h5mkgrp_nested_latest.h5" with sec2 driver.
+Opened "h5mkgrp_nested_lp.h5" with sec2 driver.
/ Group
Location: 1:48
Links: 1
diff --git a/tools/testfiles/h5mkgrp_nested_mult_latest.ls b/tools/testfiles/h5mkgrp_nested_mult_lp.ls
index 0b19ff9..50380ec 100644
--- a/tools/testfiles/h5mkgrp_nested_mult_latest.ls
+++ b/tools/testfiles/h5mkgrp_nested_mult_lp.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_nested_mult_latest.h5'
-#############################
-Opened "../testfiles/h5mkgrp_nested_mult_latest.h5" with sec2 driver.
+Opened "h5mkgrp_nested_mult_lp.h5" with sec2 driver.
/ Group
Location: 1:48
Links: 1
diff --git a/tools/testfiles/h5mkgrp_nested_mult.ls b/tools/testfiles/h5mkgrp_nested_mult_p.ls
index 6a22ffd..f2b3b4b 100644
--- a/tools/testfiles/h5mkgrp_nested_mult.ls
+++ b/tools/testfiles/h5mkgrp_nested_mult_p.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_nested_mult.h5'
-#############################
-Opened "../testfiles/h5mkgrp_nested_mult.h5" with sec2 driver.
+Opened "h5mkgrp_nested_mult_p.h5" with sec2 driver.
/ Group
Location: 1:96
Links: 1
diff --git a/tools/testfiles/h5mkgrp_nested.ls b/tools/testfiles/h5mkgrp_nested_p.ls
index 472656d..3034dbb 100644
--- a/tools/testfiles/h5mkgrp_nested.ls
+++ b/tools/testfiles/h5mkgrp_nested_p.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_nested.h5'
-#############################
-Opened "../testfiles/h5mkgrp_nested.h5" with sec2 driver.
+Opened "h5mkgrp_nested_p.h5" with sec2 driver.
/ Group
Location: 1:96
Links: 1
diff --git a/tools/testfiles/h5mkgrp_several.ls b/tools/testfiles/h5mkgrp_several.ls
index bbf5c92..68a3f9c 100644
--- a/tools/testfiles/h5mkgrp_several.ls
+++ b/tools/testfiles/h5mkgrp_several.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_several.h5'
-#############################
-Opened "../testfiles/h5mkgrp_several.h5" with sec2 driver.
+Opened "h5mkgrp_several.h5" with sec2 driver.
/ Group
Location: 1:96
Links: 1
diff --git a/tools/testfiles/h5mkgrp_several_latest.ls b/tools/testfiles/h5mkgrp_several_l.ls
index a3b5224..5e1b4be 100644
--- a/tools/testfiles/h5mkgrp_several_latest.ls
+++ b/tools/testfiles/h5mkgrp_several_l.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_several_latest.h5'
-#############################
-Opened "../testfiles/h5mkgrp_several_latest.h5" with sec2 driver.
+Opened "h5mkgrp_several_l.h5" with sec2 driver.
/ Group
Location: 1:48
Links: 1
diff --git a/tools/testfiles/h5mkgrp_several_p.ls b/tools/testfiles/h5mkgrp_several_p.ls
new file mode 100644
index 0000000..43f1ce5
--- /dev/null
+++ b/tools/testfiles/h5mkgrp_several_p.ls
@@ -0,0 +1,10 @@
+Opened "h5mkgrp_several_p.h5" with sec2 driver.
+/ Group
+ Location: 1:96
+ Links: 1
+/one Group
+ Location: 1:800
+ Links: 1
+/two Group
+ Location: 1:1832
+ Links: 1
diff --git a/tools/testfiles/h5mkgrp_several_v.ls b/tools/testfiles/h5mkgrp_several_v.ls
new file mode 100644
index 0000000..a6df87b
--- /dev/null
+++ b/tools/testfiles/h5mkgrp_several_v.ls
@@ -0,0 +1,10 @@
+Opened "h5mkgrp_several_v.h5" with sec2 driver.
+/ Group
+ Location: 1:96
+ Links: 1
+/one Group
+ Location: 1:800
+ Links: 1
+/two Group
+ Location: 1:1832
+ Links: 1
diff --git a/tools/testfiles/h5mkgrp_single.ls b/tools/testfiles/h5mkgrp_single.ls
index e9932f7..f2bd01c 100644
--- a/tools/testfiles/h5mkgrp_single.ls
+++ b/tools/testfiles/h5mkgrp_single.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_single.h5'
-#############################
-Opened "../testfiles/h5mkgrp_single.h5" with sec2 driver.
+Opened "h5mkgrp_single.h5" with sec2 driver.
/ Group
Location: 1:96
Links: 1
diff --git a/tools/testfiles/h5mkgrp_single_latest.ls b/tools/testfiles/h5mkgrp_single_l.ls
index b6e6ea4..1763a61 100644
--- a/tools/testfiles/h5mkgrp_single_latest.ls
+++ b/tools/testfiles/h5mkgrp_single_l.ls
@@ -1,7 +1,4 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_single_latest.h5'
-#############################
-Opened "../testfiles/h5mkgrp_single_latest.h5" with sec2 driver.
+Opened "h5mkgrp_single_l.h5" with sec2 driver.
/ Group
Location: 1:48
Links: 1
diff --git a/tools/testfiles/h5mkgrp_single_p.ls b/tools/testfiles/h5mkgrp_single_p.ls
new file mode 100644
index 0000000..e82dc31
--- /dev/null
+++ b/tools/testfiles/h5mkgrp_single_p.ls
@@ -0,0 +1,7 @@
+Opened "h5mkgrp_single_p.h5" with sec2 driver.
+/ Group
+ Location: 1:96
+ Links: 1
+/single Group
+ Location: 1:800
+ Links: 1
diff --git a/tools/testfiles/h5mkgrp_single_v.ls b/tools/testfiles/h5mkgrp_single_v.ls
new file mode 100644
index 0000000..7360865
--- /dev/null
+++ b/tools/testfiles/h5mkgrp_single_v.ls
@@ -0,0 +1,7 @@
+Opened "h5mkgrp_single_v.h5" with sec2 driver.
+/ Group
+ Location: 1:96
+ Links: 1
+/single Group
+ Location: 1:800
+ Links: 1
diff --git a/tools/testfiles/h5mkgrp_version.ls b/tools/testfiles/h5mkgrp_version.ls
deleted file mode 100644
index 907f0ad..0000000
--- a/tools/testfiles/h5mkgrp_version.ls
+++ /dev/null
@@ -1,4 +0,0 @@
-#############################
-Expected output for 'h5ls ../testfiles/h5mkgrp_version.h5'
-#############################
-../testfiles/h5mkgrp_version.h5: unable to open file
diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h
index 7787026..57f358d 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.144"
+#define H5_PACKAGE_STRING "HDF5 1.9.148"
/* 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.144"
+#define H5_PACKAGE_VERSION "1.9.148"
/* 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.144"
+#define H5_VERSION "1.9.148"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */