diff --git a/C/CMakeLists.txt b/C/CMakeLists.txt index e9a1986f..4cc0b3a5 100644 --- a/C/CMakeLists.txt +++ b/C/CMakeLists.txt @@ -11,10 +11,10 @@ add_subdirectory (${PROJECT_SOURCE_DIR}/H5T) if (${H5_LIBVER_DIR} GREATER 16) # add_subdirectory (${PROJECT_SOURCE_DIR}/Perf) if (USE_SHARED_LIBS AND HDF_BUILD_FILTERS AND HDF5_ENABLE_PLUGIN_SUPPORT) - add_subdirectory (${PROJECT_SOURCE_DIR}/H5F) + add_subdirectory (${PROJECT_SOURCE_DIR}/H5FLT) endif () endif () if (H5_HAVE_PARALLEL AND HDF5_ENABLE_PARALLEL) - add_subdirectory (${PROJECT_SOURCE_DIR}/H5P) + add_subdirectory (${PROJECT_SOURCE_DIR}/H5PAR) endif () diff --git a/C/H5D/test.sh.in b/C/H5D/test.sh.in index 8085a95d..f6e84273 100755 --- a/C/H5D/test.sh.in +++ b/C/H5D/test.sh.in @@ -58,10 +58,10 @@ topics18="" version_compare "$H5_LIBVER" "1.8.0" # check if HDF5 version is < 1.8.0 -if [ "$version_lt" = 0 ]; then - 16dir="/16" +if [ "$version_lt" = 1 ]; then + dir16="\/16" else - 16dir="" + dir16="" topics18="nbit sofloat soint transform" fi @@ -74,7 +74,7 @@ for topic in $topics do fname=h5ex_d_$topic $ECHO_N "Testing C/H5D/$fname...$ECHO_C" - exout .$16dir/$fname >tmp.test + exout .$dir16/$fname >tmp.test status=$? if test $status -eq 1 then @@ -104,18 +104,22 @@ done #######Non-standard tests####### USE_ALT="" +### Set default tfiles directory for tests +nbitdir="18" version_compare "$H5_LIBVER" "1.8.23" # check if HDF5 version is < 1.8.23 if [ "$version_lt" = 1 ]; then USE_ALT="22" - nbitdir="18" else -# check if HDF5 version is < 1.10.8 - version_compare "$H5_LIBVER" "1.10.8" - if [ "$version_lt" = 1 ]; then - USE_ALT="07" +# check if HDF5 version is >= 1.10.0 and < 1.10.8 + version_compare "$H5_LIBVER" "1.10.0" + if [ "$version_lt" = 0 ]; then + version_compare "$H5_LIBVER" "1.10.8" + if [ "$version_lt" = 1 ]; then + USE_ALT="07" + nbitdir="110" + fi fi - nbitdir="110" fi for topic in $topics18 @@ -129,19 +133,32 @@ do echo " Unsupported feature" status=0 else - if "fname"=="h5ex_d_nbit" + if [[ $fname == "h5ex_d_nbit" ]] then tdir=$nbitdir + if [[ $USE_ALT == "" ]] + then + ### set USE_ALT=07 if not set above + USE_ALT="07" + fi else tdir=18 + ### unset USE_ALT for the other topics + USE_ALT="" fi - cmp -s tmp.test $srcdir/tfiles/$tdir/$fname.tst + cmp -s tmp.test $srcdir/tfiles/18/$fname.tst status=$? if test $status -ne 0 then echo " FAILED!" else - dumpout $fname.h5 >tmp.test + if [[ $fname == "h5ex_d_transform" ]] + then + targ="-n" + else + targ="" + fi + dumpout $targ $fname.h5 >tmp.test rm -f $fname.h5 cmp -s tmp.test $srcdir/tfiles/$tdir/$fname$USE_ALT.ddl status=$? diff --git a/C/H5F/CMakeLists.txt b/C/H5FLT/CMakeLists.txt similarity index 99% rename from C/H5F/CMakeLists.txt rename to C/H5FLT/CMakeLists.txt index 54fd14cb..eb386b46 100644 --- a/C/H5F/CMakeLists.txt +++ b/C/H5FLT/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.12) -project (HDF5Filters_C) +project (HDF5Examples_C_H5FLT) set (dyn_examples) diff --git a/C/H5F/h5ex_d_blosc.c b/C/H5FLT/h5ex_d_blosc.c similarity index 100% rename from C/H5F/h5ex_d_blosc.c rename to C/H5FLT/h5ex_d_blosc.c diff --git a/C/H5F/h5ex_d_bshuf.c b/C/H5FLT/h5ex_d_bshuf.c similarity index 100% rename from C/H5F/h5ex_d_bshuf.c rename to C/H5FLT/h5ex_d_bshuf.c diff --git a/C/H5F/h5ex_d_bzip2.c b/C/H5FLT/h5ex_d_bzip2.c similarity index 100% rename from C/H5F/h5ex_d_bzip2.c rename to C/H5FLT/h5ex_d_bzip2.c diff --git a/C/H5F/h5ex_d_jpeg.c b/C/H5FLT/h5ex_d_jpeg.c similarity index 100% rename from C/H5F/h5ex_d_jpeg.c rename to C/H5FLT/h5ex_d_jpeg.c diff --git a/C/H5F/h5ex_d_lz4.c b/C/H5FLT/h5ex_d_lz4.c similarity index 100% rename from C/H5F/h5ex_d_lz4.c rename to C/H5FLT/h5ex_d_lz4.c diff --git a/C/H5F/h5ex_d_lzf.c b/C/H5FLT/h5ex_d_lzf.c similarity index 100% rename from C/H5F/h5ex_d_lzf.c rename to C/H5FLT/h5ex_d_lzf.c diff --git a/C/H5F/h5ex_d_mafisc.c b/C/H5FLT/h5ex_d_mafisc.c similarity index 100% rename from C/H5F/h5ex_d_mafisc.c rename to C/H5FLT/h5ex_d_mafisc.c diff --git a/C/H5F/h5ex_d_zfp.c b/C/H5FLT/h5ex_d_zfp.c similarity index 100% rename from C/H5F/h5ex_d_zfp.c rename to C/H5FLT/h5ex_d_zfp.c diff --git a/C/H5F/h5ex_d_zstd.c b/C/H5FLT/h5ex_d_zstd.c similarity index 100% rename from C/H5F/h5ex_d_zstd.c rename to C/H5FLT/h5ex_d_zstd.c diff --git a/C/H5F/tfiles/h5ex_d_blosc.ddl b/C/H5FLT/tfiles/h5ex_d_blosc.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_blosc.ddl rename to C/H5FLT/tfiles/h5ex_d_blosc.ddl diff --git a/C/H5F/tfiles/h5ex_d_blosc.h5 b/C/H5FLT/tfiles/h5ex_d_blosc.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_blosc.h5 rename to C/H5FLT/tfiles/h5ex_d_blosc.h5 diff --git a/C/H5F/tfiles/h5ex_d_blosc.tst b/C/H5FLT/tfiles/h5ex_d_blosc.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_blosc.tst rename to C/H5FLT/tfiles/h5ex_d_blosc.tst diff --git a/C/H5F/tfiles/h5ex_d_bshuf.ddl b/C/H5FLT/tfiles/h5ex_d_bshuf.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_bshuf.ddl rename to C/H5FLT/tfiles/h5ex_d_bshuf.ddl diff --git a/C/H5F/tfiles/h5ex_d_bshuf.h5 b/C/H5FLT/tfiles/h5ex_d_bshuf.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_bshuf.h5 rename to C/H5FLT/tfiles/h5ex_d_bshuf.h5 diff --git a/C/H5F/tfiles/h5ex_d_bshuf.tst b/C/H5FLT/tfiles/h5ex_d_bshuf.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_bshuf.tst rename to C/H5FLT/tfiles/h5ex_d_bshuf.tst diff --git a/C/H5F/tfiles/h5ex_d_bzip2.ddl b/C/H5FLT/tfiles/h5ex_d_bzip2.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_bzip2.ddl rename to C/H5FLT/tfiles/h5ex_d_bzip2.ddl diff --git a/C/H5F/tfiles/h5ex_d_bzip2.h5 b/C/H5FLT/tfiles/h5ex_d_bzip2.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_bzip2.h5 rename to C/H5FLT/tfiles/h5ex_d_bzip2.h5 diff --git a/C/H5F/tfiles/h5ex_d_bzip2.tst b/C/H5FLT/tfiles/h5ex_d_bzip2.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_bzip2.tst rename to C/H5FLT/tfiles/h5ex_d_bzip2.tst diff --git a/C/H5F/tfiles/h5ex_d_jpeg.ddl b/C/H5FLT/tfiles/h5ex_d_jpeg.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_jpeg.ddl rename to C/H5FLT/tfiles/h5ex_d_jpeg.ddl diff --git a/C/H5F/tfiles/h5ex_d_jpeg.h5 b/C/H5FLT/tfiles/h5ex_d_jpeg.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_jpeg.h5 rename to C/H5FLT/tfiles/h5ex_d_jpeg.h5 diff --git a/C/H5F/tfiles/h5ex_d_jpeg.tst b/C/H5FLT/tfiles/h5ex_d_jpeg.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_jpeg.tst rename to C/H5FLT/tfiles/h5ex_d_jpeg.tst diff --git a/C/H5F/tfiles/h5ex_d_lz4.ddl b/C/H5FLT/tfiles/h5ex_d_lz4.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_lz4.ddl rename to C/H5FLT/tfiles/h5ex_d_lz4.ddl diff --git a/C/H5F/tfiles/h5ex_d_lz4.h5 b/C/H5FLT/tfiles/h5ex_d_lz4.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_lz4.h5 rename to C/H5FLT/tfiles/h5ex_d_lz4.h5 diff --git a/C/H5F/tfiles/h5ex_d_lz4.tst b/C/H5FLT/tfiles/h5ex_d_lz4.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_lz4.tst rename to C/H5FLT/tfiles/h5ex_d_lz4.tst diff --git a/C/H5F/tfiles/h5ex_d_lzf.ddl b/C/H5FLT/tfiles/h5ex_d_lzf.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_lzf.ddl rename to C/H5FLT/tfiles/h5ex_d_lzf.ddl diff --git a/C/H5F/tfiles/h5ex_d_lzf.h5 b/C/H5FLT/tfiles/h5ex_d_lzf.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_lzf.h5 rename to C/H5FLT/tfiles/h5ex_d_lzf.h5 diff --git a/C/H5F/tfiles/h5ex_d_lzf.tst b/C/H5FLT/tfiles/h5ex_d_lzf.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_lzf.tst rename to C/H5FLT/tfiles/h5ex_d_lzf.tst diff --git a/C/H5F/tfiles/h5ex_d_mafisc.ddl b/C/H5FLT/tfiles/h5ex_d_mafisc.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_mafisc.ddl rename to C/H5FLT/tfiles/h5ex_d_mafisc.ddl diff --git a/C/H5F/tfiles/h5ex_d_mafisc.h5 b/C/H5FLT/tfiles/h5ex_d_mafisc.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_mafisc.h5 rename to C/H5FLT/tfiles/h5ex_d_mafisc.h5 diff --git a/C/H5F/tfiles/h5ex_d_mafisc.tst b/C/H5FLT/tfiles/h5ex_d_mafisc.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_mafisc.tst rename to C/H5FLT/tfiles/h5ex_d_mafisc.tst diff --git a/C/H5F/tfiles/h5ex_d_zfp.ddl b/C/H5FLT/tfiles/h5ex_d_zfp.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_zfp.ddl rename to C/H5FLT/tfiles/h5ex_d_zfp.ddl diff --git a/C/H5F/tfiles/h5ex_d_zfp.h5 b/C/H5FLT/tfiles/h5ex_d_zfp.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_zfp.h5 rename to C/H5FLT/tfiles/h5ex_d_zfp.h5 diff --git a/C/H5F/tfiles/h5ex_d_zfp.tst b/C/H5FLT/tfiles/h5ex_d_zfp.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_zfp.tst rename to C/H5FLT/tfiles/h5ex_d_zfp.tst diff --git a/C/H5F/tfiles/h5ex_d_zstd.ddl b/C/H5FLT/tfiles/h5ex_d_zstd.ddl similarity index 100% rename from C/H5F/tfiles/h5ex_d_zstd.ddl rename to C/H5FLT/tfiles/h5ex_d_zstd.ddl diff --git a/C/H5F/tfiles/h5ex_d_zstd.h5 b/C/H5FLT/tfiles/h5ex_d_zstd.h5 similarity index 100% rename from C/H5F/tfiles/h5ex_d_zstd.h5 rename to C/H5FLT/tfiles/h5ex_d_zstd.h5 diff --git a/C/H5F/tfiles/h5ex_d_zstd.tst b/C/H5FLT/tfiles/h5ex_d_zstd.tst similarity index 100% rename from C/H5F/tfiles/h5ex_d_zstd.tst rename to C/H5FLT/tfiles/h5ex_d_zstd.tst diff --git a/C/H5G/test.sh.in b/C/H5G/test.sh.in index 609590cc..f12c4a50 100755 --- a/C/H5G/test.sh.in +++ b/C/H5G/test.sh.in @@ -50,7 +50,7 @@ $ECHO_N "Testing C/H5G/h5ex_g_create...$ECHO_C" ./h5ex_g_create dumpout h5ex_g_create.h5 >tmp.test rm -f h5ex_g_create.h5 -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_create.ddl +cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_create.ddl status=$? if test $status -ne 0 then @@ -70,7 +70,7 @@ else exout ./h5ex_g_iterate >tmp.test rm -f h5ex_g_iterate.h5 fi -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_iterate.tst +cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_iterate.tst status=$? if test $status -ne 0 then @@ -90,7 +90,7 @@ else exout ./h5ex_g_traverse >tmp.test rm -f h5ex_g_traverse.h5 fi -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_traverse.tst +cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_traverse.tst status=$? if test $status -ne 0 then diff --git a/C/H5P/CMakeLists.txt b/C/H5PAR/CMakeLists.txt similarity index 99% rename from C/H5P/CMakeLists.txt rename to C/H5PAR/CMakeLists.txt index 1716d277..4e2e297c 100644 --- a/C/H5P/CMakeLists.txt +++ b/C/H5PAR/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.12) -PROJECT (H5P_C) +PROJECT (H5PAR_C) #----------------------------------------------------------------------------- # Define Sources diff --git a/C/H5P/C_sourcefiles.cmake b/C/H5PAR/C_sourcefiles.cmake similarity index 100% rename from C/H5P/C_sourcefiles.cmake rename to C/H5PAR/C_sourcefiles.cmake diff --git a/C/H5P/ph5_dataset.c b/C/H5PAR/ph5_dataset.c similarity index 100% rename from C/H5P/ph5_dataset.c rename to C/H5PAR/ph5_dataset.c diff --git a/C/H5P/ph5_file_create.c b/C/H5PAR/ph5_file_create.c similarity index 100% rename from C/H5P/ph5_file_create.c rename to C/H5PAR/ph5_file_create.c diff --git a/C/H5P/ph5_filtered_writes.c b/C/H5PAR/ph5_filtered_writes.c similarity index 100% rename from C/H5P/ph5_filtered_writes.c rename to C/H5PAR/ph5_filtered_writes.c diff --git a/C/H5P/ph5_filtered_writes_no_sel.c b/C/H5PAR/ph5_filtered_writes_no_sel.c similarity index 100% rename from C/H5P/ph5_filtered_writes_no_sel.c rename to C/H5PAR/ph5_filtered_writes_no_sel.c diff --git a/C/H5P/ph5_hyperslab_by_chunk.c b/C/H5PAR/ph5_hyperslab_by_chunk.c similarity index 100% rename from C/H5P/ph5_hyperslab_by_chunk.c rename to C/H5PAR/ph5_hyperslab_by_chunk.c diff --git a/C/H5P/ph5_hyperslab_by_col.c b/C/H5PAR/ph5_hyperslab_by_col.c similarity index 100% rename from C/H5P/ph5_hyperslab_by_col.c rename to C/H5PAR/ph5_hyperslab_by_col.c diff --git a/C/H5P/ph5_hyperslab_by_pattern.c b/C/H5PAR/ph5_hyperslab_by_pattern.c similarity index 100% rename from C/H5P/ph5_hyperslab_by_pattern.c rename to C/H5PAR/ph5_hyperslab_by_pattern.c diff --git a/C/H5P/ph5_hyperslab_by_row.c b/C/H5PAR/ph5_hyperslab_by_row.c similarity index 100% rename from C/H5P/ph5_hyperslab_by_row.c rename to C/H5PAR/ph5_hyperslab_by_row.c diff --git a/C/H5P/ph5_subfiling.c b/C/H5PAR/ph5_subfiling.c similarity index 100% rename from C/H5P/ph5_subfiling.c rename to C/H5PAR/ph5_subfiling.c diff --git a/C/H5T/test.sh.in b/C/H5T/test.sh.in index 2f081a58..dc48ac99 100755 --- a/C/H5T/test.sh.in +++ b/C/H5T/test.sh.in @@ -69,16 +69,22 @@ do then echo " FAILED!" else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi + if [[ $fname == "h5ex_t_cpxcmpd" || $fname == "h5ex_t_cpxcmpdatt" ]] + then + targ="-n" + else + targ="" + fi + dumpout $targ $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi fi return_val=`expr $status + $return_val` done @@ -87,13 +93,7 @@ done #######Non-standard tests####### USE_ALT="" -if [ "$H5_LIBVER_DIR" = "114" ]; then - # check if HDF5 version is < 1.14.3 - version_compare "$H5_LIBVER" "1.10.3" - if [ "$version_lt" = 1 ]; then - USE_ALT="02" - fi -elif [ "$H5_LIBVER_DIR" = "110" ]; then +if [ "$H5_LIBVER_DIR" = "110" ]; then # check if HDF5 version is < 1.10.7 version_compare "$H5_LIBVER" "1.10.7" if [ "$version_lt" = 1 ]; then @@ -130,7 +130,12 @@ do else version_compare "$H5_LIBVER" "1.12.0" if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl + version_compare "$H5_LIBVER" "1.10.7" + if [ "$version_lt" = 1 ]; then + cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl + else + cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl + fi else cmp -s tmp.test $srcdir/tfiles/112/$fname.ddl fi @@ -159,13 +164,14 @@ do then echo " FAILED!" else - dumpout -n $fname.h5 >tmp.test + dumpout $fname.h5 >tmp.test rm -f $fname.h5 - version_compare "$H5_LIBVER" "1.14.0" + version_compare "$H5_LIBVER" "1.14.3" if [ "$version_lt" = 1 ]; then cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl else - cmp -s tmp.test $srcdir/tfiles/114/$fname$USE_ALT.ddl + cmp -s tmp.test $srcdir/tfiles/114/$fname.ddl + fi status=$? if test $status -ne 0 then diff --git a/C/H5T/tfiles/114/h5ex_t_vlen02.ddl b/C/H5T/tfiles/114/h5ex_t_vlen02.ddl deleted file mode 100644 index 53f48630..00000000 --- a/C/H5T/tfiles/114/h5ex_t_vlen02.ddl +++ /dev/null @@ -1,11 +0,0 @@ -HDF5 "h5ex_t_vlen.h5" { -GROUP "/" { - DATASET "DS1" { - DATATYPE H5T_VLEN { H5T_STD_I32LE} - DATASPACE SIMPLE { ( 2 ) / ( 2 ) } - DATA { - (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) - } - } -} -} diff --git a/C/H5T/tfiles/114/h5ex_t_vlenatt02.ddl b/C/H5T/tfiles/114/h5ex_t_vlenatt02.ddl deleted file mode 100644 index a2b32e87..00000000 --- a/C/H5T/tfiles/114/h5ex_t_vlenatt02.ddl +++ /dev/null @@ -1,17 +0,0 @@ -HDF5 "h5ex_t_vlenatt.h5" { -GROUP "/" { - DATASET "DS1" { - DATATYPE H5T_STD_I32LE - DATASPACE NULL - DATA { - } - ATTRIBUTE "A1" { - DATATYPE H5T_VLEN { H5T_STD_I32LE} - DATASPACE SIMPLE { ( 2 ) / ( 2 ) } - DATA { - (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) - } - } - } -} -} diff --git a/FORTRAN/CMakeLists.txt b/FORTRAN/CMakeLists.txt index 81ac7c04..72582fe1 100644 --- a/FORTRAN/CMakeLists.txt +++ b/FORTRAN/CMakeLists.txt @@ -9,5 +9,5 @@ add_subdirectory (${PROJECT_SOURCE_DIR}/H5G) add_subdirectory (${PROJECT_SOURCE_DIR}/H5T) if (H5_HAVE_PARALLEL AND HDF5_ENABLE_PARALLEL) - add_subdirectory (${PROJECT_SOURCE_DIR}/H5P) + add_subdirectory (${PROJECT_SOURCE_DIR}/H5PAR) endif () diff --git a/FORTRAN/H5D/test.sh.in b/FORTRAN/H5D/test.sh.in index 24c670fd..76dbbcde 100755 --- a/FORTRAN/H5D/test.sh.in +++ b/FORTRAN/H5D/test.sh.in @@ -113,9 +113,9 @@ do cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl status=$? if test $status -ne 0 - then - # test to see if the only difference is because of big-endian and little-endian - \diff tmp.test $srcdir/tfiles/18/$fname.ddl > tmp.diff + then + # test to see if the only difference is because of big-endian and little-endian + diff tmp.test $srcdir/tfiles/18/$fname.ddl > tmp.diff echo " " NumOfFinds=`grep -c "DATATYPE" tmp.diff` NumOfFinds=`expr $NumOfFinds \* 2` @@ -126,6 +126,7 @@ do echo " FAILED!" else echo " *Inconsequential difference* ... Passed" + status=0 fi else echo " Passed" @@ -137,80 +138,72 @@ done #######Non-standard tests####### USE_ALT="" +### Set default tfiles directory for tests +nbitdir="18" version_compare "$H5_LIBVER" "1.8.23" # check if HDF5 version is < 1.8.23 if [ "$version_lt" = 1 ]; then USE_ALT="22" - nbitdir="18" else # check if HDF5 version is < 1.10.8 version_compare "$H5_LIBVER" "1.10.8" if [ "$version_lt" = 1 ]; then USE_ALT="07" + nbitdir="110" fi - nbitdir="110" fi -fname=h5ex_d_nbit -$ECHO_N "Testing FORTRAN/H5D/$fname...$ECHO_C" -exout ./$fname >tmp.test -status=$? -if test $status -eq 1 -then - echo " Unsupported feature" -else - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst +topics="nbit" +for topic in $topics18 +do + fname=h5ex_d_$topic + $ECHO_N "Testing C/H5D/$fname...$ECHO_C" + exout ./$fname >tmp.test status=$? - if test $status -ne 0 + if test $status -eq 1 then - echo " FAILED!" + echo " Unsupported feature" + status=0 else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/$nbitdir/$fname$USE_ALT.ddl - status=$? - if test $status -ne 0 + if [[ $fname == "h5ex_d_nbit" ]] then - echo " FAILED!" + tdir=$nbitdir + if [[ $USE_ALT == "" ]] + then + ### set USE_ALT=07 if not set above + USE_ALT="07" + fi else - echo " Passed" + tdir=18 + ### unset USE_ALT for the other topics + USE_ALT="" fi - return_val=`expr $status + $return_val` - fi - return_val=`expr $status + $return_val` -fi - -#Remove external data file from h5ex_d_extern -rm -f h5ex_d_extern.data - - -fname=h5ex_d_transform -$ECHO_N "Testing FORTRAN/H5D/$fname...$ECHO_C" -exout ./$fname >tmp.test -status=$? -if test $status -eq 1 -then - echo " Unsupported feature" -else - cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout -n $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname$USE_ALT.ddl + cmp -s tmp.test $srcdir/tfiles/18/$fname.tst status=$? if test $status -ne 0 then echo " FAILED!" else - echo " Passed" + if [[ $fname == "h5ex_d_transform" ]] + then + targ="-n" + else + targ="" + fi + dumpout $targ $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/tfiles/$tdir/$fname$USE_ALT.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi fi + return_val=`expr $status + $return_val` fi - return_val=`expr $status + $return_val` -fi +done rm -f tmp.test diff --git a/FORTRAN/H5P/CMakeLists.txt b/FORTRAN/H5PAR/CMakeLists.txt similarity index 98% rename from FORTRAN/H5P/CMakeLists.txt rename to FORTRAN/H5PAR/CMakeLists.txt index 7370a362..84c96413 100644 --- a/FORTRAN/H5P/CMakeLists.txt +++ b/FORTRAN/H5PAR/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.12) -project (HDF5Examples_FORTRAN_H5D C CXX Fortran) +project (HDF5Examples_FORTRAN_H5PAR C CXX Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed diff --git a/FORTRAN/H5P/Fortran_sourcefiles.cmake b/FORTRAN/H5PAR/Fortran_sourcefiles.cmake similarity index 100% rename from FORTRAN/H5P/Fortran_sourcefiles.cmake rename to FORTRAN/H5PAR/Fortran_sourcefiles.cmake diff --git a/FORTRAN/H5P/ph5_f90_dataset.F90 b/FORTRAN/H5PAR/ph5_f90_dataset.F90 similarity index 100% rename from FORTRAN/H5P/ph5_f90_dataset.F90 rename to FORTRAN/H5PAR/ph5_f90_dataset.F90 diff --git a/FORTRAN/H5P/ph5_f90_file_create.F90 b/FORTRAN/H5PAR/ph5_f90_file_create.F90 similarity index 100% rename from FORTRAN/H5P/ph5_f90_file_create.F90 rename to FORTRAN/H5PAR/ph5_f90_file_create.F90 diff --git a/FORTRAN/H5P/ph5_f90_hyperslab_by_chunk.F90 b/FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90 similarity index 100% rename from FORTRAN/H5P/ph5_f90_hyperslab_by_chunk.F90 rename to FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90 diff --git a/FORTRAN/H5P/ph5_f90_hyperslab_by_col.F90 b/FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90 similarity index 100% rename from FORTRAN/H5P/ph5_f90_hyperslab_by_col.F90 rename to FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90 diff --git a/FORTRAN/H5P/ph5_f90_hyperslab_by_pattern.F90 b/FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90 similarity index 100% rename from FORTRAN/H5P/ph5_f90_hyperslab_by_pattern.F90 rename to FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90 diff --git a/FORTRAN/H5P/ph5_f90_hyperslab_by_row.F90 b/FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90 similarity index 100% rename from FORTRAN/H5P/ph5_f90_hyperslab_by_row.F90 rename to FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90 diff --git a/FORTRAN/H5T/CMakeLists.txt b/FORTRAN/H5T/CMakeLists.txt index 7c16e383..67a3ca3d 100644 --- a/FORTRAN/H5T/CMakeLists.txt +++ b/FORTRAN/H5T/CMakeLists.txt @@ -177,7 +177,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/112/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${example_name}.ddl ) else () add_custom_command ( diff --git a/FORTRAN/H5T/test.sh.in b/FORTRAN/H5T/test.sh.in index 4af35bf9..368b75aa 100755 --- a/FORTRAN/H5T/test.sh.in +++ b/FORTRAN/H5T/test.sh.in @@ -59,7 +59,7 @@ if [ "$FORTRAN_2003_CONDITIONAL_F" = "Xyes" ]; then topics="arrayatt_F03 array_F03 bitatt_F03 bit_F03 cmpdatt_F03 cmpd_F03 \ Cstring_F03 enumatt_F03 enum_F03 floatatt_F03 float_F03 \ intatt_F03 int_F03 opaqueatt_F03 opaque_F03 \ - string_F03 vlenatt_F03 vlen_F03 $topics" + string_F03 $topics" fi return_val=0 @@ -75,16 +75,22 @@ do then echo " FAILED!" else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi + if [[ $fname == "h5ex_t_cpxcmpd_F03" || $fname == "h5ex_t_cpxcmpdatt_F03" ]] + then + targ="-n" + else + targ="" + fi + dumpout $targ $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi fi return_val=`expr $status + $return_val` done @@ -93,13 +99,7 @@ done #######Non-standard tests####### USE_ALT="" -if [ "$H5_LIBVER_DIR" = "114" ]; then - # check if HDF5 version is < 1.14.3 - version_compare "$H5_LIBVER" "1.10.3" - if [ "$version_lt" = 1 ]; then - USE_ALT="02" - fi -elif [ "$H5_LIBVER_DIR" = "110" ]; then +if [ "$H5_LIBVER_DIR" = "110" ]; then # check if HDF5 version is < 1.10.7 version_compare "$H5_LIBVER" "1.10.7" if [ "$version_lt" = 1 ]; then @@ -140,7 +140,12 @@ do else version_compare "$H5_LIBVER" "1.12.0" if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl + version_compare "$H5_LIBVER" "1.10.7" + if [ "$version_lt" = 1 ]; then + cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl + else + cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl + fi else cmp -s tmp.test $srcdir/tfiles/112/$fname.ddl fi @@ -156,56 +161,47 @@ do return_val=`expr $status + $return_val` done -#fname=h5ex_t_cpxcmpd -#$ECHO_N "Testing FORTRAN/H5T/$fname...$ECHO_C" -#exout ./$fname >tmp.test -#cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.tst -#status=$? -#if test $status -ne 0 -#then -# echo " FAILED!" -#else -# dumpout -n $fname.h5 >tmp.test -#rm -f $fname.h5 -# cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.ddl -#status=$? -#if test $status -ne 0 -#then -# echo " FAILED!" -#else -# echo " Passed" -#fi -#fi -#return_val=`expr $status + $return_val` - +topics="" +version_compare "$H5_LIBVER" "1.10.0" +if [ "$version_lt" = 0 ]; then + topics=" vlenatt_F03 vlen_F03" +fi -#fname=h5ex_t_cpxcmpdatt -#$ECHO_N "Testing FORTRAN/H5T/$fname...$ECHO_C" -#exout ./$fname >tmp.test -#cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.tst -#status=$? -#if test $status -ne 0 -#then -# echo " FAILED!" -#else -# dumpout -n $fname.h5 >tmp.test -#rm -f $fname.h5 -# cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.ddl -#status=$? -#if test $status -ne 0 -#then -# echo " FAILED!" -#else -# echo " Passed" -#fi -#fi -#return_val=`expr $status + $return_val` +for topic in $topics +do + fname=h5ex_t_$topic + $ECHO_N "Testing C/H5T/$fname...$ECHO_C" + exout ./$fname >tmp.test + cmp -s tmp.test $srcdir/tfiles/18/$fname.tst + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + dumpout $fname.h5 >tmp.test + rm -f $fname.h5 + version_compare "$H5_LIBVER" "1.14.3" + if [ "$version_lt" = 1 ]; then + cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl + else + cmp -s tmp.test $srcdir/tfiles/114/$fname.ddl + fi + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi + fi + return_val=`expr $status + $return_val` +done #fname=h5ex_t_convert #$ECHO_N "Testing FORTRAN/H5T/$fname...$ECHO_C" #exout ./$fname >tmp.test -#cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.test +#cmp -s tmp.test $srcdir/tfiles/18/$fname.test #status=$? #if test $status -ne 0 #then diff --git a/FORTRAN/H5T/tfiles/18/112/h5ex_t_objref_F03.ddl b/FORTRAN/H5T/tfiles/18/112/h5ex_t_objref_F03.ddl deleted file mode 100644 index 6d916872..00000000 --- a/FORTRAN/H5T/tfiles/18/112/h5ex_t_objref_F03.ddl +++ /dev/null @@ -1,22 +0,0 @@ -HDF5 "h5ex_t_objref_F03.h5" { -GROUP "/" { - DATASET "DS1" { - DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT } - DATASPACE SIMPLE { ( 2 ) / ( 2 ) } - DATA { - GROUP "h5ex_t_objref_F03.h5/G1" - DATASET "h5ex_t_objref_F03.h5/DS2" - DATA { - } - } - } - DATASET "DS2" { - DATATYPE H5T_STD_I32LE - DATASPACE NULL - DATA { - } - } - GROUP "G1" { - } -} -} diff --git a/FORTRAN/H5T/tfiles/18/112/h5ex_t_objrefatt_F03.ddl b/FORTRAN/H5T/tfiles/18/112/h5ex_t_objrefatt_F03.ddl deleted file mode 100644 index 05796208..00000000 --- a/FORTRAN/H5T/tfiles/18/112/h5ex_t_objrefatt_F03.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "h5ex_t_objrefatt_F03.h5" { -GROUP "/" { - DATASET "DS1" { - DATATYPE H5T_STD_I32LE - DATASPACE NULL - DATA { - } - ATTRIBUTE "A1" { - DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT } - DATASPACE SIMPLE { ( 2 ) / ( 2 ) } - DATA { - GROUP "h5ex_t_objrefatt_F03.h5/G1" - DATASET "h5ex_t_objrefatt_F03.h5/DS2" - DATA { - } - } - } - } - DATASET "DS2" { - DATATYPE H5T_STD_I32LE - DATASPACE NULL - DATA { - } - } - GROUP "G1" { - } -} -} diff --git a/FORTRAN/H5T/tfiles/18/112/h5ex_t_regref_F03.ddl b/FORTRAN/H5T/tfiles/18/112/h5ex_t_regref_F03.ddl deleted file mode 100644 index cd7c1ac6..00000000 --- a/FORTRAN/H5T/tfiles/18/112/h5ex_t_regref_F03.ddl +++ /dev/null @@ -1,33 +0,0 @@ -HDF5 "h5ex_t_regref_F03.h5" { -GROUP "/" { - DATASET "DS1" { - DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG } - DATASPACE SIMPLE { ( 2 ) / ( 2 ) } - DATA { - DATASET "h5ex_t_regref_F03.h5/DS2"{ - REGION_TYPE POINT (0,1), (2,11), (1,0), (2,4) - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } - } - DATASET "h5ex_t_regref_F03.h5/DS2" { - REGION_TYPE BLOCK (0,0)-(0,2), (0,11)-(0,13), (2,0)-(2,2), - (2,11)-(2,13) - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } - } - } - } - DATASET "DS2" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } - DATA { - (0,0): 84, 104, 101, 32, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, - (0,14): 110, 32, - (1,0): 102, 111, 120, 32, 106, 117, 109, 112, 115, 32, 111, 118, 101, - (1,13): 114, 32, 32, - (2,0): 116, 104, 101, 32, 53, 32, 108, 97, 122, 121, 32, 100, 111, 103, - (2,14): 115, 32 - } - } -} -} diff --git a/FORTRAN/H5T/tfiles/18/112/h5ex_t_regrefatt_F03.ddl b/FORTRAN/H5T/tfiles/18/112/h5ex_t_regrefatt_F03.ddl deleted file mode 100644 index e154818b..00000000 --- a/FORTRAN/H5T/tfiles/18/112/h5ex_t_regrefatt_F03.ddl +++ /dev/null @@ -1,39 +0,0 @@ -HDF5 "h5ex_t_regrefatt_F03.h5" { -GROUP "/" { - DATASET "DS1" { - DATATYPE H5T_STD_I32LE - DATASPACE NULL - DATA { - } - ATTRIBUTE "A1" { - DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG } - DATASPACE SIMPLE { ( 2 ) / ( 2 ) } - DATA { - DATASET "h5ex_t_regrefatt_F03.h5/DS2"{ - REGION_TYPE POINT (0,1), (2,11), (1,0), (2,4) - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } - } - DATASET "h5ex_t_regrefatt_F03.h5/DS2" { - REGION_TYPE BLOCK (0,0)-(0,2), (0,11)-(0,13), (2,0)-(2,2), - (2,11)-(2,13) - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } - } - } - } - } - DATASET "DS2" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } - DATA { - (0,0): 84, 104, 101, 32, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, - (0,14): 110, 32, - (1,0): 102, 111, 120, 32, 106, 117, 109, 112, 115, 32, 111, 118, 101, - (1,13): 114, 32, 32, - (2,0): 116, 104, 101, 32, 53, 32, 108, 97, 122, 121, 32, 100, 111, 103, - (2,14): 115, 32 - } - } -} -} diff --git a/JAVA/CMakeLists.txt b/JAVA/CMakeLists.txt index 0afe9484..5063e5b2 100644 --- a/JAVA/CMakeLists.txt +++ b/JAVA/CMakeLists.txt @@ -4,4 +4,4 @@ project (HDFJAVA_EXAMPLES Java) add_subdirectory (H5D) add_subdirectory (H5T) add_subdirectory (H5G) -add_subdirectory (intro) +add_subdirectory (H5J) diff --git a/JAVA/H5D/CMakeLists.txt b/JAVA/H5D/CMakeLists.txt index b44ca7a6..60c35dc8 100644 --- a/JAVA/H5D/CMakeLists.txt +++ b/JAVA/H5D/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.18) -project (HDFJAVA_EXAMPLES_H5D Java) +project (HDF5Examples_JAVA_H5D Java) set (CMAKE_VERBOSE_MAKEFILE 1) @@ -50,9 +50,9 @@ if (H5EX_BUILD_TESTING) -D "TEST_PROGRAM=${resultfile}" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${EXAMPLE_VARNAME}_${resultfile}_JAR_FILE}" - -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" - -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_H5D_BINARY_DIR}" - -D "TEST_OUTPUT=${HDFJAVA_EXAMPLES_H5D_BINARY_DIR}/${resultfile}.out" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${PROJECT_BINARY_DIR}/${resultfile}.out" -D "TEST_REFERENCE=${resultfile}.txt" -D "TEST_EXPECT=${resultcode}" -D "TEST_SKIP_COMPARE=TRUE" @@ -70,7 +70,7 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove - ${HDFJAVA_EXAMPLES_H5D_BINARY_DIR}/${example_name}.h5 + ${PROJECT_BINARY_DIR}/${example_name}.h5 ${example_name}.out ${example_name}.out.err ) @@ -81,8 +81,8 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${HDFJAVA_EXAMPLES_H5D_SOURCE_DIR}/tfiles/110/${example_name}.txt - ${HDFJAVA_EXAMPLES_H5D_BINARY_DIR}/${example_name}.txt + ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}.txt + ${PROJECT_BINARY_DIR}/${example_name}.txt ) set_tests_properties (${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects) set (last_test "${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects") diff --git a/JAVA/H5G/CMakeLists.txt b/JAVA/H5G/CMakeLists.txt index b9d063e9..5f47d592 100644 --- a/JAVA/H5G/CMakeLists.txt +++ b/JAVA/H5G/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.18) -project (HDFJAVA_EXAMPLES_GROUPS Java) +project (HDF5Examples_JAVA_GROUPS Java) set (CMAKE_VERBOSE_MAKEFILE 1) @@ -50,9 +50,9 @@ if (H5EX_BUILD_TESTING) -D "TEST_PROGRAM=${resultfile}" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${EXAMPLE_VARNAME}_${resultfile}_JAR_FILE}" - -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" - -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_GROUPS_BINARY_DIR}" - -D "TEST_OUTPUT=${HDFJAVA_EXAMPLES_GROUPS_BINARY_DIR}/${resultfile}.out" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${PROJECT_BINARY_DIR}/${resultfile}.out" -D "TEST_REFERENCE=${resultfile}.txt" -D "TEST_EXPECT=${resultcode}" -D "TEST_SKIP_COMPARE=TRUE" @@ -70,7 +70,7 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove - ${HDFJAVA_EXAMPLES_GROUPS_BINARY_DIR}/${example_name}.h5 + ${PROJECT_BINARY_DIR}/${example_name}.h5 ${example_name}.out ${example_name}.out.err ) @@ -81,8 +81,8 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${HDFJAVA_EXAMPLES_GROUPS_SOURCE_DIR}/tfiles/110/${example_name}.txt - ${HDFJAVA_EXAMPLES_GROUPS_BINARY_DIR}/${example_name}.txt + ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}.txt + ${PROJECT_BINARY_DIR}/${example_name}.txt ) set_tests_properties (${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects) set (last_test "${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects") diff --git a/JAVA/intro/110/HDF5FileStructure.java b/JAVA/H5J/110/HDF5FileStructure.java similarity index 100% rename from JAVA/intro/110/HDF5FileStructure.java rename to JAVA/H5J/110/HDF5FileStructure.java diff --git a/JAVA/intro/CMakeLists.txt b/JAVA/H5J/CMakeLists.txt similarity index 88% rename from JAVA/intro/CMakeLists.txt rename to JAVA/H5J/CMakeLists.txt index a3447678..8f1c195f 100644 --- a/JAVA/intro/CMakeLists.txt +++ b/JAVA/H5J/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.18) -project (HDFJAVA_EXAMPLES_INTRO Java) +project (HDF5Examples_JAVA_INTRO Java) set (CMAKE_VERBOSE_MAKEFILE 1) @@ -50,9 +50,9 @@ if (H5EX_BUILD_TESTING) -D "TEST_PROGRAM=${resultfile}" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${EXAMPLE_VARNAME}_${resultfile}_JAR_FILE}" - -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" - -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_INTRO_BINARY_DIR}" - -D "TEST_OUTPUT=${HDFJAVA_EXAMPLES_INTRO_BINARY_DIR}/${resultfile}.out" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${PROJECT_BINARY_DIR}/${resultfile}.out" -D "TEST_REFERENCE=${resultfile}.txt" -D "TEST_EXPECT=${resultcode}" -D "TEST_SKIP_COMPARE=TRUE" @@ -81,8 +81,8 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${HDFJAVA_EXAMPLES_INTRO_SOURCE_DIR}/tfiles/110/${example_name}.txt - ${HDFJAVA_EXAMPLES_INTRO_BINARY_DIR}/${example_name}.txt + ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}.txt + ${PROJECT_BINARY_DIR}/${example_name}.txt ) set_tests_properties (${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects) set (last_test "${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects") diff --git a/JAVA/intro/H5_CreateGroupAbsoluteRelative.java b/JAVA/H5J/H5_CreateGroupAbsoluteRelative.java similarity index 100% rename from JAVA/intro/H5_CreateGroupAbsoluteRelative.java rename to JAVA/H5J/H5_CreateGroupAbsoluteRelative.java diff --git a/JAVA/intro/HDF5AttributeCreate.java b/JAVA/H5J/HDF5AttributeCreate.java similarity index 100% rename from JAVA/intro/HDF5AttributeCreate.java rename to JAVA/H5J/HDF5AttributeCreate.java diff --git a/JAVA/intro/HDF5DatasetCreate.java b/JAVA/H5J/HDF5DatasetCreate.java similarity index 100% rename from JAVA/intro/HDF5DatasetCreate.java rename to JAVA/H5J/HDF5DatasetCreate.java diff --git a/JAVA/intro/HDF5DatasetRead.java b/JAVA/H5J/HDF5DatasetRead.java similarity index 100% rename from JAVA/intro/HDF5DatasetRead.java rename to JAVA/H5J/HDF5DatasetRead.java diff --git a/JAVA/intro/HDF5FileCreate.java b/JAVA/H5J/HDF5FileCreate.java similarity index 100% rename from JAVA/intro/HDF5FileCreate.java rename to JAVA/H5J/HDF5FileCreate.java diff --git a/JAVA/intro/HDF5FileStructure.java b/JAVA/H5J/HDF5FileStructure.java similarity index 99% rename from JAVA/intro/HDF5FileStructure.java rename to JAVA/H5J/HDF5FileStructure.java index aa501892..8ea80a80 100644 --- a/JAVA/intro/HDF5FileStructure.java +++ b/JAVA/H5J/HDF5FileStructure.java @@ -41,8 +41,6 @@ */ public class HDF5FileStructure { private static String fname = "HDF5FileStructure.h5"; - private long[] dims2D = {20, 10}; - private long[] dims3D = {20, 10, 5}; private static void FileStructure() { @@ -162,6 +160,8 @@ private static void printGroup(long g_id, String gname, String indent) throws Ex */ private static void createFile() throws Exception { + long[] dims2D = {20, 10}; + long[] dims3D = {20, 10, 5}; long file_id = HDF5Constants.H5I_INVALID_HID; long dataset_id = HDF5Constants.H5I_INVALID_HID; long dataspace_id1 = HDF5Constants.H5I_INVALID_HID; diff --git a/JAVA/intro/HDF5GroupCreate.java b/JAVA/H5J/HDF5GroupCreate.java similarity index 100% rename from JAVA/intro/HDF5GroupCreate.java rename to JAVA/H5J/HDF5GroupCreate.java diff --git a/JAVA/intro/HDF5GroupDatasetCreate.java b/JAVA/H5J/HDF5GroupDatasetCreate.java similarity index 100% rename from JAVA/intro/HDF5GroupDatasetCreate.java rename to JAVA/H5J/HDF5GroupDatasetCreate.java diff --git a/JAVA/intro/HDF5SubsetSelect.java b/JAVA/H5J/HDF5SubsetSelect.java similarity index 100% rename from JAVA/intro/HDF5SubsetSelect.java rename to JAVA/H5J/HDF5SubsetSelect.java diff --git a/JAVA/intro/Java_sourcefiles.cmake b/JAVA/H5J/Java_sourcefiles.cmake similarity index 100% rename from JAVA/intro/Java_sourcefiles.cmake rename to JAVA/H5J/Java_sourcefiles.cmake diff --git a/JAVA/intro/Makefile.am b/JAVA/H5J/Makefile.am similarity index 100% rename from JAVA/intro/Makefile.am rename to JAVA/H5J/Makefile.am diff --git a/JAVA/intro/runExample.sh.in b/JAVA/H5J/runExample.sh.in similarity index 100% rename from JAVA/intro/runExample.sh.in rename to JAVA/H5J/runExample.sh.in diff --git a/JAVA/intro/tfiles/110/HDF5AttributeCreate.txt b/JAVA/H5J/tfiles/110/HDF5AttributeCreate.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5AttributeCreate.txt rename to JAVA/H5J/tfiles/110/HDF5AttributeCreate.txt diff --git a/JAVA/intro/tfiles/110/HDF5DatasetCreate.txt b/JAVA/H5J/tfiles/110/HDF5DatasetCreate.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5DatasetCreate.txt rename to JAVA/H5J/tfiles/110/HDF5DatasetCreate.txt diff --git a/JAVA/intro/tfiles/110/HDF5DatasetRead.txt b/JAVA/H5J/tfiles/110/HDF5DatasetRead.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5DatasetRead.txt rename to JAVA/H5J/tfiles/110/HDF5DatasetRead.txt diff --git a/JAVA/intro/tfiles/110/HDF5FileCreate.txt b/JAVA/H5J/tfiles/110/HDF5FileCreate.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5FileCreate.txt rename to JAVA/H5J/tfiles/110/HDF5FileCreate.txt diff --git a/JAVA/intro/tfiles/110/HDF5FileStructure.txt b/JAVA/H5J/tfiles/110/HDF5FileStructure.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5FileStructure.txt rename to JAVA/H5J/tfiles/110/HDF5FileStructure.txt diff --git a/JAVA/intro/tfiles/110/HDF5GroupCreate.txt b/JAVA/H5J/tfiles/110/HDF5GroupCreate.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5GroupCreate.txt rename to JAVA/H5J/tfiles/110/HDF5GroupCreate.txt diff --git a/JAVA/intro/tfiles/110/HDF5GroupDatasetCreate.txt b/JAVA/H5J/tfiles/110/HDF5GroupDatasetCreate.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5GroupDatasetCreate.txt rename to JAVA/H5J/tfiles/110/HDF5GroupDatasetCreate.txt diff --git a/JAVA/intro/tfiles/110/HDF5SubsetSelect.txt b/JAVA/H5J/tfiles/110/HDF5SubsetSelect.txt similarity index 100% rename from JAVA/intro/tfiles/110/HDF5SubsetSelect.txt rename to JAVA/H5J/tfiles/110/HDF5SubsetSelect.txt diff --git a/JAVA/H5T/CMakeLists.txt b/JAVA/H5T/CMakeLists.txt index 7fe1e356..a779a539 100644 --- a/JAVA/H5T/CMakeLists.txt +++ b/JAVA/H5T/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.18) -project (HDFJAVA_EXAMPLES_DATATYPES Java) +project (HDF5Examples_JAVA_H5T Java) set (CMAKE_VERBOSE_MAKEFILE 1) @@ -50,9 +50,9 @@ if (H5EX_BUILD_TESTING) -D "TEST_PROGRAM=${resultfile}" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${EXAMPLE_VARNAME}_${resultfile}_JAR_FILE}" - -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" - -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_DATATYPES_BINARY_DIR}" - -D "TEST_OUTPUT=${HDFJAVA_EXAMPLES_DATATYPES_BINARY_DIR}/${resultfile}.out" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${PROJECT_BINARY_DIR}/${resultfile}.out" -D "TEST_REFERENCE=${resultfile}.txt" -D "TEST_EXPECT=${resultcode}" -D "TEST_SKIP_COMPARE=TRUE" @@ -70,7 +70,7 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove - ${HDFJAVA_EXAMPLES_DATATYPES_BINARY_DIR}/${example_name}.h5 + ${PROJECT_BINARY_DIR}/${example_name}.h5 ${example_name}.out ${example_name}.out.err ) @@ -81,8 +81,8 @@ if (H5EX_BUILD_TESTING) NAME ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${HDFJAVA_EXAMPLES_DATATYPES_SOURCE_DIR}/tfiles/110/${example_name}.txt - ${HDFJAVA_EXAMPLES_DATATYPES_BINARY_DIR}/${example_name}.txt + ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}.txt + ${PROJECT_BINARY_DIR}/${example_name}.txt ) set_tests_properties (${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_jnative-h5-${example_name}-clearall-objects) set (last_test "${EXAMPLE_VARNAME}_jnative-h5-${example_name}-copy-objects") diff --git a/JAVA/Makefile.am b/JAVA/Makefile.am index eb7b7f58..f34394d1 100644 --- a/JAVA/Makefile.am +++ b/JAVA/Makefile.am @@ -23,6 +23,6 @@ include $(top_srcdir)/config/commence.am ## Only recurse into subdirectories if the Java (JNI) interface is enabled. - SUBDIRS=intro groups datasets datatypes + SUBDIRS=H5J H5G H5D H5T include $(top_srcdir)/config/conclude.am