diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-11-10 22:27:51 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-11-10 22:27:51 (GMT) |
commit | 376d1b62d976e1689eae72735c6783b8b82f3aa5 (patch) | |
tree | 8dc797110d728cabfe76ef8e653c8ab90c190b57 /test/iopipe.c | |
parent | 38865598298878b740e6cdc1fbd60f4f386f5c71 (diff) | |
download | hdf5-376d1b62d976e1689eae72735c6783b8b82f3aa5.zip hdf5-376d1b62d976e1689eae72735c6783b8b82f3aa5.tar.gz hdf5-376d1b62d976e1689eae72735c6783b8b82f3aa5.tar.bz2 |
[svn-r2862] Purpose:
Bug fix.
Description:
Had been using older-style "HAVE_foo" macros instead of newer "H5_HAVE_foo"
macros.
Solution:
Added a "H5_" to all the "HAVE_foo" macros.
Platforms tested:
FreeBSD 4.1.1 (hawkwind)
Diffstat (limited to 'test/iopipe.c')
-rw-r--r-- | test/iopipe.c | 103 |
1 files changed, 52 insertions, 51 deletions
diff --git a/test/iopipe.c b/test/iopipe.c index 7b78df1..ed81eaa 100644 --- a/test/iopipe.c +++ b/test/iopipe.c @@ -79,22 +79,22 @@ * *------------------------------------------------------------------------- */ -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE static void print_stats (const char *prefix, struct rusage *r_start, struct rusage *r_stop, struct timeval *t_start, struct timeval *t_stop, size_t nbytes) -#else /* HAVE_GETRUSAGE */ +#else /* H5_HAVE_GETRUSAGE */ static void print_stats (const char *prefix, struct timeval *r_start, struct timeval *r_stop, struct timeval *t_start, struct timeval *t_stop, size_t nbytes) -#endif /* HAVE_GETRUSAGE */ +#endif /* H5_HAVE_GETRUSAGE */ { double e_time, bw; -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE double u_time, s_time; u_time = ((double)(r_stop->ru_utime.tv_sec)+ @@ -107,7 +107,7 @@ print_stats (const char *prefix, ((double)(r_start->ru_stime.tv_sec)+ (double)(r_start->ru_stime.tv_usec)/1000000.0); #endif -#ifndef HAVE_SYS_TIMEB +#ifndef H5_HAVE_SYS_TIMEB e_time = ((double)(t_stop->tv_sec)+ (double)(t_stop->tv_usec)/1000000.0) - ((double)(t_start->tv_sec)+ @@ -120,7 +120,7 @@ print_stats (const char *prefix, #endif bw = (double)nbytes / e_time; -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE printf (HEADING "%1.2fuser %1.2fsystem %1.2felapsed %1.2fMB/s\n", prefix, u_time, s_time, e_time, bw/(1024*1024)); #else @@ -148,7 +148,7 @@ print_stats (const char *prefix, static void synchronize (void) { -#ifdef HAVE_SYSTEM +#ifdef H5_HAVE_SYSTEM #ifdef WIN32 _flushall(); #else @@ -192,7 +192,7 @@ main (void) unsigned char *the_data = NULL; hid_t file, dset, file_space=-1; herr_t status; -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE struct rusage r_start, r_stop; #else struct timeval r_start, r_stop; @@ -205,7 +205,7 @@ main (void) hsize_t count[2]; -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB struct _timeb *tbstart = malloc(sizeof(struct _timeb)); struct _timeb *tbstop = malloc(sizeof(struct _timeb)); #endif @@ -234,13 +234,14 @@ main (void) /* Fill raw */ synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE +printf("Before getrusage() call\n"); getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -250,13 +251,13 @@ main (void) fflush (stderr); memset (the_data, 0xAA, (size_t)(size[0]*size[1])); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; @@ -272,13 +273,13 @@ main (void) /* Fill hdf5 */ synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -290,13 +291,13 @@ main (void) H5P_DEFAULT, the_data); assert (status>=0); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; @@ -311,13 +312,13 @@ main (void) /* Write the raw dataset */ synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -330,13 +331,13 @@ main (void) n = write (fd, the_data, (size_t)(size[0]*size[1])); assert (n>=0 && (size_t)n==size[0]*size[1]); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; @@ -351,13 +352,13 @@ main (void) /* Write the hdf5 dataset */ synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -369,13 +370,13 @@ main (void) H5P_DEFAULT, the_data); assert (status>=0); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; @@ -390,13 +391,13 @@ main (void) /* Read the raw dataset */ synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -409,13 +410,13 @@ main (void) n = read (fd, the_data, (size_t)(size[0]*size[1])); assert (n>=0 && (size_t)n==size[0]*size[1]); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; @@ -431,13 +432,13 @@ main (void) /* Read the hdf5 dataset */ synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -449,13 +450,13 @@ main (void) H5P_DEFAULT, the_data); assert (status>=0); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; @@ -475,13 +476,13 @@ main (void) status = H5Sselect_hyperslab (file_space, H5S_SELECT_SET, start, NULL, count, NULL); assert (status>=0); synchronize (); -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstart); #endif #endif @@ -493,13 +494,13 @@ main (void) H5P_DEFAULT, the_data); assert (status>=0); } -#ifdef HAVE_GETRUSAGE +#ifdef H5_HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#ifdef HAVE_GETTIMEOFDAY +#ifdef H5_HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #else -#ifdef HAVE_SYS_TIMEB +#ifdef H5_HAVE_SYS_TIMEB _ftime(tbstop); t_start.tv_sec = tbstart->time; t_start.tv_usec = tbstart->millitm; |