diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-07-09 10:05:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 10:05:53 (GMT) |
commit | 1227bc041118e1c9fb3fdd48c083186f5deb4676 (patch) | |
tree | 0cddd12b3652faaf7adf242b2ed936d127fae454 /tools/src/h5perf/pio_engine.c | |
parent | 57cc499009f49b40505b8b3c1ca3e405c6447a16 (diff) | |
download | hdf5-1227bc041118e1c9fb3fdd48c083186f5deb4676.zip hdf5-1227bc041118e1c9fb3fdd48c083186f5deb4676.tar.gz hdf5-1227bc041118e1c9fb3fdd48c083186f5deb4676.tar.bz2 |
Sync with develop (#1863)feature/onion_vfd
Diffstat (limited to 'tools/src/h5perf/pio_engine.c')
-rw-r--r-- | tools/src/h5perf/pio_engine.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index 1baaca2..b546c43 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -146,7 +146,7 @@ do_pio(parameters param) file_descr fd; iotype iot; - char fname[FILENAME_MAX]; + char *fname = NULL; long nf; long ndsets; off_t nbytes; /*number of bytes per dataset */ @@ -168,6 +168,9 @@ do_pio(parameters param) /* IO type */ iot = param.io_type; + if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char)))) + GOTOERROR(FAIL); + switch (iot) { case MPIO: fd.mpifd = MPI_FILE_NULL; @@ -234,7 +237,7 @@ do_pio(parameters param) } if ((snbytes % pio_mpi_nprocs_g) != 0) { HDfprintf(stderr, - "Dataset size (%" H5_PRINTF_LL_WIDTH "d) 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); @@ -243,7 +246,7 @@ do_pio(parameters param) if (!param.dim2d) { if (((size_t)(snbytes / pio_mpi_nprocs_g) % buf_size) != 0) { HDfprintf(stderr, - "Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "Dataset size/process (%lld) must be a multiple of the " "transfer buffer size (%zu)\n", (long long)(snbytes / pio_mpi_nprocs_g), buf_size); GOTOERROR(FAIL); @@ -252,7 +255,7 @@ do_pio(parameters param) else { if (((size_t)snbytes % buf_size) != 0) { HDfprintf(stderr, - "Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "Dataset side size (%lld) must be a multiple of the " "transfer buffer size (%zu)\n", (long long)snbytes, buf_size); GOTOERROR(FAIL); @@ -283,7 +286,7 @@ do_pio(parameters param) char base_name[256]; HDsnprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf); - pio_create_filename(iot, base_name, fname, sizeof(fname)); + pio_create_filename(iot, base_name, fname, FILENAME_MAX); if (pio_debug_level > 0) HDfprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname); @@ -365,8 +368,8 @@ done: } /* release generic resources */ - if (buffer) - HDfree(buffer); + HDfree(buffer); + HDfree(fname); res.ret_code = ret_code; return res; } @@ -625,15 +628,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " - "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH - "d\n", + "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n", buf_size, (long long)bytes_begin[0], (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " - "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH - "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n", buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1], (long long)bytes_count); } @@ -1640,15 +1641,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " - "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH - "d\n", + "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n", buf_size, (long long)bytes_begin[0], (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " - "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH - "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n", buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1], (long long)bytes_count); } |