summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-22 21:48:46 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-22 21:48:46 (GMT)
commitc48649abd8010095c013ac005d1ea4094f1c76b9 (patch)
tree0906f70eff022b41e6b2f128f4ffeee0c21a49c9 /tools
parent92d6292b1082f7696b3bbfc4ed3c5ff7727a8763 (diff)
downloadhdf5-c48649abd8010095c013ac005d1ea4094f1c76b9.zip
hdf5-c48649abd8010095c013ac005d1ea4094f1c76b9.tar.gz
hdf5-c48649abd8010095c013ac005d1ea4094f1c76b9.tar.bz2
OESS-29 Fix shared MPI builds, more HD prefix
Diffstat (limited to 'tools')
-rw-r--r--tools/h5copy/h5copygentest.c70
-rw-r--r--tools/h5diff/h5diffgentest.c466
-rw-r--r--tools/h5dump/h5dump.c2
-rw-r--r--tools/h5dump/h5dump_ddl.c4
-rw-r--r--tools/h5dump/h5dump_xml.c10
-rw-r--r--tools/h5dump/h5dumpgentest.c32
-rw-r--r--tools/h5import/h5import.c2
-rw-r--r--tools/h5import/h5importtest.c166
-rw-r--r--tools/h5jam/h5jamgentest.c6
-rw-r--r--tools/h5repack/h5repack_copy.c6
-rw-r--r--tools/h5repack/h5repacktst.c120
-rw-r--r--tools/h5stat/h5stat_gentest.c14
-rw-r--r--tools/misc/h5debug.c2
-rw-r--r--tools/misc/h5repart.c34
-rw-r--r--tools/perform/iopipe.c14
-rw-r--r--tools/perform/overhead.c6
-rw-r--r--tools/perform/perf_meta.c28
-rw-r--r--tools/perform/pio_engine.c84
-rw-r--r--tools/perform/pio_perf.c1052
-rw-r--r--tools/perform/pio_standalone.h2
-rw-r--r--tools/perform/sio_engine.c46
-rw-r--r--tools/perform/sio_perf.c234
-rw-r--r--tools/perform/sio_standalone.h2
23 files changed, 1203 insertions, 1199 deletions
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index 5edc5b6..fdc165e 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -543,7 +543,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -551,7 +551,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -559,7 +559,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -572,7 +572,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Gcreate2 (loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -581,14 +581,14 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -596,7 +596,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims2, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -604,7 +604,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -612,7 +612,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -652,7 +652,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid = H5Screate_simple (2, dims2, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -661,7 +661,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid2 = H5Dcreate2 (loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -670,7 +670,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -679,7 +679,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_elements (sid, H5S_SELECT_SET, 4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -688,7 +688,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -697,7 +697,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_hyperslab (sid, H5S_SELECT_SET, start, stride, count, block);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -706,7 +706,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -717,7 +717,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -726,7 +726,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid1 = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid1 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -735,7 +735,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -765,7 +765,7 @@ static void Test_Obj_Copy(void)
fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE1);
goto out;
}
@@ -797,19 +797,19 @@ static void Test_Ref_Copy(void)
fid = H5Fcreate (HDF_FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2);
goto out;
}
/* add object reference */
status = gen_obj_ref(fid);
if (status < 0)
- fprintf(stderr, "Failed to generate object reference.\n");
+ HDfprintf(stderr, "Failed to generate object reference.\n");
/* add region reference */
status = gen_region_ref(fid);
if (status < 0)
- fprintf(stderr, "Failed to generate region reference.\n");
+ HDfprintf(stderr, "Failed to generate region reference.\n");
out:
/*-----------------------------------------------------------------------
@@ -840,7 +840,7 @@ static herr_t gen_extlink_trg(hid_t loc_id)
gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -856,7 +856,7 @@ static herr_t gen_extlink_trg(hid_t loc_id)
status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -889,7 +889,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -901,7 +901,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -910,7 +910,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -919,7 +919,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -928,7 +928,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -937,7 +937,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -964,26 +964,26 @@ static void Test_Extlink_Copy(void)
fid1 = H5Fcreate (HDF_EXT_SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE);
goto out;
}
fid2 = H5Fcreate (HDF_EXT_TRG_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE);
goto out;
}
/* add links to source external link file */
status = gen_extlink_src(fid1);
if (status < 0)
- fprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE);
+ HDfprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE);
/* add objs to target external link file */
status = gen_extlink_trg(fid2);
if (status < 0)
- fprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE);
+ HDfprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE);
out:
/*-----------------------------------------------------------------------
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index d2c3261..f59cb47 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -292,11 +292,11 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
/* create the empty file */
if ((fid1 = H5Fcreate(fname3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "empty file (%s) creation failed.\n", fname3);
+ HDfprintf(stderr, "empty file (%s) creation failed.\n", fname3);
goto out;
}
if (H5Fclose(fid1) < 0) {
- fprintf(stderr, "empty file (%s) close failed.\n", fname3);
+ HDfprintf(stderr, "empty file (%s) close failed.\n", fname3);
goto out;
}
@@ -1047,7 +1047,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
* Create file1
*-----------------------------------------------------------------------*/
if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1057,28 +1057,28 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
*/
f1_gid = H5Gcreate2(fid1, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid2 = H5Gcreate2(fid1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid3 = H5Gcreate2(fid1, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid4 = H5Gcreate2(fid1, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1089,13 +1089,13 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f1_sid = H5Screate_simple(1, dset_dims, NULL);
f1_did = H5Dcreate2(fid1, "dset", H5T_NATIVE_INT, f1_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_did == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = H5Dwrite(f1_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1106,7 +1106,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f1_tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fid1, "ntype", f1_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1115,7 +1115,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
* Create file2
*-----------------------------------------------------------------------*/
if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1125,28 +1125,28 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
*/
f2_gid = H5Gcreate2(fid2, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid2 = H5Gcreate2(fid2, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid3 = H5Gcreate2(fid2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid4 = H5Gcreate2(fid2, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1157,13 +1157,13 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f2_sid = H5Screate_simple(1, dset_dims, NULL);
f2_did = H5Dcreate2(fid2, "dset", H5T_NATIVE_INT, f2_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_did == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = H5Dwrite(f2_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1174,7 +1174,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f2_tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fid2, "ntype", f2_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1405,7 +1405,7 @@ static int test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1415,7 +1415,7 @@ static int test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1423,7 +1423,7 @@ static int test_link_name(const char *fname1)
H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1433,14 +1433,14 @@ static int test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1480,7 +1480,7 @@ static int test_soft_links(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1490,7 +1490,7 @@ static int test_soft_links(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1501,21 +1501,21 @@ static int test_soft_links(const char *fname1)
/* file1 */
status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -1526,42 +1526,42 @@ static int test_soft_links(const char *fname1)
/* file 1 */
status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1601,7 +1601,7 @@ static int test_linked_softlinks(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1611,21 +1611,21 @@ static int test_linked_softlinks(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1636,20 +1636,20 @@ static int test_linked_softlinks(const char *fname1)
/* file1 */
status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -1661,84 +1661,84 @@ static int test_linked_softlinks(const char *fname1)
* file 1 */
status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1783,7 +1783,7 @@ static int test_external_links(const char *fname1, const char *fname2)
/* source file */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1791,7 +1791,7 @@ static int test_external_links(const char *fname1, const char *fname2)
/* target file */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1803,14 +1803,14 @@ static int test_external_links(const char *fname1, const char *fname2)
* target file */
gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1821,21 +1821,21 @@ static int test_external_links(const char *fname1, const char *fname2)
* target file */
status = write_dset(fid2, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "x_dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "x_dset", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -1847,42 +1847,42 @@ static int test_external_links(const char *fname1, const char *fname2)
/* source file */
status = H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1927,7 +1927,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
/* source file */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1935,7 +1935,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
/* target file */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1946,7 +1946,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
/* target file */
gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1958,14 +1958,14 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
* target file */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -1977,14 +1977,14 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
* target file */
status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1996,21 +1996,21 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
* source file */
status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2050,14 +2050,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2068,14 +2068,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2083,14 +2083,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2101,28 +2101,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file 1 */
status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj1", fid1, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2130,28 +2130,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file 2 */
status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj2", fid2, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2162,28 +2162,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2191,28 +2191,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file2 */
status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2253,14 +2253,14 @@ static int test_group_recurse(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2271,28 +2271,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
gid1_f1 = H5Gcreate2(fid1, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2_f1 = H5Gcreate2(fid1, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid3_f1 = H5Gcreate2(fid1, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid10_f1 = H5Gcreate2(fid1, "/grp10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid10_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2300,28 +2300,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
gid1_f2 = H5Gcreate2(fid2, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid2_f2 = H5Gcreate2(fid2, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid3_f2 = H5Gcreate2(fid2, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid11_f2 = H5Gcreate2(fid2, "/grp11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid11_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2332,21 +2332,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2354,21 +2354,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2379,54 +2379,54 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(gid1_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid2_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid2_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid10_f1, 2, dims2, "dset4", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid10_f1, 2, dims2, "dset5", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2434,54 +2434,54 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(gid1_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid11_f2, 2, dims2, "dset4", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid11_f2, 2, dims2, "dset5", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2492,28 +2492,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file 1 */
status = H5Lcreate_soft("/grp1", fid1, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2", fid1, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2/grp3", fid1, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp10", fid1, "slink_grp10", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2521,28 +2521,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file 2 */
status = H5Lcreate_soft("/grp1", fid2, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2", fid2, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2/grp3", fid2, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp11", fid2, "slink_grp11", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2553,21 +2553,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "/grp1", fid1, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/grp1/grp2", fid1, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/grp1/grp2/grp3", fid1, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2575,21 +2575,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = H5Lcreate_external(fname1, "/grp1", fid2, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/grp1/grp2", fid2, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/grp1/grp2/grp3", fid2, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2601,14 +2601,14 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "/grp11", gid10_f1, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
/* file2 */
status = H5Lcreate_external(fname1, "/grp10", gid11_f2, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2682,28 +2682,28 @@ static int test_group_recurse2(void)
*------------------------------------------------------------------------*/
grp1 = H5Gcreate2(fileid1, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp2 = H5Gcreate2(grp1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp4 = H5Gcreate2(grp3, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -2778,7 +2778,7 @@ static int test_group_recurse2(void)
/* link to dset1 */
status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -2802,7 +2802,7 @@ static int test_group_recurse2(void)
*/
grp4 = H5Gcreate2(fileid4, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3);
status = FAIL;
goto out;
}
@@ -2836,14 +2836,14 @@ static int test_group_recurse2(void)
*/
grp2 = H5Gcreate2(fileid3, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
@@ -2867,7 +2867,7 @@ static int test_group_recurse2(void)
*/
status = H5Lcreate_external(GRP_RECURSE2_EXT3, "/g4", fileid3, "/g2/g3/g4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
@@ -2888,7 +2888,7 @@ static int test_group_recurse2(void)
*/
grp1 = H5Gcreate2(fileid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -2912,7 +2912,7 @@ static int test_group_recurse2(void)
/* link to dset1 */
status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid2, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1);
status = FAIL;
goto out;
}
@@ -2922,7 +2922,7 @@ static int test_group_recurse2(void)
*/
status = H5Lcreate_external(GRP_RECURSE2_EXT2, "/g2", fileid2, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1);
status = FAIL;
goto out;
}
@@ -2975,14 +2975,14 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2993,7 +2993,7 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3002,7 +3002,7 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
gid2 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3013,21 +3013,21 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset3", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3035,21 +3035,21 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3096,14 +3096,14 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3114,7 +3114,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3122,7 +3122,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file2 */
gid2 = H5Gcreate2(fid2, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3131,7 +3131,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
gid3 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3142,21 +3142,21 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset10", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3164,21 +3164,21 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset10", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3, 2, dims2, "dset3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3224,14 +3224,14 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3242,7 +3242,7 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3253,14 +3253,14 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3268,7 +3268,7 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3590,7 +3590,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
if (is_file_new == 1) {
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3598,7 +3598,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
else {
fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3609,7 +3609,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3619,7 +3619,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_vlen_str = H5Screate_simple(STR_RANK, dims_vlen_str, NULL);
if (sid_vlen_str < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3627,7 +3627,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_vlen_str = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_vlen_str, H5T_VARIABLE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3637,7 +3637,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_fixlen_str = H5Screate_simple(STR_RANK, dims_fixlen_str, NULL);
if (sid_fixlen_str < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3645,7 +3645,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_fixlen_str = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_fixlen_str, FIXLEN_STR_SIZE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3655,7 +3655,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_vlen_str_array = H5Screate_simple(STR_RANK, dims_vlen_str_array, NULL);
if (sid_vlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3663,7 +3663,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_vlen_str_array_pre = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_vlen_str_array_pre, H5T_VARIABLE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3671,7 +3671,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
/* Create the array data type for the string array */
tid_vlen_str_array = H5Tarray_create2(tid_vlen_str_array_pre, COMP_RANK, dims_vlen_str_array);
if (tid_vlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3681,7 +3681,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_fixlen_str_array = H5Screate_simple(STR_RANK, dims_fixlen_str_array, NULL);
if (sid_fixlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3689,14 +3689,14 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_fixlen_str_array_pre = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_fixlen_str_array_pre, FIXLEN_STR_ARRY_SIZE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
/* Create the array data type for the string array */
tid_fixlen_str_array = H5Tarray_create2(tid_fixlen_str_array_pre, COMP_RANK, dims_fixlen_str_array);
if (tid_fixlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3706,7 +3706,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_comp = H5Screate_simple(COMP_RANK, dims_comp, NULL);
if (sid_comp < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3820,7 +3820,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid1_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp1_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3830,7 +3830,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid2_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp2_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3840,7 +3840,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid3_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp3_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3850,7 +3850,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid4_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp4_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3860,7 +3860,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid5_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp5_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3870,7 +3870,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid6_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp6_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3880,7 +3880,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid7_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp7_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3890,7 +3890,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid8_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp8_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3906,7 +3906,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
status = H5Dwrite(did_comp, tid9_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp9_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4028,14 +4028,14 @@ static int test_enums(const char *fname)
enum_val = 0;
status = H5Tenum_insert(tid, "YIN", &enum_val);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
status = FAIL;
goto out;
}
enum_val = 1;
status = H5Tenum_insert(tid, "YANG", &enum_val);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4046,13 +4046,13 @@ static int test_enums(const char *fname)
status = write_dset(fid, 1, &dims, "dset1", tid, data1);
if (status < 0) {
- fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname);
status = FAIL;
goto out;
}
status = write_dset(fid, 1, &dims, "dset2", tid, data2);
if (status < 0) {
- fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4686,7 +4686,7 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
*------------------------------------------------------------------------*/
fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4696,14 +4696,14 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4716,13 +4716,13 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
/* dset1 */
if ((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
status = FAIL;
goto out;
}
if (H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
status = FAIL;
goto out;
}
@@ -4731,7 +4731,7 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
/* dset2 */
status = write_dset(gid1, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname);
goto out;
}
@@ -4741,13 +4741,13 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
/* ---------
* dset1 */
if ((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
status = FAIL;
goto out;
}
if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
status = FAIL;
goto out;
}
@@ -4767,7 +4767,7 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
* dset2 */
status = write_dset(gid2, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname);
goto out;
}
@@ -4823,7 +4823,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
/* file1 */
fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4831,7 +4831,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
/* file2 */
fid2 = H5Fopen(fname2, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fopen failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -4842,7 +4842,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
/* parent group */
topgid1 = H5Gcreate2(fid1, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (topgid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4850,14 +4850,14 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
/* dataset */
status = write_dset(topgid1, 1, dims, "obj1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
goto out;
}
/* group */
gid1 = H5Gcreate2(topgid1, "obj2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4866,7 +4866,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
tid1 = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(topgid1, "obj3", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
goto out;
}
@@ -4876,7 +4876,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
/* parent group */
topgid2 = H5Gcreate2(fid2, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (topgid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -4884,7 +4884,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
/* group */
gid2 = H5Gcreate2(topgid2, "obj1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -4893,14 +4893,14 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2)
tid2 = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(topgid2, "obj2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
goto out;
}
/* dataset */
status = write_dset(topgid2, 1, dims, "obj3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
goto out;
}
@@ -4997,14 +4997,14 @@ static void test_objs_strings(const char *fname1, const char *fname2)
/* file1 */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
goto out;
}
/* file2 */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
goto out;
}
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 9b81b8d..9c1dfa3 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1708,7 +1708,7 @@ h5_fileaccess(void)
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index 7c0a05b..46373d2 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -842,7 +842,7 @@ dump_group(hid_t gid, const char *name)
if(!type_table->objs[u].recorded) {
dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT);
type = H5Dget_type(dset);
- sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
+ HDsprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
dump_function_table->dump_named_datatype_function(type, type_name);
H5Tclose(type);
H5Dclose(dset);
@@ -1964,7 +1964,7 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED * data, int pe
if(!type_table->objs[idx].recorded) {
/* unamed datatype */
- sprintf(name, "/#"H5_PRINTF_HADDR_FMT, type_table->objs[idx].objno);
+ HDsprintf(name, "/#"H5_PRINTF_HADDR_FMT, type_table->objs[idx].objno);
if(!HDstrcmp(name, real_name))
break;
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 15a059b..95b81b5 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -586,7 +586,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
if (objno == HADDR_UNDEF) {
if (gen) {
objno = ref_path_table_gen_fake(str);
- sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
+ HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
return 0;
}
else {
@@ -597,7 +597,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
else {
if (gen) {
objno = ref_path_table_gen_fake(str);
- sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
+ HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
return 0;
}
else {
@@ -606,7 +606,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
}
}
- sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
+ HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
return(0);
}
@@ -2685,7 +2685,7 @@ xml_dump_group(hid_t gid, const char *name)
if(!type_table->objs[u].recorded) {
dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT);
type = H5Dget_type(dset);
- sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
+ HDsprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
dump_function_table->dump_named_datatype_function(type, type_name);
H5Tclose(type);
H5Dclose(dset);
@@ -2767,7 +2767,7 @@ xml_dump_group(hid_t gid, const char *name)
if(!type_table->objs[u].recorded) {
dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT);
type = H5Dget_type(dset);
- sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
+ HDsprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
dump_function_table->dump_named_datatype_function(type, type_name);
H5Tclose(type);
H5Dclose(dset);
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 7acf08d..e6ddbd9 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -542,7 +542,7 @@ gent_attribute(void)
dims[0] = 24;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(root, "/attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "attribute of root group");
+ HDsprintf(buf, "attribute of root group");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1352,7 +1352,7 @@ static void gent_all(void)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "abcdefghi");
+ HDsprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1383,7 +1383,7 @@ static void gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "1st attribute of dset1.1.1");
+ HDsprintf(buf, "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1391,7 +1391,7 @@ static void gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "2nd attribute of dset1.1.1");
+ HDsprintf(buf, "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1587,7 +1587,7 @@ gent_many(void)
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "abcdefghi");
+ HDsprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_CHAR, buf);
H5Sclose(space2);
H5Aclose(attr);
@@ -1906,9 +1906,9 @@ static void gent_str2(void)
dims[0] = 3;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(&(buf2[0*LENSTR2]), "0123456789");
- sprintf(&(buf2[1*LENSTR2]), "abcdefghij");
- sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
+ HDsprintf(&(buf2[0*LENSTR2]), "0123456789");
+ HDsprintf(&(buf2[1*LENSTR2]), "abcdefghij");
+ HDsprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
H5Awrite(attr, fxdlenstr2, buf2);
H5Sclose(space2);
H5Tclose(fxdlenstr2);
@@ -1920,7 +1920,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1933,7 +1933,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1953,7 +1953,7 @@ static void gent_str2(void)
for(i = 0;(hsize_t) i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1967,7 +1967,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1986,7 +1986,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2000,7 +2000,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -3737,7 +3737,7 @@ void gent_multi(void)
for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
/*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
@@ -3778,7 +3778,7 @@ static void gent_large_objname(void)
group = H5Gcreate2(fid, "this_is_a_large_group_name", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 50; ++i) {
- sprintf(grp_name, "this_is_a_large_group_name%d", i);
+ HDsprintf(grp_name, "this_is_a_large_group_name%d", i);
group2 = H5Gcreate2(group, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group2);
}
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 16c0d8c..1eef5ab 100644
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -3753,7 +3753,7 @@ void setDefaultValues(struct Input *in, int count)
in->path.count = 1;
HDstrcpy(temp, "dataset");
- sprintf(num, "%d", count);
+ HDsprintf(num, "%d", count);
HDstrcat(temp, num);
HDstrcpy(in->path.group[0], temp);
diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c
index bbb67b6..27995d2 100644
--- a/tools/h5import/h5importtest.c
+++ b/tools/h5import/h5importtest.c
@@ -183,8 +183,8 @@ main(void)
for (i = 0; i < nrow; i++)
{
for (j = 0; j < ncol; j++)
- (void) fprintf(sp, "%10u", b8i3[k][i][j]);
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "%10u", b8i3[k][i][j]);
+ (void) HDfprintf(sp, "\n");
}
}
(void) HDfclose(sp);
@@ -200,8 +200,8 @@ main(void)
for (i = 0; i < nrow; i++)
{
for (j = 0; j < ncol; j++)
- (void) fprintf(sp, "%10u", b16i3[k][i][j]);
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "%10u", b16i3[k][i][j]);
+ (void) HDfprintf(sp, "\n");
}
}
(void) HDfclose(sp);
@@ -217,8 +217,8 @@ main(void)
for (i = 0; i < nrow; i++)
{
for (j = 0; j < ncol; j++)
- (void) fprintf(sp, "%10d", b32i3[k][i][j]);
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "%10d", b32i3[k][i][j]);
+ (void) HDfprintf(sp, "\n");
}
}
(void) HDfclose(sp);
@@ -243,16 +243,16 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binin32.conf", "w");
- (void) fprintf(sp, "PATH /int/bin/32-bit\n");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 32\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/bin/32-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 32\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -274,15 +274,15 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binuin32.conf", "w");
- (void) fprintf(sp, "PATH /int/buin/32-bit\n");
- (void) fprintf(sp, "INPUT-CLASS UIN\n");
- (void) fprintf(sp, "INPUT-SIZE 32\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/buin/32-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS UIN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 32\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -304,17 +304,17 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binin16.conf", "w");
- (void) fprintf(sp, "PATH /int/bin/16-bit\n");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 16\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 2 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/bin/16-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 16\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -335,17 +335,17 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binuin16.conf", "w");
- (void) fprintf(sp, "PATH /int/buin/16-bit\n");
- (void) fprintf(sp, "INPUT-CLASS UIN\n");
- (void) fprintf(sp, "INPUT-SIZE 16\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 2 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/buin/16-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS UIN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 16\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -367,20 +367,20 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binin8.conf", "w");
- (void) fprintf(sp, "PATH /int/bin/8-bit\n");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 8\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-CLASS IN\n");
- (void) fprintf(sp, "OUTPUT-SIZE 16\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n");
- (void) fprintf(sp, "COMPRESSION-PARAM 3\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/bin/8-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 8\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "OUTPUT-SIZE 16\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n");
+ (void) HDfprintf(sp, "COMPRESSION-PARAM 3\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
#endif /* UNICOS */
@@ -408,18 +408,18 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binfp64.conf", "w");
- (void) fprintf(sp, "PATH /fp/bin/64-bit\n");
- (void) fprintf(sp, "INPUT-CLASS FP\n");
- (void) fprintf(sp, "INPUT-SIZE 64\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n");
- (void) fprintf(sp, "COMPRESSION-PARAM 8\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /fp/bin/64-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS FP\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 64\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n");
+ (void) HDfprintf(sp, "COMPRESSION-PARAM 8\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -441,16 +441,16 @@ main(void)
HDfclose(sp);
sp = HDfopen("binin8w.conf", "w");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 8\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 1\n");
- (void) fprintf(sp, "OUTPUT-CLASS IN\n");
- (void) fprintf(sp, "OUTPUT-SIZE 8\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 4\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 8\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 1\n");
+ (void) HDfprintf(sp, "OUTPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "OUTPUT-SIZE 8\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 4\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
}
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 12ea6b8..e7a1878 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -177,7 +177,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "abcdefghi");
+ HDsprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -208,7 +208,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "1st attribute of dset1.1.1");
+ HDsprintf(buf, "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -216,7 +216,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "2nd attribute of dset1.1.1");
+ HDsprintf(buf, "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index dee5145..6b9b079 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -1246,7 +1246,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr)
{
unsigned level = cd_values[0];
- sprintf(temp,"(%d)", level);
+ HDsprintf(temp,"(%d)", level);
HDstrcat(strfilter, temp);
}
#endif
@@ -1260,7 +1260,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr)
unsigned options_mask = cd_values[0]; /* from dcpl, not filt*/
unsigned ppb = cd_values[1];
- sprintf(temp,"(%d,", ppb);
+ HDsprintf(temp,"(%d,", ppb);
HDstrcat(strfilter, temp);
if (options_mask & H5_SZIP_EC_OPTION_MASK)
HDstrcpy(temp, "EC) ");
@@ -1300,7 +1300,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr)
HDstrcpy(str, "dset ");
HDstrcat(str, strfilter);
- sprintf(temp, " (%.3f:1)", ratio);
+ HDsprintf(temp, " (%.3f:1)", ratio);
HDstrcat(str, temp);
printf(FORMAT_OBJ, str, objname);
}
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 6ab9771..c43a2ee 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -2718,7 +2718,7 @@ int make_early(void)
goto out;
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- sprintf(name, "%d", i);
+ HDsprintf(name, "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -2743,7 +2743,7 @@ int make_early(void)
{
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- sprintf(name, "%d", i);
+ HDsprintf(name, "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -2805,7 +2805,7 @@ int make_layout(hid_t loc_id)
*/
for (i=0; i<4; i++)
{
- sprintf(name,"dset%d",i+1);
+ HDsprintf(name,"dset%d",i+1);
if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf) < 0)
return -1;
}
@@ -5792,7 +5792,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = H5Rcreate(&data_attr_objref[0],file_id,NAME_OBJ_DS1,H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5801,7 +5801,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = H5Rcreate(&data_attr_objref[1],file_id,NAME_OBJ_GRP,H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5810,7 +5810,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = H5Rcreate(&data_attr_objref[2],file_id,NAME_OBJ_NDTYPE,H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5819,7 +5819,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = make_attr(obj_id,1,dim_attr_objref,"Attr_OBJREF",H5T_STD_REF_OBJ,data_attr_objref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5861,7 +5861,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
sid_regrefed_dset = H5Screate_simple (2, dim_regrefed_dset, NULL);
if (sid_regrefed_dset < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5870,7 +5870,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
status = H5Sselect_elements (sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5879,7 +5879,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
status = H5Rcreate (&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5888,7 +5888,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
status = make_attr(obj_id,1,dim_attr_regref,"Attr_REGREF",H5T_STD_REF_DSETREG,data_attr_regref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5934,7 +5934,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5942,7 +5942,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
did1 = H5Dcreate2 (loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did1 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5950,7 +5950,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5962,7 +5962,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
gid = H5Gcreate2 (loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5975,7 +5975,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5988,7 +5988,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
sid2 = H5Screate_simple (2, dims2, NULL);
if (sid2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -5997,7 +5997,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
did2 = H5Dcreate2 (loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (did2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6006,7 +6006,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
status = H5Dwrite (did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6063,7 +6063,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6072,7 +6072,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6081,7 +6081,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6092,7 +6092,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims_dset_objref, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6100,7 +6100,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6108,7 +6108,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6121,7 +6121,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = add_attr_with_objref(loc_id, oid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6130,7 +6130,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = add_attr_with_regref(loc_id, oid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6183,7 +6183,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid_trg = H5Screate_simple (2, dims_trg, NULL);
if (sid_trg < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6192,7 +6192,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_elements (sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6201,7 +6201,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6210,7 +6210,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_hyperslab (sid_trg, H5S_SELECT_SET, start, stride, count, block);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6219,7 +6219,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6228,7 +6228,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid_ref = H5Screate_simple (1, dims1, NULL);
if (sid_ref < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6237,7 +6237,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid_ref = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid_ref < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6246,7 +6246,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6259,7 +6259,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = add_attr_with_objref(loc_id, oid_ref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6268,7 +6268,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = add_attr_with_regref(loc_id, oid_ref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6301,7 +6301,7 @@ static herr_t make_references(hid_t loc_id)
status = gen_refered_objs(loc_id);
if (status == FAIL)
{
- fprintf(stderr, "Failed to generate referenced object.\n");
+ HDfprintf(stderr, "Failed to generate referenced object.\n");
ret = FAIL;
}
@@ -6309,7 +6309,7 @@ static herr_t make_references(hid_t loc_id)
status = gen_obj_ref(loc_id);
if (status == FAIL)
{
- fprintf(stderr, "Failed to generate object reference.\n");
+ HDfprintf(stderr, "Failed to generate object reference.\n");
ret = FAIL;
}
@@ -6317,7 +6317,7 @@ static herr_t make_references(hid_t loc_id)
status = gen_region_ref(loc_id);
if (status == FAIL)
{
- fprintf(stderr, "Failed to generate region reference.\n");
+ HDfprintf(stderr, "Failed to generate region reference.\n");
ret = FAIL;
}
@@ -6441,7 +6441,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6451,7 +6451,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6464,7 +6464,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (main_gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6479,7 +6479,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6503,7 +6503,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6513,7 +6513,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6523,7 +6523,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6537,7 +6537,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite (comp_objref_aid, comp_objref_tid, comp_objref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6559,14 +6559,14 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Sselect_elements (objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6580,7 +6580,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite (comp_regref_aid, comp_regref_tid, comp_regref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6606,7 +6606,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6614,7 +6614,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6622,7 +6622,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6640,7 +6640,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite (vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6649,7 +6649,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dvlen_reclaim (vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6670,14 +6670,14 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&((hdset_reg_ref_t*)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6695,7 +6695,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6704,7 +6704,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dvlen_reclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c
index 3223c37..b583faa 100644
--- a/tools/h5stat/h5stat_gentest.c
+++ b/tools/h5stat/h5stat_gentest.c
@@ -71,7 +71,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_GRPS groups in the root group */
for(i = 1; i <= NUM_GRPS; i++) {
- sprintf(name, "%s%d", GROUP_NAME,i);
+ HDsprintf(name, "%s%d", GROUP_NAME,i);
if((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Gclose(gid) < 0)
@@ -92,7 +92,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_ATTRS for the dataset */
for(i = 1; i <= NUM_ATTRS; i++) {
- sprintf(attrname, "%s%d", ATTR_NAME,i);
+ HDsprintf(attrname, "%s%d", ATTR_NAME,i);
if((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -172,7 +172,7 @@ gen_threshold_file(const char *fname)
/* Create 11 attributes for the dataset */
for(i = 1; i <= (THRES_NUM+1); i++) {
- sprintf(name, "%s%d", THRES_ATTR_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_NAME,i);
if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -199,7 +199,7 @@ gen_threshold_file(const char *fname)
/* Create 10 attributes for the 2-D dataset */
for(i = 1; i <= THRES_NUM; i++) {
- sprintf(name, "%s%d", THRES_ATTR_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_NAME,i);
if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -223,7 +223,7 @@ gen_threshold_file(const char *fname)
/* Create 10 1-D datasets with non-zero dimension size for the group */
for(i = 1; i <= THRES_NUM; i++) {
/* set up dataset name */
- sprintf(name, "%s%d", THRES_DSET_NAME,i);
+ HDsprintf(name, "%s%d", THRES_DSET_NAME,i);
/* Create the dataset */
if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -246,7 +246,7 @@ gen_threshold_file(const char *fname)
/* Create 25 attributes for the group */
for(i = 1; i <= THRES_NUM_25; i++) {
/* Set up attribute name */
- sprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i);
/* Create the attribute */
if((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -268,7 +268,7 @@ gen_threshold_file(const char *fname)
/* Create 9 1-D datasets with non-zero dimension size for the group */
for(i = 1; i < THRES_NUM; i++) {
/* set up dataset name */
- sprintf(name, "%s%d", THRES_DSET_NAME,i);
+ HDsprintf(name, "%s%d", THRES_DSET_NAME,i);
/* Create the dataset */
if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index f758b1f..245b5a1 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -178,7 +178,7 @@ main(int argc, char *argv[])
} /* end if */
if(HDstrchr(argv[1], '%'))
if(H5Pset_fapl_family (fapl, (hsize_t)0, H5P_DEFAULT) < 0) {
- fprintf(stderr, "cannot set file access property list\n");
+ HDfprintf(stderr, "cannot set file access property list\n");
HDexit(1);
}
if((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) {
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index f6252b2..dea27d4 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -66,18 +66,18 @@
static void
usage (const char *progname)
{
- fprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2] SRC DST\n",
+ HDfprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2] SRC DST\n",
progname);
- fprintf(stderr, " -v Produce verbose output\n");
- fprintf(stderr, " -V Print a version number and exit\n");
- fprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
- fprintf(stderr, " -m N The destination member size or 1GB\n");
- fprintf(stderr, " -family_to_sec2 Change file driver from family to sec2\n");
- fprintf(stderr, " SRC The name of the source file\n");
- fprintf(stderr, " DST The name of the destination files\n");
- fprintf(stderr, "Sizes may be suffixed with `g' for GB, `m' for MB or "
+ HDfprintf(stderr, " -v Produce verbose output\n");
+ HDfprintf(stderr, " -V Print a version number and exit\n");
+ HDfprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
+ HDfprintf(stderr, " -m N The destination member size or 1GB\n");
+ HDfprintf(stderr, " -family_to_sec2 Change file driver from family to sec2\n");
+ HDfprintf(stderr, " SRC The name of the source file\n");
+ HDfprintf(stderr, " DST The name of the destination files\n");
+ HDfprintf(stderr, "Sizes may be suffixed with `g' for GB, `m' for MB or "
"`k' for kB.\n");
- fprintf(stderr, "File family names include an integer printf "
+ HDfprintf(stderr, "File family names include an integer printf "
"format such as `%%d'\n");
exit (EXIT_FAILURE);
}
@@ -255,7 +255,7 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
- if (verbose) fprintf (stderr, "< %s\n", src_name);
+ if (verbose) HDfprintf (stderr, "< %s\n", src_name);
/*
* Get the name for the destination file and open the first member.
@@ -269,7 +269,7 @@ main (int argc, char *argv[])
HDperror (dst_name);
HDexit (EXIT_FAILURE);
}
- if (verbose) fprintf (stderr, "> %s\n", dst_name);
+ if (verbose) HDfprintf (stderr, "> %s\n", dst_name);
/* No more arguments */
if (argno<argc) usage (prog_name);
@@ -295,7 +295,7 @@ main (int argc, char *argv[])
perror ("read");
exit (EXIT_FAILURE);
} else if ((size_t)nio!=n) {
- fprintf (stderr, "%s: short read\n", src_name);
+ HDfprintf (stderr, "%s: short read\n", src_name);
exit (EXIT_FAILURE);
}
for (i=0; i<n; i++) {
@@ -322,7 +322,7 @@ main (int argc, char *argv[])
perror ("write");
exit (EXIT_FAILURE);
} else if ((size_t)nio!=n) {
- fprintf (stderr, "%s: short write\n", dst_name);
+ HDfprintf (stderr, "%s: short write\n", dst_name);
exit (EXIT_FAILURE);
}
need_seek = FALSE;
@@ -359,11 +359,11 @@ main (int argc, char *argv[])
}
src_act_size = sb.st_size;
if (src_act_size>src_size) {
- fprintf (stderr, "%s: member truncated to %lu bytes\n",
+ HDfprintf (stderr, "%s: member truncated to %lu bytes\n",
src_name, (unsigned long)src_size);
}
src_offset = 0;
- if (verbose) fprintf (stderr, "< %s\n", src_name);
+ if (verbose) HDfprintf (stderr, "< %s\n", src_name);
}
/*
@@ -399,7 +399,7 @@ main (int argc, char *argv[])
}
dst_offset = 0;
need_seek = FALSE;
- if (verbose) fprintf (stderr, "> %s\n", dst_name);
+ if (verbose) HDfprintf (stderr, "> %s\n", dst_name);
}
}
diff --git a/tools/perform/iopipe.c b/tools/perform/iopipe.c
index eac099b..2d9c44f 100644
--- a/tools/perform/iopipe.c
+++ b/tools/perform/iopipe.c
@@ -224,7 +224,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "fill raw");
+ HDfprintf (stderr, HEADING, "fill raw");
for(u = 0; u < nwrite; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
@@ -262,7 +262,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "fill hdf5");
+ HDfprintf (stderr, HEADING, "fill hdf5");
for(u = 0; u < nread; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
@@ -301,7 +301,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "out raw");
+ HDfprintf (stderr, HEADING, "out raw");
for(u = 0; u < nwrite; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
@@ -341,7 +341,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "out hdf5");
+ HDfprintf (stderr, HEADING, "out hdf5");
for(u = 0; u < nwrite; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
@@ -380,7 +380,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "in raw");
+ HDfprintf (stderr, HEADING, "in raw");
for(u = 0; u < nread; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
@@ -421,7 +421,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "in hdf5");
+ HDfprintf (stderr, HEADING, "in hdf5");
for(u = 0; u < nread; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
@@ -465,7 +465,7 @@ main (void)
_ftime(tbstart);
#endif
#endif
- fprintf (stderr, HEADING, "in hdf5 partial");
+ HDfprintf (stderr, HEADING, "in hdf5 partial");
for(u = 0; u < nread; u++) {
putc (PROGRESS, stderr);
HDfflush(stderr);
diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c
index 81f9de6..108d9e4 100644
--- a/tools/perform/overhead.c
+++ b/tools/perform/overhead.c
@@ -84,9 +84,9 @@ typedef enum fill_t {
static void
usage(const char *prog)
{
- fprintf(stderr, "usage: %s [STYLE|cache] [LEFT [MIDDLE [RIGHT]]]\n",
+ HDfprintf(stderr, "usage: %s [STYLE|cache] [LEFT [MIDDLE [RIGHT]]]\n",
prog);
- fprintf(stderr, "\
+ HDfprintf(stderr, "\
STYLE is the order that the dataset is filled and should be one of:\n\
forward -- Fill the dataset from lowest address to highest\n\
address. This style tests the right split ratio.\n\
@@ -401,6 +401,6 @@ main(int argc, char *argv[])
return 0;
error:
- fprintf(stderr, "*** ERRORS DETECTED ***\n");
+ HDfprintf(stderr, "*** ERRORS DETECTED ***\n");
return 1;
}
diff --git a/tools/perform/perf_meta.c b/tools/perform/perf_meta.c
index c24e598..b56f074 100644
--- a/tools/perform/perf_meta.c
+++ b/tools/perform/perf_meta.c
@@ -313,7 +313,7 @@ create_dsets(hid_t file)
* Create a dataset using the default dataset creation properties.
*/
for(i = 0; i < NUM_DSETS; i++) {
- sprintf(dset_name, "dataset %d", i);
+ HDsprintf(dset_name, "dataset %d", i);
if((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
@@ -378,14 +378,14 @@ create_attrs_1(void)
* Create all(user specifies the number) attributes for each dataset
*/
for(i = 0; i < NUM_DSETS; i++) {
- sprintf(dset_name, "dataset %d", i);
+ HDsprintf(dset_name, "dataset %d", i);
open_t.start = retrieve_time();
if((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0)
goto error;
perf(&open_t, open_t.start, retrieve_time());
for(j = 0; j < NUM_ATTRS; j++) {
- sprintf(attr_name, "all attrs for each dset %d", j);
+ HDsprintf(attr_name, "all attrs for each dset %d", j);
attr_t.start = retrieve_time();
if((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE,
small_space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -422,7 +422,7 @@ create_attrs_1(void)
attr_t.avg = attr_t.total / (NUM_ATTRS*NUM_DSETS);
/* Print out the performance result */
- fprintf(stderr, "1. Create %d attributes for each of %d existing datasets\n",
+ HDfprintf(stderr, "1. Create %d attributes for each of %d existing datasets\n",
NUM_ATTRS, NUM_DSETS);
print_perf(open_t, close_t, attr_t);
}
@@ -480,7 +480,7 @@ create_attrs_2(void)
* Create all(user specifies the number) attributes for each new dataset
*/
for(i = 0; i < NUM_DSETS; i++) {
- sprintf(dset_name, "dataset %d", i);
+ HDsprintf(dset_name, "dataset %d", i);
create_t.start = retrieve_time();
if((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE,
space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -488,7 +488,7 @@ create_attrs_2(void)
perf(&create_t, create_t.start, retrieve_time());
for(j = 0; j < NUM_ATTRS; j++) {
- sprintf(attr_name, "all attrs for each dset %d", j);
+ HDsprintf(attr_name, "all attrs for each dset %d", j);
attr_t.start = retrieve_time();
if((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE,
small_space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -525,7 +525,7 @@ create_attrs_2(void)
attr_t.avg = attr_t.total / (NUM_ATTRS*NUM_DSETS);
/* Print out the performance result */
- fprintf(stderr, "2. Create %d attributes for each of %d new datasets\n",
+ HDfprintf(stderr, "2. Create %d attributes for each of %d new datasets\n",
NUM_ATTRS, NUM_DSETS);
print_perf(create_t, close_t, attr_t);
}
@@ -593,14 +593,14 @@ create_attrs_3(void)
for(i = 0; i < loop_num; i++) {
for(j = 0; j < NUM_DSETS; j++) {
- sprintf(dset_name, "dataset %d", j);
+ HDsprintf(dset_name, "dataset %d", j);
open_t.start = retrieve_time();
if((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0)
goto error;
perf(&open_t, open_t.start, retrieve_time());
for(k = 0; k < BATCH_ATTRS; k++) {
- sprintf(attr_name, "some attrs for each dset %d %d", i, k);
+ HDsprintf(attr_name, "some attrs for each dset %d %d", i, k);
attr_t.start = retrieve_time();
if((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE,
small_space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -637,7 +637,7 @@ create_attrs_3(void)
attr_t.avg = attr_t.total / (NUM_ATTRS*NUM_DSETS);
/* Print out the performance result */
- fprintf(stderr, "3. Create %d attributes for each of %d existing datasets for %d times\n",
+ HDfprintf(stderr, "3. Create %d attributes for each of %d existing datasets for %d times\n",
BATCH_ATTRS, NUM_DSETS, loop_num);
print_perf(open_t, close_t, attr_t);
}
@@ -750,12 +750,12 @@ void perf(p_time *perf_t, double start_t, double end_t)
*/
void print_perf(p_time open_t, p_time close_t, p_time attr_t)
{
- fprintf(stderr, "\t%s:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n",
+ HDfprintf(stderr, "\t%s:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n",
open_t.func, open_t.avg, open_t.max, open_t.min);
- fprintf(stderr, "\tH5Dclose:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n",
+ HDfprintf(stderr, "\tH5Dclose:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n",
close_t.avg, close_t.max, close_t.min);
if(NUM_ATTRS)
- fprintf(stderr, "\tH5A(create & close):\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n",
+ HDfprintf(stderr, "\tH5A(create & close):\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n",
attr_t.avg, attr_t.max, attr_t.min);
}
@@ -799,7 +799,7 @@ main(int argc, char **argv)
#ifdef H5_HAVE_PARALLEL
if (facc_type == FACC_DEFAULT || (facc_type != FACC_DEFAULT && MAINPROCESS))
#endif /*H5_HAVE_PARALLEL*/
- fprintf(stderr, "\t\tPerformance result of metadata for datasets and attributes\n\n");
+ HDfprintf(stderr, "\t\tPerformance result of metadata for datasets and attributes\n\n");
fapl = H5Pcreate (H5P_FILE_ACCESS);
#ifdef H5_HAVE_PARALLEL
diff --git a/tools/perform/pio_engine.c b/tools/perform/pio_engine.c
index d47cd43..6cff0e5 100644
--- a/tools/perform/pio_engine.c
+++ b/tools/perform/pio_engine.c
@@ -61,14 +61,14 @@
#define GOTOERROR(errcode) { ret_code = errcode; goto done; }
#define GOTODONE { goto done; }
#define ERRMSG(mesg) { \
- fprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
- fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \
+ HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
+ HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
}
#define MSG(mesg) { \
- fprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
- fprintf(stderr, "(%s) at line %4d in %s\n", \
+ HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
+ HDfprintf(stderr, "(%s) at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
}
@@ -194,7 +194,7 @@ do_pio(parameters param)
break;
default:
/* unknown request */
- fprintf(stderr, "Unknown IO type request (%d)\n", iot);
+ HDfprintf(stderr, "Unknown IO type request (%d)\n", iot);
GOTOERROR(FAIL);
}
@@ -213,21 +213,21 @@ do_pio(parameters param)
}
if (param.num_files < 0 ) {
- fprintf(stderr,
+ HDfprintf(stderr,
"number of files must be >= 0 (%ld)\n",
param.num_files);
GOTOERROR(FAIL);
}
if (ndsets < 0 ) {
- fprintf(stderr,
+ HDfprintf(stderr,
"number of datasets per file must be >= 0 (%ld)\n",
ndsets);
GOTOERROR(FAIL);
}
if (param.num_procs <= 0 ) {
- fprintf(stderr,
+ HDfprintf(stderr,
"maximum number of process to use must be > 0 (%d)\n",
param.num_procs);
GOTOERROR(FAIL);
@@ -292,7 +292,7 @@ do_pio(parameters param)
/* output all of the times for all iterations */
if (myrank == 0)
- fprintf(output, "Timer details:\n");
+ HDfprintf(output, "Timer details:\n");
}
for (nf = 1; nf <= param.num_files; nf++) {
@@ -302,7 +302,7 @@ do_pio(parameters param)
/* Open file for write */
char base_name[256];
- sprintf(base_name, "#pio_tmp_%lu", nf);
+ HDsprintf(base_name, "#pio_tmp_%lu", nf);
pio_create_filename(iot, base_name, fname, sizeof(fname));
if (pio_debug_level > 0)
HDfprintf(output, "rank %d: data filename=%s\n",
@@ -853,7 +853,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -861,7 +861,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
if(parms->collective) {
hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -883,7 +883,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
case PHDF5:
h5dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (h5dcpl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
/* 1D dataspace */
@@ -894,7 +894,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
h5dims[0] = blk_size;
hrc = H5Pset_chunk(h5dcpl, 1, h5dims);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -907,25 +907,25 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
h5dims[1] = blk_size;
hrc = H5Pset_chunk(h5dcpl, 2, h5dims);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
}/* end else */
- sprintf(dname, "Dataset_%ld", ndset);
+ HDsprintf(dname, "Dataset_%ld", ndset);
h5ds_id = H5DCREATE(fd->h5fd, dname, ELMT_H5_TYPE,
h5dset_space_id, h5dcpl);
if (h5ds_id < 0) {
- fprintf(stderr, "HDF5 Dataset Create failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
break;
@@ -1398,7 +1398,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -1455,7 +1455,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0){
- fprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
h5dset_space_id = -1;
@@ -1465,7 +1465,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Memory Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
h5mem_space_id = -1;
@@ -1475,7 +1475,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
h5dxpl = -1;
@@ -1824,7 +1824,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -1832,7 +1832,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
if(parms->collective) {
hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -1852,10 +1852,10 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
break;
case PHDF5:
- sprintf(dname, "Dataset_%ld", ndset);
+ HDsprintf(dname, "Dataset_%ld", ndset);
h5ds_id = H5DOPEN(fd->h5fd, dname);
if (h5ds_id < 0) {
- fprintf(stderr, "HDF5 Dataset open failed\n");
+ HDfprintf(stderr, "HDF5 Dataset open failed\n");
GOTOERROR(FAIL);
}
@@ -2353,7 +2353,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -2410,7 +2410,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0){
- fprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
h5dset_space_id = -1;
@@ -2420,7 +2420,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Memory Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
h5mem_space_id = -1;
@@ -2430,7 +2430,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
h5dxpl = -1;
@@ -2461,7 +2461,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fd->posixfd = POSIXOPEN(fname, O_RDONLY);
if (fd->posixfd < 0 ) {
- fprintf(stderr, "POSIX File Open failed(%s)\n", fname);
+ HDfprintf(stderr, "POSIX File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -2485,7 +2485,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
h5_io_info_g, &fd->mpifd);
if (mrc != MPI_SUCCESS) {
- fprintf(stderr, "MPI File Open failed(%s)\n", fname);
+ HDfprintf(stderr, "MPI File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -2493,13 +2493,13 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
/*filesize , set size to 0 explicitedly. */
mrc = MPI_File_set_size(fd->mpifd, (MPI_Offset)0);
if (mrc != MPI_SUCCESS) {
- fprintf(stderr, "MPI_File_set_size failed\n");
+ HDfprintf(stderr, "MPI_File_set_size failed\n");
GOTOERROR(FAIL);
}
} else {
mrc = MPI_File_open(pio_comm_g, fname, MPI_MODE_RDONLY, h5_io_info_g, &fd->mpifd);
if (mrc != MPI_SUCCESS) {
- fprintf(stderr, "MPI File Open failed(%s)\n", fname);
+ HDfprintf(stderr, "MPI File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
}
@@ -2508,19 +2508,19 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
case PHDF5:
if ((acc_tpl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
/* Set the file driver to the MPI-IO driver */
if (H5Pset_fapl_mpio(acc_tpl, pio_comm_g, h5_io_info_g) < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
}
/* Set the alignment of objects in HDF5 file */
if (H5Pset_alignment(acc_tpl, param->h5_thresh, param->h5_align) < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
}
@@ -2530,13 +2530,13 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
else
fd->h5fd = H5Fopen(fname, H5F_ACC_RDONLY, acc_tpl);
if (fd->h5fd < 0) {
- fprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
+ HDfprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
GOTOERROR(FAIL);
}
/* verifying the close of the acc_tpl */
if (H5Pclose(acc_tpl) < 0) {
- fprintf(stderr, "HDF5 Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
@@ -2565,7 +2565,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
rc = POSIXCLOSE(fd->posixfd);
if (rc != 0){
- fprintf(stderr, "POSIX File Close failed\n");
+ HDfprintf(stderr, "POSIX File Close failed\n");
GOTOERROR(FAIL);
}
@@ -2576,7 +2576,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
mrc = MPI_File_close(&fd->mpifd);
if (mrc != MPI_SUCCESS){
- fprintf(stderr, "MPI File close failed\n");
+ HDfprintf(stderr, "MPI File close failed\n");
GOTOERROR(FAIL);
}
@@ -2587,7 +2587,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
hrc = H5Fclose(fd->h5fd);
if (hrc < 0) {
- fprintf(stderr, "HDF5 File Close failed\n");
+ HDfprintf(stderr, "HDF5 File Close failed\n");
GOTOERROR(FAIL);
}
diff --git a/tools/perform/pio_perf.c b/tools/perform/pio_perf.c
index 597629e..0acc644 100644
--- a/tools/perform/pio_perf.c
+++ b/tools/perform/pio_perf.c
@@ -98,12 +98,12 @@ MPI_Comm pio_comm_g; /* Communicator to run the PIO */
int pio_mpi_rank_g; /* MPI rank of pio_comm_g */
int pio_mpi_nprocs_g; /* Number of processes of pio_comm_g */
int pio_debug_level = 0;/* The debug level:
- * 0 - Off
- * 1 - Minimal
- * 2 - Some more
- * 3 - Maximal
- * 4 - Maximal & then some
- */
+ * 0 - Off
+ * 1 - Minimal
+ * 2 - Some more
+ * 3 - Maximal
+ * 4 - Maximal & then some
+ */
/* local variables */
static const char *progname = "h5perf";
@@ -119,147 +119,147 @@ static const char *s_opts = "a:A:B:cCd:D:e:F:ghi:Imno:p:P:stT:wx:X:";
static const char *s_opts = "a:A:bB:cCd:D:e:F:ghi:Imno:p:P:stT:wx:X:";
#endif /* 1 */
static struct long_options l_opts[] = {
- { "align", require_arg, 'a' },
- { "alig", require_arg, 'a' },
- { "ali", require_arg, 'a' },
- { "al", require_arg, 'a' },
- { "api", require_arg, 'A' },
- { "ap", require_arg, 'A' },
+ { "align", require_arg, 'a' },
+ { "alig", require_arg, 'a' },
+ { "ali", require_arg, 'a' },
+ { "al", require_arg, 'a' },
+ { "api", require_arg, 'A' },
+ { "ap", require_arg, 'A' },
#if 0
- /* a sighting of the elusive binary option */
- { "binary", no_arg, 'b' },
- { "binar", no_arg, 'b' },
- { "bina", no_arg, 'b' },
- { "bin", no_arg, 'b' },
- { "bi", no_arg, 'b' },
+ /* a sighting of the elusive binary option */
+ { "binary", no_arg, 'b' },
+ { "binar", no_arg, 'b' },
+ { "bina", no_arg, 'b' },
+ { "bin", no_arg, 'b' },
+ { "bi", no_arg, 'b' },
#endif /* 0 */
- { "block-size", require_arg, 'B' },
- { "block-siz", require_arg, 'B' },
- { "block-si", require_arg, 'B' },
- { "block-s", require_arg, 'B' },
- { "block-", require_arg, 'B' },
- { "block", require_arg, 'B' },
- { "bloc", require_arg, 'B' },
- { "blo", require_arg, 'B' },
- { "bl", require_arg, 'B' },
- { "chunk", no_arg, 'c' },
- { "chun", no_arg, 'c' },
- { "chu", no_arg, 'c' },
- { "ch", no_arg, 'c' },
- { "collective", no_arg, 'C' },
- { "collectiv", no_arg, 'C' },
- { "collecti", no_arg, 'C' },
- { "collect", no_arg, 'C' },
- { "collec", no_arg, 'C' },
- { "colle", no_arg, 'C' },
- { "coll", no_arg, 'C' },
- { "col", no_arg, 'C' },
- { "co", no_arg, 'C' },
- { "debug", require_arg, 'D' },
- { "debu", require_arg, 'D' },
- { "deb", require_arg, 'D' },
- { "de", require_arg, 'D' },
- { "geometry", no_arg, 'g' },
- { "geometr", no_arg, 'g' },
- { "geomet", no_arg, 'g' },
- { "geome", no_arg, 'g' },
- { "geom", no_arg, 'g' },
- { "geo", no_arg, 'g' },
- { "ge", no_arg, 'g' },
- { "help", no_arg, 'h' },
- { "hel", no_arg, 'h' },
- { "he", no_arg, 'h' },
- { "interleaved", require_arg, 'I' },
- { "interleave", require_arg, 'I' },
- { "interleav", require_arg, 'I' },
- { "interlea", require_arg, 'I' },
- { "interle", require_arg, 'I' },
- { "interl", require_arg, 'I' },
- { "inter", require_arg, 'I' },
- { "inte", require_arg, 'I' },
- { "int", require_arg, 'I' },
- { "in", require_arg, 'I' },
- { "max-num-processes", require_arg, 'P' },
- { "max-num-processe", require_arg, 'P' },
- { "max-num-process", require_arg, 'P' },
- { "max-num-proces", require_arg, 'P' },
- { "max-num-proce", require_arg, 'P' },
- { "max-num-proc", require_arg, 'P' },
- { "max-num-pro", require_arg, 'P' },
- { "max-num-pr", require_arg, 'P' },
- { "max-num-p", require_arg, 'P' },
- { "min-num-processes", require_arg, 'p' },
- { "min-num-processe", require_arg, 'p' },
- { "min-num-process", require_arg, 'p' },
- { "min-num-proces", require_arg, 'p' },
- { "min-num-proce", require_arg, 'p' },
- { "min-num-proc", require_arg, 'p' },
- { "min-num-pro", require_arg, 'p' },
- { "min-num-pr", require_arg, 'p' },
- { "min-num-p", require_arg, 'p' },
- { "max-xfer-size", require_arg, 'X' },
- { "max-xfer-siz", require_arg, 'X' },
- { "max-xfer-si", require_arg, 'X' },
- { "max-xfer-s", require_arg, 'X' },
- { "max-xfer", require_arg, 'X' },
- { "max-xfe", require_arg, 'X' },
- { "max-xf", require_arg, 'X' },
- { "max-x", require_arg, 'X' },
- { "min-xfer-size", require_arg, 'x' },
- { "min-xfer-siz", require_arg, 'x' },
- { "min-xfer-si", require_arg, 'x' },
- { "min-xfer-s", require_arg, 'x' },
- { "min-xfer", require_arg, 'x' },
- { "min-xfe", require_arg, 'x' },
- { "min-xf", require_arg, 'x' },
- { "min-x", require_arg, 'x' },
- { "num-bytes", require_arg, 'e' },
- { "num-byte", require_arg, 'e' },
- { "num-byt", require_arg, 'e' },
- { "num-by", require_arg, 'e' },
- { "num-b", require_arg, 'e' },
- { "num-dsets", require_arg, 'd' },
- { "num-dset", require_arg, 'd' },
- { "num-dse", require_arg, 'd' },
- { "num-ds", require_arg, 'd' },
- { "num-d", require_arg, 'd' },
- { "num-files", require_arg, 'F' },
- { "num-file", require_arg, 'F' },
- { "num-fil", require_arg, 'F' },
- { "num-fi", require_arg, 'F' },
- { "num-f", require_arg, 'F' },
- { "num-iterations", require_arg, 'i' },
- { "num-iteration", require_arg, 'i' },
- { "num-iteratio", require_arg, 'i' },
- { "num-iterati", require_arg, 'i' },
- { "num-iterat", require_arg, 'i' },
- { "num-itera", require_arg, 'i' },
- { "num-iter", require_arg, 'i' },
- { "num-ite", require_arg, 'i' },
- { "num-it", require_arg, 'i' },
- { "num-i", require_arg, 'i' },
- { "output", require_arg, 'o' },
- { "outpu", require_arg, 'o' },
- { "outp", require_arg, 'o' },
- { "out", require_arg, 'o' },
- { "ou", require_arg, 'o' },
- { "threshold", require_arg, 'T' },
- { "threshol", require_arg, 'T' },
- { "thresho", require_arg, 'T' },
- { "thresh", require_arg, 'T' },
- { "thres", require_arg, 'T' },
- { "thre", require_arg, 'T' },
- { "thr", require_arg, 'T' },
- { "th", require_arg, 'T' },
- { "write-only", require_arg, 'w' },
- { "write-onl", require_arg, 'w' },
- { "write-on", require_arg, 'w' },
- { "write-o", require_arg, 'w' },
- { "write", require_arg, 'w' },
- { "writ", require_arg, 'w' },
- { "wri", require_arg, 'w' },
- { "wr", require_arg, 'w' },
- { NULL, 0, '\0' }
+ { "block-size", require_arg, 'B' },
+ { "block-siz", require_arg, 'B' },
+ { "block-si", require_arg, 'B' },
+ { "block-s", require_arg, 'B' },
+ { "block-", require_arg, 'B' },
+ { "block", require_arg, 'B' },
+ { "bloc", require_arg, 'B' },
+ { "blo", require_arg, 'B' },
+ { "bl", require_arg, 'B' },
+ { "chunk", no_arg, 'c' },
+ { "chun", no_arg, 'c' },
+ { "chu", no_arg, 'c' },
+ { "ch", no_arg, 'c' },
+ { "collective", no_arg, 'C' },
+ { "collectiv", no_arg, 'C' },
+ { "collecti", no_arg, 'C' },
+ { "collect", no_arg, 'C' },
+ { "collec", no_arg, 'C' },
+ { "colle", no_arg, 'C' },
+ { "coll", no_arg, 'C' },
+ { "col", no_arg, 'C' },
+ { "co", no_arg, 'C' },
+ { "debug", require_arg, 'D' },
+ { "debu", require_arg, 'D' },
+ { "deb", require_arg, 'D' },
+ { "de", require_arg, 'D' },
+ { "geometry", no_arg, 'g' },
+ { "geometr", no_arg, 'g' },
+ { "geomet", no_arg, 'g' },
+ { "geome", no_arg, 'g' },
+ { "geom", no_arg, 'g' },
+ { "geo", no_arg, 'g' },
+ { "ge", no_arg, 'g' },
+ { "help", no_arg, 'h' },
+ { "hel", no_arg, 'h' },
+ { "he", no_arg, 'h' },
+ { "interleaved", require_arg, 'I' },
+ { "interleave", require_arg, 'I' },
+ { "interleav", require_arg, 'I' },
+ { "interlea", require_arg, 'I' },
+ { "interle", require_arg, 'I' },
+ { "interl", require_arg, 'I' },
+ { "inter", require_arg, 'I' },
+ { "inte", require_arg, 'I' },
+ { "int", require_arg, 'I' },
+ { "in", require_arg, 'I' },
+ { "max-num-processes", require_arg, 'P' },
+ { "max-num-processe", require_arg, 'P' },
+ { "max-num-process", require_arg, 'P' },
+ { "max-num-proces", require_arg, 'P' },
+ { "max-num-proce", require_arg, 'P' },
+ { "max-num-proc", require_arg, 'P' },
+ { "max-num-pro", require_arg, 'P' },
+ { "max-num-pr", require_arg, 'P' },
+ { "max-num-p", require_arg, 'P' },
+ { "min-num-processes", require_arg, 'p' },
+ { "min-num-processe", require_arg, 'p' },
+ { "min-num-process", require_arg, 'p' },
+ { "min-num-proces", require_arg, 'p' },
+ { "min-num-proce", require_arg, 'p' },
+ { "min-num-proc", require_arg, 'p' },
+ { "min-num-pro", require_arg, 'p' },
+ { "min-num-pr", require_arg, 'p' },
+ { "min-num-p", require_arg, 'p' },
+ { "max-xfer-size", require_arg, 'X' },
+ { "max-xfer-siz", require_arg, 'X' },
+ { "max-xfer-si", require_arg, 'X' },
+ { "max-xfer-s", require_arg, 'X' },
+ { "max-xfer", require_arg, 'X' },
+ { "max-xfe", require_arg, 'X' },
+ { "max-xf", require_arg, 'X' },
+ { "max-x", require_arg, 'X' },
+ { "min-xfer-size", require_arg, 'x' },
+ { "min-xfer-siz", require_arg, 'x' },
+ { "min-xfer-si", require_arg, 'x' },
+ { "min-xfer-s", require_arg, 'x' },
+ { "min-xfer", require_arg, 'x' },
+ { "min-xfe", require_arg, 'x' },
+ { "min-xf", require_arg, 'x' },
+ { "min-x", require_arg, 'x' },
+ { "num-bytes", require_arg, 'e' },
+ { "num-byte", require_arg, 'e' },
+ { "num-byt", require_arg, 'e' },
+ { "num-by", require_arg, 'e' },
+ { "num-b", require_arg, 'e' },
+ { "num-dsets", require_arg, 'd' },
+ { "num-dset", require_arg, 'd' },
+ { "num-dse", require_arg, 'd' },
+ { "num-ds", require_arg, 'd' },
+ { "num-d", require_arg, 'd' },
+ { "num-files", require_arg, 'F' },
+ { "num-file", require_arg, 'F' },
+ { "num-fil", require_arg, 'F' },
+ { "num-fi", require_arg, 'F' },
+ { "num-f", require_arg, 'F' },
+ { "num-iterations", require_arg, 'i' },
+ { "num-iteration", require_arg, 'i' },
+ { "num-iteratio", require_arg, 'i' },
+ { "num-iterati", require_arg, 'i' },
+ { "num-iterat", require_arg, 'i' },
+ { "num-itera", require_arg, 'i' },
+ { "num-iter", require_arg, 'i' },
+ { "num-ite", require_arg, 'i' },
+ { "num-it", require_arg, 'i' },
+ { "num-i", require_arg, 'i' },
+ { "output", require_arg, 'o' },
+ { "outpu", require_arg, 'o' },
+ { "outp", require_arg, 'o' },
+ { "out", require_arg, 'o' },
+ { "ou", require_arg, 'o' },
+ { "threshold", require_arg, 'T' },
+ { "threshol", require_arg, 'T' },
+ { "thresho", require_arg, 'T' },
+ { "thresh", require_arg, 'T' },
+ { "thres", require_arg, 'T' },
+ { "thre", require_arg, 'T' },
+ { "thr", require_arg, 'T' },
+ { "th", require_arg, 'T' },
+ { "write-only", require_arg, 'w' },
+ { "write-onl", require_arg, 'w' },
+ { "write-on", require_arg, 'w' },
+ { "write-o", require_arg, 'w' },
+ { "write", require_arg, 'w' },
+ { "writ", require_arg, 'w' },
+ { "wri", require_arg, 'w' },
+ { "wr", require_arg, 'w' },
+ { NULL, 0, '\0' }
};
struct options {
@@ -277,13 +277,13 @@ struct options {
unsigned interleaved; /* Interleaved vs. contiguous blocks */
unsigned collective; /* Collective vs. independent I/O */
unsigned dim2d; /* 1D vs. 2D geometry */
- int print_times; /* print times as well as throughputs */
- int print_raw; /* print raw data throughput info */
+ int print_times; /* print times as well as throughputs */
+ int print_raw; /* print raw data throughput info */
off_t h5_alignment; /* alignment in HDF5 file */
off_t h5_threshold; /* threshold for alignment in HDF5 file */
- int h5_use_chunks; /* Make HDF5 dataset chunked */
- int h5_write_only; /* Perform the write tests only */
- int verify; /* Verify data correctness */
+ int h5_use_chunks; /* Make HDF5 dataset chunked */
+ int h5_write_only; /* Perform the write tests only */
+ int verify; /* Verify data correctness */
};
typedef struct _minmax {
@@ -304,9 +304,9 @@ static minmax accumulate_minmax_stuff(minmax *mm, int count);
static int create_comm_world(int num_procs, int *doing_pio);
static int destroy_comm_world(void);
static void output_results(const struct options *options, const char *name,
- minmax *table, int table_size, off_t data_size);
+ minmax *table, int table_size, off_t data_size);
static void output_times(const struct options *options, const char *name,
- minmax *table, int table_size);
+ minmax *table, int table_size);
static void output_report(const char *fmt, ...);
static void print_indent(register int indent);
static void usage(const char *prog);
@@ -339,12 +339,12 @@ main(int argc, char **argv)
ret = MPI_Comm_size(MPI_COMM_WORLD, &comm_world_nprocs_g);
if (ret != MPI_SUCCESS) {
- fprintf(stderr, "%s: MPI_Comm_size call failed\n", progname);
+ HDfprintf(stderr, "%s: MPI_Comm_size call failed\n", progname);
if (ret == MPI_ERR_COMM)
- fprintf(stderr, "invalid MPI communicator\n");
+ HDfprintf(stderr, "invalid MPI communicator\n");
else
- fprintf(stderr, "invalid argument\n");
+ HDfprintf(stderr, "invalid argument\n");
exit_value = EXIT_FAILURE;
goto finish;
@@ -353,12 +353,12 @@ main(int argc, char **argv)
ret = MPI_Comm_rank(MPI_COMM_WORLD, &comm_world_rank_g);
if (ret != MPI_SUCCESS) {
- fprintf(stderr, "%s: MPI_Comm_rank call failed\n", progname);
+ HDfprintf(stderr, "%s: MPI_Comm_rank call failed\n", progname);
if (ret == MPI_ERR_COMM)
- fprintf(stderr, "invalid MPI communicator\n");
+ HDfprintf(stderr, "invalid MPI communicator\n");
else
- fprintf(stderr, "invalid argument\n");
+ HDfprintf(stderr, "invalid argument\n");
exit_value = EXIT_FAILURE;
goto finish;
@@ -376,8 +376,8 @@ main(int argc, char **argv)
if (opts->output_file) {
if ((output = HDfopen(opts->output_file, "w")) == NULL) {
- fprintf(stderr, "%s: cannot open output file\n", progname);
- perror(opts->output_file);
+ HDfprintf(stderr, "%s: cannot open output file\n", progname);
+ HDperror(opts->output_file);
goto finish;
}
}
@@ -389,7 +389,7 @@ main(int argc, char **argv)
finish:
MPI_Finalize();
- free(opts);
+ HDfree(opts);
return exit_value;
}
@@ -446,8 +446,8 @@ run_test_loop(struct options *opts)
/* do something harsh */
}
- /* only processes doing PIO will run the tests */
- if (doing_pio){
+ /* only processes doing PIO will run the tests */
+ if (doing_pio){
output_report("Number of processors = %ld\n", parms.num_procs);
/* multiply the xfer buffer size by 2 for each loop iteration */
@@ -455,33 +455,33 @@ run_test_loop(struct options *opts)
buf_size <= opts->max_xfer_size; buf_size <<= 1) {
parms.buf_size = buf_size;
- if (parms.dim2d){
- parms.num_bytes = (off_t)pow((double)(opts->num_bpp*parms.num_procs),2);
- if (parms.interleaved)
- output_report("Transfer Buffer Size: %ldx%ld bytes, File size: %.2f MB\n",
- buf_size, opts->blk_size,
- ((double)parms.num_dsets * (double)parms.num_bytes)
- / ONE_MB);
- else
- output_report("Transfer Buffer Size: %ldx%ld bytes, File size: %.2f MB\n",
- opts->blk_size, buf_size,
- ((double)parms.num_dsets * (double)parms.num_bytes)
- / ONE_MB);
-
- print_indent(1);
- output_report(" # of files: %ld, # of datasets: %ld, dataset size: %.2fx%.2f KB\n",
- parms.num_files, parms.num_dsets, (double)(opts->num_bpp*parms.num_procs)/ONE_KB,
- (double)(opts->num_bpp*parms.num_procs)/ONE_KB);
- }
- else{
- parms.num_bytes = (off_t)opts->num_bpp*parms.num_procs;
- output_report("Transfer Buffer Size: %ld bytes, File size: %.2f MB\n",
- buf_size,((double)parms.num_dsets * (double)parms.num_bytes) / ONE_MB);
-
- print_indent(1);
- output_report(" # of files: %ld, # of datasets: %ld, dataset size: %.2f MB\n",
- parms.num_files, parms.num_dsets, (double)(opts->num_bpp*parms.num_procs)/ONE_MB);
- }
+ if (parms.dim2d){
+ parms.num_bytes = (off_t)pow((double)(opts->num_bpp*parms.num_procs),2);
+ if (parms.interleaved)
+ output_report("Transfer Buffer Size: %ldx%ld bytes, File size: %.2f MB\n",
+ buf_size, opts->blk_size,
+ ((double)parms.num_dsets * (double)parms.num_bytes)
+ / ONE_MB);
+ else
+ output_report("Transfer Buffer Size: %ldx%ld bytes, File size: %.2f MB\n",
+ opts->blk_size, buf_size,
+ ((double)parms.num_dsets * (double)parms.num_bytes)
+ / ONE_MB);
+
+ print_indent(1);
+ output_report(" # of files: %ld, # of datasets: %ld, dataset size: %.2fx%.2f KB\n",
+ parms.num_files, parms.num_dsets, (double)(opts->num_bpp*parms.num_procs)/ONE_KB,
+ (double)(opts->num_bpp*parms.num_procs)/ONE_KB);
+ }
+ else{
+ parms.num_bytes = (off_t)opts->num_bpp*parms.num_procs;
+ output_report("Transfer Buffer Size: %ld bytes, File size: %.2f MB\n",
+ buf_size,((double)parms.num_dsets * (double)parms.num_bytes) / ONE_MB);
+
+ print_indent(1);
+ output_report(" # of files: %ld, # of datasets: %ld, dataset size: %.2f MB\n",
+ parms.num_files, parms.num_dsets, (double)(opts->num_bpp*parms.num_procs)/ONE_MB);
+ }
if (opts->io_types & PIO_POSIX)
run_test(POSIXIO, parms, opts);
@@ -500,7 +500,7 @@ run_test_loop(struct options *opts)
if (destroy_comm_world() != SUCCESS) {
/* do something harsh */
}
- }
+ }
}
}
@@ -549,15 +549,15 @@ run_test(iotype iot, parameters parms, struct options *opts)
output_report("IO API = ");
switch (iot) {
- case POSIXIO:
- output_report("POSIX\n");
- break;
- case MPIO:
- output_report("MPIO\n");
- break;
- case PHDF5:
- output_report("PHDF5 (w/MPI-IO driver)\n");
- break;
+ case POSIXIO:
+ output_report("POSIX\n");
+ break;
+ case MPIO:
+ output_report("MPIO\n");
+ break;
+ case PHDF5:
+ output_report("PHDF5 (w/MPI-IO driver)\n");
+ break;
}
MPI_Comm_size(pio_comm_g, &comm_size);
@@ -659,15 +659,15 @@ run_test(iotype iot, parameters parms, struct options *opts)
read_close_mm_table[i] = read_close_mm;
- }
+ }
- io_time_destroy(res.timers);
+ io_time_destroy(res.timers);
}
/*
- * Show various statistics
- */
- /* Write statistics */
+ * Show various statistics
+ */
+ /* Write statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw write" times */
@@ -718,22 +718,22 @@ run_test(iotype iot, parameters parms, struct options *opts)
/* Print out time from open to first write */
if (pio_debug_level >= 3) {
- /* output all of the times for all iterations */
- print_indent(3);
- output_report("Write file open details:\n");
- output_all_info(write_open_mm_table, parms.num_iters, 4);
+ /* output all of the times for all iterations */
+ print_indent(3);
+ output_report("Write file open details:\n");
+ output_all_info(write_open_mm_table, parms.num_iters, 4);
}
/* Print out time from last write to close */
if (pio_debug_level >= 3) {
- /* output all of the times for all iterations */
- print_indent(3);
- output_report("Write file close details:\n");
- output_all_info(write_close_mm_table, parms.num_iters, 4);
+ /* output all of the times for all iterations */
+ print_indent(3);
+ output_report("Write file close details:\n");
+ output_all_info(write_close_mm_table, parms.num_iters, 4);
}
if (!parms.h5_write_only) {
- /* Read statistics */
+ /* Read statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw read" times */
@@ -745,7 +745,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
output_results(opts, "Raw Data Read", read_raw_mm_table,
- parms.num_iters, raw_size);
+ parms.num_iters, raw_size);
} /* end if */
/* show mpi read statics */
@@ -802,20 +802,20 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
/* clean up our mess */
- free(write_mpi_mm_table);
- free(write_mm_table);
- free(write_gross_mm_table);
- free(write_raw_mm_table);
- free(write_open_mm_table);
- free(write_close_mm_table);
+ HDfree(write_mpi_mm_table);
+ HDfree(write_mm_table);
+ HDfree(write_gross_mm_table);
+ HDfree(write_raw_mm_table);
+ HDfree(write_open_mm_table);
+ HDfree(write_close_mm_table);
if (!parms.h5_write_only) {
- free(read_mpi_mm_table);
- free(read_mm_table);
- free(read_gross_mm_table);
- free(read_raw_mm_table);
- free(read_open_mm_table);
- free(read_close_mm_table);
+ HDfree(read_mpi_mm_table);
+ HDfree(read_mm_table);
+ HDfree(read_gross_mm_table);
+ HDfree(read_raw_mm_table);
+ HDfree(read_open_mm_table);
+ HDfree(read_close_mm_table);
}
return ret_value;
@@ -919,13 +919,13 @@ create_comm_world(int num_procs, int *doing_pio)
pio_comm_g = MPI_COMM_NULL;
/*
- * Create a sub communicator for this PIO run. Easier to use the first N
- * processes.
- */
+ * Create a sub communicator for this PIO run. Easier to use the first N
+ * processes.
+ */
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
if (num_procs > nprocs) {
- fprintf(stderr,
+ HDfprintf(stderr,
"number of process(%d) must be <= number of processes in MPI_COMM_WORLD(%d)\n",
num_procs, nprocs);
goto error_done;
@@ -936,7 +936,7 @@ create_comm_world(int num_procs, int *doing_pio)
mrc = MPI_Comm_split(MPI_COMM_WORLD, color, myrank, &pio_comm_g);
if (mrc != MPI_SUCCESS) {
- fprintf(stderr, "MPI_Comm_split failed\n");
+ HDfprintf(stderr, "MPI_Comm_split failed\n");
goto error_done;
}
@@ -950,11 +950,11 @@ create_comm_world(int num_procs, int *doing_pio)
MPI_Comm_size(pio_comm_g, &pio_mpi_nprocs_g);
MPI_Comm_rank(pio_comm_g, &pio_mpi_rank_g);
-done:
+ done:
*doing_pio = color;
return SUCCESS;
-error_done:
+ error_done:
destroy_comm_world();
return FAIL;
}
@@ -990,7 +990,7 @@ destroy_comm_world(void)
*/
static void
output_results(const struct options *opts, const char *name, minmax *table,
- int table_size,off_t data_size)
+ int table_size,off_t data_size)
{
minmax total_mm;
@@ -1010,7 +1010,7 @@ output_results(const struct options *opts, const char *name, minmax *table,
print_indent(4);
output_report("Average Throughput: %6.2f MB/s",
- MB_PER_SEC(data_size,total_mm.sum / total_mm.num));
+ MB_PER_SEC(data_size,total_mm.sum / total_mm.num));
if(opts->print_times)
output_report(" (%7.3f s)\n", (total_mm.sum / total_mm.num));
else
@@ -1027,7 +1027,7 @@ output_results(const struct options *opts, const char *name, minmax *table,
static void
output_times(const struct options *opts, const char *name, minmax *table,
- int table_size)
+ int table_size)
{
minmax total_mm;
@@ -1039,13 +1039,13 @@ output_times(const struct options *opts, const char *name, minmax *table,
/* Note: The maximum throughput uses the minimum amount of time & vice versa */
print_indent(4);
- output_report("Minimum Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,(total_mm.min));
+ output_report("Minimum Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,(total_mm.min));
print_indent(4);
- output_report("Average Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,(total_mm.sum / total_mm.num));
+ output_report("Average Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,(total_mm.sum / total_mm.num));
print_indent(4);
- output_report("Maximum Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,(total_mm.max));
+ output_report("Maximum Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,(total_mm.max));
}
/*
@@ -1065,9 +1065,9 @@ output_report(const char *fmt, ...)
if (myrank == 0) {
va_list ap;
- va_start(ap, fmt);
- vfprintf(output, fmt, ap);
- va_end(ap);
+ HDva_start(ap, fmt);
+ HDvfprintf(output, fmt, ap);
+ HDva_end(ap);
}
}
@@ -1087,10 +1087,10 @@ print_indent(register int indent)
MPI_Comm_rank(pio_comm_g, &myrank);
if (myrank == 0) {
- indent *= TAB_SPACE;
+ indent *= TAB_SPACE;
- for (; indent > 0; --indent)
- fputc(' ', output);
+ for (; indent > 0; --indent)
+ HDfputc(' ', output);
}
}
@@ -1115,11 +1115,11 @@ static void
print_io_api(long io_types)
{
if (io_types & PIO_POSIX)
- HDfprintf(output, "posix ");
+ HDfprintf(output, "posix ");
if (io_types & PIO_MPI)
- HDfprintf(output, "mpiio ");
+ HDfprintf(output, "mpiio ");
if (io_types & PIO_HDF5)
- HDfprintf(output, "phdf5 ");
+ HDfprintf(output, "phdf5 ");
HDfprintf(output, "\n");
}
@@ -1128,74 +1128,74 @@ report_parameters(struct options *opts)
{
int rank = comm_world_rank_g;
- print_version("HDF5 Library"); /* print library version */
+ print_version("HDF5 Library"); /* print library version */
HDfprintf(output, "rank %d: ==== Parameters ====\n", rank);
HDfprintf(output, "rank %d: IO API=", rank);
print_io_api(opts->io_types);
HDfprintf(output, "rank %d: Number of files=%ld\n", rank,
- opts->num_files);
+ opts->num_files);
HDfprintf(output, "rank %d: Number of datasets=%ld\n", rank,
- opts->num_dsets);
+ opts->num_dsets);
HDfprintf(output, "rank %d: Number of iterations=%d\n", rank,
- opts->num_iters);
+ opts->num_iters);
HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank,
- opts->min_num_procs, opts->max_num_procs);
+ opts->min_num_procs, opts->max_num_procs);
if (opts->dim2d){
- HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
- recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->min_num_procs), ":");
- recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->max_num_procs), "\n");
-
- HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
- recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), "x");
- recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
- recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "x");
- recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
-
- HDfprintf(output, "rank %d: File size=", rank);
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2)
- * opts->num_dsets), ":");
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2)
- * opts->num_dsets), "\n");
-
- HDfprintf(output, "rank %d: Transfer buffer size=", rank);
- if(opts->interleaved){
- recover_size_and_print((long long)opts->min_xfer_size, "x");
- recover_size_and_print((long long)opts->blk_size, ":");
- recover_size_and_print((long long)opts->max_xfer_size, "x");
+ HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
+ recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->min_num_procs), ":");
+ recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->max_num_procs), "\n");
+
+ HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
+ recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), "x");
+ recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
+ recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "x");
+ recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
+
+ HDfprintf(output, "rank %d: File size=", rank);
+ recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2)
+ * opts->num_dsets), ":");
+ recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2)
+ * opts->num_dsets), "\n");
+
+ HDfprintf(output, "rank %d: Transfer buffer size=", rank);
+ if(opts->interleaved){
+ recover_size_and_print((long long)opts->min_xfer_size, "x");
+ recover_size_and_print((long long)opts->blk_size, ":");
+ recover_size_and_print((long long)opts->max_xfer_size, "x");
+ recover_size_and_print((long long)opts->blk_size, "\n");
+ }
+ else{
+ recover_size_and_print((long long)opts->blk_size, "x");
+ recover_size_and_print((long long)opts->min_xfer_size, ":");
+ recover_size_and_print((long long)opts->blk_size, "x");
+ recover_size_and_print((long long)opts->max_xfer_size, "\n");
+ }
+ HDfprintf(output, "rank %d: Block size=", rank);
+ recover_size_and_print((long long)opts->blk_size, "x");
recover_size_and_print((long long)opts->blk_size, "\n");
}
else{
- recover_size_and_print((long long)opts->blk_size, "x");
+ HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
+ recover_size_and_print((long long)opts->num_bpp, "\n");
+
+ HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
+ recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
+ recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
+
+ HDfprintf(output, "rank %d: File size=", rank);
+ recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs
+ * opts->num_dsets), ":");
+ recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs
+ * opts->num_dsets), "\n");
+
+ HDfprintf(output, "rank %d: Transfer buffer size=", rank);
recover_size_and_print((long long)opts->min_xfer_size, ":");
- recover_size_and_print((long long)opts->blk_size, "x");
recover_size_and_print((long long)opts->max_xfer_size, "\n");
- }
- HDfprintf(output, "rank %d: Block size=", rank);
- recover_size_and_print((long long)opts->blk_size, "x");
- recover_size_and_print((long long)opts->blk_size, "\n");
- }
- else{
- HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
- recover_size_and_print((long long)opts->num_bpp, "\n");
-
- HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
- recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
- recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
-
- HDfprintf(output, "rank %d: File size=", rank);
- recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs
- * opts->num_dsets), ":");
- recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs
- * opts->num_dsets), "\n");
-
- HDfprintf(output, "rank %d: Transfer buffer size=", rank);
- recover_size_and_print((long long)opts->min_xfer_size, ":");
- recover_size_and_print((long long)opts->max_xfer_size, "\n");
- HDfprintf(output, "rank %d: Block size=", rank);
- recover_size_and_print((long long)opts->blk_size, "\n");
+ HDfprintf(output, "rank %d: Block size=", rank);
+ recover_size_and_print((long long)opts->blk_size, "\n");
}
HDfprintf(output, "rank %d: Block Pattern in Dataset=", rank);
@@ -1228,7 +1228,7 @@ report_parameters(struct options *opts)
char *prefix = HDgetenv("HDF5_PARAPREFIX");
HDfprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank,
- (prefix ? prefix : "not set"));
+ (prefix ? prefix : "not set"));
}
HDfprintf(output, "rank %d: ", rank);
@@ -1283,39 +1283,39 @@ parse_command_line(int argc, char *argv[])
cl_opts->h5_alignment = parse_size_directive(opt_arg);
break;
case 'A':
- {
- const char *end = opt_arg;
-
- while (end && *end != '\0') {
- char buf[10];
- int i;
-
- HDmemset(buf, '\0', sizeof(buf));
-
- for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
- buf[i++] = *end;
-
- if (!HDstrcasecmp(buf, "phdf5")) {
- cl_opts->io_types |= PIO_HDF5;
- } else if (!HDstrcasecmp(buf, "mpiio")) {
- cl_opts->io_types |= PIO_MPI;
- } else if (!HDstrcasecmp(buf, "posix")) {
- cl_opts->io_types |= PIO_POSIX;
- } else {
- fprintf(stderr, "pio_perf: invalid --api option %s\n",
- buf);
- exit(EXIT_FAILURE);
- }
+ {
+ const char *end = opt_arg;
+
+ while (end && *end != '\0') {
+ char buf[10];
+ int i;
+
+ HDmemset(buf, '\0', sizeof(buf));
+
+ for (i = 0; *end != '\0' && *end != ','; ++end)
+ if (HDisalnum(*end) && i < 10)
+ buf[i++] = *end;
+
+ if (!HDstrcasecmp(buf, "phdf5")) {
+ cl_opts->io_types |= PIO_HDF5;
+ } else if (!HDstrcasecmp(buf, "mpiio")) {
+ cl_opts->io_types |= PIO_MPI;
+ } else if (!HDstrcasecmp(buf, "posix")) {
+ cl_opts->io_types |= PIO_POSIX;
+ } else {
+ HDfprintf(stderr, "pio_perf: invalid --api option %s\n",
+ buf);
+ HDexit(EXIT_FAILURE);
+ }
- if (*end == '\0')
- break;
+ if (*end == '\0')
+ break;
- end++;
- }
+ end++;
}
+ }
- break;
+ break;
#if 0
case 'b':
/* the future "binary" option */
@@ -1335,63 +1335,63 @@ parse_command_line(int argc, char *argv[])
cl_opts->num_dsets = atoi(opt_arg);
break;
case 'D':
- {
- const char *end = opt_arg;
-
- while (end && *end != '\0') {
- char buf[10];
- int i;
-
- HDmemset(buf, '\0', sizeof(buf));
-
- for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
- buf[i++] = *end;
-
- if (strlen(buf) > 1 || isdigit(buf[0])) {
- size_t j;
-
- for (j = 0; j < 10 && buf[j] != '\0'; ++j)
- if (!isdigit(buf[j])) {
- fprintf(stderr, "pio_perf: invalid --debug option %s\n",
- buf);
- exit(EXIT_FAILURE);
- }
-
- pio_debug_level = atoi(buf);
-
- if (pio_debug_level > 4)
- pio_debug_level = 4;
- else if (pio_debug_level < 0)
- pio_debug_level = 0;
- } else {
- switch (*buf) {
- case 'r':
- /* Turn on raw data throughput info */
- cl_opts->print_raw = TRUE;
- break;
- case 't':
- /* Turn on time printing */
- cl_opts->print_times = TRUE;
- break;
- case 'v':
- /* Turn on verify data correctness*/
- cl_opts->verify = TRUE;
- break;
- default:
- fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
- exit(EXIT_FAILURE);
+ {
+ const char *end = opt_arg;
+
+ while (end && *end != '\0') {
+ char buf[10];
+ int i;
+
+ HDmemset(buf, '\0', sizeof(buf));
+
+ for (i = 0; *end != '\0' && *end != ','; ++end)
+ if (isalnum(*end) && i < 10)
+ buf[i++] = *end;
+
+ if (strlen(buf) > 1 || isdigit(buf[0])) {
+ size_t j;
+
+ for (j = 0; j < 10 && buf[j] != '\0'; ++j)
+ if (!isdigit(buf[j])) {
+ fprintf(stderr, "pio_perf: invalid --debug option %s\n",
+ buf);
+ HDexit(EXIT_FAILURE);
}
- }
- if (*end == '\0')
+ pio_debug_level = atoi(buf);
+
+ if (pio_debug_level > 4)
+ pio_debug_level = 4;
+ else if (pio_debug_level < 0)
+ pio_debug_level = 0;
+ } else {
+ switch (*buf) {
+ case 'r':
+ /* Turn on raw data throughput info */
+ cl_opts->print_raw = TRUE;
break;
-
- end++;
+ case 't':
+ /* Turn on time printing */
+ cl_opts->print_times = TRUE;
+ break;
+ case 'v':
+ /* Turn on verify data correctness*/
+ cl_opts->verify = TRUE;
+ break;
+ default:
+ HDfprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
+ HDexit(EXIT_FAILURE);
+ }
}
+
+ if (*end == '\0')
+ break;
+
+ end++;
}
+ }
- break;
+ break;
case 'e':
cl_opts->num_bpp = parse_size_directive(opt_arg);
break;
@@ -1432,7 +1432,7 @@ parse_command_line(int argc, char *argv[])
case '?':
default:
usage(progname);
- free(cl_opts);
+ HDfree(cl_opts);
return NULL;
}
}
@@ -1457,30 +1457,30 @@ parse_command_line(int argc, char *argv[])
/* set default if none specified yet */
if (!cl_opts->io_types)
- cl_opts->io_types = PIO_HDF5 | PIO_MPI | PIO_POSIX; /* run all API */
+ cl_opts->io_types = PIO_HDF5 | PIO_MPI | PIO_POSIX; /* run all API */
/* verify parameters sanity. Adjust if needed. */
/* cap xfer_size with bytes per process */
if (!cl_opts->dim2d) {
if (cl_opts->min_xfer_size > cl_opts->num_bpp)
- cl_opts->min_xfer_size = cl_opts->num_bpp;
+ cl_opts->min_xfer_size = cl_opts->num_bpp;
if (cl_opts->max_xfer_size > cl_opts->num_bpp)
- cl_opts->max_xfer_size = cl_opts->num_bpp;
+ cl_opts->max_xfer_size = cl_opts->num_bpp;
}
if (cl_opts->min_xfer_size > cl_opts->max_xfer_size)
- cl_opts->min_xfer_size = cl_opts->max_xfer_size;
+ cl_opts->min_xfer_size = cl_opts->max_xfer_size;
if (cl_opts->blk_size > cl_opts->num_bpp )
cl_opts->blk_size = cl_opts->num_bpp;
/* check range of number of processes */
if (cl_opts->min_num_procs <= 0)
- cl_opts->min_num_procs = 1;
+ cl_opts->min_num_procs = 1;
if (cl_opts->max_num_procs <= 0)
- cl_opts->max_num_procs = 1;
+ cl_opts->max_num_procs = 1;
if (cl_opts->min_num_procs > cl_opts->max_num_procs)
- cl_opts->min_num_procs = cl_opts->max_num_procs;
+ cl_opts->min_num_procs = cl_opts->max_num_procs;
/* check iteration */
if (cl_opts->num_iters <= 0)
- cl_opts->num_iters = 1;
+ cl_opts->num_iters = 1;
return cl_opts;
}
@@ -1513,21 +1513,21 @@ parse_size_directive(const char *size)
++endptr;
switch (*endptr) {
- case 'K':
- case 'k':
- s *= ONE_KB;
- break;
- case 'M':
- case 'm':
- s *= ONE_MB;
- break;
- case 'G':
- case 'g':
- s *= ONE_GB;
- break;
- default:
- fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
- exit(EXIT_FAILURE);
+ case 'K':
+ case 'k':
+ s *= ONE_KB;
+ break;
+ case 'M':
+ case 'm':
+ s *= ONE_MB;
+ break;
+ case 'G':
+ case 'g':
+ s *= ONE_GB;
+ break;
+ default:
+ HDfprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
+ HDexit(EXIT_FAILURE);
}
}
@@ -1540,7 +1540,7 @@ parse_size_directive(const char *size)
* Return: Nothing
* Programmer: Bill Wendling, 31. October 2001
* Modifications:
- * Added 2D testing (Christian Chilan, 10. August 2005)
+ * Added 2D testing (Christian Chilan, 10. August 2005)
*/
static void
usage(const char *prog)
@@ -1550,126 +1550,126 @@ usage(const char *prog)
MPI_Comm_rank(pio_comm_g, &myrank);
if (myrank == 0) {
- print_version(prog);
- printf("usage: %s [OPTIONS]\n", prog);
- printf(" OPTIONS\n");
- printf(" -h, --help Print a usage message and exit\n");
- printf(" -a S, --align=S Alignment of objects in HDF5 file [default: 1]\n");
- printf(" -A AL, --api=AL Which APIs to test [default: all of them]\n");
+ print_version(prog);
+ HDprintf("usage: %s [OPTIONS]\n", prog);
+ HDprintf(" OPTIONS\n");
+ HDprintf(" -h, --help Print a usage message and exit\n");
+ HDprintf(" -a S, --align=S Alignment of objects in HDF5 file [default: 1]\n");
+ HDprintf(" -A AL, --api=AL Which APIs to test [default: all of them]\n");
#if 0
- printf(" -b, --binary The elusive binary option\n");
+ HDprintf(" -b, --binary The elusive binary option\n");
#endif /* 0 */
- printf(" -B S, --block-size=S Block size within transfer buffer\n");
- printf(" (see below for description)\n");
- printf(" [default: half the number of bytes per process\n");
- printf(" per dataset]\n");
- printf(" -c, --chunk Create HDF5 datasets using chunked storage\n");
- printf(" [default: contiguous storage]\n");
- printf(" -C, --collective Use collective I/O for MPI and HDF5 APIs\n");
- printf(" [default: independent I/O)\n");
- printf(" -d N, --num-dsets=N Number of datasets per file [default: 1]\n");
- printf(" -D DL, --debug=DL Indicate the debugging level\n");
- printf(" [default: no debugging]\n");
- printf(" -e S, --num-bytes=S Number of bytes per process per dataset\n");
- printf(" (see below for description)\n");
- printf(" [default: 256K for 1D, 8K for 2D]\n");
- printf(" -F N, --num-files=N Number of files [default: 1]\n");
- printf(" -g, --geometry Use 2D geometry [default: 1D geometry]\n");
- printf(" -i N, --num-iterations=N Number of iterations to perform [default: 1]\n");
- printf(" -I, --interleaved Interleaved access pattern\n");
- printf(" (see below for example)\n");
- printf(" [default: Contiguous access pattern]\n");
- printf(" -o F, --output=F Output raw data into file F [default: none]\n");
- printf(" -p N, --min-num-processes=N Minimum number of processes to use [default: 1]\n");
- printf(" -P N, --max-num-processes=N Maximum number of processes to use\n");
- printf(" [default: all MPI_COMM_WORLD processes ]\n");
- printf(" -T S, --threshold=S Threshold for alignment of objects in HDF5 file\n");
- printf(" [default: 1]\n");
- printf(" -w, --write-only Perform write tests not the read tests\n");
- printf(" -x S, --min-xfer-size=S Minimum transfer buffer size\n");
- printf(" (see below for description)\n");
- printf(" [default: half the number of bytes per process\n");
- printf(" per dataset]\n");
- printf(" -X S, --max-xfer-size=S Maximum transfer buffer size\n");
- printf(" [default: the number of bytes per process per\n");
- printf(" dataset]\n");
- printf("\n");
- printf(" F - is a filename.\n");
- printf(" N - is an integer >=0.\n");
- printf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n");
- printf(" K - Kilobyte (%d)\n", ONE_KB);
- printf(" M - Megabyte (%d)\n", ONE_MB);
- printf(" G - Gigabyte (%d)\n", ONE_GB);
- printf("\n");
- printf(" Example: '37M' is 37 megabytes or %d bytes\n", 37*ONE_MB);
- printf("\n");
- printf(" AL - is an API list. Valid values are:\n");
- printf(" phdf5 - Parallel HDF5\n");
- printf(" mpiio - MPI-I/O\n");
- printf(" posix - POSIX\n");
- printf("\n");
- printf(" Example: --api=mpiio,phdf5\n");
- printf("\n");
- printf(" Dataset size:\n");
- printf(" Depending on the selected geometry, each test dataset is either a linear\n");
- printf(" array of size bytes-per-process * num-processes, or a square array of size\n");
- printf(" (bytes-per-process * num-processes) x (bytes-per-process * num-processes).\n");
- printf("\n");
- printf(" Block size vs. Transfer buffer size:\n");
- printf(" buffer-size controls the size of the memory buffer, which is broken into\n");
- printf(" blocks and written to the file. Depending on the selected geometry, each\n");
- printf(" block can be a linear array of size block-size or a square array of size\n");
- printf(" block-size x block-size. The arrangement in which blocks are written is\n");
- printf(" determined by the access pattern.\n");
- printf("\n");
- printf(" In 1D geometry, the transfer buffer is a linear array of size buffer-size.\n");
- printf(" In 2D geometry, it is a rectangular array of size block-size x buffer-size\n");
- printf(" or buffer-size x block-size if interleaved pattern is selected.\n");
- printf("\n");
- printf(" Interleaved and Contiguous patterns in 1D geometry:\n");
- printf(" When contiguous access pattern is chosen, the dataset is evenly divided\n");
- printf(" into num-processes regions and each process writes data to its own region.\n");
- printf(" When interleaved blocks are written to a dataset, space for the first\n");
- printf(" block of the first process is allocated in the dataset, then space is\n");
- printf(" allocated for the first block of the second process, etc. until space is\n");
- printf(" allocated for the first block of each process, then space is allocated for\n");
- printf(" the second block of the first process, the second block of the second\n");
- printf(" process, etc.\n");
- printf("\n");
- printf(" For example, with a 3 process run, 512KB bytes-per-process, 256KB transfer\n");
- printf(" buffer size, and 64KB block size, each process must issue 2 transfer\n");
- printf(" requests to complete access to the dataset.\n");
- printf(" Contiguous blocks of the first transfer request are written like so:\n");
- printf(" 1111----2222----3333----\n");
- printf(" Interleaved blocks of the first transfer request are written like so:\n");
- printf(" 123123123123------------\n");
- printf(" The actual number of I/O operations involved in a transfer request\n");
- printf(" depends on the access pattern and communication mode.\n");
- printf(" When using independent I/O with interleaved pattern, each process\n");
- printf(" performs 4 small non-contiguous I/O operations per transfer request.\n");
- printf(" If collective I/O is turned on, the combined content of the buffers of\n");
- printf(" the 3 processes will be written using one collective I/O operation\n");
- printf(" per transfer request.\n");
- printf("\n");
- printf(" For information about access patterns in 2D geometry, please refer to the\n");
- printf(" HDF5 Reference Manual.\n");
- printf("\n");
- printf(" DL - is a list of debugging flags. Valid values are:\n");
- printf(" 1 - Minimal\n");
- printf(" 2 - Not quite everything\n");
- printf(" 3 - Everything\n");
- printf(" 4 - The kitchen sink\n");
- printf(" r - Raw data I/O throughput information\n");
- printf(" t - Times as well as throughputs\n");
- printf(" v - Verify data correctness\n");
- printf("\n");
- printf(" Example: --debug=2,r,t\n");
- printf("\n");
- printf(" Environment variables:\n");
- printf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
- printf(" HDF5_MPI_INFO MPI INFO object key=value separated by ;\n");
- printf(" HDF5_PARAPREFIX Paralllel data files prefix\n");
- fflush(stdout);
+ HDprintf(" -B S, --block-size=S Block size within transfer buffer\n");
+ HDprintf(" (see below for description)\n");
+ HDprintf(" [default: half the number of bytes per process\n");
+ HDprintf(" per dataset]\n");
+ HDprintf(" -c, --chunk Create HDF5 datasets using chunked storage\n");
+ HDprintf(" [default: contiguous storage]\n");
+ HDprintf(" -C, --collective Use collective I/O for MPI and HDF5 APIs\n");
+ HDprintf(" [default: independent I/O)\n");
+ HDprintf(" -d N, --num-dsets=N Number of datasets per file [default: 1]\n");
+ HDprintf(" -D DL, --debug=DL Indicate the debugging level\n");
+ HDprintf(" [default: no debugging]\n");
+ HDprintf(" -e S, --num-bytes=S Number of bytes per process per dataset\n");
+ HDprintf(" (see below for description)\n");
+ HDprintf(" [default: 256K for 1D, 8K for 2D]\n");
+ HDprintf(" -F N, --num-files=N Number of files [default: 1]\n");
+ HDprintf(" -g, --geometry Use 2D geometry [default: 1D geometry]\n");
+ HDprintf(" -i N, --num-iterations=N Number of iterations to perform [default: 1]\n");
+ HDprintf(" -I, --interleaved Interleaved access pattern\n");
+ HDprintf(" (see below for example)\n");
+ HDprintf(" [default: Contiguous access pattern]\n");
+ HDprintf(" -o F, --output=F Output raw data into file F [default: none]\n");
+ HDprintf(" -p N, --min-num-processes=N Minimum number of processes to use [default: 1]\n");
+ HDprintf(" -P N, --max-num-processes=N Maximum number of processes to use\n");
+ HDprintf(" [default: all MPI_COMM_WORLD processes ]\n");
+ HDprintf(" -T S, --threshold=S Threshold for alignment of objects in HDF5 file\n");
+ HDprintf(" [default: 1]\n");
+ HDprintf(" -w, --write-only Perform write tests not the read tests\n");
+ HDprintf(" -x S, --min-xfer-size=S Minimum transfer buffer size\n");
+ HDprintf(" (see below for description)\n");
+ HDprintf(" [default: half the number of bytes per process\n");
+ HDprintf(" per dataset]\n");
+ HDprintf(" -X S, --max-xfer-size=S Maximum transfer buffer size\n");
+ HDprintf(" [default: the number of bytes per process per\n");
+ HDprintf(" dataset]\n");
+ HDprintf("\n");
+ HDprintf(" F - is a filename.\n");
+ HDprintf(" N - is an integer >=0.\n");
+ HDprintf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n");
+ HDprintf(" K - Kilobyte (%d)\n", ONE_KB);
+ HDprintf(" M - Megabyte (%d)\n", ONE_MB);
+ HDprintf(" G - Gigabyte (%d)\n", ONE_GB);
+ HDprintf("\n");
+ HDprintf(" Example: '37M' is 37 megabytes or %d bytes\n", 37*ONE_MB);
+ HDprintf("\n");
+ HDprintf(" AL - is an API list. Valid values are:\n");
+ HDprintf(" phdf5 - Parallel HDF5\n");
+ HDprintf(" mpiio - MPI-I/O\n");
+ HDprintf(" posix - POSIX\n");
+ HDprintf("\n");
+ HDprintf(" Example: --api=mpiio,phdf5\n");
+ HDprintf("\n");
+ HDprintf(" Dataset size:\n");
+ HDprintf(" Depending on the selected geometry, each test dataset is either a linear\n");
+ HDprintf(" array of size bytes-per-process * num-processes, or a square array of size\n");
+ HDprintf(" (bytes-per-process * num-processes) x (bytes-per-process * num-processes).\n");
+ HDprintf("\n");
+ HDprintf(" Block size vs. Transfer buffer size:\n");
+ HDprintf(" buffer-size controls the size of the memory buffer, which is broken into\n");
+ HDprintf(" blocks and written to the file. Depending on the selected geometry, each\n");
+ HDprintf(" block can be a linear array of size block-size or a square array of size\n");
+ HDprintf(" block-size x block-size. The arrangement in which blocks are written is\n");
+ HDprintf(" determined by the access pattern.\n");
+ HDprintf("\n");
+ HDprintf(" In 1D geometry, the transfer buffer is a linear array of size buffer-size.\n");
+ HDprintf(" In 2D geometry, it is a rectangular array of size block-size x buffer-size\n");
+ HDprintf(" or buffer-size x block-size if interleaved pattern is selected.\n");
+ HDprintf("\n");
+ HDprintf(" Interleaved and Contiguous patterns in 1D geometry:\n");
+ HDprintf(" When contiguous access pattern is chosen, the dataset is evenly divided\n");
+ HDprintf(" into num-processes regions and each process writes data to its own region.\n");
+ HDprintf(" When interleaved blocks are written to a dataset, space for the first\n");
+ HDprintf(" block of the first process is allocated in the dataset, then space is\n");
+ HDprintf(" allocated for the first block of the second process, etc. until space is\n");
+ HDprintf(" allocated for the first block of each process, then space is allocated for\n");
+ HDprintf(" the second block of the first process, the second block of the second\n");
+ HDprintf(" process, etc.\n");
+ HDprintf("\n");
+ HDprintf(" For example, with a 3 process run, 512KB bytes-per-process, 256KB transfer\n");
+ HDprintf(" buffer size, and 64KB block size, each process must issue 2 transfer\n");
+ HDprintf(" requests to complete access to the dataset.\n");
+ HDprintf(" Contiguous blocks of the first transfer request are written like so:\n");
+ HDprintf(" 1111----2222----3333----\n");
+ HDprintf(" Interleaved blocks of the first transfer request are written like so:\n");
+ HDprintf(" 123123123123------------\n");
+ HDprintf(" The actual number of I/O operations involved in a transfer request\n");
+ HDprintf(" depends on the access pattern and communication mode.\n");
+ HDprintf(" When using independent I/O with interleaved pattern, each process\n");
+ HDprintf(" performs 4 small non-contiguous I/O operations per transfer request.\n");
+ HDprintf(" If collective I/O is turned on, the combined content of the buffers of\n");
+ HDprintf(" the 3 processes will be written using one collective I/O operation\n");
+ HDprintf(" per transfer request.\n");
+ HDprintf("\n");
+ HDprintf(" For information about access patterns in 2D geometry, please refer to the\n");
+ HDprintf(" HDF5 Reference Manual.\n");
+ HDprintf("\n");
+ HDprintf(" DL - is a list of debugging flags. Valid values are:\n");
+ HDprintf(" 1 - Minimal\n");
+ HDprintf(" 2 - Not quite everything\n");
+ HDprintf(" 3 - Everything\n");
+ HDprintf(" 4 - The kitchen sink\n");
+ HDprintf(" r - Raw data I/O throughput information\n");
+ HDprintf(" t - Times as well as throughputs\n");
+ HDprintf(" v - Verify data correctness\n");
+ HDprintf("\n");
+ HDprintf(" Example: --debug=2,r,t\n");
+ HDprintf("\n");
+ HDprintf(" Environment variables:\n");
+ HDprintf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
+ HDprintf(" HDF5_MPI_INFO MPI INFO object key=value separated by ;\n");
+ HDprintf(" HDF5_PARAPREFIX Paralllel data files prefix\n");
+ HDfflush(stdout);
} /* end if */
} /* end usage() */
@@ -1685,7 +1685,7 @@ usage(const char *prog)
int
main(void)
{
- printf("No parallel IO performance because parallel is not configured\n");
+ HDprintf("No parallel IO performance because parallel is not configured\n");
return EXIT_SUCCESS;
} /* end main */
diff --git a/tools/perform/pio_standalone.h b/tools/perform/pio_standalone.h
index 0330ef2..2a065ad 100644
--- a/tools/perform/pio_standalone.h
+++ b/tools/perform/pio_standalone.h
@@ -303,6 +303,7 @@ typedef off_t h5_stat_size_t;
#define HDpipe(F) pipe(F)
#define HDpow(X,Y) pow(X,Y)
/* printf() variable arguments */
+#define HDprintf(...) printf /*varargs*/
#define HDputc(C,F) putc(C,F)
#define HDputchar(C) putchar(C)
#define HDputs(S) puts(S)
@@ -357,6 +358,7 @@ H5_DLL int HDrand(void);
#define HDsin(X) sin(X)
#define HDsinh(X) sinh(X)
#define HDsleep(N) sleep(N)
+#define HDsprintf sprintf /*varargs*/
#ifdef H5_HAVE_WIN32_API
H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...);
#define HDsnprintf c99_snprintf /*varargs*/
diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c
index 38d95b4..70460f6 100644
--- a/tools/perform/sio_engine.c
+++ b/tools/perform/sio_engine.c
@@ -41,7 +41,7 @@
#define GOTOERROR(errcode) { ret_code = errcode; goto done; }
#define ERRMSG(mesg) { \
- fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \
+ HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
}
@@ -199,7 +199,7 @@ do_sio(parameters param)
if (sio_debug_level >= 4)
/* output all of the times for all iterations */
- fprintf(output, "Timer details:\n");
+ HDfprintf(output, "Timer details:\n");
/*
* Write performance measurement
@@ -492,7 +492,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -514,7 +514,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
h5dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (h5dcpl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -522,12 +522,12 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Set the chunk size to be the same as the buffer size */
hrc = H5Pset_chunk(h5dcpl, rank, h5chunk);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Set failed\n");
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
- sprintf(dname, "Dataset_%ld", (unsigned long)parms->num_bytes);
+ HDsprintf(dname, "Dataset_%ld", (unsigned long)parms->num_bytes);
h5ds_id = H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE,
h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
@@ -558,7 +558,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = dset_write(rank-1, fd, parms, buffer);
if (hrc < 0) {
- fprintf(stderr, "Error in dataset write\n");
+ HDfprintf(stderr, "Error in dataset write\n");
GOTOERROR(FAIL);
}
@@ -573,7 +573,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -586,7 +586,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0){
- fprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
h5dset_space_id = -1;
@@ -596,7 +596,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Memory Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
h5mem_space_id = -1;
@@ -606,7 +606,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
h5dxpl = -1;
@@ -839,7 +839,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
break;
@@ -858,7 +858,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
break;
case HDF5:
- sprintf(dname, "Dataset_%ld", (long)parms->num_bytes);
+ HDsprintf(dname, "Dataset_%ld", (long)parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
HDfprintf(stderr, "HDF5 Dataset open failed\n");
@@ -878,7 +878,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = dset_read(rank-1, fd, parms, buffer, buffer2);
if (hrc < 0) {
- fprintf(stderr, "Error in dataset read\n");
+ HDfprintf(stderr, "Error in dataset read\n");
GOTOERROR(FAIL);
}
@@ -892,7 +892,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -905,7 +905,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0){
- fprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
h5dset_space_id = -1;
@@ -915,7 +915,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Memory Space Close failed\n");
+ HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
h5mem_space_id = -1;
@@ -925,7 +925,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
h5dxpl = -1;
@@ -1090,7 +1090,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fapl = set_vfd(param);
if (fapl < 0) {
- fprintf(stderr, "HDF5 Property List Create failed\n");
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -1103,7 +1103,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
if (fd->h5fd < 0) {
- fprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
+ HDfprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
GOTOERROR(FAIL);
}
break;
@@ -1169,7 +1169,7 @@ set_vfd(parameters *param)
HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1,0) * (HADDR_MAX / 10);
}
@@ -1218,7 +1218,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
rc = POSIXCLOSE(fd->posixfd);
if (rc != 0){
- fprintf(stderr, "POSIX File Close failed\n");
+ HDfprintf(stderr, "POSIX File Close failed\n");
GOTOERROR(FAIL);
}
@@ -1229,7 +1229,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
hrc = H5Fclose(fd->h5fd);
if (hrc < 0) {
- fprintf(stderr, "HDF5 File Close failed\n");
+ HDfprintf(stderr, "HDF5 File Close failed\n");
GOTOERROR(FAIL);
}
diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c
index 2e6510f..c4958cd 100644
--- a/tools/perform/sio_perf.c
+++ b/tools/perform/sio_perf.c
@@ -285,14 +285,14 @@ struct options {
int buf_rank; /* Rank */
int order_rank; /* Rank */
int chk_rank; /* Rank */
- int print_times; /* print times as well as throughputs */
- int print_raw; /* print raw data throughput info */
+ int print_times; /* print times as well as throughputs */
+ int print_raw; /* print raw data throughput info */
off_t h5_alignment; /* alignment in HDF5 file */
off_t h5_threshold; /* threshold for alignment in HDF5 file */
- int h5_use_chunks; /* Make HDF5 dataset chunked */
- int h5_write_only; /* Perform the write tests only */
- int h5_extendable; /* Perform the write tests only */
- int verify; /* Verify data correctness */
+ int h5_use_chunks; /* Make HDF5 dataset chunked */
+ int h5_write_only; /* Perform the write tests only */
+ int h5_extendable; /* Perform the write tests only */
+ int verify; /* Verify data correctness */
vfdtype vfd; /* File driver */
};
@@ -336,7 +336,7 @@ main(int argc, char **argv)
/* Initialize h5tools lib */
h5tools_init();
#endif
-
+
output = stdout;
opts = parse_command_line(argc, argv);
@@ -348,8 +348,8 @@ main(int argc, char **argv)
if (opts->output_file) {
if ((output = HDfopen(opts->output_file, "w")) == NULL) {
- fprintf(stderr, "%s: cannot open output file\n", progname);
- perror(opts->output_file);
+ HDfprintf(stderr, "%s: cannot open output file\n", progname);
+ HDperror(opts->output_file);
goto finish;
}
}
@@ -359,7 +359,7 @@ main(int argc, char **argv)
run_test_loop(opts);
finish:
- free(opts);
+ HDfree(opts);
return exit_value;
}
@@ -553,7 +553,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
/*
* Show various statistics
*/
- /* Write statistics */
+ /* Write statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw write" times */
@@ -599,7 +599,7 @@ run_test(iotype iot, parameters parms, struct options *opts)
output_results(opts,"Write Open-Close",write_gross_mm_table,parms.num_iters,raw_size);
if (!parms.h5_write_only) {
- /* Read statistics */
+ /* Read statistics */
/* Print the raw data throughput if desired */
if (opts->print_raw) {
/* accumulate and output the max, min, and average "raw read" times */
@@ -648,16 +648,16 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
/* clean up our mess */
- free(write_sys_mm_table);
- free(write_mm_table);
- free(write_gross_mm_table);
- free(write_raw_mm_table);
+ HDfree(write_sys_mm_table);
+ HDfree(write_mm_table);
+ HDfree(write_gross_mm_table);
+ HDfree(write_raw_mm_table);
if (!parms.h5_write_only) {
- free(read_sys_mm_table);
- free(read_mm_table);
- free(read_gross_mm_table);
- free(read_raw_mm_table);
+ HDfree(read_sys_mm_table);
+ HDfree(read_mm_table);
+ HDfree(read_gross_mm_table);
+ HDfree(read_raw_mm_table);
}
return ret_value;
@@ -794,9 +794,9 @@ output_report(const char *fmt, ...)
{
va_list ap;
- va_start(ap, fmt);
- vfprintf(output, fmt, ap);
- va_end(ap);
+ HDva_start(ap, fmt);
+ HDvfprintf(output, fmt, ap);
+ HDva_end(ap);
}
/*
@@ -810,10 +810,10 @@ output_report(const char *fmt, ...)
static void
print_indent(register int indent)
{
- indent *= TAB_SPACE;
+ indent *= TAB_SPACE;
- for (; indent > 0; --indent)
- fputc(' ', output);
+ for (; indent > 0; --indent)
+ HDfputc(' ', output);
}
static void
@@ -837,9 +837,9 @@ static void
print_io_api(long io_types)
{
if (io_types & SIO_POSIX)
- HDfprintf(output, "posix ");
+ HDfprintf(output, "posix ");
if (io_types & SIO_HDF5)
- HDfprintf(output, "hdf5 ");
+ HDfprintf(output, "hdf5 ");
HDfprintf(output, "\n");
}
@@ -849,7 +849,7 @@ report_parameters(struct options *opts)
int i, rank;
rank = opts->dset_rank;
- print_version("HDF5 Library"); /* print library version */
+ print_version("HDF5 Library"); /* print library version */
HDfprintf(output, "==== Parameters ====\n");
HDfprintf(output, "IO API=");
@@ -989,7 +989,7 @@ parse_command_line(int argc, char *argv[])
HDmemset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
+ if (HDisalnum(*end) && i < 10)
buf[i++] = *end;
if (!HDstrcasecmp(buf, "hdf5")) {
@@ -997,9 +997,9 @@ parse_command_line(int argc, char *argv[])
} else if (!HDstrcasecmp(buf, "posix")) {
cl_opts->io_types |= SIO_POSIX;
} else {
- fprintf(stderr, "sio_perf: invalid --api option %s\n",
+ HDfprintf(stderr, "sio_perf: invalid --api option %s\n",
buf);
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
}
if (*end == '\0')
@@ -1028,7 +1028,7 @@ parse_command_line(int argc, char *argv[])
HDmemset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
+ if (HDisalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->chk_size[j] = parse_size_directive(buf);
@@ -1056,17 +1056,17 @@ parse_command_line(int argc, char *argv[])
HDmemset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
+ if (HDisalnum(*end) && i < 10)
buf[i++] = *end;
- if (strlen(buf) > 1 || isdigit(buf[0])) {
+ if (HDstrlen(buf) > 1 || HDisdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
- if (!isdigit(buf[j])) {
- fprintf(stderr, "sio_perf: invalid --debug option %s\n",
+ if (!HDisdigit(buf[j])) {
+ HDfprintf(stderr, "sio_perf: invalid --debug option %s\n",
buf);
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
}
sio_debug_level = atoi(buf);
@@ -1090,8 +1090,8 @@ parse_command_line(int argc, char *argv[])
cl_opts->verify = TRUE;
break;
default:
- fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
- exit(EXIT_FAILURE);
+ HDfprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
+ HDexit(EXIT_FAILURE);
}
}
@@ -1114,7 +1114,7 @@ parse_command_line(int argc, char *argv[])
HDmemset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
+ if (HDisalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->dset_size[j] = parse_size_directive(buf);
@@ -1132,7 +1132,7 @@ parse_command_line(int argc, char *argv[])
break;
case 'i':
- cl_opts->num_iters = atoi(opt_arg);
+ cl_opts->num_iters = HDatoi(opt_arg);
break;
case 'o':
cl_opts->output_file = opt_arg;
@@ -1156,9 +1156,9 @@ parse_command_line(int argc, char *argv[])
} else if (!HDstrcasecmp(opt_arg, "direct")) {
cl_opts->vfd=direct;
} else {
- fprintf(stderr, "sio_perf: invalid --api option %s\n",
+ HDfprintf(stderr, "sio_perf: invalid --api option %s\n",
opt_arg);
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
}
break;
case 'w':
@@ -1178,7 +1178,7 @@ parse_command_line(int argc, char *argv[])
HDmemset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
+ if (HDisalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->buf_size[j] = parse_size_directive(buf);
@@ -1206,7 +1206,7 @@ parse_command_line(int argc, char *argv[])
HDmemset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (isalnum(*end) && i < 10)
+ if (HDisalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->order[j] = (int)parse_size_directive(buf);
@@ -1228,7 +1228,7 @@ parse_command_line(int argc, char *argv[])
case '?':
default:
usage(progname);
- free(cl_opts);
+ HDfree(cl_opts);
return NULL;
}
}
@@ -1324,8 +1324,8 @@ parse_size_directive(const char *size)
break;
default:
- fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
- exit(EXIT_FAILURE);
+ HDfprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
+ HDexit(EXIT_FAILURE);
}
}
@@ -1342,73 +1342,73 @@ parse_size_directive(const char *size)
static void
usage(const char *prog)
{
- print_version(prog);
- printf("usage: %s [OPTIONS]\n", prog);
- printf(" OPTIONS\n");
- printf(" -h Print an usage message and exit\n");
- printf(" -A AL Which APIs to test\n");
- printf(" [default: all of them]\n");
- printf(" -c SL Selects chunked storage and defines chunks dimensions\n");
- printf(" and sizes\n");
- printf(" [default: Off]\n");
- printf(" -e SL Dimensions and sizes of dataset\n");
- printf(" [default: 100,200]\n");
- printf(" -i N Number of iterations to perform\n");
- printf(" [default: 1]\n");
- printf(" -r NL Dimension access order (see below for description)\n");
- printf(" [default: 1,2]\n");
- printf(" -t Selects extendable dimensions for HDF5 dataset\n");
- printf(" [default: Off]\n");
- printf(" -v VFD Selects file driver for HDF5 access\n");
- printf(" [default: sec2]\n");
- printf(" -w Perform write tests, not the read tests\n");
- printf(" [default: Off]\n");
- printf(" -x SL Dimensions and sizes of the transfer buffer\n");
- printf(" [default: 10,20]\n");
- printf("\n");
- printf(" N - is an integer > 0.\n");
- printf("\n");
- printf(" S - is a size specifier, an integer > 0 followed by a size indicator:\n");
- printf(" K - Kilobyte (%d)\n", ONE_KB);
- printf(" M - Megabyte (%d)\n", ONE_MB);
- printf(" G - Gigabyte (%d)\n", ONE_GB);
- printf("\n");
- printf(" Example: '37M' is 37 megabytes or %d bytes\n", 37*ONE_MB);
- printf("\n");
- printf(" AL - is an API list. Valid values are:\n");
- printf(" hdf5 - HDF5\n");
- printf(" posix - POSIX\n");
- printf("\n");
- printf(" Example: -A posix,hdf5\n");
- printf("\n");
- printf(" NL - is list of integers (N) separated by commas.\n");
- printf("\n");
- printf(" Example: 1,2,3\n");
- printf("\n");
- printf(" SL - is list of size specifiers (S) separated by commas.\n");
- printf("\n");
- printf(" Example: 2K,2K,3K\n");
- printf("\n");
- printf(" The example defines an object (dataset, tranfer buffer) with three\n");
- printf(" dimensions. Be aware that as the number of dimensions increases, the\n");
- printf(" the total size of the object increases exponentially.\n");
- printf("\n");
- printf(" VFD - is an HDF5 file driver specifier. Valid values are:\n");
- printf(" sec2, stdio, core, split, multi, family, direct\n");
- printf("\n");
- printf(" Dimension access order:\n");
- printf(" Data access starts at the cardinal origin of the dataset using the\n");
- printf(" transfer buffer. The next access occurs on a dataset region next to\n");
- printf(" the previous one. For a multidimensional dataset, there are several\n");
- printf(" directions as to where to proceed. This can be specified in the dimension\n");
- printf(" access order. For example, -r 1,2 states that the tool should traverse\n");
- printf(" dimension 1 first, and then dimension 2.\n");
- printf("\n");
- printf(" Environment variables:\n");
- printf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
- printf(" HDF5_PREFIX Data file prefix\n");
- printf("\n");
- fflush(stdout);
+ print_version(prog);
+ HDprintf("usage: %s [OPTIONS]\n", prog);
+ HDprintf(" OPTIONS\n");
+ HDprintf(" -h Print an usage message and exit\n");
+ HDprintf(" -A AL Which APIs to test\n");
+ HDprintf(" [default: all of them]\n");
+ HDprintf(" -c SL Selects chunked storage and defines chunks dimensions\n");
+ HDprintf(" and sizes\n");
+ HDprintf(" [default: Off]\n");
+ HDprintf(" -e SL Dimensions and sizes of dataset\n");
+ HDprintf(" [default: 100,200]\n");
+ HDprintf(" -i N Number of iterations to perform\n");
+ HDprintf(" [default: 1]\n");
+ HDprintf(" -r NL Dimension access order (see below for description)\n");
+ HDprintf(" [default: 1,2]\n");
+ HDprintf(" -t Selects extendable dimensions for HDF5 dataset\n");
+ HDprintf(" [default: Off]\n");
+ HDprintf(" -v VFD Selects file driver for HDF5 access\n");
+ HDprintf(" [default: sec2]\n");
+ HDprintf(" -w Perform write tests, not the read tests\n");
+ HDprintf(" [default: Off]\n");
+ HDprintf(" -x SL Dimensions and sizes of the transfer buffer\n");
+ HDprintf(" [default: 10,20]\n");
+ HDprintf("\n");
+ HDprintf(" N - is an integer > 0.\n");
+ HDprintf("\n");
+ HDprintf(" S - is a size specifier, an integer > 0 followed by a size indicator:\n");
+ HDprintf(" K - Kilobyte (%d)\n", ONE_KB);
+ HDprintf(" M - Megabyte (%d)\n", ONE_MB);
+ HDprintf(" G - Gigabyte (%d)\n", ONE_GB);
+ HDprintf("\n");
+ HDprintf(" Example: '37M' is 37 megabytes or %d bytes\n", 37*ONE_MB);
+ HDprintf("\n");
+ HDprintf(" AL - is an API list. Valid values are:\n");
+ HDprintf(" hdf5 - HDF5\n");
+ HDprintf(" posix - POSIX\n");
+ HDprintf("\n");
+ HDprintf(" Example: -A posix,hdf5\n");
+ HDprintf("\n");
+ HDprintf(" NL - is list of integers (N) separated by commas.\n");
+ HDprintf("\n");
+ HDprintf(" Example: 1,2,3\n");
+ HDprintf("\n");
+ HDprintf(" SL - is list of size specifiers (S) separated by commas.\n");
+ HDprintf("\n");
+ HDprintf(" Example: 2K,2K,3K\n");
+ HDprintf("\n");
+ HDprintf(" The example defines an object (dataset, tranfer buffer) with three\n");
+ HDprintf(" dimensions. Be aware that as the number of dimensions increases, the\n");
+ HDprintf(" the total size of the object increases exponentially.\n");
+ HDprintf("\n");
+ HDprintf(" VFD - is an HDF5 file driver specifier. Valid values are:\n");
+ HDprintf(" sec2, stdio, core, split, multi, family, direct\n");
+ HDprintf("\n");
+ HDprintf(" Dimension access order:\n");
+ HDprintf(" Data access starts at the cardinal origin of the dataset using the\n");
+ HDprintf(" transfer buffer. The next access occurs on a dataset region next to\n");
+ HDprintf(" the previous one. For a multidimensional dataset, there are several\n");
+ HDprintf(" directions as to where to proceed. This can be specified in the dimension\n");
+ HDprintf(" access order. For example, -r 1,2 states that the tool should traverse\n");
+ HDprintf(" dimension 1 first, and then dimension 2.\n");
+ HDprintf("\n");
+ HDprintf(" Environment variables:\n");
+ HDprintf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
+ HDprintf(" HDF5_PREFIX Data file prefix\n");
+ HDprintf("\n");
+ HDfflush(stdout);
}
void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop)
@@ -1452,7 +1452,7 @@ void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop)
break;
}
- fprintf(output, " %s %s: %.2f\n", msg,
+ HDfprintf(output, " %s %s: %.2f\n", msg,
(start_stop == TSTART ? "Start" : "Stop"),
pt->total_time[t]);
}
diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h
index a106fd9..5fa968f 100644
--- a/tools/perform/sio_standalone.h
+++ b/tools/perform/sio_standalone.h
@@ -325,6 +325,7 @@ typedef off_t h5_stat_size_t;
#define HDpipe(F) pipe(F)
#define HDpow(X,Y) pow(X,Y)
/* printf() variable arguments */
+#define HDprintf(...) printf /*varargs*/
#define HDputc(C,F) putc(C,F)
#define HDputchar(C) putchar(C)
#define HDputs(S) puts(S)
@@ -379,6 +380,7 @@ H5_DLL int HDrand(void);
#define HDsin(X) sin(X)
#define HDsinh(X) sinh(X)
#define HDsleep(N) sleep(N)
+#define HDsprintf sprintf /*varargs*/
#ifdef H5_HAVE_WIN32_API
H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...);
#define HDsnprintf c99_snprintf /*varargs*/