summaryrefslogtreecommitdiffstats
path: root/src/H5FDdirect.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers (#2184)Larry Knox2022-11-011-1/+0
| | | | | * Updated source file copyright headers to remove "Copyright by the Board of Trustees of the University of Illinois", which is kept in the top-level COPYING file.
* Develop clang 13 format (#1933)Allen Byrne2022-07-261-12/+12
| | | | | * Update format source to clang 13 * More format changes
* Removes the STATIC flavor of FUNC_ENTER macros (#1622)Dana Robinson2022-04-081-18/+18
| | | | | * Removes the STATIC flavor of FUNC_ENTER macros
* Merge initial version of selection I/O feature into develop (#1367)Neil Fortner2022-03-261-0/+5
|
* OESS-168: Remove clang warnings. (#1308)H. Joe Lee2022-01-071-1/+4
|
* Simplify function enter macros for performance benefits (#1024)David Young2021-11-081-37/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Take a stab at using constructors to initialize instead of function-entry macros. This is a work in progress. It's good enough to run `many_dsets`. * Committing clang-format changes * Add the `many_dsets` benchmark and some scripts I used on jelly for setting up the build/test environment and for recording/flame-graphing profiles. * Committing clang-format changes * Change my Makefile and environment script to work both on jelly and on mayll (and probably on Summit). * Disable clang-format "fix." * Replace the `if (!H5_TERM_GLOBAL)` test in each FUNC_ENTER_ macro with `if (true)`. * Fix bad grammar in a comment. * Instead of labeling the H5*__init_package routines constructors, fold each into an initialization routine, H5*_init(), and call each of the H5*_init() routines. Call most of the H5*_init() routines from H5_init_library() in an explicit order that I found out earlier by instrumenting each __init_package routine and running the library tests. Roll H5FD*__init_package routines into H5FD*_init() routines. This change ends just-in-time initialization of package dependencies by package initializers. Don't track in per-package variables (H5_PKG_INIT_VAR) whether each package has been initialized. Instead, track in a single library variable whether the whole library is initialized or not. Drive the initialization of packages by H5_init_library() with a table of initializer routines. Also drive the termination of packages by H5_term_library() with a table. Perform initialization as needed from FUNC_ENTER_API_INIT(err). This basically restores the old behavior of that macro. Delete a bunch of #definitions in H5private.h that have fallen out of use with these changes. * Committing clang-format changes * Undo the bad auto-formatting that appears to have occurred in spite of my disabling it. Bracket some code in /* clang-format off */ /* clang-format on */ to prevent a recurrence. * Remove a diagnostic abort(). * Fix a logic error: print a comma between every package terminator run, and don't print an initial comma. * Complete the changes I started in H5_term_library() that undo the bad auto-formatting. Stop tracking whether package "tops" were initialized in per-package variables H5*_top_package_initialize_s. H5_term_library() takes care of that for them. Remove H5R_top_term_package() and H5R_term_package(), they don't do anything. * Committing clang-format changes * NFCI. Simplify macro text: replace `if (true) {` with `{`. * Fix formatting and suppress clang-format on a longer range. * Quiet some unused label, unused variable complaints that cropped up after I simplified the FUNC_ENTER_ macros for the sake of performance. * Committing clang-format changes * Delete some programs and scripts that don't belong in the pull request. * Use the right function-entry macro. * Use a sensible format and disable auto-formatting. * Stop calling do-nothing initializer H5FS_init(). Delete it. * Document what changes to make if the default VFD changes. * While I am here, change an `await_prior` flag on the terminator table to `true` to match the previous, non-table-driven code that was here. Found the oversight making the following changes: NFCI: insert an empty line and copy over slightly-edited comments from the previous version, where those comments still correctly explained how library termination operated. * NFCI: lower a staircase. * Replace every occurrence of FUNC_ENTER_NOAPI_INIT(...) with H5_PUSH_FUNC since that is all that that macro does any more. Quiet a bunch of new warnings by changing FUNC_ENTER_NOAPI(...) to FUNC_ENTER_NOAPI_NOERR and removing disused `done:` labels. * NFCI: add curly braces around a multiline statement. * Quiet a signed/unsigned comparison warning. * Add some documentation about library initialization and shutdown. * Make sure that the library is initialized, or else that initialization is already underway, before performing any VFD's initialization. * Committing clang-format changes * Committing clang-format changes * Reduce differences from `develop` branch. * Always initialize `tot_init`. * Committing clang-format changes * Fix typo: H5SL_init initializes skip lists, not VOL. * Remove H5_TERM_GLOBAL test in H5T_init. H5T_init was unusual in that it tested H5_TERM_GLOBAL and exited early if it was set. No other module initializers did that, and I cannot find any reason that should be necessary. Tests still pass when I remove it, so away it goes. * Use HD prefix. * Add function header comments. * Drop the intermediate variable, it's only used once. * Extract subroutine `H5FDperform_init(hid_t (*init)(void))` that initializes the library, if necessary, before calling its VFD-initializer argument. Use H5FDperform_init in the definition of the symbols H5FD_<vfd> (e.g., H5FD_SEC2), which may be evaluated before the library is initialized, like so: ``` ``` I implement H5FDperform_init in its own source file, H5FDperform.c, and exclude that file from trace processing because the `bin/trace` cannot deal with the function-pointer type. * Straggler from last: add new source file src/H5FDperform.c. * Committing clang-format changes * Add a missing file to the MANIFEST. * Switch to FUNC_ENTER_API_NOINIT in H5FDperform_init() and hbool_t in H5_term_library(). Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* VFD plugins (#602)jhendersonHDF2021-09-291-24/+60
| | | | | | | | | | | | | | | | | * Implement support for loading of Virtual File Drivers as plugins Fix plugin caching for VOL connector and VFD plugins Fix plugin iteration to skip paths that can't be opened * Enable dynamic loading of VFDs with HDF5_DRIVER environment variable * Temporarily disable error reporting during H5F_open double file open * Default to using HDstat in h5_get_file_size for unknown VFDs * Use macros for some environment variables that HDF5 interprets * Update "null" and "ctl testing" VFDs
* VFD ctl feature (#981)jhendersonHDF2021-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added "ctl" callback to the VFD interface, and the associated H5FDctl() and H5FD_ctl() calls. Modified the MPIO VFD accordingly -- specifically: Added ctl() call with op-code support to expose rank, size, and communicator. Modified H5FD_mpi_get_rank(), H5FD_mpi_get_size(), and H5FD_mpi_get_comm() to use the new ctl() callback. In passing removed the const qualifier from the file parameter of these functions, as the file parameter of the ctl callback is not const. Deleted the old H5FD__mpio_mpi_rank(), H5FD__mpio_mpi_size(), and H5FD__mpio_communicator() calls from the MPIO VFD. Deleted H5FD_class_mpi_t from H5FDprivate.h, and modified the MPIO VFD accordingly. Note that all VFDs now use H5FD_class_t, with no special class for VFDs that that support MPI. Some minor touch ups to the Neil's selection I/O mods in passing. Tested serial and parallel, debug and production on charis and jelly. * Reserve a range of VFD "ctl" opcodes for library and experimental usage * Add "ctl" callbacks to passthrough VFDs * Add RELEASE.txt entry for "ctl" callback * Use H5FDopen with H5F_ACC_RDWR flag instead of H5F_ACC_TRUNC in vfd test * Remove handling of passthrough "ctl" flag from multi VFD * Move logic for testing H5FD_CTL__TEST_OPCODE into a testing VFD Revise description of "ctl" callback in RELEASE.txt Remove unused H5FD_CTL__NUM_OPCODES definition Fix some warnings in multi VFD Co-authored-by: mainzer <mainzer#hdfgroup.org>
* Brings the native implementation of H5Fdelete() from Bitbucket (#524)Dana Robinson2021-04-161-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Committing clang-format changes * Brings the native VFD H5Fdelete() implementation from Bitbucket Only brings the 'del' callbacks, not the 'open/close' scheme. * Formatter changes * Committing clang-format changes * Fixes direct VFD callback name * Removes UNUSED macro from family API call * Adds barrier and rank 0 check to MPI-I/O VFD delete * Revert "Adds barrier and rank 0 check to MPI-I/O VFD delete" This reverts commit 909765f759d9d96e84f4b8b1cc14f7d2b3ac8143. * Revert "Revert "Adds barrier and rank 0 check to MPI-I/O VFD delete"" This reverts commit 9b04bef1157853fc79fcb8fcc3e8ba1371091702. * Adds a second barrier after the delete in MPI-I/O VFD * Only delete files in the core VFD when the backing store flag is set * Fixes string issues in multi VFD Also, h5test.c cleanup code now uses H5Fdelete(). * Formatted source * Rework fapl checks for MPI-I/O VFD delete callback Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Update license url (#332)Larry Knox2021-02-171-1/+1
| | | | | | * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - src and test directories.
* develop revert source to clang-format version 11 (#293)Allen Byrne2021-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction
* Basic alignment with async branch (#115)Quincey Koziol2020-11-231-7/+7
| | | | | | | * Basic alignment with async branch - trivial changes to reduce clutter in overall diff. * Update minor error code to reflect change within library * Update the error output to match library
* Fixes minor issues in various virtual file driversDana Robinson2020-10-291-7/+7
| | | | | | | | | | | | - HDFS VFD files now ignored in the Autotools when the HDFS VFD is not being built. - All VFD init code uses idiomatic H5I_INVALID_HID instead of -1 or FAIL. - The HDFS VFD now includes H5FDdrvr_module.h in the right place. - The HDFS tests in test/hdfs.c no longer pass NULL to VERIFY macros, which raised warnings. - Minor tweaks to fix const, unused variables, etc. warnings in several VFDs.
* Clang-format of source filesAllen Byrne2020-09-301-483/+471
|
* Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01Quincey Koziol2020-08-071-8/+51
|\
| * Renames BEST-EFFORT to BEST_EFFORT for file locking env varDana Robinson2020-08-061-1/+1
| |
| * Fixed missing parens in VFDsDana Robinson2020-08-031-1/+1
| |
| * Squash merge of file locking fixesDana Robinson2020-08-031-8/+51
| |
* | Clean up private / package / static namespace issues (function naming, whichQuincey Koziol2020-08-061-148/+117
|/ | | | | | header file, FUNC_ENTER / LEAVE, etc). Removed remaining personal email addresses from library source code (still needs cleaned from other directories). Misc. warning, style, and whitespace cleanup.
* Fix `src/H5FDdirect.c:1346:5: error: ISO C90 forbids mixed declarationsDavid Young2020-04-241-4/+1
| | | | and code [-Werror=declaration-after-statement]`.
* Trim trailing whitespaceQuincey Koziol2020-04-201-1/+1
|
* Reduce casts of HDcalloc()/HDmalloc() that -Wc++-compat required.David Young2020-01-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce gratuitous casts---e.g., (size_t)1. Use the right format string for a pointer. In the H5C sanity checks, change a "size increase" variable from ssize_t (too narrow) to int64_t (wide enough). Parenthesize every appearance of `storage` in the macro `H5D_CHUNK_STORAGE_INDEX_CHK(storage)` so that you can pass in an expression like &sc and it works properly. Disallow re-assignment of the `dset` parameter to H5D__chunk_init() because it helped assure me that it's safe to replace the repeating expression `&dset->shared->layout.storage.u.chunk` with `sc` throughout. Replace lengthy expressions such as `&dset->shared->layout.storage.u.chunk` with `sc` throughout several functions in H5Dchunk.c ISTR that the compiler warned that `sc` was declared but unused in a couple of functions, and then I found that `sc` could be used in many places. Maybe the disused `sc` appeared because a bunch of code was copied and pasted, I don't know. Anyway, it's a lot tighter code now that I use `sc`. In H5D__chunk_update_old_edge_chunks() and H5D__chunk_delete() I actually expand `sc` and another temporary variable, `pline`, because they're used only in !defined(NDEBUG) code. This squashes unused-variable warnings in the defined(NDEBUG) configuration. Don't drop the `volatile` qualification with a cast in tools/src/h5import/h5import.c.
* Added an H5MM_memcpy call that checks for buffer overlap.Dana Robinson2019-03-161-5/+5
|
* Merge branch 'develop' into vfd_init_cleanupDana Robinson2019-01-011-1/+2
|\
| * Correct typoQuincey Koziol2018-12-201-1/+1
| |
| * Clear driver properties before returning them to application.Quincey Koziol2018-12-191-1/+2
| | | | | | | | | | Move write_tracking and page_size properties to be inside the core VFD's driver properties.
* | Cleaned up and normalized VFD init calls.Dana Robinson2018-12-181-12/+9
|/
* Fixed HDFFV-10404Binh-Minh Ribler2018-07-131-3/+3
| | | | | | | | | Description: Applied the typo fixes from user's report. The previous pull request couldn't be merged because it was too old, and it was too complicated for me to resolve conflicts. Platform tested: Linux/64 (jelly) - very minor
* Merge branch 'develop' into windows_openDana Robinson2017-05-311-0/+1
|\
| * Fixed HDFFV-10214:Dana Robinson2017-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Updated comments in the library to accurately reflect the semantics of the H5FD_FEAT_POSIX_COMPAT_HANDLE flag. * Removed the check for the POSIX compatible handle feature flag when determining if a VFD supports SWMR. Partial work for HDFFV-10197: * Added a new H5FD_FEAT_DEFAULT_VFD_COMPATIBLE feature flag that is set when a VFD creates output that is compatible with the default VFD. Will be used in the testing but might also be generally useful to users.
* | Rework of the POSIX file open permissions and macros to clean upDana Robinson2017-04-281-1/+1
| | | | | | | | | | | | HDopen() calls. Also fixed a minor const warning in the core VFD.
* | Changed the Windows POSIX open() file permissions to be correctDana Robinson2017-04-281-1/+1
|/ | | | according to MSDN. Partial fix for HDFFV-9630.
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* [svn-r29842] Description:Quincey Koziol2016-04-301-0/+7
| | | | | | | | | Bring [appropriate portions of] r29811, 29813, 29826, 29830, 29831 from revise_chunks branch to the trunk. Tested on: MacOSX/64 10.11.4 (amazon) w/serial, parallel & production (h5committest forthcoming)
* [svn-r28626] Brought VFD-level file locking code over from revise_chunks.Dana Robinson2015-12-141-8/+79
| | | | | | | Tested on: Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only (these changes have been in revise_chunks for a long time)
* [svn-r27811] Description:Quincey Koziol2015-09-161-21/+17
| | | | | | | | | | | Refactor property list code to "deep copy" properties in the correct way, retraining the rest of the library to copy & release things correctly. This cleans up another batch of memory leaks, etc. within the library. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/32 2.6.x (jam) w/serial & parallel (h5committest forthcoming)
* [svn-r27768] Description:Quincey Koziol2015-09-141-12/+7
| | | | | | | | | | | | | | | | | | | | | | Complete revamp of package initialization/shutdown mechanism in the library. Each package now has a single init/term routine. This new way should avoid packages being re-initialized during library shutdown and is also be _much_ more proactive about giving feedback for resource leaks internal to the library. Introduces a new "module" header file for packages in the library (e.g src/H5Fmodule.h) which sets up some necessary package configuration macros for the FUNC_ENTER/LEAVE macros. (The VFL drivers have their own slightly modified version of this header, src/H5FDdrvr_module.h) Also cleaned up a bunch of resources leaks all across the library and tests, along with addressing many warnings, as I encountered them. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/64 3.10.x (kituo) w/serial & parallel Linux/64 2.6.x (ostrich) w/serial
* [svn-r27572] Removed VMS-specific code from the library.Dana Robinson2015-08-241-15/+0
| | | | | | | | | The only remaining code consists of a few floating-point tests that rely on pre-generated and checked-in VMS files. These have been left alone, even though they will not be possible to recreate, since testing VMS float behavior is still important. Tested on: h5committest
* [svn-r27133] - Add a new attribute function characterstic for format:Mohamad Chaarawi2015-06-011-8/+8
| | | | | | | | * H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) - Rename UNUSED attribute characterstic to H5_ATTR_UNUSED. - Rename NORETURN attribute characterstic to H5_ATTR_NORETURN tested with h5committest.
* [svn-r27045] Renamed H5_ASSIGN_OVERFLOW() to H5_CHECKED_ASSIGN() and re-orderedDana Robinson2015-05-101-1/+1
| | | | | | the arguments to be in a more logical order. Tested on: h5committest
* [svn-r26002] move checks on reading/writing beyond file eoa outside of the ↵Mohamad Chaarawi2015-01-221-4/+0
| | | | | | file drivers and into a centralized place in H5FD_read/write. tested h5committest.
* [svn-r25929] Description:Quincey Koziol2014-12-291-3/+3
| | | | | | | | | | Clean up EOF code within library and add 'mem_type' parameter to 'get_eof' VFD callback, to avoid various ambiguous situations, particularly with the multi VFD. (Supports changes for 'avoid_truncate' feature also) Tested on: MacOSX/64 10.10.1 (amazon) w/serial & parallel h5committest forthcoming
* [svn-r25531] remove use of C99 PRI that failed on windows in dtypes.cMohamad Chaarawi2014-08-111-2/+8
| | | | fix bugs where hid_t were assumed to be 32 bit ints or herr_t.
* [svn-r23713] Description:Quincey Koziol2013-05-211-59/+31
| | | | | | | | | | Clean up warnings, switch library code to use Standard C/POSIX wrapper macros, remove internal calls to API routines, update checkapi and checkposix scripts. Tested on: Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN Big-Endian Linux/64 (ostrich)
* [svn-r22998] Description:Quincey Koziol2012-11-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | Clean up warnings and bring changes from Coverity branch back to trunk: r20451: Fixed coverity 810 r20454: Purpose: Fix coverity issue 816 Description: Modified various file drivers to always check the return value from H5P_get_driver_info. r20455: Purpose: Cleanup fix for coverity issue 816 Description: Removed redundant check for "fa" in H5FD_core_open. Tested on: Mac OSX/64 10.8.2 (amazon) w/debug (Too minor to require h5committest)
* [svn-r22676] Changes needed to make the default free-list mapping from ↵Vailin Choi2012-08-131-1/+1
| | | | H5FD_FLMAP_SINGLE to H5FD_FLMAP_DICHOTOMY.
* [svn-r21932] Description:Quincey Koziol2012-02-131-1/+1
| | | | | | | | Correct misnamed FUNC_ENTER macro. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel (too minor to require h5committest)
* [svn-r21924] Description:Quincey Koziol2012-02-101-2/+2
| | | | | | | Correct a few typos in r21923 checkin that caused failures on linew & ember. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
* [svn-r21922] Description:Quincey Koziol2012-02-091-42/+22
| | | | | | | | Refactor function name macros and simplify the FUNC_ENTER macros, to clear away the cruft and prepare for further cleanups. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
* [svn-r21366] JIRA HDFFV-2748 replace use of _WIN32 in source. Created new ↵Allen Byrne2011-09-061-389/+389
| | | | | | defines H5_HAVE_WIN32_API and H5_HAVE_VISUAL_STUDIO defines to use. These can be properly set during configurration. Tested: windows and local linux - reviewed internally