summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-06 23:33:00 (GMT)
committerGitHub <noreply@github.com>2022-03-06 23:33:00 (GMT)
commit78375882485a99a81caa933928ed08d7a38ef88b (patch)
treef18c41d7794d546b6562dd2aa36932c78f00a16a /tools/test
parent7e176db164d1a6f944e703c612c4952b15d333f4 (diff)
downloadhdf5-78375882485a99a81caa933928ed08d7a38ef88b.zip
hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.gz
hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.bz2
VFD SWMR: normalization with develop (#1472)
Much normalization with develop. Still needs tools changes wrt VFD plugins.
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5copy/CMakeTests.cmake2
-rw-r--r--tools/test/h5copy/h5copygentest.c2
-rw-r--r--tools/test/h5copy/testh5copy.sh.in2
-rw-r--r--tools/test/h5diff/CMakeTests.cmake4
-rw-r--r--tools/test/h5diff/h5diff_plugin.sh.in6
-rw-r--r--tools/test/h5diff/h5diffgentest.c124
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt14
-rw-r--r--tools/test/h5diff/testh5diff.sh.in8
-rw-r--r--tools/test/h5dump/CMakeTests.cmake2
-rw-r--r--tools/test/h5dump/CMakeTestsPBITS.cmake2
-rw-r--r--tools/test/h5dump/CMakeVFDTests.cmake20
-rw-r--r--tools/test/h5dump/binread.c2
-rw-r--r--tools/test/h5dump/h5dumpgentest.c789
-rw-r--r--tools/test/h5dump/testh5dump.sh.in2
-rw-r--r--tools/test/h5dump/testh5dumppbits.sh.in2
-rw-r--r--tools/test/h5format_convert/h5fc_gentest.c2
-rw-r--r--tools/test/h5format_convert/testh5fc.sh.in2
-rw-r--r--tools/test/h5jam/getub.c8
-rw-r--r--tools/test/h5jam/tellub.c6
-rw-r--r--tools/test/h5jam/testh5jam.sh.in2
-rw-r--r--tools/test/h5ls/h5ls_plugin.sh.in2
-rw-r--r--tools/test/h5ls/testh5ls.sh.in4
-rw-r--r--tools/test/h5ls/testh5lsvds.sh.in4
-rw-r--r--tools/test/h5repack/CMakeTests.cmake2
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake16
-rw-r--r--tools/test/h5repack/dynlib_rpk.c2
-rw-r--r--tools/test/h5repack/dynlib_vrpk.c2
-rw-r--r--tools/test/h5repack/h5repack.sh.in6
-rw-r--r--tools/test/h5repack/h5repackgentest.c6
-rw-r--r--tools/test/h5repack/h5repacktst.c230
-rw-r--r--tools/test/h5repack/testfiles/README2
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt15
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl14
-rw-r--r--tools/test/h5stat/testh5stat.sh.in2
-rw-r--r--tools/test/misc/h5clear_gentest.c32
-rw-r--r--tools/test/misc/h5perf_gentest.c6
-rw-r--r--tools/test/misc/testfiles/h5mkgrp_help.txt6
-rw-r--r--tools/test/perform/chunk_cache.c22
-rw-r--r--tools/test/perform/direct_write_perf.c4
-rw-r--r--tools/test/perform/overhead.c4
-rw-r--r--tools/test/perform/perf_meta.c14
-rw-r--r--tools/test/perform/pio_standalone.h3
-rw-r--r--tools/test/perform/sio_standalone.h3
-rw-r--r--tools/test/perform/zip_perf.c12
53 files changed, 928 insertions, 612 deletions
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index e9b36fe..154ca15 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -211,7 +211,7 @@
endmacro ()
#
- # Similiar to ADD_H5_TEST macro. Compare to outputs from source & target
+ # Similar to ADD_H5_TEST macro. Compare to outputs from source & target
# files instead of checking with h5ls.
#
macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index 6898839..c1f8349 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -618,7 +618,7 @@ gen_region_ref(hid_t loc_id)
goto out;
}
- /* create normal dataset which is refered */
+ /* create normal dataset which is referred */
oid2 = H5Dcreate2(loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid2 < 0) {
HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in
index 79b6fd5..6349ef4 100644
--- a/tools/test/h5copy/testh5copy.sh.in
+++ b/tools/test/h5copy/testh5copy.sh.in
@@ -88,7 +88,7 @@ test -d $TESTDIR || mkdir $TESTDIR
# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
- echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Serial Exit Code is not passed back to shell correctly."
echo "***Warning*** Exit code checking is skipped."
h5haveexitcode=no
fi
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 4fcfa26..8e01605 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -1278,7 +1278,7 @@ ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20})
ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1)
# comparable dataset with non-comparable attribute and other comparable attributes.
-# Also test non-compatible attributes with different type, dimention, rank.
+# Also test non-compatible attributes with different type, dimension, rank.
# All the rest comparables should display differences.
ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2)
@@ -1438,7 +1438,7 @@ ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_
# ##############################################################################
-# # test for group diff recursivly
+# # test for group diff recursively
# ##############################################################################
# root
ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index 0ab169a..28f723e 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -158,7 +158,7 @@ done
# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
- echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Serial Exit Code is not passed back to shell correctly."
echo "***Warning*** Exit code checking is skipped."
h5haveexitcode=no
fi
@@ -236,7 +236,7 @@ TOOLTEST() {
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
- # serial mode, so the test is fullfilled.
+ # serial mode, so the test is fulfilled.
if test $h5haveexitcode = 'yes' -a -z "$pmode"; then
echo "EXIT CODE: $EXIT_CODE" >> $actual
fi
@@ -327,7 +327,7 @@ TOOLTEST_ERR() {
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
- # serial mode, so the test is fullfilled.
+ # serial mode, so the test is fulfilled.
if test $h5haveexitcode = 'yes' -a -z "$pmode"; then
echo "EXIT CODE: $EXIT_CODE" >> $actual
fi
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 7cefeea..5e0f830 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -82,7 +82,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define EXCLUDE_FILE3_2 "h5diff_exclude3-2.h5"
/* compound type with multiple vlen string types */
#define COMP_VL_STRS_FILE "h5diff_comp_vl_strs.h5"
-/* attribute compre with verbose level */
+/* attribute compare with verbose level */
#define ATTR_VERBOSE_LEVEL_FILE1 "h5diff_attr_v_level1.h5"
#define ATTR_VERBOSE_LEVEL_FILE2 "h5diff_attr_v_level2.h5"
/* file containing valid/invalid enum value mix */
@@ -358,10 +358,10 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
*/
{
- double data1[3][2] = {{1.0F, 1.0F}, {1.00F, 1.000F}, {0.0F, 0.0F}};
- double data2[3][2] = {{0.0F, 1.1F}, {1.01F, 1.001F}, {0.0F, 1.0F}};
- double data3[3][2] = {{100.0F, 100.0F}, {100.00F, 100.000F}, {100.0F, 100.0F}};
- double data4[3][2] = {{105.0F, 120.0F}, {160.00F, 95.000F}, {80.0F, 40.0F}};
+ double data1[3][2] = {{1.0, 1.0}, {1.00, 1.000}, {0.0, 0.0}};
+ double data2[3][2] = {{0.0, 1.1}, {1.01, 1.001}, {0.0, 1.0}};
+ double data3[3][2] = {{100.0, 100.0}, {100.00, 100.000}, {100.0, 100.0}};
+ double data4[3][2] = {{105.0, 120.0}, {160.00, 95.000}, {80.0, 40.0}};
write_dset(gid1, 2, dims2, "dset1", H5T_NATIVE_DOUBLE, data1);
write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_DOUBLE, data2);
@@ -409,8 +409,8 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
*-------------------------------------------------------------------------
*/
{
- double data9[3][2] = {{100.0F, 100.0F}, {100.0F, 0.0F}, {0.0F, 100.0F}};
- double data10[3][2] = {{120.0F, 80.0F}, {0.0F, 100.0F}, {0.0F, 50.0F}};
+ double data9[3][2] = {{100.0, 100.0}, {100.0, 0.0}, {0.0, 100.0}};
+ double data10[3][2] = {{120.0, 80.0}, {0.0, 100.0}, {0.0, 50.0}};
write_dset(gid1, 2, dims2, "dset9", H5T_NATIVE_DOUBLE, data9);
write_dset(gid1, 2, dims2, "dset10", H5T_NATIVE_DOUBLE, data10);
@@ -464,18 +464,18 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
float data16[6];
data15[0] = (float)HDsqrt(-1.0);
- data15[1] = 1.0F;
+ data15[1] = 1.0;
data15[2] = (float)HDsqrt(-1.0);
- data15[3] = 1.0F;
- data15[4] = 1.0F;
- data15[5] = 1.0F;
+ data15[3] = 1.0;
+ data15[4] = 1.0;
+ data15[5] = 1.0;
data16[0] = (float)HDsqrt(-1.0);
data16[1] = (float)HDsqrt(-1.0);
- data16[2] = 1.0F;
- data16[3] = 1.0F;
- data16[4] = 1.0F;
- data16[5] = 1.0F;
+ data16[2] = 1.0;
+ data16[3] = 1.0;
+ data16[4] = 1.0;
+ data16[5] = 1.0;
write_dset(gid1, 1, dims1, "fp15", H5T_NATIVE_FLOAT, data15);
write_dset(gid1, 1, dims1, "fp16", H5T_NATIVE_FLOAT, data16);
@@ -552,8 +552,8 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
buf1[1].d = HDsqrt(-1.0);
buf1[1].f = (float)HDsqrt(-1.0);
- buf2[1].d = 0.0F;
- buf2[1].f = 0.0F;
+ buf2[1].d = 0.0;
+ buf2[1].f = 0.0;
type_size = sizeof(cmp1_t);
tid = H5Tcreate(H5T_COMPOUND, type_size);
@@ -581,13 +581,13 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
int i;
} cmp3_t;
- double data2[6] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
+ double data2[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
int data3[6] = {0, 0, 0, 0, 0, 0};
int data4[3][2] = {{0, 0}, {0, 0}, {0, 0}};
int data5[2][2] = {{0, 0}, {0, 0}};
unsigned int data6[3][2] = {{0, 0}, {0, 0}, {0, 0}};
- cmp1_t data7[1] = {{1.0f, 2}};
- cmp2_t data8[1] = {{1, 2.0f}};
+ cmp1_t data7[1] = {{1.0, 2}};
+ cmp2_t data8[1] = {{1, 2.0}};
hsize_t dims3[2] = {2, 2};
hsize_t dims4[1] = {1};
size_t type_size;
@@ -787,10 +787,10 @@ test_datatypes(const char *fname)
int buf3b[3][2] = {{1, 1}, {3, 4}, {5, 6}};
long buf4a[3][2] = {{1, 1}, {1, 1}, {1, 1}};
long buf4b[3][2] = {{1, 1}, {3, 4}, {5, 6}};
- float buf5a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}};
- float buf5b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}};
- double buf6a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}};
- double buf6b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}};
+ float buf5a[3][2] = {{1.0, 1.0}, {1.0, 1.0}, {1.0, 1.0}};
+ float buf5b[3][2] = {{1.0, 1.0}, {3.0, 4.0}, {5.0, 6.0}};
+ double buf6a[3][2] = {{1.0, 1.0}, {1.0, 1.0}, {1.0, 1.0}};
+ double buf6b[3][2] = {{1.0, 1.0}, {3.0, 4.0}, {5.0, 6.0}};
/*unsigned/signed test
signed char -128 to 127
@@ -2904,7 +2904,7 @@ test_group_recurse2(void)
* FILE 2-3
*------------------------------------------------------------------------*/
- /* crate target file */
+ /* create target file */
fileid4 = H5Fcreate(GRP_RECURSE2_EXT3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-----------------------------------------------
@@ -2938,7 +2938,7 @@ test_group_recurse2(void)
* FILE 2-2
*------------------------------------------------------------------------*/
- /* crate target file */
+ /* create target file */
fileid3 = H5Fcreate(GRP_RECURSE2_EXT2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-----------------------------------------------
@@ -2990,7 +2990,7 @@ test_group_recurse2(void)
* FILE 2-1
*------------------------------------------------------------------------*/
- /* crate target file */
+ /* create target file */
fileid2 = H5Fcreate(GRP_RECURSE2_EXT1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-----------------------------------------------
@@ -4856,7 +4856,7 @@ test_data_nocomparables(const char *fname, int make_diffs)
/* attr1 - non-compatible : different type */
write_attr(did2, 1, dims1_1, "attr1", tid_attr1, attr_data_ptr2);
- /* attr2 - non-compatible : same rank, different dimention */
+ /* attr2 - non-compatible : same rank, different dimension */
write_attr(did2, 1, (hsize_t *)attr2_dim_ptr, "attr2", H5T_NATIVE_INT, data3);
/* attr3 - non-compatible : different rank */
@@ -5210,27 +5210,27 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */
char * buf1a[2]; /* VL string */
char buf2[2] = {1, 2}; /* bitfield, opaque */
- s_t buf3[2] = {{1, 2.0F}, {3, 4.0F}}; /* compound */
+ s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2] = {RED, RED}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1] = {3}; /* array dimension */
int buf6[2][3] = {{1, 2, 3}, {4, 5, 6}}; /* array */
int buf7[2] = {1, 2}; /* integer */
- float buf8[2] = {1.0F, 2.0F}; /* float */
+ float buf8[2] = {1.0, 2.0}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
- hsize_t dims2[2] = {3, 2};
- char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */
- char * buf12a[3][2]; /* VL string */
- char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */
- s_t buf32[6] = {{1, 2.0F}, {3, 4.0F}, {5, 6.0F}, {7, 8.0F}, {9, 10.0F}, {11, 12.0F}}; /* compound */
+ hsize_t dims2[2] = {3, 2};
+ char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */
+ char * buf12a[3][2]; /* VL string */
+ char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */
+ s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
e_t buf452[3][2]; /* enum */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13, 14, 15}, {16, 17, 18}}; /* array */
- int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */
- float buf82[3][2] = {{1.0F, 2.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; /* float */
+ int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */
+ float buf82[3][2] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3] = {4, 3, 2};
@@ -5931,7 +5931,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
for (k = 0; k < 2; k++)
if (make_diffs) {
buf33[i][j][k].a = 0;
- buf33[i][j][k].b = 0.0F;
+ buf33[i][j][k].b = 0.0;
}
else {
buf33[i][j][k].a = (char)n++;
@@ -6141,7 +6141,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k] = 0;
- buf83[i][j][k] = 0.0F;
+ buf83[i][j][k] = 0.0;
}
else {
buf73[i][j][k] = n++;
@@ -6199,27 +6199,27 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */
char * buf1a[2]; /* VL string */
char buf2[2] = {1, 2}; /* bitfield, opaque */
- s_t buf3[2] = {{1, 2.0F}, {3, 4.0F}}; /* compound */
+ s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2] = {RED, RED}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1] = {3}; /* array dimension */
int buf6[2][3] = {{1, 2, 3}, {4, 5, 6}}; /* array */
int buf7[2] = {1, 2}; /* integer */
- float buf8[2] = {1.0F, 2.0F}; /* float */
+ float buf8[2] = {1.0, 2.0}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
- hsize_t dims2[2] = {3, 2};
- char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */
- char * buf12a[3][2]; /* VL string */
- char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */
- s_t buf32[6] = {{1, 2.0F}, {3, 4.0F}, {5, 6.0F}, {7, 8.0F}, {9, 10.0F}, {11, 12.0F}}; /* compound */
+ hsize_t dims2[2] = {3, 2};
+ char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */
+ char * buf12a[3][2]; /* VL string */
+ char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */
+ s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
e_t buf452[3][2]; /* enum */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13, 14, 15}, {16, 17, 18}}; /* array */
- int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */
- float buf82[3][2] = {{1.0F, 2.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; /* float */
+ int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */
+ float buf82[3][2] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3] = {4, 3, 2};
@@ -6920,7 +6920,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf33[i][j][k].a = 0;
- buf33[i][j][k].b = 0.0F;
+ buf33[i][j][k].b = 0.0;
}
else {
buf33[i][j][k].a = (char)n++;
@@ -7130,7 +7130,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k] = 0;
- buf83[i][j][k] = 0.0F;
+ buf83[i][j][k] = 0.0;
}
else {
buf73[i][j][k] = n++;
@@ -7191,26 +7191,26 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */
char * buf1a[2]; /* VL string */
char buf2[2] = {1, 2}; /* bitfield, opaque */
- s_t buf3[2] = {{1, 2.0F}, {3, 4.0F}}; /* compound */
+ s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2] = {RED, GREEN}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1] = {3}; /* array dimension */
int buf6[2][3] = {{1, 2, 3}, {4, 5, 6}}; /* array */
int buf7[2] = {1, 2}; /* integer */
- float buf8[2] = {1.0F, 2.0F}; /* float */
+ float buf8[2] = {1.0, 2.0}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
- hsize_t dims2[2] = {3, 2};
- char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */
- char * buf12a[3][2]; /* VL string */
- char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */
- s_t buf32[6] = {{1, 2.0F}, {3, 4.0F}, {5, 6.0F}, {7, 8.0F}, {9, 10.0F}, {11, 12.0F}}; /* compound */
+ hsize_t dims2[2] = {3, 2};
+ char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */
+ char * buf12a[3][2]; /* VL string */
+ char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */
+ s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13, 14, 15}, {16, 17, 18}}; /* array */
- int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */
- float buf82[3][2] = {{1.0F, 2.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; /* float */
+ int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */
+ float buf82[3][2] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3] = {4, 3, 2};
@@ -7678,7 +7678,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf33[i][j][k].a = 0;
- buf33[i][j][k].b = 0.0F;
+ buf33[i][j][k].b = 0.0;
}
else {
buf33[i][j][k].a = (char)n++;
@@ -7776,7 +7776,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k] = 0;
- buf83[i][j][k] = 0.0F;
+ buf83[i][j][k] = 0.0;
}
else {
buf73[i][j][k] = n++;
@@ -7905,7 +7905,7 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
* Function: test_hyperslab
*
* Purpose: test diff by hyperslabs. create a dataset with 1GB dimensions
- * by iterating trough 1KB hyperslabs
+ * by iterating through 1KB hyperslabs
*
*-------------------------------------------------------------------------
*/
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index 3631db7..853aede 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -36,6 +36,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -117,7 +129,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 8a4ce6d..2893b78 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -36,6 +36,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -117,7 +129,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index d4c7336..4317282 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index 3123587..c32142f 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index ce2d887..a080f29 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index 61fd036..a9bd76c 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index dc8655d..cf1af15 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index f20ffbe..3b325de 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index f73d202..be34fb4 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index 903b738..ebb76af 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
HDF5 file specified
--vol-info-2 VOL-specific info to pass to the VOL connector used for
opening the second HDF5 file specified
+ --vfd-value-1 Value (ID) of the VFL driver to use for opening the
+ first HDF5 file specified
+ --vfd-name-1 Name of the VFL driver to use for opening the first
+ HDF5 file specified
+ --vfd-info-1 VFD-specific info to pass to the VFL driver used for
+ opening the first HDF5 file specified
+ --vfd-value-2 Value (ID) of the VFL driver to use for opening the
+ second HDF5 file specified
+ --vfd-name-2 Name of the VFL driver to use for opening the second
+ HDF5 file specified
+ --vfd-info-2 VFD-specific info to pass to the VFL driver used for
+ opening the second HDF5 file specified
--follow-symlinks
Follow symbolic links (soft links and external links and compare the)
links' target objects.
@@ -118,7 +130,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
This option can be used repeatedly to exclude multiple paths.
Modes of output:
- Default mode: print the number of differences found and where they occured
+ Default mode: print the number of differences found and where they occurred
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index bd27dd0..6871463 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -455,7 +455,7 @@ done
# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
- echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Serial Exit Code is not passed back to shell correctly."
echo "***Warning*** Exit code checking is skipped."
h5haveexitcode=no
fi
@@ -518,7 +518,7 @@ TOOLTEST() {
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
- # serial mode, so the test is fullfilled.
+ # serial mode, so the test is fulfilled.
if test $h5haveexitcode = 'yes' -a -z "$pmode"; then
echo "EXIT CODE: $EXIT_CODE" >> $actual
fi
@@ -926,7 +926,7 @@ TOOLTEST h5diff_207.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset8 g2/dset9
TOOLTEST h5diff_208.txt -c h5diff_dset_zero_dim_size1.h5 h5diff_dset_zero_dim_size2.h5
# non-comparable dataset with comparable attribute, and other comparable datasets.
-# Also test non-compatible attributes with different type, dimention, rank.
+# Also test non-compatible attributes with different type, dimension, rank.
# All the comparables should display differences.
TOOLTEST h5diff_220.txt -c non_comparables1.h5 non_comparables2.h5 /g1
@@ -1089,7 +1089,7 @@ TOOLTEST h5diff_474.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_li
TOOLTEST h5diff_475.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link1
# ##############################################################################
-# # test for group diff recursivly
+# # test for group diff recursively
# ##############################################################################
# root
TOOLTEST h5diff_500.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index c0f279d..933aba9 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -863,7 +863,7 @@
# test for named data types
ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5)
ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5)
- # test for unamed type
+ # test for unnamed type
ADD_H5ERR_MASK_TEST (tcomp-3 0 "object '#6632' doesn't exist" "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5")
# test complicated compound datatype
ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake
index 06be332..0c3297f 100644
--- a/tools/test/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/test/h5dump/CMakeTestsPBITS.cmake
@@ -158,7 +158,7 @@
# Limits:
# Maximum number of packed bits is 8 (for now).
# Maximum integer size is 8*sizeof(long long).
- # Maximun Offset is Maximum size - 1.
+ # Maximum Offset is Maximum size - 1.
# Maximum Offset+Length is Maximum size.
# Tests:
# Normal operation on both signed and unsigned int datasets.
diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake
index 01834b3..7ab8c1f 100644
--- a/tools/test/h5dump/CMakeVFDTests.cmake
+++ b/tools/test/h5dump/CMakeVFDTests.cmake
@@ -15,20 +15,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
-set (VFD_H5DUMP_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
-)
-
-if (H5_HAVE_DIRECT)
- set (VFD_H5DUMP_LIST ${VFD_H5DUMP_LIST} direct)
-endif ()
+H5_CREATE_VFD_DIR()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
@@ -37,8 +24,7 @@ set (HDF5_VFD_H5DUMP_FILES
packedbits
)
-foreach (vfdtest ${VFD_H5DUMP_LIST})
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
+foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_VFD_H5DUMP_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.ddl" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.ddl" "HDF5_VFD_H5DUMP_files")
@@ -79,7 +65,7 @@ endmacro ()
##############################################################################
# Run test with different Virtual File Driver
-foreach (vfd ${VFD_H5DUMP_LIST})
+foreach (vfd ${VFD_LIST})
# test for signed/unsigned datasets
ADD_VFD_H5DUMP_TEST (${vfd} packedbits 0 --enable-error-stack packedbits.h5)
endforeach ()
diff --git a/tools/test/h5dump/binread.c b/tools/test/h5dump/binread.c
index d6206ca..341a085 100644
--- a/tools/test/h5dump/binread.c
+++ b/tools/test/h5dump/binread.c
@@ -59,7 +59,7 @@ usage(void)
*/
int
-main(int argc, const char *argv[])
+main(int argc, char *argv[])
{
FILE * stream;
size_t numread;
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index e74054c..5258211 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -236,7 +236,7 @@ typedef struct s1_t {
#define ARRAY3_DIM2 3
/* VL string datatype name */
-/* TODO remove complier error not used, remove the link when everything is OK */
+/* TODO remove compiler error not used, remove the link when everything is OK */
/* #define VLSTR_TYPE "vl_string_type" */
/* "File 41" macros */
@@ -498,7 +498,7 @@ gent_dataset(void)
for (i = 0; i < 30; i++)
for (j = 0; j < 20; j++)
- dset2[i][j] = 0.0001F * (float)j + (float)i;
+ dset2[i][j] = 0.0001 * (double)j + (double)i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_data);
@@ -605,7 +605,7 @@ gent_attribute(void)
attr = H5Acreate2(root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 10; i++)
- d[i] = 0.1F * (float)i;
+ d[i] = 0.1 * (double)i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space);
@@ -1019,7 +1019,7 @@ gent_compound_dt(void)
for (i = 0; i < (int)sdim; i++) {
dset1[i].a = i;
dset1[i].b = (float)(i * i);
- dset1[i].c = (float)(1.0F / (float)(i + 1));
+ dset1[i].c = (double)(1.0 / (double)(i + 1));
dset2[i].a = i;
dset2[i].b = (float)((float)i + (float)i * 0.1F);
@@ -1128,7 +1128,7 @@ gent_compound_dt(void)
H5Dclose(dataset);
H5Gclose(group);
- /* unamed data type */
+ /* unnamed data type */
group = H5Gcreate2(fid, "/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
type = H5Tcreate(H5T_COMPOUND, sizeof(dset5_t));
@@ -1206,7 +1206,7 @@ gent_compound_dt2(void)
for (i = 0; i < (int)sdim; i++) {
dset1[i].a = i;
dset1[i].b = (float)(i * i);
- dset1[i].c = (float)(1.0F / (float)(i + 1));
+ dset1[i].c = (double)(1.0 / (double)(i + 1));
dset2[i].a = i;
dset2[i].b = (float)((float)i + (float)i * 0.1F);
@@ -1312,7 +1312,7 @@ gent_compound_dt2(void)
H5Dclose(dataset);
H5Gclose(group);
- /* unamed data type */
+ /* unnamed data type */
group = H5Gcreate2(fid, "/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
type = H5Tcreate(H5T_COMPOUND, sizeof(dset5_t));
@@ -1522,11 +1522,11 @@ gent_loop2(void)
fid = H5Fcreate(FILE11, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* create group object g1 and implcit path from root object */
+ /* create group object g1 and implicit path from root object */
group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- /* create group object g2 and implcit path from root object */
+ /* create group object g2 and implicit path from root object */
group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
@@ -1646,7 +1646,7 @@ gent_many(void)
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 10; i++)
- d[i] = 0.1F * (float)i;
+ d[i] = 0.1 * (double)i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space2);
H5Aclose(attr);
@@ -2468,7 +2468,7 @@ gent_attrreg(void)
static void
gent_nestcomp(void)
{
- /* Compound memeber of the compound datatype*/
+ /* Compound member of the compound datatype*/
typedef struct cmp_t {
char a;
float b[2];
@@ -2503,7 +2503,7 @@ gent_nestcomp(void)
for (i = 0; i < 10; i++) {
s1[i].a = i;
s1[i].b = (float)(i * i);
- s1[i].c = 1.0F / (float)(i + 1);
+ s1[i].c = 1.0 / (double)(i + 1);
s1[i].d.a = (char)(65 + i);
s1[i].d.b[0] = -100.0F;
s1[i].d.b[1] = 100.0F;
@@ -2541,7 +2541,7 @@ gent_nestcomp(void)
H5Tinsert(s2_tid, "c_name", HOFFSET(s2_t, c), H5T_NATIVE_DOUBLE);
H5Tinsert(s2_tid, "b_name", HOFFSET(s2_t, b), H5T_NATIVE_FLOAT);
- /* Insert compound memeber created above */
+ /* Insert compound member created above */
H5Tinsert(s2_tid, "d_name", HOFFSET(s2_t, d), cmp_tid);
/*
@@ -5077,7 +5077,7 @@ gent_compound_complex(void)
Array1[m].e = (float)((float)m * 0.96F);
for (n = 0; n < F41_ARRAY_DIMf; n++)
- Array1[m].f[n] = ((float)m * 1024.9637F);
+ Array1[m].f[n] = ((double)m * 1024.9637);
Array1[m].g = 'm';
}
@@ -5218,7 +5218,7 @@ gent_named_dtype_attr(void)
sid = H5Screate(H5S_SCALAR);
HDassert(sid > 0);
- /* Create attribute on commited datatype */
+ /* Create attribute on committed datatype */
aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
HDassert(aid > 0);
@@ -5735,7 +5735,7 @@ gent_filters(void)
HDassert(ret >= 0);
if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
- ret = H5Oset_comment_by_name(fid, "mytype", "This is a commited datatype", H5P_DEFAULT);
+ ret = H5Oset_comment_by_name(fid, "mytype", "This is a committed datatype", H5P_DEFAULT);
HDassert(ret >= 0);
}
@@ -6361,7 +6361,7 @@ gent_ldouble_scalar(void)
hid_t tid;
hid_t sid;
hsize_t dims[1] = {6};
- long double buf[6] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
+ long double buf[6] = {0.0L, 1.0L, 2.0L, 3.0L, 4.0L, 5.0L};
if ((fid = H5Fcreate(FILE88, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
@@ -6803,7 +6803,7 @@ gent_attr_creation_order(void)
goto out;
/*-------------------------------------------------------------------------
- * create a dataset with creation order tracked for attributes and atributes in it
+ * create a dataset with creation order tracked for attributes and attributes in it
*-------------------------------------------------------------------------
*/
@@ -6827,7 +6827,7 @@ gent_attr_creation_order(void)
did = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
- * create a dataset without creation order tracked for attributes and atributes in it
+ * create a dataset without creation order tracked for attributes and attributes in it
*-------------------------------------------------------------------------
*/
@@ -6851,7 +6851,7 @@ gent_attr_creation_order(void)
did = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
- * create a group with creation order tracked for attributes and atributes in it
+ * create a group with creation order tracked for attributes and attributes in it
*-------------------------------------------------------------------------
*/
@@ -6874,7 +6874,7 @@ gent_attr_creation_order(void)
gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
- * create a group without creation order tracked for attributes and atributes in it
+ * create a group without creation order tracked for attributes and attributes in it
*-------------------------------------------------------------------------
*/
@@ -6897,7 +6897,7 @@ gent_attr_creation_order(void)
gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
- * create a named datatype with creation order tracked for attributes and atributes in it
+ * create a named datatype with creation order tracked for attributes and attributes in it
*-------------------------------------------------------------------------
*/
@@ -6923,7 +6923,7 @@ gent_attr_creation_order(void)
tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
- * create a named datatype without creation order tracked for attributes and atributes in it
+ * create a named datatype without creation order tracked for attributes and attributes in it
*-------------------------------------------------------------------------
*/
@@ -7022,7 +7022,7 @@ gent_fpformat(void)
{
hid_t fid, sid, did;
hsize_t dims[1] = {6};
- double dbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
+ double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0};
float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -7264,15 +7264,33 @@ gent_packedbits(void)
hid_t space = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t ** dsetu8 = NULL;
- uint16_t **dsetu16 = NULL;
- uint32_t **dsetu32 = NULL;
- uint64_t **dsetu64 = NULL;
- int8_t ** dset8 = NULL;
- int16_t ** dset16 = NULL;
- int32_t ** dset32 = NULL;
- int64_t ** dset64 = NULL;
- double ** dsetdbl = NULL;
+ struct {
+ uint8_t arr[F66_XDIM][F66_YDIM8];
+ } * dsetu8;
+ struct {
+ uint16_t arr[F66_XDIM][F66_YDIM16];
+ } * dsetu16;
+ struct {
+ uint32_t arr[F66_XDIM][F66_YDIM32];
+ } * dsetu32;
+ struct {
+ uint64_t arr[F66_XDIM][F66_YDIM64];
+ } * dsetu64;
+ struct {
+ int8_t arr[F66_XDIM][F66_YDIM8];
+ } * dset8;
+ struct {
+ int16_t arr[F66_XDIM][F66_YDIM16];
+ } * dset16;
+ struct {
+ int32_t arr[F66_XDIM][F66_YDIM32];
+ } * dset32;
+ struct {
+ int64_t arr[F66_XDIM][F66_YDIM64];
+ } * dset64;
+ struct {
+ double arr[F66_XDIM][F66_YDIM8];
+ } * dsetdbl;
uint8_t valu8bits;
uint16_t valu16bits;
@@ -7286,15 +7304,15 @@ gent_packedbits(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F66_XDIM, F66_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F66_XDIM, F66_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F66_XDIM, F66_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F66_XDIM, F66_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F66_XDIM, F66_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F66_XDIM, F66_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F66_XDIM, F66_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F66_XDIM, F66_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F66_XDIM, F66_YDIM8);
+ dsetu8 = malloc(sizeof(*dsetu8));
+ dsetu16 = malloc(sizeof(*dsetu16));
+ dsetu32 = malloc(sizeof(*dsetu32));
+ dsetu64 = malloc(sizeof(*dsetu64));
+ dset8 = malloc(sizeof(*dset8));
+ dset16 = malloc(sizeof(*dset16));
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dsetdbl = malloc(sizeof(*dsetdbl));
fid = H5Fcreate(FILE66, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -7306,13 +7324,13 @@ gent_packedbits(void)
valu8bits = (uint8_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu8[i][0] = valu8bits;
+ dsetu8->arr[i][0] = valu8bits;
for (j = 1; j < dims[1]; j++)
- dsetu8[i][j] = (uint8_t)(dsetu8[i][j - 1] << 1);
+ dsetu8->arr[i][j] = (uint8_t)(dsetu8->arr[i][j - 1] << 1);
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
H5Sclose(space);
H5Dclose(dataset);
@@ -7324,13 +7342,13 @@ gent_packedbits(void)
valu16bits = (uint16_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu16[i][0] = valu16bits;
+ dsetu16->arr[i][0] = valu16bits;
for (j = 1; j < dims[1]; j++)
- dsetu16[i][j] = (uint16_t)(dsetu16[i][j - 1] << 1);
+ dsetu16->arr[i][j] = (uint16_t)(dsetu16->arr[i][j - 1] << 1);
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
H5Sclose(space);
H5Dclose(dataset);
@@ -7342,13 +7360,13 @@ gent_packedbits(void)
valu32bits = (uint32_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu32[i][0] = valu32bits;
+ dsetu32->arr[i][0] = valu32bits;
for (j = 1; j < dims[1]; j++)
- dsetu32[i][j] = dsetu32[i][j - 1] << 1;
+ dsetu32->arr[i][j] = dsetu32->arr[i][j - 1] << 1;
valu32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
H5Sclose(space);
H5Dclose(dataset);
@@ -7360,13 +7378,13 @@ gent_packedbits(void)
valu64bits = (uint64_t)~0Lu; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu64[i][0] = valu64bits;
+ dsetu64->arr[i][0] = valu64bits;
for (j = 1; j < dims[1]; j++)
- dsetu64[i][j] = dsetu64[i][j - 1] << 1;
+ dsetu64->arr[i][j] = dsetu64->arr[i][j - 1] << 1;
valu64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
H5Sclose(space);
H5Dclose(dataset);
@@ -7378,13 +7396,13 @@ gent_packedbits(void)
val8bits = (int8_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset8[i][0] = val8bits;
+ dset8->arr[i][0] = val8bits;
for (j = 1; j < dims[1]; j++)
- dset8[i][j] = (int8_t)(dset8[i][j - 1] << 1);
+ dset8->arr[i][j] = (int8_t)(dset8->arr[i][j - 1] << 1);
val8bits = (int8_t)(val8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
H5Sclose(space);
H5Dclose(dataset);
@@ -7396,13 +7414,13 @@ gent_packedbits(void)
val16bits = (int16_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset16[i][0] = val16bits;
+ dset16->arr[i][0] = val16bits;
for (j = 1; j < dims[1]; j++)
- dset16[i][j] = (int16_t)(dset16[i][j - 1] << 1);
+ dset16->arr[i][j] = (int16_t)(dset16->arr[i][j - 1] << 1);
val16bits = (int16_t)(val16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
H5Sclose(space);
H5Dclose(dataset);
@@ -7414,13 +7432,13 @@ gent_packedbits(void)
val32bits = (int32_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
+ dset32->arr[i][0] = val32bits;
for (j = 1; j < dims[1]; j++)
- dset32[i][j] = dset32[i][j - 1] << 1;
+ dset32->arr[i][j] = dset32->arr[i][j - 1] << 1;
val32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
H5Sclose(space);
H5Dclose(dataset);
@@ -7432,13 +7450,13 @@ gent_packedbits(void)
val64bits = (int64_t)~0L; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
+ dset64->arr[i][0] = val64bits;
for (j = 1; j < dims[1]; j++)
- dset64[i][j] = dset64[i][j - 1] << 1;
+ dset64->arr[i][j] = dset64->arr[i][j - 1] << 1;
val64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
H5Sclose(space);
H5Dclose(dataset);
@@ -7450,9 +7468,9 @@ gent_packedbits(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
- H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]);
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
H5Sclose(space);
H5Dclose(dataset);
@@ -7489,15 +7507,33 @@ gent_attr_intsize(void)
hid_t root = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t ** dsetu8 = NULL;
- uint16_t **dsetu16 = NULL;
- uint32_t **dsetu32 = NULL;
- uint64_t **dsetu64 = NULL;
- int8_t ** dset8 = NULL;
- int16_t ** dset16 = NULL;
- int32_t ** dset32 = NULL;
- int64_t ** dset64 = NULL;
- double ** dsetdbl = NULL;
+ struct {
+ uint8_t arr[F66_XDIM][F66_YDIM8];
+ } * dsetu8;
+ struct {
+ uint16_t arr[F66_XDIM][F66_YDIM16];
+ } * dsetu16;
+ struct {
+ uint32_t arr[F66_XDIM][F66_YDIM32];
+ } * dsetu32;
+ struct {
+ uint64_t arr[F66_XDIM][F66_YDIM64];
+ } * dsetu64;
+ struct {
+ int8_t arr[F66_XDIM][F66_YDIM8];
+ } * dset8;
+ struct {
+ int16_t arr[F66_XDIM][F66_YDIM16];
+ } * dset16;
+ struct {
+ int32_t arr[F66_XDIM][F66_YDIM64];
+ } * dset32;
+ struct {
+ int64_t arr[F66_XDIM][F66_YDIM64];
+ } * dset64;
+ struct {
+ double arr[F66_XDIM][F66_YDIM8];
+ } * dsetdbl;
uint8_t valu8bits;
uint16_t valu16bits;
@@ -7511,15 +7547,15 @@ gent_attr_intsize(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F66_XDIM, F66_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F66_XDIM, F66_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F66_XDIM, F66_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F66_XDIM, F66_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F66_XDIM, F66_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F66_XDIM, F66_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F66_XDIM, F66_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F66_XDIM, F66_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F66_XDIM, F66_YDIM8);
+ dsetu8 = malloc(sizeof(*dsetu8));
+ dsetu16 = malloc(sizeof(*dsetu16));
+ dsetu32 = malloc(sizeof(*dsetu32));
+ dsetu64 = malloc(sizeof(*dsetu64));
+ dset8 = malloc(sizeof(*dset8));
+ dset16 = malloc(sizeof(*dset16));
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dsetdbl = malloc(sizeof(*dsetdbl));
fid = H5Fcreate(FILE69, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
root = H5Gopen2(fid, "/", H5P_DEFAULT);
@@ -7532,14 +7568,14 @@ gent_attr_intsize(void)
valu8bits = (uint8_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu8[i][0] = valu8bits;
+ dsetu8->arr[i][0] = valu8bits;
for (j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = (uint8_t)(dsetu8[i][j - 1] << 1);
+ dsetu8->arr[i][j] = (uint8_t)(dsetu8->arr[i][j - 1] << 1);
}
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_UINT8, dsetu8[0]);
+ H5Awrite(attr, H5T_NATIVE_UINT8, dsetu8);
H5Sclose(space);
H5Aclose(attr);
@@ -7551,14 +7587,14 @@ gent_attr_intsize(void)
valu16bits = (uint16_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu16[i][0] = valu16bits;
+ dsetu16->arr[i][0] = valu16bits;
for (j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = (uint16_t)(dsetu16[i][j - 1] << 1);
+ dsetu16->arr[i][j] = (uint16_t)(dsetu16->arr[i][j - 1] << 1);
}
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_UINT16, dsetu16[0]);
+ H5Awrite(attr, H5T_NATIVE_UINT16, dsetu16);
H5Sclose(space);
H5Aclose(attr);
@@ -7570,14 +7606,14 @@ gent_attr_intsize(void)
valu32bits = (uint32_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu32[i][0] = valu32bits;
+ dsetu32->arr[i][0] = valu32bits;
for (j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j - 1] << 1;
+ dsetu32->arr[i][j] = dsetu32->arr[i][j - 1] << 1;
}
valu32bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_UINT32, dsetu32[0]);
+ H5Awrite(attr, H5T_NATIVE_UINT32, dsetu32);
H5Sclose(space);
H5Aclose(attr);
@@ -7589,14 +7625,14 @@ gent_attr_intsize(void)
valu64bits = (uint64_t)~0Lu; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu64[i][0] = valu64bits;
+ dsetu64->arr[i][0] = valu64bits;
for (j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j - 1] << 1;
+ dsetu64->arr[i][j] = dsetu64->arr[i][j - 1] << 1;
}
valu64bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_UINT64, dsetu64[0]);
+ H5Awrite(attr, H5T_NATIVE_UINT64, dsetu64);
H5Sclose(space);
H5Aclose(attr);
@@ -7608,14 +7644,14 @@ gent_attr_intsize(void)
val8bits = (int8_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset8[i][0] = val8bits;
+ dset8->arr[i][0] = val8bits;
for (j = 1; j < dims[1]; j++) {
- dset8[i][j] = (int8_t)(dset8[i][j - 1] << 1);
+ dset8->arr[i][j] = (int8_t)(dset8->arr[i][j - 1] << 1);
}
val8bits = (int8_t)(val8bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_INT8, dset8[0]);
+ H5Awrite(attr, H5T_NATIVE_INT8, dset8);
H5Sclose(space);
H5Aclose(attr);
@@ -7627,14 +7663,14 @@ gent_attr_intsize(void)
val16bits = (int16_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset16[i][0] = val16bits;
+ dset16->arr[i][0] = val16bits;
for (j = 1; j < dims[1]; j++) {
- dset16[i][j] = (int16_t)(dset16[i][j - 1] << 1);
+ dset16->arr[i][j] = (int16_t)(dset16->arr[i][j - 1] << 1);
}
val16bits = (int16_t)(val16bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_INT16, dset16[0]);
+ H5Awrite(attr, H5T_NATIVE_INT16, dset16);
H5Sclose(space);
H5Aclose(attr);
@@ -7646,14 +7682,14 @@ gent_attr_intsize(void)
val32bits = (int32_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
+ dset32->arr[i][0] = val32bits;
for (j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j - 1] << 1;
+ dset32->arr[i][j] = dset32->arr[i][j - 1] << 1;
}
val32bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_INT32, dset32[0]);
+ H5Awrite(attr, H5T_NATIVE_INT32, dset32);
H5Sclose(space);
H5Aclose(attr);
@@ -7665,14 +7701,14 @@ gent_attr_intsize(void)
val64bits = (int64_t)~0L; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
+ dset64->arr[i][0] = val64bits;
for (j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j - 1] << 1;
+ dset64->arr[i][j] = dset64->arr[i][j - 1] << 1;
}
val64bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_INT64, dset64[0]);
+ H5Awrite(attr, H5T_NATIVE_INT64, dset64);
H5Sclose(space);
H5Aclose(attr);
@@ -7684,9 +7720,9 @@ gent_attr_intsize(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
- H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl[0]);
+ H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl);
H5Sclose(space);
H5Aclose(attr);
@@ -7994,7 +8030,7 @@ gent_compound_intsizes(void)
for (n = 0; n < (int)dims[0]; n++)
for (o = 0; o < (int)dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001F * (float)o + (float)n;
+ Array1[m].dsetdbl[n][o] = 0.0001 * (double)o + (double)n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8284,7 +8320,7 @@ gent_compound_attr_intsizes(void)
for (n = 0; n < (int)dims[0]; n++)
for (o = 0; o < (int)dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001F * (float)o + (float)n;
+ Array1[m].dsetdbl[n][o] = 0.0001 * (double)o + (double)n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8586,15 +8622,33 @@ gent_intscalars(void)
hid_t tid = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t ** dsetu8 = NULL;
- uint16_t **dsetu16 = NULL;
- uint32_t **dsetu32 = NULL;
- uint64_t **dsetu64 = NULL;
- int8_t ** dset8 = NULL;
- int16_t ** dset16 = NULL;
- int32_t ** dset32 = NULL;
- int64_t ** dset64 = NULL;
- double ** dsetdbl = NULL;
+ struct {
+ uint8_t arr[F73_XDIM][F73_YDIM8];
+ } * dsetu8;
+ struct {
+ uint16_t arr[F73_XDIM][F73_YDIM16];
+ } * dsetu16;
+ struct {
+ uint32_t arr[F73_XDIM][F73_YDIM32];
+ } * dsetu32;
+ struct {
+ uint64_t arr[F73_XDIM][F73_YDIM64];
+ } * dsetu64;
+ struct {
+ int8_t arr[F73_XDIM][F73_YDIM8];
+ } * dset8;
+ struct {
+ int16_t arr[F73_XDIM][F73_YDIM16];
+ } * dset16;
+ struct {
+ int32_t arr[F73_XDIM][F73_YDIM32];
+ } * dset32;
+ struct {
+ int64_t arr[F73_XDIM][F73_YDIM64];
+ } * dset64;
+ struct {
+ double arr[F73_XDIM][F73_YDIM8];
+ } * dsetdbl;
uint8_t valu8bits;
uint16_t valu16bits;
@@ -8608,15 +8662,15 @@ gent_intscalars(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F73_XDIM, F73_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F73_XDIM, F73_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F73_XDIM, F73_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F73_XDIM, F73_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F73_XDIM, F73_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F73_XDIM, F73_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F73_XDIM, F73_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F73_XDIM, F73_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F73_XDIM, F73_YDIM8);
+ dsetu8 = malloc(sizeof(*dsetu8));
+ dsetu16 = malloc(sizeof(*dsetu16));
+ dsetu32 = malloc(sizeof(*dsetu32));
+ dsetu64 = malloc(sizeof(*dsetu64));
+ dset8 = malloc(sizeof(*dset8));
+ dset16 = malloc(sizeof(*dset16));
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dsetdbl = malloc(sizeof(*dsetdbl));
fid = H5Fcreate(FILE73, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -8629,14 +8683,14 @@ gent_intscalars(void)
valu8bits = (uint8_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu8[i][0] = valu8bits;
+ dsetu8->arr[i][0] = valu8bits;
for (j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = (uint8_t)(dsetu8[i][j - 1] << 1);
+ dsetu8->arr[i][j] = (uint8_t)(dsetu8->arr[i][j - 1] << 1);
}
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
H5Sclose(space);
H5Dclose(dataset);
@@ -8649,14 +8703,14 @@ gent_intscalars(void)
valu16bits = (uint16_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu16[i][0] = valu16bits;
+ dsetu16->arr[i][0] = valu16bits;
for (j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = (uint16_t)(dsetu16[i][j - 1] << 1);
+ dsetu16->arr[i][j] = (uint16_t)(dsetu16->arr[i][j - 1] << 1);
}
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
H5Sclose(space);
H5Dclose(dataset);
@@ -8669,14 +8723,14 @@ gent_intscalars(void)
valu32bits = (uint32_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu32[i][0] = valu32bits;
+ dsetu32->arr[i][0] = valu32bits;
for (j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j - 1] << 1;
+ dsetu32->arr[i][j] = dsetu32->arr[i][j - 1] << 1;
}
valu32bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
H5Sclose(space);
H5Dclose(dataset);
@@ -8689,14 +8743,14 @@ gent_intscalars(void)
valu64bits = (uint64_t)~0Lu; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu64[i][0] = valu64bits;
+ dsetu64->arr[i][0] = valu64bits;
for (j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j - 1] << 1;
+ dsetu64->arr[i][j] = dsetu64->arr[i][j - 1] << 1;
}
valu64bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
H5Sclose(space);
H5Dclose(dataset);
@@ -8709,14 +8763,14 @@ gent_intscalars(void)
val8bits = (int8_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset8[i][0] = val8bits;
+ dset8->arr[i][0] = val8bits;
for (j = 1; j < dims[1]; j++) {
- dset8[i][j] = (int8_t)(dset8[i][j - 1] << 1);
+ dset8->arr[i][j] = (int8_t)(dset8->arr[i][j - 1] << 1);
}
val8bits = (int8_t)(val8bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
H5Sclose(space);
H5Dclose(dataset);
@@ -8729,14 +8783,14 @@ gent_intscalars(void)
val16bits = (int16_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset16[i][0] = val16bits;
+ dset16->arr[i][0] = val16bits;
for (j = 1; j < dims[1]; j++) {
- dset16[i][j] = (int16_t)(dset16[i][j - 1] << 1);
+ dset16->arr[i][j] = (int16_t)(dset16->arr[i][j - 1] << 1);
}
val16bits = (int16_t)(val16bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
H5Sclose(space);
H5Dclose(dataset);
@@ -8749,14 +8803,14 @@ gent_intscalars(void)
val32bits = (int32_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
+ dset32->arr[i][0] = val32bits;
for (j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j - 1] << 1;
+ dset32->arr[i][j] = dset32->arr[i][j - 1] << 1;
}
val32bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
H5Sclose(space);
H5Dclose(dataset);
@@ -8769,14 +8823,14 @@ gent_intscalars(void)
val64bits = (int64_t)~0L; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
+ dset64->arr[i][0] = val64bits;
for (j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j - 1] << 1;
+ dset64->arr[i][j] = dset64->arr[i][j - 1] << 1;
}
val64bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
H5Sclose(space);
H5Dclose(dataset);
@@ -8789,9 +8843,9 @@ gent_intscalars(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
H5Sclose(space);
H5Dclose(dataset);
@@ -8829,15 +8883,33 @@ gent_attr_intscalars(void)
hid_t tid = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t ** dsetu8 = NULL;
- uint16_t **dsetu16 = NULL;
- uint32_t **dsetu32 = NULL;
- uint64_t **dsetu64 = NULL;
- int8_t ** dset8 = NULL;
- int16_t ** dset16 = NULL;
- int32_t ** dset32 = NULL;
- int64_t ** dset64 = NULL;
- double ** dsetdbl = NULL;
+ struct {
+ uint8_t arr[F73_XDIM][F73_YDIM8];
+ } * dsetu8;
+ struct {
+ uint16_t arr[F73_XDIM][F73_YDIM16];
+ } * dsetu16;
+ struct {
+ uint32_t arr[F73_XDIM][F73_YDIM32];
+ } * dsetu32;
+ struct {
+ uint64_t arr[F73_XDIM][F73_YDIM64];
+ } * dsetu64;
+ struct {
+ int8_t arr[F73_XDIM][F73_YDIM8];
+ } * dset8;
+ struct {
+ int16_t arr[F73_XDIM][F73_YDIM16];
+ } * dset16;
+ struct {
+ int32_t arr[F73_XDIM][F73_YDIM32];
+ } * dset32;
+ struct {
+ int64_t arr[F73_XDIM][F73_YDIM64];
+ } * dset64;
+ struct {
+ double arr[F73_XDIM][F73_YDIM8];
+ } * dsetdbl;
uint8_t valu8bits;
uint16_t valu16bits;
@@ -8851,15 +8923,15 @@ gent_attr_intscalars(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F73_XDIM, F73_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F73_XDIM, F73_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F73_XDIM, F73_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F73_XDIM, F73_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F73_XDIM, F73_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F73_XDIM, F73_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F73_XDIM, F73_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F73_XDIM, F73_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F73_XDIM, F73_YDIM8);
+ dsetu8 = malloc(sizeof(*dsetu8));
+ dsetu16 = malloc(sizeof(*dsetu16));
+ dsetu32 = malloc(sizeof(*dsetu32));
+ dsetu64 = malloc(sizeof(*dsetu64));
+ dset8 = malloc(sizeof(*dset8));
+ dset16 = malloc(sizeof(*dset16));
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dsetdbl = malloc(sizeof(*dsetdbl));
fid = H5Fcreate(FILE74, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
root = H5Gopen2(fid, "/", H5P_DEFAULT);
@@ -8873,14 +8945,14 @@ gent_attr_intscalars(void)
valu8bits = (uint8_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu8[i][0] = valu8bits;
+ dsetu8->arr[i][0] = valu8bits;
for (j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = (uint8_t)(dsetu8[i][j - 1] << 1);
+ dsetu8->arr[i][j] = (uint8_t)(dsetu8->arr[i][j - 1] << 1);
}
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Awrite(attr, tid, dsetu8[0]);
+ H5Awrite(attr, tid, dsetu8);
H5Sclose(space);
H5Aclose(attr);
@@ -8893,14 +8965,14 @@ gent_attr_intscalars(void)
valu16bits = (uint16_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu16[i][0] = valu16bits;
+ dsetu16->arr[i][0] = valu16bits;
for (j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = (uint16_t)(dsetu16[i][j - 1] << 1);
+ dsetu16->arr[i][j] = (uint16_t)(dsetu16->arr[i][j - 1] << 1);
}
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Awrite(attr, tid, dsetu16[0]);
+ H5Awrite(attr, tid, dsetu16);
H5Sclose(space);
H5Aclose(attr);
@@ -8913,14 +8985,14 @@ gent_attr_intscalars(void)
valu32bits = (uint32_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu32[i][0] = valu32bits;
+ dsetu32->arr[i][0] = valu32bits;
for (j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j - 1] << 1;
+ dsetu32->arr[i][j] = dsetu32->arr[i][j - 1] << 1;
}
valu32bits <<= 1;
}
- H5Awrite(attr, tid, dsetu32[0]);
+ H5Awrite(attr, tid, dsetu32);
H5Sclose(space);
H5Aclose(attr);
@@ -8933,14 +9005,14 @@ gent_attr_intscalars(void)
valu64bits = (uint64_t)~0Lu; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu64[i][0] = valu64bits;
+ dsetu64->arr[i][0] = valu64bits;
for (j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j - 1] << 1;
+ dsetu64->arr[i][j] = dsetu64->arr[i][j - 1] << 1;
}
valu64bits <<= 1;
}
- H5Awrite(attr, tid, dsetu64[0]);
+ H5Awrite(attr, tid, dsetu64);
H5Sclose(space);
H5Aclose(attr);
@@ -8953,14 +9025,14 @@ gent_attr_intscalars(void)
val8bits = (int8_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset8[i][0] = val8bits;
+ dset8->arr[i][0] = val8bits;
for (j = 1; j < dims[1]; j++) {
- dset8[i][j] = (int8_t)(dset8[i][j - 1] << 1);
+ dset8->arr[i][j] = (int8_t)(dset8->arr[i][j - 1] << 1);
}
val8bits = (int8_t)(val8bits << 1);
}
- H5Awrite(attr, tid, dset8[0]);
+ H5Awrite(attr, tid, dset8);
H5Sclose(space);
H5Aclose(attr);
@@ -8973,14 +9045,14 @@ gent_attr_intscalars(void)
val16bits = (int16_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset16[i][0] = val16bits;
+ dset16->arr[i][0] = val16bits;
for (j = 1; j < dims[1]; j++) {
- dset16[i][j] = (int16_t)(dset16[i][j - 1] << 1);
+ dset16->arr[i][j] = (int16_t)(dset16->arr[i][j - 1] << 1);
}
val16bits = (int16_t)(val16bits << 1);
}
- H5Awrite(attr, tid, dset16[0]);
+ H5Awrite(attr, tid, dset16);
H5Sclose(space);
H5Aclose(attr);
@@ -8993,14 +9065,14 @@ gent_attr_intscalars(void)
val32bits = (int32_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
+ dset32->arr[i][0] = val32bits;
for (j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j - 1] << 1;
+ dset32->arr[i][j] = dset32->arr[i][j - 1] << 1;
}
val32bits <<= 1;
}
- H5Awrite(attr, tid, dset32[0]);
+ H5Awrite(attr, tid, dset32);
H5Sclose(space);
H5Aclose(attr);
@@ -9013,14 +9085,14 @@ gent_attr_intscalars(void)
val64bits = (int64_t)~0L; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
+ dset64->arr[i][0] = val64bits;
for (j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j - 1] << 1;
+ dset64->arr[i][j] = dset64->arr[i][j - 1] << 1;
}
val64bits <<= 1;
}
- H5Awrite(attr, tid, dset64[0]);
+ H5Awrite(attr, tid, dset64);
H5Sclose(space);
H5Aclose(attr);
@@ -9033,9 +9105,9 @@ gent_attr_intscalars(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
- H5Awrite(attr, tid, dsetdbl[0]);
+ H5Awrite(attr, tid, dsetdbl);
H5Sclose(space);
H5Aclose(attr);
@@ -9236,7 +9308,7 @@ gent_compound_int_array(void)
dims[0] = F76_DIM8;
for (n = 0; n < (int)dims[0]; n++)
- Cmpd1[m].dsetdbl[n] = 0.0001F + (float)n;
+ Cmpd1[m].dsetdbl[n] = 0.0001 + (double)n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -9477,8 +9549,8 @@ gent_compound_ints(void)
val64bits <<= 1;
/* Double Dummy set for failure tests */
- Cmpd1[m].dsetdbl = 0.0001F + (float)m;
- Cmpd2[m].dsetdbl = 0.0001F + (float)m;
+ Cmpd1[m].dsetdbl = 0.0001 + (double)m;
+ Cmpd2[m].dsetdbl = 0.0001 + (double)m;
}
/* Create the dataspace */
@@ -9618,15 +9690,33 @@ gent_intattrscalars(void)
hid_t tid = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t ** dsetu8 = NULL;
- uint16_t **dsetu16 = NULL;
- uint32_t **dsetu32 = NULL;
- uint64_t **dsetu64 = NULL;
- int8_t ** dset8 = NULL;
- int16_t ** dset16 = NULL;
- int32_t ** dset32 = NULL;
- int64_t ** dset64 = NULL;
- double ** dsetdbl = NULL;
+ struct {
+ uint8_t arr[F73_XDIM][F73_YDIM8];
+ } *dsetu8 = NULL;
+ struct {
+ uint16_t arr[F73_XDIM][F73_YDIM16];
+ } *dsetu16 = NULL;
+ struct {
+ uint32_t arr[F73_XDIM][F73_YDIM32];
+ } *dsetu32 = NULL;
+ struct {
+ uint64_t arr[F73_XDIM][F73_YDIM64];
+ } *dsetu64 = NULL;
+ struct {
+ int8_t arr[F73_XDIM][F73_YDIM8];
+ } *dset8 = NULL;
+ struct {
+ int16_t arr[F73_XDIM][F73_YDIM16];
+ } *dset16 = NULL;
+ struct {
+ int32_t arr[F73_XDIM][F73_YDIM32];
+ } *dset32 = NULL;
+ struct {
+ int64_t arr[F73_XDIM][F73_YDIM64];
+ } *dset64 = NULL;
+ struct {
+ double arr[F73_XDIM][F73_YDIM8];
+ } *dsetdbl = NULL;
uint8_t valu8bits;
uint16_t valu16bits;
@@ -9640,15 +9730,15 @@ gent_intattrscalars(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F73_XDIM, F73_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F73_XDIM, F73_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F73_XDIM, F73_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F73_XDIM, F73_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F73_XDIM, F73_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F73_XDIM, F73_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F73_XDIM, F73_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F73_XDIM, F73_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F73_XDIM, F73_YDIM8);
+ dsetu8 = malloc(sizeof(*dsetu8));
+ dsetu16 = malloc(sizeof(*dsetu16));
+ dsetu32 = malloc(sizeof(*dsetu32));
+ dsetu64 = malloc(sizeof(*dsetu64));
+ dset8 = malloc(sizeof(*dset8));
+ dset16 = malloc(sizeof(*dset16));
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dsetdbl = malloc(sizeof(*dsetdbl));
fid = H5Fcreate(FILE78, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -9661,9 +9751,9 @@ gent_intattrscalars(void)
valu8bits = (uint8_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu8[i][0] = valu8bits;
+ dsetu8->arr[i][0] = valu8bits;
for (j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = (uint8_t)(dsetu8[i][j - 1] << 1);
+ dsetu8->arr[i][j] = (uint8_t)(dsetu8->arr[i][j - 1] << 1);
}
valu8bits = (uint8_t)(valu8bits << 1);
}
@@ -9671,7 +9761,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
/* Attribute of 8 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU08, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu8[0]);
+ H5Awrite(attr, tid, dsetu8);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9685,9 +9775,9 @@ gent_intattrscalars(void)
valu16bits = (uint16_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu16[i][0] = valu16bits;
+ dsetu16->arr[i][0] = valu16bits;
for (j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = (uint16_t)(dsetu16[i][j - 1] << 1);
+ dsetu16->arr[i][j] = (uint16_t)(dsetu16->arr[i][j - 1] << 1);
}
valu16bits = (uint16_t)(valu16bits << 1);
}
@@ -9695,7 +9785,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
/* Attribute of 16 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU16, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu16[0]);
+ H5Awrite(attr, tid, dsetu16);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9709,9 +9799,9 @@ gent_intattrscalars(void)
valu32bits = (uint32_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu32[i][0] = valu32bits;
+ dsetu32->arr[i][0] = valu32bits;
for (j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j - 1] << 1;
+ dsetu32->arr[i][j] = dsetu32->arr[i][j - 1] << 1;
}
valu32bits <<= 1;
}
@@ -9719,7 +9809,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
/* Attribute of 32 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU32, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu32[0]);
+ H5Awrite(attr, tid, dsetu32);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9733,9 +9823,9 @@ gent_intattrscalars(void)
valu64bits = (uint64_t)~0Lu; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu64[i][0] = valu64bits;
+ dsetu64->arr[i][0] = valu64bits;
for (j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j - 1] << 1;
+ dsetu64->arr[i][j] = dsetu64->arr[i][j - 1] << 1;
}
valu64bits <<= 1;
}
@@ -9743,7 +9833,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
/* Attribute of 64 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU64, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu64[0]);
+ H5Awrite(attr, tid, dsetu64);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9757,9 +9847,9 @@ gent_intattrscalars(void)
val8bits = (int8_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset8[i][0] = val8bits;
+ dset8->arr[i][0] = val8bits;
for (j = 1; j < dims[1]; j++) {
- dset8[i][j] = (int8_t)(dset8[i][j - 1] << 1);
+ dset8->arr[i][j] = (int8_t)(dset8->arr[i][j - 1] << 1);
}
val8bits = (int8_t)(val8bits << 1);
}
@@ -9767,7 +9857,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
/* Attribute of 8 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS08, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset8[0]);
+ H5Awrite(attr, tid, dset8);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9781,9 +9871,9 @@ gent_intattrscalars(void)
val16bits = (int16_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset16[i][0] = val16bits;
+ dset16->arr[i][0] = val16bits;
for (j = 1; j < dims[1]; j++) {
- dset16[i][j] = (int16_t)(dset16[i][j - 1] << 1);
+ dset16->arr[i][j] = (int16_t)(dset16->arr[i][j - 1] << 1);
}
val16bits = (int16_t)(val16bits << 1);
}
@@ -9791,7 +9881,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
/* Attribute of 16 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS16, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset16[0]);
+ H5Awrite(attr, tid, dset16);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9805,9 +9895,9 @@ gent_intattrscalars(void)
val32bits = (int32_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
+ dset32->arr[i][0] = val32bits;
for (j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j - 1] << 1;
+ dset32->arr[i][j] = dset32->arr[i][j - 1] << 1;
}
val32bits <<= 1;
}
@@ -9815,7 +9905,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
/* Attribute of 32 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS32, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset32[0]);
+ H5Awrite(attr, tid, dset32);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9829,9 +9919,9 @@ gent_intattrscalars(void)
val64bits = (int64_t)~0L; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
+ dset64->arr[i][0] = val64bits;
for (j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j - 1] << 1;
+ dset64->arr[i][j] = dset64->arr[i][j - 1] << 1;
}
val64bits <<= 1;
}
@@ -9839,7 +9929,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
/* Attribute of 64 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS64, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset64[0]);
+ H5Awrite(attr, tid, dset64);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9853,12 +9943,12 @@ gent_intattrscalars(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
/* Attribute of double */
attr = H5Acreate2(dataset, F73_DUMMYDBL, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetdbl[0]);
+ H5Awrite(attr, tid, dsetdbl);
H5Aclose(attr);
H5Sclose(space);
@@ -9896,15 +9986,33 @@ gent_intsattrs(void)
hid_t aspace = H5I_INVALID_HID;
hsize_t dims[2], adims[1];
- uint8_t ** dsetu8 = NULL;
- uint16_t **dsetu16 = NULL;
- uint32_t **dsetu32 = NULL;
- uint64_t **dsetu64 = NULL;
- int8_t ** dset8 = NULL;
- int16_t ** dset16 = NULL;
- int32_t ** dset32 = NULL;
- int64_t ** dset64 = NULL;
- double ** dsetdbl = NULL;
+ struct {
+ uint8_t arr[F66_XDIM][F66_YDIM8];
+ } * dsetu8;
+ struct {
+ uint16_t arr[F66_XDIM][F66_YDIM16];
+ } * dsetu16;
+ struct {
+ uint32_t arr[F66_XDIM][F66_YDIM32];
+ } * dsetu32;
+ struct {
+ uint64_t arr[F66_XDIM][F66_YDIM64];
+ } * dsetu64;
+ struct {
+ int8_t arr[F66_XDIM][F66_YDIM8];
+ } * dset8;
+ struct {
+ int16_t arr[F66_XDIM][F66_YDIM16];
+ } * dset16;
+ struct {
+ int32_t arr[F66_XDIM][F66_YDIM32];
+ } * dset32;
+ struct {
+ int64_t arr[F66_XDIM][F66_YDIM64];
+ } * dset64;
+ struct {
+ double arr[F66_XDIM][F66_YDIM8];
+ } * dsetdbl;
uint8_t * asetu8 = NULL;
uint16_t *asetu16 = NULL;
@@ -9928,15 +10036,15 @@ gent_intsattrs(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F66_XDIM, F66_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F66_XDIM, F66_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F66_XDIM, F66_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F66_XDIM, F66_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F66_XDIM, F66_YDIM8);
- H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F66_XDIM, F66_YDIM16);
- H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F66_XDIM, F66_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F66_XDIM, F66_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F66_XDIM, F66_YDIM8);
+ dsetu8 = malloc(sizeof(*dsetu8));
+ dsetu16 = malloc(sizeof(*dsetu16));
+ dsetu32 = malloc(sizeof(*dsetu32));
+ dsetu64 = malloc(sizeof(*dsetu64));
+ dset8 = malloc(sizeof(*dset8));
+ dset16 = malloc(sizeof(*dset16));
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dsetdbl = malloc(sizeof(*dsetdbl));
asetu8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(uint8_t));
asetu16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(uint16_t));
@@ -9958,16 +10066,16 @@ gent_intsattrs(void)
valu8bits = (uint8_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu8[i][0] = valu8bits;
- asetu8[i * dims[1]] = dsetu8[i][0];
+ dsetu8->arr[i][0] = valu8bits;
+ asetu8[i * dims[1]] = dsetu8->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = (uint8_t)(dsetu8[i][j - 1] << 1);
- asetu8[i * dims[1] + j] = dsetu8[i][j];
+ dsetu8->arr[i][j] = (uint8_t)(dsetu8->arr[i][j - 1] << 1);
+ asetu8[i * dims[1] + j] = dsetu8->arr[i][j];
}
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
/* Attribute of 8 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM8;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9986,16 +10094,16 @@ gent_intsattrs(void)
valu16bits = (uint16_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu16[i][0] = valu16bits;
- asetu16[i * dims[1]] = dsetu16[i][0];
+ dsetu16->arr[i][0] = valu16bits;
+ asetu16[i * dims[1]] = dsetu16->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = (uint16_t)(dsetu16[i][j - 1] << 1);
- asetu16[i * dims[1] + j] = dsetu16[i][j];
+ dsetu16->arr[i][j] = (uint16_t)(dsetu16->arr[i][j - 1] << 1);
+ asetu16[i * dims[1] + j] = dsetu16->arr[i][j];
}
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
/* Attribute of 16 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM16;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10014,16 +10122,16 @@ gent_intsattrs(void)
valu32bits = (uint32_t)~0u; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu32[i][0] = valu32bits;
- asetu32[i * dims[1]] = dsetu32[i][0];
+ dsetu32->arr[i][0] = valu32bits;
+ asetu32[i * dims[1]] = dsetu32->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j - 1] << 1;
- asetu32[i * dims[1] + j] = dsetu32[i][j];
+ dsetu32->arr[i][j] = dsetu32->arr[i][j - 1] << 1;
+ asetu32[i * dims[1] + j] = dsetu32->arr[i][j];
}
valu32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
/* Attribute of 32 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM32;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10042,16 +10150,16 @@ gent_intsattrs(void)
valu64bits = (uint64_t)~0Lu; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dsetu64[i][0] = valu64bits;
- asetu64[i * dims[1]] = dsetu64[i][0];
+ dsetu64->arr[i][0] = valu64bits;
+ asetu64[i * dims[1]] = dsetu64->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j - 1] << 1;
- asetu64[i * dims[1] + j] = dsetu64[i][j];
+ dsetu64->arr[i][j] = dsetu64->arr[i][j - 1] << 1;
+ asetu64[i * dims[1] + j] = dsetu64->arr[i][j];
}
valu64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64[0]);
+ H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
/* Attribute of 64 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM64;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10070,16 +10178,16 @@ gent_intsattrs(void)
val8bits = (int8_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset8[i][0] = val8bits;
- aset8[i * dims[1]] = dset8[i][0];
+ dset8->arr[i][0] = val8bits;
+ aset8[i * dims[1]] = dset8->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset8[i][j] = (int8_t)(dset8[i][j - 1] << 1);
- aset8[i * dims[1] + j] = dset8[i][j];
+ dset8->arr[i][j] = (int8_t)(dset8->arr[i][j - 1] << 1);
+ aset8[i * dims[1] + j] = dset8->arr[i][j];
}
val8bits = (int8_t)(val8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
/* Attribute of 8 bits signed int */
adims[0] = F66_XDIM * F66_YDIM8;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10098,16 +10206,16 @@ gent_intsattrs(void)
val16bits = (int16_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset16[i][0] = val16bits;
- aset16[i * dims[1]] = dset16[i][0];
+ dset16->arr[i][0] = val16bits;
+ aset16[i * dims[1]] = dset16->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset16[i][j] = (int16_t)(dset16[i][j - 1] << 1);
- aset16[i * dims[1] + j] = dset16[i][j];
+ dset16->arr[i][j] = (int16_t)(dset16->arr[i][j - 1] << 1);
+ aset16[i * dims[1] + j] = dset16->arr[i][j];
}
val16bits = (int16_t)(val16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
/* Attribute of 16 bits signed int */
adims[0] = F66_XDIM * F66_YDIM16;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10126,16 +10234,16 @@ gent_intsattrs(void)
val32bits = (int32_t)~0; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
- aset32[i * dims[1]] = dset32[i][0];
+ dset32->arr[i][0] = val32bits;
+ aset32[i * dims[1]] = dset32->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j - 1] << 1;
- aset32[i * dims[1] + j] = dset32[i][j];
+ dset32->arr[i][j] = dset32->arr[i][j - 1] << 1;
+ aset32[i * dims[1] + j] = dset32->arr[i][j];
}
val32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
/* Attribute of 32 bits signed int */
adims[0] = F66_XDIM * F66_YDIM32;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10154,16 +10262,16 @@ gent_intsattrs(void)
val64bits = (int64_t)~0L; /* all 1s */
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
- aset64[i * dims[1]] = dset64[i][0];
+ dset64->arr[i][0] = val64bits;
+ aset64[i * dims[1]] = dset64->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j - 1] << 1;
- aset64[i * dims[1] + j] = dset64[i][j];
+ dset64->arr[i][j] = dset64->arr[i][j - 1] << 1;
+ aset64[i * dims[1] + j] = dset64->arr[i][j];
}
val64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
+ H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
/* Attribute of 64 bits signed int */
adims[0] = F66_XDIM * F66_YDIM64;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10182,11 +10290,11 @@ gent_intsattrs(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++) {
- dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
- asetdbl[i * dims[1] + j] = dsetdbl[i][j];
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
+ asetdbl[i * dims[1] + j] = dsetdbl->arr[i][j];
}
- H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]);
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
/* Attribute of double */
adims[0] = F66_XDIM * F66_YDIM8;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10238,9 +10346,15 @@ gent_floatsattrs(void)
hid_t aspace = H5I_INVALID_HID;
hsize_t dims[2], adims[1];
- float ** dset32 = NULL;
- double ** dset64 = NULL;
- long double **dset128 = NULL;
+ struct {
+ float arr[F89_XDIM][F89_YDIM32];
+ } * dset32;
+ struct {
+ double arr[F89_XDIM][F89_YDIM64];
+ } * dset64;
+ struct {
+ long double arr[F89_XDIM][F89_YDIM128];
+ } * dset128;
float * aset32 = NULL;
double * aset64 = NULL;
@@ -10253,9 +10367,9 @@ gent_floatsattrs(void)
unsigned int i, j;
/* Create arrays */
- H5TEST_ALLOCATE_2D_ARRAY(dset32, float, F89_XDIM, F89_YDIM32);
- H5TEST_ALLOCATE_2D_ARRAY(dset64, double, F89_XDIM, F89_YDIM64);
- H5TEST_ALLOCATE_2D_ARRAY(dset128, long double, F89_XDIM, F89_YDIM128);
+ dset32 = malloc(sizeof(*dset32));
+ dset64 = malloc(sizeof(*dset64));
+ dset128 = malloc(sizeof(*dset128));
aset32 = HDcalloc(F89_XDIM * F89_YDIM32, sizeof(float));
aset64 = HDcalloc(F89_XDIM * F89_YDIM64, sizeof(double));
@@ -10277,16 +10391,16 @@ gent_floatsattrs(void)
val32bits = (float)F89_YDIM32;
for (i = 0; i < dims[0]; i++) {
- dset32[i][0] = val32bits;
- aset32[i * dims[1]] = dset32[i][0];
+ dset32->arr[i][0] = val32bits;
+ aset32[i * dims[1]] = dset32->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset32[i][j] = (float)(j * dims[0] + i) / (float)F89_YDIM32;
- aset32[i * dims[1] + j] = dset32[i][j];
+ dset32->arr[i][j] = (float)(j * dims[0] + i) / (float)F89_YDIM32;
+ aset32[i * dims[1] + j] = dset32->arr[i][j];
}
val32bits -= (float)1;
}
- H5Dwrite(dataset, H5T_IEEE_F32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
+ H5Dwrite(dataset, H5T_IEEE_F32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
/* Attribute of 32 bits float */
adims[0] = F89_XDIM * F89_YDIM32;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10305,16 +10419,16 @@ gent_floatsattrs(void)
val64bits = (double)F89_YDIM64;
for (i = 0; i < dims[0]; i++) {
- dset64[i][0] = val64bits;
- aset64[i * dims[1]] = dset64[i][0];
+ dset64->arr[i][0] = val64bits;
+ aset64[i * dims[1]] = dset64->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset64[i][j] = (double)(j * dims[0] + i) / (double)F89_YDIM64;
- aset64[i * dims[1] + j] = dset64[i][j];
+ dset64->arr[i][j] = (double)(j * dims[0] + i) / (double)F89_YDIM64;
+ aset64[i * dims[1] + j] = dset64->arr[i][j];
}
val64bits -= (double)1;
}
- H5Dwrite(dataset, H5T_IEEE_F64LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
+ H5Dwrite(dataset, H5T_IEEE_F64LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
/* Attribute of 64 bits double */
adims[0] = F89_XDIM * F89_YDIM64;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10333,16 +10447,16 @@ gent_floatsattrs(void)
val128bits = (long double)F89_YDIM128;
for (i = 0; i < dims[0]; i++) {
- dset128[i][0] = val128bits;
- aset128[i * dims[1]] = dset128[i][0];
+ dset128->arr[i][0] = val128bits;
+ aset128[i * dims[1]] = dset128->arr[i][0];
for (j = 1; j < dims[1]; j++) {
- dset128[i][j] = (long double)(j * dims[0] + i) / (long double)F89_YDIM128;
- aset128[i * dims[1] + j] = dset128[i][j];
+ dset128->arr[i][j] = (long double)(j * dims[0] + i) / (long double)F89_YDIM128;
+ aset128[i * dims[1] + j] = dset128->arr[i][j];
}
val128bits -= (long double)1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset128[0]);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset128);
/* Attribute of 128 bits long double */
adims[0] = F89_XDIM * F89_YDIM128;
aspace = H5Screate_simple(1, adims, NULL);
@@ -10534,13 +10648,17 @@ gent_bitnopaquefields(void)
static void
gent_intsfourdims(void)
{
- hid_t fid, dataset, space;
- hsize_t dims[F81_RANK];
- uint32_t dset1[F81_ZDIM][F81_YDIM][F81_XDIM][F81_WDIM];
+ hid_t fid, dataset, space;
+ hsize_t dims[F81_RANK];
+ struct {
+ uint32_t arr[F81_ZDIM][F81_YDIM][F81_XDIM][F81_WDIM];
+ } * dset1;
unsigned int i, j, k, l;
fid = H5Fcreate(FILE81, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ dset1 = malloc(sizeof(*dset1));
+
/* Dataset of 32 bits unsigned int */
dims[0] = F81_ZDIM;
dims[1] = F81_YDIM;
@@ -10553,7 +10671,7 @@ gent_intsfourdims(void)
for (j = 0; j < F81_YDIM; j++)
for (k = 0; k < F81_XDIM; k++)
for (l = 0; l < F81_WDIM; l++)
- dset1[i][j][k][l] =
+ dset1->arr[i][j][k][l] =
i * F81_YDIM * F81_XDIM * F81_WDIM + j * F81_XDIM * F81_WDIM + k * F81_WDIM + l;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
@@ -10561,6 +10679,7 @@ gent_intsfourdims(void)
H5Dclose(dataset);
H5Fclose(fid);
+ free(dset1);
}
/*-------------------------------------------------------------------------
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 9464302..f9f3734 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -1171,7 +1171,7 @@ TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5
# test for named data types
TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5
TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5
-# test for unamed type
+# test for unnamed type
TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5
# test complicated compound datatype
TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in
index 6689749..eaf91fd 100644
--- a/tools/test/h5dump/testh5dumppbits.sh.in
+++ b/tools/test/h5dump/testh5dumppbits.sh.in
@@ -516,7 +516,7 @@ TOOLTEST tnofilename-with-packed-bits.ddl --enable-error-stack
# Limits:
# Maximum number of packed bits is 8 (for now).
# Maximum integer size is 64 (for now).
-# Maximun Offset is 63 (Maximum size - 1).
+# Maximum Offset is 63 (Maximum size - 1).
# Maximum Offset+Length is 64 (Maximum size).
# Tests:
# Normal operation on both signed and unsigned int datasets.
diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c
index 09cca45..ccb64b5 100644
--- a/tools/test/h5format_convert/h5fc_gentest.c
+++ b/tools/test/h5format_convert/h5fc_gentest.c
@@ -381,7 +381,7 @@ error:
/*
* Function: gen_err_level()
*
- * Generate a file to test the situtation described in HDFFV-9434:
+ * Generate a file to test the situation described in HDFFV-9434:
* Exceed the limit of v1-btree level
*
* Create a file with H5Pset_istore_k(fcpl, 1).
diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in
index 762f43d..df083d1 100644
--- a/tools/test/h5format_convert/testh5fc.sh.in
+++ b/tools/test/h5format_convert/testh5fc.sh.in
@@ -313,7 +313,7 @@ TOOLTEST_MASK_OUT() {
$RM $actual $actual_err $actual_sav $actual_err_sav
fi
}
-# Same as TOOLTEST_OUT except only compares error outout
+# Same as TOOLTEST_OUT except only compares error output
TOOLTEST_ERR() {
# Prepare expected and actual output
expect="$TESTDIR/$1"
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index fd21d6c..4e67e98 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -15,7 +15,7 @@
#include "h5tools.h"
#include "h5tools_utils.h"
-void parse_command_line(int argc, const char *argv[]);
+void parse_command_line(int argc, const char *const *argv);
/* Name of tool */
#define PROGRAM_NAME "getub"
@@ -52,7 +52,7 @@ usage(const char *prog)
*-------------------------------------------------------------------------
*/
void
-parse_command_line(int argc, const char *argv[])
+parse_command_line(int argc, const char *const *argv)
{
int opt;
@@ -77,7 +77,7 @@ parse_command_line(int argc, const char *argv[])
} /* end parse_command_line() */
int
-main(int argc, const char *argv[])
+main(int argc, char *argv[])
{
int fd = H5I_INVALID_HID;
unsigned size;
@@ -91,7 +91,7 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- parse_command_line(argc, argv);
+ parse_command_line(argc, (const char *const *)argv);
if (NULL == nbytes) {
/* missing arg */
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index e6769ec..f264d9b 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -56,7 +56,7 @@ usage(const char *prog)
*/
static void
-parse_command_line(int argc, const char *argv[])
+parse_command_line(int argc, const char *const *argv)
{
int opt;
@@ -98,7 +98,7 @@ leave(int ret)
*-------------------------------------------------------------------------
*/
int
-main(int argc, const char *argv[])
+main(int argc, char *argv[])
{
char * ifname;
hid_t ifile = H5I_INVALID_HID;
@@ -113,7 +113,7 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- parse_command_line(argc, argv);
+ parse_command_line(argc, (const char *const *)argv);
/* enable error reporting if command line option */
h5tools_error_report();
diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in
index caa3416..191fef0 100644
--- a/tools/test/h5jam/testh5jam.sh.in
+++ b/tools/test/h5jam/testh5jam.sh.in
@@ -345,7 +345,7 @@ CHECK_NOUB() {
# JAMTEST user_block file.h5 [--clobber] [ofile.h5]
#
# Test the 'jam' tool:
-# 1. figure out the input and output, and the comparision
+# 1. figure out the input and output, and the comparison
# that will be done.
# 2. call 'jam' with the appropriate arguments
# 3. check the user block is correct in the output (Check_UB)
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index 29e982d..0077b07 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -166,7 +166,7 @@ VERIFY() {
# the `nerrors' global variable and (if $verbose is set) display up to $NLINS
# lines of the actual output from the tool test. The actual output is not
# removed if $HDF5_NOCLEANUP has a non-zero value.
-# Arguemnts:
+# Arguments:
# $1 -- actual output filename to use
# $2 and on -- argument for the h5ls tool
TOOLTEST() {
diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in
index ee0dad7..36583da 100644
--- a/tools/test/h5ls/testh5ls.sh.in
+++ b/tools/test/h5ls/testh5ls.sh.in
@@ -164,7 +164,7 @@ $SRC_H5LS_TESTFILES/tdset_idx.ls
# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
- echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Serial Exit Code is not passed back to shell correctly."
echo "***Warning*** Exit code checking is skipped."
h5haveexitcode=no
fi
@@ -230,7 +230,7 @@ TESTING() {
# the `nerrors' global variable and (if $verbose is set) display up to $NLINS
# lines of the actual output from the tool test. The actual output is not
# removed if $HDF5_NOCLEANUP has a non-zero value.
-# Arguemnts:
+# Arguments:
# $1 -- actual output filename to use
# $2 and on -- argument for the h5ls tool
TOOLTEST() {
diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in
index 4814f85..ab2d137 100644
--- a/tools/test/h5ls/testh5lsvds.sh.in
+++ b/tools/test/h5ls/testh5lsvds.sh.in
@@ -103,7 +103,7 @@ $SRC_H5LS_TESTFILES/vds/tvds-5.ls
# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
- echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Serial Exit Code is not passed back to shell correctly."
echo "***Warning*** Exit code checking is skipped."
h5haveexitcode=no
fi
@@ -169,7 +169,7 @@ TESTING() {
# the `nerrors' global variable and (if $verbose is set) display up to $NLINS
# lines of the actual output from the tool test. The actual output is not
# removed if $HDF5_NOCLEANUP has a non-zero value.
-# Arguemnts:
+# Arguments:
# $1 -- actual output filename to use
# $2 and on -- argument for the h5ls tool
TOOLTEST() {
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 397c3ac..09648ff 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -1541,7 +1541,7 @@
ADD_H5_TEST (bug1814 "TEST" ${FILE_REF})
# test attribute with various references (bug1797 / HDFFV-5932)
-# the references in attribute of compund or vlen datatype
+# the references in attribute of compound or vlen datatype
ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF})
# Add test for memory leak in attribute. This test is verified by CTEST.
diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake
index e26941b..f8ac10b 100644
--- a/tools/test/h5repack/CMakeVFDTests.cmake
+++ b/tools/test/h5repack/CMakeVFDTests.cmake
@@ -15,20 +15,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
-set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
-)
-
-if (H5_HAVE_DIRECT)
- set (VFD_LIST ${VFD_LIST} direct)
-endif ()
+H5_CREATE_VFD_DIR()
##############################################################################
##############################################################################
@@ -38,7 +25,6 @@ endif ()
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
add_test (
NAME H5REPACK-${vfdname}-h5repacktest-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
diff --git a/tools/test/h5repack/dynlib_rpk.c b/tools/test/h5repack/dynlib_rpk.c
index b228344..bef032a 100644
--- a/tools/test/h5repack/dynlib_rpk.c
+++ b/tools/test/h5repack/dynlib_rpk.c
@@ -83,7 +83,7 @@ H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_
add_on = (int)cd_values[0];
if (flags & H5Z_FLAG_REVERSE) { /*read*/
- /* Substract the "add on" value to all the data values */
+ /* Subtract the "add on" value to all the data values */
while (buf_left > 0) {
*int_ptr++ -= add_on;
buf_left -= sizeof(int);
diff --git a/tools/test/h5repack/dynlib_vrpk.c b/tools/test/h5repack/dynlib_vrpk.c
index 5eac4f2..a45de65 100644
--- a/tools/test/h5repack/dynlib_vrpk.c
+++ b/tools/test/h5repack/dynlib_vrpk.c
@@ -91,7 +91,7 @@ H5Z_filter_dynlib4(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_
add_on = (int)cd_values[0];
if (flags & H5Z_FLAG_REVERSE) { /*read*/
- /* Substract the "add on" value to all the data values */
+ /* Subtract the "add on" value to all the data values */
while (buf_left > 0) {
*int_ptr++ -= add_on;
buf_left -= sizeof(int);
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 1e54670..a241ea8 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -525,7 +525,7 @@ VERIFY_LAYOUT_ALL()
#---------------------------------
# check the layout from a dataset
- # check if the other layouts still exsit
+ # check if the other layouts still exist
VERIFY "layouts"
(
cd $TESTDIR
@@ -1713,10 +1713,10 @@ TOOLTEST1 family tfamily%05d.h5
TOOLTEST bug1814 h5repack_refs.h5
# test attribute with various references (bug1797 / HDFFV-5932)
-# the references in attribute of compund or vlen datatype
+# the references in attribute of compound or vlen datatype
TOOLTEST HDFFV-5932 h5repack_attr_refs.h5
-# Add test for memory leak in attirbute. This test is verified by CTEST.
+# Add test for memory leak in attribute. This test is verified by CTEST.
# 1. leak from vlen string
# 2. leak from compound type without reference member
# (HDFFV-7840, )
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index 576b1c7..c025891 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -27,9 +27,9 @@
* There is no restriction on the name, number, or structure of datasets and
* groups in HDF5 file.
*
- * The inluded datatypes should be more than adequate to verify the correctness
+ * The included datatypes should be more than adequate to verify the correctness
* of the behavior -- if one type can be consolidated from external storage,
- * then thay all can.
+ * then they all can.
*/
#include "hdf5.h"
@@ -307,7 +307,7 @@ generate_f32le(hbool_t external)
/* Generate values */
for (i = 0, k = 0, n = 0; (hsize_t)i < dims[0]; i++) {
for (j = 0; (hsize_t)j < dims[1]; j++, k++, n++) {
- wdata[k] = n * 801.1f * ((k % 5 == 1) ? (-1) : (1));
+ wdata[k] = n * 801.1F * ((k % 5 == 1) ? (-1) : (1));
}
}
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index b62fa53..e7cc21a 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -624,7 +624,7 @@ main(void)
SKIPPED();
#endif
- TESTING(" addding shuffle filter");
+ TESTING(" adding shuffle filter");
/*-------------------------------------------------------------------------
* test an individual object option
@@ -653,7 +653,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- TESTING(" addding shuffle filter to all");
+ TESTING(" adding shuffle filter to all");
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -1592,17 +1592,17 @@ main(void)
#endif
/*-------------------------------------------------------------------------
- * test file with aligment
+ * test file with alignment
*-------------------------------------------------------------------------
*/
- TESTING(" file with aligment");
+ TESTING(" file with alignment");
#ifdef H5_HAVE_FILTER_DEFLATE
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- /* add the options for aligment */
+ /* add the options for alignment */
pack_options.alignment = 1;
pack_options.threshold = 1;
@@ -1613,7 +1613,7 @@ main(void)
if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
- /* verify aligment */
+ /* verify alignment */
{
hsize_t threshold;
hsize_t alignment;
@@ -2432,14 +2432,15 @@ make_szip(hid_t loc_id)
unsigned szip_pixels_per_block = 8;
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
int szip_can_encode = 0;
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2463,7 +2464,7 @@ make_szip(hid_t loc_id)
/* set szip data */
if (H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
- if (make_dset(loc_id, "dset_szip", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_szip", sid, dcpl, buf) < 0)
goto error;
}
else
@@ -2506,15 +2507,16 @@ make_deflate(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
hobj_ref_t bufref[1]; /* reference */
hsize_t dims1r[1] = {1};
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2534,7 +2536,7 @@ make_deflate(hid_t loc_id)
/* set deflate data */
if (H5Pset_deflate(dcpl, 9) < 0)
goto error;
- if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf) < 0)
goto error;
/* create a reference to the dataset, test second seeep of file for references */
@@ -2585,13 +2587,14 @@ make_shuffle(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2611,7 +2614,7 @@ make_shuffle(hid_t loc_id)
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto error;
- if (make_dset(loc_id, "dset_shuffle", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_shuffle", sid, dcpl, buf) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -2654,13 +2657,14 @@ make_fletcher32(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2683,7 +2687,7 @@ make_fletcher32(hid_t loc_id)
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
goto error;
- if (make_dset(loc_id, "dset_fletcher32", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_fletcher32", sid, dcpl, buf) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -2726,15 +2730,17 @@ make_nbit(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hid_t dtid = H5I_INVALID_HID;
hid_t dsid = H5I_INVALID_HID;
+ hid_t dxpl = H5P_DEFAULT;
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2746,6 +2752,16 @@ make_nbit(hid_t loc_id)
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto error;
+#ifdef H5_HAVE_PARALLEL
+ /* Set up collective writes for parallel driver */
+ if (h5_using_parallel_driver(NULL)) {
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+ if (H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE) < 0)
+ goto error;
+ }
+#endif
+
dtid = H5Tcopy(H5T_NATIVE_INT);
if (H5Tset_precision(dtid, (H5Tget_precision(dtid) - 1)) < 0)
goto error;
@@ -2757,7 +2773,7 @@ make_nbit(hid_t loc_id)
goto error;
if ((dsid = H5Dcreate2(loc_id, "dset_nbit", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf) < 0)
goto error;
H5Dclose(dsid);
@@ -2765,7 +2781,7 @@ make_nbit(hid_t loc_id)
goto error;
if ((dsid = H5Dcreate2(loc_id, "dset_int31", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf) < 0)
goto error;
H5Dclose(dsid);
@@ -2773,6 +2789,8 @@ make_nbit(hid_t loc_id)
* close
*-------------------------------------------------------------------------
*/
+ if (dxpl != H5P_DEFAULT && H5Pclose(dxpl) < 0)
+ goto error;
if (H5Sclose(sid) < 0)
goto error;
if (H5Pclose(dcpl) < 0)
@@ -2788,6 +2806,7 @@ error:
H5E_BEGIN_TRY
{
H5Tclose(dtid);
+ H5Pclose(dxpl);
H5Pclose(dcpl);
H5Sclose(sid);
H5Dclose(dsid);
@@ -2813,15 +2832,17 @@ make_scaleoffset(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hid_t dtid = H5I_INVALID_HID;
hid_t dsid = H5I_INVALID_HID;
+ hid_t dxpl = H5P_DEFAULT;
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2833,6 +2854,16 @@ make_scaleoffset(hid_t loc_id)
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto error;
+#ifdef H5_HAVE_PARALLEL
+ /* Set up collective writes for parallel driver */
+ if (h5_using_parallel_driver(NULL)) {
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+ if (H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE) < 0)
+ goto error;
+ }
+#endif
+
dtid = H5Tcopy(H5T_NATIVE_INT);
/* remove the filters from the dcpl */
@@ -2842,20 +2873,22 @@ make_scaleoffset(hid_t loc_id)
goto error;
if ((dsid = H5Dcreate2(loc_id, "dset_scaleoffset", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf) < 0)
goto error;
H5Dclose(dsid);
if ((dsid = H5Dcreate2(loc_id, "dset_none", dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf) < 0)
goto error;
H5Tclose(dtid);
H5Dclose(dsid);
/*-------------------------------------------------------------------------
- * close space and dcpl
+ * close space, dxpl and dcpl
*-------------------------------------------------------------------------
*/
+ if (dxpl != H5P_DEFAULT && H5Pclose(dxpl) < 0)
+ goto error;
if (H5Sclose(sid) < 0)
goto error;
if (H5Pclose(dcpl) < 0)
@@ -2868,6 +2901,7 @@ make_scaleoffset(hid_t loc_id)
error:
H5E_BEGIN_TRY
{
+ H5Pclose(dxpl);
H5Dclose(dsid);
H5Tclose(dtid);
H5Pclose(dcpl);
@@ -2894,22 +2928,24 @@ make_all_filters(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hid_t dtid = H5I_INVALID_HID;
hid_t dsid = H5I_INVALID_HID;
+ hid_t dxpl = H5P_DEFAULT;
#if defined(H5_HAVE_FILTER_SZIP)
unsigned szip_options_mask = H5_SZIP_ALLOW_K13_OPTION_MASK | H5_SZIP_NN_OPTION_MASK;
unsigned szip_pixels_per_block = 8;
#endif /* H5_HAVE_FILTER_SZIP */
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
#if defined(H5_HAVE_FILTER_SZIP)
int szip_can_encode = 0;
#endif
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/* create a space */
if ((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -2921,6 +2957,16 @@ make_all_filters(hid_t loc_id)
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto error;
+#ifdef H5_HAVE_PARALLEL
+ /* Set up collective writes for parallel driver */
+ if (h5_using_parallel_driver(NULL)) {
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+ if (H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE) < 0)
+ goto error;
+ }
+#endif
+
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto error;
@@ -2949,7 +2995,7 @@ make_all_filters(hid_t loc_id)
goto error;
#endif
- if (make_dset(loc_id, "dset_all", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_all", sid, dcpl, buf) < 0)
goto error;
/* remove the filters from the dcpl */
@@ -2958,7 +3004,7 @@ make_all_filters(hid_t loc_id)
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
goto error;
- if (make_dset(loc_id, "dset_fletcher32", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_fletcher32", sid, dcpl, buf) < 0)
goto error;
/* Make sure encoding is enabled */
@@ -2970,7 +3016,7 @@ make_all_filters(hid_t loc_id)
/* set szip data */
if (H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
- if (make_dset(loc_id, "dset_szip", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_szip", sid, dcpl, buf) < 0)
goto error;
}
else {
@@ -2984,7 +3030,7 @@ make_all_filters(hid_t loc_id)
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto error;
- if (make_dset(loc_id, "dset_shuffle", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_shuffle", sid, dcpl, buf) < 0)
goto error;
#if defined(H5_HAVE_FILTER_DEFLATE)
@@ -2994,7 +3040,7 @@ make_all_filters(hid_t loc_id)
/* set deflate data */
if (H5Pset_deflate(dcpl, 1) < 0)
goto error;
- if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf) < 0)
goto error;
#endif
@@ -3010,7 +3056,7 @@ make_all_filters(hid_t loc_id)
goto error;
if ((dsid = H5Dcreate2(loc_id, "dset_nbit", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf) < 0)
goto error;
/* close */
@@ -3021,6 +3067,8 @@ make_all_filters(hid_t loc_id)
if (H5Sclose(sid) < 0)
goto error;
+ if (dxpl != H5P_DEFAULT && H5Pclose(dxpl) < 0)
+ goto error;
if (H5Pclose(dcpl) < 0)
goto error;
@@ -3033,6 +3081,7 @@ error:
{
H5Tclose(dtid);
H5Dclose(dsid);
+ H5Pclose(dxpl);
H5Pclose(dcpl);
H5Sclose(sid);
}
@@ -3152,15 +3201,16 @@ make_layout(hid_t loc_id)
hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK] = {DIM1, DIM2};
hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
- int ** buf = NULL;
int i;
char name[16];
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ struct {
+ int arr[DIM1][DIM2];
+ } *buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
- H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf, int);
/*-------------------------------------------------------------------------
* make several dataset with no filters
@@ -3168,7 +3218,7 @@ make_layout(hid_t loc_id)
*/
for (i = 0; i < 4; i++) {
HDsprintf(name, "dset%d", i + 1);
- if (write_dset(loc_id, RANK, dims, name, H5T_NATIVE_INT, buf[0]) < 0)
+ if (write_dset(loc_id, RANK, dims, name, H5T_NATIVE_INT, buf) < 0)
goto error;
}
@@ -3189,7 +3239,7 @@ make_layout(hid_t loc_id)
*/
if (H5Pset_layout(dcpl, H5D_COMPACT) < 0)
goto error;
- if (make_dset(loc_id, "dset_compact", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_compact", sid, dcpl, buf) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -3198,7 +3248,7 @@ make_layout(hid_t loc_id)
*/
if (H5Pset_layout(dcpl, H5D_CONTIGUOUS) < 0)
goto error;
- if (make_dset(loc_id, "dset_contiguous", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_contiguous", sid, dcpl, buf) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -3207,7 +3257,7 @@ make_layout(hid_t loc_id)
*/
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto error;
- if (make_dset(loc_id, "dset_chunk", sid, dcpl, buf[0]) < 0)
+ if (make_dset(loc_id, "dset_chunk", sid, dcpl, buf) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -3264,13 +3314,13 @@ make_layout2(hid_t loc_id)
hsize_t s_dims[RANK] = {S_DIM1, S_DIM2}; /* Dataspace (< 1 k) */
hsize_t chunk_dims[RANK] = {S_DIM1 / 2, S_DIM2 / 2}; /* Dimension sizes for chunks */
- int **s_buf = NULL; /* Temporary buffer */
-
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(s_buf, int, S_DIM1, S_DIM2);
+ struct {
+ int arr[S_DIM1][S_DIM2];
+ } *s_buf = malloc(sizeof(*s_buf));
if (NULL == s_buf)
goto error;
- H5TEST_FILL_2D_ARRAY(s_buf, int, S_DIM1, S_DIM2);
+ H5TEST_FILL_2D_HEAP_ARRAY(s_buf, int);
/* Create dataspaces */
if ((s_sid = H5Screate_simple(RANK, s_dims, NULL)) < 0)
@@ -3281,7 +3331,7 @@ make_layout2(hid_t loc_id)
goto error;
if (H5Pset_layout(contig_dcpl, H5D_CONTIGUOUS) < 0)
goto error;
- if (make_dset(loc_id, CONTIG_S, s_sid, contig_dcpl, s_buf[0]) < 0)
+ if (make_dset(loc_id, CONTIG_S, s_sid, contig_dcpl, s_buf) < 0)
goto error;
/* Create chunked datasets */
@@ -3289,7 +3339,7 @@ make_layout2(hid_t loc_id)
goto error;
if (H5Pset_chunk(chunked_dcpl, RANK, chunk_dims) < 0)
goto error;
- if (make_dset(loc_id, CHUNKED_S_FIX, s_sid, chunked_dcpl, s_buf[0]) < 0)
+ if (make_dset(loc_id, CHUNKED_S_FIX, s_sid, chunked_dcpl, s_buf) < 0)
goto error;
ret_value = 0;
@@ -3343,19 +3393,21 @@ make_layout3(hid_t loc_id)
hsize_t chunk_dims1[RANK] = {DIM1_L3 * 2, 5};
hsize_t chunk_dims2[RANK] = {SDIM1_L3 + 2, SDIM2_L3 / 2};
hsize_t chunk_dims3[RANK] = {SDIM1_L3 - 2, SDIM2_L3 / 2};
- int ** buf1 = NULL;
- int ** buf2 = NULL;
- /* Create and fill arrays */
- H5TEST_ALLOCATE_2D_ARRAY(buf1, int, DIM1_L3, DIM2_L3);
- if (NULL == buf1)
- goto error;
- H5TEST_FILL_2D_ARRAY(buf1, int, DIM1_L3, DIM2_L3);
+ /* Create arrays */
+ struct {
+ int arr[DIM1_L3][DIM2_L3];
+ } *buf1 = malloc(sizeof(*buf1));
+ struct {
+ int arr[SDIM1_L3][SDIM2_L3];
+ } *buf2 = malloc(sizeof(*buf2));
- H5TEST_ALLOCATE_2D_ARRAY(buf2, int, SDIM1_L3, SDIM2_L3);
- if (NULL == buf2)
+ if (NULL == buf1 || NULL == buf2)
goto error;
- H5TEST_FILL_2D_ARRAY(buf2, int, SDIM1_L3, SDIM2_L3);
+
+ /* Fill arrays */
+ H5TEST_FILL_2D_HEAP_ARRAY(buf1, int);
+ H5TEST_FILL_2D_HEAP_ARRAY(buf2, int);
/*-------------------------------------------------------------------------
* make chunked dataset with
@@ -3373,7 +3425,7 @@ make_layout3(hid_t loc_id)
if (H5Pset_chunk(dcpl1, RANK, chunk_dims1) < 0)
goto error;
- if (make_dset(loc_id, "chunk_unlimit1", sid1, dcpl1, buf1[0]) < 0)
+ if (make_dset(loc_id, "chunk_unlimit1", sid1, dcpl1, buf1) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -3394,7 +3446,7 @@ make_layout3(hid_t loc_id)
if (H5Pset_chunk(dcpl2, RANK, chunk_dims2) < 0)
goto error;
- if (make_dset(loc_id, "chunk_unlimit2", sid2, dcpl2, buf2[0]) < 0)
+ if (make_dset(loc_id, "chunk_unlimit2", sid2, dcpl2, buf2) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -3411,7 +3463,7 @@ make_layout3(hid_t loc_id)
if (H5Pset_chunk(dcpl3, RANK, chunk_dims3) < 0)
goto error;
- if (make_dset(loc_id, "chunk_unlimit3", sid2, dcpl3, buf2[0]) < 0)
+ if (make_dset(loc_id, "chunk_unlimit3", sid2, dcpl3, buf2) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -5802,11 +5854,25 @@ out:
static int
make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t dcpl, void *buf)
{
- hid_t did = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t dxpl_id = H5P_DEFAULT;
if ((did = H5Dcreate2(loc_id, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
return -1;
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+
+#ifdef H5_HAVE_PARALLEL
+ /* Set up collective writes for parallel driver */
+ if (h5_using_parallel_driver(NULL)) {
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto out;
+ if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0)
+ goto out;
+ }
+#endif
+
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0)
+ goto out;
+ if (dxpl_id != H5P_DEFAULT && H5Pclose(dxpl_id) < 0)
goto out;
if (H5Dclose(did) < 0)
return -1;
@@ -5835,17 +5901,30 @@ out:
static int
write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t tid, void *buf)
{
- hid_t did = H5I_INVALID_HID;
- hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dxpl_id = H5P_DEFAULT;
if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
return -1;
if ((did = H5Dcreate2(loc_id, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (buf) {
- if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+#ifdef H5_HAVE_PARALLEL
+ /* Set up collective writes for parallel driver */
+ if (h5_using_parallel_driver(NULL)) {
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto out;
+ if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0)
+ goto out;
+ }
+#endif
+
+ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0)
goto out;
}
+ if (dxpl_id != H5P_DEFAULT && H5Pclose(dxpl_id) < 0)
+ goto out;
if (H5Dclose(did) < 0)
goto out;
if (H5Sclose(sid) < 0)
@@ -5856,6 +5935,7 @@ write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t t
out:
H5E_BEGIN_TRY
{
+ H5Pclose(dxpl_id);
H5Dclose(did);
H5Sclose(sid);
}
@@ -6244,7 +6324,7 @@ gen_refered_objs(hid_t loc_id)
goto out;
}
- /* create normal dataset which is refered */
+ /* create normal dataset which is referred */
did2 = H5Dcreate2(loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did2 < 0) {
HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
@@ -6284,7 +6364,7 @@ out:
* Generate object references to objects (dataset,group and named datatype)
*
* Note:
- * copied from h5copygentest.c and upate to create named datatype
+ * copied from h5copygentest.c and update to create named datatype
*
* Programmer: Jonathan Kim (March 18, 2010)
*------------------------------------------------------------------------*/
diff --git a/tools/test/h5repack/testfiles/README b/tools/test/h5repack/testfiles/README
index 4096dee..4cb66f4 100644
--- a/tools/test/h5repack/testfiles/README
+++ b/tools/test/h5repack/testfiles/README
@@ -1,5 +1,5 @@
h5repack_nested_8bit_enum_deflated.h5:
h5repack_nested_8bit_enum.h5:
- enuberated 8bit type nested in compount type. Original file provided
+ enuberated 8bit type nested in compound type. Original file provided
by a user (HDFFV-8667) as a test file. Used h5copy to extract only the
Compound type dataset. The non-deflated version is produced by h5repack.
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index cb10d22..c1caf52 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -3,7 +3,8 @@ usage: h5repack [OPTIONS] file1 file2
file2 Output HDF5 File
OPTIONS
-h, --help Print a usage message and exit
- -v, --verbose Verbose mode, print object information
+ -v N, --verbose=N Verbose mode, print object information.
+ N - is an integer greater than 1, 2 displays read/write timing
-V, --version Print version number and exit
-n, --native Use a native HDF5 type when repacking
--enable-error-stack Prints messages from the HDF5 error stack as they
@@ -20,6 +21,18 @@ usage: h5repack [OPTIONS] file1 file2
HDF5 file specified
--dst-vol-info VOL-specific info to pass to the VOL connector used for
opening the output HDF5 file specified
+ --src-vfd-value Value (ID) of the VFL driver to use for opening the
+ input HDF5 file specified
+ --src-vfd-name Name of the VFL driver to use for opening the input
+ HDF5 file specified
+ --src-vfd-info VFD-specific info to pass to the VFL driver used for
+ opening the input HDF5 file specified
+ --dst-vfd-value Value (ID) of the VFL driver to use for opening the
+ output HDF5 file specified
+ --dst-vfd-name Name of the VFL driver to use for opening the output
+ HDF5 file specified
+ --dst-vfd-info VFD-specific info to pass to the VFL driver used for
+ opening the output HDF5 file specified
-L, --latest Use latest version of file format
This option will take precedence over the options
--low and --high
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
index 15ae813..0992a0c 100644
--- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
+++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
@@ -11,7 +11,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -33,7 +33,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -55,7 +55,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -77,7 +77,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -99,7 +99,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -121,7 +121,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -143,7 +143,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 1 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
diff --git a/tools/test/h5stat/testh5stat.sh.in b/tools/test/h5stat/testh5stat.sh.in
index 647f06a..1b4e504 100644
--- a/tools/test/h5stat/testh5stat.sh.in
+++ b/tools/test/h5stat/testh5stat.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5stat tool
#
-# Modifcations:
+# Modifications:
# Vailin Choi; July 2013
# Add tests for -l, -m, -a options
#
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 53fbc42..97feabd 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -16,7 +16,7 @@
/* The HDF5 test files */
const char *FILENAME[] = {
"h5clear_sec2_v3.h5", /* 0 -- sec2 file with superblock version 3 */
- "h5clear_log_v3.h5", /* 1 -- log file with superblock veresion 3 */
+ "h5clear_log_v3.h5", /* 1 -- log file with superblock version 3 */
"h5clear_sec2_v0.h5", /* 2 -- sec2 file with superblock version 0 */
"h5clear_sec2_v2.h5" /* 3 -- sec2 file with superblock version 2 */
};
@@ -56,24 +56,26 @@ const char *FILENAME_ENHANCE[] = {
static int
gen_cache_image_file(const char *fname)
{
- hid_t fid = H5I_INVALID_HID; /* File ID */
- hid_t did = -1, sid = H5I_INVALID_HID; /* Dataset ID, dataspace ID */
- hid_t fapl = H5I_INVALID_HID; /* File access property list */
- hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
- hsize_t dims[2]; /* Dimension sizes */
- hsize_t chunks[2]; /* Chunked dimension sizes */
- int i, j; /* Local index variables */
- int ** buf = NULL; /* Buffer for data to write */
- H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = -1, sid = H5I_INVALID_HID; /* Dataset ID, dataspace ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t dims[2]; /* Dimension sizes */
+ hsize_t chunks[2]; /* Chunked dimension sizes */
+ int i, j; /* Local index variables */
+ struct {
+ int arr[50][100];
+ } * buf; /* Buffer for data to write */
+ H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */
{H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
/* Create and fill array */
- H5TEST_ALLOCATE_2D_ARRAY(buf, int, 50, 100);
+ buf = malloc(sizeof(*buf));
if (NULL == buf)
goto error;
for (i = 0; i < 50; i++)
for (j = 0; j < 100; j++)
- buf[i][j] = i * j;
+ buf->arr[i][j] = i * j;
/* Create a copy of file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -108,7 +110,7 @@ gen_cache_image_file(const char *fname)
goto error;
/* Write to the dataset */
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
@@ -426,7 +428,7 @@ main(void)
if ((my_fapl = H5Pcopy(fapl2)) < 0)
goto error;
/* Create the file */
- HDsprintf(fname, "%s%s", new_format ? "latest_" : "", FILENAME[0]);
+ HDsnprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[0]);
if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT,
my_fapl)) < 0)
goto error;
@@ -451,7 +453,7 @@ main(void)
goto error;
/* Create the file */
- HDsprintf(fname, "%s%s", new_format ? "latest_" : "", FILENAME[1]);
+ HDsnprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[1]);
if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT,
my_fapl)) < 0)
goto error;
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index 332e49c..248fd92 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -255,9 +255,9 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
buf_vlen_s = (char **)calloc(dim0, sizeof(char *));
buf_str = malloc(dim0 * sizeof(*buf_str));
- /* allocate array of doulbe pointers */
+ /* allocate array of double pointers */
buf_double2d = (double **)calloc(dims2d[0], sizeof(double *));
- /* allocate a contigous chunk of memory for the data */
+ /* allocate a contiguous chunk of memory for the data */
buf_double2d[0] = (double *)calloc(dims2d[0] * dims2d[1], sizeof(double));
/* assign memory city to pointer array */
for (i = 1; i < dims2d[0]; i++)
@@ -396,7 +396,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 6 add compound data */
- HDsprintf(name, "%05d compund data", j);
+ HDsprintf(name, "%05d compound data", j);
did = H5Dcreate(gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
if (!j)
diff --git a/tools/test/misc/testfiles/h5mkgrp_help.txt b/tools/test/misc/testfiles/h5mkgrp_help.txt
index 9525230..5d81b34 100644
--- a/tools/test/misc/testfiles/h5mkgrp_help.txt
+++ b/tools/test/misc/testfiles/h5mkgrp_help.txt
@@ -11,4 +11,10 @@ usage: h5mkgrp [OPTIONS] FILE GROUP...
HDF5 file specified
--vol-info VOL-specific info to pass to the VOL connector used for
opening the HDF5 file specified
+ --vfd-value Value (ID) of the VFL driver to use for opening the
+ HDF5 file specified
+ --vfd-name Name of the VFL driver to use for opening the
+ HDF5 file specified
+ --vfd-info VFD-specific info to pass to the VFL driver used for
+ opening the HDF5 file specified
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index b515961..832447e 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -39,7 +39,7 @@
#define RDCC_NSLOTS 5
#define RDCC_NBYTES (1024 * 1024 * 10)
-#define RDCC_W0 0.75F
+#define RDCC_W0 0.75
#define FILTER_COUNTER 306
static size_t nbytes_global;
@@ -81,7 +81,7 @@ counter(unsigned H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
static void
cleanup(void)
{
- if (!getenv("HDF5_NOCLEANUP")) {
+ if (!getenv(HDF5_NOCLEANUP)) {
remove(FILENAME);
}
}
@@ -98,7 +98,9 @@ create_dset1(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2};
- int ** data = NULL; /* data for writing */
+ struct {
+ int arr[DSET1_DIM1][DSET1_DIM2];
+ } *data = malloc(sizeof(*data));
/* Create the data space. */
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -122,9 +124,8 @@ create_dset1(hid_t file)
0)
goto error;
- /* Create & fill array */
- H5TEST_ALLOCATE_2D_ARRAY(data, int, DSET1_DIM1, DSET1_DIM2);
- H5TEST_FILL_2D_ARRAY(data, int, DSET1_DIM1, DSET1_DIM2);
+ /* Fill array */
+ H5TEST_FILL_2D_HEAP_ARRAY(data, int);
/* Write data to dataset */
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
@@ -162,7 +163,9 @@ create_dset2(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2};
- int ** data = NULL; /* data for writing */
+ struct {
+ int arr[DSET2_DIM1][DSET2_DIM2];
+ } *data = malloc(sizeof(*data));
/* Create the data space. */
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -185,9 +188,8 @@ create_dset2(hid_t file)
0)
goto error;
- /* Create & fill array */
- H5TEST_ALLOCATE_2D_ARRAY(data, int, DSET2_DIM1, DSET2_DIM2);
- H5TEST_FILL_2D_ARRAY(data, int, DSET2_DIM1, DSET2_DIM2);
+ /* Fill array */
+ H5TEST_FILL_2D_HEAP_ARRAY(data, int);
/* Write data to dataset */
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c
index 371c4f9..1d7756b 100644
--- a/tools/test/perform/direct_write_perf.c
+++ b/tools/test/perform/direct_write_perf.c
@@ -625,7 +625,7 @@ test_unix_write(void)
TEST_ERROR;
}
else if (op_size == 0) {
- printf(" unable to write sufficent data to file because %s \n", strerror(errno));
+ printf(" unable to write sufficient data to file because %s \n", strerror(errno));
TEST_ERROR;
}
}
@@ -655,7 +655,7 @@ main(void)
hid_t fapl = H5P_DEFAULT;
int i;
- sprintf(filename, "%s.h5", FILENAME[0]);
+ snprintf(filename, sizeof(filename), "%s.h5", FILENAME[0]);
create_file(fapl);
test_direct_write_uncompressed_data(fapl);
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 60ec8d8..c974928 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -119,7 +119,7 @@ usage(const char *prog)
static void
cleanup(void)
{
- if (!getenv("HDF5_NOCLEANUP")) {
+ if (!getenv(HDF5_NOCLEANUP)) {
remove(FILE_NAME_1);
}
}
@@ -187,7 +187,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc
if (!use_rdcc) {
if (H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL) < 0)
goto error;
- if (H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0F) < 0)
+ if (H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0) < 0)
goto error;
}
if ((file = H5Fcreate(FILE_NAME_1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index d8ed9ec..ad76711 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -304,7 +304,7 @@ create_dsets(hid_t file)
* Create a dataset using the default dataset creation properties.
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsprintf(dset_name, "dataset %d", i);
+ HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
goto error;
@@ -366,14 +366,14 @@ create_attrs_1(void)
* Create all(user specifies the number) attributes for each dataset
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsprintf(dset_name, "dataset %d", i);
+ HDsnprintf(dset_name, sizeof(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++) {
- HDsprintf(attr_name, "all attrs for each dset %d", j);
+ HDsnprintf(attr_name, sizeof(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)
@@ -468,7 +468,7 @@ create_attrs_2(void)
* Create all(user specifies the number) attributes for each new dataset
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsprintf(dset_name, "dataset %d", i);
+ HDsnprintf(dset_name, sizeof(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)
@@ -476,7 +476,7 @@ create_attrs_2(void)
perf(&create_t, create_t.start, retrieve_time());
for (j = 0; j < NUM_ATTRS; j++) {
- HDsprintf(attr_name, "all attrs for each dset %d", j);
+ HDsnprintf(attr_name, sizeof(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)
@@ -579,14 +579,14 @@ create_attrs_3(void)
for (i = 0; i < loop_num; i++) {
for (j = 0; j < NUM_DSETS; j++) {
- HDsprintf(dset_name, "dataset %d", j);
+ HDsnprintf(dset_name, sizeof(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++) {
- HDsprintf(attr_name, "some attrs for each dset %d %d", i, k);
+ HDsnprintf(attr_name, sizeof(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)
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index f1fb946..e64a765 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -461,7 +461,8 @@ struct h5_long_options {
*/
};
-extern int H5_get_option(int argc, const char **argv, const char *opt, const struct h5_long_options *l_opt);
+extern int H5_get_option(int argc, const char *const *argv, const char *opt,
+ const struct h5_long_options *l_opt);
extern int nCols; /*max number of columns for outputting */
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 99cca75..57180e5 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -476,7 +476,8 @@ struct h5_long_options {
*/
};
-extern int H5_get_option(int argc, const char **argv, const char *opt, const struct h5_long_options *l_opt);
+extern int H5_get_option(int argc, const char *const *argv, const char *opt,
+ const struct h5_long_options *l_opt);
extern int nCols; /*max number of columns for outputting */
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index d8cd3a1..74b1685 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -103,7 +103,7 @@ error(const char *fmt, ...)
static void
cleanup(void)
{
- if (!HDgetenv("HDF5_NOCLEANUP"))
+ if (!HDgetenv(HDF5_NOCLEANUP))
HDunlink(filename);
HDfree(filename);
}
@@ -267,7 +267,7 @@ usage(void)
HDfprintf(stdout, " data you want [default: 0]");
HDfprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n");
HDfprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n");
- HDfprintf(stdout, " -b S, --min-buffer_size=S Minumum size of buffer [default: 128K]\n");
+ HDfprintf(stdout, " -b S, --min-buffer_size=S Minimum size of buffer [default: 128K]\n");
HDfprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n");
HDfprintf(stdout, " -r, --random-test Use random data to write to the file\n");
HDfprintf(stdout, " [default: no]\n");
@@ -396,7 +396,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
error("out of memory");
}
- compression_time = 0.0F;
+ compression_time = 0.0;
if (random_test)
fill_with_random_data(src, src_len);
@@ -489,7 +489,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
* Modifications:
*/
int
-main(int argc, const char *argv[])
+main(int argc, char *argv[])
{
unsigned long min_buf_size = 128 * ONE_KB, max_buf_size = ONE_MB;
unsigned long file_size = 64 * ONE_MB;
@@ -500,7 +500,7 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) > 0) {
+ while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) > 0) {
switch ((char)opt) {
case '0':
case '1':
@@ -551,7 +551,7 @@ main(int argc, const char *argv[])
}
if (min_buf_size > max_buf_size)
- error("minmum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size);
+ error("minimum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size);
HDfprintf(stdout, "Filesize: %ld\n", file_size);