summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5copy/CMakeTests.cmake2
-rw-r--r--tools/test/h5copy/h5copygentest.c4
-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.c14
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt19
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt19
-rw-r--r--tools/test/h5diff/testh5diff.sh.in8
-rw-r--r--tools/test/h5dump/CMakeTests.cmake4
-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.c767
-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/h5import/h5importtest.c28
-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.cmake8
-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.in23
-rw-r--r--tools/test/h5repack/h5repackgentest.c6
-rw-r--r--tools/test/h5repack/h5repacktst.c945
-rw-r--r--tools/test/h5repack/testfiles/README2
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt20
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl14
-rw-r--r--tools/test/h5stat/testfiles/h5stat_help1.ddl4
-rw-r--r--tools/test/h5stat/testfiles/h5stat_help2.ddl4
-rw-r--r--tools/test/h5stat/testfiles/h5stat_nofile.ddl4
-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.c20
-rw-r--r--tools/test/perform/direct_write_perf.c4
-rw-r--r--tools/test/perform/overhead.c2
-rw-r--r--tools/test/perform/perf_meta.c14
-rw-r--r--tools/test/perform/pio_standalone.c2
-rw-r--r--tools/test/perform/pio_standalone.h3
-rw-r--r--tools/test/perform/sio_standalone.c2
-rw-r--r--tools/test/perform/sio_standalone.h3
-rw-r--r--tools/test/perform/zip_perf.c16
59 files changed, 1302 insertions, 947 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..e415c97 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__);
@@ -923,7 +923,7 @@ out:
/*-------------------------------------------------------------------------
* Function: Test_Extlink_Copy
*
- * Purpose: gerenate external link files
+ * Purpose: generate external link files
*
*------------------------------------------------------------------------*/
static void
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 7f1a346..92ea16a 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -86,7 +86,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 */
@@ -1151,7 +1151,6 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1, 2, dims2, "d2", H5T_NATIVE_DOUBLE, data14);
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
{
/*-------------------------------------------------------------------------
@@ -1163,7 +1162,6 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1, 2, dims2, "ld", H5T_NATIVE_LDOUBLE, data15);
}
-#endif
/*-------------------------------------------------------------------------
* NaNs in H5T_NATIVE_FLOAT
@@ -3615,7 +3613,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);
/*-----------------------------------------------
@@ -3649,7 +3647,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);
/*-----------------------------------------------
@@ -3701,7 +3699,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);
/*-----------------------------------------------
@@ -5567,7 +5565,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 */
@@ -8616,7 +8614,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..b1d607e 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -4,6 +4,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -22,8 +25,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -36,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.
@@ -117,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_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 8a4ce6d..5236964 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -4,6 +4,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -22,8 +25,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -36,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.
@@ -117,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_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index d4c7336..e7bad17 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..410528d 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..ffc191e 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..2ff50e9 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..7db4959 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..db77f88 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..11739be 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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..6af9fe3 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
@@ -37,6 +38,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 +131,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 be0d3bd..093d5b9 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -464,7 +464,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
@@ -527,7 +527,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
@@ -935,7 +935,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
@@ -1098,7 +1098,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 a8984de..933aba9 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -412,7 +412,7 @@
# --------------------------------------------------------------------
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
- if (WIN32)
+ if (WIN32 AND CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.18362.0)
configure_file(${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF)
#file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM)
#file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
@@ -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 6dbb700..fc0b995 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -243,7 +243,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 */
@@ -1135,7 +1135,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));
@@ -1319,7 +1319,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));
@@ -1529,11 +1529,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);
@@ -2475,7 +2475,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];
@@ -2548,7 +2548,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);
/*
@@ -3921,9 +3921,9 @@ gent_multi(void)
static void
gent_large_objname(void)
{
- hid_t fid, group, group2;
- char grp_name[128];
- register int i;
+ hid_t fid, group, group2;
+ char grp_name[128];
+ int i;
fid = H5Fcreate(FILE37, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5225,7 +5225,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);
@@ -5742,7 +5742,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);
}
@@ -6810,7 +6810,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
*-------------------------------------------------------------------------
*/
@@ -6834,7 +6834,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
*-------------------------------------------------------------------------
*/
@@ -6858,7 +6858,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
*-------------------------------------------------------------------------
*/
@@ -6881,7 +6881,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
*-------------------------------------------------------------------------
*/
@@ -6904,7 +6904,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
*-------------------------------------------------------------------------
*/
@@ -6930,7 +6930,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
*-------------------------------------------------------------------------
*/
@@ -7271,15 +7271,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;
@@ -7293,15 +7311,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);
@@ -7313,13 +7331,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);
@@ -7331,13 +7349,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);
@@ -7349,13 +7367,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);
@@ -7367,13 +7385,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);
@@ -7385,13 +7403,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);
@@ -7403,13 +7421,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);
@@ -7421,13 +7439,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);
@@ -7439,13 +7457,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);
@@ -7457,9 +7475,9 @@ gent_packedbits(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * (double)j + (double)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);
@@ -7496,15 +7514,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;
@@ -7518,15 +7554,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);
@@ -7539,14 +7575,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);
@@ -7558,14 +7594,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);
@@ -7577,14 +7613,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);
@@ -7596,14 +7632,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);
@@ -7615,14 +7651,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);
@@ -7634,14 +7670,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);
@@ -7653,14 +7689,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);
@@ -7672,14 +7708,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);
@@ -7691,9 +7727,9 @@ gent_attr_intsize(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * (double)j + (double)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);
@@ -8593,15 +8629,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;
@@ -8615,15 +8669,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);
@@ -8636,14 +8690,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);
@@ -8656,14 +8710,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);
@@ -8676,14 +8730,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);
@@ -8696,14 +8750,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);
@@ -8716,14 +8770,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);
@@ -8736,14 +8790,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);
@@ -8756,14 +8810,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);
@@ -8776,14 +8830,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);
@@ -8796,9 +8850,9 @@ gent_intscalars(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * (double)j + (double)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);
@@ -8836,15 +8890,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;
@@ -8858,15 +8930,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);
@@ -8880,14 +8952,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);
@@ -8900,14 +8972,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);
@@ -8920,14 +8992,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);
@@ -8940,14 +9012,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);
@@ -8960,14 +9032,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);
@@ -8980,14 +9052,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);
@@ -9000,14 +9072,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);
@@ -9020,14 +9092,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);
@@ -9040,9 +9112,9 @@ gent_attr_intscalars(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * (double)j + (double)i;
+ dsetdbl->arr[i][j] = 0.0001 * (double)j + (double)i;
- H5Awrite(attr, tid, dsetdbl[0]);
+ H5Awrite(attr, tid, dsetdbl);
H5Sclose(space);
H5Aclose(attr);
@@ -9625,15 +9697,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;
@@ -9647,15 +9737,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);
@@ -9668,9 +9758,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);
}
@@ -9678,7 +9768,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);
@@ -9692,9 +9782,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);
}
@@ -9702,7 +9792,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);
@@ -9716,9 +9806,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;
}
@@ -9726,7 +9816,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);
@@ -9740,9 +9830,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;
}
@@ -9750,7 +9840,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);
@@ -9764,9 +9854,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);
}
@@ -9774,7 +9864,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);
@@ -9788,9 +9878,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);
}
@@ -9798,7 +9888,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);
@@ -9812,9 +9902,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;
}
@@ -9822,7 +9912,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);
@@ -9836,9 +9926,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;
}
@@ -9846,7 +9936,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);
@@ -9860,12 +9950,12 @@ gent_intattrscalars(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * (double)j + (double)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);
@@ -9903,15 +9993,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;
@@ -9935,15 +10043,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));
@@ -9965,16 +10073,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);
@@ -9993,16 +10101,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);
@@ -10021,16 +10129,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);
@@ -10049,16 +10157,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);
@@ -10077,16 +10185,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);
@@ -10105,16 +10213,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);
@@ -10133,16 +10241,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);
@@ -10161,16 +10269,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);
@@ -10189,11 +10297,11 @@ gent_intsattrs(void)
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++) {
- dsetdbl[i][j] = 0.0001 * (double)j + (double)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);
@@ -10245,9 +10353,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;
@@ -10260,9 +10374,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));
@@ -10284,16 +10398,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);
@@ -10312,16 +10426,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);
@@ -10340,16 +10454,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);
@@ -10541,13 +10655,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;
@@ -10560,7 +10678,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);
@@ -10568,6 +10686,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 effe393..7389951 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -1180,7 +1180,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/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index e49125b..7dbf762 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -46,11 +46,9 @@ main(void)
int rowo4i = 11, colo4i = 21, plno4i = 51;
int rowi4i = 1, coli4i = 2, plni4i = 5;
-#ifdef H5_SIZEOF_LONG_LONG
long long row4i64[3], col4i64[4], pln4i64[5];
long long rowo4i64 = (long long)11, colo4i64 = (long long)21, plno4i64 = (long long)51;
long long rowi4i64 = (long long)1, coli4i64 = (long long)2, plni4i64 = (long long)5;
-#endif
short b16i3[5][3][4];
short row4i16[3], col4i16[4], pln4i16[5];
@@ -101,11 +99,9 @@ main(void)
col4i[0] = colo4i;
pln4i[0] = plno4i;
-#ifdef H5_SIZEOF_LONG_LONG
row4i64[0] = rowo4i64;
col4i64[0] = colo4i64;
pln4i64[0] = plno4i64;
-#endif
row4i16[0] = rowo4i16;
col4i16[0] = colo4i16;
@@ -116,33 +112,27 @@ main(void)
pln4i8[0] = plno4i8;
for (i = 1; i < nrow; i++) {
- row4[i] = row4[i - 1] + rowi4;
- row8[i] = row8[i - 1] + rowi8;
- row4i[i] = row4i[i - 1] + rowi4i;
-#ifdef H5_SIZEOF_LONG_LONG
+ row4[i] = row4[i - 1] + rowi4;
+ row8[i] = row8[i - 1] + rowi8;
+ row4i[i] = row4i[i - 1] + rowi4i;
row4i64[i] = row4i64[i - 1] + rowi4i64;
-#endif
row4i16[i] = (short)(row4i16[i - 1] + rowi4i16);
row4i8[i] = (char)(row4i8[i - 1] + rowi4i8);
}
for (j = 1; j < ncol; j++) {
- col4[j] = col4[j - 1] + coli4;
- col8[j] = col8[j - 1] + coli8;
- col4i[j] = col4i[j - 1] + coli4i;
-#ifdef H5_SIZEOF_LONG_LONG
+ col4[j] = col4[j - 1] + coli4;
+ col8[j] = col8[j - 1] + coli8;
+ col4i[j] = col4i[j - 1] + coli4i;
col4i64[j] = col4i64[j - 1] + coli4i64;
-#endif
col4i16[j] = (short)(col4i16[j - 1] + coli4i16);
col4i8[j] = (char)(col4i8[j - 1] + coli4i8);
}
for (k = 1; k < npln; k++) {
- pln4[k] = pln4[k - 1] + plni4;
- pln8[k] = pln8[k - 1] + plni8;
- pln4i[k] = pln4i[k - 1] + plni4i;
-#ifdef H5_SIZEOF_LONG_LONG
+ pln4[k] = pln4[k - 1] + plni4;
+ pln8[k] = pln8[k - 1] + plni8;
+ pln4i[k] = pln4i[k - 1] + plni4i;
pln4i64[k] = pln4i64[k - 1] + plni4i64;
-#endif
pln4i16[k] = (short)(pln4i16[k - 1] + plni4i16);
pln4i8[k] = (char)(pln4i8[k - 1] + plni4i8);
}
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 037287d..09648ff 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -1541,10 +1541,10 @@
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 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, )
@@ -1552,12 +1552,12 @@
ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5)
# test CVE-2018-17432 fix
- set (arg h5repack_CVE-2018-17432.h5 h5repack__CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
+ set (arg h5repack_CVE-2018-17432.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
set (TESTTYPE "TEST")
ADD_H5_FILTER_TEST (HDFFV-10590 "" ${TESTTYPE} 1 ${arg})
# test CVE-2018-14460 fix
- set (arg h5repack_CVE-2018-14460.h5 h5repack_CVE-2018-14460_out.h5)
+ set (arg h5repack_CVE-2018-14460.h5)
set (TESTTYPE "TEST")
ADD_H5_FILTER_TEST (HDFFV-11223 "" ${TESTTYPE} 1 ${arg})
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 3756a95..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
@@ -885,13 +885,24 @@ TOOLTEST_FAIL()
(
cd $TESTDIR
$ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
- ) >$actual
+ ) >&$actual
RET=$?
- if [ $RET == 0 ] ; then
+
+ # Normally h5repack of files tested with this function are expected
+ # to return not 0, but if the command results in "Segmentation fault"
+ # or "core dumped" it is a failure regardless of the return value.
+ failure=`grep -e 'Segmentation fault' -e 'core dumped' $actual`
+ if [ "$failure" != "" ]; then
nerrors="`expr $nerrors + 1`"
echo " FAILED"
+ echo " $failure"
else
- echo " PASSED"
+ if [ $RET == 0 ] ; then
+ nerrors="`expr $nerrors + 1`"
+ echo " FAILED"
+ else
+ echo " PASSED"
+ fi
fi
rm -f $outfile
}
@@ -1702,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..8b114e4 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -272,98 +272,100 @@ main(void)
GOERROR;
PASSED();
- TESTING(" files with file space info setting-- options -S and -P are set & -L");
- ++j; /* #3 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
- GOERROR;
- pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */
- pack_options.fs_persist = TRUE;
- if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ if (h5_using_default_driver(NULL)) {
+ TESTING(" files with file space info setting-- options -S and -P are set & -L");
+ ++j; /* #3 */
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ fname = H5REPACK_FSPACE_FNAMES[j];
+ if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ GOERROR;
+ pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */
+ pack_options.fs_persist = TRUE;
+ if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
- TESTING(" files with file space info setting-- options -P and -T are set & -L");
- ++j; /* #4 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
- GOERROR;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
- pack_options.fs_threshold = 2;
- if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ TESTING(" files with file space info setting-- options -P and -T are set & -L");
+ ++j; /* #4 */
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ fname = H5REPACK_FSPACE_FNAMES[j];
+ if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ GOERROR;
+ pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_threshold = 2;
+ if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
- TESTING(" files with file space info setting-- options -S and -G are set & -L");
- ++j; /* #5 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
- GOERROR;
- pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE;
- pack_options.fs_pagesize = 8192;
- if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ TESTING(" files with file space info setting-- options -S and -G are set & -L");
+ ++j; /* #5 */
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ fname = H5REPACK_FSPACE_FNAMES[j];
+ if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ GOERROR;
+ pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE;
+ pack_options.fs_pagesize = 8192;
+ if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
- TESTING(" files with file space info setting-- options -S, -P, -T, -G are set");
- ++j; /* #6 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
- pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
- pack_options.fs_threshold = 1;
- pack_options.fs_pagesize = 8192;
- if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ TESTING(" files with file space info setting-- options -S, -P, -T, -G are set");
+ ++j; /* #6 */
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ fname = H5REPACK_FSPACE_FNAMES[j];
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
+ pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
+ pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_threshold = 1;
+ pack_options.fs_pagesize = 8192;
+ if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
- TESTING(" files with file space info setting-- options -S, -T, -G are set & -L");
- ++j; /* #7 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
- GOERROR;
- pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
- pack_options.fs_threshold = 1;
- pack_options.fs_pagesize = 4096;
- if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ TESTING(" files with file space info setting-- options -S, -T, -G are set & -L");
+ ++j; /* #7 */
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ fname = H5REPACK_FSPACE_FNAMES[j];
+ if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ GOERROR;
+ pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
+ pack_options.fs_threshold = 1;
+ pack_options.fs_pagesize = 4096;
+ if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
+ }
/*-------------------------------------------------------------------------
* file with fill values
@@ -389,20 +391,22 @@ main(void)
* file with all kinds of dataset datatypes
*-------------------------------------------------------------------------
*/
- TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
- if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ if (!h5_using_parallel_driver(NULL)) {
+ TESTING(" copy of datasets (all datatypes)");
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
+ if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
+ }
/*-------------------------------------------------------------------------
* file with attributes
@@ -624,7 +628,7 @@ main(void)
SKIPPED();
#endif
- TESTING(" addding shuffle filter");
+ TESTING(" adding shuffle filter");
/*-------------------------------------------------------------------------
* test an individual object option
@@ -653,7 +657,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- TESTING(" addding shuffle filter to all");
+ TESTING(" adding shuffle filter to all");
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -1487,49 +1491,53 @@ main(void)
GOERROR;
PASSED();
- /*-------------------------------------------------------------------------
- * test file with userblock
- *-------------------------------------------------------------------------
- */
- TESTING(" file with userblock");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
- if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0)
- GOERROR;
- if (verify_userblock(FNAME16OUT) < 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ if (h5_using_default_driver(NULL)) {
+ /*-------------------------------------------------------------------------
+ * test file with userblock
+ *-------------------------------------------------------------------------
+ */
+ TESTING(" file with userblock");
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
+ if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0)
+ GOERROR;
+ if (verify_userblock(FNAME16OUT) < 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
+ }
/*-------------------------------------------------------------------------
* test --latest options
*-------------------------------------------------------------------------
*/
- TESTING(" latest file format options");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
- pack_options.latest = 1;
- pack_options.grp_compact = 10;
- pack_options.grp_indexed = 5;
- pack_options.msg_size[0] = 10;
- pack_options.msg_size[1] = 20;
- pack_options.msg_size[2] = 30;
- pack_options.msg_size[3] = 40;
- pack_options.msg_size[4] = 50;
- if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ if (!h5_using_parallel_driver(NULL)) {
+ TESTING(" latest file format options");
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
+ pack_options.latest = 1;
+ pack_options.grp_compact = 10;
+ pack_options.grp_indexed = 5;
+ pack_options.msg_size[0] = 10;
+ pack_options.msg_size[1] = 20;
+ pack_options.msg_size[2] = 30;
+ pack_options.msg_size[3] = 40;
+ pack_options.msg_size[4] = 50;
+ if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
+ }
/*-------------------------------------------------------------------------
* test several global filters
@@ -1560,49 +1568,51 @@ main(void)
SKIPPED();
#endif
- /*-------------------------------------------------------------------------
- * test file with userblock
- *-------------------------------------------------------------------------
- */
- TESTING(" file with added userblock");
+ if (h5_using_default_driver(NULL)) {
+ /*-------------------------------------------------------------------------
+ * test file with userblock
+ *-------------------------------------------------------------------------
+ */
+ TESTING(" file with added userblock");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
- /* add the options for a user block size and user block filename */
- pack_options.ublock_size = USERBLOCK_SIZE;
- pack_options.ublock_filename = FNAME_UB;
+ /* add the options for a user block size and user block filename */
+ pack_options.ublock_size = USERBLOCK_SIZE;
+ pack_options.ublock_filename = FNAME_UB;
- if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
- GOERROR;
- if (verify_userblock(FNAME8OUT) < 0)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
+ if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
+ GOERROR;
+ if (verify_userblock(FNAME8OUT) < 0)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
- PASSED();
+ PASSED();
#else
- SKIPPED();
+ SKIPPED();
#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 +1623,7 @@ main(void)
if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
- /* verify aligment */
+ /* verify alignment */
{
hsize_t threshold;
hsize_t alignment;
@@ -1664,48 +1674,50 @@ main(void)
PASSED();
- /*-------------------------------------------------------------------------
- * test --metadata_block_size option
- * Also verify that output file using the metadata_block_size option is
- * larger than the output file one not using it.
- * FNAME4 is used because it is the same as the test file used for the
- * shell script version of this test (h5repack.sh).
- *-------------------------------------------------------------------------
- */
- TESTING(" metadata block size option");
- /* First run without metadata option. No need to verify the correctness */
- /* since this has been verified by earlier tests. Just record the file */
- /* size of the output file. */
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
- if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
- GOERROR;
- if (HDstat(FNAME4OUT, &file_stat) < 0)
- GOERROR;
- fsize1 = file_stat.st_size;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
+ if (h5_using_default_driver(NULL)) {
+ /*-------------------------------------------------------------------------
+ * test --metadata_block_size option
+ * Also verify that output file using the metadata_block_size option is
+ * larger than the output file one not using it.
+ * FNAME4 is used because it is the same as the test file used for the
+ * shell script version of this test (h5repack.sh).
+ *-------------------------------------------------------------------------
+ */
+ TESTING(" metadata block size option");
+ /* First run without metadata option. No need to verify the correctness */
+ /* since this has been verified by earlier tests. Just record the file */
+ /* size of the output file. */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
+ GOERROR;
+ if (HDstat(FNAME4OUT, &file_stat) < 0)
+ GOERROR;
+ fsize1 = file_stat.st_size;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
- /* run it again with metadata option */
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
- GOERROR;
- pack_options.meta_block_size = 8192;
- if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
- GOERROR;
- if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
- GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
- GOERROR;
- /* record the file size of the output file */
- if (HDstat(FNAME4OUT, &file_stat) < 0)
- GOERROR;
- fsize2 = file_stat.st_size;
- /* verify second file size is larger than the first one */
- if (fsize2 <= fsize1)
- GOERROR;
- if (h5repack_end(&pack_options) < 0)
- GOERROR;
- PASSED();
+ /* run it again with metadata option */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ GOERROR;
+ pack_options.meta_block_size = 8192;
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
+ GOERROR;
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
+ GOERROR;
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
+ GOERROR;
+ /* record the file size of the output file */
+ if (HDstat(FNAME4OUT, &file_stat) < 0)
+ GOERROR;
+ fsize2 = file_stat.st_size;
+ /* verify second file size is larger than the first one */
+ if (fsize2 <= fsize1)
+ GOERROR;
+ if (h5repack_end(&pack_options) < 0)
+ GOERROR;
+ PASSED();
+ }
/*-------------------------------------------------------------------------
* clean temporary test files
@@ -1725,7 +1737,10 @@ main(void)
return 0;
error:
+ h5tools_close();
+
puts("***** H5REPACK TESTS FAILED *****");
+
return 1;
}
@@ -1760,12 +1775,14 @@ make_testfiles(void)
* create another file for general copy test (all datatypes)
*-------------------------------------------------------------------------
*/
- if ((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- return -1;
- if (make_all_objects(fid) < 0)
- goto out;
- if (H5Fclose(fid) < 0)
- return -1;
+ if (!h5_using_parallel_driver(NULL)) {
+ if ((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+ if (make_all_objects(fid) < 0)
+ goto out;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ }
/*-------------------------------------------------------------------------
* create a file for attributes copy test
@@ -1934,19 +1951,21 @@ make_testfiles(void)
if (H5Fclose(fid) < 0)
return -1;
- /*-------------------------------------------------------------------------
- * create a file with userblock
- *-------------------------------------------------------------------------
- */
- if (make_userblock() < 0)
- goto out;
+ if (h5_using_default_driver(NULL)) {
+ /*-------------------------------------------------------------------------
+ * create a file with userblock
+ *-------------------------------------------------------------------------
+ */
+ if (make_userblock() < 0)
+ goto out;
- /*-------------------------------------------------------------------------
- * create a userblock file
- *-------------------------------------------------------------------------
- */
- if (make_userblock_file() < 0)
- goto out;
+ /*-------------------------------------------------------------------------
+ * create a userblock file
+ *-------------------------------------------------------------------------
+ */
+ if (make_userblock_file() < 0)
+ goto out;
+ }
/*-------------------------------------------------------------------------
* create a file with named datatypes
@@ -1959,30 +1978,32 @@ make_testfiles(void)
if (H5Fclose(fid) < 0)
return -1;
- /*-------------------------------------------------------------------------
- * create obj and region reference type datasets (bug1814)
- * add attribute with int type (bug1726)
- * add attribute with obj and region reference type (bug1726)
- *-------------------------------------------------------------------------
- */
- if ((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- return -1;
- /* create reference type datasets */
- if (make_references(fid) < 0)
- goto out;
- if (H5Fclose(fid) < 0)
- return -1;
+ if (!h5_using_parallel_driver(NULL)) {
+ /*-------------------------------------------------------------------------
+ * create obj and region reference type datasets (bug1814)
+ * add attribute with int type (bug1726)
+ * add attribute with obj and region reference type (bug1726)
+ *-------------------------------------------------------------------------
+ */
+ if ((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+ /* create reference type datasets */
+ if (make_references(fid) < 0)
+ goto out;
+ if (H5Fclose(fid) < 0)
+ return -1;
- /*-------------------------------------------------------------------------
- * create a file with obj and region references in attribute of compound and
- * vlen datatype
- *-------------------------------------------------------------------------*/
- if ((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- return -1;
- if (make_complex_attr_references(fid) < 0)
- goto out;
- if (H5Fclose(fid) < 0)
- return -1;
+ /*-------------------------------------------------------------------------
+ * create a file with obj and region references in attribute of compound and
+ * vlen datatype
+ *-------------------------------------------------------------------------*/
+ if ((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+ if (make_complex_attr_references(fid) < 0)
+ goto out;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ }
/*-------------------------------------------------------------------------
* create 8 files with combinations ???
@@ -2018,111 +2039,113 @@ make_testfiles(void)
if (H5Fclose(fid) < 0)
return -1;
- /*
- * #2 -- h5repack_page_persist.h5
- * Setting:
- * strategy=PAGE, persist=TRUE, threshold=1
- * inpage=512
- * latest format
- */
- /* Create file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- return -1;
- if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0)
- return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
- return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- return -1;
- if (H5Fclose(fid) < 0)
- return -1;
- if (H5Pclose(fcpl) < 0)
- return -1;
-
- /*
- * #3 -- h5repack_fsm_aggr_persist.h5
- * Setting:
- * strategy=FSM_AGGR, persist=TRUE, threshold=1
- * default: inpage=4096
- */
- /* Create file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
- return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
- return -1;
- if (H5Fclose(fid) < 0)
- return -1;
- if (H5Pclose(fcpl) < 0)
- return -1;
-
- /*
- * #4 -- h5repack_page_threshold.h5
- * Setting:
- * strategy=PAGE, persist=FALSE, threshold=3
- * inpage=8192
- * latest format
- */
-
- /* Create file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0)
- return -1;
- if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
- return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- return -1;
- if (H5Fclose(fid) < 0)
- return -1;
- if (H5Pclose(fcpl) < 0)
- return -1;
-
- /*
- * #5 -- h5repack_fsm_aggr_threshold.h5
- * Setting:
- * strategy=FSM_AGGR, persist=FALSE, threshold=3
- * inpage=4096
- */
+ if (h5_using_default_driver(NULL)) {
+ /*
+ * #2 -- h5repack_page_persist.h5
+ * Setting:
+ * strategy=PAGE, persist=TRUE, threshold=1
+ * inpage=512
+ * latest format
+ */
+ /* Create file creation property list */
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ return -1;
+ if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0)
+ return -1;
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ return -1;
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ return -1;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ if (H5Pclose(fcpl) < 0)
+ return -1;
+
+ /*
+ * #3 -- h5repack_fsm_aggr_persist.h5
+ * Setting:
+ * strategy=FSM_AGGR, persist=TRUE, threshold=1
+ * default: inpage=4096
+ */
+ /* Create file creation property list */
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ return -1;
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ return -1;
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
+ return -1;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ if (H5Pclose(fcpl) < 0)
+ return -1;
+
+ /*
+ * #4 -- h5repack_page_threshold.h5
+ * Setting:
+ * strategy=PAGE, persist=FALSE, threshold=3
+ * inpage=8192
+ * latest format
+ */
- /* Create file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0)
- return -1;
- if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0)
- return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
- return -1;
- if (H5Fclose(fid) < 0)
- return -1;
- if (H5Pclose(fcpl) < 0)
- return -1;
+ /* Create file creation property list */
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ return -1;
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0)
+ return -1;
+ if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
+ return -1;
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ return -1;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ if (H5Pclose(fcpl) < 0)
+ return -1;
+
+ /*
+ * #5 -- h5repack_fsm_aggr_threshold.h5
+ * Setting:
+ * strategy=FSM_AGGR, persist=FALSE, threshold=3
+ * inpage=4096
+ */
- /*
- * #6 -- h5repack_aggr.h5
- * Setting:
- * strategy=AGGR, persist=FALSE, threshold=1
- * latest format
- */
+ /* Create file creation property list */
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ return -1;
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0)
+ return -1;
+ if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0)
+ return -1;
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
+ return -1;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ if (H5Pclose(fcpl) < 0)
+ return -1;
+
+ /*
+ * #6 -- h5repack_aggr.h5
+ * Setting:
+ * strategy=AGGR, persist=FALSE, threshold=1
+ * latest format
+ */
- /* Create file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
- return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- return -1;
- if (H5Fclose(fid) < 0)
- return -1;
- if (H5Pclose(fcpl) < 0)
- return -1;
+ /* Create file creation property list */
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ return -1;
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ return -1;
+ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ return -1;
+ if (H5Fclose(fid) < 0)
+ return -1;
+ if (H5Pclose(fcpl) < 0)
+ return -1;
+ }
/*
* #7 -- h5repack_none.h5
@@ -2432,14 +2455,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 +2487,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 +2530,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 +2559,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 +2610,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 +2637,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 +2680,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 +2710,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 +2753,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 +2775,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 +2796,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 +2804,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 +2812,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 +2829,7 @@ error:
H5E_BEGIN_TRY
{
H5Tclose(dtid);
+ H5Pclose(dxpl);
H5Pclose(dcpl);
H5Sclose(sid);
H5Dclose(dsid);
@@ -2813,15 +2855,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 +2877,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 +2896,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 +2924,7 @@ make_scaleoffset(hid_t loc_id)
error:
H5E_BEGIN_TRY
{
+ H5Pclose(dxpl);
H5Dclose(dsid);
H5Tclose(dtid);
H5Pclose(dcpl);
@@ -2894,22 +2951,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 +2980,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 +3018,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 +3027,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 +3039,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 +3053,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 +3063,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 +3079,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 +3090,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 +3104,7 @@ error:
{
H5Tclose(dtid);
H5Dclose(dsid);
+ H5Pclose(dxpl);
H5Pclose(dcpl);
H5Sclose(sid);
}
@@ -3152,15 +3224,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 +3241,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 +3262,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 +3271,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 +3280,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 +3337,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 +3354,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 +3362,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 +3416,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 +3448,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 +3469,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 +3486,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 +5877,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 +5924,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 +5958,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 +6347,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 +6387,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..bff70af 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -1,13 +1,15 @@
usage: h5repack [OPTIONS] file1 file2
file1 Input HDF5 File
file2 Output HDF5 File
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
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
- occur
--src-vol-value Value (ID) of the VOL connector to use for opening the
input HDF5 file specified
--src-vol-name Name of the VOL connector to use for opening the input
@@ -20,6 +22,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 eeb0f2d..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 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -33,7 +33,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -55,7 +55,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -77,7 +77,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -99,7 +99,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -121,7 +121,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
@@ -143,7 +143,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 2 }
}
}
FILLVALUE {
diff --git a/tools/test/h5stat/testfiles/h5stat_help1.ddl b/tools/test/h5stat/testfiles/h5stat_help1.ddl
index 2ba7772..1f65f0d 100644
--- a/tools/test/h5stat/testfiles/h5stat_help1.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_help1.ddl
@@ -1,5 +1,8 @@
Usage: h5stat [OPTIONS] file
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ Optional value 2 also prints file open errors
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
@@ -22,7 +25,6 @@ Usage: h5stat [OPTIONS] file
than 0. The default threshold is 10.
-s, --freespace Print free space information
-S, --summary Print summary of file space information
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
--s3-cred=<cred> Access file on S3, using provided credential
<cred> :: (region,id,key)
If <cred> == "(,,)", no authentication is used.
diff --git a/tools/test/h5stat/testfiles/h5stat_help2.ddl b/tools/test/h5stat/testfiles/h5stat_help2.ddl
index 2ba7772..1f65f0d 100644
--- a/tools/test/h5stat/testfiles/h5stat_help2.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_help2.ddl
@@ -1,5 +1,8 @@
Usage: h5stat [OPTIONS] file
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ Optional value 2 also prints file open errors
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
@@ -22,7 +25,6 @@ Usage: h5stat [OPTIONS] file
than 0. The default threshold is 10.
-s, --freespace Print free space information
-S, --summary Print summary of file space information
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
--s3-cred=<cred> Access file on S3, using provided credential
<cred> :: (region,id,key)
If <cred> == "(,,)", no authentication is used.
diff --git a/tools/test/h5stat/testfiles/h5stat_nofile.ddl b/tools/test/h5stat/testfiles/h5stat_nofile.ddl
index 2ba7772..1f65f0d 100644
--- a/tools/test/h5stat/testfiles/h5stat_nofile.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_nofile.ddl
@@ -1,5 +1,8 @@
Usage: h5stat [OPTIONS] file
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ Optional value 2 also prints file open errors
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
@@ -22,7 +25,6 @@ Usage: h5stat [OPTIONS] file
than 0. The default threshold is 10.
-s, --freespace Print free space information
-S, --summary Print summary of file space information
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
--s3-cred=<cred> Access file on S3, using provided credential
<cred> :: (region,id,key)
If <cred> == "(,,)", no authentication is used.
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 ad9bf09..832447e 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -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 64192ba..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);
}
}
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.c b/tools/test/perform/pio_standalone.c
index 032bfba..a074d2c 100644
--- a/tools/test/perform/pio_standalone.c
+++ b/tools/test/perform/pio_standalone.c
@@ -92,7 +92,7 @@ get_option(int argc, const char **argv, const char *opts, const struct h5_long_o
sp = 1;
}
else {
- register char *cp; /* pointer into current token */
+ char *cp; /* pointer into current token */
/* short command line option */
opt_opt = argv[H5_optind][sp];
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.c b/tools/test/perform/sio_standalone.c
index 7c22b53..353dad3 100644
--- a/tools/test/perform/sio_standalone.c
+++ b/tools/test/perform/sio_standalone.c
@@ -92,7 +92,7 @@ get_option(int argc, const char **argv, const char *opts, const struct h5_long_o
sp = 1;
}
else {
- register char *cp; /* pointer into current token */
+ char *cp; /* pointer into current token */
/* short command line option */
opt_opt = argv[H5_optind][sp];
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 123fb98..87a7122 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");
@@ -336,8 +336,8 @@ parse_size_directive(const char *size)
static void
fill_with_random_data(Bytef *src, uLongf src_len)
{
- register unsigned u;
- h5_stat_t stat_buf;
+ unsigned u;
+ h5_stat_t stat_buf;
if (HDstat("/dev/urandom", &stat_buf) == 0) {
uLongf len = src_len;
@@ -386,7 +386,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
Bytef * src;
for (src_len = min_buf_size; src_len <= max_buf_size; src_len <<= 1) {
- register unsigned long i, iters;
+ unsigned long i, iters;
iters = file_size / src_len;
src = (Bytef *)HDcalloc(1, sizeof(Bytef) * 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);