Commit Graph
412 Commits
Author SHA1 Message Date
Scot Breitenfeld 5711c7466f Update the version to 2.1 (#6147)
Update version to 2.1 and derive version information from H5public.h, removing h5vers script and updating CMake and Java configurations.

Versioning:
Update version to 2.1 in H5public.h.
Derive version strings in H5public.h using macros.
CMake:
Extract version from H5public.h in HDF5config.cmake and HDF5AsSubdirMacros.cmake.
Configure README.md and CHANGELOG.md using CMakeLists.txt.
Java:
Generate H5Version.java from H5public.h for version consistency.
Update H5.java to use H5Version for version constants.
Removals:
Delete bin/h5vers script, previously used for version management.
2026-01-21 23:02:49 -06:00
Matt L 45ef979479 Fix use of incorrect HDF5 parallel option name (#6096) 2025-12-08 13:59:25 -06:00
Allen Byrne b754dcb8f2 Move Java wrappers to FFM using jextract and java 25 (#5957)
FFM build requires Java 25, Jextract 25.
Generates FFM bindings during configure.
JNI is default when the requirements are not met or can be forced.
Presets added for maven and FFM - JNI is default selection.
Enhanced Maven options will work with either JNI or FFM
New Workflows for testing and maven uploads.
Extensive documentation changes for java.
2025-11-04 14:03:06 -06:00
Allen Byrne 4202ae830c Adjust HDF5Examples HDF5 version var to correct version check issue for 2.0 (#5926)
Adjusts H5_LIBVER_DIR in CMakeLists.txt to include release version for major versions above 1, fixing #5925.
2025-10-23 10:40:32 -05:00
Allen Byrne fb35cde24a Rework Fortran configure to allow cross compile overrides (#5720)
Behavior:
Modify HDF5UseFortran.cmake to handle cross-compilation by providing default KINDs and sizes when CMAKE_CROSSCOMPILING is true.
Default values for INTEGER and REAL KINDs and their sizes are set when cross-compiling.
Error messages are adjusted to reflect cross-compilation scenarios.
Logic:
Conditional checks added for CMAKE_CROSSCOMPILING to determine if default values should be used.
Default values include INTEGER KINDs {1,2,4,8,16} and REAL KINDs {4,8,10,16}.
Default sizes for native kinds are set to 4 for INTEGER and REAL, and 8 for DOUBLE PRECISION when cross-compiling.
Misc:
Adjustments to verbose messages to indicate when defaults are used during cross-compilation.
2025-10-12 17:30:46 -05:00
Dana Robinson f475d00cce Move H5pubconf.h.in from config to src (#5822) 2025-09-15 14:45:53 -05:00
Allen Byrne 00c0438cbe Fix conditional check for CMAKE_BUILD_TYPE (#5751)
The default is the empty string therefore it is defined
2025-08-29 11:14:53 -05:00
Allen Byrne 09b81e98e3 Make sure there is a CMAKE_BUILD_TYPE available (#5741) 2025-08-28 08:38:49 -05:00
Allen Byrne 63803d7115 allow better CMake version testing (#5727)
* add cmake latest workflow with lukka/get-cmake@latest
* Upgrade minimum CMake version to 3.26
2025-08-23 06:43:20 -05:00
Allen Byrne fb7d62841f Separate the cacheinit file into options and values (#5725) 2025-08-15 11:10:49 -05:00
Allen Byrne 497b65ad0f Add file header comments to CMake files (#5688) 2025-08-13 07:19:57 -05:00
Allen Byrne f8aa8aa1ba Improve the installation and usage docs for CMake (#5636)
* Workflow presets introduced in version CMake 3.25
2025-07-28 09:14:35 -05:00
Allen Byrne ed5c07223a Create a file containing the major CMake options (#5666) 2025-07-18 14:47:02 -05:00
jhendersonHDF a76c21b244 Fix Fortran name mangling in test library (#5661) 2025-07-14 06:19:57 -05:00
Allen Byrne 0509e66208 Add cmake_dependent_option command (#5635)
* Add subfiling option to cmake_dependent option format
* Set the default option state to a hard value
2025-07-12 10:16:54 -05:00
Allen Byrne f9ebbb9ab2 Move fortran flags processing after fortran enabled (#5627) 2025-07-10 10:31:47 -05:00
Matt L 3b054fe7cc Always build test generators (#5622) 2025-06-23 07:47:05 -05:00
Allen Byrne 029bca0540 Fix threads and variables in Cmake. (#5523)
* Rework threading options

* Use link variables for Threads and MPI
2025-06-03 11:04:39 -05:00
Allen Byrne aa9784ea25 Refactor the config/cmake folder #5446 (#5540)
* Update config/examples/HDF5AsSubdirMacros.cmake
* Move f90 config file and remove m4 dir
2025-05-22 11:20:51 -05:00
Michał Górny edb930f367 h5cc: Allow overriding the compilers written into the file (#5467)
* h5cc: Allow overriding the compilers written into the file

Add a set of `HDF5_H5CC_C_COMPILER`, `HDF5_H5CC_CXX_COMPILER`
and `HDF5_H5CC_Fortran_COMPILER` CMake variables that can be used to
override the compiler string written into `h5cc`, `h5c++`, etc.  This is
particularly useful when e.g. using ccache during the build,
as the ccache path otherwise ends up in `h5cc`.
2025-04-25 17:00:48 -05:00
Allen Byrne af34892134 Update java test jars (#5385) 2025-03-18 11:09:10 -05:00
Allen Byrne d81ae5586a Add presets cookbook and use cases (#5323)
* RPM has issue with packaging RPM of a parallel library
2025-02-27 09:58:03 -06:00
Allen Byrne 2f4f6902cd Use only one find_package call for zlib. (#5280) 2025-02-14 11:22:23 -06:00
Allen Byrne 2ad03911d9 Convert doc folder files to doxygen (#5216) 2025-01-17 11:48:58 -06:00
Allen Byrne 655403a3b4 Correct CMake option usage and dependencies (#5188) 2024-12-31 16:46:45 -06:00
Quincey Koziol 331193f357 Add new multithreaded concurrency configuration (#5015)
Added infrastructure support for multithreaded concurrency by adding an optional way to switch to using a non-recursive R/W lock for the global API lock. This is enabled with a new 'concurrency' configuration flag for the autotools & CMake builds, which is disabled by default.

When the 'concurrency' build option is chosen, the global API lock will use the R/W lock and all API calls currently will acquire a write lock, ensuring exclusive access by one thread. Over time, the API routines that are converted to support multithreaded concurrency will switch to acquiring a read lock instead.

Reentering the library from application callbacks is managed by the 'disable locking for this thread' (DLFTT) threadsafety protocol. This is internally handled within the H5_API_LOCK / H5_API_UNLOCK macros in H5private.h (as before), which invoke the 'dlftt' routines in H5TSint.c.

To support this change, the threadsafety configuration macros for the library have been updated:
- --enable-threadsafe now defines the H5_HAVE_THREADSAFE macro
- --enable-concurrency defines the H5_HAVE_CONCURRENCY macro
The new H5_HAVE_THREADSAFE_API macro is set if either H5_HAVE_THREADSAFE or H5_HAVE_CONCURRENCY is enabled.

New Github actions are added to include the concurrency configuration in the CI for the develop branch.

To support the new non-recursive R/W locking for API routines, some other changes are necessary:

Added macro wrappers around all callback invocations that could call an
application function, and therefore re-enter the library:
H5_BEFORE_USER_CB* / H5_AFTER_USER_CB*

Added H5_user_cb_prepare / H5_user_cb_restore routines that save the
state of the library when callback leaves the library. Includes error
stack and threadsafe reentry state currently.

There's also some small cleanups to various places in the library:

Moved the H5E_mpi_error_str / H5E_mpi_error_str_len globals to be local for
pushing MPI errors, so that multiple threads can't interfere with each
other.

Added H5TS_rwlock_trywrlock() routine to R/W lock interface.

Emulate R/W locks on MacOS because its implementation of
pthread_rwlock_wrlock() does not conform to the POSIX standard.

Don't acquire the global API lock in H5close, since it's acquired in H5_term_library, which is necessary because H5_term_library is invoked via other code paths that don't hold the global API lock.

Don't call H5Eget_auto2 API routine within H5_term_library.

Switched 'return NULL' in H5allocate_memory to HGOTO_DONE(NULL).

Switched H5Pget_file_space_strategy / H5Pset_file_space_strategy to use
internal routines instead of API routines.

Switched H5Oopen_by_addr & H5Ovisit1 to use internal routines instead of
API routines.

Fixed a few places in src/H5Odeprec.c where a major
error ID was passed as a minor ID.
2024-12-19 01:35:21 -08:00
Allen Byrne d09ea66934 Rename HDF5_ENABLE_Z_LIB_SUPPORT to HDF5_ENABLE_ZLIB_SUPPORT (#5074) 2024-11-05 15:59:28 -06:00
Allen Byrne ad3ea2633a Move hl example into HDF5Examples (#5057) 2024-11-04 05:22:27 -08:00
Allen Byrne 5425a571e0 Convert develop to v2.0.0 (#5006)
Switches previous 1.16/17/18 values to 2.0
2024-10-27 21:51:07 -07:00
Allen ByrneandLarry Knox 6122828198 Split out compiler flags into specific compiler files (#4974)
* Split CMake HDFCompileFlags into specific compiler files

* Separate out CXX Flags

* Add Fortran compiler specific files

* Merge in #4816 changes and close #4816

* fix hanging endif

---------

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2024-10-25 10:03:35 -05:00
Allen Byrne baa1e8e292 Prefix remaining CMake options except for CMake BUILD* variables (#4990) 2024-10-22 15:40:54 -07:00
Allen Byrne 6e8c7a9597 add analysis and coverage to CDash reports (#4938)
* Add sanitzers and coverage workflows
* add UndefinedBehavior sanitize
2024-10-10 13:16:36 -05:00
Allen Byrne 861e5ab600 Correct default version 2024-10-02 19:53:38 -05:00
Allen Byrne 07756c87f5 Update develop to 1.18 API 2024-10-02 19:53:38 -05:00
jhendersonHDF 34d6ef545a Refactor h5test.c, testframe.c and testpar.h testing frameworks (#4891)
Added new testframe.h header to document testing framework functions and
split them away from h5test.h and from test programs that don't
integrate with the testframe.c testing framework

Added new test setup callback to testframe.c testing framework

Added parameters to AddTest() to specify size of test parameters so they
can be copied for later use

Enabled HDF5 error stacks in testframe.c framework by default and added
some error stack suppressions to some testhdf5 tests

Added new maxthreads option to testframe.c framework to allow specifying
the maximum number of threads a multi-threaded test can use

Moved TestExpress functionality out of testframe.c and into more general
h5test.c for wider use by tests through getter and setter

Updated some tests to not mix and match functionality between h5test.c/h
and testframe.c/h

Moved some functionality from testphdf5.h into testpar.h for parallel
tests that aren't part of testphdf5

Added new parallel test library that contains common shared
functionality for parallel tests (similar to h5test library)
2024-10-01 16:10:03 -05:00
Quincey Koziol 9fd88560d5 Refactor threading and other concurrency support (#4469)
Complete overhaul of the concurrency-related aspects of the library (threading, atomics, locking, etc.), adding private routines in the H5TS package to allow internal algorithms to use all of these capabilities.

Adds many new features & components in the H5TS package that are equivalent to common concurrency data structures and capabilities: "regular" and recursive mutices, condition variables, semaphores, thread barriers, 'once' support, thread pools, atomic variables, thread-local keys, and spawning & joining internal threads.

Now supports C11, pthreads, and Windows threading for all H5TS capabilities, except the recursive readers/writers lock, which is not supported on Windows (because Windows threads don't provide a callback on thread-local variable deletion).

The "global" API lock is switched to use a recursive mutex from the H5TS package, instead of its own variant.

API context code (H5CX package) and error stacks (H5E package) now use the common thread-local info, instead of their own variants.

Subfiling code is switched from using Mercury threading features to the new internal H5TS features.

Removes the mercury threading code.

Adds a configure option (--enable-threads / HDF5_ENABLE_THREADS), enabled by default, to control whether threading is enabled within the library.
2024-07-31 12:34:43 -05:00
Allen Byrne b3e1d6b862 Fixed usage issue with FindZLIB.cmake module (#4655)
* Add a comment on the FindZLIB.cmake module usage

* Allow choice of static/shared compression libs for Find Module

* Added new option to INSTALL_CMake file and changed option text
2024-07-16 14:21:43 -05:00
Allen Byrne 7d68732104 Skip examples if running sanitizers (#4592) 2024-06-20 16:03:16 -05:00
Allen Byrne 162e7d676d Allow HDF5_LIB_INFIX to work with DLL (#4500)
* Allow HDF5_LIB_INFIX to work with DLL

* Separate individual library name into parts and add suffix option

* Java cannot use alternative names and removed extra setting

* Incorporate the underscore into the CORE name
2024-05-28 08:27:15 -07:00
Allen Byrne f17ca5689e Update for blosc2 in plugins and prefix hdf5 cmake varnames (#4468) 2024-05-10 13:01:28 -05:00
Allen Byrne 1d3b22456c sanitizer flags need set before compiler flags (#4444) 2024-04-27 10:14:03 -05:00
Allen Byrne f155eef5bc Fix CXX sanitizer by moving marco include to after CXX code. (#4414) 2024-04-17 07:54:40 -05:00
Scot Breitenfeld 8b5644a0cd Report build options of VFDs (#4304)
* changed to if string contains instead

* return status of VFDs in libhdf5.settings

* use *_ENABLE_* settings instead to report the state

* added map state

* updated resetting status if cmake option fails
2024-04-02 13:24:02 -05:00
Allen Byrne eacb0157dc Rework Fortran macros to use the proper code. (#4240) 2024-03-26 09:20:11 -05:00
Dana Robinson 68e8c0e627 Remove HAVE_IOEO checks from CMake (#4160)
This was intended to check for thread-safety functionality on Windows.
The required functionality has been standard since Windows Vista, so
these checks can be removed.
2024-03-16 12:01:24 -07:00
H. Joe Lee 78a5d8a70b Capitalize option message for consistency. (#4141) 2024-03-15 05:33:20 -07:00
Allen Byrne 7ce8c6f81a Add options to allow tools type selection and naming (#4046) 2024-03-04 06:53:52 -08:00
Allen Byrne 6b22af7c43 Add abi-complience check and upload to releases (#3996) 2024-02-08 07:58:08 -06:00
Scot Breitenfeld d79667eb0c Add API support for Fortran MPI_F08 module definitions. (#3959)
* revert to using c-stub for _F08 MPI APIs

* use mpi compiler wrappers for cmake and nvhpc
2024-01-29 13:13:33 -06:00
Allen Byrne 365e23340c Fix doxygen errors (#3962)
* Switch warnings as errors to default OFF

* Enable mac docs

* Add doxygen action uses step

* Use html div around snippet

* Allow preset name to be an argument to cmake-ctest.yml
2024-01-29 07:38:54 -06:00