summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-20 22:21:42 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-20 22:21:42 (GMT)
commit148fc618725c5b3e2749506490dae3ebeb7b4384 (patch)
tree9b61102e4fe86d668a304a8275277554445cab36
parent125e2a0a9d8beb22ab06e3300624df24a1192214 (diff)
downloadhdf5-148fc618725c5b3e2749506490dae3ebeb7b4384.zip
hdf5-148fc618725c5b3e2749506490dae3ebeb7b4384.tar.gz
hdf5-148fc618725c5b3e2749506490dae3ebeb7b4384.tar.bz2
[svn-r23801] Change printfs in perform output for long long to use %lld instead of %Hd. The later is for shorts.
This fixes: https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8450 Tested on Jam.
-rw-r--r--perform/pio_engine.c32
-rw-r--r--perform/pio_perf.c14
-rw-r--r--perform/sio_engine.c8
-rw-r--r--perform/sio_perf.c10
4 files changed, 32 insertions, 32 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 0e3190c..b64be52 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -245,24 +245,24 @@ do_pio(parameters param)
/* Validate transfer buffer size & block size*/
if(blk_size<=0) {
HDfprintf(stderr,
- "Transfer block size (%Hd) must be > 0\n", (long long)blk_size);
+ "Transfer block size (%lld) must be > 0\n", (long long)blk_size);
GOTOERROR(FAIL);
}
if(buf_size<=0) {
HDfprintf(stderr,
- "Transfer buffer size (%Hd) must be > 0\n", (long long)buf_size);
+ "Transfer buffer size (%lld) must be > 0\n", (long long)buf_size);
GOTOERROR(FAIL);
}
if ((buf_size % blk_size) != 0){
HDfprintf(stderr,
- "Transfer buffer size (%Hd) must be a multiple of the "
- "interleaved I/O block size (%Hd)\n",
+ "Transfer buffer size (%lld) must be a multiple of the "
+ "interleaved I/O block size (%lld)\n",
(long long)buf_size, (long long)blk_size);
GOTOERROR(FAIL);
}
if((snbytes%pio_mpi_nprocs_g)!=0) {
HDfprintf(stderr,
- "Dataset size (%Hd) must be a multiple of the "
+ "Dataset size (%lld) must be a multiple of the "
"number of processes (%d)\n",
(long long)snbytes, pio_mpi_nprocs_g);
GOTOERROR(FAIL);
@@ -271,8 +271,8 @@ do_pio(parameters param)
if (!param.dim2d){
if(((snbytes/pio_mpi_nprocs_g)%buf_size)!=0) {
HDfprintf(stderr,
- "Dataset size/process (%Hd) must be a multiple of the "
- "trasfer buffer size (%Hd)\n",
+ "Dataset size/process (%lld) must be a multiple of the "
+ "trasfer buffer size (%lld)\n",
(long long)(snbytes/pio_mpi_nprocs_g), (long long)buf_size);
GOTOERROR(FAIL);
}
@@ -280,8 +280,8 @@ do_pio(parameters param)
else {
if((snbytes%buf_size)!=0) {
HDfprintf(stderr,
- "Dataset side size (%Hd) must be a multiple of the "
- "trasfer buffer size (%Hd)\n",
+ "Dataset side size (%lld) must be a multiple of the "
+ "trasfer buffer size (%lld)\n",
(long long)snbytes, (long long)buf_size);
GOTOERROR(FAIL);
}
@@ -289,7 +289,7 @@ do_pio(parameters param)
/* Allocate transfer buffer */
if ((buffer = malloc(bsize)) == NULL){
- HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n",
+ HDfprintf(stderr, "malloc for transfer buffer size (%lld) failed\n",
(long long)(bsize));
GOTOERROR(FAIL);
}
@@ -651,12 +651,12 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
HDprint_rank(output);
if (!parms->dim2d) {
HDfprintf(output, "Debug(do_write): "
- "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n",
+ "buf_size=%lld, bytes_begin=%lld, bytes_count=%lld\n",
(long long)buf_size, (long long)bytes_begin[0],
(long long)bytes_count);
} else {
HDfprintf(output, "Debug(do_write): "
- "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n",
+ "linear buf_size=%lld, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
(long long)buf_size*blk_size, (long long)bytes_begin[0],
(long long)bytes_begin[1], (long long)bytes_count);
}
@@ -1625,12 +1625,12 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
HDprint_rank(output);
if (!parms->dim2d) {
HDfprintf(output, "Debug(do_write): "
- "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n",
+ "buf_size=%lld, bytes_begin=%lld, bytes_count=%lld\n",
(long long)buf_size, (long long)bytes_begin[0],
(long long)bytes_count);
} else {
HDfprintf(output, "Debug(do_write): "
- "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n",
+ "linear buf_size=%lld, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
(long long)buf_size*blk_size, (long long)bytes_begin[0],
(long long)bytes_begin[1], (long long)bytes_count);
}
@@ -2336,8 +2336,8 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
if (++nerror < 20){
/* report at most 20 errors */
HDprint_rank(output);
- HDfprintf(output, "read data error, expected (%Hd), "
- "got (%Hd)\n",
+ HDfprintf(output, "read data error, expected (%lld), "
+ "got (%lld)\n",
(long long)pio_mpi_rank_g+1,
(long long)*(ucharptr-1));
} /* end if */
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 337e982..5168bdd 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -1116,14 +1116,14 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output, "%HdGB%s", val / ONE_GB, end);
+ HDfprintf(output, "%lldGB%s", val / ONE_GB, end);
else
- HDfprintf(output, "%HdMB%s", val / ONE_MB, end);
+ HDfprintf(output, "%lldMB%s", val / ONE_MB, end);
} else {
- HDfprintf(output, "%HdKB%s", val / ONE_KB, end);
+ HDfprintf(output, "%lldKB%s", val / ONE_KB, end);
}
} else {
- HDfprintf(output, "%Hd%s", val, end);
+ HDfprintf(output, "%lld%s", val, end);
}
}
@@ -1150,11 +1150,11 @@ report_parameters(struct options *opts)
HDfprintf(output, "rank %d: IO API=", rank);
print_io_api(opts->io_types);
- HDfprintf(output, "rank %d: Number of files=%Hd\n", rank,
+ HDfprintf(output, "rank %d: Number of files=%lld\n", rank,
(long long)opts->num_files);
- HDfprintf(output, "rank %d: Number of datasets=%Hd\n", rank,
+ HDfprintf(output, "rank %d: Number of datasets=%lld\n", rank,
(long long)opts->num_dsets);
- HDfprintf(output, "rank %d: Number of iterations=%Hd\n", rank,
+ HDfprintf(output, "rank %d: Number of iterations=%lld\n", rank,
(long long)opts->num_iters);
HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank,
opts->min_num_procs, opts->max_num_procs);
diff --git a/perform/sio_engine.c b/perform/sio_engine.c
index df2e21e..5919c87 100644
--- a/perform/sio_engine.c
+++ b/perform/sio_engine.c
@@ -196,14 +196,14 @@ do_sio(parameters param)
/* Validate transfer buffer size */
if (param.buf_size[i]<=0) {
HDfprintf(stderr,
- "Transfer buffer size[%d] (%Hd) must be > 0\n", i,(long long)buf_size[i]);
+ "Transfer buffer size[%d] (%lld) must be > 0\n", i,(long long)buf_size[i]);
GOTOERROR(FAIL);
}
if ((param.dset_size[i]%param.buf_size[i])!=0) {
HDfprintf(stderr,
- "Dataset size[%d] (%Hd) must be a multiple of the "
- "trasfer buffer size[%d] (%Hd)\n",param.rank,
+ "Dataset size[%d] (%lld) must be a multiple of the "
+ "trasfer buffer size[%d] (%lld)\n",param.rank,
(long long)param.dset_size[i], param.rank, (long long)param.buf_size[i]);
GOTOERROR(FAIL);
}
@@ -212,7 +212,7 @@ do_sio(parameters param)
/* Allocate transfer buffer */
if ((buffer = malloc(linear_buf_size)) == NULL){
- HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", (long long)(linear_buf_size));
+ HDfprintf(stderr, "malloc for transfer buffer size (%lld) failed\n", (long long)(linear_buf_size));
GOTOERROR(FAIL);
}
diff --git a/perform/sio_perf.c b/perform/sio_perf.c
index 16e1750..a7de8eb 100644
--- a/perform/sio_perf.c
+++ b/perform/sio_perf.c
@@ -827,14 +827,14 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output, "%HdGB%s", val / ONE_GB, end);
+ HDfprintf(output, "%lldGB%s", val / ONE_GB, end);
else
- HDfprintf(output, "%HdMB%s", val / ONE_MB, end);
+ HDfprintf(output, "%lldMB%s", val / ONE_MB, end);
} else {
- HDfprintf(output, "%HdKB%s", val / ONE_KB, end);
+ HDfprintf(output, "%lldKB%s", val / ONE_KB, end);
}
} else {
- HDfprintf(output, "%Hd%s", val, end);
+ HDfprintf(output, "%lld%s", val, end);
}
}
@@ -860,7 +860,7 @@ report_parameters(struct options *opts)
HDfprintf(output, "IO API=");
print_io_api(opts->io_types);
- HDfprintf(output, "Number of iterations=%Hd\n",
+ HDfprintf(output, "Number of iterations=%lld\n",
(long long)opts->num_iters);
HDfprintf(output, "Dataset size=");