[svn-r18451] Description:
Bring r18172:18446 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
#define ULLI_FORMAT_P_NOTCOMP "%-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"d not comparable\n"
|
||||
|
||||
|
||||
/* if system EPSILON is defined, use the system EPSILON; otherwise, use
|
||||
/* if system EPSILON is defined, use the system EPSILON; otherwise, use
|
||||
constants that are close to most EPSILON values */
|
||||
|
||||
#ifndef FLT_EPSILON
|
||||
@@ -167,7 +167,7 @@ static void h5diff_print_char(char ch);
|
||||
#if H5_SIZEOF_LONG_DOUBLE !=0
|
||||
typedef enum dtype_t
|
||||
{
|
||||
FLT_FLOAT,
|
||||
FLT_FLOAT,
|
||||
FLT_DOUBLE,
|
||||
FLT_LDOUBLE
|
||||
} dtype_t;
|
||||
@@ -175,7 +175,7 @@ typedef enum dtype_t
|
||||
|
||||
typedef enum dtype_t
|
||||
{
|
||||
FLT_FLOAT,
|
||||
FLT_FLOAT,
|
||||
FLT_DOUBLE
|
||||
} dtype_t;
|
||||
#endif
|
||||
@@ -227,7 +227,7 @@ hsize_t diff_array( void *_mem1,
|
||||
|
||||
if ( rank > 0 )
|
||||
{
|
||||
|
||||
|
||||
acc[rank-1]=1;
|
||||
for(j=(rank-2); j>=0; j--)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ hsize_t diff_array( void *_mem1,
|
||||
*/
|
||||
|
||||
case H5T_FLOAT:
|
||||
|
||||
|
||||
if (H5Tequal(m_type, H5T_NATIVE_FLOAT))
|
||||
nfound=diff_float(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph);
|
||||
else if (H5Tequal(m_type, H5T_NATIVE_DOUBLE))
|
||||
@@ -283,7 +283,7 @@ hsize_t diff_array( void *_mem1,
|
||||
#if H5_SIZEOF_LONG_DOUBLE !=0
|
||||
else if (H5Tequal(m_type, H5T_NATIVE_LDOUBLE))
|
||||
nfound=diff_ldouble(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
|
||||
case H5T_INTEGER:
|
||||
@@ -747,7 +747,8 @@ hsize_t diff_datum(void *_mem1,
|
||||
NULL,
|
||||
options);
|
||||
else {
|
||||
parallel_print("Warning: Comparison not possible of object types referenced: <%s> and <%s>",
|
||||
if(options->m_verbose)
|
||||
parallel_print("Warning: Comparison not possible of object types referenced: <%s> and <%s>\n",
|
||||
obj1, obj2);
|
||||
options->not_cmp = 1;
|
||||
}
|
||||
@@ -1862,7 +1863,7 @@ hsize_t diff_datum(void *_mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -1925,7 +1926,7 @@ hsize_t diff_datum(void *_mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -1991,7 +1992,7 @@ hsize_t diff_datum(void *_mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -2074,7 +2075,7 @@ hsize_t diff_datum(void *_mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -2139,7 +2140,7 @@ hsize_t diff_datum(void *_mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -2205,7 +2206,7 @@ hsize_t diff_datum(void *_mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -2889,7 +2890,7 @@ hsize_t diff_float(unsigned char *mem1,
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -2961,7 +2962,7 @@ hsize_t diff_float(unsigned char *mem1,
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3036,7 +3037,7 @@ hsize_t diff_float(unsigned char *mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3163,7 +3164,7 @@ hsize_t diff_double(unsigned char *mem1,
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3235,7 +3236,7 @@ hsize_t diff_double(unsigned char *mem1,
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3310,7 +3311,7 @@ hsize_t diff_double(unsigned char *mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3446,7 +3447,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3518,7 +3519,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -3593,7 +3594,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
|
||||
nfound++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* one is NaN, assume difference */
|
||||
else if ( isnan1==1 || isnan2==1)
|
||||
{
|
||||
@@ -5511,14 +5512,14 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
|
||||
{
|
||||
if ( options->do_nans )
|
||||
{
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* detect NaNs
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int isnan1 = my_isnan(FLT_DOUBLE,&value);
|
||||
int isnan2 = my_isnan(FLT_DOUBLE,&expected);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* we consider NaN == NaN to be true
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -5527,7 +5528,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* one is a NaN, do not compare but assume difference
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -5535,7 +5536,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
|
||||
if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (value == expected)
|
||||
@@ -5564,14 +5565,14 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
|
||||
{
|
||||
if ( options->do_nans )
|
||||
{
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* detect NaNs
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int isnan1 = my_isnan(FLT_LDOUBLE,&value);
|
||||
int isnan2 = my_isnan(FLT_LDOUBLE,&expected);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* we consider NaN == NaN to be true
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -5580,7 +5581,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* one is a NaN, do not compare but assume difference
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -5588,7 +5589,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
|
||||
if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (value == expected)
|
||||
@@ -5603,7 +5604,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
|
||||
}
|
||||
|
||||
#endif /* #if H5_SIZEOF_LONG_DOUBLE !=0 */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: equal_float
|
||||
@@ -5621,14 +5622,14 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
|
||||
{
|
||||
if ( options->do_nans )
|
||||
{
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* detect NaNs
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int isnan1 = my_isnan(FLT_FLOAT,&value);
|
||||
int isnan2 = my_isnan(FLT_FLOAT,&expected);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* we consider NaN == NaN to be true
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -5637,7 +5638,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* one is a NaN, do not compare but assume difference
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -5645,7 +5646,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
|
||||
if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (value == expected)
|
||||
@@ -5946,13 +5947,13 @@ void print_char_pos( int *ph, /* print header */
|
||||
parallel_print("[ " );
|
||||
if ( rank > 0 )
|
||||
{
|
||||
|
||||
|
||||
for ( i = 0; i < rank; i++)
|
||||
{
|
||||
parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]);
|
||||
parallel_print(" ");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5970,8 +5971,8 @@ void print_char_pos( int *ph, /* print header */
|
||||
*/
|
||||
static void h5diff_print_char(char ch)
|
||||
{
|
||||
|
||||
switch (ch)
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case '"':
|
||||
parallel_print("\\\"");
|
||||
@@ -5999,7 +6000,7 @@ static void h5diff_print_char(char ch)
|
||||
parallel_print( "%c", ch);
|
||||
else
|
||||
parallel_print( "\\%03o", ch);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user