summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-12-22 19:38:51 (GMT)
committerGitHub <noreply@github.com>2022-12-22 19:38:51 (GMT)
commit9a694db450d3d62d63910887bd8485ae76124807 (patch)
tree6290a5f388c81ead90fcca26fe57756bac0f11e7 /examples
parentab0a7785937477cb99037b17261ce446e35b5bdb (diff)
downloadhdf5-9a694db450d3d62d63910887bd8485ae76124807.zip
hdf5-9a694db450d3d62d63910887bd8485ae76124807.tar.gz
hdf5-9a694db450d3d62d63910887bd8485ae76124807.tar.bz2
Update testh5cc.sh.in for new major version 1.14. (#2349)
* Update testh5cc.sh.in for new major version 1.14. * iFix sha256sum commands in release script.
Diffstat (limited to 'examples')
-rw-r--r--examples/testh5cc.sh.in52
1 files changed, 51 insertions, 1 deletions
diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in
index ff8f83f..3eb8949 100644
--- a/examples/testh5cc.sh.in
+++ b/examples/testh5cc.sh.in
@@ -69,6 +69,8 @@ v110main=${H5TOOL}_v110main.$suffix
v110main_o=${H5TOOL}_v110main.o
v112main=${H5TOOL}_v112main.$suffix
v112main_o=${H5TOOL}_v112main.o
+v114main=${H5TOOL}_v114main.$suffix
+v114main_o=${H5TOOL}_v114main.o
appmain=${H5TOOL}_appmain.$suffix
appmain_o=${H5TOOL}_appmain.o
prog1=${H5TOOL}_prog1.$suffix
@@ -82,7 +84,7 @@ applib=libapp${H5TOOL}.a
# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated
# by other test programs. This will cause a racing condition error when
# parallel make (e.g., gmake -j 4) is used.
-temp_SRC="$hdf5main $v16main $v18main $v110main $v112main $appmain $prog1 $prog2"
+temp_SRC="$hdf5main $v16main $v18main $v110main $v112main $v114main $appmain $prog1 $prog2"
temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"`
temp_FILES="a.out $applib"
@@ -286,6 +288,53 @@ main (void)
}
EOF
+# Generate HDF5 v1.14 Main Program:
+# This makes unique V1.14 API calls.
+cat > $v114main <<EOF
+/* This is a V1.14 API calls example Program. */
+#include "hdf5.h"
+#define H5FILE_NAME "tmp.h5"
+#define SPACE1_RANK 3
+int
+main (void)
+{
+ hid_t sid; /* Dataspace ID */
+ hid_t fapl = -1; /* File access property list ID */
+ int rank; /* Logical rank of dataspace */
+ hsize_t dims[] = {3, 3, 15};
+ size_t sbuf_size=0;
+ herr_t ret; /* Generic return value */
+ hsize_t start[] = {0, 0, 0};
+ hsize_t stride[] = {2, 5, 3};
+ hsize_t count[] = {2, 2, 2};
+ hsize_t block[] = {1, 3, 1};
+
+ /* Create the file access property list */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+
+ /* Set low/high bounds in the fapl */
+ ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST,
+ H5F_LIBVER_LATEST);
+
+ /* Create the dataspace */
+ sid = H5Screate_simple(SPACE1_RANK, dims, NULL);
+
+ /* Set the hyperslab selection */
+ ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
+
+ /* Encode simple dataspace in a buffer with the fapl setting */
+ ret = H5Sencode(sid, NULL, &sbuf_size, fapl);
+
+ /* Encode simple dataspace in a buffer with the fapl setting */
+ ret = H5Sencode2(sid, NULL, &sbuf_size, fapl);
+
+ printf("HDF5 C program created with V1.14 API ran successfully. ");
+/* "File %s generated.\n", H5FILE_NAME);
+ remove(H5FILE_NAME); */
+ return 0;
+}
+EOF
+
# Parse option
# None
@@ -432,6 +481,7 @@ if [ -n "$H5_NO_DEPRECATED_SYMBOLS" ]; then
TOOLTEST $v18main
TOOLTEST $v110main
TOOLTEST $v112main
+ TOOLTEST $v114main
elif [ -n "$H5_USE_16_API_DEFAULT" ]; then
echo "Testing HDF5 with 16_API_DEFAULT"
TOOLTEST $v16main