summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-29 23:13:05 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-29 23:13:05 (GMT)
commit6c974c824db0c4b97a5ec5e03726ebe4a2198ad9 (patch)
treea89f756228cc72486ff1e71fbc68fd29baa01ba3
parented621aae38837e90c7273087de22f1752eee7cc7 (diff)
downloadhdf5-6c974c824db0c4b97a5ec5e03726ebe4a2198ad9.zip
hdf5-6c974c824db0c4b97a5ec5e03726ebe4a2198ad9.tar.gz
hdf5-6c974c824db0c4b97a5ec5e03726ebe4a2198ad9.tar.bz2
[svn-r23495] ported revisions 23433:23494 from the trunk
-rw-r--r--MANIFEST1
-rw-r--r--c++/src/H5Location.cpp33
-rw-r--r--c++/src/H5Location.h10
-rw-r--r--c++/test/tattr.cpp76
-rw-r--r--config/apple48
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/tf.f9011
-rw-r--r--release_docs/INSTALL_parallel67
-rw-r--r--release_docs/RELEASE.txt4
-rw-r--r--src/H5AC.c6
-rw-r--r--src/H5Dchunk.c2
-rw-r--r--src/H5HFsection.c2
-rw-r--r--src/H5Pfapl.c6
-rw-r--r--tools/h5copy/testh5copy.sh.in10
-rw-r--r--tools/h5diff/ph5diff_main.c5
-rw-r--r--tools/h5repack/h5repack.sh.in22
-rw-r--r--tools/lib/h5tools_dump.c16
-rw-r--r--tools/testfiles/tfletcher32.ddl2
-rw-r--r--tools/testfiles/tshuffle.ddl2
-rw-r--r--tools/testfiles/tuserfilter.ddl4
20 files changed, 286 insertions, 42 deletions
diff --git a/MANIFEST b/MANIFEST
index c0e8bdf..4fde6b7 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -962,6 +962,7 @@
./test/dtypes.c
./test/dtransform.c
./test/dynlib1.c
+./test/dynlib2.c
./test/earray.c
./test/efc.c
./test/enc_dec_plist.c
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index b93cd86..98878d7 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -250,6 +250,39 @@ int H5Location::getNumAttrs() const
}
//--------------------------------------------------------------------------
+// Function: H5Location::attrExists
+///\brief Checks whether the named attribute exists at this location.
+///\param name - IN: Name of the attribute to be queried
+///\exception H5::AttributeIException
+// Programmer Binh-Minh Ribler - 2013
+//--------------------------------------------------------------------------
+bool H5Location::attrExists(const char* name) const
+{
+ // Call C routine H5Aexists to determine whether an attribute exists
+ // at this location, which could be specified by a file, group, dataset,
+ // or named datatype.
+ herr_t ret_value = H5Aexists(getId(), name);
+ if( ret_value > 0 )
+ return true;
+ else if(ret_value == 0)
+ return false;
+ else // Raise exception when H5Aexists returns a negative value
+ throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::attrExists
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function in that it takes
+/// a reference to an \c H5std_string for \a name.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+bool H5Location::attrExists(const H5std_string& name) const
+{
+ return(attrExists(name.c_str()));
+}
+
+//--------------------------------------------------------------------------
// Function: H5Location::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index d1dd892..8eae454 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -79,11 +79,15 @@ class H5_DLLCPP H5Location : public IdComponent {
// misleading, so getRefObjType is used in the new function instead.
// Iterate user's function over the attributes at this location.
- int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
+ int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
+
+ // Checks whether the named attribute exists at this location.
+ bool attrExists(const char* name) const;
+ bool attrExists(const H5std_string& name) const;
// Removes the named attribute from this location.
- void removeAttr( const char* name ) const;
- void removeAttr( const H5std_string& name ) const;
+ void removeAttr(const char* name) const;
+ void removeAttr(const H5std_string& name) const;
// Renames the named attribute to a new name.
void renameAttr(const char* oldname, const char* newname) const;
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 1a15aea..7e77e85 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -252,14 +252,19 @@ static void test_attr_rename()
int read_data1[ATTR1_DIM1]={0}; // Buffer for reading the attribute
int i;
- // Output message about test being performed
- SUBTEST("Rename Attribute Function");
+ // Output message about test being performed
+ SUBTEST("Checking for Existence and Renaming Attribute");
try {
// Open file
H5File fid1(FILE_BASIC, H5F_ACC_RDWR);
- // Check rename of attribute belonging to a file
+ // Check and rename attribute belonging to a file
+
+ // Check for existence of attribute
+ bool attr_exists = fid1.attrExists(FATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
// Change attribute name
fid1.renameAttr(FATTR1_NAME, FATTR_TMP_NAME);
@@ -280,7 +285,12 @@ static void test_attr_rename()
// Open the dataset
DataSet dataset = fid1.openDataSet(DSET1_NAME);
- // Check rename of attribute belonging to a dataset
+ // Check and rename attribute belonging to a dataset
+
+ // Check for existence of attribute
+ attr_exists = dataset.attrExists(ATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
// Change attribute name
dataset.renameAttr(ATTR1_NAME, ATTR_TMP_NAME);
@@ -303,6 +313,11 @@ static void test_attr_rename()
// Close attribute
attr1.close();
+ // Check for existence of second attribute
+ attr_exists = dataset.attrExists(ATTR2_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
+
// Open the second attribute
Attribute attr2(dataset.openAttribute(ATTR2_NAME));
@@ -324,6 +339,11 @@ static void test_attr_rename()
// Change first attribute back to the original name
dataset.renameAttr(ATTR_TMP_NAME, ATTR1_NAME);
+ // Check for existence of attribute after renaming
+ attr_exists = dataset.attrExists(ATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
+
PASSED();
} // end try block
@@ -1354,6 +1374,53 @@ static void test_string_attr()
/****************************************************************
**
+** test_attr_exists(): Test checking for attribute existence.
+** (additional attrExists tests are in test_attr_rename())
+**
+****************************************************************/
+static void test_attr_exists()
+{
+ // Output message about test being performed
+ SUBTEST("Check Attribute Existence");
+
+ try {
+ // Open file.
+ H5File fid1(FILE_BASIC, H5F_ACC_RDWR);
+
+ // Open the root group.
+ Group root = fid1.openGroup("/");
+
+ // Check for existence of attribute
+ bool attr_exists = fid1.attrExists(ATTR1_FL_STR_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "fid1, ATTR1_FL_STR_NAMEAttribute should exist but does not");
+
+ // Check for existence of attribute
+ attr_exists = fid1.attrExists(FATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "fid1,FATTR2_NAMEAttribute should exist but does not");
+
+ // Open a group.
+ Group group = fid1.openGroup(GROUP1_NAME);
+
+ // Check for existence of attribute
+ attr_exists = group.attrExists(ATTR2_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "group, ATTR2_NAMEAttribute should exist but does not");
+
+ PASSED();
+ } // end try block
+
+ catch (InvalidActionException E) {
+ issue_fail_msg("test_attr_exists()", __LINE__, __FILE__, E.getCDetailMsg());
+ }
+ catch (Exception E) {
+ issue_fail_msg("test_attr_exists()", __LINE__, __FILE__, E.getCDetailMsg());
+ }
+} // test_attr_exists()
+
+/****************************************************************
+**
** test_attr(): Main attribute testing routine.
**
****************************************************************/
@@ -1382,6 +1449,7 @@ void test_attr()
test_attr_dtype_shared(); // Test using shared datatypes in attributes
test_string_attr(); // Test read/write string attribute
+ test_attr_exists(); // Test H5Location::attrExists
} // test_attr()
diff --git a/config/apple b/config/apple
index c5c0a19..ac93ea5 100644
--- a/config/apple
+++ b/config/apple
@@ -20,17 +20,25 @@
#
# See BlankForm in this directory for details.
-# The default compiler is `gcc'
+# The default compiler is `clang'.
+# No support for OS older than darwin 10.X.
if test "X-" = "X-$CC"; then
- CC=gcc
- CC_BASENAME=gcc
+ case "$host_os" in
+ darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available.
+ CC=gcc
+ CC_BASENAME=gcc
+ ;;
+ *)
+ CC=clang
+ CC_BASENAME=clang
+ ;;
+ esac
fi
# Figure out compiler flags
. $srcdir/config/gnu-flags
# temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not
# use -O option as it causes failures in test/dt_arith.
-#echo host_os=$host_os
case "$host_os" in
darwin1[12].*) # lion & mountain lion
#echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
@@ -48,6 +56,11 @@ esac
. $srcdir/config/intel-flags
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
+ clang)
+ # clang has no fortran compiler. Use gfortran.
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
gcc*)
FC=gfortran
FC_BASENAME=gfortran
@@ -59,8 +72,30 @@ if test "X-" = "X-$FC"; then
esac
fi
+if test "X-" = "X-$CXX"; then
+ case $CC_BASENAME in
+ clang)
+ CXX=clang++
+ CXX_BASENAME=clang++
+ ;;
+ gcc)
+ CXX=g++
+ CXX_BASENAME=g++
+ ;;
+ icc)
+ CXX=icpc
+ CXX_BASENAME=icpc
+ ;;
+ esac
+fi
+
# compiler version strings
case $CC in
+ clang)
+ cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\
+ grep 'Apple' | sed 's/(.*//'`
+ ;;
+
*gcc*)
cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
@@ -97,6 +132,11 @@ esac
# get c++ version info
case $CXX in
+ clang++)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
+ grep 'Apple' | sed 's/(.*//'`
+ ;;
+
*g++*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 4ce185b..62030f0 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -6,6 +6,7 @@ H5LIB_mp_H5GET_LIBVERSION_F
H5LIB_mp_H5CHECK_VERSION_F
H5LIB_mp_H5GARBAGE_COLLECT_F
H5LIB_mp_H5DONT_ATEXIT_F
+H5LIB_mp_H5KIND_TO_TYPE
@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF
; H5_DBLE_INTERFACE
H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index d5c32c8..4f73fda 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -30,7 +30,7 @@
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify_real
+!DEC$attributes dllexport :: verify_real_kind_7
!DEC$endif
SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error)
USE HDF5
@@ -115,7 +115,7 @@ END SUBROUTINE verify
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify
+!DEC$attributes dllexport :: verify_Fortran_INTEGER_4
!DEC$endif
SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
USE HDF5
@@ -129,9 +129,6 @@ SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
RETURN
END SUBROUTINE verify_Fortran_INTEGER_4
-
-
-
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyLogical
@@ -151,7 +148,7 @@ END SUBROUTINE verifyLogical
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyString
!DEC$endif
-SUBROUTINE verifystring(string, value,correct_value,total_error)
+SUBROUTINE verifyString(string, value,correct_value,total_error)
CHARACTER*(*) :: string
CHARACTER*(*) :: value, correct_value
INTEGER :: total_error
@@ -160,7 +157,7 @@ SUBROUTINE verifystring(string, value,correct_value,total_error)
WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
ENDIF
RETURN
-END SUBROUTINE verifystring
+END SUBROUTINE verifyString
!----------------------------------------------------------------------
diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel
index eacaf68..03b3ecf 100644
--- a/release_docs/INSTALL_parallel
+++ b/release_docs/INSTALL_parallel
@@ -186,6 +186,73 @@ TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5
echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5
======== end of bypass ========
+2.5. Hopper (Cray XE6) (for v1.8 and later)
+-------------------------
+
+2.5.1 Building HDF5 for Hopper
+------------------------------------------
+The following steps are for building HDF5 for the Hopper compute
+nodes. They would probably work for other Cray XE6 systems but have
+not been verified.
+
+Obtain a copy from the HDF ftp server:
+http://www.hdfgroup.org/ftp/HDF5/current/src/
+(link might change, so always double check the HDF group website).
+
+$ wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-x.x.x.tar.gz
+
+unpack the tarball
+
+$ cd hdf5-x.x.x/
+$ CC=cc FC=ftn ./configure \
+--prefix=/project/hdf5/hdf5 --enable-parallel --enable-fortran \
+--disable-shared --disable-production
+$ make
+
+Run make check. make check should be run on the compute nodes, not the
+front end nodes. So using a PBS batch script, allocate 4 or more
+cores. Always consult with the machine's website on how to create PBS
+scripts and allocate nodes for your job. For Hopper, all the
+information can be found on:
+http://www.nersc.gov/systems/hopper-cray-xe6/
+
+save the PBS script into your HDF5 build directory. The PBS script
+should contain (besides the PBS node allocation requests)the
+following:
+
+--------------------------------------------------------------
+cd $PBS_O_WORKDIR
+
+##set RUNSERIAL and RUNPARALLEL like this in the PBS script:
+export RUNPARALLEL="aprun -n 6"
+export RUNSERIAL="aprun -n 1"
+
+##execute make check:
+make check
+--------------------------------------------------------------
+
+Once the job runs and all is well, install the binary:
+$ make install
+
+2.5.2 Hopper known issues
+------------------------------
+Sometimes when building the library with make, you might get this problem:
+
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo | \
+sed -e 's/-L/:/g' -e 's/
+//g'`" \
+./H5make_libsettings > H5lib_settings.c
+|| \
+(test $HDF5_Make_Ignore && echo "*** Error ignored")
+|| \
+(rm -f H5lib_settings.c ; exit 1)
+/bin/sh: line 4: 9644 Segmentation fault
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo | sed -e 's/-L/:/g' -e 's/
+//g'`" ./H5make_libsettings > H5lib_settings.c
+
+If that happens, you are probable running with make -j <x>. In that
+case, you need to cleanup everything and start again as detailed above
+but use serial make (do not use -j <x>).
3. Detail explanation
---------------------
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 8a54b21..dbd3b75 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -276,6 +276,10 @@ New Features
Tools:
------
+ - h5dump: Fixed displaying comporession ratio for unknown or user-defined
+ filters. HDFFV-8344 (XCAO 2013/03/19)
+ - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined filter.
+ HDFFV-8346 (XCAO 2013/03/19)
- h5dump: Added capability for "-a" option to show attributes containing "/"
by using an escape character. For example, for a dataset "/dset"
containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)"
diff --git a/src/H5AC.c b/src/H5AC.c
index ed79813..db8446a 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -2998,7 +2998,7 @@ done:
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_PARALLEL
-herr_t
+static herr_t
H5AC_construct_candidate_list(H5AC_t * cache_ptr,
H5AC_aux_t * aux_ptr,
int sync_point_op)
@@ -3212,7 +3212,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
H5C_auto_size_ctl_t * int_conf_ptr)
{
@@ -4157,7 +4157,7 @@ done:
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_PARALLEL
-herr_t
+static herr_t
H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
hid_t dxpl_id,
H5AC_t * cache_ptr)
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index e3f060a..497846b 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -2174,7 +2174,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 72ea100..bf779a6 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -449,7 +449,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 4faed4f..befec84 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -2267,7 +2267,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5P_file_image_info_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value)
{
H5FD_file_image_info_t info; /* Image info struct */
@@ -2321,7 +2321,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5P_file_image_info_copy(const char UNUSED *name, size_t UNUSED size, void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2396,7 +2396,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5P_file_image_info_close(const char UNUSED *name, size_t UNUSED size, void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/tools/h5copy/testh5copy.sh.in b/tools/h5copy/testh5copy.sh.in
index d30d8d8..bec3bfc 100644
--- a/tools/h5copy/testh5copy.sh.in
+++ b/tools/h5copy/testh5copy.sh.in
@@ -513,7 +513,7 @@ COPY_REFERENCES()
TESTFILE="$TESTDIR/h5copy_ref.h5"
echo "Test copying object and region references"
- TOOLTEST_F -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
+ TOOLTEST -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
}
# Copy external links.
@@ -529,25 +529,25 @@ COPY_EXT_LINKS()
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 -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
+ TOOLTEST -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 $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 -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
+ TOOLTEST -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 $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 -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
+ TOOLTEST -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 $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 -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
}
# Test misc.
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index 1fc563b..b9bd404 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -275,6 +275,9 @@ void h5diff_exit(int status)
if(g_Parallel)
MPI_Finalize();
- exit(status);
+ /* Always exit(0), since MPI implementations do weird stuff when they
+ * receive a non-zero exit value. - QAK
+ */
+ exit(0);
}
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 14e1d04..ca25183 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -244,8 +244,11 @@ VERIFY_LAYOUT_DSET()
shift
shift
shift
-
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -266,6 +269,7 @@ VERIFY_LAYOUT_DSET()
echo " PASSED"
else
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
fi
# clean up tmp files
@@ -277,6 +281,7 @@ VERIFY_LAYOUT_DSET()
# Verifying layouts from entire file
VERIFY_LAYOUT_ALL()
{
+ infile=$2
outfile=$TESTDIR/out-$1.$2
layoutfile=$TESTDIR/layout-$1.$2
expectlayout=$3
@@ -284,7 +289,10 @@ VERIFY_LAYOUT_ALL()
shift
shift
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -300,6 +308,7 @@ VERIFY_LAYOUT_ALL()
# check if the other layouts still exsit
VERIFY "layouts"
(
+ echo
# if CONTIGUOUS
if [ $expectlayout = "CONTIGUOUS" ]; then
TESTING $H5DUMP_BIN -pH $outfile
@@ -309,10 +318,12 @@ VERIFY_LAYOUT_ALL()
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -327,10 +338,12 @@ VERIFY_LAYOUT_ALL()
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -345,10 +358,12 @@ VERIFY_LAYOUT_ALL()
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -523,6 +538,7 @@ TOOLTEST_META()
else
#fail
echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
fi
rm -f $outfile
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index dbb5f98..d6cd0a0 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2958,11 +2958,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
/* only print the compression ratio for these filters */
- for(i = 0; i < nfilters; i++) {
+ for(i = 0; i < nfilters && !ok; i++) {
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
-
+ ok = (filtn>=0);
+
+ /* this following code will not show compression ratio for
+ user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org
switch(filtn) {
case H5Z_FILTER_DEFLATE:
case H5Z_FILTER_SZIP:
@@ -2971,6 +2974,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
ok = 1;
break;
}
+ */
}
if(ndims && ok) {
@@ -3148,6 +3152,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
+
+ if (filtn<0)
+ continue; /* nothing to print for invalid filter */
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
@@ -3241,10 +3248,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
break;
default:
+ /* filter do not have to be avaiable for showing registered filter info.
+ see HDFFV-8346 for details. --xcao@hdfgroup.org
if(H5Zfilter_avail(filtn))
h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN);
else
- h5tools_str_append(&buffer, "%s %s", "UNKNOWN_FILTER", BEGIN);
+ */
+ h5tools_str_append(&buffer, "%s %s", "USER_DEFINED_FILTER", BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
ctx->indent_level++;
diff --git a/tools/testfiles/tfletcher32.ddl b/tools/testfiles/tfletcher32.ddl
index 072ef23..c341ded 100644
--- a/tools/testfiles/tfletcher32.ddl
+++ b/tools/testfiles/tfletcher32.ddl
@@ -4,7 +4,7 @@ DATASET "fletcher32" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 816
+ SIZE 816 (0.980:1 COMPRESSION)
}
FILTERS {
CHECKSUM FLETCHER32
diff --git a/tools/testfiles/tshuffle.ddl b/tools/testfiles/tshuffle.ddl
index cd1b5f8..5c183fe 100644
--- a/tools/testfiles/tshuffle.ddl
+++ b/tools/testfiles/tshuffle.ddl
@@ -4,7 +4,7 @@ DATASET "shuffle" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 800
+ SIZE 800 (1.000:1 COMPRESSION)
}
FILTERS {
PREPROCESSING SHUFFLE
diff --git a/tools/testfiles/tuserfilter.ddl b/tools/testfiles/tuserfilter.ddl
index 07b478f..24745b9 100644
--- a/tools/testfiles/tuserfilter.ddl
+++ b/tools/testfiles/tuserfilter.ddl
@@ -4,10 +4,10 @@ DATASET "myfilter" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 800
+ SIZE 800 (1.000:1 COMPRESSION)
}
FILTERS {
- UNKNOWN_FILTER {
+ USER_DEFINED_FILTER {
FILTER_ID 405
COMMENT myfilter
PARAMS { 5 6 }