diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-29 19:56:24 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-29 19:56:24 (GMT) |
commit | 840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4 (patch) | |
tree | f6f2b44f8511cc8cc2ce3eb00575f7f709c7d76c /tools | |
parent | 13294e2042f855e92653dc7ca3ff3b5980ee816d (diff) | |
download | hdf5-840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4.zip hdf5-840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4.tar.gz hdf5-840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4.tar.bz2 |
[svn-r15989] Merge with 1.8 up to rev 15945
Regarding use of unsigned long long print format
Tested: linux
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff_array.c | 48 | ||||
-rw-r--r-- | tools/lib/h5diff_dset.c | 26 | ||||
-rw-r--r-- | tools/lib/h5diff_util.c | 11 |
3 files changed, 11 insertions, 74 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 0629c3e..02a260e 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -17,16 +17,12 @@ #include "h5diff.h" #include "ph5diff.h" #include "H5private.h" +#include "h5tools.h" + #include <sys/timeb.h> #include <time.h> -#if 0 -#define H5DIFF_DO_TIME -#endif -#if 1 -#define H5DIFF_DO_NAN -#endif /*------------------------------------------------------------------------- * printf formatting @@ -247,7 +243,8 @@ void print_pos( int *ph, /* print header */ parallel_print("[ " ); for ( i = 0; i < rank; i++) { - parallel_print("%"H5_PRINTF_LL_WIDTH"u ", (unsigned long_long)pos[i]); + parallel_print(HSIZE_T_FORMAT, (unsigned long_long)pos[i]); + parallel_print(" "); } parallel_print("]" ); } @@ -2999,20 +2996,7 @@ hsize_t diff_float(unsigned char *mem1, else { -#if defined (H5DIFF_DO_TIME) - int time; - #if defined (WIN32) - struct _timeb *tbstart = malloc(sizeof(struct _timeb)); - struct _timeb *tbstop = malloc(sizeof(struct _timeb)); - _ftime( tbstart); - #else - struct timeb *tbstart = malloc(sizeof(struct timeb)); - struct timeb *tbstop = malloc(sizeof(struct timeb)); - ftime( tbstart); - #endif - -#endif for ( i = 0; i < nelmts; i++) { @@ -3040,18 +3024,6 @@ hsize_t diff_float(unsigned char *mem1, -#if defined (H5DIFF_DO_TIME) - - #if defined (WIN32) - _ftime( tbstop ); - #else - ftime( tbstop ); - #endif - - time = tbstop->time - tbstart->time; - printf(" TIME = %d sec\n", time ); - -#endif } @@ -5289,8 +5261,6 @@ hbool_t equal_double(double value, double expected) int both_zero; int is_zero; -#if defined (H5DIFF_DO_NAN) - /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -5321,8 +5291,6 @@ hbool_t equal_double(double value, double expected) *------------------------------------------------------------------------- */ -#endif - BOTH_ZERO(value,expected) if (both_zero) return TRUE; @@ -5354,8 +5322,6 @@ hbool_t equal_ldouble(long double value, long double expected) int both_zero; int is_zero; -#if defined (H5DIFF_DO_NAN) - /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -5386,8 +5352,6 @@ hbool_t equal_ldouble(long double value, long double expected) *------------------------------------------------------------------------- */ -#endif - BOTH_ZERO(value,expected) if (both_zero) return TRUE; @@ -5423,8 +5387,6 @@ hbool_t equal_float(float value, float expected) int both_zero; int is_zero; -#if defined (H5DIFF_DO_NAN) - /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -5455,8 +5417,6 @@ hbool_t equal_float(float value, float expected) *------------------------------------------------------------------------- */ -#endif - BOTH_ZERO(value,expected) if (both_zero) return TRUE; diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 38b7f16..212f089 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -18,32 +18,6 @@ #include "H5private.h" #include "h5tools.h" -/*------------------------------------------------------------------------- -* Function: print_size -* -* Purpose: print dimensions -* -*------------------------------------------------------------------------- -*/ -#if defined (H5DIFF_DEBUG) -static void -print_size (int rank, hsize_t *dims) -{ - int i; - - parallel_print("[" ); - for ( i = 0; i < rank-1; i++) - { - parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]); - parallel_print("x"); - } - parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]); - parallel_print("]\n" ); - -} -#endif /* H5DIFF_DEBUG */ - - /*------------------------------------------------------------------------- * Function: diff_dataset diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index f1e5f54..24c8df1 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -16,6 +16,8 @@ #include "h5diff.h" #include "ph5diff.h" #include "H5private.h" +#include "h5tools.h" + /* global variables */ int g_nTasks = 1; @@ -100,15 +102,16 @@ void parallel_print(const char* format, ...) void print_dimensions (int rank, hsize_t *dims) { - int i; - + int i; + parallel_print("[" ); for ( i = 0; i < rank-1; i++) { - parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]); + parallel_print(HSIZE_T_FORMAT, dims[i]); parallel_print("x"); } - parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]); + + parallel_print(HSIZE_T_FORMAT, dims[rank-1]); parallel_print("]" ); } |