summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Clean up a few things in H5T.c (#4105)Dana Robinson2024-03-101-31/+23
| | | | * remove (size_t) noise casts * replace (hid_t)FAIL with H5I_INVALID_HID
* Minimize use of abort() (#4110)Dana Robinson2024-03-103-24/+19
| | | The abort() call is used at several places where it probably shouldn't.
* Refactor datatype conversion code to use pointers rather than IDs (#4104)jhendersonHDF2024-03-1024-1695/+2075
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change how stats are printed in H5Z (#4097)Dana Robinson2024-03-101-7/+14
| | | | | | | | H5Z used the soon-to-be-removed HDEBUG macro to decide if stats would be dumped and to what stream. This is now handled by a DUMP_DEBUG_STATS_g variable and the output is always sent to stdout. This is an internal change, not normally visible to users.
* Remove printf debugging from H5Smpio.c (#4098)Dana Robinson2024-03-101-79/+12
|
* Remove H5DEBUG() calls from H5Dmpio.c (#4103)Dana Robinson2024-03-101-3/+2
| | | Just use stdout when a stream is needed.
* Remove a few H5O printf debugging statements (#4096)Dana Robinson2024-03-101-15/+0
| | | | These were in H5Oint.c, were protected by H5O_DEBUG, and only dumped to stdout if the HDF5_DEBUG environment variable were set to do so.
* Clean up off_t usage (#4095)Dana Robinson2024-03-094-10/+10
| | | | * Add comments to C++ and Fortran API calls that use off_t * Remove noise casts for small integers
* Remove H5B debug checks (#4089)Dana Robinson2024-03-094-77/+15
| | | | | | | | | | | | | | | | | | 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
* Expand check for variable-length or reference types when clearing datatype ↵jhendersonHDF2024-03-091-12/+78
| | | | | | 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
* Remove printf debugging in H5I package (#4088)Dana Robinson2024-03-081-18/+0
|
* Fixed asserts due to H5Pset_est_link_info() values (#4081)Dana Robinson2024-03-081-1/+19
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Remove printf debugging in H5HL code (#4086)Dana Robinson2024-03-082-36/+3
|
* Fix bin/trace script w/ out params (#4074)Dana Robinson2024-03-0757-316/+350
| | | | | | | | | | | | | The bin/trace script adds TRACE macros to public API calls in the main C library. This script had a parsing bug that caused functions that were annotated with /*out*/, etc. to be labeled as void pointers instead of typed pointers. This is mainly a developer feature and not visible to consumers of the public API. The bin/trace script now annotates public API calls properly. Fixes GH #3733
* Increased H5FD_ROS3_MAX_SECRET_TOK_LEN to 4096 to accommodate long AWS ↵Michael Aivazis2024-03-073-79/+90
| | | | | secret tokens (#4064) ros3: increased H5FD_ROS3_MAX_SECRET_TOK_LEN to 4096; stratified the debugging statements so there is more control over the output
* Add support for the new MSVC preprocessor (#4078)Dana Robinson2024-03-071-3/+9
| | | | | | | | | | | | Microsoft has added a new, standards-conformant preprocessor to MSVC, which can be enabled with /Zc:preprocessor. This preprocessor trips over our HDopen() function-like variadic macro since it uses a hack that only works with the legacy MSVC preprocessor. This fix adds ifdefs to use the correct HDopen() macro depending on the MSVC preprocessor selected. Fixes #2515
* Added new H5E with tests. (#4049)Scot Breitenfeld2024-03-071-7/+8
| | | | | | | | | | | 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
* Fix issue where H5Tset_fields does not account for datatype offsets (#4061)jhendersonHDF2024-03-051-3/+3
| | | | | 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.
* Add note to H5Tset_fields about needing to set datatype precision first (#4059)jhendersonHDF2024-03-051-0/+11
| | | | | * Offset of a floating-point type also needs to be accounted for * Clarify ordering of H5Tset_precision and H5Tset_fields
* Fix memory leak in H5LTopen_file_image when H5LT_FILE_IMAGE_DONT_COPY flag ↵jhendersonHDF2024-02-261-3/+11
| | | | | | | | | is used (#4021) When the H5LT_FILE_IMAGE_DONT_COPY flag is passed to H5LTopen_file_image, the internally-allocated udata structure gets leaked as the core file driver doesn't have a way to determine when or if it needs to call the 'udata_free' callback. This has been fixed by freeing the udata structure when the 'image_free' callback gets made during file close, where the file is holding the last reference to the udata structure.
* Improve performance of flushing single objects (#4017)Neil Fortner2024-02-238-258/+126
| | | | | Improve performance of flushing a single object, and remove metadata cache flush markers
* Fix H5F_get_access_plist to copy file locking settings (#4030)jhendersonHDF2024-02-224-46/+90
| | | | | | 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.
* Replaced last sprintf with snprintf (#4007)Sean McBride2024-02-2021-48/+79
| | | | | | | * Replaced last sprintf with snprintf To have the size of the buffer, it was required to change a function signature, and change all users of it. In most cases, determining the buffer size wasn't trivial and so SIZE_MAX is passed. But at least this improves the infrastructure. Someone can later figure out the correct sizes.
* Issue #1824: Replaced most remaining sprintf with safer snprint (#4003)Sean McBride2024-02-132-32/+34
|
* Add a missing file into Makefile.am for MinGW Autotools build error. (#4004)H. Joe Lee2024-02-131-1/+1
|
* Fix for github issue #2414: segfault when copying dataset with attrib… (#3967)vchoi-hdfgroup2024-02-061-2/+6
| | | | | | | | | | * Fix for github issue #2414: segfault when copying dataset with attributes. This also fixes github issue #3241: segfault when copying dataset. Need to set the location via H5T_set_loc() of the src datatype when copying dense attributes. Otherwise the vlen callbacks are not set up therefore causing seg fault when doing H5T_convert() -> H5T__conv_vlen().
* chore: fix typo (#3989)H. Joe Lee2024-02-061-1/+1
| | | close #144
* corrected warning: implicit conversion changes signedness (#3982)Scot Breitenfeld2024-02-021-1/+1
|
* Fix doxygen errors (#3962)Allen Byrne2024-01-297-19/+103
| | | | | | | | | | | * 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
* Document that fileno is same for all handles (#3963)mattjala2024-01-262-10/+19
|
* Change 'extensible' to 'fixed' in H5FA code (#3964)Dana Robinson2024-01-262-2/+2
|
* Remove cached datatype conversion path table entries on file close (#3942)jhendersonHDF2024-01-234-12/+117
| | | | | | | | | | | | | | | | | | | | 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.
* Fortran API work. (#3941)Scot Breitenfeld2024-01-231-10/+11
| | | | | | | | | | | | * - Added Fortran APIs: H5FGET_INTENT_F, H5SSELECT_ITER_CREATE_F, H5SSEL_ITER_GET_SEQ_LIST_F, H5SSELECT_ITER_CLOSE_F, H5S_mp_H5SSELECT_ITER_RESET_F - Added Fortran Parameters: H5S_SEL_ITER_GET_SEQ_LIST_SORTED_F, H5S_SEL_ITER_SHARE_WITH_DATASPACE_F - Added tests for new APIs - Removed H5F C wrapper stubs - Documentation misc. cleanup.
* Update H5Fget_obj_count/ids docs to reflect dtype behavior (#3932)mattjala2024-01-201-2/+3
| | | | | * Update H5Fget_obj_count/ids to reflect dtype behavior * Clarify comments on H5Fget_obj_ids
* Fix chid_t to hid_t (#3948)Glenn Song2024-01-201-1/+1
| | | Co-authored-by: Glenn Song <gsong@hdfgroup.org>
* Replace off_t with HDoff_t internally (#3944)Dana Robinson2024-01-183-2/+6
| | | | | | 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().
* Clean up Doxygen for szip functions and constants (#3943)Dana Robinson2024-01-182-14/+46
|
* Use props for includes and remove global includes (#3921)Allen Byrne2024-01-041-2/+2
|
* Add 'warning density' computation to the warnhist script (#3910)Quincey Koziol2023-12-299-57/+45
| | | | | | | | | * 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>
* Implement optimized support for vector I/O in Subfiling VFD (#3896)jhendersonHDF2023-12-276-1039/+1462
| | | | | | | | | | | | 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
* Doc versions (#3903)Gerd Heber2023-12-2112-60/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Remove redundant backslash character from comment. (#3899)H. Joe Lee2023-12-201-1/+1
|
* Fix typo in error message for `MPI_Type_dup`. (#3867)Luc Grosheintz2023-11-221-1/+1
|
* Fix segfault on user compound dtype conversion callback (#3842)mattjala2023-11-221-7/+10
| | | | | | * Fix segfault on user compound conversion * Check if lib conversion func is in use
* Implement selection vector I/O with collective chunk filling (#3826)vchoi-hdfgroup2023-11-162-170/+122
| | | | | | | | | | | | | | | | | * Changes for ECP-344: Implement selection vector I/O with collective chunk filling. Also fix a bug in H5FD__mpio_write_vector() to account for fixed size optimization when computing max address. * Fixes based on PR review comments: For H5Dchunk.c: fix H5MM_xfree() For H5FDmpio.c: 1) Revert the fix to H5FD__mpio_write_vector() 2) Apply the patch from Neil on the proper length of s_sizes reported by H5FD__mpio_vector_build_types() * Put back the logic of dividing up the work among all the mpi ranks similar to the original H5D__chunk_collective_fill() routine. * Add a test to verify the fix for the illegal reference problem in H5FD__mpio_write_vector().
* Change dest for doxygen (#3856)Allen Byrne2023-11-152-5/+5
| | | * Switch doxygen refs to hdf5/develop
* Make filter unregister callbacks safe for VOL connectors (#3629)mattjala2023-11-131-44/+98
| | | | | | | | | | | | * Make filter callbacks use top-level API functions When using VOL connectors, H5I_iterate may not provide valid object pointers to its callback. This change keeps existing functionality in H5Zunregister() without using potentially unsafe pointers. * Filter callbacks use internal API * Skip MPI work on non-native VOL
* Test and document path handling of H5Lcreate_* API (#3829)mattjala2023-11-111-7/+20
|
* Disable FP exceptions in H5T init code (#3837)Dana Robinson2023-11-072-18/+37
| | | | | | | The H5T floating-point datatype initialization code can raise exceptions when handling signaling NaNs. This change disables FE_INVALID exceptions during initialization. Also removes the -ieee=full change for NAG Fortran as that shouldn't be necessary anymore. Fixes #3831
* Rework MPI Info FAPL preserve PR to use VFD 'ctl' operations (#3782)jhendersonHDF2023-11-039-29/+95
|