Commit Graph

679 Commits

Author SHA1 Message Date
H. Joe Lee
d587796f2c
Improve the consistency of configure help messages (#4783)
Fix grammar in configure message
2024-08-29 09:00:03 -07: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
Gerd Heber
4cbdf1a5f8
Feature/awesome (#4604)
* Added Doxygen Awesome and fixed a few quirks.

* Fixed unterminated strings.

* Added Doxygen Awesome by copy.
2024-07-15 08:11:58 -05:00
Dana Robinson
9b5d9680af
Clean up Fortran __float128 configure-time checks (#4649)
* Always use DECIMAL_DIG instead of LDBL_DIG. This was controlled by
  an ifdef that is always true in C99 or greater

It's confusing to use float.h C constants as variable names in
configure.ac and the PAC_FC_LDBL_DIG macro.

* Directly compare MY_FLT128_DIG and MY_LDBL_DIG

* Make uniform across CMake and Autotools
* Don't export quadmath.h variables to H5pubconf.h
2024-07-15 07:38:13 -05:00
Allen Byrne
dca6370691
Move C++ and Fortran and examples to HDF5Examples folder (#4552) 2024-06-08 06:46:09 -05:00
Dana Robinson
f44fa558f2
Clean up off_t --> HDoff_t stragglers (#4555)
* off_t --> HDoff_t in test

* off_t --> HDoff_t in h5ls, h5dump, & h5repack

* Minor off_t tweak to configure.ac

* off_t --> HDoff_t fixes in src

This changes the type of the offset parameter in H5Pget_external()
to HDoff_t to match H5Pset_external(), along with other minor tweaks.

* off_t --> HDoff_t in C++ wrappers

* Fix off_t usage in Java wrapper
2024-06-07 17:25:06 -07:00
Dana Robinson
0ae9c7021a
Move/rename libhdf5.settings input files (#4525)
Move without other changes:

src/libhdf5.settings.in -> src/libhdf5.settings.autotools.in
config/cmake/libhdf5.settings.cmake.in -> src/libhdf5.settings.cmake.in
2024-05-24 15:59:52 -05:00
Dana Robinson
baec5ff88a
Fix/revert a libtool sed hack (#4501)
* Revert "Remove Autotools sed hack (#3848)"

This reverts commit 8b3ffdef30.

* Fix libtool sed cleanup on MacOS

Convert sed -i line to sed > libtool.bak && mv libtool.bak libtool
to avoid non-portable -i option.
2024-05-20 08:37:01 -05:00
Quincey Koziol
63fcd583d0
Removed "function/code stack" debugging configure option (#4454)
Easily replaced w/third-party tools, e.g. libbacktrace
(https://github.com/ianlancetaylor/libbacktrace)
2024-05-03 03:30:45 -07:00
Allen Byrne
667b607ca0
Add navigate chapters and use release_docs in Learn Basics (#4441) 2024-04-29 07:37:15 -05:00
Quincey Koziol
5df6391246
Add support for builtin_expect compiler hint (#4425)
* Add support for __builtin_expect extension

And H5_LIKELY / H5_UNLIKELY macros to wrap it

Signed-off-by: Quincey Koziol <quincey@koziol.cc>

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <quincey@koziol.cc>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-25 16:33:47 -05:00
Dana Robinson
a99d620172
Clean up random number generator code (#4338)
* Clean up random number generator code

Depending on the platform, we use a mix of random, rand, and rand_r
to generate pseudo-random numbers, along with a messy set of ifdefs
in H5private.h. We are not a cryptographic library, only use random
numbers in our test code, and have no need for anything more than the
C standard's (s)rand(). There's no point dithering about using rand()
vs random() when we're also doing bad things like using mod to
restrict the range, which introduces bias.

Also removes CMake/configure checks for rand_r and random

* Remove random/rand_r checks from build system

* Fix missed HDrandom after GitHub merge
2024-04-07 15:15:25 -07:00
jhendersonHDF
90a1baede9
Revise _Float16 configure checks (#4323)
Run configure checks with and without CFLAGS/CMAKE_C_FLAGS since some
compilers work in one case while not working in the other case

Sync CMake configure checks with Autotools
2024-04-04 09:59:25 -05:00
jhendersonHDF
dc69e39f65
Add configure options for disabling extension features (#4277)
Add configure option to enable or disable extension features in general

Add configure option to enable or disable _Float16 support

Add new config options to various settings files
2024-03-31 22:45:50 -05:00
Scot Breitenfeld
724eaaf618
Determine MPI LOGICAL during build, used in tests. (#4246) 2024-03-26 09:05:51 -07:00
Scot Breitenfeld
6837fe5bc8
Addressed Fortran issues with promoted integers and reals via compilation flags, part 2 (#4221)
* addressed issue wit promoted integers and reals

* fixed h5fcreate_f

* added option to use mpi_f08

* change the kind of logical in the parallel tests

* addressed missing return value from callback
2024-03-25 07:42:03 -05:00
jhendersonHDF
be16b70272
Fix issue with -Werror cleanup sed command in configure.ac (#4223) 2024-03-24 18:06:56 -07:00
Dana Robinson
2b6c6590f0
Reverts AC_SYS_LARGEFILE change (#4213)
We previously replaced local macros with AC_SYS_LARGEFILE, which is
unfortunately buggy on some systems and does not correctly set the
necessary defines, despite successfully detecting them.

This restores the previous macro hacks to acsite.m4
2024-03-22 06:00:47 -07:00
Dana Robinson
56c527d752
Fixes several MinGW + Autotools issues (#4190)
* Fixes detection of various Windows libraries, etc.
* Corrects alarm(2) configure checks
* Uses Win32 threads by default w/ Pthreads override, if desired
* Set _WIN32_WINNT correctly for MinGW
* Fix setenv(3) wrapper for MinGW, which does not have getenv_s()

MinGW Autotools support is still not Amazing, but this at least
allows the library and tools build and is better about thread-safety
2024-03-20 08:40:09 -07:00
jhendersonHDF
330b80a266
Add support for _Float16 16-bit floating point type (#4065)
Fixed some conversion issues with Clang due to problematic undefined
behavior when casting a negative floating-point value to an integer

Fixed a bug in the library's software integer to floating-point
conversion function where a user's conversion exception function
returning H5T_CONV_UNHANDLED in the case of overflows would result in
incorrect data after conversion

Added configure checks for functions and macros related to _Float16
usage since some compilers expose the datatype but not the functions or
macros

Fixed a dt_arith test failure when H5_WANT_DCONV_EXCEPTION isn't defined

Fixed a few warnings from not explicitly casting some _Float16 variables
upwards
2024-03-18 21:36:46 -07:00
Dana Robinson
c7c8b93d06
Fix Autotools -Werror cleanup (#4144)
The Autotools temporarily scrub -Werror(=whatever) from CFLAGS, etc.
  so configure checks don't trip over warnings generated by configure
  check programs. The sed line originally only scrubbed -Werror but not
  -Werror=something, which would cause errors when the '=something' was
  left behind in CFLAGS.

  The sed line has been updated to handle -Werror=something lines.

  Fixes one issue raised in #3872
2024-03-15 07:41:07 -05:00
Allen Byrne
112f445019
Add cygwin CI and update yaml files for consistency and accuracy (#4131)
* Add cygwin CI

* add cygwin packages

* Correct option names

* Cleanup yaml file and synch look and feel

* Synch CI look and feel and correct path issues

* Upgrade oneapi version

* pwsh needs env: for vars

* No continuation char for pwsh

* restore correct pwsh step

* Run subset of tests for cygwin workflow

* Remove space chars in regex

* restore full tests
2024-03-14 07:16:53 -07:00
Dana Robinson
8123614b4d
Use AC_SYS_LARGEFILE on Autotools (#4119)
We previously used a hack introduced in 1.8.5 to paper over differences
in off_t and off64_t when determining the type sizes. We no longer explicitly
support off64_t in the library and AC_SYS_LARGEFILE works fine.
2024-03-12 11:30:24 -07:00
Dana Robinson
6cb4b2f6d7
Remove printf debugging from H5Smpio.c (#4098) 2024-03-09 20:30:34 -08:00
Dana Robinson
3d09a7d5f6
Remove H5B debug checks (#4089)
The H5B (version 1 B-tree) package would add some computationally
expensive integrity checks when H5B_DEBUG was defined. Due to their
negative effects on performance, this option was rarely turned on,
making the H5B__assert() check function stale, if not dead, code.

This change:

* Builds H5B__assert() when NDEBUG is not defined (the function
  relies on assert()) so it gets compiled more often.
* Removes some printf debugging statements in the B-tree code
* Removes all H5B "extra debug" checks that are leftover from
  past debugging sessions. Maintainers can add H5B__assert()
  selectively to perform integrity checks when debugging.
* Removes the HDF5_ENABLE_DEBUG_H5B CMake option

H5B_DEBUG now has no effect
2024-03-08 23:17:13 -08:00
Dana Robinson
3ea50208f9
Remove printf debugging in H5I package (#4088) 2024-03-08 12:55:16 -08:00
Dana Robinson
f24496074f
Remove printf debugging in H5HL code (#4086) 2024-03-07 18:36:44 -08:00
Scot Breitenfeld
9d8e882496
Added new H5E with tests. (#4049)
Added Fortran H5E APIs:
h5eregister_class_f, h5eunregister_class_f, h5ecreate_msg_f, h5eclose_msg_f
h5eget_msg_f, h5epush_f, h5eget_num_f, h5ewalk_f, h5eget_class_name_f,
h5eappend_stack_f, h5eget_current_stack_f, h5eset_current_stack_f, h5ecreate_stack_f,
h5eclose_stack_f, h5epop_f, h5eprint_f (C h5eprint v2 signature)

Addresses Issue #3987
2024-03-07 03:34:55 -08:00
Scot Breitenfeld
e7f41a2fbf
Fix the datatype passed to H5*exists_async APIs in tests. (#4033)
Add a new testing function to verify C_BOOL values.
2024-02-23 07:57:30 -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
Scot Breitenfeld
9d1fe2c166
renamed defined H5_VERS* to avoid conflicts (#3926) 2024-01-05 06:55:54 -06:00
Scot Breitenfeld
8f1a93f1a2
New Fortran Examples added (#3916)
* added subfiling example

* Added filtered writes with no selection example
2024-01-03 10:55:17 -06:00
Quincey Koziol
3a21ee0877
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>
2023-12-29 08:42:35 -06:00
Allen Byrne
6f2d22d86e
Add variable option syncing for examples (#3885) 2023-12-14 12:50:30 -06:00
Dana Robinson
8b3ffdef30
Remove Autotools sed hack (#3848)
configure.ac contains a sed line that cleans up incorrect library
flags which was added to paper over some bugs in earlier versions
of the Autotools. These issues are not a problem with the current
versions of the Autootols.

The sed line causes problems on MacOS, so it has been removed.

Fixes #3843
2023-11-13 11:09:43 -08:00
Scot Breitenfeld
ec695cf34f
Renamed h5fuse.sh to h5fuse (#3834)
* provide an alternative to mapfile for older bash
2023-11-07 09:50:03 -06:00
Allen Byrne
5844f498b0
Add an option to disable doxygen warn as error (#3708)
Add for both CMake and the Autotools

* HDF5_ENABLE_DOXY_WARNINGS: ON/OFF (Default: ON)
* --enable-doxygen-errors: enable/disable (Default: enable)

The default will fail compile if the doxygen parsing generates warnings.
The option can be disabled if certain versions of doxygen have parsing
issues. i.e. 1.9.5, 1.9.8.

Fixes #3398
2023-10-19 14:58:33 -07:00
Dana Robinson
d5267f096e
Add support for AOCC & Flang w/ the Autotools (#3674)
* Adds a config/clang-fflags options file to support Flang
* Corrects missing "-Wl," from linker options in the libtool wrappers
  when using Flang, the MPI Fortran compiler wrappers, and building
  the shared library. This would often result in unrecognized options
  like -soname.
* Enable -nomp w/ Flang to avoid linking to the OpenMPI library.

CMake can build the parallel, shared library w/ Fortran using AOCC
and Flang, so no changes were needed for that build system.

Fixes GitHub issues #3439, #1588, #366, #280
2023-10-14 22:39:43 -05:00
Scot Breitenfeld
6edd9a0aab
Drop MPI-2 support (#3643) 2023-10-07 18:16:30 -07:00
Scot Breitenfeld
1e852b94bd
Removed the use of -commons linking option on Darwin (#3581)
Removed the use of -commons linking option on Darwin as COMMON and EQUIVALENCE is no long used
2023-09-25 12:41:48 -07:00
Scot Breitenfeld
dece6256bf
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.
2023-09-22 08:41:57 -05:00
Dana Robinson
627f7c5e02
Convert some H5MM calls to standard C equivalents (#2382)
* H5MM_calloc and malloc are now mapped to stdlib C calls
* H5MM_memcpy now maps directly to memcpy in release builds
* H5MM_memcpy is still implemented as a separate function that
   checks for buffer overlap when H5MM_DEBUG is defined
   (default w/ debug builds)
* Switches many library memcpy calls to use H5MM_memcpy
* Fixes a possible zero allocation in H5Olayout.c
2023-08-25 13:56:50 -07:00
Dana Robinson
81fc47cc06
Enable szip by default in Autotools (#3412)
Since libaec is so prevalent and BSD-licensed for both encode and
decode, we build the szip filter by default when the szip or aec
libraries are found.
2023-08-23 08:21:33 -07:00
jhendersonHDF
26059fc7ab
Subfiling VFD source cleanup (#3241)
* Subfiling VFD source cleanup

Modularize Subfiling CMake code into separate CMakeLists.txt file

Update Mercury util code to latest version and update Copyright

Generate mercury_util_config.h header file instead of using
pre-generated file

Remove unnecessary Mercury functionality

Fix minor warning in Subfiling VFD code

* Remove Mercury headers from Autotools publicly-distributed header list
2023-07-13 12:19:02 -05:00
Dana Robinson
651b20ccb7
Remove checks for setsysinfo, which is unused (#3205)
* Autotools
* CMake
2023-06-29 06:31:50 -07:00
Dana Robinson
fcdd0ab9dc
Revert long double checks (#3133)
* Revert "Remove long double conversion work-arounds (#3097)"

This reverts commit 1e1dac1dac.

* Update comments to reflect newer systems
2023-06-15 09:13:22 -07:00
Dana Robinson
d1ef48e708
Remove unused HD macros (#3120)
* Remove unused HD macros
The library prefixes most C and POSIX API calls with 'HD'. We are
going to start removing these so the code looks like normal C.

This PR removes most of the unused HD markup macros.

* Replace ntohl/ntohs
2023-06-14 08:00:26 -07:00
Dana Robinson
d4605919f9
Remove H5detect and H5make_libsettings (#3104)
Removes H5detect and H5make_libsettings from the build and replaces
their functionality with things that don't affect cross-compiling.

H5detect --> floating-point types are now detected on library load
H5make_libsettings --> Moved functionality to a new H5build_settings.c template file
2023-06-13 08:16:41 -07:00
Dana Robinson
1e1dac1dac
Remove long double conversion work-arounds (#3097)
Several options and public symbols that were provided to paper
      over non-standard long double conversions between signed/unsigned
      long and long long values were removed from the Autotools and
      CMake. These were added twenty years ago, when C99 and 64-bit
      platforms were less common and are no longer needed.

      Autotools:
        --enable-dconv-accuracy

      CMake:
        HDF5_WANT_DATA_ACCURACY

      H5pubconf.h symbols:
        H5_WANT_DATA_ACCURACY
        H5_LDOUBLE_TO_LONG_SPECIAL
        H5_LONG_TO_LDOUBLE_SPECIAL
        H5_LDOUBLE_TO_LLONG_ACCURATE
        H5_LLONG_TO_LDOUBLE_CORRECT
        H5_DISABLE_SOME_LDOUBLE_CONV
2023-06-12 14:12:57 -07:00