Commit Graph

7816 Commits

Author SHA1 Message Date
bmribler
9adacb54a6
Replace non-VOL calls with VOL calls - part 2 (#4748)
This PR switches H5I_object_verify() to H5VL_vol_object_verify() in the H5F API
and fixes documentation of H5Fmount and H5Funmount.

* More on H5F API
2024-08-23 11:44:48 -05:00
bmribler
379a5baa0f
Fix inconsistent documentation of get_name functions (#4715)
- Verified that the listed functions do not include null terminator in the returned length
- Improved some of the tests
- Corrected documentation

Fixes GH-4704

* Casted a positive int to size_t
2024-08-23 11:17:35 -05:00
bmribler
a03203afbc
Replace non-VOL calls with VOL calls - part 1 (#4745)
This PR is part of the incremental switching H5I_object() and H5I_object_verify()
to their VOL counterpart, H5VL_object() and H5VL_vol_object_verify(), a newly addedinternal function.

Fixes GH-4730 partially.
2024-08-22 13:32:48 -05:00
Aleksandar Jelenak
8a8ac85a69
Return basic HTTP range GET logging to ROS3 (#4738)
* Add minimal amount of S3 request logging to ROS3

* Fix ROS3 logging ifdef conditions
2024-08-22 09:18:54 -07:00
H. Joe Lee
17123cd8ba
Fix enum type mismatch warning (#4741) 2024-08-21 22:40:53 -05:00
Quincey Koziol
679b017740
Eliminate another use of H5E_clear_stack() within the library (#4726)
* Remove call to H5E_clear_stack()

Also clean up a bunch of error macros and the return value from H5B_valid()
2024-08-21 09:28:59 -05:00
mattjala
4791d3416c
Fix segfault in ROS3 credential parsing (#4736)
* Fix segfault in s3 credential parsing

* Fix AWS cred parsing when >1 profile provided
2024-08-21 07:35:29 -05:00
bmribler
aea4c53654
Fix incorrect VOL vs. non-VOL calls partially (#4733)
* Fix incorrect VOL vs. non-VOL calls

H5Lget_info2() called H5I_object() instead of H5VL_vol_object() crashed
user application.
This is a wide-spread issue (GH-4730) but this PR only addresses GH-4705.

* Remove an incorrect change
2024-08-20 19:36:40 -05:00
Quincey Koziol
adc3a37e96
Fix semaphore test (#4725)
* Make counter in semaphore test an atomic variable

* Revert using atomic counter and fix counter access outside of semaphore
2024-08-19 08:53:10 -05:00
Dana Robinson
89f62a937d
Fix error return types in H5Rdeprec.c (#4722)
Copy-pasted code from elsewhere used FAIL instead of H5G_UNKNOWN
and H5I_INVALID_HID.
2024-08-16 12:03:42 -07:00
bmribler
70c6a7a901
Replace alias \Code with \TText (#4714)
Fixed GH-2151
2024-08-14 15:54:44 -05:00
bmribler
d875f749e5
Add tests for H5R get name APIs (#4657)
Added functionality tests for the following APIs:
H5Rget_file_name
H5Rget_obj_name
H5Rget_attr_name

Also removed "+1" when returning a name length in H5R__get_attr_name().
The exter "+1" gave an incorrect value for the length of the referenced
object's attribute name.

Fixed GH-4447

* Fix Fortran test

The C API H5Rget_attr_name incorrectly added 1 to the length of the
referenced object's attribute name, so the Fortran API h5rget_attr_name_f
removed 1 from the returned value to accommodate the incorrectness.
This PR fixes H5Rget_attr_name so this workaround in h5rget_attr_name_f
is no longer needed.

* Add test H5Aget_name against H5Rget_attr_name
2024-08-12 09:40:48 -05:00
Allen Byrne
46a3a20365
Add Windows SHLWAPI lib to public interface (#4701) 2024-08-08 16:35:01 -05:00
Quincey Koziol
3967f2a9a0
Drop H5E_BEGIN/END_TRY and just check the error return from H5I_clear_types() (#4694)
Original case that the change in commit 2dc738a321
no longer applies.
2024-08-06 06:21:35 -05:00
Quincey Koziol
eede36f0cd
Remove another H5E_BEGIN/END_TRY within the library (#4675)
* Update logic for (deprecated) H5Gget_objinfo() call to eliminate H5E_BEGIN_TRY

* Handle case for '.' at the end of a path
2024-08-06 06:21:07 -05:00
jhendersonHDF
573c8bd4c9
Fix segfault when closing datatype during failure in H5Topen2 (#4683) 2024-08-02 14:49:22 -05:00
Allen Byrne
1be198decf
Correct the properties for using THREADS library (#4690) 2024-08-02 10:57:20 -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
bmribler
9fd4fd0b58
Replace incorrect use of an internal function (#4668)
* Replace incorrect use of an internal function

In some API functions, the internal function H5I_object() was used instead
of H5I_object_verify(), which verifies the type of an ID argument.  So
when an inappropriate ID was passed in to the affected API, it was accepted.
This behavior can cause issues at a later time, including a segfault, as
reported in issue #GH-4656.

The fix was applied to the following functions:
H5Fget_intent()
H5Fget_fileno()
H5Fget_freespace()
H5Fget_create_plist()
H5Fget_access_plist()
H5Fget_vfd_handle()
H5Dvlen_get_buf_size()
H5Fget_mdc_config()
H5Fset_mdc_config()
H5Freset_mdc_hit_rate_stats()

Fixes GH-4662
2024-07-24 10:42:58 -05:00
Quincey Koziol
641790b759
Eliminate more H5E_BEGIN/END_TRY macros and H5E_clear_stack() calls (#4648) 2024-07-17 07:46:06 -05:00
Allen Byrne
e71605966a
Update doxygen Learn Basics / example refs. Add Reference sections (#4640) 2024-07-15 22:02:08 -05:00
mattjala
e6e098b7c3
Correct H5VL_t ref count on H5O_refresh_metadata failure (#4636)
* Fix bad H5VL_t rc on H5O_refresh_metadata fail

* Decrement nrefs before raising error
2024-07-15 11:01:15 -07:00
jhendersonHDF
74fbc1dbd4
Add temporary fix for ARM64 Mac _Float16 build failure (#4639) 2024-07-15 11:28:13 -05:00
Allen Byrne
6fa09bdb15
Add h5* compiler wrapper testing for CMake #4605 (#4613)
* Add show option

* remove non-static libs and correct names of static libs

* Fixup the pkg-config libs and comp builds

* Fix commands and add fortran pkg-config test scripts

* Add help usage option
2024-07-15 10:16:16 -05:00
Quincey Koziol
4f7891e144
Remove some internal use of API calls and H5E_BEGIN_TRY/H5E_END_TRY (#4624) 2024-07-11 23:30:58 -07:00
Dana Robinson
49feed3c8a
Fix a stack size warning in ros3 VFD code (#4625)
Just makes a stack array dynamic. Valgrind shows no memory leaks.
2024-07-03 08:00:32 -07:00
Quincey Koziol
5eb23af925
Add 'try' parameter to H5Z_find, and remove calls to H5E_clear_stack() (#4609) 2024-07-02 13:05:16 -07:00
jhendersonHDF
773831f3cb
Add H5F_LIBVER_V116 to internal library version structures (#4619)
Also add H5F_LIBVER_V116 flag to Fortran wrappers
2024-07-02 09:26:05 -05:00
mattjala
546b79673c
Document VOL object wrapping context (#4611) 2024-06-29 13:22:35 -07:00
mattjala
cefadcf70a
Correct documentation for return-and-read fields (#4598) 2024-06-26 20:39:12 -07:00
Quincey Koziol
81a563fc2d
Bring subfiling VFD code closer to typical library code (#4595)
Remove API calls, use FUNC_ENTER/LEAVE macros, use the library's error macros,
rename functions to have more standardized names, etc.
2024-06-26 20:35:35 -07:00
Quincey Koziol
59f010ec2e
Removed unnecessary call to H5E_clear_stack (#4607)
H5FO_opened and H5SL_search don't push errors on the stack
2024-06-26 17:41:03 -05:00
mattjala
0c4041f846
Document that ctx VOL property isn't drawn from the FAPL (#4597) 2024-06-24 12:04:48 -05:00
Dana Robinson
9fe7132fe3
Remove dead H5FD_s3comms_percent_encode_char() (#4591) 2024-06-19 16:22:21 -05:00
Dana Robinson
45711d7c94
Remove magic fields from s3comms structs (#4589) 2024-06-19 13:03:10 -07:00
Dana Robinson
f931c2aed2
Removed unused code from H5FDs3comms.c (#4588)
* H5FD_s3comms_nlowercase()
* H5FD_s3comms_trim()
* H5FD_s3comms_uriencode()
2024-06-19 12:24:13 -07:00
Dana Robinson
ef701abb90
Remove printf debugging from H5FDs3comms.c (#4584) 2024-06-19 07:51:50 -05:00
Dana Robinson
9e1a9abc64
Remove public API call from ros3 VFD (#4583) 2024-06-19 07:49:07 -05:00
mattjala
90cfab3c05
Clarify documentation for H5CX_get_data_transform (#4580)
* Correct comment for H5CX_get_data_transform

* Document why data transform ctx field doesnt use macro
2024-06-19 07:48:11 -05:00
Quincey Koziol
850d6c8f06
Pause recording errors instead of clearing the error stack (#4475)
An internal capability that's similar to the H5E_BEGIN_TRY / H5E_END_TRY
macros in H5Epublic.h, but more efficient since we can avoid pushing errors on
the stack entirely (and those macros use public API routines).

This capability (and other techniques) can be used to remove use of
H5E_clear_stack() and H5E_BEGIN_TRY / H5E_END_TRY within library routines.

We want to remove H5E_clear_stack() because it can trigger calls to the H5I
interface from within the H5E code, which creates a great deal of complexity
for threadsafe code.  And we want to remove H5E_BEGIN_TRY / H5E_END_TRY's
because they make public API calls from within the library code.

Also some other minor tidying in routines related to removing the use of
H5E_clear_stack() and H5E_BEGIN_TRY / H5E_END_TRY from H5Fint.c
2024-06-18 14:17:43 -07:00
Dana Robinson
82a0ff1127
Turn off ros3 VFD stat collection by default (#4581)
Not a new change - an artifact from a previous check-in.
2024-06-18 14:15:30 -07:00
Dana Robinson
49e32531ef
Clean up ros3 VFD stats code (#4579)
* Removes printf debugging
* Simplifies and centralizes stats code
* Use #ifdef ROS3_STATS instead of #if
* Other misc tidying
2024-06-18 11:50:27 -07:00
Dana Robinson
6bc6fb641f
Clean up comments in H5FDros3.c (#4572) 2024-06-17 11:00:22 -07:00
mattjala
2fa630c1cd
Document H5Punregister modifying default properties (#4570) 2024-06-15 10:45:12 -07:00
mattjala
ce99ebcc99
Clarify H5CX macro documentation (#4569) 2024-06-14 09:18:25 -07:00
mattjala
db4465f2e9
Document property shared name behavior (#4565) 2024-06-14 09:17:57 -07:00
mattjala
acbbf15202
Add property names to context field docs (#4563) 2024-06-14 09:04:49 -07:00
jhendersonHDF
4a0b1b66a5
Allow usage of page buffering for serial file access from parallel HDF5 builds (#4568) 2024-06-13 14:18:31 -05:00
mattjala
09fe0ba079
Document 'return-and-read' field in API context (#4560) 2024-06-12 07:57:38 -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