diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-04-19 17:24:43 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-04-19 17:24:43 (GMT) |
commit | 0e1e79f0e02606364018806d465d48eed8ffd153 (patch) | |
tree | c7bffe852a3f284a397638536558b2a198a8bfdb /tools/h5repack | |
parent | 14d8e1c2b5ecaf2e298984f269094dd5f2bd735f (diff) | |
download | hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.zip hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.gz hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.bz2 |
[svn-r23601] Bring revisions #23341 - 23597 from trunk to revise_chunks.
h5committtested.
Diffstat (limited to 'tools/h5repack')
-rw-r--r-- | tools/h5repack/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/h5repack/h5repack.sh.in | 34 | ||||
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 10 |
3 files changed, 43 insertions, 13 deletions
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 156f6d8..06c6b71 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -881,6 +881,18 @@ ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIM # file input - should not fail ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) +#-------------------------------------------------------------------------- +# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset +# (dset size < 64K) and with unlimited max dims on a condition as follow. +# (HDFFV-8214) +#-------------------------------------------------------------------------- +# chunk dim is bigger than dataset dim. should succeed. +ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) +# chunk dim is smaller than dataset dim. should succeed. +ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) + + + # Native option # Do not use FILE1, as the named dtype will be converted to native, and h5diff will # report a difference. diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index dc90426..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 @@ -891,6 +907,18 @@ VERIFY_LAYOUT_DSET error3 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f ch # file input - should not fail TOOLTEST error4 h5repack_layout3.h5 -f NONE +#-------------------------------------------------------------------------- +# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset +# (dset size < 64K) and with unlimited max dims on a condition as follow. +# (HDFFV-8214) +#-------------------------------------------------------------------------- + +# chunk dim is bigger than dataset dim. should succeed. +VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI +# chunk dim is smaller than dataset dim. should succeed. +VERIFY_LAYOUT_DSET ckdim_smaller h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI + + # Native option # Do not use FILE1, as the named dtype will be converted to native, and h5diff will # report a difference. diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 02337fd..f9dd334 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -1017,16 +1017,6 @@ int do_copy_objects(hid_t fidin, /* get the storage size of the input dataset */ dsize_in=H5Dget_storage_size(dset_in); - /* check for small size datasets (less than 1k) except - * changing to COMPACT. For the reference, COMPACT is limited - * by size 64K by library. - */ - if (options->layout_g != H5D_COMPACT) - { - if ( size_dset < options->min_comp ) - apply_s=0; - } - /* apply the filter */ if (apply_s) { |