summaryrefslogtreecommitdiffstats
path: root/tools/test/perform/chunk_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/perform/chunk_cache.c')
-rw-r--r--tools/test/perform/chunk_cache.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index fcaa337..25fa34c 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -262,13 +262,14 @@ check_partial_chunks_perf(hid_t file)
end_t = H5_get_time();
- if ((end_t - start_t) > (double)0.0f)
- printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
- (end_t - start_t), nbytes_global);
+ if ((end_t - start_t) > 0.0)
+ HDprintf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
+ (end_t - start_t), nbytes_global);
else
- printf("1. Partial chunks: no total read time because timer is not available; number of bytes being "
- "read from file is %zu\n",
- nbytes_global);
+ HDprintf(
+ "1. Partial chunks: no total read time because timer is not available; number of bytes being "
+ "read from file is %zu\n",
+ nbytes_global);
H5Dclose(dataset);
H5Sclose(filespace);
@@ -340,13 +341,14 @@ check_hash_value_perf(hid_t file)
end_t = H5_get_time();
- if ((end_t - start_t) > (double)0.0f)
- printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
- (end_t - start_t), nbytes_global);
+ if ((end_t - start_t) > 0.0)
+ HDprintf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
+ (end_t - start_t), nbytes_global);
else
- printf("2. Hash value: no total read time because timer is not available; number of bytes being read "
- "from file is %zu\n",
- nbytes_global);
+ HDprintf(
+ "2. Hash value: no total read time because timer is not available; number of bytes being read "
+ "from file is %zu\n",
+ nbytes_global);
H5Dclose(dataset);
H5Sclose(filespace);
@@ -375,7 +377,7 @@ error:
int
main(void)
{
- hid_t file; /* handles */
+ hid_t file = H5I_INVALID_HID; /* file ID */
int nerrors = 0;
/* Create a new file. If file exists its contents will be overwritten. */
@@ -404,6 +406,6 @@ main(void)
return 0;
error:
- fprintf(stderr, "*** ERRORS DETECTED ***\n");
+ HDfprintf(stderr, "*** ERRORS DETECTED ***\n");
return 1;
}