diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 15:26:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 15:26:05 (GMT) |
commit | 2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea (patch) | |
tree | 02a4d0547091bfd3d50de4a88c03d8f841e0d524 /tools | |
parent | f7ae23e639951e27b1b02d4ce1ba65a8b77963d2 (diff) | |
download | hdf5-2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea.zip hdf5-2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea.tar.gz hdf5-2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea.tar.bz2 |
[svn-r16357] Description:
Bring r16307:16347 back from trunk into revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty)
(h5committest not required on this branch)
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/COPYING | 2 | ||||
-rwxr-xr-x | tools/h5diff/testh5diff.sh | 10 | ||||
-rw-r--r-- | tools/lib/h5diff_array.c | 100 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 2 |
4 files changed, 78 insertions, 36 deletions
diff --git a/tools/COPYING b/tools/COPYING index ef0cbaf..6903daf 100755 --- a/tools/COPYING +++ b/tools/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 2089321..811b9d8 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -65,6 +65,7 @@ DIFF='diff -c' nerrors=0 verbose=yes pmode= # default to run h5diff tests +mydomainname=`domainname 2>/dev/null` # The build (current) directory might be different than the source directory. if test -z "$srcdir"; then @@ -561,8 +562,13 @@ TESTING $H5DIFF -v $SRCFILE2 $SRCFILE2 TOOLTEST h5diff_90.txt -v $FILE2 $FILE2 # 10. read by hyperslab, print indexes -TESTING $H5DIFF -v $SRCFILE9 $SRCFILE10 -TOOLTEST h5diff_100.txt -v $FILE9 $FILE10 +if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then + # skip this test which sometimes hangs in some THG machines + SKIP -v $SRCFILE9 $SRCFILE10 +else + TESTING $H5DIFF -v $SRCFILE9 $SRCFILE10 + TOOLTEST h5diff_100.txt -v $FILE9 $FILE10 +fi # 11. floating point comparison TESTING $H5DIFF -v $SRCFILE1 $SRCFILE1 g1/d1 g1/d2 diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index e5f065c..5481d23 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1825,8 +1825,8 @@ hsize_t diff_datum(void *_mem1, { float temp1_float; float temp2_float; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; assert(type_size==sizeof(float)); @@ -1847,8 +1847,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -1877,8 +1880,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -1927,8 +1933,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -1992,8 +2001,8 @@ hsize_t diff_datum(void *_mem1, { double temp1_double; double temp2_double; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; assert(type_size==sizeof(double)); @@ -2014,8 +2023,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2045,8 +2057,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2095,8 +2110,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2163,8 +2181,8 @@ hsize_t diff_datum(void *_mem1, { long double temp1_double; long double temp2_double; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; assert(type_size==sizeof(long double)); @@ -2185,8 +2203,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2216,8 +2237,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2266,8 +2290,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2755,8 +2782,8 @@ hsize_t diff_float(unsigned char *mem1, hsize_t i; double per; int both_zero; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; /*------------------------------------------------------------------------- @@ -2775,8 +2802,11 @@ hsize_t diff_float(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -2813,8 +2843,11 @@ hsize_t diff_float(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -2872,8 +2905,11 @@ hsize_t diff_float(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 71a2449..52d65fe 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -525,7 +525,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, * Deref in h5tools_str_sprint() instead so recursive types are * handled correctly. * - * Pedro Vicente Nunes, THG, 2005-10-19 + * Pedro Vicente Nunes, The HDF Group, 2005-10-19 * pass to the prefix in h5tools_simple_prefix the total position * instead of the current stripmine position i; this is necessary * to print the array indices |