From 16ac8f74d4fa72c9092b6701bca1328770aa9dbe Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Fri, 22 Sep 2023 08:40:56 -0500 Subject: [PATCH 1/7] Check return values from HDF5 API calls. (#3556) --- testpar/t_init_term.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c index 929bb59890d..0268e3d9eca 100644 --- a/testpar/t_init_term.c +++ b/testpar/t_init_term.c @@ -37,11 +37,9 @@ main(int argc, char **argv) MPI_Finalize(); - nerrors += GetTestNumErrs(); - /* test if we can initialize the library with MPI being finalized and create a file serially */ - H5open(); + VRFY((H5open() >= 0), "H5open succeeded"); if (mpi_rank == 0) { char filename[1024]; @@ -54,7 +52,7 @@ main(int argc, char **argv) file_id = -1; } - H5close(); + VRFY((H5close() >= 0), "H5close succeeded"); if (MAINPROCESS) { if (0 == nerrors) From dece6256bff8ee8b04ed63376233c03568e4edb1 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 22 Sep 2023 08:41:57 -0500 Subject: [PATCH 2/7] Adds link to h5fuse.sh in testpar for autotools (#3557) * Make the h5fuse.sh utility available to parallel subfiling tests so h5fuse testing is not skipped. --- .github/workflows/linux-nvhpc.yml | 2 +- .github/workflows/main-auto-par.yml | 2 ++ configure.ac | 5 +++++ src/H5FDsubfiling/H5FDioc.c | 3 +++ src/H5FDsubfiling/H5FDsubfile_int.c | 1 + src/H5FDsubfiling/H5FDsubfiling_priv.h | 2 ++ src/H5FDsubfiling/H5subfiling_common.c | 3 ++- 7 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-nvhpc.yml b/.github/workflows/linux-nvhpc.yml index 7a24b07c3eb..06fd40a7c4f 100644 --- a/.github/workflows/linux-nvhpc.yml +++ b/.github/workflows/linux-nvhpc.yml @@ -50,7 +50,7 @@ jobs: export OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/cuda/12.2/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH - cmake -B build -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=ON + cmake -B build -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=ON cat build/CMakeCache.txt cmake --build build ctest --test-dir build --output-on-failure diff --git a/.github/workflows/main-auto-par.yml b/.github/workflows/main-auto-par.yml index 5f92836595e..790b20ae3fe 100644 --- a/.github/workflows/main-auto-par.yml +++ b/.github/workflows/main-auto-par.yml @@ -54,6 +54,7 @@ jobs: --with-default-api-version=v114 \ --enable-shared \ --enable-parallel \ + --enable-subfiling-vfd \ --disable-cxx \ --disable-fortran \ --disable-java \ @@ -111,6 +112,7 @@ jobs: --with-default-api-version=v114 \ --enable-shared \ --enable-parallel \ + --enable-subfiling-vfd \ --disable-cxx \ --disable-fortran \ --disable-java \ diff --git a/configure.ac b/configure.ac index fadd1c1f47c..15f7bb4e69e 100644 --- a/configure.ac +++ b/configure.ac @@ -4206,6 +4206,11 @@ AC_CONFIG_FILES([Makefile hl/fortran/examples/run-hlfortran-ex.sh]) AC_CONFIG_FILES([utils/subfiling_vfd/h5fuse.sh], [chmod +x utils/subfiling_vfd/h5fuse.sh]) +if test -n "$TESTPARALLEL"; then + if test "X$SUBFILING_VFD" = "Xyes"; then + AC_CONFIG_LINKS([testpar/h5fuse.sh:utils/subfiling_vfd/h5fuse.sh]) + fi +fi AC_CONFIG_COMMANDS([.classes], [], [$MKDIR_P java/src/.classes; $MKDIR_P java/test/.classes; diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index 0dfcc3607d9..cff80c7829d 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -32,6 +32,8 @@ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ +#define CANBE_UNUSED(X) (void)(X) + /* The driver identification number, initialized at runtime */ static hid_t H5FD_IOC_g = H5I_INVALID_HID; @@ -1223,6 +1225,7 @@ H5FD__ioc_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS H5FD_IOC_LOG_CALL(__func__); assert(file && file->pub.cls); + CANBE_UNUSED(file); assert(buf); /* Check for overflow conditions */ diff --git a/src/H5FDsubfiling/H5FDsubfile_int.c b/src/H5FDsubfiling/H5FDsubfile_int.c index 68deb832adf..cb210b6e4a6 100644 --- a/src/H5FDsubfiling/H5FDsubfile_int.c +++ b/src/H5FDsubfiling/H5FDsubfile_int.c @@ -347,6 +347,7 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr) assert(ioc_rank >= 0); assert(ioc_rank < n_io_concentrators); + CANBE_UNUSED(ioc_rank); assert(sf_eofs[i] == -1); sf_eofs[i] = recv_msg[(3 * i) + 1]; diff --git a/src/H5FDsubfiling/H5FDsubfiling_priv.h b/src/H5FDsubfiling/H5FDsubfiling_priv.h index 08fef7d1a01..9cc32f14abf 100644 --- a/src/H5FDsubfiling/H5FDsubfiling_priv.h +++ b/src/H5FDsubfiling/H5FDsubfiling_priv.h @@ -63,4 +63,6 @@ H5_DLL herr_t H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_e } #endif +#define CANBE_UNUSED(X) (void)(X) + #endif /* H5FDsubfiling_priv_H */ diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c index 50ca6afcb31..0362ab40d89 100644 --- a/src/H5FDsubfiling/H5subfiling_common.c +++ b/src/H5FDsubfiling/H5subfiling_common.c @@ -1365,7 +1365,8 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm) if (app_layout->layout[i].node_local_rank == 0) app_layout->node_count++; - assert(app_layout->node_count > 0); + if (app_layout->node_count <= 0) + H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "node count less than or equal to zero"); if (NULL == (app_layout->node_ranks = malloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks)))) From 197596b085c15232e7148e9cb309ca904c24269e Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 22 Sep 2023 08:44:31 -0500 Subject: [PATCH 3/7] Some minor formatting and text changes (#3563) --- doxygen/Doxyfile.in | 38 -------------------------------- doxygen/dox/ExamplesAPI.dox | 2 +- fortran/testpar/CMakeTests.cmake | 2 +- 3 files changed, 2 insertions(+), 40 deletions(-) diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in index cddf17cdf2a..b24b9f9e509 100644 --- a/doxygen/Doxyfile.in +++ b/doxygen/Doxyfile.in @@ -913,35 +913,6 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files -# were built. This is equivalent to specifying the "-p" option to a clang tool, -# such as clang-check. These options will then be passed to the parser. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1080,15 +1051,6 @@ HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will diff --git a/doxygen/dox/ExamplesAPI.dox b/doxygen/dox/ExamplesAPI.dox index 8f88c4eb4b9..a6fbab129a3 100644 --- a/doxygen/dox/ExamplesAPI.dox +++ b/doxygen/dox/ExamplesAPI.dox @@ -7,7 +7,7 @@ Navigate back: \ref index "Main" / \ref GettingStarted The C, FORTRAN and Java examples below point to the examples in the hdf5-examples github repository. Examples for older versions of HDF5 are handled by setting the appropriate USE_API_xxx definition. HDF5-1.6 examples are in a "16"-named subdirectory. -The Java examples are in the HDF5-1.10 source code, and the Java Object package examples are in the HDFView source. +The Java examples are in the develop source code, and the Java Object package examples are in the HDFView source. Please note that you must comment out the "package" statement at the top when downloading a Java Object example individually. The MATLAB and Python examples were generously provided by a user and are not tested. diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake index 1d893d5719b..8c157241500 100644 --- a/fortran/testpar/CMakeTests.cmake +++ b/fortran/testpar/CMakeTests.cmake @@ -16,4 +16,4 @@ ############################################################################## ############################################################################## add_test (NAME MPI_TEST_FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) -add_test (NAME MPI_TEST_FORT_subfiling_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) \ No newline at end of file +add_test (NAME MPI_TEST_FORT_subfiling_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) From f994aa5956f18e8a3a6e61fddd7751caae410602 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Fri, 22 Sep 2023 08:44:53 -0500 Subject: [PATCH 4/7] Fix typos and grammar in t_pread. (#3565) --- testpar/t_pread.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index fe4ed758e54..b16675bd452 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -36,7 +36,7 @@ const char *FILENAMES[NFILENAME + 1] = {"reloc_t_pread_data_file", "reloc_t_prea bool pass = true; static const char *random_hdf5_text = "Now is the time for all first-time-users of HDF5 to read their \ -manual or go thru the tutorials!\n\ +manual or go through the tutorials!\n\ While you\'re at it, now is also the time to read up on MPI-IO."; static const char *hitchhiker_quote = "A common mistake that people make when trying to design something\n\ @@ -359,7 +359,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) /* Add a userblock to the head of the datafile. * We will use this to for a functional test of the - * file open optimization. This is superblock + * file open optimization. This superblock * relocation is done by the rank 0 process associated * with the communicator being used. For test 1, we * utilize MPI_COMM_WORLD, so group_rank 0 is the @@ -464,7 +464,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) * * The global MPI rank is used for reading and * writing data for process specific data in the - * dataset. We do this rather simplisticly, i.e. + * dataset. We do this rather simplistically, i.e. * rank 0: writes/reads 0-9999 * rank 1: writes/reads 1000-1999 * rank 2: writes/reads 2000-2999 @@ -1032,7 +1032,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) * * The test consists of creating two separate HDF datasets * in which random text is inserted at the start of each - * file using the 'j5jam' application. This forces the + * file using the 'h5jam' application. This forces the * HDF5 file superblock to a non-zero offset. * Having created the two independent files, we create two * non-overlapping MPI groups, each of which is then tasked @@ -1055,13 +1055,13 @@ main(int argc, char **argv) MPI_Comm group_comm = MPI_COMM_NULL; /* I don't believe that argv[0] can ever be NULL. - * It should thus be safe to dup and save as a check - * for cmake testing. Note that in our Cmake builds, + * It should thus be safe to duplicate and save as a check + * for CMake testing. Note that in our CMake builds, * all executables are located in the same directory. * We assume (but we'll check) that the h5jam utility * is in the directory as this executable. If that * isn't true, then we can use a relative path that - * should be valid for the autotools environment. + * should be valid for the Autotools environment. */ test_argv0 = strdup(argv[0]); From 9d41d478ef69eeac2c471aed248127445ff6daf7 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Fri, 22 Sep 2023 08:45:10 -0500 Subject: [PATCH 5/7] Fix typo (givin->given) in test/testframe.c. (#3567) --- test/testframe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testframe.c b/test/testframe.c index 310886f6dd7..13cdf0eb3ec 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -167,7 +167,7 @@ TestUsage(void) print_func("verbose controls the amount of information displayed\n"); print_func("exclude to exclude tests by name\n"); print_func("only to name tests which should be run\n"); - print_func("begin start at the name of the test givin\n"); + print_func("begin start at the name of the test given\n"); print_func("summary prints a summary of test results at the end\n"); print_func("cleanoff does not delete *.hdf files after execution of tests\n"); print_func("help print out this information\n"); From d920a45413fc55079d0c829b35bfb9794ae8fe55 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Fri, 22 Sep 2023 08:45:50 -0500 Subject: [PATCH 6/7] Fix ifx unused variable hdferr warning. (#3568) --- fortran/src/H5Aff.F90 | 3 +++ release_docs/RELEASE.txt | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 3cb1191b3de..a55773a0c1f 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -1131,6 +1131,9 @@ END FUNCTION H5Aopen_by_idx attr_id = INT(H5Aopen_by_idx(loc_id, c_obj_name, INT(idx_type, C_INT), INT(order, C_INT), n, & aapl_id_default, lapl_id_default), HID_T) + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + END SUBROUTINE h5aopen_by_idx_f !> diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 985cbf57e51..fa088951d89 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -240,6 +240,10 @@ New Features Fortran Library: ---------------- + + - Fixed an uninitialized error return value for hdferr + to return the error state of the h5aopen_by_idx_f API. + - Added h5pget_vol_cap_flags_f and related Fortran VOL capability definitions. From e64c946e14d752f22a29723b1819301b782fe205 Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Fri, 22 Sep 2023 08:46:19 -0500 Subject: [PATCH 7/7] Correct comments about H5Z_FILTER_NONE (#3572) --- c++/src/H5DcreatProp.cpp | 2 +- java/src/hdf/hdf5lib/H5.java | 2 +- src/H5Pocpl.c | 2 +- src/H5Z.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 3d0193dbec0..8b199a8091b 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -368,7 +368,7 @@ DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t ///\exception H5::PropListIException ///\par Description /// Deletes a filter from the dataset creation property list; -/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE. +/// deletes all filters if \a filter_id is \c H5Z_FILTER_ALL. //-------------------------------------------------------------------------- void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index ea51512ec9f..77029904297 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -8607,7 +8607,7 @@ public synchronized static native boolean H5Pall_filters_avail(long dcpl_id) * @ingroup JH5P * * H5Premove_filter deletes a filter from the dataset creation property list; - * deletes all filters if filter is H5Z_FILTER_NONE + * deletes all filters if filter is H5Z_FILTER_ALL * * @param obj_id * IN: Property list identifier. diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 95cc0bdb793..ca70e1a6204 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -1001,7 +1001,7 @@ H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id) * Function: H5Premove_filter * * Purpose: Deletes a filter from the dataset creation property list; - * deletes all filters if FILTER is H5Z_FILTER_NONE + * deletes all filters if FILTER is H5Z_FILTER_ALL * * Return: Non-negative on success/Negative on failure * diff --git a/src/H5Z.c b/src/H5Z.c index ef2e2760250..b514f628887 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -1568,7 +1568,7 @@ H5Z_all_filters_avail(const H5O_pline_t *pline) * Function: H5Z_delete * * Purpose: Delete filter FILTER from pipeline PLINE; - * deletes all filters if FILTER is H5Z_FILTER_NONE + * deletes all filters if FILTER is H5Z_FILTER_ALL * * Return: Non-negative on success * Negative on failure