diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2024-01-08 13:52:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-08 13:52:11 (GMT) |
commit | c0d6d9bb220bf995a268367cca88dc4febbacf99 (patch) | |
tree | 53847b4d8549e3233d58f6ecc6393787af15b098 /fortran/src | |
parent | 77de8fda28aab930294a081dedfdc2a0c6617d2f (diff) | |
download | hdf5-c0d6d9bb220bf995a268367cca88dc4febbacf99.zip hdf5-c0d6d9bb220bf995a268367cca88dc4febbacf99.tar.gz hdf5-c0d6d9bb220bf995a268367cca88dc4febbacf99.tar.bz2 |
Sync 1.14 branch with develop (#3923)
* Fix build error on freebsd (#3883)
Fixes:
checking for config freebsd12.1... no
checking for config freebsd... found
compiler '/home/svcpetsc/petsc-hash-pkgs/39f577/bin/mpicc' is GNU gcc-9.2.0
compiler '/home/svcpetsc/petsc-hash-pkgs/39f577/bin/mpif90' is GNU gfortran-9.2.0
stdout: .: cannot open ./config/classic-fflags: No such file or directory
* Correct CMake command and example packaging (#3888)
* Feat: Hashpin sensitive dependencies on GitHub Actions and enable Dependabot to update them monthly (#3892)
* feat: hashpin sensitive dependencies on GHAs
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
* feat: enable dependabot for monthly updates on GHA
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
---------
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
* Some changes to portal links when they could be found on docs.hdfgroup.org, and changed the helpdesk link to help.hdfgroup.org (#3893)
* Updated some portal links to go directly to docs.hdfgroup.
* Fixed some portal and help desk links
* Add variable option syncing for examples (#3885)
* Add period(.) at the end of the sentence for consistency. (#3897)
* Remove redundant backslash character from comment. (#3899)
* Disable doxygen as errors for netcdf (#3900)
* disable building doxygen for netcdf test
* Doc versions (#3903)
* Added missing \since tags to H5D.
* Committing clang-format changes
* Fixed H5T version info.
* Committing clang-format changes
* Added missing version info to H5E.
* Committing clang-format changes
* Added version info to H5F public APIs.
* Committing clang-format changes
* Added missing H5Z public API version info.
* Added missing version info to H5G public APIs
* Added missing version info to H5I public API.
* Added missing version info to H5 public APIs
* Committing clang-format changes
* Added missing version info to H5P public APIs
* Added missing version info to H5R public APIs
* Fix comment error.
* Committing clang-format changes
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Change Trouble Shooting to Troubleshooting (#3905)
* Implement optimized support for vector I/O in Subfiling VFD (#3896)
Vector I/O requests are now processed within a single
set of I/O call batches, rather than each I/O vector
entry (tuple constructed from the types, addrs, sizes
and bufs arrays) being processed individually. This allows I/O to be
more efficiently parallelized among the I/O concentrator processes
during large I/O requests.
* Fixed some calculations and add test cases for issues spotted from review
* Removed a variable that was compensating for previous miscalculations
* Add 'warning density' computation to the warnhist script (#3910)
* Add 'warning density' computation to the warnhist script, along with several
cleanups to it. Add "--enable-show-all-warnings" configure (and CMake)
option to disable compiler diagnostic suppression (and therefore show all the
otherwise suppressed compiler diagnostics), disabled by default. Clean up
a buncn of misc. warnings.
Signed-off-by: Quincey Koziol <qkoziol@amazon.com>
* Added H5Fdelete_f with test (#3912)
* New Fortran Examples added (#3916)
* added subfiling example
* Added filtered writes with no selection example
* Version and space corrections.
* Restore H5_VERSION definition in configure.ac.
* renamed defined H5_VERS* to avoid conflicts (#3926)
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | fortran/src/H5Fff.F90 | 43 | ||||
-rw-r--r-- | fortran/src/H5_f.c | 2 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 6 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.cmake | 25 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.in | 18 | ||||
-rw-r--r-- | fortran/src/H5f90global.F90 | 6 | ||||
-rw-r--r-- | fortran/src/Makefile.am | 2 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 1 |
9 files changed, 96 insertions, 9 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 87557db..60c0c3a 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -431,6 +431,7 @@ if (BUILD_STATIC_LIBS) FILES ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/H5config_f.inc DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT @@ -441,6 +442,7 @@ else () FILES ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/H5config_f.inc DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index d311177..79aa5a7 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -256,6 +256,43 @@ CONTAINS !> !! \ingroup FH5F !! +!! \brief Deletes an HDF5 file +!! +!! \param name Name of the file to delete +!! \param hdferr \fortran_error +!! \param access_prp File access property list identifier +!! +!! See C API: @ref H5Fdelete() +!! + SUBROUTINE h5fdelete_f(name, hdferr, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: access_prp + + INTEGER(HID_T) :: access_prp_default + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + + INTERFACE + INTEGER(C_INT) FUNCTION H5Fdelete(name, access_prp_default) BIND(C,NAME='H5Fdelete') + IMPORT :: C_CHAR, C_INT + IMPORT :: HID_T + CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name + INTEGER(HID_T), VALUE :: access_prp_default + END FUNCTION H5Fdelete + END INTERFACE + + c_name = TRIM(name)//C_NULL_CHAR + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + + hdferr = INT(H5Fdelete(c_name, access_prp_default)) + + END SUBROUTINE h5fdelete_f +!> +!! \ingroup FH5F +!! !! \brief Asynchronously flushes all buffers associated with a file to disk. !! !! \param object_id Identifier of object used to identify the file. @@ -285,7 +322,7 @@ CONTAINS INTEGER(KIND=C_INT) :: line_default = 0 INTERFACE - INTEGER FUNCTION H5Fflush_async(file, func, line, object_id, scope, es_id) & + INTEGER(C_INT) FUNCTION H5Fflush_async(file, func, line, object_id, scope, es_id) & BIND(C,NAME='H5Fflush_async') IMPORT :: C_CHAR, C_INT, C_PTR IMPORT :: HID_T @@ -303,8 +340,8 @@ CONTAINS IF(PRESENT(func)) func_default = func IF(PRESENT(line)) line_default = INT(line, C_INT) - hdferr = H5Fflush_async(file_default, func_default, line_default, & - object_id, INT(scope, C_INT), es_id) + hdferr = INT(H5Fflush_async(file_default, func_default, line_default, & + object_id, INT(scope, C_INT), es_id)) END SUBROUTINE h5fflush_async_f !> diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 0392c2b..b1dc7db 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -771,6 +771,8 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid * H5S flags */ h5s_hid_flags[0] = (hid_t_f)H5S_ALL; + h5s_hid_flags[1] = (hid_t_f)H5S_BLOCK; + h5s_hid_flags[2] = (hid_t_f)H5S_PLIST; h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 05a48ac..fe6337a 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -139,7 +139,7 @@ MODULE H5LIB INTEGER, DIMENSION(1:H5S_FLAGS_LEN) :: H5S_flags INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 INTEGER(HSIZE_T), DIMENSION(1:H5S_HSIZE_FLAGS_LEN) :: H5S_hsize_flags - INTEGER, PARAMETER :: H5S_HID_FLAGS_LEN = 1 + INTEGER, PARAMETER :: H5S_HID_FLAGS_LEN = 3 INTEGER(HSIZE_T), DIMENSION(1:H5S_HID_FLAGS_LEN) :: H5S_hid_flags ! ! H5T flags declaration @@ -632,7 +632,9 @@ CONTAINS ! ! H5S flags ! - H5S_ALL_F = H5S_hid_flags(1) + H5S_ALL_F = H5S_hid_flags(1) + H5S_BLOCK_F = H5S_hid_flags(2) + H5S_PLIST_F = H5S_hid_flags(3) H5S_UNLIMITED_F = H5S_hsize_flags(1) diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index 6652076..77ff707 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -9,7 +9,7 @@ ! If you do not have access to either file, you may request a copy from * ! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure +! fortran/H5config_f.inc. Generated from fortran/src/H5config_f.inc.cmake by CMake ! Define if there is parallel support #cmakedefine01 CMAKE_H5_HAVE_PARALLEL @@ -28,8 +28,8 @@ #endif ! Define if on APPLE -#cmakedefine01 H5_HAVE_DARWIN -#if H5_HAVE_DARWIN == 0 +#cmakedefine01 CMAKE_H5_HAVE_DARWIN +#if CMAKE_H5_HAVE_DARWIN == 0 #undef H5_HAVE_DARWIN #else #define H5_HAVE_DARWIN @@ -116,3 +116,22 @@ #else #define H5_NO_DEPRECATED_SYMBOLS #endif + +! For major interface/format changes +#define H5_VERS_MAJOR @H5_VERS_MAJOR@ + +! For minor interface/format changes +#define H5_VERS_MINOR @H5_VERS_MINOR@ + +! For tweaks, bug-fixes, or development +#define H5_VERS_RELEASE @H5_VERS_RELEASE@ + +! macros for comparing versions +#define H5_VERSION_GE(Maj, Min, Rel) \ + (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE >= Rel)) || \ + ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR > Min)) || (H5_VERS_MAJOR > Maj)) + +#define H5_VERSION_LE(Maj, Min, Rel) \ + (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE <= Rel)) || \ + ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR < Min)) || (H5_VERS_MAJOR < Maj)) + diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 3aeded9..afcfa6e 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -80,3 +80,21 @@ ! Define if deprecated public API symbols are disabled #undef NO_DEPRECATED_SYMBOLS +! For major interface/format changes +#undef VERS_MAJOR_TMP + +! For minor interface/format changes +#undef VERS_MINOR_TMP + +! For tweaks, bug-fixes, or development +#undef VERS_RELEASE_TMP + +! macros for comparing versions +#define VERSION_GE(Maj, Min, Rel) \ + (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE >= Rel)) || \ + ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR > Min)) || (H5_VERS_MAJOR > Maj)) + +#define VERSION_LE(Maj, Min, Rel) \ + (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE <= Rel)) || \ + ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR < Min)) || (H5_VERS_MAJOR < Maj)) + diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index aa04623..fb25f7e 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -773,6 +773,8 @@ MODULE H5GLOBAL !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: H5S_UNLIMITED_F !DEC$ATTRIBUTES DLLEXPORT :: H5S_ALL_F + !DEC$ATTRIBUTES DLLEXPORT :: H5S_BLOCK_F + !DEC$ATTRIBUTES DLLEXPORT :: H5S_PLIST_F !DEC$ATTRIBUTES DLLEXPORT :: H5S_SCALAR_F !DEC$ATTRIBUTES DLLEXPORT :: H5S_SIMPLE_F !DEC$ATTRIBUTES DLLEXPORT :: H5S_NULL_F @@ -796,7 +798,9 @@ MODULE H5GLOBAL !> @{ INTEGER(HSIZE_T) :: H5S_UNLIMITED_F !< H5S_UNLIMITED - INTEGER(HID_T) :: H5S_ALL_F !< H5S_ALL + INTEGER(HID_T) :: H5S_ALL_F !< H5S_ALL + INTEGER(HID_T) :: H5S_BLOCK_F !< H5S_BLOCK + INTEGER(HID_T) :: H5S_PLIST_F !< H5S_PLIST INTEGER :: H5S_SCALAR_F !< H5S_SCALAR INTEGER :: H5S_SIMPLE_F !< H5S_SIMPLE diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index d42a41d..44561f6 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -75,6 +75,7 @@ install-data-local: fi $(CP) $(top_builddir)/$(subdir)/H5f90i_gen.h $(DESTDIR)$(includedir)/. $(CP) $(top_srcdir)/fortran/src/H5f90i.h $(DESTDIR)$(includedir)/. + $(CP) $(top_builddir)/$(subdir)/H5config_f.inc $(DESTDIR)$(includedir)/. uninstall-local: @if test -n "$(F9XMODEXT)" -a "X$(F9XMODEXT)" != "Xo"; then \ @@ -84,6 +85,7 @@ uninstall-local: fi; \ $(RM) $(DESTDIR)$(bindir)/$(H5FC_NAME) $(RM) $(DESTDIR)$(includedir)/H5f90i*.h + $(RM) $(DESTDIR)$(includedir)/H5config_f.inc # Also install and uninstall (uninstall-local above) h5fc script install-exec-local: diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 55f4f2b..119e140 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -121,6 +121,7 @@ H5ES_mp_H5ESGET_ERR_COUNT_F H5ES_mp_H5ESCLOSE_F ; H5F H5F_mp_H5FCREATE_F +H5F_mp_H5FDELETE_F H5F_mp_H5FCREATE_ASYNC_F H5F_mp_H5FFLUSH_F H5F_mp_H5FFLUSH_ASYNC_F |