mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r23495] ported revisions 23433:23494 from the trunk
This commit is contained in:
parent
ed621aae38
commit
6c974c824d
1
MANIFEST
1
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
|
||||
|
@ -249,6 +249,39 @@ int H5Location::getNumAttrs() const
|
||||
return( (int)oinfo.num_attrs );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
@ -1352,6 +1372,53 @@ static void test_string_attr()
|
||||
}
|
||||
} // 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()
|
||||
|
||||
|
48
config/apple
48
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/'`
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
!----------------------------------------------------------------------
|
||||
|
@ -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
|
||||
---------------------
|
||||
|
@ -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)"
|
||||
|
@ -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)
|
||||
|
@ -2174,7 +2174,7 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
static herr_t
|
||||
H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
|
||||
{
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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++;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user