Commit Graph

4057 Commits

Author SHA1 Message Date
mattjala
e99b0af7e0
Skip vlen IO API test for cache VOL (#4135)
* Fix cache VOL segfault in vlen io test
* Skip vlen IO API test
2024-03-20 10:50:40 -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
4c0f1468d2
Skip part of dtypes.c _Float16 file size check for certain VFDs (#4182) 2024-03-19 22:06:49 -07:00
jhendersonHDF
c91b3e6168
Remove some H5T_copy calls that are now unnecessary (#4164)
Removes some datatype copying calls that are now unnecessary after
refactoring the datatype conversion code to use pointers internally
rather than IDs

Rewrites the enum conversion function so that it uses cached copies
of the source and destination datatypes in order to avoid modifying
the datatypes passed in

Adds a 'recursive' field to the datatype conversion context which
allows the conversion functions for members of a container datatype
to skip unnecessary repetitive conversion setup code

Changes internal datatype conversion callback functions so that the
source and destination datatype structure pointers are const

Removes some unused and unnecessary internal IDs registered with
H5I_register
2024-03-18 21:44:31 -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
344ba97fec
Allow H5Soffset_simple to accept NULL offsets (#4152)
The reference manual states that the offset parameter of H5Soffset_simple()
  can be set to NULL to reset the offset of a simple dataspace to 0. This
  has never been true, and passing NULL was regarded as an error.

  The library will now accept NULL for the offset parameter and will
  correctly set the offset to zero.

  Fixes HDFFV-9299
2024-03-18 06:57:52 -07:00
Dana Robinson
fa44de4cdb
Fix mirror VFD script (#4170)
This had directory problems when running locally.
2024-03-17 18:47:59 -07:00
jhendersonHDF
a56675e12a
Fix some minor warnings (#4165) 2024-03-16 19:43:47 -07:00
Neil Fortner
40e1c6d078
Fix error when overwriting an indirectly nested vlen with a shorter sequence (#4140) 2024-03-15 09:26:56 -07:00
Allen Byrne
437f21549b
Fix doxygen link to example function usage (#4133) 2024-03-15 08:24:32 -07:00
jhendersonHDF
ca9c942844
Skip part of dsets.c test for IBM long double type (#4136) 2024-03-15 00:12:50 -07:00
mattjala
c3714b9f15
Fix segfault in vlen io API test (#4130) 2024-03-13 14:55:51 -05:00
jhendersonHDF
037c8b63d5
Handle IBM long double issues in dsets.c test_floattypes test (#4116)
* Handle IBM long double issues in dsets.c test_floattypes test
2024-03-12 07:49:41 -05:00
jhendersonHDF
4279c351f5
Fix up dsets test for some platforms with different long double format (#4114) 2024-03-11 14:39:13 -05:00
Allen Byrne
8340c4cb1f
long double tests has problems setting precision with offset (#4102)
* long double tests has problems setting precision with offset

* Disable long double until more development fixes issues
2024-03-11 07:58:35 -05:00
Dana Robinson
7403f20757
Move common variables out of cache test blocks (#4108)
Fixes a stack size warning w/ XCode
2024-03-10 16:17:37 -07:00
Dana Robinson
f0ba8baa0d
Minimize use of abort() (#4110)
The abort() call is used at several places where it probably shouldn't.
2024-03-10 12:42:16 -07:00
jhendersonHDF
ef401a5f5e
Refactor datatype conversion code to use pointers rather than IDs (#4104)
The datatype conversion code previously used IDs for the source and
destination datatypes rather than pointers to the internal structures
for those datatypes. This was mostly due to the need for an ID for these
datatypes that can be passed to an application-registered datatype
conversion function or datatype conversion exception function. However,
using IDs internally caused a lot of unnecessary ID lookups and hurt
performance of datatype conversions in general. This was especially
problematic for compound datatype conversions, where the ID lookups were
occuring on every member of every compound element of a dataset. The
code has now been refactored to use pointers internally and only create
IDs for datatypes when necessary.

Fixed a test issue in dt_arith where a library datatype conversion
function was being cast to an application conversion function. Since the
two have different prototypes, this started failing after the parameters
for a library conversion function changed from hid_t to H5T_t * and an
extra parameter was added. This appears to have worked coincidentally in
the past since the only different between a library conversion function
and application conversion function was an extra DXPL parameter at the
end of an application conversion function

Fixed an issue where memory wasn't being freed in the h5fc_chk_idx test
program. Even though the program exits quickly after allocating the
memory, it still causes failures when testing with -fsanitize=address
2024-03-09 23:47:31 -08:00
Dana Robinson
0ea1d7280b
Clean up off_t usage (#4095)
* Add comments to C++ and Fortran API calls that use off_t
* Remove noise casts for small integers
2024-03-09 09:06:10 -08:00
jhendersonHDF
d8af09dd8f
Expand check for variable-length or reference types when clearing datatype conversion paths (#4085)
When clearing out datatype conversion paths involving variable-length or reference datatypes
on file close, also check for these datatypes inside compound or array datatypes
2024-03-08 21:15:56 -08:00
Allen Byrne
84ead492c0
Update long double test with correct values (#4060)
Update long double test with correct values
2024-03-08 14:13:38 -08:00
Dana Robinson
b0af7cf58b
Fixed asserts due to H5Pset_est_link_info() values (#4081)
* Fixed asserts due to H5Pset_est_link_info() values

If large values for est_num_entries and/or est_name_len were passed
to H5Pset_est_link_info(), the library would attempt to create an
object header NIL message to reserve enough space to hold the links in
compact form (i.e., concatenated), which could exceed allowable object
header message size limits and trip asserts in the library.

This bug only occurred when using the HDF5 1.8 file format or later and
required the product of the two values to be ~64k more than the size
of any links written to the group, which would cause the library to
write out a too-large NIL spacer message to reserve the space for the
unwritten links.

The library now inspects the phase change values to see if the dataset
is likely to be compact and checks the size to ensure any NIL spacer
messages won't be larger than the library allows.

Fixes GitHub #1632

* Fix copy-paste comments
2024-03-07 18:36:58 -08:00
mattjala
64a0b71c86
Close and reopen file during dset vlen IO API tests (#4050)
- Close/reopen file and file objects to prevent cache from being used instead of actual I/O.
- Moved vlen io test datasets under the dset container group instead of the root group
- Moved the PASSED() invocation to after individual test cleanup in case an error occurs during H5Treclaim
2024-03-07 09:07:05 -08:00
Dana Robinson
10a35d0ebb
Fix uninitialized bytes in selection I/O test (#4073)
This was due to a complex type fill value being set to -1 instead
of a proper complex value. This was a test problem and not a core
library issue.
2024-03-06 07:48:28 -08:00
Dana Robinson
e4d9b639d5
Fix uninitialized bytes in cmpd_dset test (#4072)
Compound fill values were set to the integer -1, causing valgrind
to flag 'uninitialized bytes' errors.

This is just a problem with the cmpd_dset test and not a core
library problem.
2024-03-05 14:33:09 -08:00
Dana Robinson
13348ab915
Fix a memory leak in the cmpd_dset test (#4071)
This was due to not freeing a test buffer. It was not a core
library memory leak.
2024-03-05 13:16:17 -08:00
Allen Byrne
0be892585a
Rename incorrectly named option (#4067)
* Rename incorrectly named option

* Restore the correct uses of USING_MEMCHECKER

* Update release note
2024-03-05 09:07:16 -08:00
jhendersonHDF
f5f6975c2f
Fix issue where H5Tset_fields does not account for datatype offsets (#4061)
H5Tset_fields did not account for any offset in a floating-point datatype,
causing it to fail when a datatype's precision is correctly set such that
it doesn't include the offset bits.
2024-03-05 08:23:34 -06:00
mattjala
8276bdbe09
Fix VOL-compatibility issues in External Link API test (#4039)
Fix link API tests with incorrect filename
2024-03-04 06:52:44 -08:00
jhendersonHDF
cc50a78000
Fix issue with FAPL file locking setting inheriting test (#4053)
Fixes an issue where the HDF5_USE_FILE_LOCKING environment variable being
set can interfere with the file locking setting that the test expects to
be returned.
2024-03-01 07:38:17 -06:00
mattjala
b79982a606
Fix allocating too much memory in dset API test (#4041) 2024-02-26 14:27:51 -06:00
Neil Fortner
560e80c0ad
Improve performance of flushing single objects (#4017)
Improve performance of flushing a single object, and remove metadata
cache flush markers
2024-02-23 09:06:06 -08:00
jhendersonHDF
46f7aa75fd
Fix H5F_get_access_plist to copy file locking settings (#4030)
H5F_get_access_plist previously did not copy over the file locking settings
from a file into the new File Access Property List that it creates. This would
make it difficult to match the file locking settings between an external file
and its parent file.
2024-02-22 14:52:36 -06:00
mattjala
0f56048a04
Test vlen sequence IO in API tests (#4027) 2024-02-21 13:52:39 -06:00
H. Joe Lee
f73da83a94
Remove oneapi return value warning. (#4028) 2024-02-19 11:08:38 -06:00
mattjala
4023fbcfbb
Add compound subset ops on attributes to API tests (#4005)
* Add partial compound io on attributes to API tests
2024-02-14 11:15:01 -06:00
Sean McBride
f309fcebbd
Issue #1824: Replaced most remaining sprintf with safer snprint (#4003) 2024-02-13 08:22:17 -06:00
jhendersonHDF
33bb1970b8
Fix build issue and some warnings in H5_api_dataset_test.c (#3998) 2024-02-09 11:05:54 -06:00
mattjala
824bbf5cbe
Sync API tests with vol-tests (#3940) 2024-02-06 14:57:50 -06:00
mattjala
853a7c6c9c
Fix potential infinite loop in API test (#3960) 2024-01-25 08:57:31 -08:00
jhendersonHDF
f86fe61c7f
Remove cached datatype conversion path table entries on file close (#3942)
Remove cached datatype conversion path table entries on file close

When performing datatype conversions during I/O, the library
checks to see whether it can re-use a cached datatype conversion
pathway by performing comparisons between the source and destination
datatypes of the current operation and the source and destination
datatypes associated with each cached datatype conversion pathway.
For variable-length and reference datatypes, a comparison is made
between the VOL object for the file associated with these datatypes,
which may change as a file is closed and reopened. In workflows
involving a loop that opens a file, performs I/O on an object with a
variable-length or reference datatype and then closes the file, this
can lead to constant memory usage growth as the library compares the
file VOL objects between the datatypes as different and adds a new
cached conversion pathway entry on each iteration during I/O. This is
now fixed by clearing out any cached conversion pathway entries for
variable-length or reference datatypes associated with a particular
file when that file is closed.
2024-01-23 08:21:59 -08:00
vchoi-hdfgroup
7e48d4f767
Add the user test program in HDFFV-9174 for committed types. (#3937)
Add the user test program for committed types in HDFFV-9174
2024-01-23 08:11:33 -08:00
Dana Robinson
ab11e076bf
Replace off_t with HDoff_t internally (#3944)
off_t is a 32-bit signed value on Windows, so we should use HDoff_t
(which is __int64 on Windows) internally instead.

Also defines HDftell on Windows to be _ftelli64().
2024-01-18 09:03:59 -08:00
mattjala
3d39b85952
Add H5Dread/write_multi to API tests (#3919) 2024-01-05 20:44:27 -06:00
Allen Byrne
a00d62f77a
Use props for includes and remove global includes (#3921) 2024-01-04 12:06:36 -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
Lori Cooper
2f23f2afe6
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
2023-12-12 22:21:15 -06:00
jhendersonHDF
a067bf71f5
Fix configuration issue due to possibly empty CMake variable (#3869) 2023-11-24 06:20:59 -06:00
mattjala
af4c6c4f15
Fix segfault on user compound dtype conversion callback (#3842)
* Fix segfault on user compound conversion

* Check if lib conversion func is in use
2023-11-22 07:55:25 -06:00
Allen Byrne
3ea21ccb3e
Add HDF5_DISABLE_TESTS_REGEX option to skip tests (#3859) 2023-11-22 07:51:30 -06:00