summaryrefslogtreecommitdiffstats
path: root/tools/test/perform
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/perform')
-rw-r--r--tools/test/perform/chunk_cache.c16
-rw-r--r--tools/test/perform/pio_perf.h6
-rw-r--r--tools/test/perform/pio_standalone.h4
-rw-r--r--tools/test/perform/sio_engine.c2
-rw-r--r--tools/test/perform/sio_perf.c4
-rw-r--r--tools/test/perform/sio_perf.h6
-rw-r--r--tools/test/perform/sio_standalone.h4
7 files changed, 23 insertions, 19 deletions
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index c4bdb4b..fcaa337 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -98,7 +98,7 @@ create_dset1(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2};
- int ** data; /* data for writing */
+ int ** data = NULL; /* data for writing */
/* Create the data space. */
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -134,6 +134,7 @@ create_dset1(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
+ HDfree(data);
return 0;
error:
@@ -144,6 +145,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY;
+ HDfree(data);
return 1;
}
@@ -160,7 +162,7 @@ create_dset2(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2};
- int ** data; /* data for writing */
+ int ** data = NULL; /* data for writing */
/* Create the data space. */
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -195,6 +197,7 @@ create_dset2(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
+ HDfree(data);
return 0;
@@ -206,6 +209,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY;
+ HDfree(data);
return 1;
}
@@ -259,11 +263,11 @@ 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 %lu\n",
+ 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);
else
printf("1. Partial chunks: no total read time because timer is not available; number of bytes being "
- "read from file is %lu\n",
+ "read from file is %zu\n",
nbytes_global);
H5Dclose(dataset);
@@ -337,11 +341,11 @@ 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 %lu\n",
+ 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);
else
printf("2. Hash value: no total read time because timer is not available; number of bytes being read "
- "from file is %lu\n",
+ "from file is %zu\n",
nbytes_global);
H5Dclose(dataset);
diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h
index 027b553..24621da 100644
--- a/tools/test/perform/pio_perf.h
+++ b/tools/test/perform/pio_perf.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef PIO_PERF_H__
-#define PIO_PERF_H__
+#ifndef PIO_PERF_H
+#define PIO_PERF_H
#ifndef STANDALONE
#include "io_timer.h"
@@ -97,4 +97,4 @@ extern results do_pio(parameters param);
}
#endif /* __cplusplus */
-#endif /* PIO_PERF_H__ */
+#endif /* PIO_PERF_H */
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index 5a3f16d..3da2660 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef PIO_STANDALONE_H__
-#define PIO_PERF_H__
+#ifndef PIO_STANDALONE_H
+#define PIO_STANDALONE_H
/* Header file for building h5perf by standalone mode.
* Created: Christian Chilan, 2005/5/18.
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index ff0e4eb..f8061d4 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -783,7 +783,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Allocate data verification buffer */
if (NULL == (buffer2 = (char *)malloc(linear_buf_size))) {
- HDfprintf(stderr, "malloc for data verification buffer size (%Zu) failed\n", linear_buf_size);
+ HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
} /* end if */
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index f24e97a..8463ffa 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -872,9 +872,9 @@ report_parameters(struct options *opts)
HDfprintf(output, "\n");
if (opts->page_size) {
- HDfprintf(output, "Page Aggregation Enabled. Page size = %ld\n", opts->page_size);
+ HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
if (opts->page_buffer_size)
- HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %ld\n", opts->page_buffer_size);
+ HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
else
HDfprintf(output, "Page Buffering Disabled\n");
}
diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h
index acdb801..6242782 100644
--- a/tools/test/perform/sio_perf.h
+++ b/tools/test/perform/sio_perf.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef SIO_PERF_H__
-#define SIO_PERF_H__
+#ifndef SIO_PERF_H
+#define SIO_PERF_H
#ifndef STANDALONE
#include "io_timer.h"
@@ -101,4 +101,4 @@ extern void do_sio(parameters param, results *res);
}
#endif /* __cplusplus */
-#endif /* PIO_PERF_H__ */
+#endif /* SIO_PERF_H */
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 924cbfd..eebce68 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef SIO_STANDALONE_H__
-#define SIO_PERF_H__
+#ifndef SIO_STANDALONE_H
+#define SIO_STANDALONE_H
/* Header file for building h5perf by standalone mode.
* Created: Christian Chilan, 2005/5/18.