Compare commits

...

792 Commits

Author SHA1 Message Date
David Young
14dd1f5440 Per discussion, use HD and add comments. 2022-03-18 16:04:21 -05:00
github-actions
3b9b61adde Committing clang-format changes 2022-02-08 22:59:57 +00:00
David Young
25eb313cb3 Do not conditionally compile code that uses a pointer dereference
and assignment to copy a potentially unaligned variable to aligned
automatic storage, or vice versa.  Instead, always use naked `memcpy(3)`s.
Disassembling the generated code reveals that the `memcpy(3)`s optimize
(`-O3`) to a single `mov` instruction for x86_64, which is not strict
about alignment.

This change reduces the size of code and scripts by 143 lines, eases
our way to cross-compilation, and avoids invoking undefined behavior.
2022-02-08 16:47:03 -06:00
jhendersonHDF
36d9a165e4 Fix a few issues noted by LGTM (#1421) 2022-02-04 10:53:55 -06:00
David Young
856de93673 Don't use a nonliteral format string in test/fheap.c:begin_test(). (#1401)
* Avoid using a non-literal formatting string with sprintf in begin_test.
Use snprintf.  Don't duplicate a string on the heap unnecessarily.

* Do not deactivate -Wformat-nonliteral: we don't use a nonliteral format
string any more.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-03 10:41:41 -06:00
Allen Byrne
1d598182d6 Update doc with HDF5_ROOT usage. (#1414) 2022-02-02 13:45:59 -06:00
jhendersonHDF
86ef00fd67 Unify handling of collective metadata reads status (#1206) 2022-01-29 14:22:30 -06:00
Sean McBride
bcf9565535 Added another missing override keyword on a dtor (#1384) 2022-01-29 14:21:30 -06:00
David Young
2b3bb3659c Fix some spelling. (#1402) 2022-01-28 16:44:47 -06:00
Sean McBride
4ac6ccc021 Snprintf2 (#1399)
* Replaced many uses of sprintf with safer snprintf

Many very straightforward, but in a few cases added a length parameter to some private functions, because buffer length was otherwise unknowable.

* Removed unnecessary use of static on small buffers

This improves thread safety.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 16:43:48 -06:00
Allen Byrne
ad71539d30 Remove const from the argv tools/tests main sig. (#1390)
* Remove const from the argv tools/tests main sig.

* also remove const from H5_get_option and parse_command_line.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 16:30:33 -06:00
Sean McBride
b5eed1b563 Replaced several uses of sprintf with safer snprintf (#1383)
* Replaced several uses of sprintf with safer snprintf

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 10:34:57 -06:00
Sean McBride
44de59b642 Used clang-tidy to change all floating point f suffixes to F (#1359) 2022-01-28 08:31:26 -06:00
Larry Knox
5fb634ca26 Revert 61464d7e (#1396)
Commit 61464d7e was a fix for a compiler error on OpenBSD where
int_fast8_t is in fact larger than 1 byte. However, the changes broke
H5detect.c generation of H5Tinit.c on Power8 big-endian, and probably on
all big-endian machines.  Switching DETECT_BYTE to DETECT_I for 8 byte types doesn't work on our big-endian Power8 machine because switching the last parameter of DETECT_I_BYTE_CORE from "int" to the 8 byte type incorrectly sets dt->shared->u.atomic.order = H5T_ORDER_LE on a big-endian machine.  A different fix to accomodate both big-endian and OpenBSD is needed.  See commit 61464d7e for OpenBSD info.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-26 16:58:49 -06:00
Allen Byrne
5222abdd19 Update code owners file with more names (#1386) 2022-01-26 09:05:25 -06:00
Allen Byrne
4d45d05078 Fix cmake dynamic analysis on windows (#1373)
* Fix sanitizer flag form on windows

* Add search paths to windows code-coverage
2022-01-24 07:46:17 -06:00
jhendersonHDF
99d3962a83 Parallel rank0 deadlock fixes (#1183)
* Fix several places where rank 0 can skip past collective MPI operations on failure

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-22 08:40:33 -06:00
Sean McBride
d45124d708 Open bsd fixes (#1195) 2022-01-20 08:38:56 -06:00
Neil Fortner
dd6ad33c75 Implement H5ESget requests function to retrieve requests from an event set (#1355)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-20 07:34:43 -06:00
jhendersonHDF
6c184e28d8 Fix documentation for H5D_space_status_t enum values (#1372) 2022-01-19 14:29:37 -06:00
Matt McCormick
1a9662e04c Do not set CMAKE_INSTALL_PREFIX when built externally (#1380) 2022-01-18 22:28:27 -06:00
Allen Byrne
bd37363332 various cleanup java test, test files, comments (#1363) 2022-01-18 15:52:01 -06:00
Allen Byrne
8dc72928b8 Develop java newrefs fixes for obj ref datasets (#1354)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2022-01-18 14:02:53 -06:00
Allen Byrne
2f34c433dc Update the java slf4j logging jars to latest 1.7.33 (#1369) 2022-01-18 07:44:11 -06:00
Scot Breitenfeld
8b3c09f780 Updated README.txt to README.md (#1375)
* H5Lexists docs: Removed reference to 1.8.16 since the change is the 1.8.x releases, HDFFV-11289

* H5Oget_info_by_name, name can be any object, not just a group

* Converted README.txt to README.md and updated files referring to README.txt to README.md.

* removed references to README.txt

* updated MANIFEST
2022-01-14 17:28:04 -06:00
Gerd Heber
e56b0a3d50 Documentation fixes right in time for the holidays (#1321)
* Sketch of the H5S life cycle.

* Committing clang-format changes

* Fix H5S_UNLIMITED snafu.

* Updated RM template and RM page.

* Added H5S life cycle.

* Committing clang-format changes

* Added H5T life cycle.

* Committing clang-format changes

* Cleaner layout (?)

* Cleaned the H5F life cycle. Called out unfinished biz.

* Committing clang-format changes

* Remaining life cycle skeletons.

* Committing clang-format changes

* Committing clang-format changes

* Added H5Z life cycle.

* Committing clang-format changes

* Added H5G life cycle.

* Committing clang-format changes

* H5 and H5I life cycle updates.

* Committing clang-format changes

* Added H5PL life cycle.

* Committing clang-format changes

* Added H5L life cycle.

* Committing clang-format changes

* Fix for Chris' comment.

* Add a variable for Doxygen pre-processor definitions.

* Forgot to add the H5M API.

* Clarify the H5Z life cycle.

* Committing clang-format changes

* Add H5Zdevelop.h to Doxygen.in. Added H5I life cycle.

* Committing clang-format changes

* Clarified introduction and fixed missing label declaration.

* Added H5O life cycle.

* Committing clang-format changes

* H5O cleanup, part 1.

* Committing clang-format changes

* Cleaned up some of the endless repetition in H5O.

* Committing clang-format changes

* Cookbook & RFC draft layouts.

* Updated manifest.

* Updated the manifest, the example paths, and sketched the 1st recipe.

* Committing clang-format changes

* Outlined two more recipes.

* Committing clang-format changes

* More recipes and RFCs.

* Committing clang-format changes

* Draft of templatized RFC references.

* Another batch of RFC changes.

* Another batch of RFCs.

* Fixed reference.

* RFCs in reverse chronological order.

* First cut of RFCs.

* Fixed reference.

* Updated recipes.

* Updated recipes.

* More RFCs.

* Updated D*PL comments.

* Added H5P descriptions.

* Committing clang-format changes

* H5R life-cycle snapshot.

* Committing clang-format changes

* H5R life-cycle. Added line numbers to life-cycle examples.

* Committing clang-format changes

* Fixed formatting for H5Dchunk_iter().

* Added comment on collective mode requirement w/ compression.

* Simplified API compat. macro dox.

* More API vers. updates.

* Hide the async macro entrails.

* Latest VFD SWMR RFC.

* Create a tag file for permalinks.

* Added TODOs for metadoc.

* Removed duplication.

* Revised RM landing page.

* Trimmed more duplication.

* Committing clang-format changes

* Revised H5D.

* Committing clang-format changes

* Updated survey link.

* Added Doxygen RM entry template link.

* Added the "Multi-Thread HDF5" RFC.

* Added DOXYGEN_TAG_FILE.

* Added selection I/O RFC.

* Added the VFD Sub-filing RFC.

* Updated meta-documentation and added two old presentations.

* Added a few more RFCs (4).

* Fixed MANIFEST.

* Updated meta-documentation.

* Added Filters technical note.

* Fixed MANIFEST.

* Restore the path stripper.

* Experimental full-text search via Google.

* Better full-text search integration.

* Whoops. Forgot this one.

* Oh boy.

* Make CMake happy.

* Added "Debugging HDF5 Applications" technical note.

* Another batch of RFCs.

* Fixes for #1221.

* Updated overview.

* Fixed image dependencies.

* CMake updates.

* Fixed SET.

* Better?

* Update doxygen/dox/Overview.dox

* Fixed documentation errors. Added missing version info.

* Callback documentation updates.

* Fixed indexing errors in the outline.

* Doxygen-ized the HDF5 glossary.

* Fix a few minor typos
.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2022-01-13 22:11:39 -06:00
jhendersonHDF
166ce5b027 Fix H5ACmpio dirty bytes creation debugging (#1357) 2022-01-12 16:58:45 -06:00
Allen Byrne
5fffd563de cmake custom command fix (#1356)
* From gitlab.kitware.com/third-party/hdf5 rework custom commands

 commit/757aa42ebff8c9819c054f5e00559143c60f653d

* Correct stamp file generation

* Needs to support pregenerated H5Tinit.c file

* Adjust custom command for all build systems types

* Custom target only depends on OUTPUT of custom command
2022-01-12 14:27:56 -06:00
Scot Breitenfeld
4aabac62f8 Corrected H5Oget_info parameter description (#1349)
* H5Lexists docs: Removed reference to 1.8.16 since the change is the 1.8.x releases, HDFFV-11289

* H5Oget_info_by_name, name can be any object, not just a group
2022-01-11 12:17:05 -06:00
jhendersonHDF
a13bf24a39 Use appropriate printf format specifiers for haddr_t and hsize_t types directly (#1340) 2022-01-11 12:16:10 -06:00
Scot Breitenfeld
80017cba4f fixed off-by-one error in h5fget_name_f, HDFFV-11290 (#1345)
* fixed off-by-one error in h5fget_name_f, HDFFV-11290

* fixed typo
2022-01-10 19:01:14 -06:00
Scot Breitenfeld
54237d777a H5Lexists docs: Removed reference to 1.8.16 since the change is the 1.8.x releases, HDFFV-11289 (#1335) 2022-01-10 18:47:57 -06:00
Allen Byrne
f8f1fefe53 sort out/ref files for line compare (#1337) 2022-01-08 11:10:59 -06:00
Allen Byrne
03217eca81 Add tests for H5Ocopy of new object refs (#1338)
* Add tests for H5Ocopy of new object refs

* Correct class name

* Skip test because of issue with debug assertions

* Update reference file

* Fix object examples for new refs
2022-01-08 08:19:52 -06:00
Baljak
8430e3d661 Fix compilation issues with Mingw (#1342) 2022-01-07 22:29:25 -06:00
H. Joe Lee
bf27121b5d OESS-168: Remove clang warnings. (#1308) 2022-01-07 16:30:18 -06:00
H. Joe Lee
58e2157c7e OESS-168: Remove clang warnings. (#1305) 2022-01-07 16:29:56 -06:00
H. Joe Lee
a564ec39af OESS-168: Remove clang warnings. (#1304) 2022-01-07 16:29:30 -06:00
jhendersonHDF
9e6de287e7 Fix usage of several HDfprintf format specifiers after HDfprintf removal (#1324) 2022-01-04 11:00:55 -06:00
H. Joe Lee
86b8062699 Fix typo. (#1303)
chksum -> checksum
2022-01-04 11:00:14 -06:00
H. Joe Lee
227d7d927b Fix typo. (#1301)
If the are -> If they are
2022-01-04 10:59:54 -06:00
H. Joe Lee
6fc53b39a2 OESS-168: Remove clang warnings. (#1300) 2022-01-04 10:58:58 -06:00
Scot Breitenfeld
cf1aab28fb Changed to correct return datatype for H5Lexists (#1330)
* changed to correct return datatype for H5Lexists

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-04 09:12:11 -06:00
H. Joe Lee
db61a888e6 OESS-168: Remove clang warnings. (#1295) 2021-12-15 16:22:04 -06:00
H. Joe Lee
c60bc0a07c OESS-168: Remove clang warnings. (#1294) 2021-12-15 16:21:42 -06:00
H. Joe Lee
69251f58aa OESS-168: Remove clang warnings. (#1297) 2021-12-15 16:21:15 -06:00
H. Joe Lee
10450e0491 OESS-168: Remove clang warnings. (#1280) 2021-12-13 17:33:49 -06:00
H. Joe Lee
63687f1a12 OESS-168: Remove clang warnings. (#1283) 2021-12-13 17:33:32 -06:00
H. Joe Lee
be856f5ad1 OESS-168: Remove clang warnings. (#1284) 2021-12-13 17:33:09 -06:00
jhendersonHDF
300a4e2478 Call FUNC_ENTER immediately in H5_init_library (#1287) 2021-12-13 17:31:02 -06:00
jhendersonHDF
ca28e3e631 Fix free list tracking and cleanup cast alignment warnings (#1288)
* Fix free list tracking and cleanup cast alignment warnings

* Add free list tracking code to H5FL 'arr' routines
2021-12-13 17:30:22 -06:00
Gerd Heber
c88aed84ec Make it easier to find version specific docs. (#1260)
* Sketch of the H5S life cycle.

* Committing clang-format changes

* Fix H5S_UNLIMITED snafu.

* Updated RM template and RM page.

* Added H5S life cycle.

* Committing clang-format changes

* Added H5T life cycle.

* Committing clang-format changes

* Cleaner layout (?)

* Cleaned the H5F life cycle. Called out unfinished biz.

* Committing clang-format changes

* Remaining life cycle skeletons.

* Committing clang-format changes

* Committing clang-format changes

* Added H5Z life cycle.

* Committing clang-format changes

* Added H5G life cycle.

* Committing clang-format changes

* H5 and H5I life cycle updates.

* Committing clang-format changes

* Added H5PL life cycle.

* Committing clang-format changes

* Added H5L life cycle.

* Committing clang-format changes

* Fix for Chris' comment.

* Add a variable for Doxygen pre-processor definitions.

* Forgot to add the H5M API.

* Clarify the H5Z life cycle.

* Committing clang-format changes

* Add H5Zdevelop.h to Doxygen.in. Added H5I life cycle.

* Committing clang-format changes

* Clarified introduction and fixed missing label declaration.

* Added H5O life cycle.

* Committing clang-format changes

* H5O cleanup, part 1.

* Committing clang-format changes

* Cleaned up some of the endless repetition in H5O.

* Committing clang-format changes

* Cookbook & RFC draft layouts.

* Updated manifest.

* Updated the manifest, the example paths, and sketched the 1st recipe.

* Committing clang-format changes

* Outlined two more recipes.

* Committing clang-format changes

* More recipes and RFCs.

* Committing clang-format changes

* Draft of templatized RFC references.

* Another batch of RFC changes.

* Another batch of RFCs.

* Fixed reference.

* RFCs in reverse chronological order.

* First cut of RFCs.

* Fixed reference.

* Updated recipes.

* Updated recipes.

* More RFCs.

* Updated D*PL comments.

* Added H5P descriptions.

* Committing clang-format changes

* H5R life-cycle snapshot.

* Committing clang-format changes

* H5R life-cycle. Added line numbers to life-cycle examples.

* Committing clang-format changes

* Fixed formatting for H5Dchunk_iter().

* Added comment on collective mode requirement w/ compression.

* Simplified API compat. macro dox.

* More API vers. updates.

* Hide the async macro entrails.

* Latest VFD SWMR RFC.

* Create a tag file for permalinks.

* Added TODOs for metadoc.

* Removed duplication.

* Revised RM landing page.

* Trimmed more duplication.

* Committing clang-format changes

* Revised H5D.

* Committing clang-format changes

* Updated survey link.

* Added Doxygen RM entry template link.

* Added the "Multi-Thread HDF5" RFC.

* Added DOXYGEN_TAG_FILE.

* Added selection I/O RFC.

* Added the VFD Sub-filing RFC.

* Updated meta-documentation and added two old presentations.

* Added a few more RFCs (4).

* Fixed MANIFEST.

* Updated meta-documentation.

* Added Filters technical note.

* Fixed MANIFEST.

* Restore the path stripper.

* Experimental full-text search via Google.

* Better full-text search integration.

* Whoops. Forgot this one.

* Oh boy.

* Make CMake happy.

* Added "Debugging HDF5 Applications" technical note.

* Another batch of RFCs.

* Fixes for #1221.

* Updated overview.

* Fixed image dependencies.

* CMake updates.

* Fixed SET.

* Better?

* Update doxygen/dox/Overview.dox

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-12-13 15:13:42 -06:00
jhendersonHDF
dd3c61c384 Fixes for async operations (#1272)
Setup VOL wrapping context for each "request" callback

Set H5ES_event_t "next" pointer to NULL when appending to event list
2021-12-10 22:48:50 -06:00
jhendersonHDF
c0a13fd9d8 Remove duplicate memcpy in chunk_file_cb (#1285) 2021-12-10 20:22:49 -06:00
H. Joe Lee
b54c738822 OESS-168: Remove clang warnings. (#1282)
* OESS-168: Remove clang warnings.

* OESS-168: Remove commented-out code.

* OESS-168: Address @gnuoyd review.
2021-12-10 16:01:25 -06:00
H. Joe Lee
70e70002c3 Remove extra space. (#1274) 2021-12-10 09:45:59 -06:00
H. Joe Lee
8c592a2f64 OESS-168: Remove clang warnings. (#1277) 2021-12-10 09:45:14 -06:00
Allen Byrne
5580d7ec81 Fix directory variable in shell scripts (#1273)
* Fix testswmr scripts with utils/test variable

* Change format of configure var assignment

* quote the variable value in configure

* Use sh.in expected var pattern

* Only ref builddir in script

* Create vars for utils/test and test as H5_<path>_BUILDDIR

* Use abs_top_builddir in test scripts

* Change script var to make it easier to read.

* Use @abs_top_builddir@ directly in paths

* Correct typos/comment
2021-12-09 23:06:53 -06:00
jhendersonHDF
364d8cc3e7 Initialize filter mask and chunk nbytes for 'Single' chunk index (#1261) 2021-12-09 15:28:52 -06:00
H. Joe Lee
e36aa06950 OESS-168: Remove clang warnings. (#1269) 2021-12-08 16:00:19 -06:00
Allen Byrne
83cf2cb15b Convert vds swmr test script to powershell (#1245)
* Convert SWMR shell scripts to Windows powershell.

* Use $LastExitCode instead of $? in script

* Prevent execution in a different window

* Github #969 Use stdout instead of file for configure check (#1089)

* Use stdout instead of file for configure check

* Make change requested by #1157

* Change fortran to use stderr for configure

* Correct typo

* remove obsolete file check

* Fortran statement fix

* Don't allow H5Pset(get)_all_coll_metadata_ops for DXPLs (#1201)

* Fixes const warnings in H5ES package (#1211)

* Quiets a 'set but not used' warning in h5diff_array.c (#1210)

* Convert vds swmr test script to powershell

* Enable vdsswmr powershell test

* Add configure vdsswmr statement

* Correct powershell script vars

* Convert SWMR shell scripts to Windows powershell.

* Use $LastExitCode instead of $? in script

* Prevent execution in a different window

* Github #969 Use stdout instead of file for configure check (#1089)

* Use stdout instead of file for configure check

* Make change requested by #1157

* Change fortran to use stderr for configure

* Correct typo

* remove obsolete file check

* Fortran statement fix

* Convert vds swmr test script to powershell

* Enable vdsswmr powershell test

* Add configure vdsswmr statement

* Correct powershell script vars

* Cleanup review issues

* Fix variable assignment

* Change the wait function to pass in the path

* Disable actual test execution until programs fixed

* Adjust copyright text

* Fix spelling

Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-12-08 11:21:15 -06:00
H. Joe Lee
abb05bce6e OESS-168: Remove clang warnings. (#1263) 2021-12-08 08:38:40 -06:00
Larry Knox
40a23b67ea Correct spelling correction of preceed incorrectly to proceed. Should (#1268)
* Correct spelling correction of 'preceed' incorrectly to 'proceed'.  It should be 'precede'.
2021-12-07 15:07:15 -06:00
Scot Breitenfeld
f859cb732b Fixed Spelling Errors (#1166)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging

* Committing clang-format changes

* changed size_i in printf to reflect the I/O.

* Committing clang-format changes

* Fixed seg fault with xlf on BE with -qintsize=8

* fixed error function string

* spelling corrections via codespell, added new spell check github actions

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* work around for https://github.com/codespell-project/codespell/issues/2137

* misc

* added missing file

* misc

* misc.

* misc

* switch to using Codespell with GitHub Actions

* misc.

* misc.

* fixed more sp errors

* Fix new typos found by codespell.

* fixed proceed with precede

* fixed variable in fortran test

* fixed minnum

* updated spelling list

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-12-07 08:27:29 -06:00
Allen Byrne
d7466741ea change windows os from 2016 to latest (#1241)
* change windows os from 2016 to latest

* Upgrade the VS version used.

* specify windows VS version
2021-12-01 09:48:29 -06:00
Allen Byrne
5fddfb8016 Fix windows test with floating point rounding issues (#1237)
* Check windows sdk version for test

* Correct variable reference form

* Use VERSION_LESS in IF check
2021-11-30 13:39:56 -06:00
Larry Knox
89ad105b1c Update version to 1.13.1-1 after creation of branch for 1.13.0 release. (#1236) 2021-11-30 12:53:45 -06:00
Larry Knox
194714abe5 Fix indentation in RELEASE.txt to be consistent. (#1232) 2021-11-29 19:11:28 -06:00
Larry Knox
8a80aec36f Make default to build high-level tools the same as default for (#1234)
high-level library.
2021-11-29 19:11:01 -06:00
rawarren
720ddb20f3 Add support for parallel tools based on the 3rd party library mpiFileUtils (libMFU) … (#1177)
Adds tool h5dwalk and configure options to enable building it.

Co-authored-by: Richard Warren <Richard.Warren@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Richard.Warren <richard.warren@jelly.ad.hdfgroup.org>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-11-29 15:25:23 -06:00
Allen Byrne
9cdc6d58bd Fix Fortran REGEX and newlines (#1226)
* Fix order of fortran define

* fix typo

* Fix REGEX and newlines
2021-11-29 11:45:22 -06:00
jhendersonHDF
ed92286131 Only check HDF5_DRIVER in MPI I/O VFD if VFD isn't initialized (#1213) 2021-11-24 21:14:45 -06:00
jhendersonHDF
b3262c75d5 Fix a few H5CX warnings from recent init changes (#1224) 2021-11-24 16:22:09 -06:00
jhendersonHDF
7cf5c29615 Fix a few warnings after recent H5S const-related changes (#1225) 2021-11-24 16:20:30 -06:00
Dana Robinson
ca6f9e3716 Fixes an assert in H5Pget_filter_by_id1/2 w/ out-of-range IDs (#1222)
* Fixes an assert in H5Pget_filter_by_id1/2 w/ out-of-range IDs

Filter IDs < 0 or > H5Z_FILTER_MAX could trip an assert in the
library due to missing ID range checks in H5Pget_filter_by_id1/2.
The library now returns a normal error code when filter IDs are
out of range. Fixes HDFFV-11286.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-24 16:20:13 -06:00
Gerd Heber
5c06121976 Closes #1221 (#1223)
* Sketch of the H5S life cycle.

* Committing clang-format changes

* Fix H5S_UNLIMITED snafu.

* Updated RM template and RM page.

* Added H5S life cycle.

* Committing clang-format changes

* Added H5T life cycle.

* Committing clang-format changes

* Cleaner layout (?)

* Cleaned the H5F life cycle. Called out unfinished biz.

* Committing clang-format changes

* Remaining life cycle skeletons.

* Committing clang-format changes

* Committing clang-format changes

* Added H5Z life cycle.

* Committing clang-format changes

* Added H5G life cycle.

* Committing clang-format changes

* H5 and H5I life cycle updates.

* Committing clang-format changes

* Added H5PL life cycle.

* Committing clang-format changes

* Added H5L life cycle.

* Committing clang-format changes

* Fix for Chris' comment.

* Add a variable for Doxygen pre-processor definitions.

* Forgot to add the H5M API.

* Clarify the H5Z life cycle.

* Committing clang-format changes

* Add H5Zdevelop.h to Doxygen.in. Added H5I life cycle.

* Committing clang-format changes

* Clarified introduction and fixed missing label declaration.

* Added H5O life cycle.

* Committing clang-format changes

* H5O cleanup, part 1.

* Committing clang-format changes

* Cleaned up some of the endless repetition in H5O.

* Committing clang-format changes

* Cookbook & RFC draft layouts.

* Updated manifest.

* Updated the manifest, the example paths, and sketched the 1st recipe.

* Committing clang-format changes

* Outlined two more recipes.

* Committing clang-format changes

* More recipes and RFCs.

* Committing clang-format changes

* Draft of templatized RFC references.

* Another batch of RFC changes.

* Another batch of RFCs.

* Fixed reference.

* RFCs in reverse chronological order.

* First cut of RFCs.

* Fixed reference.

* Updated recipes.

* Updated recipes.

* More RFCs.

* Updated D*PL comments.

* Added H5P descriptions.

* Committing clang-format changes

* H5R life-cycle snapshot.

* Committing clang-format changes

* H5R life-cycle. Added line numbers to life-cycle examples.

* Committing clang-format changes

* Fixed formatting for H5Dchunk_iter().

* Added comment on collective mode requirement w/ compression.

* Simplified API compat. macro dox.

* More API vers. updates.

* Hide the async macro entrails.

* Latest VFD SWMR RFC.

* Create a tag file for permalinks.

* Added TODOs for metadoc.

* Removed duplication.

* Revised RM landing page.

* Trimmed more duplication.

* Committing clang-format changes

* Revised H5D.

* Committing clang-format changes

* Updated survey link.

* Added Doxygen RM entry template link.

* Added the "Multi-Thread HDF5" RFC.

* Added DOXYGEN_TAG_FILE.

* Added selection I/O RFC.

* Added the VFD Sub-filing RFC.

* Updated meta-documentation and added two old presentations.

* Added a few more RFCs (4).

* Fixed MANIFEST.

* Updated meta-documentation.

* Added Filters technical note.

* Fixed MANIFEST.

* Restore the path stripper.

* Experimental full-text search via Google.

* Better full-text search integration.

* Whoops. Forgot this one.

* Oh boy.

* Make CMake happy.

* Added "Debugging HDF5 Applications" technical note.

* Another batch of RFCs.

* Fixes for #1221.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-24 08:32:53 -06:00
David Young
462e9a373f Create 2D arrays on the heap in a different way (#1169)
* Create 2D arrays on the heap by malloc'ing `struct { TYPE arr[ROWS][COLS];
}`.  This avoids the double-indirection through pointers and the
additional memory of H5TEST_ALLOCATE_2D_ARRAY().

This change will safely quiet the cast warning that PR #1129 was
intended to fix.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 08:09:05 -06:00
Gerd Heber
b9e4deec10 Next batch of Doxygen updates. (#1180)
* Sketch of the H5S life cycle.

* Committing clang-format changes

* Fix H5S_UNLIMITED snafu.

* Updated RM template and RM page.

* Added H5S life cycle.

* Committing clang-format changes

* Added H5T life cycle.

* Committing clang-format changes

* Cleaner layout (?)

* Cleaned the H5F life cycle. Called out unfinished biz.

* Committing clang-format changes

* Remaining life cycle skeletons.

* Committing clang-format changes

* Committing clang-format changes

* Added H5Z life cycle.

* Committing clang-format changes

* Added H5G life cycle.

* Committing clang-format changes

* H5 and H5I life cycle updates.

* Committing clang-format changes

* Added H5PL life cycle.

* Committing clang-format changes

* Added H5L life cycle.

* Committing clang-format changes

* Fix for Chris' comment.

* Add a variable for Doxygen pre-processor definitions.

* Forgot to add the H5M API.

* Clarify the H5Z life cycle.

* Committing clang-format changes

* Add H5Zdevelop.h to Doxygen.in. Added H5I life cycle.

* Committing clang-format changes

* Clarified introduction and fixed missing label declaration.

* Added H5O life cycle.

* Committing clang-format changes

* H5O cleanup, part 1.

* Committing clang-format changes

* Cleaned up some of the endless repetition in H5O.

* Committing clang-format changes

* Cookbook & RFC draft layouts.

* Updated manifest.

* Updated the manifest, the example paths, and sketched the 1st recipe.

* Committing clang-format changes

* Outlined two more recipes.

* Committing clang-format changes

* More recipes and RFCs.

* Committing clang-format changes

* Draft of templatized RFC references.

* Another batch of RFC changes.

* Another batch of RFCs.

* Fixed reference.

* RFCs in reverse chronological order.

* First cut of RFCs.

* Fixed reference.

* Updated recipes.

* Updated recipes.

* More RFCs.

* Updated D*PL comments.

* Added H5P descriptions.

* Committing clang-format changes

* H5R life-cycle snapshot.

* Committing clang-format changes

* H5R life-cycle. Added line numbers to life-cycle examples.

* Committing clang-format changes

* Fixed formatting for H5Dchunk_iter().

* Added comment on collective mode requirement w/ compression.

* Simplified API compat. macro dox.

* More API vers. updates.

* Hide the async macro entrails.

* Latest VFD SWMR RFC.

* Create a tag file for permalinks.

* Added TODOs for metadoc.

* Removed duplication.

* Revised RM landing page.

* Trimmed more duplication.

* Committing clang-format changes

* Revised H5D.

* Committing clang-format changes

* Updated survey link.

* Added Doxygen RM entry template link.

* Added the "Multi-Thread HDF5" RFC.

* Added DOXYGEN_TAG_FILE.

* Added selection I/O RFC.

* Added the VFD Sub-filing RFC.

* Updated meta-documentation and added two old presentations.

* Added a few more RFCs (4).

* Fixed MANIFEST.

* Updated meta-documentation.

* Added Filters technical note.

* Fixed MANIFEST.

* Restore the path stripper.

* Experimental full-text search via Google.

* Better full-text search integration.

* Whoops. Forgot this one.

* Oh boy.

* Make CMake happy.

* Added "Debugging HDF5 Applications" technical note.

* Another batch of RFCs.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 08:05:40 -06:00
David Young
4b9ca8e1f6 Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the (#1171)
* Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the
raw H5R_ref_t bytes to a heap buffer that's known to have the right
alignment.

* Committing clang-format changes

* Use an automatic H5R_ref_t instead of malloc'ing one.  Go ahead and
initialize the H5R_ref_t to all-0s so that arbitrary stack content
doesn't foul things up.  Bail out with an error if `size` exceeds
`sizeof(H5R_ref_t)`.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 08:05:01 -06:00
jhendersonHDF
3f2271364e Make sure plugin interface is initialized before property list interface phase 2 (#1216) 2021-11-23 08:04:11 -06:00
Dana Robinson
3a2b3bb035 Stop lying about H5S_t const-ness (#1209)
Hyperslabs can be reworked inside several H5S callbacks, making H5S_t
non-const in some places where it is marked const. This change switches
these incorrectly const H5S_t pointer parameters and variables to
non-const where appropriate.
2021-11-20 08:34:50 -06:00
Dana Robinson
49f7e00ebe Quiets a 'set but not used' warning in h5diff_array.c (#1210) 2021-11-18 16:57:30 -06:00
Dana Robinson
56ba9da70b Fixes const warnings in H5ES package (#1211) 2021-11-18 16:56:32 -06:00
jhendersonHDF
cae59a0f11 Don't allow H5Pset(get)_all_coll_metadata_ops for DXPLs (#1201) 2021-11-18 10:07:29 -06:00
Allen Byrne
aa2f6735fb Github #969 Use stdout instead of file for configure check (#1089)
* Use stdout instead of file for configure check

* Make change requested by #1157

* Change fortran to use stderr for configure

* Correct typo

* remove obsolete file check

* Fortran statement fix
2021-11-17 23:53:00 -06:00
Allen Byrne
b823ddc526 Add javadoc to packages - HDFFV-11285 (#1197) 2021-11-16 23:13:59 -06:00
Larry Knox
28e92647f0 Move -Werror=int-conversion from error-general to error-5 in (#1194)
gnu-warnings (unrecognized command line option for gcc 4.85/4.93.
2021-11-13 22:11:25 -06:00
Dana Robinson
d224f98dbc Quiets most const warnings in the fractal heap code (#1188) 2021-11-12 22:36:32 -06:00
David Young
08b1c6ac3c Make it an error if the library implicitly converts from integer to (#1165)
pointer or from pointer to integer (-Werror=int-conversion).  Also,
make it an error if the library explicitly converts to pointer from an
integer of a different size (-Werror=int-to-pointer-cast).
2021-11-12 21:25:14 -06:00
Dana Robinson
4475a12b5f Fixes unused parameter warnings in the null VFD (#1179) 2021-11-12 20:11:23 -06:00
jhendersonHDF
b9da39d19f Fix MPI Comm and Info leak in H5FD__mpio_delete (#1189) 2021-11-12 11:28:47 -06:00
Dana Robinson
e4956cdba9 Cleans up pointer and ID reset code in H5Pint.c (#1182) 2021-11-10 15:06:24 -06:00
Dana Robinson
f12228c9f2 Quiets const warning in H5RS code (#1181) 2021-11-10 15:04:19 -06:00
jhendersonHDF
a777e3075e Fix H5DS warnings related to new H5DSwith_new_ref and H5VLobject_is_native APIs (#1184) 2021-11-10 12:09:38 -06:00
Dana Robinson
b488eb4ecc Fixes FUNC_ENTER warnings in VFDs due to recent init changes (#1178) 2021-11-09 22:40:46 -06:00
Dana Robinson
25fe28eb04 Fixes const issues in the version 2 B-trees (#1172)
The operations that were changed are fundamentally not const since the
shadow operation can modify the node structure when SWMR is in use.
2021-11-09 12:31:00 -06:00
jhendersonHDF
b736d442ae Re-enable collective metadata reads after disabling for chunk lookup (#1173) 2021-11-09 08:05:08 -06:00
David Young
a0445d806c Simplify function enter macros for performance benefits (#1024)
* 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>
2021-11-08 15:08:07 -06:00
David Young
e82d39ca0e Fix the function cast error in H5Dchunk.c and activate (#1170)
`-Werror=cast-function-type`.  Again.
2021-11-08 14:33:39 -06:00
Allen Byrne
6b737bf4cf Add option for h5repack timing (#1142)
* Add timing option to h5repack

* Adjust help text

* fix format

* fix typos

* Correct spacing

* Change timing to use H5Timer

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-08 13:48:58 -06:00
Sean McBride
9cea7c9bb9 Assume C99 fixed sized ints exist, use them (#470)
* Committing clang-format changes

* Assume C99 fixed sized ints exist, use them

* Assume H5_SIZEOF_LONG_DOUBLE != 0, `long double` has existed since C89

Note, this is only assuming that `long double` exists, no assumptions about its size have been touched.  Didn't remove any code that does things like test if `long double` and `double` have different sizes.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-08 12:44:06 -06:00
H. Joe Lee
a8d03d30ff OESS-168: Remove clang warnings. (#1124)
* OESS-168: Remove clang warnings.

* OESS-168: Remove clang warnings.

* Committing clang-format changes

* OESS-168: Address @derobins review for FALLTHROUGH.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-05 08:31:01 -05:00
H. Joe Lee
b3f35a97a9 OESS-168: Remove clang warnings. (#1136)
* OESS-168: Remove clang warnings.

* OESS-168: Address @byrnHDF and @derobinson review.
2021-11-05 08:06:54 -05:00
H. Joe Lee
57c6fbfdd7 OESS-168: Remove clang warnings. (#1137)
* OESS-168: Remove clang warnings.

* OESS-168: Address @derobins review.
2021-11-05 08:06:02 -05:00
jhendersonHDF
93ac9b0aeb New references for Dimension Scale APIs (#1139)
* Enable usage of new-style references with dimension scale APIs

* Add API to check if an object ID represents a native connector object

* Modified code to use new function H5DSwith_new_ref to determine if new references should be used with
Dimension Scales. The new function return TRUE if non-native connector is used or if H5_DIMENSION_SCALES_WITH_NEW_REF
varible is define at configure time (--enable-dimension-scales-with-new-ref).

Tested on jelly.

ToDo: generate testing file on BE system and enable the test; add flag to CMake; test netCDF-4 with the new references.

* Adding new test files generated on BE system (hedgehog) created by 32 and 64-bit library.

test_ds chokes on test_ds_le_new_ref.h5  on BE system; test passes for test_ds_be_new_ref-32bit.h5
for the 32-bit library and fails for the 64-bit library, and vice versa. I am checking the files for further
investigation; but current implementation of the new references is not portable between LE and BE systems,
and 32 and 64-bit systems.

* Minor fixes for testing issues

* Update test_ds.c

Enabled broken test; tests pass now.

* Update RELEASE.txt

Documented new option to use new references with the HDF5 dimension scales APIs (H5DS*).

* Update MANIFEST for new 32-bit new-style references test file for H5DS APIs

* Update 'dimension scales w/ new-style refs' feature based on review

Co-authored-by: Elena <epourmal@hdfgroup.org>
2021-11-05 07:33:02 -05:00
H. Joe Lee
55ee1fd655 OESS-168: Remove clang warnings. (#1105)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

* OESS-168: Address @soumagne review.

* Committing clang-format changes

* OESS-168: Address @soumagne review.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-04 08:15:21 -05:00
Allen Byrne
81b9d71a24 Fix Java VOL tests (#1158) 2021-11-03 07:28:30 -05:00
H. Joe Lee
60ed6c0df4 OESS-168: Remove clang warnings. (#1146) 2021-11-02 14:24:14 -05:00
H. Joe Lee
ed3584ecc6 OESS-168: Remove clang warnings. (#1135) 2021-11-02 14:22:45 -05:00
H. Joe Lee
4aad0feb34 OESS-168: Remove clang warnings. (#1127)
* OESS-168: Remove clang warnings.

* OESS-168: Address @lrknox clang-format review.
2021-11-02 14:22:01 -05:00
Allen Byrne
7ef6f7b6f8 Set the plugin path to the library default (#1144) 2021-10-29 17:41:04 -05:00
Scot Breitenfeld
9e0f68b967 correct error checking string (#1143)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging

* Committing clang-format changes

* changed size_i in printf to reflect the I/O.

* Committing clang-format changes

* Fixed seg fault with xlf on BE with -qintsize=8

* fixed error function string

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-29 08:13:21 -05:00
Allen Byrne
fabdce56ef Split dir create into separate macro (#1141)
* Split dir create into separate macro

* Correct VFD settings
2021-10-28 07:49:28 -05:00
Allen Byrne
07a3a1c70b Github #1019 - add Fortran developer flags (#1090) 2021-10-27 16:32:33 -05:00
Larry Knox
8d1fe44164 H5repack tests should fail if a corrupted file causes h5repack to (#1138)
* H5repack tests should fail if a corrupted file causes h5repack to
segfault/core dump.

* Add release note for HDFV-10590, CVE-2018-17432.
2021-10-25 21:17:44 -05:00
Allen Byrne
aee9e06aa8 Consolidate VFD create list macro (#1132) 2021-10-25 21:17:23 -05:00
Dana Robinson
b0bd984ed6 Removes the "try free" behavior from the skip lists (#1126)
* Removes the "try free" behavior from the skip lists

This was only used in the ID code when iterating and a callback
could delete IDs. It is not used anywhere else in the library and
is now pointless overhead.

Also quiets the const warnings when returning stored elements. They
only need to be const with respect to the skip list code, which should
never modify them. The library can do whatever it wants with the elements
it stored.

* Formatted source
2021-10-22 10:02:28 -05:00
H. Joe Lee
4600e10106 OESS-168: Remove clang warnings. (#1117) 2021-10-21 16:10:07 -05:00
jhendersonHDF
bf395daa6f Fix map open to use correct VOL argument structure (#1116)
Fix map iterate by setting key memory type ID field
2021-10-21 16:08:28 -05:00
Larry Knox
f9a57500ca Add release note for HDFFV-11150 fix. (#1106)
* Add release note for HDFFV-11150 fix.

* Add note about gif tool CVEs.
2021-10-21 16:08:05 -05:00
Allen Byrne
76c77a242c Correct java exception declarations (#1121) 2021-10-20 13:54:41 -05:00
Allen Byrne
e1c4209f9f Fixed HL_test_packet, incorrect length assignment (#1100) 2021-10-20 12:17:37 -05:00
Allen Byrne
6d4d0fb13d Move test utilities to utils/test folder (#1109)
* Move test utilities to utils/test folder

* Fix makefile assignment

* Add new dir

* add new folder

* Correct copied makefile

* Fix dir typo

* Add missing include dir

* Remove unnecessary lib link

* Correct dependent dirs

* Fix conditional checks

* Disable test if not built

* fix path to executable

* Use fixture for swmr_vfd check

* Add release note

* Correct shell tests and c++ flag warning

* Update autotools c++ warning

* Fix typo
2021-10-20 08:25:06 -05:00
H. Joe Lee
c196bf98eb OESS-168: Remove clang warnings. (#1075)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

* OESS-168: Fix CI failure.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-20 08:09:30 -05:00
H. Joe Lee
82b61574e1 OESS-168: Remove clang warnings. (#1072)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

* Address review by @jehndersonHDF.

* Address review by @jehndersonHDF.

* OESS-168: Fix CI failure.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-14 22:06:42 -05:00
H. Joe Lee
780dc11e6e OESS-168: Remove clang warnings. (#1077) 2021-10-07 21:59:32 -05:00
H. Joe Lee
0f3ed99d85 OESS-168: Remove clang warnings. (#1076) 2021-10-07 21:59:10 -05:00
Allen Byrne
83eeef504a Add missing dataset reference text (#1081)
* Add missing dataset reference text

* Only print name if not printing data
2021-10-07 17:06:49 -05:00
H. Joe Lee
e2cdb618ae OESS-168: Remove clang warnings. (#1074)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-06 16:25:40 -05:00
H. Joe Lee
52cb2833de OESS-168: Remove clang warnings. (#1071)
* OESS-168: Remove clang warnings.

* Address review by @jehndersonHDF.
2021-10-06 16:25:08 -05:00
David Young
174f4275ba To reduce maintenance effort, delete the noerror- variants of the compiler flags files (#1033)
* Avoid maintenance headaches: delete the `noerror-` variants of the
compiler flags files, since they essentially duplicate the `error-`
files modulo the replacement of `-Werror=` with `-W` and any changes in
comments.  (I verified the duplication with a script.)

For autoconf, reinstate the use of the `demote_errors` shell function to
derive the `noerror-` content from the `error-` content.  `demote_errors`
replaces `-Werror=` with `-W` when `WARNINGS_AS_ERRORS` is `no`.

Slightly reorder `configure.ac` so that the setting of
`WARNINGS_AS_ERRORS` takes effect before the `error-` files are sourced.

* Take a stab at updating the CMake files to match the changes I made to
the autoconf files to remove `noerror-` files.  I'm not much of a CMake
user so these changes are quite rough.

Looks like the duplication can be reduced with the introduction of a new
macro.

* Delete `noerror-` files from the MANIFEST.

* Reduce duplication in the CMake files: perform the
HDF5_ENABLE_WARNINGS_AS_ERRORS test once in the ADD_H5_FLAGS macro.

* Add a release note.
2021-10-06 16:24:22 -05:00
Larry Knox
a08059894b Add tools/src/h5perf/Makefile.in (#1066) 2021-10-04 06:16:13 -05:00
Allen Byrne
eca8d5b767 Fix ASAN issue in h5dump error path (#1051)
* Fix ASAN issue in h5dump error path

* Rework error allocation free.
2021-10-03 08:06:08 -05:00
Allen Byrne
b3cb56e255 ASAN fix for test_ld - free sub-allocation of fields (#1052) 2021-10-01 16:51:38 -05:00
Neil Fortner
22cdccb799 Fix bug with cross platform compatibility of references within vlens. (#1064)
No testing yet.
2021-10-01 14:28:50 -05:00
H. Joe Lee
1f7ddf47f5 OESS-168: Remove clang warnings. (#1057)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-30 10:45:33 -05:00
H. Joe Lee
80c041d6da OESS-168: Remove clang warnings. (#1056) 2021-09-30 10:45:08 -05:00
jhendersonHDF
6c794a8d98 Move HDstrcmp operations inside casting block for PGI compilers (#1063) 2021-09-30 10:37:40 -05:00
jhendersonHDF
bbbc31e28e Fix Mirror, HDFS and ROS3 case statements for VFD value in H5trace (#1062) 2021-09-30 10:37:23 -05:00
jhendersonHDF
5b5f0c08c9 Update compact dataset I/O routines to handle driver-level memory copy (#1054)
* Update compact dataset I/O routines to handle driver-level memory copy

* Combine compact I/O read/write struct into single I/O struct

Rename CTL memory copy flag and H5Fquery routine to get file driver
structure

* Add RELEASE.txt entry for new "ctl" memory copy operation
2021-09-29 23:00:24 -05:00
jhendersonHDF
3da0802c40 VFD plugins (#602)
* 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
2021-09-29 13:28:12 -05:00
H. Joe Lee
0fa5836cc5 OESS-168: Remove clang warnings. (#1050)
This patch will remove clang double-promotion warning.
2021-09-29 08:59:47 -05:00
H. Joe Lee
c7d7942510 OESS-168: Remove clang warnings (#1049)
This patch will remove clang double-promotion warning.
2021-09-29 08:59:34 -05:00
H. Joe Lee
35cf4a69bf OESS-168: Remove clang warnings. (#1047)
This patch will remove clang warnings on Mac:

      'float' to 'double' [-Wdouble-promotion]
2021-09-29 08:59:24 -05:00
H. Joe Lee
9e319d403c OESS-168: Remove clang warnings. (#1046)
This patch will remove clang warnings on Mac:

``` warning: implicit conversion increases floating-point precision:
      'float' to 'double' [-Wdouble-promotion]
```
2021-09-29 08:59:11 -05:00
Larry Knox
1c52149f75 Update version to 1.13.0-7 after snapshot release 1.13.0-6. (#1048) 2021-09-29 07:38:59 -05:00
Larry Knox
b410d9535c Update Platforms Tested in RELEASE.txt. (#1045)
* Update Platforms Tested in RELEASE.txt.
Remove Tested Configuration Features Summary for updated replacement.

* Set version to 1.13.0-6 for rc6 snapshot.
2021-09-28 14:35:19 -05:00
Allen Byrne
516d967710 Develop cmake install dir (#1041)
* Corrected path searched by CMake find_package command

* Correct path for depend libs

* Adjust examples script for install path
2021-09-28 08:00:37 -05:00
Allen Byrne
ecb3383c8d Develop libaec up (#1037)
* Upgrade libaec to 1.0.6

* correct include file name
2021-09-28 07:59:07 -05:00
Allen Byrne
cc7c0eb910 MS clang needs EHsc flag (#1035) 2021-09-24 08:06:35 -05:00
jhendersonHDF
4640005052 VFD ctl feature (#981)
* 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>
2021-09-23 07:50:00 -05:00
Allen Byrne
534435271f Need to match clang and versions not just "Clang" (#1029) 2021-09-22 06:51:55 -05:00
Allen Byrne
c0f2bc87ac HDFFV-11266 - add option to build HL tools (#1018)
* HDFFV-11266 - add option to build HL tools

* Correct if syntax

* Correct name of conditional
2021-09-16 12:15:25 -05:00
Allen Byrne
daeb4454f6 Disable fortran warning (#1014) 2021-09-16 10:21:21 -05:00
Sean McBride
1f2bba5255 Modified gcc/clang warning suppression macros to account for some warnings flags being supported by one compiler but not the other (#379)
* Committing clang-format changes

* Fixed GCC warning suppression pragmas to also work with clang

H5_GCC_DIAG_ON remains gcc-only.

Added a new H5_CLANG_DIAG_ON that's clang-only, but it's not used anywhere currently.

Added a new H5_GCC_CLANG_DIAG_ON that works with both compilers, which afterall support mostly the same warnings.  Changed almost all uses of H5_GCC_DIAG_ON to use H5_GCC_CLANG_DIAG_ON, with the exception of a couple, where they really were suppressing gcc-only warnings.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-16 07:42:20 -05:00
Allen Byrne
1c892fb41f Fix java warnings (#1005) 2021-09-15 08:26:25 -05:00
jhendersonHDF
cd2ca91875 Fix several warnings (#720) 2021-09-14 15:24:01 -05:00
Jan-Willem Blokland
7c973deaf1 H5Ztrans: (feature) Improved H5Z_xform_noop() and H5Z_xform_create() … (#933)
* H5Ztrans: (feature) Improved H5Z_xform_noop() and H5Z_xform_create() function

- Made a small improvement for H5Z_xform_noop() function. Now,
  the function will also return TRUE if the data transform function
  expression = "x". For this case, the HDF5 library behaves in a
  similar fashion as the case when no data transform function has been
  specified.
- Improved the inline documentation of the function
  H5Z_xform_create() such it is more inline with the rest of the
  code.

* Committing clang-format changes

* H5Ztrans: (feature) Added 3 tests for improved H5Z_xform_noop() function

- Added serial test with data transform expression = "x" to
  verify the improved H5Z_xform_noop() function behaves as expected.
- Added 2 parallel tests with data transform expression = "x"
  in combination with a filter. Before, these tests will fail but
  with the improved H5Z_xform_noop() function they work and result
  in the expected behavior.
- Small bug fix for one of parallel filter tests.

* Committing clang-format changes

* H5Ztrans: (feature) Added release note about detection of the
           simple data transform function "x".

- Added a brief explanation about the implemented improvement
  of the detection of the simple data transform function "x"
  to the RELEASE.txt file.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-13 15:05:19 -05:00
Allen Byrne
f6f1a02344 Update examples version because of HDFFV-11269 (#998) 2021-09-10 07:45:04 -05:00
Allen Byrne
b58f8540ac Fix various warnings and issues in doxygen doc generation (#994)
* Fix various warnings and issues in doxygen doc generation

* Add new file to list
2021-09-10 07:40:27 -05:00
Alessandro Felder
8e06298ecf Add high-level set/get for unsigned long long attributes. (#973)
* add ULL attr set/get signatures to LT public API

* add LT implementation of ULL set/get attribute

* fix copy-paste typo in test comment

* add ULL test data

* define ullong attr name global variable

* add LT tests for ULL attr set/get

* Committing clang-format changes

* correct type passed to lt get attr test for ULL

* update RELEASE.txt with added ULL set/get functionality

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-08 15:53:15 -05:00
Larry Knox
919f9daec6 Update copyright headers with reproduction notice in 5 files (#993)
* Update copyright headers with reproduction notice in 5 files that did
not match terms in COPYING file
.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-08 09:52:03 -05:00
Allen Byrne
163d40dd42 Correction of pkg-config compile script. (#974)
* Correction of pkg-config compile script.

* Reword note.
2021-09-07 08:25:39 -05:00
Allen Byrne
216f5ba65e Sync CMake java macros with cmake repo (#982) 2021-09-07 08:18:53 -05:00
Allen Byrne
f679c6ea28 Small doxygen fixes plus simple doc fixes (#989)
Change doxygen generated file location
Clang format override for flags
2021-09-04 15:22:07 -05:00
Allen Byrne
6d15c45225 Synch CMake doxygen options with autotools configure (#983) 2021-09-02 07:57:47 -05:00
Gerd Heber
cf25524474 A batch of life-cycle examples for different modules (#654)
* Create a tag file for permalinks.

* Added DOXYGEN_TAG_FILE.

* Added Doxygen life-cycle examples for different modules.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-01 16:09:27 -05:00
Scot Breitenfeld
01fe2549a3 Rework of PR #826 (#972)
*    H5Fget_name_f fixed to handle correctly trailing whitespaces and newly allocated buffers.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-30 09:56:32 -05:00
Scot Breitenfeld
794acf489f Fixed failure on BE with xlf (#968)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging

* Committing clang-format changes

* changed size_i in printf to reflect the I/O.

* Committing clang-format changes

* Fixed seg fault with xlf on BE with -qintsize=8

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-30 09:09:06 -05:00
Sean McBride
131402a92d More various warnings (#958)
* Committing clang-format changes

* Fixed various -Wdouble-promotion warnings

* Fixed -Wshadow warning for `optopt` conflict

On macOS at least, there is a global various named `optopt` in unistd.h.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-24 23:05:23 -05:00
Dana Robinson
e9765e6c09 Move pwd header check to alphabetical order (#954) 2021-08-23 18:45:29 -05:00
Sean McBride
f6c49fe891 More clang tidy (#908)
* Pacify clang-analyzer-unix.cstring.NullArg

* Apply some bugprone-suspicious-string-compare

* Apply some readability-simplify-boolean-expr

* Apply some readability-make-member-function-const

* Apple some bugprone-macro-parentheses

* Changed an f suffix to L for `long double`

* Applied some readability-uppercase-literal-suffix automatically

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-23 16:14:53 -05:00
Ben Boeckel
b5f5c59f29 cmake: simplify try_run result comparisons (#950)
Instead of looking at `MATCHES 0` which runs a regex and returns a false
positive for any result such as `10`, check if they are equal to `0`.
Also quote `0` to avoid looking it up as a variable (which was left
behind prior to the fix to use `${RETURN_VAR}` in the `c_run` macro).
2021-08-23 08:36:21 -05:00
Allen Byrne
b38bc071e9 Remove incorrect compiler check for windows clang sanitizer (#942) 2021-08-20 15:49:53 -05:00
Sean McBride
09283ffbcb Get class name null str (#899)
* Fixed MSVC compile error in C++23 mode

Error message from MSVC with C++23 enabled:

error C2440: 'return': cannot convert from 'int' to 'std::basic_string<char,std::char_traits,std::allocator>'

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-20 15:32:15 -05:00
Jan-Willem Blokland
de60f08b0d CMake: (fix) ph5example test (#935)
Ensure that the used number of processes times an integer number
is equal to SPACE1_DIM1 and SPACE_DIM2. These variables are
equal to 24 and are defined in ph5example.c. If this is not the
case the ph5example test will fail.
2021-08-19 16:45:43 -05:00
Allen Byrne
3600d33f10 CMake should use the output dir programs for shell scripts (#928) 2021-08-19 16:03:05 -05:00
Larry Knox
564380d176 Fix issue #924 in develop branch: the ${HDF5_CXXLINKER} does not work in h5c++ (#925)
* Committing clang-format changes

* Fix issue #924, ${HDF5_CXXLINKER} does not work in h5c++.
2 instances of CLINKER corrected to CXXLINKER
comment border aligned

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-19 15:57:48 -05:00
Allen Byrne
2524b57a6f Develop windows compiler fixes (#912)
* Fix windows compiler issues

Restore MS C++ Default exception handling behavior #885
Remove clang toolchain as it skips compiler checks

* Add check and header gaurd for pwd.h

* Revert change

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-19 15:56:37 -05:00
Allen Byrne
c88c0f2008 Correct number of args to Windows HDunsetenv macro (#939)
* Correct number of args to Windows HDunsetenv macro

* Correct format
2021-08-19 13:07:49 -05:00
Allen Byrne
c019db60ee Remove non-published short arg names (#917)
* Remove non-published short arg names

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-18 11:05:02 -05:00
Allen Byrne
af7989e858 Correct dataset close in java test (#919)
* Correct dataset close

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-18 11:02:29 -05:00
Allen Byrne
04c504664b Fix formatting (#923) 2021-08-18 10:58:02 -05:00
Allen Byrne
451b472cdd Fixed the CMake processing for C++ warnings and flags (#888) 2021-08-16 08:06:59 -05:00
Allen Byrne
6968906418 Fix clang/sanitizer for windows (#883)
* Fix clang/sanitizer for windows

* Restrict MSVC version for sanitize
2021-08-16 08:05:25 -05:00
Allen Byrne
c0f1db4b96 Update examples version used by CMake (#882) 2021-08-12 07:50:16 -05:00
Dana Robinson
b5c66529e9 Fixes a bad memory read and unfreed memory in fsinfo code (#893)
* Fixes a bad memory read and unfreed memory in fsinfo code

The segfaul from CVE-2020-10810 was fixed some time ago, but the
illegal memory read and unfreed memory were not.

This fix tracks some buffer sizes and errors out gracefully on errors,
ensuring buffers are cleaned up and avoiding the H5FL infinite loop +
abort on library close.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-12 07:21:50 -05:00
David Wells
7c918e685f Guard the SKIP_MPICXX macros against redefinition. (#892) 2021-08-12 07:12:21 -05:00
jhendersonHDF
baefe44494 Fix link issue with perf/h5perf in parallel library (#889) 2021-08-11 07:31:49 -05:00
Allen Byrne
06a09a962a Reorg tools perform to provide h5perf for installation (#884)
* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

* Correct VAR used to find configure time file

* Set the path correctly

* Update missing release note info.

* Update code owners

* Correct JIRA note

* add known problem.

* Use only core library for testing dynamic plugins.

* Reorg tools perform to provide h5perf for installation

* Correct file paths

* Correct path

* Add new src folder to makefile list

* Remove bin_PROGRAMS from TEST_PROG

* Default h5perf executables to static build

* Remove test lib dependency from h5perf

* format adjustments

* Remove test lib from autotools makefile

* Add note

* h5perf needs the math library

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-08-10 08:57:36 -05:00
Allen Byrne
acb186f6e5 Add parallel version of h5pfc script (#881) 2021-08-07 08:55:23 -05:00
Dana Robinson
5dabec4cf6 Removes partial long options from the tools (#872)
Some of the command-line tools would allow partial long options (e.g.,
--datas instead of --dataset). These were inconsistently implemented,
difficult to maintain, and occasionally blocked useful long options.
They have been removed from all the tools.

NOTE: This change should NOT be merged to 1.12 or earlier.
2021-08-03 16:04:58 -05:00
Dana Robinson
04f1bff675 Updates the RELEASE.txt file with a note about the variable-length fill (#871)
value issue. A fix is in progress, but it might be a while before
we have time to finish it up.
2021-08-03 16:04:30 -05:00
Larry Knox
48a05aa887 Unsigned comparison to 0 warning avoidance (#869)
* Added int variable for comparison with H5_VERS_RELEASE in H5.c to avoid
warning that unsigned comparison < 0 is always false, which is known,
        but for later versions the comparison can possibly be true.

* Better solution for avoiding warning that unsigned comparison < 0.
2021-08-01 22:07:01 -05:00
Larry Knox
9fd356e240 Added int variable for comparison with H5_VERS_RELEASE in H5.c to avoid (#866)
warning that unsigned comparison < 0 is always false, which is known,
        but for later versions the comparison can possibly be true.
2021-07-29 20:18:37 -05:00
Dana Robinson
9bb1d6d78e Updates a comment in H5mpi.c (#863)
MPI_Type_struct() is an MPI-1 call we no longer use.
2021-07-28 16:29:10 -05:00
Allen Byrne
cfcdf21518 Remove version-check for relnum in H5check. (#812)
* Remove version-check for relnum in H5check.

* Add in release exception code check

* Fix typos

* Fix more typos

* Rework comments

* format change

* format whitespace

* Library version must be less than or equal to headers

* Need the NOT version of the compare

* Enable release+1 check for PASS

* Add release note

* Update note
2021-07-27 15:44:05 -05:00
Allen Byrne
74f1590d47 Only test h5diff_830 in serial (#858) 2021-07-27 13:59:05 -05:00
H. Joe Lee
f3441d5486 OESS-168:Remove clang warnings. (#835)
* OESS-168:Remove implicit conversion increases floating-point precision warnings.

* OESS-168:Remove clang warnings.

* OESS-168:Remove clang warnings.

* Committing clang-format changes

* OESS-168:Remove clang warnings.

* Committing clang-format changes

* OESS-168:Remove clang warning.

* OESS-168:Remove clang warnings.

* OESS-168:Address @byrnHDF review.

* Remove line added to generated hl/src/H5LTanalyze.c file.
Issue #854 created for creating a fix.

* Remove extra whitespace from H5LTanalyze.c.

* Remove extra blank line.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-07-26 15:18:15 -05:00
Dana Robinson
725da3768b Removes unused commented-out code from h5jamgentest.c (#851) 2021-07-22 13:42:06 -05:00
Dana Robinson
06de43332d Fixes a couple of warnings: (#849)
- warn_unused_result warnings from h5jamgentest and j5stat_gentest
   that were triggered by write(2) calls where we didn't check the
   return value
 - A missing callback in the NULL VOL connector
 - A possibly uninitialized property list pointer
2021-07-22 08:13:14 -05:00
jhendersonHDF
96b6872a1e Avoid popping API context when one wasn't pushed (#848) 2021-07-22 08:12:42 -05:00
Allen Byrne
20dd1cedb3 Issue #833 fix setting return result (#843) 2021-07-21 11:12:39 -05:00
jhendersonHDF
50a37fde06 Allow parallel filters feature for comm size of 1 (#840) 2021-07-19 20:40:28 -05:00
Allen Byrne
436727dcea Perform option arg variables (#834)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

* Correct VAR used to find configure time file

* Set the path correctly

* Update missing release note info.

* Update code owners

* Correct JIRA note

* add known problem.

* Use only core library for testing dynamic plugins.

* Fix static perform tools compile for arg options

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-07-14 22:59:38 -05:00
Allen Byrne
9ec773bb18 Changes to docs for using plugins (#814)
* Changes to docs for using plugins

* VS2019 corrections

* Fix typo
2021-07-14 11:12:01 -05:00
Jan-Willem Blokland
21c6bb38e6 CMake: (feature) libaec (#703)
* CMake: (feature) libaec

Implemented better support for the compression library libaec.
Especially, for the new version 1.0.5:
- The CMake config files of this version 1.0.5 now set certain
  SZIP variables which can be used in the existing
  CMake structure.
- Both static and shared SZIP compatible libaec library contains
  all required objects such it can be easily used when building
  HDF5 from scratch.
- Introduced the USE_LIBAEC_STATIC option to make use of the static
  version of SZIP compatible libaec library.

* CMake: (fix) libaec

Implemented the fallback option for the case if version 1.0.5
of libaec could not be found.

* Docs: Added description about libaec implementation.

Added short description about the libaec improvement to the Bug Fixes
section in the Configuration sub-section.
2021-07-14 10:42:14 -05:00
jhendersonHDF
31027a997c Add support for parallel filters to h5repack (#832) 2021-07-14 10:38:21 -05:00
H. Joe Lee
6b94bf50a0 OESS-168:Remove implicit conversion warnings. (#829)
* OESS-168:Remove implicit conversion increases floating-point precision warnings.

* OESS-168:Remove clang warnings.
2021-07-12 09:00:48 -05:00
Dana Robinson
86e8238ad3 Removes develop header cruft (#828) 2021-07-09 16:27:10 -05:00
Dana Robinson
8e2fc4a2e2 Remove checks for winsock2.h (#813)
This is only needed on Windows and always available, so there's no need
to check for it.
2021-07-06 12:39:15 -05:00
Dana Robinson
257c8c7454 Removes remaining H5_TIME_WITH_SYS_TIME cruft (#810)
Mostly from CMake
2021-06-30 10:18:01 -05:00
Dana Robinson
f0e0c7ed2a Fixes parallel issues from recent C99 changes (#809)
* Fixes parallel issues from recent C99 changes

* Adds MPE FUNC --> __func__ changes missed in earlier PRs

* Even more missed FUNC --> __func__ macros
2021-06-30 10:17:35 -05:00
Dana Robinson
858a2b2866 Assume C99 types exist in H5detect.c (#808) 2021-06-29 15:07:43 -05:00
Dana Robinson
9ac96e5a21 Removes type guesses when C99 types are missing (#807) 2021-06-29 15:07:19 -05:00
Dana Robinson
2090a527c1 Brings the tools getopt(3) replacement into the main library (#803)
* Moves get_option from the tools library to the C library

* Adds H5 prefix to get_option call and variables

* Renames the H5_get_option long options struct and enum
2021-06-29 15:06:48 -05:00
Dana Robinson
4ff544f997 Cleans up POSIX/C bits in H5private.h (#804)
* Cleans up POSIX/C bits in H5private.h

* Assume difftime exists (C89)
* Reorg AC_CHECK_HEADERS so headers are in alphabetical order
* Split off networking-related AC_CHECK_HEADERS
* Remove unused UNAME_CYGWIN from configure.ac
* Remove checks for unused sys/timeb.h
* Tidying pass over H5private.h HD prefix macros
* Tidy H5win32defs.h
* Add HD prefix to various scanf calls

* Committing clang-format changes

* Fixes to the alarm(2) code used in the tests to make Windows happy

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-28 23:59:25 -05:00
Dana Robinson
734d317da9 Removes obsolete equivalents of C99's __func__ (#800) 2021-06-28 23:58:38 -05:00
Dana Robinson
5ddfbc2a73 Assume the library has C99 types in C++ type code (#806)
* Assume the library has C99 types in C++ type code

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-28 18:31:00 -05:00
Dana Robinson
6dd051101d Assume frexpl/f and fabsl/f, which are C99 (#799) 2021-06-25 00:08:01 -05:00
Dana Robinson
34f2df48b7 Removes checks for signal and set/longjmp, which are C89 (#798)
Also removes checks for setjmp.h and stddef.h
2021-06-25 00:07:36 -05:00
Dana Robinson
b16b7316c4 Reorganization of C and POSIX headers in H5public.h & H5private.h (#793)
* Reorganization of C and POSIX headers in H5public.h & H5private.h

Consolidated and removed duplicates

* It turns out Windows has sys/types.h

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-06-24 16:46:23 -05:00
Dana Robinson
5c3f4b3cb2 Removes ancient Autotools cruft (#790) 2021-06-24 14:21:46 -05:00
Allen Byrne
782e8826b7 Fix tools test (#794)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

* Correct VAR used to find configure time file

* Set the path correctly

* Update missing release note info.

* Update code owners

* Correct JIRA note

* add known problem.

* Use only core library for testing dynamic plugins.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-23 17:08:55 -05:00
Dana Robinson
9b28f3e5d5 Normalization of CMake H5pubconf.h with Autotools (#791)
Mostly just moving things around and changing the comments to keep the
delta small. The only symbol change is that for curl/curl.h which I
changed to H5_HAVE_CURL_CURL_H to match the Autotools. This symbol
is not used in the library and is just an artifact of the checks.
2021-06-23 15:14:54 -05:00
Allen Byrne
a9fb4a7ecd Release Note (#784)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

* Correct VAR used to find configure time file

* Set the path correctly

* Update missing release note info.

* Update code owners

* Correct JIRA note

* add known problem.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-23 14:11:07 -05:00
Dana Robinson
d79c650a5e Further simplifies Autotools type size checks (#789)
Also fixes an issue where clock_gettime and difftime are not detected
due to earlier simplifications of this code.
2021-06-23 14:08:04 -05:00
Dana Robinson
cc88fe8faf Removes C++ dependency on H5private.h (#774)
* Removes C++ dependency on H5private.h

Most C API calls have been removed, aside from a few uses of free,
where we just dropped the 'HD'. A couple of H5_ATTR_UNUSED macros
were also replaced with (void) statements.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-22 22:42:02 -05:00
Dana Robinson
3d4481c292 Removes checks for system(), which is C89/90 (#782) 2021-06-22 22:31:32 -05:00
Dana Robinson
82c8013a2d Removes outdated checks for ways inline might be defined (#781)
These are obsolete now that we require C99.
2021-06-22 22:29:52 -05:00
Dana Robinson
e25fa1c619 Cleans up some POSIX header bits in H5private.h (#783) 2021-06-22 22:28:40 -05:00
Dana Robinson
a1d128597f Replaces the H5_OVERRIDE macro with override (#773)
The macro is no longer necessary now that we require C++11.
2021-06-22 22:25:51 -05:00
Allen Byrne
9f5b16bccb Update missing release note info. (#776)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

* Correct VAR used to find configure time file

* Set the path correctly

* Update missing release note info.

* Update code owners

* Correct JIRA note

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-22 07:01:22 -05:00
Dana Robinson
22a49ec424 Removes checks for (v)snprintf, which are C99 (#772) 2021-06-21 11:09:13 -05:00
Dana Robinson
a91c626c29 Removes checks and work-arounds for strtoll and strtoull (#769)
* Removes checks and work-arounds for strtoll and strtoull

* Removes CMake checks for strtoll and strtoull
2021-06-18 11:23:01 -05:00
Dana Robinson
2e7750f837 Fixes non-C99 format strings in tarray test code (#766) 2021-06-17 20:37:01 -05:00
Allen Byrne
f2fd728756 Fix cmake configure path (#760)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

* Correct VAR used to find configure time file

* Set the path correctly

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-16 22:49:10 -05:00
jhendersonHDF
bb7dfbebdc Fix several warnings (#747) 2021-06-16 15:45:26 -05:00
Dana Robinson
e4e9bb70db Fixes some H5SL include statements (#758) 2021-06-16 11:54:11 -05:00
Allen Byrne
dfe4f2903b Fix warnings files (#753)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

* Flag cleanup and fix typos

* Add comment

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-15 08:49:05 -05:00
Larry Knox
978b11c8a1 Fix problem in gnu-cxxflags; remove empty if block that throws away all (#748)
C++ flags.
2021-06-11 21:59:00 -05:00
Dana Robinson
3c18cf7831 Normalization of H5_nanosleep() with VFD SWMR branch (#746)
* Normalization of H5_nanosleep() with VFD SWMR branch

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-11 17:02:43 -05:00
Dana Robinson
03fb540c72 Fixes C++ warnings when passing hsize_t values to printf in test code (#745) 2021-06-11 07:52:36 -05:00
jhendersonHDF
42e485ea7d Fix Direct VFD Testing in CMake (#742) 2021-06-11 07:52:04 -05:00
Allen Byrne
5173cce0a9 Organize and align compiler flags (#741)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

* Organize flags and align autotools and cmake

* Fix comment in no-error-general warnings files.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-10 22:51:15 -05:00
Dana Robinson
311641642e Removed -fanalyzer from the gcc 10 developer options (#744)
This is extremely slow and generates a LOT of false positives. It's also
not really a warning flag, but an analysis feature and thus belongs in
a separate configure option, not lumped in with the warnings.
2021-06-10 12:26:41 -05:00
Allen Byrne
35d86906fa Make sure MAX_PRECISION is always defined with a value (#736)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

* MAX_PRECISION defines must be defined

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-08 10:43:21 -05:00
Allen Byrne
6880034536 Remove private H5_GCC_DIAG_OFF/ON from standalone program (#734) 2021-06-07 18:08:09 -05:00
Allen Byrne
47c7bd9834 Rework Fortran configure to allow multiple CMake reruns (#721)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

* Fix fortran configure checks

* Rework H5_PAC_C_MAX_REAL_PRECISION setting logic

* Add note about fortran configure change

* Adds a quick for for some egregious chunk_info badness (#722)

* Fixes issue with ccmake that prevents building Fortran (#723)

ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations

* Fix conflicts with merge

* Move MAX_PRECISION back to HDF5UseFortran.cmake

* Use STREQUAL to test macro argument

* Move C language test to ConfigureChecks from HDF5UseFortran

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-06-07 17:59:47 -05:00
Dana Robinson
62ddef9758 Includes hdf5dev.h in hdf5.h (#728)
* Includes hdf5dev.h in hdf5.h

* Removes hdf5dev.h

* Restores H5PLextern.h as an independent header

* H5PLextern.h missed in the null VOL connector
2021-06-06 21:04:34 -05:00
Dana Robinson
9ebe55b34c Moves H5PacketTable default ctor inside source file (#731) 2021-06-05 23:00:30 -05:00
Dana Robinson
ce5f1ff1c5 Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726)
* Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++

Allows C++ library to be built on older versions of gcc.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-04 16:54:00 -05:00
Dana Robinson
9bf274e21a Moves gcc warning macros from H5public.h to H5private.h (#724)
* Moves gcc warning suppression macros out of H5public.h

* Update RELEASE.txt

* Formatted source
2021-06-04 16:52:36 -05:00
Dana Robinson
9041351328 Fixes issue with ccmake that prevents building Fortran (#723)
ccmake runs iteratively, and the check_fortran_source_runs
macros were clobbering a single output file that did not
get updated on further configure iterations
2021-06-03 21:56:43 -05:00
Dana Robinson
032310b87f Adds a quick for for some egregious chunk_info badness (#722) 2021-06-03 17:24:58 -05:00
Dana Robinson
dd6547db0d Updates bin/trace script to correctly wrap H5TRACE macros near clang-format column limit (#719)
* Removes clang-format comments from H5O.c call

* Fixes bin/trace to correctly wrap lines near the clang-format limit

* Removed unused variable from bin/trace
2021-06-03 15:46:52 -05:00
Dana Robinson
7739612291 Adds an Intel C++ configuration file (#716)
* Adds an Intel C++ configuration file

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 11:51:25 -05:00
Dana Robinson
1558ee7b30 Updates PGI C/C++ configurations (#715)
* Updates PGI C/C++ configurations

Tweaks some settings and configures pgc++ to use C++11

* Updated copyright information
2021-06-03 11:44:09 -05:00
Quincey Koziol
4b7f34acc1 Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef

* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure

* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation

* Remove 'canceled' event status from Java constants

* Be safer about releasing resources when inserting a newly opened/created object or file into an event set

* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".

* Remove H5ES_STATUS_CANCELED from Java wrappers also

* Apply patch for dynamically registering optional VOL operations

* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
    because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.

* Corrections based on PR feedback.

* Further changes to make based on PR feedback.

* Remove H5Dwait & H5Fwait (moved to the async connector).  Added H5atclose
routine.  Updated 'optional op' operations.

* Fix missed merge marker, and reformatted line

* Update API tracing infrastructure for H5atclose callback

* Clean up some warnings

* Normalize against develop branch

* Correct level of indirection

* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose

* Relocate prototype (and doxygen info) for H5Aclose

* Align w/changes on develop

* Move group package initialization code to H5Gint.c, and update tracing macros

* Change non-static function declarations to be static

* Correct GCC diagnostic macro

* Ensure that H5TSpublic.h header gets installed (#129)

* Finish moving API routines that invoke VOL framework to main source files.

* Fix position of H5Fmount and H5Funmount

* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.

* Add wrappers for dynamically registered optional operations

* Fix typo

* Update doxygen comment for H5atclose with additional detail.

* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters

* Implement and test H5S_BLOCK

* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value.  Make the corresponding changes through most of the v1 and v2 B-tree code.  Clean up warnings in H5public.h and cmpd_dtransform.c.

* Add H5Iregister_future routine and tests.

* Correct return value for H5Lexists_async

* Add H5_DLL macro to public H5ES API routines

* Update supported -> flags parameter for introspect_query callback

* Remove my email address.  Update passthrough VOL connector ID.

* Fix comment for post_open_api_common

* Remove unused non-blocking VOL connector

* Minor cleanup in async branch in preparation for merge to develop

* Update CMake and the Autotools to use the new pass-through VOL ID

* Finish another iteration on public H5ES routines, along with running the code reformatter

* Another round of reformatting

* Fix for SWMR daily test failures (#160)

The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.

* Added selective async APIs (#150)

* Added selective async APIs

Description:
    Added the following APIs:
        H5Ropen_attr_async
        H5Ropen_object_async
        H5Ropen_region_async

        H5Mcreate_async
        H5Mopen_async
        H5Mput_async
        H5Mget_async
        H5Mclose_async

        H5Tcommit_async
        H5Topen_async
        H5Tcopy_async
        H5Tclose_async
    - Updated an expected output file to include a new internal function
      in the error stack for the failure case.

* Updated async APIs per reviews, including removing async version of
H5Tcopy.

* Removed statements that were added by mistake in the previous commit.

* Fix compile issues in H5M and warnings elsewhere

* Reformat code

* Brings VOL_LIST changes from develop. (#163)

* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in

* Tiny cleanup of H5Lcreate_hard_async

* Run source formatter

* Allow for canceled operation in wait_cb

* Attempt to fix switch on string value

* Re-run source formatter

* Add H5S_BLOCK testfile to CMake clean target

* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback

* Clean up warnings

* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)

* Run formatting script

* Remove H5VL_REQUEST_WAIT\*

* Warning cleanup

* Eliminate strdup()s on statically allocated strings

* Warning cleanup

* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.

* Duplicate strings when building err_info to return to applicatin

* Move connector author routines into seperate header files, all included in the new hdf5dev.h header

* Run bin/trace to add TRACE macros

* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID

* Clean up formatting

* Remove H5Pset/get_vol_implicit_async

* Clean up warning

* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags

* Clean up warnings

* Add H5ESfree_err_info convenience routine

* Fix typo

* Correct matching for cached VOL plugins

* Add developer header file

* Update for C99 compatibility

* Add missing trace macro

* Stop clang-format from messing with the trace macros.  Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs

* Fix warning about formatting a directory

* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY

* Reduce scope of H5ES__close

* Enable CMake checks for various types on MacOS

* Clean up properly when H5CX_retrieve_state() fails.  Also clean up many compiler warnings.

* Committing clang-format changes

* Merge from develop

* Fix mis-placed assert

* Remove commented-out code

* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)

* Strengthen sanity check from error report to assertion

* Committing clang-format changes

* Add units to the comments for a few fields

* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.

* Committing clang-format changes

* Remove H5ESget_time_estimate

* Committing clang-format changes

* Create developer header for datatype routines and move type conversion register/unregister routines there.

* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines

* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.

* Run bin/format_source on current code

* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.

* Run bin/format_source on current code

* Committing clang-format changes

* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."

This reverts commit 5ac92014da.

* Committing clang-format changes

* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.

* Update tracing macros

* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.

* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.  Also, minor tweaks to attribute 'get' and 'specific' operation parameters.

* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.  Also, minor tweaks to H5O_refresh_metadata arguments.

* Reduce warnings

* Reduce warnings

* Track change to datatype 'get' callback

* Fix bug with file pointer getting invalidated when object closed

* Reformat source

* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs.  Also small cleanup to the attribute get name operation.  Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).

* Remove remainder of merge conflict marking

* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.

* Remove some unused local variables

* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.  Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.

* Update tracing macros

* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.

* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.

* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.  Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value.  And, corrected logic error in test/links.c around non-existant objects in a file.

* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.

* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.  Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.

* Add 'const' to several parameters that are only queried.

* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.  Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value.  Move several routines to be in less public namespace.  Correct direct_chunk test to verify that parameters aren't modified on error.

* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'.  Also other minor cleanups and bug-fixes.

* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation

* Add dynamic optional operations for request objects

* Update dynamic operation test for optional request operations

* Update a comment for an operation argument

* Run trace and format_source scripts

* Committing clang-format changes

* Committing clang-format changes

Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-02 15:29:46 -05:00
Dana Robinson
88a83d56c0 Cleans up hsize_t and haddr_t size guessing (#709)
* Cleans up definitions of haddr_t and hsize_t + cruft removal

* Formatted source
2021-06-01 21:27:53 -05:00
Dana Robinson
5e4625c04f Removes some DEC Alpha cruft from H5detect and H5private.h (#708) 2021-06-01 21:01:40 -05:00
Dana Robinson
50d0888f49 C++ warning and build fixes (#707)
* Committing clang-format changes

* C++ build and warning updates

* Fixes all warnings on C++ (with gcc 9.3)
* Updates CMake and Autotools C++ builds

* Undo warning clobber

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-01 08:49:39 -05:00
Dana Robinson
4ef33ef7cd Clean up type size checks in configure.ac (#702) 2021-05-28 22:03:21 -05:00
Dana Robinson
2da5855900 Split H5L.c internal code to H5Lint.c (#691)
* Committing clang-format changes

* Splits internal parts of H5L.c to H5Lint.c

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 21:59:58 -05:00
Dana Robinson
552ce4952b Removes alternative function enter/leave macro scheme (#678)
* Committing clang-format changes

* Converted BEGIN_FUNC, etc. macros to FUNC_ENTER

* Rips out the BEGIN_FUNC, etc. macros

* Removes 'end if', etc. comments from H5HL package

* Committing clang-format changes

* Fixes an H5EA iterate issue

* Fixes an issue in the H5FA iterator code

* Further cleanup in bin/trace after macro removal

* Iterator changes in H5EA and H5FA

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 21:58:13 -05:00
Allen Byrne
0262a49f9c Java and fortran cmake changes (#694)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

* Java reference functions updated

enabled fortran in cmake gcc action yaml file
java reference test changed to correctly test refs
jni reference functions that create ids changed to use jni id logging

* Correct BYPRODUCTS argument

* Correct more genereated files BYPRODUCTS

* BYPRODUCTS must have unique locations

* Fix typo

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 21:56:29 -05:00
Dana Robinson
e60ac6ec2d Removes pre-C99 build and header cruft (#700)
* Committing clang-format changes

* Removes pre-C99 build and header cruft

* Assumes ANSI C headers exist
* Assumes stdbool.h, stdint.h, and inttypes.h are present
* Assumes the C++ compiler can handle stdint.h
* Removes all work-arounds for missing functionality, especially stdbool.h

* Formats source

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 07:48:29 -05:00
Scot Breitenfeld
4454fca02a Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging

* Committing clang-format changes

* changed size_i in printf to reflect the I/O.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 07:36:46 -05:00
Dana Robinson
dfe4575914 Require a C++11 compiler to build the C++ wrappers (#693)
* Committing clang-format changes

* Requires a C++11 compiler to build the C++ wrappers

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-27 21:24:30 -05:00
Dana Robinson
168be9a0f0 CMake fix for sporadic flush2 failures (#692)
* Committing clang-format changes

* Runs the flush1/flush2 tests in their own directory

Avoids file deletions by other tests.

* Revert "Runs the flush1/flush2 tests in their own directory"

This reverts commit 746c048824.

Also pulls the flush files from the clean list, which is a simpler fix.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-27 09:35:15 -05:00
Dana Robinson
dedba0f947 Makes the event_set test a single-source target (#690)
* Committing clang-format changes

* Makes the event_set test a single-source target

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-27 09:33:46 -05:00
jhendersonHDF
ee9d6f514a Use internal version of H5Eprint2 to avoid possible stack overflow (#661) 2021-05-26 12:05:24 -05:00
Dana Robinson
2c5d08d84d err_compat test cleanup (#681)
* Committing clang-format changes

* Cleans up err_compat test and output

* Formatted source

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-25 15:38:54 -05:00
Dana Robinson
004b9c06a6 Typo (#682)
* Committing clang-format changes

* Minor typo in H5O.c

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-25 15:20:51 -05:00
Dana Robinson
62a5443bd7 Various CMake changes (#679)
* Committing clang-format changes

* Several CMake updates:

* Removes unused HDF5_ENABLE_HSIZET
* Switches TEST_SHELL_SCRIPTS to ON
* Sets SH_PROGRAM to bash instead of sh

* Set default build type back to RelWithDebInfo

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-24 08:55:08 -05:00
Dana Robinson
bee09040d3 Fixes for a couple of trivial warnings (#676)
* Committing clang-format changes

* Trivial warning fixes:

* Removes an unused done target in H5Tbit.c
* Add (void) to quiet "ignored return value" warnings in the generators
  (which generally ignore errors)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-24 08:53:24 -05:00
Dana Robinson
2142359709 Brings chunk_info valgrind fix from 1.12 (#677)
* Committing clang-format changes

* Fixes a minor valgrind issue in the chunk_info test (#675)

* Fixes a minor valgrind issue in the chunk_info test

The chunk_info test incorrectly set the number of bytes in a compressed
buffer, which caused valgrind to complain about writing uninitialized
bytes.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-24 08:26:19 -05:00
Allen Byrne
02de350b39 Remove version from pkgcfg file names (#671)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-21 17:08:36 -05:00
Allen Byrne
701be452e7 Fix VS2019 test reference (#668)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-20 22:44:36 -05:00
Allen Byrne
5142398d1b Add if blocks around fortran targets for build mode (#660)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-19 17:22:18 -05:00
Gaute Hope
509a068f62 Add H5Dchunk_iter method for iterating over chunks (#6)
* Add H5Dchunk_iter method for iterating over chunks

This method iterates over all chunks in dataset, calling a user-supplied
callback with the chunk information and optional user supplied data.

The iterator is stopped when ITER_STOP is returned by the user-supplied
callback or the iterator is exhausted.

Existing methods to get chunk_info performs an iteration each time, so
to get many or all chunks causes SUM(i) for i = 0 -> N operations for N
chunks, as opposed to N operations when using this iterator for this use case.

* H5Dchunk_iter: test iterating all chunks, some chunks and failing iteration.

* H5D: move H5Dchunk_iter private methods to specific

* trace: add H5D_chunk_iter_op_t and trace H5D.c

* chunks-iter: document chunk_iter

* chunk-iter: chunk add FUNC_ENTER/FUNC_LEAVE macros

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-19 17:21:52 -05:00
Lee Newberg
d179f9d79c BUG: DataSet assignment operator is missing (#503)
* BUG: DataSet assignment operator is missing

* Some compilers complain if the copy constructor is given explicitly
  but the assignment operator is implicitly set to default.

* Explicitly defining the assignment operator allows us to properly
  handle reference counters for shared resources.

* BUG: DataSet assignment operator is missing.

* Mimicking code of H5DataType::operator() as suggested by @bmribler.

* Added test

Description:
    Added test for DataSet::operator= that Leengit added
Platform tested:
    Linux/64 (jelly)

* Removed Author field.

* Commit clang format changes.

* Entry for Leengit's github PR #503

* Removed lines left by mistake

Co-authored-by: Binh-Minh Ribler <bmribler@hdfgroup.org>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-05-19 15:48:20 -05:00
Larry Knox
a5d1897225 Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to (#652)
maintain binary compatibility with released HDF5 versions.
2021-05-18 14:23:17 -05:00
Allen Byrne
96aa5923d3 CMake uses matches for clang (#645)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-17 16:25:55 -05:00
Dana Robinson
6c170c4b24 Reduces overly-pedantic casting in the public headers (#644)
* Committing clang-format changes

* Fixes overly pedantic casting in public headers

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-15 13:58:54 -05:00
bmribler
9fb2c24c2e Bmr dev hdffv 11223 (#640)
* Fixed HDFFV-11223 (CVE-2018-14460)

Description
    - Added checks against buffer size to prevent segfault, in case of data
      corruption, for sdim->size and sdim->max.
    - Renamed data files in an existing test to shorten their length
      as agreed with other developers previously.
Platforms tested:
    Linux/64 (jelly)

* Committing clang-format changes

* Updated for test files

* Updated for HDFFV-11223

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-12 14:35:53 -05:00
jhendersonHDF
78f0728d1b Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) 2021-05-11 22:22:45 -05:00
Dana Robinson
7d140b97fb Purges UFAIL from the library (#637)
* Committing clang-format changes

* Purges UFAIL from the library

* H5HL_insert change requested in PR

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-11 11:05:03 -05:00
Dana Robinson
9023e98940 Removes gratuitous (double)x.yF casts (#632)
* Committing clang-format changes

* Removes gratuitous (double)x.yF casts

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-07 11:45:05 -05:00
Dana Robinson
1e572b18e3 Cleans up a const warning left over from previous constification (#633)
* Committing clang-format changes

* Adds consts to a few global variables

* Cleans up a const warning left over from previous constification

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-07 11:44:07 -05:00
Allen Byrne
6955329054 h5diff subset indexing (#628)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-07 11:43:12 -05:00
Allen Byrne
333a79c1b2 Cleanup tools debug build warnings (#627)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-05 17:08:10 -05:00
Allen Byrne
2f79e3f2df doygen adjustments (#614)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-04 17:43:19 -05:00
Sean McBride
dc639bddb8 Made private my_yyinput function static (#618)
This prevents it being exported as a public symbol.
2021-05-04 15:56:33 -05:00
Dana Robinson
dbe7204085 Hash table replacement for skip lists in ID code (#600)
* Committing clang-format changes

* Brings over hash table code from Bitbucket

* Can be switched between skip list and hash table implementation
  with H5_USE_ID_HASH_TABLE #define
* Not yet updated to use iterate-safe delete

* Fixes a warning and changes where the problematic test is
commented out.

* Adds mark-and-sweep flags and members

* Final fixes for hash table ID code

* Removes skip list ID code

* Committing clang-format changes

* Formatted source

* Adds a comment about the mark-and-sweep scheme.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-04 15:51:26 -05:00
Dana Robinson
c7d45c205e Adds const to a few global variables (#623)
* Committing clang-format changes

* Adds consts to a few global variables

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-04 15:26:38 -05:00
Sean McBride
3899e090df Ubsan fixes (#498)
* Fixed use of null pointer identified by UBSan

UBSan warned:
runtime error: member access within null pointer of type 'named_dt_t' (aka 'struct named_dt_t')

with these two tests:
H5REPACK-committed_dt_DFF
H5REPACK-committed_dt

Reformulated per @gnuoyd suggestion.

* Fixed undefined float -> unsigned char conversion in HL_test_image

* Removed dead skip_overflow_tests_g global

The global `skip_overflow_tests_g` was being set but never read.

* Don't treat 2d array as 1d array, fixing UBSan complaint in `CPP_testhdf5`

* Committing clang-format changes

* Remove extra ']' in line 730.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-05-03 10:22:53 -05:00
Sean McBride
44db310d8d Removed mentions of Wdeclaration-after-statement now that C99 is requ… (#447)
* Removed mentions of Wdeclaration-after-statement now that C99 is required

* Remove -Werror=declaration-after-statement from error-general file.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-05-03 09:08:37 -05:00
Dana Robinson
73bb382e9e Fixes crashes when size_hint > UINT32_MAX is passed to H5Gcreate1 (#611)
* Committing clang-format changes

* Fixes incorrect size_hint handling in H5Gcreate1

* Updates the size hint type for group creation

* Updates the RELEASE.txt note

* Revert "Updates the RELEASE.txt note"

This reverts commit 3df386acca.

* Reverts previous behavior to use a uint32_t struct field

* Updates RELEASE.txt

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-30 14:47:51 -05:00
Allen Byrne
7ab97037a0 Fortran target depends (#608)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-30 13:40:27 -05:00
Dana Robinson
16f9b070ce Fixes a segfault when H5Pset_mdc_log_options is called multiple times on a fapl (#601)
* Committing clang-format changes

* Fixes a segfault when H5Pset_mdc_log_options() is called multiple times

An internal string is incorrectly freed when the API call is invoked
multiple times on a property list, which will usually cause a segfault
to occur. On the first call the log location is NULL so the problem
doesn't occur.

Fixes HDFFV-11239

* Fixes typos

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-29 09:33:43 -05:00
Dana Robinson
138bc52fac Fix for a segfault when H5Pset_fapl_log is passed an invalid fapl ID (#607)
* Committing clang-format changes

* Fixes an issue where H5Pset_fapl_log sefaults when passed an invalid
fapl ID

This was due to a pointer-containing struct being memset after the first
internal API call. If the first call failed, the error condition would
check if the pointer was not NULL and then attempt to free it if not.
This would lead to the freeing of a wild pointer if an invalid fapl ID
were passed in.

This was fixed by reordering the memset and adding a test to ensure the
problem stays fixed.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-29 06:57:02 -05:00
Allen Byrne
00dc456cec Parallel builds need the mpi compiler for pkgconfig scripts. (#599)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-27 08:58:34 -05:00
Allen Byrne
460b6f4a8a fortran generated files depends (#598)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-26 16:44:31 -05:00
Gerd Heber
1d680fe04c Merge doxygen2 into develop (#553)
* Fixed warnings and started H5Epublic.h.

* Include H5FD* headers to correctly resolve references.

* Doxygen2 (#330)

* H5Eauto_is_v2.

* Added a few more calls.

* Added a few more H5E calls.

* First cut of H5E v2.

* Added the deprecated v1 calls.

* Updated spacing.

* Once more.

* Taking some inspiration from Eigen3.

* Add doxygen for the assigned functions: H5Pregister1,H5Pinsert1,H5Pen… (#352)

* Add doxygen for the assigned functions: H5Pregister1,H5Pinsert1,H5Pencode1, H5Pget_filter_by_id1,H5Pget_version, H5Pset_file_space,H5Pget_file_space. Someone already adds H5Pget_filter1. Also fixs an extra parameter 'close' call back function for HPregister2.

* doxygen work. fixs format by using clang-format.

* doxgen work for H5Pregister1 etc. Addressed Barbara and Gerd's comments.
For Quincey's comments, since we are not supposed to change the source code.
I leave this to future improvements.

* added documentation for H5P APIs (#350)

* add documenation for H5Pget_buffer,H5Pget_data_transform,H5Pget_edc_check,H5Pget_hyper_vector_size,H5Pget_preserve,H5Pget_type_conv_cb,H5Pget_vlen_mem_manager,H5Pset_btree_ratios

* format corrections

* fixed grammer

* fixed herr_t

* Better name.

* A fresh look.

* add doxygen to H5Ppublic.h

* use attention instead of warning

* Add doxygen comments in H5Ppublic.h (#375)

* Add doxygen comments in H5Ppublic.h

* H5Pset_meta_block_size
* H5Pset_metadata_read_attempts
* H5Pset_multi_type
* H5Pset_object_flush_cb
* H5Pset_sieve_buf_size
* H5Pset_small_data_block_size
* H5Pset_all_coll_metadata_ops
* H5Pget_all_coll_metadata_ops

* Add DOXYGEN_EXAMPLES_DIR to src/CMakeLists.txt

* Fix clang-format errors

* Fix filenames in doxygen/examples

* add doxygen to H5Ppublic.h (#378)

* add doxygen to H5Ppublic.h

* use attention instead of warning

Co-authored-by: Kimmy Mu <kmu@hdfgroup.org>

* Revert "add doxygen to H5Ppublic.h (#378)"

This reverts commit 2ee1821b13.

* Updated Doxygen variables.

* I forgot to copy two images.

* Enable desktop search by default.

* Add my assigned Doxygen documentation.

* Remove whitespace at EOL.  Appease clang-format.

* Addressed Chris' comments.

* Added an alias for asynchronous functions.

* One space is enough for all of us.

* Slightly restructured RM page.

* address some issues

* reformatting

* Style external links.

* reformatting

* reformatting

* Added "Metadata Caching in HDF5" as a technical note example.

* Revise this soon!

* Added specification examples.

* Fixed references.

* Added H5AC cache image stuff and file format study.

* Added older FMT versions. Where did 1.0 go?

* Updated C/C++ note and replaced ambiguous labels.

* Reformat source with clang v10.0.1.

* Added the VFL technical note.

* Added what I believe might be called version 1.0 of the format.

* Added the remaining specs.

* Added H5Z callback documentation and fixed a few mistakes.

* Added dox for deprecated H5G calls and fixed a few snippet blockIDs.

* clang-format happy?

* Ok?

* Bonus track: Deprecated H5D functions.

* Carry over the more detailed group description.

* Added documentation for the missing and deprecated H5R calls.

* Life is easier and less repetitive w/ snippets. Use them!

* Eliminate the snippet block ID artifacts in the HTML rendering.

* Fixed snippet HTML artifacts and added a few missing calls.

* Under 20 H5Ps to go!

* Almost complete!

* "This is a form of pedantry up with which I will not put." (Churchill)

* Let's not waste as much space on bulleted lists!

* First complete (?) draft of the Doxygen-based RM.

* Completeness check and minor fixes along the way.

* Pedantry.

* Adding missing H5FD calls checkpoint.

* Pedantry.

* More pedantry.

* Added H5Pset_fapl_log.

* First draft of H5ES.

* Fixed warnings.

* Prep. for map module.

* First cut of the map module.

* Pedantry.

* Possible H5F introduction.

* Fix the indentation.

* Pedantry.

* Ditto.

* Thanks to the reviewers for their comments.

* Added missing images.

* Line numbers are a distraction here.

* More examples, references, and clean-up. Don't repeat yourself!

* Clang pedantry.

* Ditto.

* More reviewer comments...

* Templatized references and cleaned up \todos.

* Committing clang-format changes

* Fixed MANIFEST.

* Addressed Quincey's comments. (OCPLs)

* Fixed a few more \todo items.

* Fixed more \todo items.

* Added attribute life cycle.

* Forgot the examples file.

* Committing clang-format changes

* Pedantry.

* Live and learn!

* Added a sample H5D life cycle.

* Committing clang-format changes

* Pedantry.

Co-authored-by: kyang2014 <kyang2014@users.noreply.github.com>
Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org>
Co-authored-by: Kimmy Mu <kmu@hdfgroup.org>
Co-authored-by: Christopher Hogan <ChristopherHogan@users.noreply.github.com>
Co-authored-by: jya-kmu <53388330+jya-kmu@users.noreply.github.com>
Co-authored-by: David Young <dyoung@hdfgroup.org>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-26 14:07:29 -05:00
Allen Byrne
12082e728d CMake changes to byproducts - ninja warnings (#568)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-23 21:22:29 -05:00
jhendersonHDF
cb7a0e13b8 Fix set_tests_properties for parallel t_pflush tests (#569) 2021-04-22 08:01:55 -05:00
Larry Knox
3707675c03 Update top-level COPYING file and remove COPYING files from subdirectories (#561)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING (license) file.

* Add release_docs/code-conventions.md file.

* Add script to test h5py.

* Fix script error.

* Add file h5pytest.yml.

* Test declaration of counter variables in for loops.

* Committing clang-format changes

* Committing clang-format changes

* Added [] to line 126 of H5LTanalyze.l.
Ran bin/genparser with flex v2.6.4 and Bison v3.0.4 on jelly.

* Revert "Added [] to line 126 of H5LTanalyze.l."

This reverts commit e4a9cee441.

* Revert extra commits to match canonical develop.

* Update top-level COPYING file and remove COPYING files from
subdirectories.

* Remove subdirectory COPYING files from MANIFEST.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-21 11:23:34 -05:00
Sean McBride
99d5505ad1 Added more C++11 override keywords (#485)
* Added more C++11 override keywords

* Format updates in src/H5Tconv.c.

* Committing clang-format changes

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-20 22:10:04 -05:00
Allen Byrne
9a8b91eb30 CMake advanced options for clang needs an OPTION command #556 (#557)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-20 17:42:52 -05:00
Dana Robinson
fc5c567fdc CMake no longer builds the C++ library by default (#555)
* Committing clang-format changes

* CMake no longer builds C++ library by default

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-20 06:55:05 -05:00
Dana Robinson
d3384b2e8e Fixes incorrect usage of H5I_BADID (#554)
* Committing clang-format changes

* Fixes incorrect use of H5I_BADID

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-19 16:51:18 -05:00
Allen Byrne
b2c78e15cf Cleanup CMake code for doxygen and perl shell scripts (#552)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-19 07:28:32 -05:00
Dana Robinson
d5c449248f Brings the native implementation of H5Fdelete() from Bitbucket (#524)
* 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 909765f759.

* Revert "Revert "Adds barrier and rank 0 check to MPI-I/O VFD delete""

This reverts commit 9b04bef115.

* 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>
2021-04-16 13:47:32 -05:00
Allen Byrne
e21f7aaac4 Tools long double updates (#522)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-15 07:59:01 -05:00
Sean McBride
052eed29d8 Remove unused #cmakedefine and autotools checks (#431)
With C99 as the minimum, there's no point checking for these standard things anymore.
2021-04-12 19:21:55 -05:00
Dana Robinson
78fe6751b5 Removes implementation of my_strdup() from the multi VFD (#527)
* Committing clang-format changes

* Removes my_strdup() from the multi VFD

* Use strdup directly when memory sanity checks are off

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-31 15:52:57 -05:00
Dana Robinson
0f0721f2d6 Minor warning fixes in develop (#526)
* Committing clang-format changes

* Minor warning fixes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-31 15:31:20 -05:00
Scot Breitenfeld
6dae5c2cb5 Fix HDFFV-11232 (#530)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* added H5fortkit dependency for H5VLff.F90, HDFFV-11232

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-31 09:48:51 -05:00
Dana Robinson
189293e12f Removes dead H5ST package from the library (#528)
* Committing clang-format changes

* Removes the unused H5ST package from the library

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-29 21:32:52 -05:00
Dana Robinson
e0eb5c6e1d Updates that allow accum SWMR tests to work on Windows (#493)
* Committing clang-format changes

* Updates the accum test to work on Windows

Uses CreateProcess() on Windows

* Source formatting

* Fix for Unix child result

* Fixes process return code bug on Windows

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-26 22:07:59 -05:00
Quincey Koziol
6b13310f5c Clean up MPI-IO VFD tracing support (#520)
* Clean up tracing support

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-26 17:03:38 -05:00
Quincey Koziol
cb0a883f6d Minor parallel improvements (#519)
* Improve MPI error reporting, handled failed operations in parallel tests more nicely, and clean up MPI_Allreduce for determining whether to break collective I/O

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-26 15:14:09 -05:00
Larry Knox
da5aca29ff Hdf5 merge pr7 (#516)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING (license) file.

* Add release_docs/code-conventions.md file.

* Add script to test h5py.

* Fix script error.

* Add file h5pytest.yml.

* Test declaration of counter variables in for loops.

* Committing clang-format changes

* Committing clang-format changes

* Added [] to line 126 of H5LTanalyze.l.
Ran bin/genparser with flex v2.6.4 and Bison v3.0.4 on jelly.

* Revert "Added [] to line 126 of H5LTanalyze.l."

This reverts commit e4a9cee441.

* Revert extra commits to match canonical develop.

* Add cmake variable HDF5_LIB_INFIX (#7)

* Add cmake variable HDF5_LIB_INFIX

This infix is added to all library names after 'hdf5'.
e.g. the infix '_openmpi' results in the library name 'libhdf5_openmpi.so'
This name is used in packages on debian based systems.
(see https://packages.debian.org/jessie/amd64/libhdf5-openmpi-8/filelist)

This option is useful when testing projects on debian based systems with
custom builds of hdf5 while trying to minimize differences between the
custom setup and the environment created by installing system packages.

* Added RELEASE.txt entry for HDF5_LIB_INFIX.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Raphael Grimm <barcode@users.noreply.github.com>
2021-03-25 18:11:32 -05:00
Allen Byrne
d46fa9950c develop - Javadoc warning fixes (#506)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-24 17:02:46 -05:00
Quincey Koziol
3dbbd8aea1 Align with "parallel fence" changes (#479)
* Small code updates and simplifications

* Committing clang-format changes

* Fix 'make installcheck' for parallel builds

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-24 15:57:32 -05:00
Dana Robinson
1f637e49d9 Removes c99_(v)snprintf() calls from the standalone test code (#509)
* Committing clang-format changes

* Removes c99_(v)snprintf from standalone code

These internal API calls were removed in a previous commit but were
missed in the sio/pio_standalone code.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-24 15:38:05 -05:00
Dana Robinson
df9abfe3f0 Misc warning fixes (#495)
* Committing clang-format changes

* Misc warning fixes from Visual Studio

* Committing clang-format changes

* Fixes warnings in swmr.c test

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-24 11:25:50 -05:00
Larry Knox
695a4e4f65 Update h5LT files with latest flex and Bison available on jelly (#502)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING (license) file.

* Add release_docs/code-conventions.md file.

* Add script to test h5py.

* Fix script error.

* Add file h5pytest.yml.

* Test declaration of counter variables in for loops.

* Committing clang-format changes

* Committing clang-format changes

* Added [] to line 126 of H5LTanalyze.l.
Ran bin/genparser with flex v2.6.4 and Bison v3.0.4 on jelly.

* Revert "Added [] to line 126 of H5LTanalyze.l."

This reverts commit e4a9cee441.

* Revert extra commits to match canonical develop.

* Added [] to H5LTanalyze.l line 126 to eliminate warning "rule could not be
matched".
Ran bin/genparser hl/src with flex v2.6.4 and Bison v3.0.4 on jelly.

* Added HD to strdup in H5LTparse.y line 338.
Ran bin/genparser hlsrc again.

* Removed line 126 from H5LTanalyze.l - previous line matches.
Added previously removed line 318 of H5LTparse.y to fix hl_test_lite
failure.
Ran bin/genparser.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-23 21:46:19 -05:00
Dana Robinson
1f3f7fe3ae Removes support for pre-2015 Visual Studio (#496)
* Committing clang-format changes

* Removes work-around code for pre-2015 Visual Studio

HDF5 no longer provides an implementation for:

* <inttypes.h>
* snprintf and vsnprintf
* llround(f), lround(f), round(f)
* strtoll and strtoull
* va_copy
* struct timespec

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-23 21:13:57 -05:00
Dana Robinson
69f3cde936 Updates HSYS_GOTO_ERROR to emit GetLastError() values on Win32 (#492)
* Committing clang-format changes

* Updates H5SYS_GOTO_ERROR to emit Win32's GetLastError()

* Committing clang-format changes

* Format source changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-23 06:19:53 -05:00
Allen Byrne
99c0f504a2 Disable long double tests and remove CMake flag groups (#494)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-22 15:28:06 -05:00
Scot Breitenfeld
98acb0adcf small edits (#481)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-22 13:31:42 -05:00
Sean McBride
38b9474af0 Applied clang-tidy readability-delete-null-pointer fixes (#430)
delete nullptr is well-defined, does not need check.

Manually fixed indentation after automatic changes.
2021-03-22 12:51:18 -05:00
Dana Robinson
60e14b826a File locks now work on Windows (#480)
* File locks now work on Windows

Uses LockFileEx() and UnlockFileEx(). Fixes HDFFV-10191 (partial).

* Committing clang-format changes

* Committing clang-format changes

* Fixes commenting in h5repack

* Reworks H5Fis_accessible()

H5Fis_accessible() created a new file handle and attempted to read
through it, which will fail when a file has been opened with an
exclusive lock on operating systems that have mandatory locks.

This change uses the same scheme we use in H5Fopen() to check if
the file is already open and only tries to read the file signature
if the file has not already been opened.

Also adds a test for this behavior.

* Committing clang-format changes

* Trivial change to force github to run actions

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-22 11:32:40 -05:00
Dana Robinson
05bc1905cb Adds an implementation for nanosleep on Windows (#483)
* Adds an implementation for nanosleep on Windows

* Committing clang-format changes

* Fix insane formatter issue

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-22 05:55:40 -05:00
H. Joe Lee
03864c675c Fix CMake error message location. (#478)
Print error message if Perl is not found.
2021-03-19 21:20:11 -05:00
Yu Feng
1c8b3dbe4d Purge the buffer used in type conversion. (#263)
Some of the uniniitialized bits in the buffer may get carried through
all the way to disk, creating a risk for leaks.

We observed an msan error during the floating point output conversion.
Due to the encoding certain bits could remain untouched during the conversion.

In this draft we zero initialize the dbuf used by every convertor.
2021-03-19 08:32:05 -05:00
bmribler
dafc7285bb Fixed HDFFV-10480 (CVE-2018-11206) and HDFFV-11159 (CVE-2018-14033) (#405)
* Fixed HDFFV-10480 (CVE-2018-11206) and HDFFV-11159 (CVE-2018-14033)
Description
    Checked against buffer size to prevent segfault, in case of data corruption.

    + HDFFV-11159 CVE-2018-14033 Buffer over-read in H5O_layout_decode
    + HDFFV-10480 CVE-2018-11206 Buffer over-read in H5O_fill_new[/old]_decode
Platforms tested:
    Linux/64 (jelly)

* Accidentally left in another occurrence of the previous patch from user
   after a more correct fix was applied, that is the check now accounted
   for the previous advance of the buffer pointer.  Removed it.

* Typo

* Fixed format issues.

* Added test.

* Changed arguments to ADD_H5_TEST

* Fixing arguments to ADD_H5_TEST again.

* Fixing arguments again.

* Took out the CMake changes until Allen can help.

* Added files:

tCVE_2018_11206_fill_old.h5
tCVE_2018_11206_fill_new.h5

* Revert "Took out the CMake changes until Allen can help."

This reverts commit c21324d6e0.

* Revert "Fixing arguments again."

This reverts commit 5832a70674.

* Revert "Fixing arguments to ADD_H5_TEST again."

This reverts commit b45de823c2.

* Revert "Changed arguments to ADD_H5_TEST"

This reverts commit 16719824f5.

* Added first argument to ADD_H5_TEST for HDFFV-10480 fix.

* Changed argument 0 to 1

* Revert "Changed argument 0 to 1"

This reverts commit b343d6613b.

* Revert "Added first argument to ADD_H5_TEST for HDFFV-10480 fix."

This reverts commit b8a0f9a9e8.

* Added first argument and corrected the second.

* Updated fixes for HDFFV-10480 and HDFFV-11159/HDFFV-11049

* Improved error messages.
2021-03-19 08:15:03 -05:00
epourmal
49a14f9e02 Added description of the current HDF5 branches; added a draft of contribution policy. (#445)
* Added description of the current HDF5 branches.

* Removed capitalization in from Develop, Release, Feature to reflect the real naming schema

* Added a draft of contributions guidance document.

* Fixed typos.

* Fixed section title.

* Fixed typo.

* Fixed typos and formatting.

* Fixed many typos and simplified the text (e.g., removed testing instructions and left pointers to where to find them, etc.)

* Fixed a typo.
 Please enter the commit message for your changes. Lines starting

* Added contributing.md file and rearranged doc entries in alphabetical order.

* ddressed Gerd's review comments; found and fixed more typos.

* Addressed comments from Larry and Scot.
2021-03-19 08:13:32 -05:00
Dana Robinson
d0f807527f Suppresses the tcheck_version test's abort dialog on Windows (#477)
* Suppresses the tcheck_version test's abort dialog on Windows

Windows raises a modal abort/retry/ignore dialog box when CRT
calls abort(). This change installs a report hook that suppresses
the dialog so that the CMake tests don't time out waiting for a
nonexistent user to click a dialog box.

* Committing clang-format changes

* Removes __cdecl from callback

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-17 14:23:07 -05:00
H. Joe Lee
00a4e41ea4 Fix typos and grammar errors. (#476) 2021-03-17 14:22:17 -05:00
Dana Robinson
35d6091ab7 Cleans up a couple of MSVC warnings in testhdf5 (#475)
* Fixes a few testhdf5 warnings raised in Visual Studio

Visual Studio is grumpier about treating pointers like integers than
gcc.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-17 14:22:02 -05:00
Allen Byrne
af54fd532c Fix display of long double in tools (#469)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-17 10:27:21 -05:00
H. Joe Lee
d836797626 Correct syntax error. (#474)
a Fortran compile -> a Fortran compiler
2021-03-17 10:26:40 -05:00
Quincey Koziol
c6e4e53546 Update clang config (#473)
* Update clang config to put H5E_BEGIN_TRY / H5E_END_TRY on separate lines, empty C++ methods on separate lines, understand that ALL_MEMBERS / UNIQUE_MEMBERS are foreach macros, and properly skip the 'config' directory in the find command without emiting a warning

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-17 10:25:39 -05:00
David Young
f6d919a2ab Simplified hl parsing (#399)
* Stop using global variables to share parse context with the lexer.

The lexer uses an unconventional strategy for parsing lexical categories
NUMBER (decimal numbers) and STRING (double-quoted strings) that involves
sharing the parse context with the lexer using global variables. There
are a couple of problems with that. First, the lexer is too complicated
for the simple tokenization it performs—it's hard to tell if it is
correct. Second, as @seanm points out, the shared global variables
spill into the namespace shared by other libraries and application
programs—e.g., VTK.

* Regenerate source files from *.[yl].

* Replace strndup, which isn't available on Windows, with a custom
routine, `trim_quotes`, that produces a copy of its `const char *`
argument with leading and trailing double quotes ('"') removed.

While I am here, remove the unnecessary statement `BEGIN INITIAL;`,
which I should have deleted in a previous commit.

* Regenerate .c from .l.

* You haven't programmed in C until you have programmed in High-Definition
(HD) C.

* \#include "H5private.h" for HD* definitions.

* Regenerate *.[ch] from *.[yl].
2021-03-15 08:16:22 -05:00
Sean McBride
24c83cf73e Removed workarounds for pre-standard inline keyword (#423)
Fixes -Wreserved-identifier warnings due to multiple underscores in H5_HAVE___INLINE.
2021-03-12 08:56:09 -06:00
Allen Byrne
748da20bbc develop JNI export references and java updates (#467)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-12 07:47:47 -06:00
Dana Robinson
6f760f200d Replaces checks for fork, etc. with checks for unistd.h (#457)
* Replaces checks for fork, etc. with H5_HAVE_UNISTD_H

Code previously checked for individual POSIX API calls using
H5_HAVE_FORK, etc. The calls we use have been standardized for
decades and available via unistd.h.

Some test messages that were missing when tests are skipped
due to a lack of unistd.h were also added.

The configure checks for individual POSIX API calls will be
removed in a later commit.

* Stupid formatter
2021-03-11 15:34:55 -06:00
Allen Byrne
a78aae1150 clang format push commit for develop (#453)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name
2021-03-11 08:28:55 -06:00
Sean McBride
d7b40604ef Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451)
* Fixed all clang-tidy bugprone-suspicious-string-compare warnings

This change was generated entirely by clang-tidy itself.

* Reformat code with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-10 12:42:35 -06:00
Sean McBride
a7a013782f Various clang tidy warning fixes (#448)
* Fixed clang-tidy bugprone-reserved-identifier warnings

* Fixed clang-tidy bugprone-assert-side-effect warnings

* Fixed clang-tidy bugprone-copy-constructor-init warning

* Fixed clang-tidy readability-redundant-preprocessor warning

For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block.

Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing.  Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS.

* Fixed clang-tidy readability-redundant-string-init warnings

* Fixed some clang-tidy performance-type-promotion-in-math-fn warnings

* Fixed clang-tidy performance-unnecessary-value-param warnings

* Reformat source with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-10 12:41:34 -06:00
Sean McBride
7501f96ab9 Added C++11 override keyword where appropriate (#433)
Added H5_OVERRIDE macro for compatibility with both C++11 and older.
2021-03-10 11:52:48 -06:00
Sean McBride
20c452fe5c Removed checks/workarounds for pre-C++89 compatibility (#449)
After 30+ years, just assume that the following exist:
- extension-less includes
- namespaces
- std::
- static_cast
- bool
2021-03-10 11:51:45 -06:00
Sean McBride
c41a1cb209 Applied clang-tidy readability-non-const-parameter warning fixes auto… (#429)
* Automatically applied clang-tidy readability-avoid-const-params-in-decls fixes

Removes useless const declarations.

* Fixed most readability-non-const-parameter warnings

These changes were made automatically by clang-tidy, but I manually reverted the changes related to the H5Z_func_t signature.

* Reformat source with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-09 10:59:44 -06:00
Sean McBride
5f376ccb3e Removed bad function pointer casts (#434)
* Removed bad function pointer casts

In one case fixed the actual function signature to be correct.

* Reformat source with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-08 08:26:58 -06:00
Mike Smith
150fb83345 fix block coordinate printing example (#437) 2021-03-05 20:34:25 -06:00
Sean McBride
6794428d23 Fixed clang-tidy readability-redundant-control-flow warnings (#428)
* Fixed clang-tidy readability-redundant-control-flow warnings

Just removed useless trailing return statements.

* Removed blank lines from h5diffgentest.c with clang-format v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-05 08:51:01 -06:00
Sean McBride
f4e87791e1 Fixed clang-tidy readability-misleading-indentation warnings (#427)
* Fixed clang-tidy readability-misleading-indentation warnings

* Reformatted src/H5Zscaleoffset.c with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-05 08:50:42 -06:00
Dana Robinson
e84e5ee467 Fixes various warnings noticed on Windows (#425)
* Fixes various warnings noticed on Windows

- Adds a prototype for our implementation of vasprintf
- Return type of H5_get_utf16_str() is now non-const
- Fixes possible uninitialized return type in Wremove_utf8
- Better isolation of fork() code in accum.c:test_swmr_write_big()
- Better isolation of non-zlib code in dsets.c:test_filter_delete()
- Removed unused variable in trefer.c:test_reference_cmpnd_obj()

* Fixes clang-format issues
2021-03-04 22:30:09 -06:00
Sean McBride
580008d5bb More warning fixes (#400)
* Fixed -Wunused-local-typedef warning

* Fixed -Wformat warnings

In one case also removed a `z` character. There was a `z%d` that I think was supposed to be `%zd`

* Fixed -Wshorten-64-to-32 warnings

* Fixed -Wself-assign warnings

* Fixed -Wreserved-id-macro warnings

* Commit format changes from clang-format, clang version 10.0.1.

* Fixed -Wself-assign warnings

* Fixed -Wunused-local-typedef warning

* Fixed -Wformat warnings

In two cases also removed a `z` character. There was a `z%d` that was supposed to be `%zd`.

* Fixed -Wshorten-64-to-32 warnings

* Fixed -Wreserved-id-macro warnings

* Fixed -Wself-assign warnings

* Format source.

* Remove blank lines to pass format check.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-04 15:06:30 -06:00
Sean McBride
fb210fc4fd Use do-while trick to force H5Epush_ret() to require trailing semi (#380)
* Use do-while trick to force H5Epush_ret() to require trailing semi

Fixed ensuing compiler errors.

* Commit format changes from running clang-format with clang version 10.0.1.

* Use do-while trick to force H5Epush_ret() to require trailing semi

Fixed ensuing compiler errors. Updated RELEASE.txt.

This change was made to allow clang-format to correctly format the code.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-04 10:04:41 -06:00
Allen Byrne
fab95ce7b3 Changes found during merge to 1.12 (#414)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup
2021-03-04 06:29:10 -06:00
Allen Byrne
f2a1552822 H5TS_win32_thread_exit (#396)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int
2021-03-01 08:24:59 -06:00
Scot Breitenfeld
ae9b4026a9 fixed error message typo (#401)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return
2021-02-26 23:25:35 -06:00
Allen Byrne
216bff5778 #386 copyright corrections for java folder (#389)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace
2021-02-26 09:27:15 -06:00
Allen Byrne
c7ffe683e5 Primary change is HDFFV-11212 - new refs and JNI (#372)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments
2021-02-25 15:12:57 -06:00
Sean McBride
c29e1b9fdf Patches from vtk (#358)
* Drop the export attribute on forward declaration

They don't mean anything on forward declarations anyways.

* Fixed -Wunused-parameter warnings in some C++ files

Allowed all the attribute #defines to work in C++ also.

* Fixed -Wunused-variable warnings by removing dead code

* Fixed all -Wshorten-64-to-32 warnings by adjusting casts

There was no truncation in fact, since the unsigned result was upcast to size_t then implicitly downcast to uint32_t.

* Fixed all -Wcomma warnings by spliting statements onto own lines

* Fixed all -Wself-assign warnings with different unused param suppression

* Fixed all -Wextra-semi warnings

* Fixed all -Wswitch-enum warnings

Just added new explicit cases with the existing default case.

* Fixed all -Wmissing-prototypes warnings

Just made functions static. Moved them into an extern "C" block.

* Reformatted source with bin/format_source using clang version 10.0.1

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-02-25 12:15:02 -06:00
Sean McBride
c17b4b93d6 Fixed many -Wreserved-id-macro warnings by fixing header guard spelling (#361)
* Fixed many -Wreserved-id-macro warnings by fixing header guard spelling

Removed leading underscore(s) from header guard spelling.  Used 2 regexes:

` _H5(.*)_H`
` __H5(.*)_H`

Applied case-insensitively to only .h files.

* Modified scripts that generate header files to not use underscore prefix

Interestingly, there was already no leading underscore in the trailing comment at the end of the file

* Fixed remaining -Wreserved-id-macro warning not caught by regex
2021-02-22 22:29:56 -06:00
Sean McBride
5ed255a607 Fixed all -Wincompatible-pointer-types-discards-qualifiers warnings (#341)
* Fixed various -Wincompatible-pointer-types-discards-qualifiers warnings by adding const

* Fixed various -Wincompatible-pointer-types-discards-qualifiers warning by removing extraneous consts

There were casts with const, but the function parameter doesn't actaully take const, so just modified the casts.

In the other case, a local variable was const that should not have been, becuase its source wasn't const either.

* Fixed a -Wincompatible-pointer-types-discards-qualifiers warning by strdup-ing a string

Create a duplicate string instead of mutating a supposedly const one.
2021-02-22 11:37:12 -06:00
bmribler
99669024ff Fixed HDFFV-11150 (#356)
Description
    Replaced an HDassert with a check for null pointer in H5O_dec_rc() to
    catch null pointer in corrupted data situation.
    As a result, removed the null check prior to H5O_dec_rc() calls.
Platforms tested:
    Linux/64 (jelly)
2021-02-19 13:01:44 -06:00
Sean McBride
5f015f4742 Fix undefined left shifting of negative numbers (#338)
Undefined Bahavior Sanitizer errored here about left shifting negative numbers.
2021-02-19 12:48:04 -06:00
Sean McBride
0a2a385acc Fixed uninitialized warnings (#360)
* Fixed all -Wsometimes-uninitialized warnings by initializing variables

* Fixed all -Wconditional-uninitialized warnings by initializing variables

* Commit alignment changes from running bin/format_source with clang
version 10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-02-19 11:25:44 -06:00
Sean McBride
a6f1b6ce53 Fixed various clang -Wformat-security warnings (#340) 2021-02-19 09:18:30 -06:00
Larry Knox
2ea165efd0 Update license url part2 (#333)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING
    file - files not in src or test.
2021-02-17 08:52:36 -06:00
Larry Knox
4819f89d3f Update license url (#332)
* 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.
2021-02-17 08:52:04 -06:00
jhendersonHDF
afdb7903c6 Fix for HDFFV-11109 - Copy MPI comm and info object into output FAPL from H5F_get_access_plist (#342)
* Avoid freeing MPI_COMM_WORLD in H5_mpi_comm_free

* Copy MPI Comm and Info to new FAPL in H5F_get_access_plist
2021-02-17 06:37:23 -06:00
Sean
2359a9b020 Fix clang unknown pragma warnings (#337)
Although clang defines __GNUC__ and supports most gcc warnings, it doesn't support all, and will in fact even warn about an unknown pragma.

Guard appropriately.
2021-02-15 15:32:08 -06:00
Sean
5c1ddd2d49 Fix cmake syntax error with regex escaping (#336)
Fixes:

   Syntax error in cmake code at

     /some/path/hdf5/CMakeLists.txt:240

   when parsing string

     .*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$

   Invalid escape sequence \-
2021-02-15 15:26:48 -06:00
Sean
ca6a26225d Detect correct long double size with universal binaires (#335)
On macOS on x86_64, long double is 16 bytes; on macOS on arm64, it's 8 bytes.

Use the same existing technique used to properly detect other sizes to now also properly detect the size of long double.

For bug #311.
2021-02-15 15:23:43 -06:00
jhendersonHDF
52ac74689a Check for wrap context before unwrapping file VOL object in H5F__dest (#325) 2021-02-09 18:41:49 -06:00
Allen Byrne
bccf5b5c08 Add option to control gcc 10 warnings diagnostics (#321)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics
2021-02-08 17:23:09 -06:00
Sean
aa95b70f6d Remove prohibition against building Universal Binaries on macOS (#318)
Fixes github issue #311.
2021-02-08 14:16:41 -06:00
jhendersonHDF
2b4b8e8423 Unwrap file VOL object when destroying file (#308) 2021-02-06 08:20:49 -06:00
Allen Byrne
b3934e99eb Changes for sanitize=address (#312)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3
2021-02-05 10:35:05 -06:00
Scot Breitenfeld
a06693be21 Fix DS examples (#307)
* fixed missed closing of a dataset

* fixed missed closing of a dataset
2021-02-04 07:17:49 -06:00
jhendersonHDF
c55ac8ab71 Ensure processes always synchronize in t_shapesame test setup (#306) 2021-02-03 11:08:19 -06:00
Dana Robinson
eac05994c7 Fixes bin/trace so it doesn't dirty the repo when autogen runs (#295)
* Fixes bin/trace so it doesn't dirty the repo when autogen runs

* Put the trace max back to 110 and comment off H5O.c line
2021-02-03 08:19:58 -06:00
Allen Byrne
ab2c31bc87 Update supported platforms (#303)
* 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

* Update supported platforms

* Revert whitespace changes

* Correct whitespace
2021-02-03 07:57:04 -06:00
Neil Fortner
ddd799282f Modify VDS code to always open source files with H5F_CLOSE_WEAK close (#291)
degree.  Add test cases to VDS test for this, and reduce the amount of
output from that test.
2021-01-30 16:47:23 -06:00
Dana Robinson
4869307bd6 Remove unused AC_REVISION macro from configure.ac (#292)
* Fixes a wayward parenthesis in H5TS.c

* Removes unmaintained AC_REVISION macro from configure.ac
2021-01-29 22:40:43 -06:00
Allen Byrne
6db183590f develop revert source to clang-format version 11 (#293)
* 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
2021-01-29 06:55:18 -06:00
Allen Byrne
5a812bf519 develop clang-format comments (#286)
* 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
2021-01-27 17:51:59 -06:00
Allen Byrne
9524dc494f Jan ws changes (#282)
* 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

* Whitespace fixes except for H5Tprivate.h typo fix
2021-01-27 08:15:34 -06:00
Allen Byrne
799ec0fde4 Small fixes (#285)
* 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

* Small changes plus merge of tools arg parse from 1.12
2021-01-27 07:56:28 -06:00
Allen Byrne
d7bce33123 Java replace switch on string (#273)
* 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
2021-01-26 22:27:10 -06:00
Quincey Koziol
b516921b7d Add H5ESpublic.h to main hdf5.h header (#278) 2021-01-22 20:40:40 -06:00
Neil Fortner
a8ee85971b Fix problems with vlens and refs inside compound using H5VLget_file_type() (#274)
* Fixed problems with vlens and refs inside compound using H5VLget_file_type()

* Fix date in RELEASE.txt

* Add assertions

* Move some manipulation of H5VL_object_t struct fields into the H5VL
package.
2021-01-22 15:05:39 -06:00
Dana Robinson
672892cc0e Fixes a wayward parenthesis in H5TS.c (#262) 2021-01-19 18:42:38 -06:00
Neil Fortner
a5ffedb8c6 Improve performance of multiple calls to H5Sget_select_elem_pointlist (#270)
* Cache the pointer to the next point to process after the last call to
H5S__get_select_elem_pointlist.  This allows the normal process of
iterating over the points in batches to be much more efficient, as the
library does not need to traverse the entirety of the preceding points
every time the funciton is re-entered.

* Update RELEASE.txt for point selection iteration performance fix.
2021-01-19 18:42:14 -06:00
Allen Byrne
9578160cef 11099 Add help text line (#259)
* 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
2021-01-15 17:38:03 -06:00
Dana Robinson
a1091585ad Fixes naked pthread usage in H5TS code added for async (#260) 2021-01-14 13:44:28 -06:00
Dana Robinson
0d8529055d Removes lock/unlock callbacks from ros3 and hdfs VFDs (#258)
* Removes no-op callback stubs from read-only VFDs

Also changes VFD registration to allow read-only VFDs with no
write callback to be registered.

* Adds a RELEASE.txt note for HDFFV-11205

For the read-only VFD registration change

* Revert "Removes no-op callback stubs from read-only VFDs"

This reverts commit a7a9549730.

* Removes lock callbacks from ros3 and hdfs VFDs
2021-01-14 08:19:48 -06:00
Allen Byrne
b1eb47ac4d Reclassify CMake messages - HDFFV-11144 (#253)
* 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
2021-01-13 08:29:15 -06:00
Dana Robinson
b84f48f929 Allow read-only VFD registration (#257)
* Removes no-op callback stubs from read-only VFDs

Also changes VFD registration to allow read-only VFDs with no
write callback to be registered.

* Adds a RELEASE.txt note for HDFFV-11205

For the read-only VFD registration change
2021-01-12 22:12:51 -06:00
Allen Byrne
0e09b0b636 Keep doxygen comment length under 100 char line length (#247)
* 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
2021-01-08 12:02:44 -06:00
Dana Robinson
9e1739f76f Fixes Autotools detection of the st_blocks field in stat (#246)
* Fixes Autotools detection of the st_blocks field in stat

The Autotools and CMake will now both correctly determine if the
stat struct has the st_blocks field and set H5_HAVE_STAT_ST_BLOCKS
appropriately.

* Fixes a typo in configure.ac
2021-01-08 06:52:08 -06:00
Quincey Koziol
e3b7d68826 Reformat source (#244) 2021-01-07 16:16:00 -06:00
Neil Fortner
3ae45182b5 Fix error is H5Mclose_async. (#240) 2021-01-05 10:02:03 -06:00
Allen Byrne
4b733b2926 Remove duplicate setting (#236)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Remove duplicate setting
2021-01-05 08:08:54 -06:00
Larry Knox
f50fd0cc07 Modify temporary rpath for testing in java example scripts. (#230) 2020-12-29 15:43:49 -06:00
Dana Robinson
a6386824c7 Switch bool/true/false to hbool_t/TRUE/FALSE in a few places (#229) 2020-12-24 09:12:01 -06:00
bljhdf
5c9d08a964 Doxygen: Added more H5P RM entries (#226)
* Doxygen - RM entries for H5A, H5S, and H5P APIs

* fix issues on ubuntu

* added missing H5F_fspace_strategy_t_snip

* Doxygen: Add more H5P functions

Co-authored-by: hdfhelp <hdfhelp@jelly.ad.hdfgroup.org>
2020-12-23 22:13:14 -06:00
bmribler
5af00191b5 RM blocks for H5R (#219)
* Transferred RM blocks in H5D and H5G to develop

* Added RM blocks to H5R and added new aliases.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2020-12-23 00:01:46 -06:00
Allen Byrne
8183284f09 dev -Update pkgconfig settings with version - #218 (#220)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Pkgconfig fix - #218

* Update all pkgconfig settings with version
2020-12-22 14:43:58 -06:00
Quincey Koziol
71440cef1c Add compiler flags for GCC 10, along with updating warnhist script to accommodate them. (#217) 2020-12-21 12:57:18 -06:00
bmribler
0483817a92 Transferred RM blocks in H5D and H5G to develop (#213) 2020-12-21 09:54:47 -06:00
Dana Robinson
f3b8fb38de Fixes a small memory leak in the chunk_cache test (#208) 2020-12-19 22:31:19 -06:00
Dana Robinson
5025d8160f Fixes a small memory leak in the h5jam test (#207) 2020-12-19 22:30:50 -06:00
Dana Robinson
5e1ae415b8 Fixes a minor memory leak in hl/test/test_file_image.c (#209) 2020-12-19 22:30:05 -06:00
Quincey Koziol
3c7b2ab5db Update jni.h detection for OS version changes in Macos 11.x (#211) 2020-12-19 22:15:04 -06:00
Quincey Koziol
05f6f2becd Avoid aligned access for references by decoding into temporary buffer and then copying the result into the actual buffer. Update test to be more thorough with using compound datatype fields everywhere. (#206) 2020-12-19 12:37:45 -06:00
Evan Ramos
996d07102d H5FD__mpio_read: Fix MPI_Bcast datatype (#205)
Signed-off-by: Evan Ramos <evan@hpccharm.com>
2020-12-18 14:30:31 -06:00
Dana Robinson
adfac394c2 Restores maintainer mode in the autotools (#200)
Maintainer mode should be enabled in development branches.

Also adds helpful commenting.
2020-12-17 20:38:57 -06:00
H. Joe Lee
c69a3b5e93 close #195. (#196)
* Update HDF5PluginMacros.cmake

* Update HDF5PluginMacros.cmake
2020-12-17 15:22:44 -06:00
Quincey Koziol
3f37f6648d Fix datatype lookup in named datatype flush/refresh code and detect more core dumps in test scripts (#193)
* Detect coredumps, and avoid printing a warning when creating a directory that already exists

* Retrieve the actual datatype object correctly, in the face of possible pass-through VOL connectors

* Detect more core dumps, and tiny formatting cleanup

* Revert error status checks for mirror VFD test script
2020-12-16 21:36:13 -06:00
Allen Byrne
068136351c OESS-98 fix hdf5 link target (#188)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* OESS-98 fix hdf5 link target
2020-12-16 15:47:40 -06:00
Dana Robinson
a6b76a45b2 Adds h5delete tool (#187)
* Adds h5delete tool

* Fixed MANIFEST

* Added RELEASE.txt note

* Fix typo in RELEASE.txt
2020-12-16 13:50:30 -06:00
Dana Robinson
e4865ce716 Turns off clang formatter for H5ARGS_TRACE (#184)
The H5ARGS_TRACE macro was added during the async merge. These macros
are updated by the bin/trace script, but conflict with the formatter
so formatted code gets dirtied when autogen.sh is run.

This change enshrines the bin/trace output as canonical and adds
comments to turn clang formatting off for those lines containing
H5ARGS_TRACE.
2020-12-16 12:15:06 -06:00
Allen Byrne
faf3a2fae0 OESS-98 convert plugin option to FetchContent, add tests (#155)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* Update other test machines

* OESS-98 fix tools test for plugins

* HDFFV-10865 performance improvement for java array
2020-12-16 11:59:51 -06:00
jhendersonHDF
affbead81a Enable H5Fopen to probe list of available VOL connectors when opening a (#182)
file
2020-12-15 23:39:19 -06:00
vchoi-hdfgroup
865b10b7a7 Transfer doxygen H5O RM blocks from doxygen branch to develop. (#174)
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
2020-12-15 21:18:54 -06:00
bljhdf
f09ec2657c Doxygen - RM entries for H5A, H5S, and H5P APIs (#181)
* Doxygen - RM entries for H5A, H5S, and H5P APIs

* fix issues on ubuntu

* added missing H5F_fspace_strategy_t_snip
2020-12-15 21:17:41 -06:00
Dana Robinson
f3629d6148 Removes debug statement from H5R__open_attr_api_common() (#183) 2020-12-15 20:58:21 -06:00
Quincey Koziol
d85f6e2d6a Revise async hard link creation to have a real H5VL_object_t (#175) 2020-12-14 22:49:24 -06:00
jhendersonHDF
56b1b3a2b2 Pass LAPL correctly through VOL in H5Lcreate_soft (#170) 2020-12-14 14:15:02 -06:00
Hans Johnson
0f12cd9212 BUG: Missing output dependency shared/H5init.c (#165)
All outputs depenancies need to be listed for
the custom command.

ninja: error: 'cmake_object_order_depends_target_hdf5-shared_DEBUG', needed by 'Modules/ThirdParty/HDF5/src/itkhdf5/shared/H5Tinit.c', missing and no known rule to make it
2020-12-13 23:06:21 -06:00
Quincey Koziol
a2524671ca Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector

* Revert temporary testing changes

* Add H5Fwait to header file

* Add H5VLreset_lib_state() routine.

* Correct VOL wrap context when retrieving library state for file open & create.

* Manage the API context's VOL connector state as part of the library state.

* Set the 'VOL connector property valid' flag when restoring the library state.

* Don't push new API context on stack when retrieving "current" one.

* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.

* Manage recount of underlying connector for VOL wrap context.

* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.

* Update library with new functions related to library global lock

* Add asynchronous token API

* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.

* Sync w/develop

* Initial event set code framework.

* Elaborate on the H5ES routines, starting to add API routines.

Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.

Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.

Clean up a few other minor warnings & code style issues.

* Implement H5EScreate, H5ESget_count, and H5ESclose.

It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).

* Add source file for event set test.

* Refactor sync & async API routines to call common routine.

Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.

Progress on "fake" async VOL connector, for testing.

* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.

* Free the requests is H5ESclose.  Remove comments implying that request
wait, notify, and cancel callbacks should free the request.

* Fix bug in error handling in H5Fclose.

* Fix bugs in async file routines.  Rename H5VL_create_object_generic to
H5VL_create_object.

* Add explicit async version of H5Fcreate.

* Add more _async routines

* Correct typo for return value from H5Awrite changes

* Add H5EStest and H5ESwait routines

* Updated with API tracing info

* Fix NULL pointer dereference in H5ES__wait

* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.

* Fix typo

* Remove event from event set's linked list

* Move block of code so that vol_obj is valid

* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).

* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro.   This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process.   Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.

Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.

* Release memory for managed strings

* Fix printf() formats.

* More printf() format fixes.

* Add H5Eappend_stack routine and regression tests

* Clean up a few missed merge conflicts and update the error stacks.

* Remove unnecessary fork() operations and ten second sleep().

* Restore commented out attribute out, to better enable tracking down the previous failure

* Allow multiple H5ARG_TRACE macros within a routine to be updated

* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations.  Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.

* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.

* Add missing file.

* Add caller's name and arguments to event, for error reporting

* Refactor event set setup for "API common" internal routines

* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.

* Add some of the error query routines needed for event sets.

* Refactor to make async setup / teardown and "common" routines cleaner

* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes

* Enhance event info, for better error handling

* Change name of temporary vol_obj variable, to help reduce coding errors

* Fix oversight with vol_obj pointer

* Minor code cleanup

* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state

* Run source formatter

* Change H5TSmutex lock and release to include a lock count

* Update error reporting ideas

* Minor updates to improve sanity checking for retrieving / restoring library state

* Updated with feedback from h5py team members

* Refactor internal event set list and event handling, add implementation for H5ESget_err_info

* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass.  Also more code quality cleanups to add iterator callbacks to internal event set routines.

* Update API tracing for new H5VL_request_status_t typedef

* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure

* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation

* Remove 'canceled' event status from Java constants

* Be safer about releasing resources when inserting a newly opened/created object or file into an event set

* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".

* Remove H5ES_STATUS_CANCELED from Java wrappers also

* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
    because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.

* Corrections based on PR feedback.

* Further changes to make based on PR feedback.

* Fix missed merge marker, and reformatted line

* Clean up some warnings

* Correct level of indirection

* Relocate prototype (and doxygen info) for H5Aclose

* Change non-static function declarations to be static

* Ensure that H5TSpublic.h header gets installed (#129)

* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.

* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value.  Make the corresponding changes through most of the v1 and v2 B-tree code.  Clean up warnings in H5public.h and cmpd_dtransform.c.

* Add H5Iregister_future routine and tests.

* Correct return value for H5Lexists_async

* Add H5_DLL macro to public H5ES API routines

* Update supported -> flags parameter for introspect_query callback

* Remove my email address.  Update passthrough VOL connector ID.

* Fix comment for post_open_api_common

* Remove unused non-blocking VOL connector

* Minor cleanup in async branch in preparation for merge to develop

* Update CMake and the Autotools to use the new pass-through VOL ID

* Fix for SWMR daily test failures (#160)

The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.

* Added selective async APIs (#150)

* Added selective async APIs

Description:
    Added the following APIs:
        H5Ropen_attr_async
        H5Ropen_object_async
        H5Ropen_region_async

        H5Mcreate_async
        H5Mopen_async
        H5Mput_async
        H5Mget_async
        H5Mclose_async

        H5Tcommit_async
        H5Topen_async
        H5Tcopy_async
        H5Tclose_async
    - Updated an expected output file to include a new internal function
      in the error stack for the failure case.

* Updated async APIs per reviews, including removing async version of
H5Tcopy.

* Removed statements that were added by mistake in the previous commit.

* Fix compile issues in H5M and warnings elsewhere

* Reformat code

* Brings VOL_LIST changes from develop. (#163)

Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-13 18:02:17 -06:00
Dana Robinson
f6dce729e8 Moves the lists of VOL connectors and VFDs in Autotools builds (#162)
The VOL_LIST variable used in the Autotools was duplicated in many
subdirectories. It's been moved to config/conclude.am to avoid
duplication. VFD_LIST was also moved to conclude.am.
2020-12-12 09:25:54 -06:00
Dana Robinson
9e72b7f834 Minor normalization with the async branch (#159)
* Minor normalization with the async branch

* Update CMake and the Autotools to use the new pass-through VOL ID
2020-12-11 21:25:24 -06:00
Larry Knox
71a7ad0e07 Add Makefile.ins in utils directory to MANIFEST. (#152) 2020-12-10 15:19:19 -06:00
Quincey Koziol
17a2e88769 Enforce VOL framework version compatibility when registering connectors. Also add a version for the connector itself, some refactoring on the register calls, and move the logic for matching / rejecting a VOL connector class from the plugin module to the VOL module. (#151) 2020-12-10 11:01:04 -06:00
Dana Robinson
4713a6d238 Fixes a minor memory leak in the SWMR use cases tests (#147)
* Due to a missing free(3) call
2020-12-03 11:16:30 -06:00
Jan-Willem Blokland
bf0cbcbea5 (fix) Segmentation fault when using a compound type. (#143)
* (fix) Segmentation fault when using a compound type.

In the case when a compounded attribute is written to dataset
followed by writing the data with a data transform function
to the dataset will result in a segmentation fault. It turns out
the data is classified as compounded while it is not. Now, the
state is always reset first to not compounded followed by the
existing check if the variable is compounded.

* (fix) Removed undesired comment lines.

* (fix) Segmentation fault when using a compound type: added test.

* (fix) Added the missing cmpd_transform.c file to MANIFEST.

* (fix) cmpd_dtransform test: autotools and source header.

Added the cmp_dtransform test to the autotools configuration and
updated the HDF Group copyright header.

Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com>
2020-12-02 11:52:09 -06:00
Dana Robinson
c7c1046d49 Fix autotools clang debug optimization level w/ older clang and Xcode versions (#146)
* Fixes clang debug optimization level w/ Autotools

NOTE: This was only released in HDF5 1.10.7, so only the 1.10
      branch needs a note in RELEASE.txt.

* Updates the clang -Og setting with a version check w/ autotools

* Sets -Og when clang >= 4.0 or Xcode >= 9.0
* Older versions get -O1
* Autotools only
2020-12-02 07:32:22 -06:00
jwsblokland
82c0cb122f (fix) H5Z_xform_create function and scientific notation (#144)
* (fix) H5Z_xform_create function and scientific notation

Implemented a more sophisticated check to support scientific notation
in the expression of the H5Zset_data_transform function.

* (fix) H5Z_xform_create and scientific notation: Added test.

Added a test to demonstrate that the parsing of expression
which includes scientific notation works correctly. Improved
inline comment.

Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com>
2020-12-01 22:27:24 -06:00
Quincey Koziol
7950dca75c Add H5atclose and H5is_library_terminating routines. (#139)
* Add H5atclose and H5is_library_terminating routines.

* Add brief Doxygen comment for H5_atclose_func_t typedef.

* Added /*out*/ flag to parameter list, for the tracing script.

* Update doxygen comment for H5atclose with additional detail.

* Return FAIL for H5is_library_threadsafe and H5is_library_terminating when their parameters are NULL.
2020-12-01 14:24:32 -06:00
Quincey Koziol
436221cc18 Break single loop with interleaved sends and receives into two separate loops, to avoid deadlocks. Also avoid copying chunk entries when determining ownership. (#138) 2020-12-01 13:20:58 -06:00
Quincey Koziol
3e61010340 Expand ID dec_ref and close callbacks to allow for asynchronous close operations (#135)
* Expand ID dec_ref and close callbacks to allow for asynchronous close operations.

* Fix typo

* Rename token -> request, remove programmer name

* H5E_ATOM to H5E_ID
2020-12-01 13:20:05 -06:00
Quincey Koziol
adf7b1d4cf Add flag to H5CX_pop that allow setting the properties to return to application to be skipped. (#134) 2020-12-01 10:15:34 -06:00
Quincey Koziol
123c5a653d Expand 'opt_query' VOL callback to return a bitfield instead of a flag (#136)
* Expand 'opt_query' VOL callback to return a bitfield instead of a flag

* Correct pastos
2020-11-30 15:59:22 -06:00
Quincey Koziol
cadd6db431 Move API routines for VOL objects to main source file. (#133) 2020-11-30 13:54:44 -06:00
Dana Robinson
c256612e09 Replace H5E_ATOM major error category with H5E_ID (#121)
* Renames H5I_ATOM to H5I_ID, among other related changes

* Java has been updated.
* Fortran is failing on my VM, even though I don't touch that.

* Adds a RELEASE.txt note for H5E_ATOM to H5E_ID changes

* Fixes typos in comments
2020-11-30 06:50:39 -06:00
Dana Robinson
a6e3d22604 FreeBSD autotools changes (#142)
* Updates to allow autotools builds on recent FreeBSD

* Switches the default C compiler to cc from gcc
  (this may need a version string check if we want to support
  FreeBSD 9 and earlier. FreeBSD 10 was released in 2014)
* Makes the default C++ compiler c++ (no previous setting)
* Both of these resolve to Clang on FreeBSD 10+
* Added a note about flang being unsuitable on FreeBSD
  (the port uses an ancient build of flang that lacks Fortran
  2003 support)
* Autotools only - CMake appears to use different CPP flags
  which cause compilation errors

* Adds a RELEASE.txt note for new FreeBSD autotools changes
2020-11-29 22:44:47 -06:00
Dana Robinson
3446fa6993 Fixes clang debug optimization level w/ Autotools (#141)
NOTE: This was only released in HDF5 1.10.7, so only the 1.10
      branch needs a note in RELEASE.txt.
2020-11-29 22:42:38 -06:00
Dana Robinson
4d71d234dd Removed H5_ECXXFLAGS from libhdf5.settings (#140)
This variable is unused and was missed in the -Werror changes.
2020-11-29 22:20:06 -06:00
Quincey Koziol
4fea1bcccd Minor cleanups (#132) 2020-11-26 11:11:35 -06:00
Dana Robinson
2e2ded6181 Minor refactoring in tid.c (#127) 2020-11-25 21:53:48 -06:00
Quincey Koziol
1bb2bdbcf8 Enhance API tracing (#120)
Enhance API tracing to handle more types, and to put tracing info in a string, allowing it to be used when reporting errors.  Also refactor ref-counted strings (H5RS) module to add capabilities needed for the tracing.  Refactored H5Gname.c routines to use new H5RS routines also.  Added /*out*/ tags to API routines that are returning information to the application.  Updated H5TRACE macros from running updated trace script over library code.  Added tests for new H5RS routines.
2020-11-25 20:44:34 -06:00
Quincey Koziol
3ebcfb8bf3 Refactor to avoid using fork to create initial file (#122)
* Refactor to avoid using fork to create initial file

* Use correct exit value on failure
2020-11-25 15:42:53 -06:00
Quincey Koziol
4e23defcdc Update H5TS code to reflect library's coding style (#123) 2020-11-25 15:16:00 -06:00
Quincey Koziol
f095373635 Move package initialization code for H5A and H5G to internal source file. (#125) 2020-11-25 12:04:16 -06:00
Allen Byrne
0b54c556a0 Add else choice to error flags option (#128) 2020-11-25 11:50:21 -06:00
Dana Robinson
ffcb354237 Minor/solaris gcc fix (#126)
* Adds gnu99 as the standard when building with gcc on Solaris

* Adds a note to RELEASE.txt and improves comments

For Solaris + gcc fix (HDFFV-11191)
2020-11-25 09:26:35 -06:00
Dana Robinson
7b9c5e124b Adds a configure/CMake option to control -Werror behavior (#119)
* Works in both Autotools and CMake
* OFF by default
* Reverts "always on" -Werror behavior released in 1.10.7
2020-11-24 21:57:48 -06:00
bljhdf
c56464fc36 Doxygen - added (mostly) beginner functions (#112)
* Doxygen - added (mostly) beginner functions

* Removed duplicate H5Pset_szip function
2020-11-23 16:17:44 -06:00
Allen Byrne
ecbcb4356c Update release text files (#109)
* Update release text files

* spelling correction

* Update list
2020-11-23 12:04:49 -06:00
Quincey Koziol
5ff09ae971 Basic alignment with async branch (#115)
* 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
2020-11-23 10:18:26 -06:00
Gerd Heber
d4a3097ec5 Full set of current H5F documentation. (#105)
* First cut of the H5 public API documentation.

* Added H5Z "bonus track."

* Applied Quincey's patch.

* Added the missing patches from Quincey's original patch.

* H5PL (complete) and basic H5VL API documentation.

* Added H5I API docs.

* Added H5L API docs.

* First installment from Elena's H5T batch.

* Second installment of Elena's H5T batch.

* Final installment of Elena's H5T batch.

* Migrated documentation for SWMR functions.

* Catching up on MDC functions.

* Integrated the H5F MDC function documentation.

* Added MDC and parallel H5F functions.

* Slightly updated main page.

* Added doxygen/dox/H5AC_cache_config_t.dox to MANIFEST.
2020-11-20 23:18:14 -06:00
Dana Robinson
133c0ad36f Minor/id code cleanup (#114)
* Revert "Switch ID code to use a hash table instead of a skip list (#52)"

This reverts commit a50d211755.

* H5I_id_type_t and H5I_class_t are no longer managed via free lists

* Fixed commenting issues

* Naming and commenting cleanup in H5I.c

* H5I cleanup

* Header cleanup
* Commenting
* More uniform naming

* Renames H5I_id_type_t and related in H5I.c

* Adds gcc pragmas to ignore H5I const casting

* Split H5I code into multiple files

* Rename id_type to simply type in H5I code

* Minor typo in H5Itest.c
2020-11-20 23:17:36 -06:00
Dana Robinson
2122a428cd Corrects use of unitialized bytes in the chunk_info test (#106) 2020-11-20 12:11:36 -06:00
Allen Byrne
8c330c1cb4 chkmanifest will run autogen (#102)
* chkmanifest will run autogen

* remove extension on command

* run autogen first
2020-11-20 10:50:16 -06:00
Dana Robinson
793b3d1bae Revert "Switch ID code to use a hash table instead of a skip list (#52)" (#104)
This reverts commit a50d211755.
2020-11-19 20:54:00 -06:00
Allen Byrne
fc7ac84e19 Add new files to CMake and MANIFEST (#100)
* Add new header file

* Add missing file
2020-11-19 08:07:01 -06:00
Gerd Heber
0a06b9a869 First cut of the H5 public API documentation. (#80)
* First cut of the H5 public API documentation.

* Added H5Z "bonus track."

* Applied Quincey's patch.

* Added the missing patches from Quincey's original patch.

* H5PL (complete) and basic H5VL API documentation.

* Added H5I API docs.

* Added H5L API docs.

* First installment from Elena's H5T batch.

* Second installment of Elena's H5T batch.

* Final installment of Elena's H5T batch.
2020-11-18 09:06:01 -06:00
Dana Robinson
a50d211755 Switch ID code to use a hash table instead of a skip list (#52)
* Brings hash table ID code over from Bitbucket branch

* Includes reformatting via clang.

* Excludes uthash.h from reformatting.

* Still has the failing test issue in tid.c. This should only be a
  problem if a custom ID type is used and its free function deletes
  other IDs.

* Fixes munged H5_GCC_DIAG_ON/OFF macros in H5I.c

The H5_GCC_DIAG_ON/OFF macros used to turn off fallthrough warnings
in uthash.h (external code) were munged when formatting with clang
due to their lack of quotes.

e.g.;

    H5_GCC_DIAG_OFF(implicit-fallthrough)

was munged to:

    H5_GCC_DIAG_OFF(implicit - fallthrough)

which compiles, but is useless. So, with quotes, this is now:

    H5_GCC_DIAG_OFF("implicit-fallthrough")

which survives reformatting with clang.

* Fixes issues with user callbacks in the ID hash tables

The skip lists (previously) used to handle IDs use a mark-and-sweep
scheme to deal with user-defined ID delete callbacks which themselves delete
other IDs in the list. The uthash hash table implementation used to manage
the IDs in this feature branch does not have this ability.

This commit restores the skip lists for non-library ID types in lieu of
significantly modifying the uthash code. The hash tables are used to
manage the library IDs as those do not delete other IDs when they are
closed.

* Adds uthash.h to MANIFEST

* Removes implicit-fallthrough diagnostic disable

Removing -Wimplicit-fallthrough=5 means that the uthash code
no longer raises warnings so the H5_GCC_DIAG_OFF/ON macros
that disabled those warnings have been removed from H5I.c.

* Adds a test to ensure you can delete IDs in the H5Iiterate() callback
2020-11-17 12:06:39 -06:00
Michael Hirsch
0db2d6c212 obsolete CMAKE_BUILD_TOOL => CMAKE_MAKE_PROGRAM (#97)
CMAKE_BUILD_TOOL has been [replaced](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TOOL.html) by CMAKE_MAKE_PROGRAM
2020-11-17 07:53:10 -06:00
Larry Knox
d14418e92a Merge pull request #91 from ksunden/patch-1
Fix spelling of metadata
2020-11-13 14:34:41 -06:00
Kyle Sunden
1e2cbc1b32 Fix spelling of metadata
was spelled "metadatda"
2020-11-13 13:29:22 -06:00
Larry Knox
2ddc379c70 Merge pull request #82 from derobins/minor/skip_list_error
H5SL_release() returns SUCCEED on errors
2020-11-13 13:27:51 -06:00
Larry Knox
184413f7b0 Merge pull request #84 from byrnHDF/develop
Downgrade m4 doxygen macros.
2020-11-13 08:52:45 -06:00
Allen Byrne
ab009d30e5 Correction for location of doxygen folder 2020-11-12 13:14:22 -06:00
Larry Knox
fa40c6c59a Merge pull request #60 from bmribler/develop
Fix HDFFV-10590
2020-11-12 11:22:10 -06:00
Allen Byrne
07da01a9d0 downgrade doxygen.m4 macro file to previous version. 2020-11-12 10:37:19 -06:00
Binh-Minh Ribler
9cde5c52b8 Fixed typo!! 2020-11-12 10:25:14 -06:00
Larry Knox
cfb82afb80 Merge pull request #81 from jhendersonHDF/develop
Fix non-collective metadata read in t_mdset with collective metadata reads enabled
2020-11-12 10:12:48 -06:00
Allen Byrne
142a1d76bb Add missing entries, remove m4 reference 2020-11-12 09:36:04 -06:00
Binh-Minh Ribler
d8d6332eda Fixed typo! 2020-11-12 08:58:20 -06:00
Dana Robinson
55fab292ae H5SL_release() returns SUCCEED on errors
H5SL_release() erroneously returned SUCCEED on errors. It now
correctly returns ret_value.
2020-11-12 06:41:18 -08:00
Binh-Minh Ribler
52f6d51eac Added line for new file 2020-11-12 08:04:28 -06:00
Larry Knox
04e50c876c Merge pull request #79 from byrnHDF/develop
Correct TARGET variable and CMake config file location
2020-11-12 06:26:12 -06:00
Binh-Minh Ribler
5b5654bf48 Removed the line, added by mistake. 2020-11-11 22:28:26 -06:00
Binh-Minh Ribler
ff1e052108 Added a missing line. 2020-11-11 22:01:25 -06:00
Jordan Henderson
37fb2ec29a Fix non-collective metadata read in t_mdset with collective metadata reads enabled 2020-11-11 17:10:41 -06:00
Binh-Minh Ribler
9914e52e16 Fixed typo again. 2020-11-11 15:02:34 -06:00
Binh-Minh Ribler
ea8b05fa1e Fixed typo 2020-11-11 14:56:41 -06:00
Binh-Minh Ribler
7ade95c572 Miscellaneous update
- added test for CMake
- renamed new input file to conform to the existing files
2020-11-11 14:42:11 -06:00
Allen Byrne
8758d5698d Correct TARGET variable and CMake config file location 2020-11-11 06:26:39 -06:00
Gerd Heber
c0c0b6b47f Merge pull request #78 from gheber/develop
This is the first installment of Doxygen-based documentation for the H5F module.
2020-11-10 14:57:54 -06:00
Gerd Heber
29b8231f92 Finished API Compatibility Macros. 2020-11-10 14:28:59 -06:00
Gerd Heber
c77bf5b3e5 Function mappings for 1.8.x. 2020-11-10 10:58:45 -06:00
Gerd Heber
91a824e61f Added 1.10.x function mappings. 2020-11-10 09:29:17 -06:00
Gerd Heber
39eef14f0d Added 1.12.x function mappings. 2020-11-10 09:11:49 -06:00
Larry Knox
9cc9107dfa Merge pull request #77 from byrnHDF/develop
Set doxygen default to normally disabled.
2020-11-10 08:27:29 -06:00
Gerd Heber
5189dfa0d9 About half of the app. compat. mac. document converted. 2020-11-09 19:17:53 -06:00
Gerd Heber
9fe7d9fb33 Updated app. compat macro link. 2020-11-09 16:54:24 -06:00
Gerd Heber
a7c84135d3 App. compatibilty macro outline. 2020-11-09 16:52:42 -06:00
Gerd Heber
dddd15cccf First cut of H5F. 2020-11-09 11:15:58 -06:00
Allen Byrne
1eb43d647d Update to latest doxygen.m4 2020-11-09 08:55:00 -06:00
Allen Byrne
4e6b6781ee Set doxygen default to normally disabled. 2020-11-09 07:55:52 -06:00
Larry Knox
bb6bb57165 Merge pull request #73 from byrnHDF/develop
Add doxygen autconf/cmake support
2020-11-07 23:46:44 -06:00
Allen Byrne
2457e58407 Change doxygen brief variable 2020-11-07 16:20:08 -06:00
Allen Byrne
014af41c9e Doxygen correct typos 2020-11-04 07:55:41 -06:00
Allen Byrne
2c28470831 doxygen restore tabs 2020-11-03 17:16:00 -06:00
Allen Byrne
2c0c5c31fe Doxygen correct PHONY target 2020-11-03 15:41:34 -06:00
Larry Knox
5b5a1a8102 Merge pull request #72 from jhendersonHDF/develop
Change H5R__copy to not assume destination reference storage is initi…
2020-11-03 14:52:09 -06:00
Allen Byrne
d6c92bde00 Doxygen add new files and update docs 2020-11-03 12:23:06 -06:00
Allen Byrne
4f7bb20a8f Doxygen remove obsolete file 2020-11-03 10:43:51 -06:00
Allen Byrne
c812f3fea2 Add doxygen auotoconf and cmake support 2020-11-03 10:42:09 -06:00
Jordan Henderson
0b6067574b Change H5R__copy to not assume destination reference storage is initialized 2020-11-02 21:03:46 -06:00
Larry Knox
dc47bb7084 Merge pull request #69 from xantares/mingw3
CMake: Add an option to opt-out static libgcc
2020-11-02 07:44:44 -06:00
Larry Knox
3c42c49a02 Merge pull request #67 from xantares/mingw1
CMake: Set specific INSTALL_DATA_DIR only on MSVC
2020-10-31 10:54:36 -05:00
Larry Knox
b4ef77e652 Merge pull request #70 from xantares/mingw4
CMake: MINGW implies WIN32
2020-10-31 07:18:04 -05:00
Michel Zou
7259b5eb7a CMake: Add an option to opt-out static libgcc
With sjlj exception model, statically link to libgcc/libstdc++
prevents exceptions to be caught from other dynamic libraries.
2020-10-31 10:31:38 +01:00
Larry Knox
d8b7b3593b Merge pull request #68 from xantares/mingw2
CMake: Add an option to opt-out MSVC naming convention
2020-10-30 18:41:38 -05:00
Larry Knox
747cecb069 Merge pull request #65 from derobins/minor/mpi_2gb_limit
Fixes a bit shift issue in an MPI constant
2020-10-30 10:53:07 -05:00
Larry Knox
42d4ceac67 Merge pull request #66 from derobins/minor/HD_to_H5MM
Replaces C standard library memory calls with H5MM equivalents
2020-10-30 10:52:42 -05:00
Michel Zou
0db1fe81d5 CMake: MINGW implies WIN32 2020-10-30 16:09:28 +01:00
Michel Zou
de4ccdfd63 CMake: Add an option to opt-out MSVC naming convention
We might want to keep the default mingw import name, see:
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-hdf5/hdf5-default-import-suffix.patch
2020-10-30 13:19:18 +01:00
Michel Zou
0e9981aa59 CMake: Set specific INSTALL_DATA_DIR only on MSVC
For MinGW we want INSTALL_DATA_DIR to be set to share instead of .
to properly install files in a standard package layout.
2020-10-30 10:46:56 +01:00
Dana Robinson
16eab69bcd Replaces C std library calls with H5MM equivalents
Mostly H5MM_memcpy in newer VFDs
2020-10-29 17:17:15 -07:00
Dana Robinson
1e93bbc183 Fixes a bit shift issue in an MPI constant
Redefines TWO_GIG_LIMIT to be INT32_MAX instead of 1 << 31, which
fixes an issue revealed by compiling with -Wshift-overflow.
2020-10-29 16:28:38 -07:00
Larry Knox
6c0f954d68 Merge pull request #62 from byrnHDF/develop
HDFFV-10868 - add H5Sselect API java wrappers.
2020-10-29 16:29:17 -05:00
Larry Knox
ad174fcca5 Merge pull request #64 from derobins/minor/vfd_warning_cleanup
Fixes minor issues in various virtual file drivers
2020-10-29 14:59:13 -05:00
Allen Byrne
a4cbd51db6 HDFFV-10868 Corrections from review 2020-10-29 13:14:51 -05:00
Dana Robinson
2266ee56c3 Fixes minor issues in various virtual file drivers
- 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.
2020-10-28 23:50:37 -07:00
Allen Byrne
ba00760d7a HDFFV-10868 - add note 2020-10-28 07:06:01 -05:00
Binh-Minh Ribler
e5f792cf12 Added test for the fix HDFFV-10590 2020-10-27 22:18:52 -05:00
Allen Byrne
f8b3f576ce HDFFV-10868 - add H5Sselect API java wrappers.
Also added javadoc comments to H5E and H5s constants.
2020-10-27 16:48:02 -05:00
Binh-Minh Ribler
273c0c1836 Fix HDFFV-10590
Description
    This is to fix the CVE issue CVE-2018-17432.
    h5repack produced a segfault on a corrupted file.  This fix modified the
    dataspace encode and decode functions per Quincey's suggestion to prevent
    the segfault and h5repack only failed for the corrupted file now.
Platforms tested:
    Linux/64 (jelly)
2020-10-26 13:04:35 -05:00
Binh-Minh Ribler
a4269a08b9 Merge branch 'develop' of https://github.com/HDFGroup/hdf5 into develop 2020-10-26 12:53:28 -05:00
Binh-Minh Ribler
7bfa10018e Fix HDFFV-10590
Description
    This is to fix the CVE issue CVE-2018-17432.
    h5repack produced a segfault on a corrupted file.  This fix modified the
    dataspace encode and decode functions per Quincey's suggestion to prevent
    the segfault.  h5repack only failed for the corrupted file now.
Platforms tested:
    Linux/64 (jelly)
2020-10-26 08:36:27 -05:00
Larry Knox
313a8c8546 Merge pull request #59 from derobins/trivial/HDprefix
HD prefix updates in src/ and test/
2020-10-24 08:05:13 -05:00
Dana Robinson
2ae59f1c61 Restores erroneously deleted key_id field from S3 VFD
Accidentally deleted while preparing the PR. Only existed in a
branch.
2020-10-23 17:49:53 -07:00
Dana Robinson
ca3659a014 HD prefix updates in src/ and test/
Adds missing HD prefixes to API calls in src and test.

Adds some extra processing to bin/checkposix to keep the noise
levels down when running the script (not comprehensive).
2020-10-23 17:13:05 -07:00
Larry Knox
2c3cf8240f Merge pull request #56 from derobins/minor/implicit_fallthrough
Removes -Wimplicit-fallthrough=5 from the gcc warnings
2020-10-23 16:19:22 -05:00
Larry Knox
f9679de85c Merge pull request #55 from byrnHDF/develop
Correct SZ options for building plugins
2020-10-22 11:39:51 -05:00
Dana Robinson
3606f20c02 Removes -Wimplicit-fallthrough=5 from the gcc warnings
-Wimplicit-fallthrough=3 is added by -Wextra, which we already set.
Bumping the warning level only changes how fall-through comments are
parsed, with level 5 turning off fall-through comments entirely.
This is unnecessary and results in having to do extra work to squash
warnings when included external code uses fall-through.

This change also adds /* FALLTHROUGH */ comments where
H5_ATTR_FALLTHROUGH is used so compilers that don't use attributes
but do respect fall-through comments don't raise spurious warnings.
2020-10-22 09:22:58 -07:00
Allen Byrne
c849825c9d Correct SZ options for building plugins 2020-10-21 15:40:42 -05:00
Larry Knox
8f15ee5e3c Merge pull request #49 from byrnHDF/develop
options corrections
2020-10-20 17:50:49 -05:00
Allen Byrne
4a88f0c8d7 URL and options corrections 2020-10-19 16:21:57 -05:00
Larry Knox
377a5ab2e5 Merge pull request #47 from byrnHDF/develop
Whitespace and url correction
2020-10-19 13:33:11 -05:00
Allen Byrne
176eef2737 Whitespace and url correction 2020-10-19 09:42:09 -05:00
Allen Byrne
9bd2102b77 Update javadoc comments to reduce warnings (#41) 2020-10-16 11:10:35 -05:00
Larry Knox
e6cda4817b Merge pull request #37 from takluyver/description-errno
Note that the description for system errors may be used by h5py
2020-10-15 18:31:57 -05:00
Thomas Kluyver
bb2ed7151b More general message about using description for errno 2020-10-15 15:29:56 +01:00
Thomas Kluyver
73aba9228d Note that the description for system errors may be used by h5py 2020-10-15 10:49:22 +01:00
Larry Knox
220f8972cd Merge pull request #31 from byrnHDF/develop
Comment adjustments
2020-10-09 09:19:39 -05:00
Allen Byrne
ceaf5b264d Comment adjustments 2020-10-08 12:25:46 -05:00
Larry Knox
1a6fba9418 Merge pull request #25 from byrnHDF/develop
gitub workflow changes
2020-10-07 12:37:07 -05:00
Allen Byrne
5fd179dbcd Remove obsolete file 2020-10-07 10:15:31 -05:00
Allen Byrne
9c78cc4541 Merge remote-tracking branch 'origin/develop' into develop 2020-10-07 08:33:34 -05:00
Allen Byrne
087fc700c2 Update code owners 2020-10-07 08:28:19 -05:00
Quincey Koziol
66bcfd97a8 Update reformatting settings, trace wrapping, and printf-format strings (#22)
* Add BEGIN_FUNC / CATCH / END_FUNC to macros

* Remove incorrect trailing '{'

* Update trace script to wrap H5TRACE macros at 110 characters and improve
comments for code that performs this operation.

* Clean up printf-formatting in H5public.h and correct some oversights in the code.

* Reformat with BEGIN_FUNC / END_FUNC handled correctly by clang-format

* Run clang-format on changes.

* Correct H5_SIZEOF_HSIZE_T/H5_SIZEOF_HSSIZE_T macros to match typedef.

* And make the undef value match also.

* Update comment

* Update clang-format actions to exclude generated files.

* Post-process generated H5LTparse.h file as well as H5LTparse.c file.

* Fix formatting

* Update version of github clang-format action
2020-10-06 17:37:42 -05:00
Allen Byrne
cd82c1904c Merge branch 'develop' of https://github.com/HDFGroup/hdf5.git into develop 2020-10-06 16:01:05 -05:00
Allen Byrne
937219e7af Update for minimum of two owners 2020-10-06 12:36:11 -05:00
Larry Knox
629415232d Correct entries related to --enable-build-mode and --enable-profiling in
INSTALL file, and remove obsolete SZIP paragraph from COPYING file.
2020-10-06 12:01:01 -05:00
Allen Byrne
ff1edd709a github environment variable change 2020-10-06 11:59:58 -05:00
Allen Byrne
c0e087a65a Fix VFD h5repacktest (#20)
* h5repacktest VFD fix and formatting changes

* Fix memory leak in H5PL__find_plugin_in_path

When encountering a directory, the current loop iteration was skipped
without freeing the memory allocated for the path.

* Refactor parser GCC diagnostic statements

* genparser on jelly with default bison/flex

Co-authored-by: Michael Kuhn <michael.kuhn@ovgu.de>
2020-10-06 11:56:59 -05:00
Allen Byrne
a8e0fc5f0c genparser on jelly with default bison/flex 2020-10-06 10:23:18 -05:00
Allen Byrne
74c066c2c7 Refactor parser GCC diagnostic statements 2020-10-06 09:02:33 -05:00
Larry Knox
2384233b73 Merge pull request #15 from lrknox/develop
Correct entries related to --enable-build-mode and --enable-profiling in
2020-10-05 17:02:49 -05:00
Michael Kuhn
4c6f59d273 Fix memory leak in H5PL__find_plugin_in_path
When encountering a directory, the current loop iteration was skipped
without freeing the memory allocated for the path.
2020-10-05 14:22:47 -05:00
Allen Byrne
f8cd74af65 h5repacktest VFD fix and formatting changes 2020-10-05 14:21:58 -05:00
Larry Knox
ae0f6f25cd Merge pull request #12 from byrnHDF/develop
HDFFV-11096 fix typo in h5dump usage text
2020-10-05 13:37:08 -05:00
Larry Knox
5631b2e3fb Merge pull request #16 from michaelkuhn/fix-plugin-path-leak
Fix memory leak in H5PL__find_plugin_in_path
2020-10-05 09:31:08 -05:00
Michael Kuhn
f57cc4a702 Fix memory leak in H5PL__find_plugin_in_path
When encountering a directory, the current loop iteration was skipped
without freeing the memory allocated for the path.
2020-10-05 15:27:24 +02:00
Allen Byrne
e01430ec56 HDFFV-11096 replace backticks with doublequotes 2020-10-04 11:46:42 -05:00
Larry Knox
4ad5597525 Correct entries related to --enable-build-mode and --enable-profiling in
INSTALL file, and remove obsolete SZIP paragraph from COPYING file.
2020-10-03 15:32:57 -05:00
Allen Byrne
31773b7c48 HDFFV-11096 fix typo in h5dump usage text 2020-10-03 08:21:40 -05:00
Larry Knox
9df906126f Merge pull request #11 from byrnHDF/develop
Add mingw define
2020-10-03 07:01:03 -05:00
Allen Byrne
13d81d2dff Add mingw define 2020-10-02 13:35:09 -05:00
Allen Byrne
58d8eae182 Merge pull request #2917 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '1a4c5cc22c0f8aac568f39e67d695d906cf17c87':
  Actions updates
2020-10-02 11:11:38 -05:00
Allen Byrne
1a4c5cc22c Actions updates 2020-10-02 10:20:28 -05:00
Larry Knox
4b01ab73cc Merge pull request #2906 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'b2d661b508a7fc7a2592c13bc6bdc175551f075d':
  Clang-format of source files
2020-10-02 10:11:11 -05:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
Allen Byrne
29ab58b58d Merge pull request #2905 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '3f15fb35222a0fb2ba2f1f88a2d78daaea633ec8':
  Fix jni with %Lg instead of %Lf
  Pre-format fixes for warnings as errors
2020-09-29 20:03:03 -05:00
Allen Byrne
3f15fb3522 Fix jni with %Lg instead of %Lf
Fix warnings due to improper formed define tag in h5diff
2020-09-29 11:42:17 -05:00
Allen Byrne
274cd0ba1d Pre-format fixes for warnings as errors 2020-09-29 10:24:49 -05:00
David Young
14851e3b82 Merge pull request #2650 in HDFFV/hdf5 from ~DYOUNG/werror:rebased-fprintf-experiment to develop
* commit 'c0fbc5c086566d5d3c1d1ef26baa81a53d59fc08': (24 commits)
  Use the right format string, "%zu", for size_t.
  Repair more format strings.
  Fix a bunch of format string errors reported by Larry.
  Fix some HDfprintf compilation errors: use the right format strings ("zu", PRIuHSIZE), avoid casting some printf arguments, pass the right number of arguments.
  Test the format string "ll" before "l", "L", and "q", like the ./configure script does.  This ought to fix the compilation failure in test/dt_arith.c that Allen told me about:
  Cast a non-void pointer to void pointer for "%p".
  Use PRIu32 and "zu" formats.  Delete some casts from `size_t`.
  I'm taking a guess that this code intended to point the 2-digit wide hexadecimal octet values, not 2 character-wide pointers to the bytes.  The %02p format, which is a GNU-ism, disagreed with GCC 8.3.0 and the option flags we use.
  %08p is not portable, it's a GNU-ism.  Use %8p, instead.  Squashes a GCC error.
  Add format string macros PRI[doxX]HID for hid_t and use PRIdHID.
  Use HDva_copy() and introduce a bunch of compatbility format-string constants for uppercase hexadecimal strings, `PRIX...`.  Should fix the VS2010 errors that Allen mentioned:
  Always #define HDfprintf as fprintf in this header.  I believe this will fix the Windows build error that Allen reported.
  Provide an HDvasprintf implementation only if it isn't #defined.  This should fix the mingw compilation issue that Allen reported.
  Fix va_list usage in the vasprintf(3) implementation.
  Promote format-string warnings to errors.
  Use the portable `-eq` operator instead of the bash-ism `==`. Fixes the tests on NetBSD, where /bin/sh != bash.
  Restore a literal percent sign ("%%") that I accidentally deleted.
  Fix code that made GCC complain about a NULL or `unsigned char *` arguments for "%s".
  Take pains to provide UINT64_MAX in all conditions.
  Correct a couple of format strings.
  ...
2020-09-28 14:42:18 -05:00
Allen Byrne
8ee8b7abb5 Merge pull request #2902 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '088014bef4216eede409d103876a9fd3efadd358':
  More info for building plugins with library
  Remove setting from cacheinit file
  OESS-98 add release note for option
  OESS-98 merge with clang-format changes
2020-09-28 10:55:19 -05:00
Allen Byrne
088014bef4 More info for building plugins with library 2020-09-28 09:41:43 -05:00
Allen Byrne
e7fbeb2e8c Remove setting from cacheinit file 2020-09-28 07:20:42 -05:00
David Young
c0fbc5c086 Use the right format string, "%zu", for size_t. 2020-09-27 15:07:12 -05:00
David Young
08034972bc Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-27 15:03:44 -05:00
Allen Byrne
9941e4b1ae OESS-98 add release note for option 2020-09-27 11:46:58 -05:00
David Young
d20e1274a7 Repair more format strings. 2020-09-25 20:03:20 -05:00
Allen Byrne
ff0881f35b OESS-98 merge with clang-format changes 2020-09-25 16:43:57 -05:00
Allen Byrne
aa08db839e Merge pull request #2882 in HDFFV/hdf5 from ~BYRN/hdf5_adb:feature/cmakeV2-clang-format to develop
* commit '571a5e9250ca69adb54ef956361a5cf77059f67c':
  Add h5ls test plugin format target
  Fix manifest
  Add code owners file
  Update actions - split push/pull-request commits
  Change to executable
  Change to based on LLVM format
  Fix comment formatting due to tabs conversion
  Disable formatting for file
  File changes to affect formatting
  CMake and script changes for clang-format
2020-09-25 16:11:52 -05:00
David Young
5f0bb85813 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-25 15:34:39 -05:00
Allen Byrne
571a5e9250 Add h5ls test plugin format target 2020-09-25 14:16:56 -05:00
David Young
f8652be7fb Fix a bunch of format string errors reported by Larry. 2020-09-25 11:43:15 -05:00
David Young
6486892de5 Fix some HDfprintf compilation errors: use the right format strings
("zu", PRIuHSIZE), avoid casting some printf arguments, pass the right
number of arguments.
2020-09-24 16:34:51 -05:00
Allen Byrne
fae9d938d3 Fix manifest 2020-09-24 15:29:49 -05:00
Allen Byrne
03bbf36114 Add code owners file 2020-09-24 15:05:04 -05:00
Allen Byrne
f71e74f4e4 Update actions - split push/pull-request commits 2020-09-24 13:52:24 -05:00
Allen Byrne
6b14627330 Change to executable 2020-09-24 12:36:25 -05:00
Allen Byrne
eba2e66a87 Change to based on LLVM format 2020-09-24 12:35:54 -05:00
Jordan Henderson
cdc4b8a0fb Merge pull request #2898 in HDFFV/hdf5 from ~JHENDERSON/hdf52:develop to develop
* commit '739cd5723fe3435818075481687770996af42ef5':
  Fix memory sanity check option in CMake
2020-09-24 11:05:33 -05:00
Allen Byrne
a117ac6cae Fix comment formatting due to tabs conversion 2020-09-24 09:57:21 -05:00
Jordan Henderson
739cd5723f Fix memory sanity check option in CMake 2020-09-23 18:23:14 -05:00
Jordan Henderson
c4b1693f8e Merge pull request #2895 in HDFFV/hdf5 from ~JHENDERSON/hdf52:develop to develop
* commit 'c15f8674d9600c72b33823c55587051cf66811ef':
  Free selection type-specific info when resetting selection iterators
2020-09-23 18:16:04 -05:00
Jordan Henderson
c15f8674d9 Free selection type-specific info when resetting selection iterators 2020-09-23 09:37:35 -05:00
Jordan Henderson
febc343e7e Merge pull request #2891 in HDFFV/hdf5 from ~JHENDERSON/hdf52:develop to develop
* commit '9b3a3445dbb72a95b2b9355e0196efdaa5b0f452':
  Add release note for new H5Ssel_iter_reset function
  Add H5Ssel_iter_init API call to reset a selection iterator
2020-09-21 18:39:35 -05:00
Jordan Henderson
9b3a3445db Add release note for new H5Ssel_iter_reset function 2020-09-18 13:31:50 -05:00
Jordan Henderson
ce0f87fb35 Add H5Ssel_iter_init API call to reset a selection iterator 2020-09-18 00:12:37 -05:00
David Young
cd1d772f35 Test the format string "ll" before "l", "L", and "q", like the
./configure script does.  This ought to fix the compilation failure
in test/dt_arith.c that Allen told me about:

/home/buildbot/bb-workers/centos8-vm01/hdf5trunk-StdShar-code-centos8/build/hdfsrc/test/dt_arith.c: In function ‘test_conv_int_1’:
/home/buildbot/bb-workers/centos8-vm01/hdf5trunk-StdShar-code-centos8/build/hdfsrc/test/dt_arith.c:2500:34: error: format ‘%ld’ expects argument of type ‘long  int’, but argument 3 has type ‘long long int’ [-Werror=format=]
                 HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"d\n", *((long long*)aligned));
2020-09-17 16:00:27 -05:00
Allen Byrne
01482d93d4 Disable formatting for file 2020-09-05 18:21:58 -05:00
Allen Byrne
d8d17d2328 File changes to affect formatting 2020-09-04 16:51:30 -05:00
Larry Knox
9eaeac2e1b Merge pull request #2874 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '6b71d6dc9453e8f94ac82732496ee59ca6495587':
  Add zllib and szip pages
  Correct COPYING path
2020-09-04 16:49:36 -05:00
Allen Byrne
30c7264c2c CMake and script changes for clang-format 2020-09-04 16:36:52 -05:00
Allen Byrne
6b71d6dc94 Add zllib and szip pages 2020-09-04 15:44:33 -05:00
Allen Byrne
91213082b5 Correct COPYING path 2020-09-04 08:07:30 -05:00
David Young
f796cd3c78 Cast a non-void pointer to void pointer for "%p". 2020-09-03 16:44:31 -05:00
David Young
d85cd245d2 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-03 16:13:47 -05:00
Quincey Koziol
b3a89155b9 Merge pull request #2866 in HDFFV/hdf5 from fix_nil_collective_metadata_write to develop
* commit '45021f1826f3710a3008430ddf7216bffb7068f7':
  Update buffer count
  Revert PR 405 (https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/pull-requests/405/overview) and reimplement with correct and simpler code.
  Revert "    Checkin of fix for CGNS bug"
  Revert "Removed commeted out code from H5C_dump_coll_write_list()"
2020-09-02 17:02:57 -05:00
Quincey Koziol
0f60e7e576 Merge pull request #2843 in HDFFV/hdf5 from vol_dataset_io_dxpl_fix to develop
* commit '4b69577e10ed58bf6536599092390f02a49ff3f9':
  Bug fix to allow pass-through VOL connectors to set DXPL properties (like requesting collective operations) on dataset I/O
2020-09-02 08:14:54 -05:00
Quincey Koziol
45021f1826 Update buffer count 2020-08-28 18:03:08 -05:00
Quincey Koziol
500cbbb71c Merge remote-tracking branch 'origin/develop' into fix_nil_collective_metadata_write 2020-08-28 11:17:04 -05:00
Quincey Koziol
165c454aa7 Revert PR 405 (https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/pull-requests/405/overview)
and reimplement with correct and simpler code.
2020-08-27 18:18:44 -05:00
Quincey Koziol
72b9b8ca75 Revert " Checkin of fix for CGNS bug"
This reverts commit 94c34773ce.
2020-08-27 18:11:19 -05:00
Quincey Koziol
c9f15824fe Revert "Removed commeted out code from H5C_dump_coll_write_list()"
This reverts commit eb75dc1bb0.
2020-08-27 18:01:11 -05:00
Dana Robinson
3a2fd09941 Merge pull request #2863 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '49e01e594eb2d0c25455e7ff71eed3de074fd15b':
  Adds RELEASE.txt note about HDFS VFD stubs being removed
  Removes inappropriate file locking call
  Trivial whitespace change to H5Pencdec.c
  Minor refactoring based on 1.10 normalization work
  Trivialities noticed while normalizing 1.10
2020-08-27 14:42:23 -05:00
Dana Robinson
49e01e594e Adds RELEASE.txt note about HDFS VFD stubs being removed 2020-08-27 10:54:14 -07:00
Dana Robinson
3d7a0dc6d5 Merge branch 'develop' into develop_minor 2020-08-27 10:36:03 -07:00
Allen Byrne
a38a286be1 Merge pull request #2849 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '0932c46e3d5b09d32cbe29335e8054302ab122c5':
  MinGW uses "MinGW Makefiles"
  The version string has a second use for packaging
2020-08-26 14:23:07 -05:00
Allen Byrne
0932c46e3d MinGW uses "MinGW Makefiles" 2020-08-26 10:17:21 -05:00
Allen Byrne
3f65adefd9 The version string has a second use for packaging 2020-08-26 09:03:43 -05:00
Quincey Koziol
4b69577e10 Bug fix to allow pass-through VOL connectors to set DXPL properties (like requesting collective operations) on dataset I/O 2020-08-25 18:20:27 -05:00
Allen Byrne
b4f4bd1d4c Merge pull request #2839 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '336b30024216b142eb096bf85986786ecf65e993':
  Add back function for VERIFY_EXTERNAL_CONSOLIDATION
2020-08-25 11:40:31 -05:00
Allen Byrne
336b300242 Add back function for VERIFY_EXTERNAL_CONSOLIDATION 2020-08-25 11:19:12 -05:00
Allen Byrne
e672014f29 Merge pull request #2826 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'ec1c324a0d184d2778e9155140367a7d3a307fa1':
  Revert H5_VERS_SUBRELEASE check
  Add special case when H5_VERS_SUBRELEASE is 0
  Condition if (H5_VERS_SUBRELEASE) is incorrectly false when H5_VERS_SUBRELEASE is 0, a valid value for H5_VERS_SUBRELEASE. Updated to if (${H5_VERS_SUBRELEASE} STREQUAL "") with corresponding reversal of action statements to avoid NOT.
  Add hypen to subrelease regex
  Fix S3/HDFS test
2020-08-24 08:07:50 -05:00
Allen Byrne
ec1c324a0d Revert H5_VERS_SUBRELEASE check 2020-08-24 08:01:01 -05:00
Allen Byrne
9765b7ff30 Add special case when H5_VERS_SUBRELEASE is 0 2020-08-24 06:55:00 -05:00
Larry Knox
9b63dcb5c8 Condition if (H5_VERS_SUBRELEASE) is incorrectly false when
H5_VERS_SUBRELEASE is 0, a valid value for H5_VERS_SUBRELEASE.
Updated to if (${H5_VERS_SUBRELEASE} STREQUAL "") with corresponding
reversal of action statements to avoid NOT.
2020-08-24 00:32:48 -05:00
Allen Byrne
4d5354afcd Add hypen to subrelease regex 2020-08-23 14:58:09 -05:00
Allen Byrne
2ac49e2fec Fix S3/HDFS test 2020-08-23 14:05:19 -05:00
Quincey Koziol
a9ffedfd61 Merge pull request #2819 in HDFFV/hdf5 from coll_chunk_fill_fix to develop
* commit '4c43ff0b8b015ccfc1f4aeab18f189d629a5beb9':
  Simplify default use of MPI_BYTE
  Don't free builtin MPI_BYTE MPI type
  Simplify code to avoid using a boolean to free MPI types
  Avoid creating MPI datatypes on ranks with 0 chunks to write'
2020-08-21 16:17:10 -05:00
Quincey Koziol
4c43ff0b8b Simplify default use of MPI_BYTE 2020-08-20 18:24:07 -05:00
Quincey Koziol
fa0d395370 Don't free builtin MPI_BYTE MPI type 2020-08-20 18:22:39 -05:00
Quincey Koziol
d67de87ecd Simplify code to avoid using a boolean to free MPI types 2020-08-20 17:08:24 -05:00
Quincey Koziol
91bd6f9a63 Avoid creating MPI datatypes on ranks with 0 chunks to write' 2020-08-20 14:31:35 -05:00
Larry Knox
6d73a778c6 Merge pull request #2816 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop
* commit '76d93a78fe583b99efa295cd44359092310172a3':
  Revert "Merge pull request #2796 in HDFFV/hdf5 from small_chunk_io_opt to develop"
2020-08-20 11:05:41 -05:00
Larry Knox
76d93a78fe Revert "Merge pull request #2796 in HDFFV/hdf5 from small_chunk_io_opt to develop"
This reverts commit a7a8e6451a, reversing
changes made to 30422a6b55.
2020-08-20 10:57:29 -05:00
Quincey Koziol
a7a8e6451a Merge pull request #2796 in HDFFV/hdf5 from small_chunk_io_opt to develop
* commit 'ad9a2ceabe2dd9045111f8b57774948a124607b9':
  Only initialize the contiguous or compact I/O info struct when needed.
2020-08-19 16:56:20 -05:00
Larry Knox
30422a6b55 Merge pull request #2806 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop
* commit '98754591b8dcf2be70957d67ec7172c53cbaa827':
  Revert "Merge pull request #2477 in HDFFV/hdf5 from pio_update to develop"
2020-08-18 13:31:46 -05:00
Larry Knox
98754591b8 Revert "Merge pull request #2477 in HDFFV/hdf5 from pio_update to develop"
This reverts commit ba80bcaff2, reversing
changes made to 522ef0dd5c.
2020-08-18 12:51:13 -05:00
Larry Knox
18012b1d98 Merge pull request #2801 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:swmr_test_fail_cmake to develop
* commit '857e0f4404cb5a754d799110b89f0f16b503b4ce':
  Fixes CMake issue with file locking variable
2020-08-18 08:20:41 -05:00
Dana Robinson
857e0f4404 Fixes CMake issue with file locking variable 2020-08-18 06:18:23 -07:00
Larry Knox
3f5382bb62 Merge pull request #2795 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr2020:hdf5_bmr2020_addrsani to develop
* commit '5352b1dbc92313d91d3502dd8352352abe8749a7':
  Fixed typo
  Fix HDFFV-11101
2020-08-18 08:03:29 -05:00
Larry Knox
ba80bcaff2 Merge pull request #2477 in HDFFV/hdf5 from pio_update to develop
* commit 'a20bf599b682bfa0a91d571a922973e0c53b524a':
  Don't track file offset position when using pread / pwrite.
2020-08-18 08:02:55 -05:00
Larry Knox
522ef0dd5c Merge pull request #2734 in HDFFV/hdf5 from ~DYOUNG/werror:cse to develop
* commit 'fa7f8ad2f3fe509ff69dc574ddad0ae4d329ccca':
  Improve code readability: extract common subexpressions into temporary variables.
2020-08-18 08:01:27 -05:00
Larry Knox
057cd67021 Merge pull request #2735 in HDFFV/hdf5 from ~DYOUNG/werror:virtual-write-one to develop
* commit '7b48e3409a8c3ba1e83c929656e84196a6dc2e6d':
  Fix a bug in H5D__virtual_write_one to stop an assertion from failing deep in H5Dwrite---project the *clipped* virtual selection instead of the virtual selection:
2020-08-18 08:00:54 -05:00
Dana Robinson
f4d03432a4 Removes inappropriate file locking call 2020-08-18 05:53:33 -07:00
Binh-Minh Ribler
5352b1dbc9 Fixed typo 2020-08-17 22:37:26 -05:00
Dana Robinson
e9ee2d9906 Trivial whitespace change to H5Pencdec.c 2020-08-17 16:37:53 -07:00
Quincey Koziol
ad9a2ceabe Only initialize the contiguous or compact I/O info struct when needed. 2020-08-17 18:29:55 -05:00
Dana Robinson
433078bc80 Merge pull request #2794 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:h5f_start_swmr_write_locks_dev2 to develop
* commit 'f02ced7e7443563581930a6c2d58d1628608bbdd':
  Moves lock flag to H5F_shared_t and adds test.
  Adds fix for H5Fstart_swmr_write lock issue
2020-08-17 18:02:34 -05:00
Binh-Minh Ribler
5bb893a2c2 Fix HDFFV-11101
Description
    Added initialization to local structs in the src function
    H5MF_settle_raw_data_fsm() and the test function test_bt2_hdr_fd()
    to prevent the following error in two different occurrences:
        MemorySanitizer: use-of-uninitialized-value
Platforms tested:
    Linux/64 (jelly)
    Linux/64 (platypus)
2020-08-17 17:51:15 -05:00
Dana Robinson
f02ced7e74 Moves lock flag to H5F_shared_t and adds test. 2020-08-17 14:25:04 -07:00
Dana Robinson
32a1188bbd Adds fix for H5Fstart_swmr_write lock issue 2020-08-17 10:54:07 -07:00
Dana Robinson
b2d917437d Minor refactoring based on 1.10 normalization work 2020-08-17 09:12:59 -07:00
Dana Robinson
d53c9be189 Merge branch 'develop' into develop_minor 2020-08-17 09:00:42 -07:00
John Mainzer
5d8c5849e5 Merge pull request #2769 in HDFFV/hdf5 from mdc_sl_opt to develop
* commit 'd00bab96fb4da12a18b5de528c96469978c4c927':
  Minor copy edits to comments -- no code changes.
  Tab to space conversions.
  When flushing, the metadata cache attempts to flush entries in increasing address order.  To facilitate this, the metadata cache needs a list of of dirty entries in increasing address order.  This is implemented via a skip list of all dirty entries in the cache.
2020-08-17 08:25:05 -05:00
mainzer
d00bab96fb Minor copy edits to comments -- no code changes. 2020-08-17 08:19:33 -05:00
Larry Knox
0f9c22edc7 Merge pull request #2784 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop
* commit '0d14414ddd860f24f1386771ed3ba8d2f5e2710d':
  1. HDFFV-10830 part 2, move AC_CHECK_HEADERS([szlib.h] after         AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress] to avoid compiling             H5Z.c with szlib.h after its path is removed from AM_CPPFLAGS. 2. Remove unnecessary links to ${HDF5_TOOLS_LIB_TARGET} in utils/mirror_vfd/CMakeLists.txt that prevent building HDF5 with tools disabled.
2020-08-16 20:57:16 -05:00
Dana Robinson
5787404804 Trivialities noticed while normalizing 1.10 2020-08-16 18:10:48 -07:00
Larry Knox
0d14414ddd 1. HDFFV-10830 part 2, move AC_CHECK_HEADERS([szlib.h] after
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress] to avoid compiling
            H5Z.c with szlib.h after its path is removed from AM_CPPFLAGS.
2. Remove unnecessary links to ${HDF5_TOOLS_LIB_TARGET} in
utils/mirror_vfd/CMakeLists.txt that prevent building HDF5 with tools
disabled.
2020-08-16 18:41:13 -05:00
Binh-Minh Ribler
24c23c79d8 Merge pull request #2771 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr:hdf5_bmr_HDFFV-10933 to develop
Fixed HDFFV-10933

* commit '16349c5fddce8a74644e18d01d7ea8186aaaa255':
  Fixed HDFFV-10933
2020-08-16 15:34:18 -05:00
Allen Byrne
f02e016372 Merge pull request #2779 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '31673041d8342002d11ced2a7def938438dd912d':
  Fix javadoc warning
2020-08-16 12:14:32 -05:00
Quincey Koziol
a20bf599b6 Merge remote-tracking branch 'origin/develop' into pio_update 2020-08-16 11:49:15 -05:00
Allen Byrne
31673041d8 Fix javadoc warning 2020-08-16 11:07:59 -05:00
Allen Byrne
c81f01d5dc Merge pull request #2776 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '6a344232f641135e6bc5f89d66a01c68d29bfa00':
  Add testfiles
  TRILABS-277 Use JIRA number as #ifdef
2020-08-15 19:47:07 -05:00
Allen Byrne
6a344232f6 Add testfiles 2020-08-15 18:10:57 -05:00
mainzer
7b9f61c157 Merge branch 'develop' into mdc_sl_opt 2020-08-15 17:53:29 -05:00
Allen Byrne
57c4aeb0cc TRILABS-277 Use JIRA number as #ifdef 2020-08-15 17:25:22 -05:00
Allen Byrne
94ae09469b Merge pull request #2768 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '2d659de898f23b78bbbb47a1dbd5ffb5d9f953a6':
  HDFFV-9984 fix test logic
  HDFFV-9984 - correct name of ref files
  HDFFV-9984 add missing ref file
  HDFFV-9984 - add missing ref files
  HDFFV-9984 Add options to merge/prune external links during repack
2020-08-15 16:30:55 -05:00
Allen Byrne
2d659de898 Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '40bf112b56c90b7e90c9ec3d7a35a78d1d12288b':
  Trivialities noticed while merging things to 1.10
2020-08-15 12:04:56 -05:00
Dana Robinson
40bf112b56 Merge pull request #2773 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'c5b176594082f6e5a8b6d9140f9db1f13530e087':
  Trivialities noticed while merging things to 1.10
2020-08-15 10:37:55 -05:00
Dana Robinson
c5b1765940 Trivialities noticed while merging things to 1.10 2020-08-15 07:32:50 -07:00
Allen Byrne
7603d2c8be HDFFV-9984 fix test logic 2020-08-14 16:39:40 -05:00
Allen Byrne
b196ddb4a8 HDFFV-9984 - correct name of ref files 2020-08-14 15:21:56 -05:00
Binh-Minh Ribler
16349c5fdd Fixed HDFFV-10933
Description:
    Updated the original fix by Kent Y. in commit
        200a77d8c3
    - used internal functions instead of public API
    - moved some code into the subroutine for a cleaner look.
    - added test to dsets.c
Platforms tested:
    Linux/64 (jelly)
2020-08-14 14:49:42 -05:00
Allen Byrne
a21ae8e56b HDFFV-9984 add missing ref file 2020-08-14 13:45:57 -05:00
Allen Byrne
646872cb8e HDFFV-9984 - add missing ref files 2020-08-14 13:45:31 -05:00
Allen Byrne
500d87fd1f HDFFV-9984 Add options to merge/prune external links during repack 2020-08-14 12:16:58 -05:00
mainzer
12bb6d7665 Tab to space conversions.
Re-applied tab to space conversions accidentally reverted in the
commit of the metadata cache skip list optimization, and performed
some additional tab to space conversions in passing.

Tested parallel / debug on Jelly.
2020-08-14 12:16:47 -05:00
Dana Robinson
044ee6f88c Merge pull request #2765 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '3feeb8ec20a7b08acdcd77f3e10c8c93818d890e':
  Fixes naming issues in H5VM inline functions
2020-08-14 08:57:32 -05:00
Dana Robinson
3feeb8ec20 Fixes naming issues in H5VM inline functions 2020-08-14 06:32:58 -07:00
Elena Pourmal
6b347a8d97 Merge pull request #2753 in HDFFV/hdf5 from ~EPOURMAL/hdf5_ep:develop to develop
* commit 'c6248cfb6975a6ecadf0259390247ce05dc13c4b':
  Addresseda Dana's comments from the pull request.
  Fixed several typos in the comments found by Larry during the review.
  The H5DSis_scale function was updated to return "not a dimension scale" (0) instead of failing (-1), when CLASS or DIMENSION_SCALE attributes are not written according to Dimension Scales Specification (HDFFV-10436).
2020-08-14 07:29:40 -05:00
Elena
c6248cfb69 Addresseda Dana's comments from the pull request. 2020-08-13 19:33:51 -05:00
Quincey Koziol
7524ead1e4 Merge pull request #2744 in HDFFV/hdf5 from remove_unneeded_tagging to develop
* commit 'cb5de74ac26158f6f541eed2e0dddb50d4d197d6':
  Remove redundant calls to set the metadata cache tag
2020-08-13 19:03:55 -05:00
Quincey Koziol
cb5de74ac2 Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-13 19:03:16 -05:00
Quincey Koziol
4f9542c332 Merge pull request #2739 in HDFFV/hdf5 from namespace_cleanup_01 to develop
* commit '3f46a380e084d83a84783383bdfbbd9a443e9f27':
  Correct typos w/HGOTO_DONE & HGOTO_ERROR
  Move H5T_vlen_reclaim to package scope
  Switch H5VM inline routines back to single underscope and put a comment in their header about this naming
  Clean up private / package / static namespace issues (function naming, which 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.
2020-08-13 19:00:56 -05:00
Dana Robinson
8dabc3f67f Merge pull request #2762 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'b806f3e9acad6261438dacecbb11a87bcd644e72':
  Tweak to hide unused threadsafe callback in non-threadsafe builds
2020-08-13 13:43:14 -05:00
Dana Robinson
b806f3e9ac Tweak to hide unused threadsafe callback in non-threadsafe builds 2020-08-13 10:13:18 -07:00
mainzer
3202416936 Merge branch 'develop' into mdc_sl_opt 2020-08-13 11:31:16 -05:00
Allen Byrne
e291fd31fd Merge pull request #2756 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'c5cb9534b27760596bfd0c4cdf1db31fd2bac2a7':
  spelling
  HDFFV-11127 - force RTLD_LOCAL in dlopen
2020-08-13 06:26:08 -05:00
Allen Byrne
c5cb9534b2 Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'baf7ebc4ca4eeecb11a607f420a5d5b95169eed5':
  Cleans warnings and cruft from ttsafe_attr_vlen.c
  Fixes Windows issues due to exposed pthread code
2020-08-13 06:25:44 -05:00
Allen Byrne
747fde00fe spelling 2020-08-13 06:22:50 -05:00
Dana Robinson
baf7ebc4ca Merge pull request #2760 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:ttsafe_windows_fix to develop
* commit '04b24163f7f08248a58d256371e088c8cc7816c8':
  Cleans warnings and cruft from ttsafe_attr_vlen.c
  Fixes Windows issues due to exposed pthread code
2020-08-12 21:55:13 -05:00
Dana Robinson
04b24163f7 Cleans warnings and cruft from ttsafe_attr_vlen.c 2020-08-12 15:21:38 -07:00
Dana Robinson
037bad4f72 Fixes Windows issues due to exposed pthread code 2020-08-12 15:07:15 -07:00
Allen Byrne
cecaed97f7 HDFFV-11127 - force RTLD_LOCAL in dlopen 2020-08-12 16:14:44 -05:00
Elena
752411bfda Fixed several typos in the comments found by Larry during the review. 2020-08-12 15:19:41 -05:00
Dana Robinson
7dcd7830ae Merge pull request #2754 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:testhdf5_ref_valgrind to develop
* commit '4f0283db788fc1a0db94e7825567210021b3b594':
  Fixes a size mismatch when copying old-style to new-style references
  Fixes memory leads in trefer.c
2020-08-12 13:54:09 -05:00
Dana Robinson
4f0283db78 Fixes a size mismatch when copying old-style to new-style references 2020-08-12 11:38:04 -07:00
Dana Robinson
ed51c0e302 Fixes memory leads in trefer.c 2020-08-12 09:52:10 -07:00
Quincey Koziol
f2681e36ae Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-12 11:17:52 -05:00
Quincey Koziol
3f46a380e0 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-12 11:17:27 -05:00
Elena
69cbfd4f9e Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~epourmal/hdf5_ep into develop 2020-08-12 08:53:45 -05:00
Elena
768f8abb18 The H5DSis_scale function was updated to return "not a dimension scale" (0)
instead of failing (-1), when CLASS or DIMENSION_SCALE attributes are
not written according to Dimension Scales Specification (HDFFV-10436).
2020-08-12 08:40:11 -05:00
Dana Robinson
dca1733238 Merge pull request #2752 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '78c6be05a84f854074a4df2e10c15a56444e4015':
  Fixes the splitter VFD test on Windows.
2020-08-12 08:03:11 -05:00
Dana Robinson
78c6be05a8 Fixes the splitter VFD test on Windows. 2020-08-11 17:46:54 -07:00
Quincey Koziol
4083be1ff2 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-11 06:36:41 -05:00
Binh-Minh Ribler
1008afc457 Merge pull request #2746 in HDFFV/hdf5 from bmr_HDFFV-10591-2 to develop
Part of HDFFV-10591 fix.

* commit 'f863d4f970c2f54298a69f95bb6a15e710e1ed75':
  Addition to HDFFV-10591
2020-08-10 21:56:57 -05:00
Jordan Henderson
af390794f4 Merge pull request #2655 in HDFFV/hdf5 from ~JHENDERSON/hdf5:develop to develop
* commit '7c3d4402d730789173e413b48951fede5f6932f3':
  Fix issue in H5VL_wrap_register where datatype VOL objects are casted to H5T_t *
2020-08-10 17:36:07 -05:00
Quincey Koziol
c48d1b0ff4 Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-10 13:15:13 -05:00
Quincey Koziol
98c184e130 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-10 13:14:02 -05:00
Quincey Koziol
79a2e34f88 Correct typos w/HGOTO_DONE & HGOTO_ERROR 2020-08-10 12:58:20 -05:00
Dana Robinson
c0ff30d239 Merge pull request #2748 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:flock_windows_fix to develop
* commit '0ed65346033e7fbc71634d4911f9761e2ec145b2':
  Fixes flock Windows failure
2020-08-10 11:03:35 -05:00
Binh-Minh Ribler
f863d4f970 Addition to HDFFV-10591
Description
    Added missing parameter description and improved format.
Platforms tested:
    Linux/64 (jelly)
2020-08-09 18:13:42 -05:00
Quincey Koziol
e1a7a1acbe Remove redundant calls to set the metadata cache tag 2020-08-08 08:44:34 -05:00
Dana Robinson
0d69520c70 Merge pull request #2741 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'a975a8d0eb3244d1a08afc80133a12279d1f90e5':
  Removes unsuffixed float warnings
2020-08-07 16:29:30 -05:00
Dana Robinson
0ed6534603 Fixes flock Windows failure 2020-08-07 12:40:04 -07:00
Dana Robinson
a975a8d0eb Removes unsuffixed float warnings
These warnings can only be addressed with gnu extensions.
2020-08-07 11:50:22 -07:00
Quincey Koziol
5f6eec0b20 Move H5T_vlen_reclaim to package scope 2020-08-07 11:08:19 -05:00
Quincey Koziol
a2340cec3b Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-07 10:06:34 -05:00
Dana Robinson
51ab52ad42 Merge pull request #2740 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:code_tidy to develop
* commit '5ce2a178043d9749d30076a2e62249d9998c40ec':
  Removes staff email addresses from the repository Removes redundant C library headers from hl library
2020-08-07 00:23:53 -05:00
Dana Robinson
5ce2a17804 Removes staff email addresses from the repository
Removes redundant C library headers from hl library
2020-08-06 17:58:07 -07:00
Dana Robinson
72363de1c0 Merge pull request #2730 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:file_locking_squash_2 to develop
* commit '47ad0ac7237b464e939fe54dd129a151944d9706':
  Renames BEST-EFFORT to BEST_EFFORT for file locking env var
  Updated the file locking Fortran property list wrappers and added a test.
  Fixed missing parens in VFDs
  Minor change to header comments in file locking C++ changes.
  Squash merge of file locking fixes
2020-08-06 18:31:41 -05:00
Quincey Koziol
8fe3cece3c Switch H5VM inline routines back to single underscope and put a comment in their header about this naming 2020-08-06 17:46:40 -05:00
Dana Robinson
47ad0ac723 Renames BEST-EFFORT to BEST_EFFORT for file locking env var 2020-08-06 15:09:59 -07:00
Dana Robinson
7391f5f26c Merge branch 'develop' into file_locking_squash_2 2020-08-06 15:08:28 -07:00
Quincey Koziol
07e4ef9da4 Clean up private / package / static namespace issues (function naming, which
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.
2020-08-06 15:56:04 -05:00
Jerome Soumagne
302dfeb11b Merge pull request #2715 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5:fix_vlen_ref to develop
* commit 'ef6db167a86e6c065d46963dbd75cd325fe83813':
  H5R: fix encoding of references that are part of compound types
2020-08-06 14:22:29 -05:00
Dana Robinson
ee274b97f8 Merge pull request #2738 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '91ca481ff152e7a6b0326fcdb59e506141d2d32a':
  Reverts H5FDsplitter.c changes so they don't conflict with Quincey's big cleanup patch
  Fixes -Wnull-dereference warnings around the cache logging calls
  Fixes -Wnull-dereference warning in hl/src/H5DS.c
  Adds -Wnull-dereference to the warnings we ignore in flex/bison generated code (that we have no control over).
  Fixes warnings in the splitter VFD and tests
2020-08-06 14:11:16 -05:00
Dana Robinson
91ca481ff1 Reverts H5FDsplitter.c changes so they don't conflict with Quincey's
big cleanup patch
2020-08-06 08:41:27 -07:00
Dana Robinson
bd6f3bcdab Fixes -Wnull-dereference warnings around the cache logging calls 2020-08-05 23:14:40 -07:00
Dana Robinson
b1c78579da Fixes -Wnull-dereference warning in hl/src/H5DS.c 2020-08-05 22:56:15 -07:00
Dana Robinson
e327843f7a Adds -Wnull-dereference to the warnings we ignore in flex/bison
generated code (that we have no control over).
2020-08-05 22:51:34 -07:00
Dana Robinson
8e7f3e38a7 Fixes warnings in the splitter VFD and tests 2020-08-05 22:13:38 -07:00
Dana Robinson
482ade4657 Merge pull request #2737 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '65e92e1d56dd2e04ebe7b7713fee9e9e38cd8849':
  Warning fixes in tools and h5test.c
2020-08-05 21:35:41 -05:00
Dana Robinson
65e92e1d56 Warning fixes in tools and h5test.c 2020-08-05 17:15:57 -07:00
mainzer
33f35183cb When flushing, the metadata cache attempts to flush entries in increasing
address order.  To facilitate this, the metadata cache needs a list of
of dirty entries in increasing address order.  This is implemented via a
skip list of all dirty entries in the cache.

To date this skip list has been maintained at all times.

However, profiling indicates that we can avoid significant overhead by
constructing the skip list of dirty entries just before a flush, taking
it down afterwareds, and not maintaining it during normal operation.

This commit implements this optimization for both serial and parallel.

Tested serial and parallel, debug and production on charis and jelly.
2020-08-05 15:39:49 -05:00
Jordan Henderson
7c3d4402d7 Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'f59bb712dec221a076728b6c582818bcf814d71a': (55 commits)
  Fixes indenting in tools test scripts
  Minor normalizations with 1.12 branch
  Fixed bad parens in H5trace.c
  Minor normalizations with hdf5_1_10
  Mingw copy disabled
  Warnings reduction in tools
  Correct reference file
  Correct h5diff filenames
  Fixed typos in error messages.
  Updated the Java tests to deal with H5Sset_extent_none changes
  Fixed additional typos in tselect.c comments.
  Fixes typo in tselect.c
  Updates H5Sset_extent_none() to set H5S_NULL
  Only one line needed to compare
  Revert err file
  Minor normalization with 1.10 branch
  Fix HDFFV-11120 and HDFFV-11121 (CVE-2018-13870 and CVE-2018-13869)
  revert error-stack enable
  Minor normalization with 1.10.
  Add release notes for tools
  ...
2020-08-04 20:43:37 -05:00
David Young
7b48e3409a Fix a bug in H5D__virtual_write_one to stop an assertion from failing
deep in H5Dwrite---project the *clipped* virtual selection instead of
the virtual selection:

assertion "((src_space)->select.num_elem) == ((dst_space)->select.num_elem)"
failed: file "../../../vchoi_fork/src/H5Sselect.c", line 2617, function
"H5S_select_project_intersection"

with this backtrace:

    at /home/dyoung/plain-nbsd/src/lib/libc/gen/raise.c:48
    at /home/dyoung/plain-nbsd/src/lib/libc/stdlib/abort.c:74
    file=0xae9e3e80 "../../../vchoi_fork/src/H5Sselect.c", line=2617,
    function=0xae9e4ca0 <__func__.15686> "H5S_select_project_intersection",
    failedexpr=0xae9e0e54 "((src_space)->select.num_elem) ==
((dst_space)->select.num_elem)") at
/home/dyoung/plain-nbsd/src/lib/libc/gen/assert.c:72
    dst_space=0xae26f0dc, src_intersect_space=0xae0b577c,
    new_space_ptr=0xbfb85fac, share_selection=true)
    at ../../../vchoi_fork/src/H5Sselect.c:2749
    type_info=type_info@entry=0xbfb86084,
    file_space=file_space@entry=0xae0b577c, source_dset=0xae24741c,
    io_info=<optimized out>) at ../../../vchoi_fork/src/H5Dvirtual.c:2784
    type_info=0xbfb86084, nelmts=256, file_space=0xae0b577c,
    mem_space=0xae26ec8c, fm=0xadf0401c)
    at ../../../vchoi_fork/src/H5Dvirtual.c:2873
    mem_type_id=216172782113783837, mem_space=0xae26ec8c,
    file_space=0xae0b577c, buf=0xae203808)
    at ../../../vchoi_fork/src/H5Dio.c:780
    mem_type_id=216172782113783837, mem_space_id=288230376151711754,
    file_space_id=288230376151711755, dxpl_id=792633534417207304,
    buf=0xae203808, req=0x0)
    at ../../../vchoi_fork/src/H5VLnative_dataset.c:206
    mem_type_id=216172782113783837, mem_space_id=288230376151711754,
    file_space_id=288230376151711755, dxpl_id=792633534417207304,
    buf=0xae203808, req=0x0, cls=<optimized out>)
    at ../../../vchoi_fork/src/H5VLcallback.c:2152
    mem_type_id=216172782113783837, mem_space_id=288230376151711754,
    file_space_id=288230376151711755, dxpl_id=792633534417207304,
    buf=0xae203808, req=0x0) at ../../../vchoi_fork/src/H5VLcallback.c:2186
    mem_type_id=216172782113783837, mem_space_id=288230376151711754,
    file_space_id=288230376151711755, dxpl_id=792633534417207304,
    buf=0xae203808) at ../../../vchoi_fork/src/H5Dio.c:313
2020-08-04 16:39:57 -05:00
David Young
fa7f8ad2f3 Improve code readability: extract common subexpressions into temporary
variables.
2020-08-04 16:28:04 -05:00
Dana Robinson
f59bb712de Merge pull request #2733 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'be02566f49f953bc80c5b5018871138e201ea633':
  Fixes indenting in tools test scripts
2020-08-04 12:12:45 -05:00
Dana Robinson
be02566f49 Fixes indenting in tools test scripts 2020-08-04 09:14:36 -07:00
Dana Robinson
b2c90cc84e Updated the file locking Fortran property list wrappers and added
a test.
2020-08-03 18:43:19 -07:00
Dana Robinson
bd685b0e80 Fixed missing parens in VFDs 2020-08-03 15:47:46 -07:00
Dana Robinson
6e71992502 Minor change to header comments in file locking C++ changes. 2020-08-03 09:35:17 -07:00
Dana Robinson
bc1bed2c55 Squash merge of file locking fixes 2020-08-03 09:11:27 -07:00
David Young
651facc144 Use PRIu32 and "zu" formats. Delete some casts from size_t. 2020-07-31 10:34:27 -05:00
David Young
0bb87534a6 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-07-30 18:15:09 -05:00
David Young
3e91eeb270 I'm taking a guess that this code intended to point the 2-digit wide
hexadecimal octet values, not 2 character-wide pointers to the bytes.  The %02p
format, which is a GNU-ism, disagreed with GCC 8.3.0 and the option flags we
use.
2020-07-30 18:01:29 -05:00
David Young
ea21b3f89f %08p is not portable, it's a GNU-ism. Use %8p, instead. Squashes a GCC error. 2020-07-30 17:54:04 -05:00
David Young
ddd5e4a6c3 Add format string macros PRI[doxX]HID for hid_t and use PRIdHID. 2020-07-30 17:53:18 -05:00
David Young
36befb6bfe Use HDva_copy() and introduce a bunch of compatbility format-string constants
for uppercase hexadecimal strings, `PRIX...`.  Should fix the VS2010 errors
that Allen mentioned:

H5system.obj : error LNK2019: unresolved external symbol va_copy referenced in  function HDvasprintf                                                            [C:\autotest\hdf5trunk-StdShar-code-vs10\build\ctest\hdfbld\src\hdf5-shared.vcxproj]                                                                            2                                                                               ..\..\..\hdfsrc\test\h5test.c(2103): error C2146: syntax error : missing ')'    before identifier 'PRIX64'                                                      [C:\autotest\hdf5trunk-StdShar-code-vs10\build\ctest\hdfbld\test\hdf5_test-static.vcxproj]
2020-07-30 17:32:03 -05:00
Jerome Soumagne
ef6db167a8 H5R: fix encoding of references that are part of compound types
Add corresponding test and some debug information
2020-07-28 16:36:19 -05:00
David Young
69d51065d2 Merge branch 'rebased-fprintf-experiment' into fprintf-develop 2020-07-09 13:57:53 -05:00
David Young
a8dc4bd93f Always #define HDfprintf as fprintf in this header. I believe this will fix
the Windows build error that Allen reported.
2020-07-07 10:49:55 -05:00
David Young
922e465b46 Provide an HDvasprintf implementation only if it isn't #defined. This should
fix the mingw compilation issue that Allen reported.
2020-07-07 10:49:55 -05:00
David Young
62dbb80cb6 Fix va_list usage in the vasprintf(3) implementation. 2020-07-07 10:49:55 -05:00
David Young
90466630ea Promote format-string warnings to errors. 2020-07-07 10:49:55 -05:00
David Young
f68226ed89 Use the portable -eq operator instead of the bash-ism ==. Fixes the
tests on NetBSD, where /bin/sh != bash.
2020-07-07 10:49:55 -05:00
David Young
d553bd4bf3 Restore a literal percent sign ("%%") that I accidentally deleted. 2020-07-07 10:49:55 -05:00
David Young
9159b93da6 Fix code that made GCC complain about a NULL or unsigned char * arguments for
"%s".

XXX The duplication between test/ros3.c test/s3comms.c is really annoying.
2020-07-07 10:49:55 -05:00
David Young
345443f9ad Take pains to provide UINT64_MAX in all conditions. 2020-07-07 10:49:55 -05:00
David Young
c6fcec46c9 Correct a couple of format strings. 2020-07-07 10:49:55 -05:00
David Young
23bbe96c75 Use PRIuHSIZE and PRIXHSIZE for portability. 2020-07-07 10:49:55 -05:00
David Young
4e41ca05aa Delete extra argument, there is no formatting for it. 2020-07-07 10:49:55 -05:00
David Young
ca8a73923f Fix fprintf arguments: "%p" expects a void * argument. 2020-07-07 10:49:55 -05:00
David Young
307cb5da48 Squash my changes on branch fprintf-experiment into one commit for
reapplication to my new warnings branch, `warnings-again`.  These
changes are included:

commit 915551b7bf64e777dd2007386ec77b1d117770da
Merge: 63858c2 a8892bb
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:39:49 2019 -0600

    Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment

commit a8892bb42d
Merge: 5c911d8 f907b51
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:33:54 2019 -0600

    Merge pull request #2055 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop

    * commit 'f907b511d06612dafc7814a7c30f2f3d2b76d52b':
      Oops, remove more C99 designated initializers for VS 2010 compatibility.

commit 63858c22e168acaec0af8ced6641f26102cc6bb0
Merge: 20ae787 5c911d8
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:04:42 2019 -0600

    Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment

commit 5c911d8baf
Merge: b8a5671 62208b0
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 16:58:27 2019 -0600

    Merge pull request #2030 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop

    * commit '62208b056a09c01855fbac7f75146be58ad6bfe5': (44 commits)
      Add an #include to get a function declaration.
      Don't use C99 designated initializers, they're not compatible with Visual Studio 2010.
      Quiet some more maybe-uninitialized warnings---each is a false positive, *sigh*.  This is more code that may not compile with VS2010, *sigh sigh*.
      Always warn on maybe-uninitialized.  -Wincompatible-pointer-types was not available until GCC 5, so enable it only if that's the GCC version we're using.
      Only promote maybe-uninitialized warnings to errors on GCC 8.  Even on GCC 8, there may be false positives at low optimization levels?  I need to check.
      Only use -Werror=cast-function-type with GCC 8 and later.
      Put all of the -W options back into the order I found them in so that it's easier to compare old and new config/gnu-flags.
      Add new source files to CMakeLists.txt.
      Mention the -Werror= flags in libhdf5.settings.in.
      free -> HDfree
      Promote decleration-after-statement warnings to errors.
      Quiet decleration-after-statement warnings.
      Move a statement under some declarations since some vintages of Visual Studio don't like declarations after statements.
      Document H5D__chunk_mem_xfree_wrapper().
      Undo accidental test deletion.
      Oops, delete a debug printf that snuck in here.
      Undo my changes to the HD macros, hadn't really intended those to be on this branch....
      Make errors of some more warnings.  Move disabled warnings to DEVELOPER_WARNING_CFLAGS.  Put just one warning option on a line, and sort some of the options.
      Cast to the parameter type, H5VL_token_t *, instead of to unsigned char *.
      Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to structs containing those arrays.  Encapsulating the arrays in this way makes it easier to write and think about pointers to these types, casts to/from these types, etc.
      ...

commit 20ae7877e33931b95e8c3502b027d6c3fe94a11f
Merge: 46f8c61 edd5297
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:34:09 2019 -0600

    Merge remote-tracking branch 'origin/add-werror-and-squash-some' into fprintf-experiment

commit 46f8c613d5117a8be5bc8385a072daa0b4262f06
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:29:00 2019 -0600

    GCC really wants us to use `ll` to format `long long`, so try to make that work
    before any other format modifier.  Seems like we're not compiling the autoconf
    test program with -Werror=format ?  Probably should.

commit eee35b8ef3759c391327cd48a9b3c56b6f8abc99
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:28:05 2019 -0600

    It's hard to know just how wide an HDoff_t will be, and I don't think POSIX or
    C standards provide a PRI macro for it, so cast to intmax_t and format using
    PRIdMAX.

commit 86eab12df7a89b546a38e99f8178dd2adbcb3433
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:26:25 2019 -0600

    URemove some casts.se the right format string for the argument.  Here and there
    stop casting a printf argument.

commit f722f7cbecbaa99449941484b014426f62f1bed5
Merge: 58e3743 6d5ec83
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 14:44:16 2019 -0600

    Merge branch 'add-werror-and-squash-some' into fprintf-experiment

commit 58e3743b7faa9836606ee91798fe80dfc0040da7
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Nov 20 21:07:21 2019 -0600

    Remove custom HDfprintf implementation, using the standard library's,
    instead.  Take a swipe at repairing fprintf format strings, mainly
    replacing "%Hu" with "%" PRIuHSIZE, "%a" with "%" PRIuHADDR, "%Zu" with
    "%zu".

    Here and there remove an awkward cast of a printf argument to `long
    long` and use PRI[doux]8, PRI[doux]32, or PRI[doux]64, instead.

    Change occurrences of "%t" to "%s" and perform a suitable change of
    argument, `cond` -> `cond ? "TRUE" : "FALSE"`.

    Some occurrences of %Hu, %a, and %t remain, they just weren't flagged by
    the compiler because of #ifdef'age.

commit d4366909293fa970c23512ac80e5d865d76cddbf
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Nov 20 20:54:32 2019 -0600

    Promote format-string warnigns to errors.
2020-07-07 10:49:55 -05:00
Jordan Henderson
ee6f7d1c96 Fix issue in H5VL_wrap_register where datatype VOL objects are casted to H5T_t * 2020-06-19 12:14:10 -05:00
Quincey Koziol
83c861f327 Merge remote-tracking branch 'origin/develop' into pio_update 2020-04-19 10:00:15 -05:00
Quincey Koziol
5c885f5233 Merge remote-tracking branch 'origin/develop' into pio_update 2020-04-09 10:13:23 -05:00
Quincey Koziol
d17c259a4d Merge remote-tracking branch 'origin/develop' into pio_update 2020-04-04 13:49:42 -05:00
Quincey Koziol
ab89adb58a Merge remote-tracking branch 'origin/develop' into pio_update 2020-04-03 13:47:50 -05:00
Quincey Koziol
9e5a68214a Don't track file offset position when using pread / pwrite. 2020-03-28 21:53:43 -05:00
2094 changed files with 509428 additions and 365360 deletions

View File

@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.

96
.clang-format Normal file
View File

@@ -0,0 +1,96 @@
---
Language: Cpp
BasedOnStyle: LLVM
AlignConsecutiveAssignments: true
#llvm11: AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
#llvm10-11: AlignOperands: true - Align
#llvm11: AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: AllDefinitions
# Can enable the following section when llvm 12.x is out
#AttributeMacros:
# - H5_ATTR_FORMAT
# - H5_ATTR_UNUSED
# - H5_ATTR_DEPRECATED_USED
# - H5_ATTR_NDEBUG_UNUSED
# - H5_ATTR_DEBUG_API_USED
# - H5_ATTR_PARALLEL_UNUSED
# - H5_ATTR_PARALLEL_USED
# - H5_ATTR_NORETURN
# - H5_ATTR_CONST
# - H5_ATTR_PURE
# - H5_ATTR_FALLTHROUGH
BraceWrapping:
AfterFunction: true
#llvm10-11: AfterControlStatement: false - Never
BeforeCatch: true
BeforeElse: true
#llvm11: BeforeLambdaBody: false
#llvm11: BeforeWhile: false
BreakBeforeBraces: Stroustrup
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS']
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 3
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 4
SortPriority: 0
- Regex: '.*'
Priority: 0
SortPriority: 0
- Regex: '^H5*.*'
Priority: 1
SortPriority: 0
- Regex: 'private.*'
Priority: 2
SortPriority: 0
IncludeIsMainRegex: '(public)?$'
IndentCaseLabels: true
#llvm11: IndentCaseBlocks: false
IndentGotoLabels: false
#llvm11: IndentExternBlock: AfterExternBlock
IndentWidth: 4
#llvm11: InsertTrailingCommas: None
MacroBlockBegin: "^BEGIN_FUNC"
MacroBlockEnd: "^END_FUNC"
ObjCBlockIndentWidth: 4
#llvm11: ObjCBreakBeforeNestedBlockParam: true
ReflowComments: true
SortIncludes: false
StatementMacros:
- FUNC_ENTER_API
- FUNC_LEAVE_API
- FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_LEAVE_NOAPI
- H5_BEGIN_TAG
- HGOTO_DONE_TAG
- H5_END_TAG
- HSYS_DONE_ERROR
- HSYS_GOTO_ERROR
- HDONE_ERROR
- HERROR
- H5_LEAVE
- H5E_PRINTF
- H5E_THROW
- HGOTO_DONE
- HGOTO_ERROR
- HMPI_ERROR
- HMPI_DONE_ERROR
- HMPI_GOTO_ERROR
- H5_GCC_DIAG_OFF
- H5_GCC_DIAG_ON
- CATCH
#llvm10: TypenameMacros:
#llvm10: - STACK_OF
#llvm10: - LIST
#llvm11: WhitespaceSensitiveMacros:
#llvm11: - STRINGIZE
#llvm11: - PP_STRINGIZE
...

16
.gitattributes vendored
View File

@@ -192,12 +192,12 @@ java/examples/testfiles/examples.intro.H5_CreateGroup.txt -text
java/examples/testfiles/examples.intro.H5_CreateGroupAbsoluteRelative.txt -text
java/examples/testfiles/examples.intro.H5_CreateGroupDataset.txt -text
java/examples/testfiles/examples.intro.H5_ReadWrite.txt -text
java/lib/ext/slf4j-nop-1.7.25.jar -text svneol=unset#application/zip
java/lib/ext/slf4j-simple-1.7.25.jar -text svneol=unset#application/zip
java/lib/ext/slf4j-nop-1.7.33.jar -text svneol=unset#application/zip
java/lib/ext/slf4j-simple-1.7.33.jar -text svneol=unset#application/zip
java/lib/hamcrest-core.jar -text svneol=unset#application/java-archive
java/lib/junit.jar -text svneol=unset#application/java-archive
java/lib/simplelogger.properties -text
java/lib/slf4j-api-1.7.25.jar -text svneol=unset#application/zip
java/lib/slf4j-api-1.7.33.jar -text svneol=unset#application/zip
java/src/CMakeLists.txt -text
java/src/Makefile.am -text
java/src/hdf/CMakeLists.txt -text
@@ -365,6 +365,7 @@ m4/ax_check_rqrd_class.m4 -text
m4/ax_java_check_class.m4 -text
m4/ax_java_options.m4 -text
m4/ax_jni_include_dir.m4 -text
m4/ax_prog_doxygen.m4 -text
m4/ax_prog_jar.m4 -text
m4/ax_prog_java.m4 -text
m4/ax_prog_java_cc.m4 -text
@@ -392,10 +393,10 @@ test/cork.c -text
test/corrupt_stab_msg.h5 -text
test/deflate.h5 -text
test/dynlib4.c -text
test/family_v16_00000.h5 -text
test/family_v16_00001.h5 -text
test/family_v16_00002.h5 -text
test/family_v16_00003.h5 -text
test/family_v16-000000.h5 -text
test/family_v16-000001.h5 -text
test/family_v16-000002.h5 -text
test/family_v16-000003.h5 -text
test/file_image_core_test.h5 -text
test/filespace_1_6.h5 -text
test/filespace_1_8.h5 -text
@@ -784,6 +785,7 @@ tools/testfiles/tints4dimsStride2.ddl -text
tools/testfiles/tintsattrs.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tlarge_objname.h5 -text
tools/testfiles/tldouble.h5 -text
tools/testfiles/tldouble_scalar.h5 -text
tools/testfiles/tlonglinks.h5 -text
tools/testfiles/tloop.h5 -text
tools/testfiles/tloop2.h5 -text

42
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,42 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in the repo.
* @lrknox
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
*.cmake @byrnHDF @ChristopherHogan @gnuoyd @derobins
CMakeLists.txt @byrnHDF @ChristopherHogan @gnuoyd @derobins
CMakeTests.* @byrnHDF @ChristopherHogan @gnuoyd @derobins
/bin/ @lrknox @ChristopherHogan @gnuoyd @derobins @qkoziol
/c++/ @bmribler @byrnHDF @ChristopherHogan @gnuoyd @derobins
/config/ @lrknox @byrnHDF @ChristopherHogan @gnuoyd @derobins @qkoziol
/doc/ @ChristopherHogan @gnuoyd @jrmainzer
/examples/ @lrknox @bmribler @ChristopherHogan @gnuoyd @derobins
/fortran/ @brtnfld @epourmal
/hl/ @bmribler @byrnHDF @ChristopherHogan @gnuoyd @derobins
/java/ @jhendersonHDF @byrnHDF
/m4/ @lrknox @ChristopherHogan @gnuoyd @derobins
/release_docs/ @lrknox @bmribler @byrnHDF
/src/ @jhendersonHDF @fortnern @soumagne @vchoi-hdfgroup @ChristopherHogan @gnuoyd @derobins @jrmainzer @qkoziol
/test/ @jhendersonHDF @fortnern @soumagne @vchoi-hdfgroup @ChristopherHogan @gnuoyd @derobins @jrmainzer @qkoziol
/testpar/ @jhendersonHDF @ChristopherHogan @gnuoyd @jrmainzer @qkoziol
/tools/ @byrnHDF @bmribler @ChristopherHogan @gnuoyd @derobins
/utils/ @lrknox @byrnHDF @ChristopherHogan @gnuoyd @derobins

View File

@@ -0,0 +1,18 @@
name: clang-format Check
on:
pull_request:
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'c,h,cpp,hpp'
clangFormatVersion: 10
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'

25
.github/workflows/clang-format-fix.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: clang-format Check
on:
workflow_dispatch:
push:
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'c,h,cpp,hpp'
clangFormatVersion: 10
inplace: True
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'
- uses: EndBug/add-and-commit@v7
with:
author_name: github-actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'Committing clang-format changes'

15
.github/workflows/codespell.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
# GitHub Action to automate the identification of common misspellings in text files
# https://github.com/codespell-project/codespell
# https://github.com/codespell-project/actions-codespell
name: codespell
on: [push, pull_request]
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
with:
skip: ./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c
ignore_words_list: isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum

View File

@@ -2,11 +2,14 @@ name: hdf5 dev CI
# Controls when the action will run. Triggers the workflow on push or pull request
on:
workflow_dispatch:
push:
branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
pull_request:
branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
paths-ignore:
- '.github/**'
- 'doc/**'
- 'release_docs/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
@@ -14,39 +17,152 @@ jobs:
strategy:
# fail-fast: false
matrix:
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "macOS Latest Clang"]
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"]
include:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
os: windows-latest
os: windows-2022
build_type: "Release"
toolchain: ""
cpp: ON
fortran: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
java: ON
ts: OFF
hl: ON
parallel: OFF
generator: "-G \"Visual Studio 17 2022\" -A x64"
- name: "Ubuntu Latest GCC"
artifact: "Linux.tar.xz"
os: ubuntu-latest
build_type: "Release"
fortran: OFF
cpp: ON
fortran: ON
java: ON
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-latest
build_type: "Release"
cpp: ON
fortran: OFF
java: ON
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
- name: "Ubuntu Debug GCC"
artifact: "LinuxDBG.tar.xz"
os: ubuntu-latest
build_type: "Debug"
cpp: ON
fortran: OFF
java: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "Ubuntu Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: enable
fortran: enable
java: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
# Threadsafe runs
- name: "Windows TS MSVC"
artifact: "Windows-MSVCTS.tar.xz"
os: windows-2019
build_type: "Release"
toolchain: ""
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
- name: "Ubuntu TS GCC"
artifact: "LinuxTS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS TS Clang"
artifact: "macOSTS.tar.xz"
os: macos-latest
build_type: "Release"
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
- name: "TS Debug GCC"
artifact: "LinuxTSDBG.tar.xz"
os: ubuntu-latest
build_type: "Debug"
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "TS Autotools GCC"
artifact: "LinuxATS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: disable
fortran: disable
java: disable
ts: enable
hl: disable
parallel: disable
toolchain: ""
generator: "autogen"
# - name: "Ubuntu Parallel GCC"
# artifact: "LinuxPar.tar.xz"
# os: ubuntu-latest
# build_type: "Release"
# cpp: OFF
# fortran: OFF
# parallel: ON
# toolchain: "config/toolchain/GCC.cmake"
# generator: "-G Ninja"
name: ${{ matrix.name }}
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip-ci')"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Dependencies (Linux)
run: sudo apt-get install ninja-build
if: matrix.os == 'ubuntu-latest'
- name: Install Autotools Dependencies (Linux)
run: sudo apt-get install automake autoconf libtool libtool-bin
if: matrix.generator == 'autogen'
- name: Install Dependencies (Windows)
run: choco install ninja
if: matrix.os == 'windows-latest'
@@ -57,24 +173,47 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
# Set these env vars so cmake picks the correct compiler
echo "::set-env name=CXX::cl.exe"
echo "::set-env name=CC::cl.exe"
echo "CXX=cl.exe" >> $GITHUB_ENV
echo "CC=cl.exe" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v2
- name: Autotools Configure
if: matrix.generator == 'autogen'
run: |
sh ./autogen.sh
sh ./bin/chkmanifest
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java
shell: bash
- name: Configure
if: matrix.generator != 'autogen'
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} $GITHUB_WORKSPACE
shell: bash
- name: Autotools Build
if: matrix.generator == 'autogen'
run: make
working-directory: ${{ runner.workspace }}/build
- name: Build
if: matrix.generator != 'autogen'
run: cmake --build . --config ${{ matrix.build_type }}
working-directory: ${{ runner.workspace }}/build
- name: Autotools Test
if: matrix.generator == 'autogen'
run: make check
working-directory: ${{ runner.workspace }}/build
- name: Test
if: matrix.generator != 'autogen'
run: ctest --build . -C ${{ matrix.build_type }} -V
working-directory: ${{ runner.workspace }}/build

214
.github/workflows/pr-check.yml vendored Normal file
View File

@@ -0,0 +1,214 @@
name: hdf5 dev CI
# Controls when the action will run. Triggers the workflow on push or pull request
on:
pull_request:
branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
# fail-fast: false
matrix:
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"]
include:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
os: windows-2022
build_type: "Release"
toolchain: ""
cpp: ON
fortran: OFF
java: ON
ts: OFF
hl: ON
parallel: OFF
generator: "-G \"Visual Studio 17 2022\" -A x64"
- name: "Ubuntu Latest GCC"
artifact: "Linux.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: ON
fortran: ON
java: ON
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-latest
build_type: "Release"
cpp: ON
fortran: OFF
java: ON
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
- name: "Ubuntu Debug GCC"
artifact: "LinuxDBG.tar.xz"
os: ubuntu-latest
build_type: "Debug"
cpp: ON
fortran: OFF
java: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "Ubuntu Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: enable
fortran: enable
java: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
# Threadsafe runs
- name: "Windows TS MSVC"
artifact: "Windows-MSVCTS.tar.xz"
os: windows-2019
build_type: "Release"
toolchain: ""
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
- name: "Ubuntu TS GCC"
artifact: "LinuxTS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS TS Clang"
artifact: "macOSTS.tar.xz"
os: macos-latest
build_type: "Release"
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
- name: "TS Debug GCC"
artifact: "LinuxTSDBG.tar.xz"
os: ubuntu-latest
build_type: "Debug"
cpp: OFF
fortran: OFF
java: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "TS Autotools GCC"
artifact: "LinuxATS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: disable
fortran: disable
java: disable
ts: enable
hl: disable
parallel: disable
toolchain: ""
generator: "autogen"
# - name: "Ubuntu Parallel GCC"
# artifact: "LinuxPar.tar.xz"
# os: ubuntu-latest
# build_type: "Release"
# cpp: OFF
# fortran: OFF
# parallel: ON
# toolchain: "config/toolchain/GCC.cmake"
# generator: "-G Ninja"
name: ${{ matrix.name }}
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip-ci')"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Dependencies (Linux)
run: sudo apt-get install ninja-build
if: matrix.os == 'ubuntu-latest'
- name: Install Autotools Dependencies (Linux)
run: sudo apt-get install automake autoconf libtool libtool-bin
if: matrix.generator == 'autogen'
- name: Install Dependencies (Windows)
run: choco install ninja
if: matrix.os == 'windows-latest'
- name: Install Dependencies (macOS)
run: brew install ninja
if: matrix.os == 'macos-latest'
- name: Set environment for MSVC (Windows)
if: matrix.os == 'windows-latest'
run: |
# Set these env vars so cmake picks the correct compiler
echo "CXX=cl.exe" >> $GITHUB_ENV
echo "CC=cl.exe" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v2
- name: Autotools Configure
if: matrix.generator == 'autogen'
run: |
sh ./autogen.sh
sh ./bin/chkmanifest
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java
shell: bash
- name: Configure
if: matrix.generator != 'autogen'
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} $GITHUB_WORKSPACE
shell: bash
- name: Autotools Build
if: matrix.generator == 'autogen'
run: make
working-directory: ${{ runner.workspace }}/build
- name: Build
if: matrix.generator != 'autogen'
run: cmake --build . --config ${{ matrix.build_type }}
working-directory: ${{ runner.workspace }}/build
- name: Autotools Test
if: matrix.generator == 'autogen'
run: make check
working-directory: ${{ runner.workspace }}/build
- name: Test
if: matrix.generator != 'autogen'
run: ctest --build . -C ${{ matrix.build_type }} -V
working-directory: ${{ runner.workspace }}/build

View File

@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.

View File

@@ -5,13 +5,16 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
option (USE_LIBAEC "Use AEC library as SZip Filter" OFF)
option (USE_LIBAEC_STATIC "Use static AEC library " OFF)
include (ExternalProject)
include (FetchContent)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
@@ -30,7 +33,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
if (NOT EXISTS "${ZLIB_URL}")
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter ZLIB file ${ZLIB_URL} not found")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
endif ()
endif ()
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
if (USE_LIBAEC)
@@ -38,7 +43,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
endif ()
if (NOT EXISTS "${SZIP_URL}")
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter SZIP file ${SZIP_URL} not found")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter SZIP file ${SZIP_URL} not found")
endif ()
endif ()
else ()
set (ZLIB_USE_EXTERNAL 0)
@@ -74,7 +81,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
message (STATUS "Filter ZLIB is built")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter ZLIB is built")
endif ()
else ()
message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
endif ()
@@ -90,7 +99,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter ZLIB is ON")
endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -100,13 +111,24 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
if (NOT SZIP_USE_EXTERNAL)
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
set(SZIP_FOUND FALSE)
if (USE_LIBAEC)
set(libaec_USE_STATIC_LIBS ${USE_LIBAEC_STATIC})
find_package (libaec 1.0.5 CONFIG)
if (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
endif ()
endif ()
if (NOT SZIP_FOUND)
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
endif ()
endif ()
endif ()
endif ()
if (SZIP_FOUND)
set (H5_HAVE_FILTER_SZIP 1)
@@ -120,9 +142,13 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is built")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter SZIP is built")
endif ()
if (USE_LIBAEC)
message (STATUS "... with library AEC")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "... with library AEC")
endif ()
set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME})
else ()
set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME})
@@ -133,7 +159,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter SZIP is ON")
endif ()
if (H5_HAVE_FILTER_SZIP)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
endif ()

View File

@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -31,7 +31,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_EXPORTED_TARGETS)
install (
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
NAMESPACE ${HDF_PACKAGE_NAMESPACE}
COMPONENT configinstall
@@ -53,7 +53,7 @@ endif ()
#-----------------------------------------------------------------------------
set (HDF5_INCLUDES_BUILD_TIME
${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_SRC_BINARY_DIR}
)
#-----------------------------------------------------------------------------
@@ -72,7 +72,7 @@ set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
)
@@ -86,14 +86,14 @@ set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif ()
@@ -113,7 +113,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
#)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif ()
@@ -128,10 +128,10 @@ else ()
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
${HDF5_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY
${HDF5_SRC_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
FILES ${HDF5_SRC_BINARY_DIR}/libhdf5.settings
DESTINATION ${HDF5_INSTALL_LIB_DIR}
COMPONENT libraries
)
@@ -182,14 +182,14 @@ if (HDF5_PACK_EXAMPLES)
endif ()
#-----------------------------------------------------------------------------
# Configure the README.txt file for the binary package
# Configure the README.md file for the binary package
#-----------------------------------------------------------------------------
HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
#-----------------------------------------------------------------------------
# Configure the COPYING.txt file for the windows binary package
#-----------------------------------------------------------------------------
if (WIN32 OR MINGW)
if (WIN32)
configure_file (${HDF5_SOURCE_DIR}/COPYING ${HDF5_BINARY_DIR}/COPYING.txt @ONLY)
endif ()
@@ -205,10 +205,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
set (release_files
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
if (WIN32 OR MINGW)
if (WIN32)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
@@ -222,7 +221,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
${HDF5_SOURCE_DIR}/release_docs/INSTALL
)
if (WIN32 OR MINGW)
if (WIN32)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
@@ -249,19 +248,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif ()
endif ()
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (CMAKE_HOST_UNIX)
set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
else ()
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
set (CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
set (CMAKE_GENERIC_PROGRAM_FILES)
endif ()
endif ()
#-----------------------------------------------------------------------------
# Set the cpack variables
#-----------------------------------------------------------------------------
@@ -276,9 +262,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif ()
set (CPACK_PACKAGE_RELOCATABLE TRUE)
@@ -290,7 +276,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
set (CPACK_GENERATOR "TGZ")
if (WIN32 OR MINGW)
if (WIN32)
set (CPACK_GENERATOR "ZIP")
if (NSIS_EXECUTABLE)
@@ -455,7 +441,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
if (HDF5_PACKAGE_EXTLIBS)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
if (WIN32 OR MINGW)
if (WIN32)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
@@ -464,7 +450,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
endif ()
endif ()
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
if (WIN32 OR MINGW)
if (WIN32)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
@@ -472,6 +458,13 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
endif ()
endif ()
if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL)
if (WIN32)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${PLUGIN_BINARY_DIR};PLUGIN;ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${PLUGIN_BINARY_DIR};PLUGIN;libraries;/")
endif ()
endif ()
endif ()
endif ()

View File

@@ -42,9 +42,8 @@ set (CMAKE_IGNORE_EOL "--ignore-eol")
if (CMAKE_VERSION VERSION_LESS "3.14.0")
set (CMAKE_IGNORE_EOL "")
if (WIN32)
message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
message (FATAL_ERROR "Windows builds require a minimum of CMake 3.14")
endif()
else ()
endif ()
#-----------------------------------------------------------------------------
@@ -72,6 +71,13 @@ mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX)
# If the parent project needs to install hdf libraries, but avoid
# name conflicts with system versions, then a prefix may be added
# to ensure that the correct versions configured are used.
set (HDF5_LIB_INFIX "" CACHE STRING "Use infix for custom library naming.")
mark_as_advanced (HDF5_LIB_INFIX)
# HDF5_LIB_INFIX :
# This infix is added to all library names after 'hdf5'.
# e.g. the infix '_openmpi' results in the library name 'libhdf5_openmpi.so'
# This name is used in packages on debian based systems.
# (see https://packages.debian.org/jessie/amd64/libhdf5-openmpi-8/filelist)
#
# HDF5_INSTALL_BIN_DIR, HDF5_INSTALL_LIB_DIR, HDF5_INSTALL_INCLUDE_DIR, HDF5_INSTALL_DATA_DIR :
# Customize the 'bin', 'lib', 'include', and 'share' installation directories.
@@ -131,20 +137,20 @@ mark_as_advanced (ALLOW_UNSUPPORTED)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries
#-----------------------------------------------------------------------------
set (HDF5_LIB_CORENAME "hdf5")
set (HDF5_TEST_LIB_CORENAME "hdf5_test")
set (HDF5_CPP_LIB_CORENAME "hdf5_cpp")
set (HDF5_HL_LIB_CORENAME "hdf5_hl")
set (HDF5_HL_CPP_LIB_CORENAME "hdf5_hl_cpp")
set (HDF5_TOOLS_LIB_CORENAME "hdf5_tools")
set (HDF5_UTILS_LIB_CORENAME "hdf5_utils")
set (HDF5_F90_LIB_CORENAME "hdf5_fortran")
set (HDF5_F90_C_LIB_CORENAME "hdf5_f90cstub")
set (HDF5_F90_TEST_LIB_CORENAME "hdf5_test_fortran")
set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5_test_f90cstub")
set (HDF5_HL_F90_LIB_CORENAME "hdf5_hl_fortran")
set (HDF5_HL_F90_C_LIB_CORENAME "hdf5_hl_f90cstub")
set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5_java")
set (HDF5_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}")
set (HDF5_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test")
set (HDF5_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_cpp")
set (HDF5_HL_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl")
set (HDF5_HL_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_cpp")
set (HDF5_TOOLS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_tools")
set (HDF5_UTILS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_utils")
set (HDF5_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_fortran")
set (HDF5_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_f90cstub")
set (HDF5_F90_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_fortran")
set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_f90cstub")
set (HDF5_HL_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_fortran")
set (HDF5_HL_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_f90cstub")
set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java")
set (HDF5_JAVA_HDF5_LIB_CORENAME "jarhdf5")
set (HDF5_JAVA_TEST_LIB_CORENAME "jartest5")
@@ -204,6 +210,7 @@ set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
#-----------------------------------------------------------------------------
# Define some CMake variables for use later in the project
#-----------------------------------------------------------------------------
set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config)
set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod)
set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
@@ -222,9 +229,10 @@ set (HDF5_JAVA_JNI_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/jni)
set (HDF5_JAVA_HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/hdf)
set (HDF5_JAVA_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/java/test)
set (HDF5_JAVA_LIB_DIR ${HDF5_SOURCE_DIR}/java/lib)
set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-1.7.25.jar)
set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-1.7.25.jar)
set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-1.7.25.jar)
set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-1.7.33.jar)
set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-1.7.33.jar)
set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-1.7.33.jar)
set (HDF5_DOXYGEN_DIR ${HDF5_SOURCE_DIR}/doxygen)
#-----------------------------------------------------------------------------
# parse the full version number from H5public.h and include in H5_VERS_INFO
@@ -236,9 +244,11 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*)\".*$"
string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._-]*)\".*$"
"\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
#message (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
endif ()
#-----------------------------------------------------------------------------
# parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO
@@ -251,7 +261,9 @@ string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_LIB_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_LIB_SOVERS_MAJOR ${H5_LIB_SOVERS_INTERFACE}-${H5_LIB_SOVERS_RELEASE})
message (STATUS "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_TOOLS_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
@@ -261,7 +273,9 @@ if (H5_TOOLS_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_TOOLS_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE})
message (STATUS "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
endif ()
endif ()
string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_CXX_SOVERS_EXISTS)
@@ -272,7 +286,9 @@ if (H5_CXX_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE})
message (STATUS "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
endif ()
endif ()
string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_F_SOVERS_EXISTS)
@@ -283,7 +299,9 @@ if (H5_F_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE})
message (STATUS "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
endif ()
endif ()
string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_HL_SOVERS_EXISTS)
@@ -294,7 +312,9 @@ if (H5_HL_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE})
message (STATUS "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}")
endif ()
endif ()
string (REGEX MATCH ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_HL_CXX_SOVERS_EXISTS)
@@ -305,7 +325,9 @@ if (H5_HL_CXX_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE})
message (STATUS "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}")
endif ()
endif ()
string (REGEX MATCH ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_HL_F_SOVERS_EXISTS)
@@ -316,7 +338,9 @@ if (H5_HL_F_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE})
message (STATUS "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}")
endif ()
endif ()
string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents})
if(H5_JAVA_SOVERS_EXISTS)
@@ -327,7 +351,9 @@ if(H5_JAVA_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_JAVA_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE})
message (STATUS "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}")
endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -339,9 +365,11 @@ set (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}"
set (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
set (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
if (H5_VERS_SUBRELEASE)
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}.${H5_VERS_SUBRELEASE}")
set (HDF5_RELEASE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
else ()
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
set (HDF5_RELEASE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
endif ()
set (HDF5_LIB_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}")
set (HDF5_LIB_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}")
@@ -407,6 +435,7 @@ include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake)
HDF_DIR_PATHS(${HDF5_PACKAGE_NAME})
include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5PluginMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
#-----------------------------------------------------------------------------
@@ -478,6 +507,14 @@ else ()
set (tgt_file_ext "-shared")
endif ()
#-----------------------------------------------------------------------------
# perl is used in some optional src and tests, check availability
find_package (Perl)
if (PERL_FOUND)
set (H5_PERL_FOUND YES)
endif ()
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
@@ -489,12 +526,21 @@ if (BUILD_STATIC_EXECS)
endif ()
endif ()
option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF)
mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS)
if (HDF5_ENABLE_ANALYZER_TOOLS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/tools.cmake)
endif ()
option (HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF)
mark_as_advanced (HDF5_ENABLE_SANITIZERS)
if (HDF5_ENABLE_SANITIZERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
endif ()
option (HDF5_ENABLE_FORMATTERS "format source files" OFF)
mark_as_advanced (HDF5_ENABLE_FORMATTERS)
if (HDF5_ENABLE_FORMATTERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/formatting.cmake)
endif ()
#-----------------------------------------------------------------------------
# Option to use code coverage
@@ -566,12 +612,15 @@ endif ()
# Certain systems may add /Debug or /Release to output paths
# and we need to call the executable from inside the CMake configuration
#-----------------------------------------------------------------------------
set (EXE_EXT "")
if (WIN32 OR MINGW)
set (EXE_EXT ".exe")
add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CRT_SECURE_NO_WARNINGS _CONSOLE)
if (WIN32)
add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
if (MSVC)
add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE)
endif ()
endif ()
option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF)
if (MSVC)
set (CMAKE_MFC_FLAG 0)
set (WIN_COMPILE_FLAGS "")
@@ -579,7 +628,7 @@ if (MSVC)
endif ()
set (MAKE_SYSTEM)
if (CMAKE_BUILD_TOOL MATCHES "make")
if (CMAKE_MAKE_PROGRAM MATCHES "make")
set (MAKE_SYSTEM 1)
endif ()
@@ -771,40 +820,52 @@ endif ()
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
if (WIN32 OR MINGW)
message (STATUS " **** thread-safety option not supported with static library **** ")
message (STATUS " **** thread-safety option will not be used building static library **** ")
if (WIN32)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** thread-safety option not supported with static library **** ")
message (VERBOSE " **** thread-safety option will not be used building static library **** ")
endif ()
endif ()
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** Allowing unsupported parallel and thread-safety options **** ")
endif ()
endif ()
endif ()
if (HDF5_BUILD_FORTRAN)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ")
endif ()
endif ()
endif ()
if (HDF5_BUILD_CPP_LIB)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ")
endif ()
endif ()
endif ()
if (HDF5_BUILD_HL_LIB)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported HL and thread-safety options **** ")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ")
endif ()
endif ()
endif ()
if (H5_HAVE_IOEO)
message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
endif ()
set (H5_HAVE_WIN_THREADS 1)
else ()
if (NOT H5_HAVE_PTHREAD_H)
@@ -850,6 +911,21 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
endif ()
endif ()
#-----------------------------------------------------------------------------
# Option to build documentation
#-----------------------------------------------------------------------------
option (HDF5_BUILD_DOC "Build documentation" OFF)
if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOXYGEN_DIR}")
# check if Doxygen is installed
find_package(Doxygen)
if (DOXYGEN_FOUND)
message(STATUS "Doxygen version: ${DOXYGEN_VERSION}")
add_subdirectory (doxygen)
else ()
message(STATUS "Doxygen needs to be installed to generate the doxygen documentation")
endif ()
endif ()
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
#-----------------------------------------------------------------------------
@@ -870,6 +946,9 @@ if (BUILD_TESTING)
if (HDF5_TEST_VFD)
option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
# Initialize the list of VFDs to be used for testing and create a test folder for each VFD
H5_SET_VFD_LIST()
endif ()
option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
@@ -928,10 +1007,32 @@ endif ()
# Option to build HDF5 Utilities
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils")
option (HDF5_BUILD_UTILS "Build HDF5 Utils" ON)
if (HDF5_BUILD_UTILS)
add_subdirectory (utils)
option (HDF5_BUILD_PARALLEL_TOOLS "Build Parallel HDF5 Tools" OFF)
if (HDF5_BUILD_PARALLEL_TOOLS AND HDF5_ENABLE_PARALLEL)
set (CMAKE_PREFIX_PATH "$HDF_RESOURCES_DIR")
find_package(MFU REQUIRED)
if (MFU_FOUND)
message(STATUS "LL_PATH=${LL_PATH}")
set (H5_HAVE_LIBMFU 1)
set (H5_HAVE_MFU_H 1)
set (CMAKE_REQUIRED_INCLUDES "${MFU_INCLUDE_DIR}")
set (MFU_LIBRARY_DEBUG "$MFU_LIBRARY")
set (MFU_LIBRARY_RELEASE "$MFU_LIBRARY")
endif ()
find_package(CIRCLE REQUIRED)
if (CIRCLE_FOUND)
set (H5_HAVE_LIBCIRCLE 1)
set (H5_HAVE_CIRCLE_H 1)
set (CMAKE_REQUIRED_INCLUDES "${CIRCLE_INCLUDE_DIR}")
endif ()
find_package(DTCMP REQUIRED)
if (DTCMP_FOUND)
set (H5_HAVE_LIBDTCMP 1)
set (H5_HAVE_DTCMP_H 1)
set (CMAKE_REQUIRED_INCLUDES "${DTCMP_INCLUDE_DIR}")
endif ()
endif ()
add_subdirectory (utils)
endif ()
#-----------------------------------------------------------------------------
@@ -944,6 +1045,21 @@ if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools
endif ()
endif ()
#-----------------------------------------------------------------------------
# Include filter plugins
#-----------------------------------------------------------------------------
include (CMakePlugins.cmake)
if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES)
if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND)
PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON)
# mark_as_advanced (HDF5_TEST_PLUGIN)
# TEST_PLUGIN_LIBRARY ()
endif ()
endif ()
#-----------------------------------------------------------------------------
# Option to build examples
#-----------------------------------------------------------------------------
@@ -978,7 +1094,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
if (HDF5_BUILD_FORTRAN)
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
endif ()
include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake)
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
@@ -1020,23 +1138,21 @@ endif ()
# Option to build HDF5 C++ Library
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON)
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ")
endif ()
endif ()
endif ()
include (${HDF_RESOURCES_EXT_DIR}/HDFUseCXX.cmake)
include (${HDF_RESOURCES_DIR}/HDFCXXCompilerFlags.cmake)
if (CMAKE_NO_STD_NAMESPACE)
set (H5_NO_STD 1)
endif ()
add_subdirectory (c++)
if (HDF5_BUILD_HL_LIB)
if (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++")
@@ -1070,7 +1186,7 @@ endif ()
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubconf.h @ONLY)
#-----------------------------------------------------------------------------
# Options for use by cross compiling and toolchains

56
CMakePlugins.cmake Normal file
View File

@@ -0,0 +1,56 @@
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (PLUGIN_URL ${PLUGIN_GIT_URL} CACHE STRING "Path to PLUGIN git repository")
set (PLUGIN_BRANCH ${PLUGIN_GIT_BRANCH})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (NOT TGZPATH)
set (TGZPATH ${HDF5_SOURCE_DIR})
endif ()
set (PLUGIN_URL ${TGZPATH}/${PLUGIN_TGZ_NAME})
if (NOT EXISTS "${PLUGIN_URL}")
set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter PLUGIN file ${PLUGIN_URL} not found")
endif ()
else ()
set (PLUGIN_USE_EXTERNAL 0)
endif ()
endif ()
#-----------------------------------------------------------------------------
# Option for PLUGIN support
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF)
if (HDF5_ENABLE_PLUGIN_SUPPORT)
if (NOT PLUGIN_USE_EXTERNAL)
find_package (PLUGIN NAMES ${PLUGIN_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT PLUGIN_FOUND)
find_package (PLUGIN) # Legacy find
endif ()
endif ()
if (NOT PLUGIN_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
message (STATUS "Filter PLUGIN is built")
else ()
message (FATAL_ERROR " PLUGIN is Required for PLUGIN support in HDF5")
endif ()
endif ()
message (STATUS "Filter PLUGIN is ON")
endif ()

12
COPYING
View File

@@ -67,6 +67,12 @@ under Prime Contract No. DE-AC02-05CH11231.
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from Lawrence Livermore
National Laboratory and the United States Department of Energy under
Prime Contract No. DE-AC52-07NA27344.
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from the University of
California, Lawrence Livermore National Laboratory (UC LLNL).
The following statement applies to those portions of the product and must
@@ -97,10 +103,4 @@ and/or accompanying materials:
-----------------------------------------------------------------------------
HDF5 is available with the SZIP compression library but SZIP is not part
of HDF5 and has separate copyright and license terms. See SZIP Compression
in HDF Products (www.hdfgroup.org/doc_resource/SZIP/) for further details.
-----------------------------------------------------------------------------

View File

@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -18,7 +18,7 @@
set (CTEST_PROJECT_NAME "HDF5")
set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
set (CTEST_DROP_METHOD "http")
set (CTEST_DROP_METHOD "https")
if (CTEST_DROP_SITE_INIT)
set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}")
else ()

369
MANIFEST
View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -28,14 +28,19 @@
./MANIFEST
./Makefile.dist
./Makefile.am
./README.txt
./README.md
./acsite.m4
./autogen.sh
./configure.ac
./.clang-format
./.github/CODEOWNERS _DO_NOT_DISTRIBUTE_
./.github/workflows/clang-format-fix.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/clang-format-check.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/main.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/pr-check.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/codespell.yml _DO_NOT_DISTRIBUTE_
./m4/aclocal_cxx.m4
./m4/aclocal_fc.m4
./m4/aclocal_fc.f90
./m4/ax_check_class.m4
@@ -46,6 +51,7 @@
./m4/ax_java_check_class.m4
./m4/ax_java_options.m4
./m4/ax_jni_include_dir.m4
./m4/ax_prog_doxygen.m4
./m4/ax_prog_jar.m4
./m4/ax_prog_java_cc.m4
./m4/ax_prog_java_works.m4
@@ -57,7 +63,6 @@
./m4/ax_try_compile_java.m4
./m4/ax_try_run_java.m4
./bin/COPYING
./bin/bbrelease _DO_NOT_DISTRIBUTE_
./bin/buildhdf5
./bin/checkapi _DO_NOT_DISTRIBUTE_
@@ -71,6 +76,8 @@
./bin/deploy
./bin/distdep
./bin/errors _DO_NOT_DISTRIBUTE_
./bin/format_source
./bin/format_source_patch
./bin/genparser
./bin/gcov_script _DO_NOT_DISTRIBUTE_
./bin/h5cc.in
@@ -114,7 +121,6 @@
./bin/pkgscrpts/makeInternalREADME.pl _DO_NOT_DISTRIBUTE_
./bin/pkgscrpts/makeOuterREADME.pl _DO_NOT_DISTRIBUTE_
./config/COPYING
./config/BlankForm
./config/apple
./config/cce-fflags
@@ -130,8 +136,10 @@
./config/cygwin
./config/ibm-aix
./config/ibm-flags
./config/intel-cxxflags
./config/intel-fflags
./config/intel-flags
./config/libhdf5.pc.in
./config/linux-gnu
./config/linux-gnuaout
./config/linux-gnueabihf
@@ -140,6 +148,7 @@
./config/lt_vers.am
./config/Makefile.am.blank
./config/netbsd
./config/pgi-cxxflags
./config/pgi-fflags
./config/pgi-flags
./config/solaris
@@ -159,14 +168,19 @@
./config/gnu-warnings/7
./config/gnu-warnings/8
./config/gnu-warnings/9
./config/gnu-warnings/9.3
./config/gnu-warnings/cxx-general
./config/gnu-warnings/cxx-4.8
./config/gnu-warnings/cxx-4.9
./config/gnu-warnings/cxx-5
./config/gnu-warnings/cxx-9
./config/gnu-warnings/cxx-developer-4.8
./config/gnu-warnings/cxx-error-5
./config/gnu-warnings/cxx-error-general
./config/gnu-warnings/developer-4.8
./config/gnu-warnings/developer-7
./config/gnu-warnings/developer-8
./config/gnu-warnings/developer-10
./config/gnu-warnings/developer-general
./config/gnu-warnings/error-5
./config/gnu-warnings/error-8
@@ -174,18 +188,117 @@
./config/gnu-warnings/general
./config/gnu-warnings/gfort-general
./config/gnu-warnings/gfort-4.8
./config/gnu-warnings/gfort-5
./config/gnu-warnings/developer-gfort-5
./config/gnu-warnings/gfort-6
./config/gnu-warnings/gfort-8
./config/gnu-warnings/no-cxx-developer-4.8
./config/gnu-warnings/no-developer-4.8
./config/gnu-warnings/no-developer-8
./config/gnu-warnings/no-developer-general
./config/intel-warnings/ifort-general
./config/intel-warnings/15
./config/intel-warnings/18
./config/intel-warnings/developer-general
./config/intel-warnings/general
./config/intel-warnings/win-developer-general
./config/intel-warnings/win-general
./config/intel-warnings/ifort-general
./config/cmake/FindMFU.cmake
./config/cmake/FindDTCMP.cmake
./config/cmake/FindCIRCLE.cmake
./config/site-specific/BlankForm
./doc/branches-explained.md
./doc/code-conventions.md
./doc/contributing.md
./doc/library-init-shutdown.md
./doxygen/aliases
./doxygen/CMakeLists.txt
./doxygen/Doxyfile.in
./doxygen/dox/APIVersions.dox
./doxygen/dox/About.dox
./doxygen/dox/Cookbook.dox
./doxygen/dox/DDLBNF110.dox
./doxygen/dox/DDLBNF112.dox
./doxygen/dox/FTS.dox
./doxygen/dox/GettingStarted.dox
./doxygen/dox/Glossary.dox
./doxygen/dox/H5AC_cache_config_t.dox
./doxygen/dox/MetadataCachingInHDF5.dox
./doxygen/dox/Overview.dox
./doxygen/dox/ReferenceManual.dox
./doxygen/dox/RFC.dox
./doxygen/dox/Specifications.dox
./doxygen/dox/TechnicalNotes.dox
./doxygen/dox/api-compat-macros.dox
./doxygen/dox/maybe_metadata_reads.dox
./doxygen/dox/rm-template.dox
./doxygen/dox/cookbook/Accessibility.c
./doxygen/dox/cookbook/Accessibility.dox
./doxygen/dox/cookbook/Attributes.c
./doxygen/dox/cookbook/Attributes.dox
./doxygen/dox/cookbook/Files.c
./doxygen/dox/cookbook/Files.dox
./doxygen/dox/cookbook/Performance.dox
./doxygen/examples/DebuggingHDF5Applications.html
./doxygen/examples/FF-IH_FileGroup.gif
./doxygen/examples/FF-IH_FileObject.gif
./doxygen/examples/FileFormat.html
./doxygen/examples/FileFormatSpecChunkDiagram.jpg
./doxygen/examples/Filters.html
./doxygen/examples/H5Pset_metadata_read_attempts.c
./doxygen/examples/H5Pset_object_flush_cb.c
./doxygen/examples/H5.format.1.0.html
./doxygen/examples/H5.format.1.1.html
./doxygen/examples/H5.format.2.0.html
./doxygen/examples/H5.format.html
./doxygen/examples/H5A_examples.c
./doxygen/examples/H5D_examples.c
./doxygen/examples/H5E_examples.c
./doxygen/examples/H5Fclose.c
./doxygen/examples/H5Fcreate.c
./doxygen/examples/H5F_examples.c
./doxygen/examples/H5G_examples.c
./doxygen/examples/H5I_examples.c
./doxygen/examples/H5L_examples.c
./doxygen/examples/H5O_examples.c
./doxygen/examples/H5PL_examples.c
./doxygen/examples/H5Pget_metadata_read_attempts.1.c
./doxygen/examples/H5Pget_metadata_read_attempts.2.c
./doxygen/examples/H5Pget_metadata_read_attempts.3.c
./doxygen/examples/H5Pget_object_flush_cb.c
./doxygen/examples/H5P_examples.c
./doxygen/examples/H5R_examples.c
./doxygen/examples/H5S_examples.c
./doxygen/examples/H5T_examples.c
./doxygen/examples/H5Z_examples.c
./doxygen/examples/H5_examples.c
./doxygen/examples/ImageSpec.html
./doxygen/examples/IOFlow.html
./doxygen/examples/PaletteExample1.gif
./doxygen/examples/Palettes.fm.anc.gif
./doxygen/examples/TableSpec.html
./doxygen/examples/ThreadSafeLibrary.html
./doxygen/examples/VFL.html
./doxygen/examples/hello_hdf5.c
./doxygen/hdf5_footer.html
./doxygen/hdf5_header.html
./doxygen/hdf5_navtree_hacks.js
./doxygen/hdf5doxy.css
./doxygen/hdf5doxy_layout.xml
./doxygen/img/FF-IH_FileGroup.gif
./doxygen/img/FF-IH_FileObject.gif
./doxygen/img/FileFormatSpecChunkDiagram.jpg
./doxygen/img/HDF5.png
./doxygen/img/HDFG-logo.png
./doxygen/img/IOFlow.gif
./doxygen/img/IOFlow2.gif
./doxygen/img/IOFlow3.gif
./doxygen/img/PaletteExample1.gif
./doxygen/img/Palettes.fm.anc.gif
./doxygen/img/ftv2node.png
./doxygen/img/ftv2pnode.png
./examples/Attributes.txt
./examples/Makefile.am
@@ -237,7 +350,6 @@
#
#------------------------------------------------------------------------------
./fortran/COPYING
./fortran/Makefile.am
./fortran/robodoc.rc
@@ -369,7 +481,6 @@
#
#------------------------------------------------------------------------------
./c++/COPYING
./c++/Makefile.am
./c++/examples/chunks.cpp
@@ -500,11 +611,12 @@
#
#------------------------------------------------------------------------------
./release_docs/COPYING
./release_docs/HISTORY-1_0-1_8_0_rc3.txt
./release_docs/HISTORY-1_8_0-1_10_0.txt
./release_docs/HISTORY-1_10_0-1_12_0.txt
./release_docs/HISTORY-1_8.txt
./release_docs/HISTORY-1_10.txt
./release_docs/HISTORY-1_8_0-1_10_0.txt
./release_docs/HISTORY-1_12.txt
./release_docs/INSTALL
./release_docs/INSTALL_CMake.txt
./release_docs/INSTALL_Cygwin.txt
@@ -521,7 +633,6 @@
./src/hdf5.lnt _DO_NOT_DISTRIBUTE_
./src/hdf5-win.lnt _DO_NOT_DISTRIBUTE_
./src/hdf5-lin.lnt _DO_NOT_DISTRIBUTE_
./src/COPYING
./src/H5.c
./src/H5checksum.c
./src/H5dbg.c
@@ -529,6 +640,7 @@
./src/H5err.txt
./src/H5detect.c
./src/H5make_libsettings.c
./src/H5module.h
./src/H5mpi.c
./src/H5overflow.txt
./src/H5private.h
@@ -643,6 +755,14 @@
./src/H5EAsblock.c
./src/H5EAstat.c
./src/H5EAtest.c
./src/H5ES.c
./src/H5ESdevelop.h
./src/H5ESevent.c
./src/H5ESint.c
./src/H5ESlist.c
./src/H5ESmodule.h
./src/H5ESpkg.h
./src/H5ESprivate.h
./src/H5ESpublic.h
./src/H5F.c
./src/H5Faccum.c
@@ -680,6 +800,7 @@
./src/H5FD.c
./src/H5FDcore.c
./src/H5FDcore.h
./src/H5FDdevelop.h
./src/H5FDdirect.c
./src/H5FDdirect.h
./src/H5FDdrvr_module.h
@@ -692,6 +813,7 @@
./src/H5FDlog.h
./src/H5FDmirror.c
./src/H5FDmirror.h
./src/H5FDmirror_priv.h
./src/H5FDmodule.h
./src/H5FDmpi.c
./src/H5FDmpi.h
@@ -699,6 +821,7 @@
./src/H5FDmpio.h
./src/H5FDmulti.c
./src/H5FDmulti.h
./src/H5FDperform.c
./src/H5FDros3.c
./src/H5FDros3.h
./src/H5FDpkg.h
@@ -791,6 +914,9 @@
./src/H5HP.c
./src/H5HPprivate.h
./src/H5I.c
./src/H5Idbg.c
./src/H5Idevelop.h
./src/H5Iint.c
./src/H5Imodule.h
./src/H5Ipkg.h
./src/H5Iprivate.h
@@ -798,7 +924,9 @@
./src/H5Itest.c
./src/H5L.c
./src/H5Ldeprec.c
./src/H5Ldevelop.h
./src/H5Lexternal.c
./src/H5Lint.c
./src/H5Lmodule.h
./src/H5Lpkg.h
./src/H5Lprivate.h
@@ -910,9 +1038,8 @@
./src/H5Rpkg.h
./src/H5Rprivate.h
./src/H5Rpublic.h
./src/H5UC.c
./src/H5UCprivate.h
./src/H5RS.c
./src/H5RSmodule.h
./src/H5RSprivate.h
./src/H5S.c
./src/H5Sall.c
@@ -939,8 +1066,6 @@
./src/H5SMpkg.h
./src/H5SMprivate.h
./src/H5SMtest.c
./src/H5ST.c
./src/H5STprivate.h
./src/H5T.c
./src/H5Tarray.c
./src/H5Tbit.c
@@ -950,6 +1075,7 @@
./src/H5Tcset.c
./src/H5Tdbg.c
./src/H5Tdeprec.c
./src/H5Tdevelop.h
./src/H5Tenum.c
./src/H5Tfields.c
./src/H5Tfixed.c
@@ -970,11 +1096,15 @@
./src/H5Tvisit.c
./src/H5Tvlen.c
./src/H5TS.c
./src/H5TSdevelop.h
./src/H5TSprivate.h
./src/H5UC.c
./src/H5UCprivate.h
./src/H5VL.c
./src/H5VLcallback.c
./src/H5VLconnector.h
./src/H5VLconnector_passthru.h
./src/H5VLdyn_ops.c
./src/H5VLint.c
./src/H5VLmodule.h
./src/H5VLnative.c
@@ -995,12 +1125,14 @@
./src/H5VLpkg.h
./src/H5VLprivate.h
./src/H5VLpublic.h
./src/H5VLtest.c
./src/H5VM.c
./src/H5VMprivate.h
./src/H5WB.c
./src/H5WBprivate.h
./src/H5Z.c
./src/H5Zdeflate.c
./src/H5Zdevelop.h
./src/H5Zfletcher32.c
./src/H5Zmodule.h
./src/H5Znbit.c
@@ -1015,9 +1147,9 @@
./src/hdf5.h
./src/libhdf5.settings.in
./src/H5win32defs.h
./src/uthash.h
./test/AtomicWriterReader.txt
./test/COPYING
./test/H5srcdir.h
./test/H5srcdir_str.h.in
./test/Makefile.am
@@ -1038,9 +1170,9 @@
./test/be_extlink2.h5
./test/big.c
./test/bittests.c
./test/btree2.c
./test/btree_idx_1_6.h5
./test/btree_idx_1_8.h5
./test/btree2.c
./test/cache.c
./test/cache_api.c
./test/cache_common.c
@@ -1050,22 +1182,27 @@
./test/cache_tagging.c
./test/chunk_info.c
./test/cmpd_dset.c
./test/cmpd_dtransform.c
./test/cork.c
./test/corrupt_stab_msg.h5
./test/cross_read.c
./test/cve_2020_10810.h5
./test/dangle.c
./test/deflate.h5
./test/del_many_dense_attrs.c
./test/direct_chunk.c
./test/dsets.c
./test/dt_arith.c
./test/dtypes.c
./test/dtransform.c
./test/dtypes.c
./test/earray.c
./test/efc.c
./test/enc_dec_plist.c
./test/enc_dec_plist_cross_platform.c
./test/enum.c
./test/err_compat.c
./test/error_test.c
./test/event_set.c
./test/evict_on_close.c
./test/extend.c
./test/external.c
@@ -1073,25 +1210,21 @@
./test/external_common.h
./test/external_env.c
./test/external_fname.h
./test/error_test.c
./test/err_compat.c
./test/filter_error.h5
./test/links_env.c
./test/family_v16_00000.h5
./test/family_v16_00001.h5
./test/family_v16_00002.h5
./test/family_v16_00003.h5
./test/family_v16-000000.h5
./test/family_v16-000001.h5
./test/family_v16-000002.h5
./test/family_v16-000003.h5
./test/farray.c
./test/fheap.c
./test/filespace_1_8.h5
./test/filespace_1_6.h5
./test/freespace.c
./test/filenotclosed.c
./test/file_image.c
./test/file_image_core_test.h5
./test/fill_old.h5
./test/filenotclosed.c
./test/filespace_1_6.h5
./test/filespace_1_8.h5
./test/fill18.h5
./test/fill_old.h5
./test/fillval.c
./test/filter_error.h5
./test/filter_fail.c
./test/filter_plugin.c
./test/filter_plugin1_dsets.c
@@ -1101,13 +1234,12 @@
./test/flush1.c
./test/flush2.c
./test/flushrefresh.c
./test/freespace.c
./test/fsm_aggr_nopersist.h5
./test/fsm_aggr_persist.h5
./test/genall5.c
./test/genall5.h
./test/gen_bad_compound.c
./test/gen_bad_offset.c
./test/gen_bad_ohdr.c
./test/gen_bad_compound.c
./test/gen_bogus.c
./test/gen_bounds.c
./test/gen_cross.c
@@ -1131,6 +1263,8 @@
./test/gen_sizes_lheap.c
./test/gen_specmetaread.c
./test/gen_udlinks.c
./test/genall5.c
./test/genall5.h
./test/getname.c
./test/gheap.c
./test/group_old.h5
@@ -1150,6 +1284,7 @@
./test/le_extlink2.h5
./test/lheap.c
./test/links.c
./test/links_env.c
./test/memleak_H5O_dtype_decode_helper_H5Odtype.h5
./test/mergemsg.h5
./test/mf.c
@@ -1163,15 +1298,17 @@
./test/ntypes.c
./test/null_vol_connector.c
./test/null_vol_connector.h
./test/ohdr.c
./test/null_vfd_plugin.c
./test/null_vfd_plugin.h
./test/objcopy.c
./test/objcopy_ref.c
./test/ohdr.c
./test/page_buffer.c
./test/paged_nopersist.h5
./test/paged_persist.h5
./test/pool.c
./test/reserved.c
./test/ros3.c
./test/pool.c
./test/s3comms.c
./test/set_extent.c
# ====distribute this for now. See HDFFV-8236====
@@ -1181,7 +1318,6 @@
./test/stab.c
./test/swmr.c
./test/swmr_addrem_writer.c
./test/swmr_check_compat_vfd.c
./test/swmr_common.c
./test/swmr_common.h
./test/swmr_generator.c
@@ -1197,30 +1333,32 @@
./test/tattr.c
./test/tbad_msg_count.h5
./test/tbogus.h5
./test/tchecksum.c
./test/tcheck_version.c
./test/tchecksum.c
./test/tconfig.c
./test/tcoords.c
./test/test_filter_plugin.sh.in
./test/test_filters_be.h5
./test/test_filters_le.h5
./test/test_usecases.sh.in
./test/test_vol_plugin.sh.in
./test/testabort_fail.sh.in
./test/testcheck_version.sh.in
./test/testexternal_env.sh.in
./test/testerror.sh.in
./test/testlinks_env.sh.in
./test/test_filter_plugin.sh.in
./test/test_filters_le.h5
./test/test_filters_be.h5
./test/testexternal_env.sh.in
./test/testflushrefresh.sh.in
./test/testframe.c
./test/testhdf5.c
./test/testhdf5.h
./test/testlibinfo.sh.in
./test/test_mirror.sh.in
./test/test_usecases.sh.in
./test/test_vol_plugin.sh.in
./test/testlinks_env.sh.in
./test/testmeta.c
./test/test_mirror.sh.in
./test/testswmr.pwsh.in
./test/testswmr.sh.in
./test/testvdsswmr.sh.in
./test/testvds_env.sh.in
./test/testvdsswmr.pwsh.in
./test/testvdsswmr.sh.in
./test/tfile.c
./test/tgenprop.c
./test/th5o.c
@@ -1236,7 +1374,6 @@
./test/tmisc.c
./test/tmtimen.h5
./test/tmtimeo.h5
./test/ttime.c
./test/trefer.c
./test/trefer_deprec.c
./test/trefer_shutdown.c
@@ -1245,7 +1382,7 @@
./test/tsizeslheap.h5
./test/tskiplist.c
./test/tsohm.c
./test/ttst.c
./test/ttime.c
./test/ttsafe.c
./test/ttsafe.h
./test/ttsafe_acreate.c
@@ -1259,12 +1396,12 @@
./test/twriteorder.c
./test/unlink.c
./test/unregister.c
./test/use.h
./test/use_append_chunk.c
./test/use_append_chunk_mirror.c
./test/use_append_mchunks.c
./test/use_common.c
./test/use_disable_mdc_flushes.c
./test/use.h
./test/vds.c
./test/vds_env.c
./test/vds_swmr.h
@@ -1272,6 +1409,7 @@
./test/vds_swmr_reader.c
./test/vds_swmr_writer.c
./test/vfd.c
./test/vfd_plugin.c
./test/vol.c
./test/vol_plugin.c
@@ -1377,7 +1515,6 @@
./test/testfiles/plist_files/strcpl_64be
./test/testfiles/plist_files/strcpl_64le
./testpar/COPYING
./testpar/Makefile.am
./testpar/t_bigio.c
./testpar/t_cache.c
@@ -1409,7 +1546,6 @@
./testpar/testphdf5.c
./testpar/testphdf5.h
./tools/COPYING
./tools/Makefile.am
./tools/src/Makefile.am
./tools/test/Makefile.am
@@ -1639,6 +1775,7 @@
./tools/src/misc/Makefile.am
./tools/src/misc/h5clear.c
./tools/src/misc/h5debug.c
./tools/src/misc/h5delete.c
./tools/src/misc/h5mkgrp.c
./tools/src/misc/h5repart.c
./tools/test/misc/Makefile.am
@@ -1921,6 +2058,9 @@
./tools/testfiles/tfill.ddl
./tools/testfiles/tfilters.h5
./tools/testfiles/tfletcher32.ddl
./tools/testfiles/tfloatsattrs.ddl
./tools/testfiles/tfloatsattrs.h5
./tools/testfiles/tfloatsattrs.wddl
./tools/testfiles/tfvalues.h5
./tools/testfiles/tgroup-1.ddl
./tools/testfiles/tgroup-2.ddl
@@ -1958,7 +2098,10 @@
./tools/testfiles/tintsnodata.h5
./tools/testfiles/tlarge_objname.ddl
./tools/testfiles/tlarge_objname.h5
./tools/testfiles/tldouble.ddl
./tools/testfiles/tldouble.h5
./tools/testfiles/tldouble_scalar.ddl
./tools/testfiles/tldouble_scalar.h5
./tools/testfiles/tlonglinks.ddl
./tools/testfiles/tlonglinks.h5
./tools/testfiles/tloop-1.ddl
@@ -2065,6 +2208,8 @@
./tools/testfiles/twithddl.exp
./tools/testfiles/twithddlfile.ddl
./tools/testfiles/twithddlfile.exp
./tools/testfiles/tCVE_2018_11206_fill_old.h5
./tools/testfiles/tCVE_2018_11206_fill_new.h5
# h5dump test error files
./tools/test/h5dump/errfiles/filter_fail.err
@@ -2492,6 +2637,7 @@
./tools/test/h5diff/testfiles/h5diff_80.txt
./tools/test/h5diff/testfiles/h5diff_800.txt
./tools/test/h5diff/testfiles/h5diff_801.txt
./tools/test/h5diff/testfiles/h5diff_830.txt
./tools/test/h5diff/testfiles/h5diff_90.txt
./tools/test/h5diff/testfiles/h5diff_100.txt
./tools/test/h5diff/testfiles/h5diff_101.txt
@@ -2662,6 +2808,7 @@
#test files for h5repack
./tools/test/h5repack/testfiles/README
./tools/test/h5repack/testfiles/bounds_latest_latest.h5
./tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
./tools/test/h5repack/testfiles/h5repack_aggr.h5
./tools/test/h5repack/testfiles/h5repack_attr.h5
./tools/test/h5repack/testfiles/h5repack_attr_refs.h5
@@ -2727,6 +2874,8 @@
./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl
./tools/test/h5repack/testfiles/h5repack_CVE-2018-17432.h5
./tools/test/h5repack/testfiles/h5repack_CVE-2018-14460.h5
./tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl
./tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl
./tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl
@@ -2740,6 +2889,31 @@
./tools/test/h5repack/testfiles/4_vds.h5-vds_compa-v.ddl
./tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl
./tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl
./tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
./tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
./tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
./tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
./tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
./tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
./tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
./tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
./tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
./tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
./tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
./tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
./tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
./tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
./tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
./tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
./tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
./tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
./tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
./tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
./tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
./tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
./tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
./tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
./tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
# jam utility and tests
./tools/src/h5jam/Makefile.am
@@ -2796,7 +2970,15 @@
./tools/testfiles/h5mkgrp_single_p.ls
./tools/testfiles/h5mkgrp_single_l.ls
./tools/test/perform/COPYING
./tools/src/h5perf/Makefile.am
./tools/src/h5perf/perf.c
./tools/src/h5perf/pio_engine.c
./tools/src/h5perf/pio_perf.c
./tools/src/h5perf/pio_perf.h
./tools/src/h5perf/sio_engine.c
./tools/src/h5perf/sio_perf.c
./tools/src/h5perf/sio_perf.h
./tools/test/perform/Makefile.am
./tools/test/perform/build_h5perf_alone.sh
./tools/test/perform/build_h5perf_serial_alone.sh
@@ -2806,22 +2988,14 @@
./tools/test/perform/gen_report.pl
./tools/test/perform/iopipe.c
./tools/test/perform/overhead.c
./tools/test/perform/perf.c
./tools/test/perform/perf_meta.c
./tools/test/perform/pio_engine.c
./tools/test/perform/pio_perf.c
./tools/test/perform/pio_perf.h
./tools/test/perform/pio_standalone.c
./tools/test/perform/pio_standalone.h
./tools/test/perform/sio_engine.c
./tools/test/perform/sio_perf.c
./tools/test/perform/sio_perf.h
./tools/test/perform/sio_standalone.c
./tools/test/perform/sio_standalone.h
./tools/test/perform/zip_perf.c
# Utils directory
./utils/COPYING
./utils/Makefile.am
# Mirror VFD utilities
@@ -2832,8 +3006,27 @@
./utils/mirror_vfd/mirror_server_stop.c
./utils/mirror_vfd/mirror_writer.c
# test utilities
./utils/test/Makefile.am
./utils/test/swmr_check_compat_vfd.c
# parallel tools (h5dwalk) and tests
./utils/tools/CMakeLists.txt
./utils/tools/Makefile.am
./utils/tools/h5dwalk/CMakeLists.txt
./utils/tools/h5dwalk/Makefile.am
./utils/tools/h5dwalk/h5dwalk.1
./utils/tools/h5dwalk/h5dwalk.c
./utils/tools/test/CMakeLists.txt
./utils/tools/test/Makefile.am
./utils/tools/test/h5dwalk/CMakeLists.txt
./utils/tools/test/h5dwalk/CMakeTests.cmake
./utils/tools/test/h5dwalk/Makefile.am
./utils/tools/test/h5dwalk/copy_demo_files.sh.in
./utils/tools/test/h5dwalk/help.h5dwalk
./utils/tools/test/h5dwalk/testh5dwalk.sh.in
# high level libraries
./hl/COPYING
./hl/Makefile.am
./hl/examples/Makefile.am
./hl/examples/ex_ds1.c
@@ -2860,7 +3053,6 @@
./hl/examples/ptExampleFL.c
./hl/examples/run-hl-ex.sh
./hl/examples/run-hlc-ex.sh.in
./hl/src/COPYING
./hl/src/Makefile.am
./hl/src/H5DO.c
./hl/src/H5DOpublic.h
@@ -2889,7 +3081,6 @@
./hl/src/H5TBprivate.h
./hl/src/H5TBpublic.h
./hl/src/hdf5_hl.h
./hl/test/COPYING
./hl/test/H5srcdir_str.h.in
./hl/test/Makefile.am
./hl/test/dsdata.txt
@@ -2908,7 +3099,10 @@
./hl/test/sepia.pal
./hl/test/test_ds.c
./hl/test/test_ds_be.h5
./hl/test/test_ds_be_new_ref.h5
./hl/test/test_ds_be_new_ref-32bit.h5
./hl/test/test_ds_le.h5
./hl/test/test_ds_le_new_ref.h5
./hl/test/test_dset_append.c
./hl/test/test_file_image.c
./hl/test/test_h5do_compat.c
@@ -2925,7 +3119,6 @@
./hl/test/usa.wri
# tools
./hl/tools/COPYING
./hl/tools/Makefile.am
./hl/tools/gif2h5/Makefile.am
./hl/tools/gif2h5/decompress.c
@@ -2947,7 +3140,6 @@
./hl/tools/h5watch/extend_dset.c
./hl/tools/h5watch/h5watch.c
./hl/tools/h5watch/h5watchgentest.c
./hl/tools/h5watch/swmr_check_compat_vfd.c
./hl/tools/h5watch/testh5watch.sh.in
# expected test output from testing h5watch
@@ -2990,7 +3182,6 @@
./hl/tools/testfiles/w-help1.ddl
# hl fortran
./hl/fortran/COPYING
./hl/fortran/Makefile.am
./hl/fortran/examples/Makefile.am
./hl/fortran/examples/run-hlfortran-ex.sh.in
@@ -3015,7 +3206,6 @@
./hl/fortran/test/tsttable.F90
# hl c++
./hl/c++/COPYING
./hl/c++/Makefile.am
./hl/c++/examples/Makefile.am
./hl/c++/examples/ptExampleFL.cpp
@@ -3028,7 +3218,6 @@
./hl/c++/test/Makefile.am
# java
./java/COPYING
./java/Makefile.am
./java/CMakeLists.txt
@@ -3135,8 +3324,8 @@
./java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java
./java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java
./java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java
./java/src/hdf/hdf5lib/callbacks/package-info.java
./java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java
./java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java
./java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java
./java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java
@@ -3150,6 +3339,7 @@
./java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java
./java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java
./java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java
./java/src/hdf/hdf5lib/exceptions/HDF5IdException.java
./java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java
./java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java
./java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
@@ -3160,6 +3350,7 @@
./java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java
./java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java
./java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java
./java/src/hdf/hdf5lib/exceptions/package-info.java
./java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
./java/src/hdf/hdf5lib/structs/H5A_info_t.java
@@ -3174,12 +3365,14 @@
./java/src/hdf/hdf5lib/structs/H5O_info_t.java
./java/src/hdf/hdf5lib/structs/H5O_native_info_t.java
./java/src/hdf/hdf5lib/structs/H5O_token_t.java
./java/src/hdf/hdf5lib/structs/package-info.java
./java/src/hdf/hdf5lib/H5.java
./java/src/hdf/hdf5lib/HDF5Constants.java
./java/src/hdf/hdf5lib/HDF5GroupInfo.java
./java/src/hdf/hdf5lib/HDFArray.java
./java/src/hdf/hdf5lib/HDFNativeData.java
./java/src/hdf/hdf5lib/package-info.java
./java/examples/Makefile.am
./java/examples/CMakeLists.txt
@@ -3309,9 +3502,11 @@
./java/test/junit.sh.in
./java/test/testfiles/JUnit-TestH5.txt
./java/test/testfiles/JUnit-TestH5A.txt
./java/test/testfiles/JUnit-TestH5Arw.txt
./java/test/testfiles/JUnit-TestH5Dparams.txt
./java/test/testfiles/JUnit-TestH5D.txt
./java/test/testfiles/JUnit-TestH5Dplist.txt
./java/test/testfiles/JUnit-TestH5Drw.txt
./java/test/testfiles/JUnit-TestH5E.txt
./java/test/testfiles/JUnit-TestH5Edefault.txt
./java/test/testfiles/JUnit-TestH5Eparams.txt
@@ -3330,6 +3525,7 @@
./java/test/testfiles/JUnit-TestH5Obasic.txt
./java/test/testfiles/JUnit-TestH5Ocreate.txt
./java/test/testfiles/JUnit-TestH5Ocopy.txt
./java/test/testfiles/JUnit-TestH5OcopyOld.txt
./java/test/testfiles/JUnit-TestH5P.txt
./java/test/testfiles/JUnit-TestH5PData.txt
./java/test/testfiles/JUnit-TestH5Pfapl.txt
@@ -3339,6 +3535,7 @@
./java/test/testfiles/JUnit-TestH5Pvirtual.txt
./java/test/testfiles/JUnit-TestH5PL.txt
./java/test/testfiles/JUnit-TestH5R.txt
./java/test/testfiles/JUnit-TestH5Rref.txt
./java/test/testfiles/JUnit-TestH5Sbasic.txt
./java/test/testfiles/JUnit-TestH5S.txt
./java/test/testfiles/JUnit-TestH5Tparams.txt
@@ -3349,9 +3546,11 @@
./java/test/h5ex_g_iterate.orig
./java/test/TestH5.java
./java/test/TestH5A.java
./java/test/TestH5Arw.java
./java/test/TestH5Dparams.java
./java/test/TestH5D.java
./java/test/TestH5Dplist.java
./java/test/TestH5Drw.java
./java/test/TestH5E.java
./java/test/TestH5Edefault.java
./java/test/TestH5Eparams.java
@@ -3370,6 +3569,7 @@
./java/test/TestH5Obasic.java
./java/test/TestH5Ocreate.java
./java/test/TestH5Ocopy.java
./java/test/TestH5OcopyOld.java
./java/test/TestH5P.java
./java/test/TestH5PData.java
./java/test/TestH5Pfapl.java
@@ -3379,6 +3579,7 @@
./java/test/TestH5Pvirtual.java
./java/test/TestH5PL.java
./java/test/TestH5R.java
./java/test/TestH5Rref.java
./java/test/TestH5Sbasic.java
./java/test/TestH5S.java
./java/test/TestH5Tparams.java
@@ -3391,9 +3592,9 @@
./java/lib/hamcrest-core.jar
./java/lib/junit.jar
./java/lib/simplelogger.properties
./java/lib/slf4j-api-1.7.25.jar
./java/lib/ext/slf4j-nop-1.7.25.jar
./java/lib/ext/slf4j-simple-1.7.25.jar
./java/lib/slf4j-api-1.7.33.jar
./java/lib/ext/slf4j-nop-1.7.33.jar
./java/lib/ext/slf4j-simple-1.7.33.jar
# CMake-specific Files
./config/toolchain/build32.cmake
@@ -3412,25 +3613,24 @@
./config/cmake/CTestCustom.cmake
./config/cmake/fileCompareTest.cmake
./config/cmake/FindHDFS.cmake
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
./config/cmake/hdf5-config.cmake.in
./config/cmake/hdf5-config-version.cmake.in
./config/cmake/HDFCompilerFlags.cmake
./config/cmake/HDFCXXCompilerFlags.cmake
./config/cmake/HDFFortranCompilerFlags.cmake
./config/cmake/HDF5_Process_Flex_Files.cmake
./config/cmake/HDF5Macros.cmake
./config/cmake/HDF5PluginMacros.cmake
./config/cmake/HDF5PluginCache.cmake
./config/cmake/HDF5UseFortran.cmake
./config/cmake/javaTargets.cmake.in
./config/cmake/jrunTest.cmake
./config/cmake/jvolTest.cmake
./config/cmake/libh5cc.in
./config/cmake/libhdf5.pc.in
./config/cmake/libhdf5.settings.cmake.in
./config/cmake/mccacheinit.cmake
./config/cmake/patch.xml
./config/cmake/PkgInfo.in
./config/cmake/README.txt.cmake.in
./config/cmake/README.md.cmake.in
./config/cmake/UseJava.cmake
./config/cmake/UseJavaClassFilelist.cmake
./config/cmake/UseJavaSymlinks.cmake
@@ -3447,11 +3647,9 @@
./config/cmake_ext_mod/hdf.bmp
./config/cmake_ext_mod/hdf.icns
./config/cmake_ext_mod/hdf.ico
./config/cmake_ext_mod/HDFCXXTests.cpp
./config/cmake_ext_mod/HDFLibMacros.cmake
./config/cmake_ext_mod/HDFMacros.cmake
./config/cmake_ext_mod/HDFTests.c
./config/cmake_ext_mod/HDFUseCXX.cmake
./config/cmake_ext_mod/HDFUseFortran.cmake
./config/cmake_ext_mod/NSIS.InstallOptions.ini.in
./config/cmake_ext_mod/NSIS.template.in
@@ -3468,6 +3666,7 @@
./CMakeLists.txt
./CMakeFilters.cmake
./CMakeInstallation.cmake
./CMakePlugins.cmake
./CTestConfig.cmake
./UserMacros.cmake
./c++/CMakeLists.txt
@@ -3562,6 +3761,7 @@
./tools/test/h5stat/CMakeLists.txt
./tools/test/h5stat/CMakeTests.cmake
./tools/src/misc/CMakeLists.txt
./tools/src/h5perf/CMakeLists.txt
./tools/test/misc/CMakeLists.txt
./tools/test/misc/CMakeTestsClear.cmake
./tools/test/misc/CMakeTestsMkgrp.cmake
@@ -3569,7 +3769,9 @@
./tools/test/misc/vds/CMakeLists.txt
./tools/test/perform/CMakeLists.txt
./tools/test/perform/CMakeTests.cmake
./utils/CMakeLists.txt
./utils/test/CMakeLists.txt
./utils/mirror_vfd/CMakeLists.txt
# CMake-specific User Scripts
@@ -3581,6 +3783,7 @@
# CMake-specific Sanitizer Scripts
./config/sanitizer/code-coverage.cmake
./config/sanitizer/formatting.cmake
./config/sanitizer/sanitizers.cmake
./config/sanitizer/tools.cmake
./config/sanitizer/LICENSE
@@ -3665,6 +3868,7 @@
./tools/src/h5import/Makefile.in
./tools/src/h5jam/Makefile.in
./tools/src/h5ls/Makefile.in
./tools/src/h5perf/Makefile.in
./tools/src/h5repack/Makefile.in
./tools/src/h5stat/Makefile.in
./tools/src/misc/Makefile.in
@@ -3681,3 +3885,6 @@
./tools/test/misc/Makefile.in
./tools/test/misc/vds/Makefile.in
./tools/test/perform/Makefile.in
./utils/Makefile.in
./utils/mirror_vfd/Makefile.in
./utils/test/Makefile.in

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -35,6 +35,9 @@
include $(top_srcdir)/config/commence.am
# include Doxygen rules (requires autoconf-archive >2016-03-20)
@DX_RULES@
# Define subdirectories to build.
## Automake understands that `make distclean' should recurse into
## conditional subdirectories even if `make all' does not.
@@ -85,9 +88,9 @@ else
TOOLS_DIR=
endif
SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin utils $(TOOLS_DIR) . \
SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin $(TOOLS_DIR) utils . \
$(CXX_DIR) $(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar utils tools . c++ fortran hl examples java
DIST_SUBDIRS = src test testpar tools utils . c++ fortran hl examples java
# Some files generated during configure that should be cleaned
DISTCLEANFILES=config/stamp1 config/stamp2
@@ -187,13 +190,18 @@ check-all-install:
trace:
@(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
# doxygen support
if BUILD_DOXYGEN_CONDITIONAL
doxygen: doxygen-doc
endif
# Run tests with different Virtual File Drivers.
# Currently, only invoke check-vfd in the test directory.
check-vfd:
for d in src utils test; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
for d in src utils test; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Run tests with different passthrough Virtual Object Layer Connectors.

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.

View File

@@ -1,8 +1,8 @@
HDF5 version 1.13.0 currently under development
HDF5 version 1.13.1-1 currently under development
------------------------------------------------------------------------------
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
![HDF5 Logo](doxygen/img/HDF5.png)
*Please refer to the release_docs/INSTALL file for installation instructions.*
THE HDF GROUP
---------------
@@ -13,17 +13,19 @@ de facto standard in scientific and research communities.
More information about The HDF Group, the HDF5 Community and the HDF5 software
project, tools and services can be found at the Group's website.
https://www.hdfgroup.org/
https://www.hdfgroup.org/
DOCUMENTATION
-------------
This release is fully functional for the API described in the documentation.
https://portal.hdfgroup.org/display/HDF5/The+HDF5+API
https://portal.hdfgroup.org/display/HDF5/The+HDF5+API
Full Documentation and Programming Resources for this release can be found at
https://portal.hdfgroup.org/display/HDF5
https://portal.hdfgroup.org/display/HDF5
See the RELEASE.txt file in the release_docs/ directory for information specific
to the features and updates included in this release of the library.
@@ -42,7 +44,7 @@ HELP AND SUPPORT
----------------
Information regarding Help Desk and Support services is available at
https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk
https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk
@@ -51,14 +53,14 @@ FORUM and NEWS
The following public forums are provided for public announcements and discussions
of interest to the general HDF5 Community.
Homepage of the Forum
https://forum.hdfgroup.org
- Homepage of the Forum
https://forum.hdfgroup.org
News and Announcement
https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group
- News and Announcement
https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group
HDF5 and HDF4 Topics
https://forum.hdfgroup.org/c/hdf5
- HDF5 and HDF4 Topics
https://forum.hdfgroup.org/c/hdf5
These forums are provided as an open and public service for searching and reading.
Posting requires completing a simple registration and allows one to join in the
@@ -70,11 +72,14 @@ use and configuration
SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE
--------------------------------------------
Periodically development code snapshots are provided at the following URL:
https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/
https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/
Source packages for current and previous releases are located at:
https://portal.hdfgroup.org/display/support/Downloads
https://portal.hdfgroup.org/display/support/Downloads
Development code is available at our BitBucket Server:
https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse
Development code is available at our Github location:
https://github.com/HDFGroup/hdf5.git

View File

@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -8,7 +8,7 @@ dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
dnl dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
dnl dnl distribution tree, or in https://www.hdfgroup.org/licenses.
dnl dnl If you do not have access to either file, you may request a copy from
dnl dnl help@hdfgroup.org.
dnl

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -1,13 +0,0 @@
Copyright by The HDF Group and
The Board of Trustees of the University of Illinois.
All rights reserved.
The files and subdirectories in this directory are part of HDF5.
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -48,7 +48,7 @@ USAGE()
{
cat << EOF
Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ...
-d DIR The name of the directory where the releas(es) should be
-d DIR The name of the directory where the release(s) should be
placed.
--docver BRANCHNAME This is added for 1.8 and beyond to get the correct
version of documentation files from the hdf5docs
@@ -103,7 +103,7 @@ EOF
# Modifications
#
# Steps:
# 1. untar the tarball in a temporay directory;
# 1. untar the tarball in a temporary directory;
# Note: do this in a temporary directory to avoid changing
# the original source directory which maybe around.
# 2. convert all its text files to DOS (LF-CR) style;
@@ -246,7 +246,7 @@ if [ "X$methods" = "X" ]; then
methods="tar"
fi
# Create the temporay work directory.
# Create the temporary work directory.
if mkdir $tmpdir; then
echo "temporary work directory for release. "\
"Can be deleted after release completes." > $tmpdir/README
@@ -320,9 +320,9 @@ ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1
test -f Makefile && mv Makefile $tmpdir/Makefile.x
cp -p Makefile.dist Makefile
# Update README.txt and release_docs/RELEASE.txt with release information in
# Update README.md and release_docs/RELEASE.txt with release information in
# line 1.
for f in README.txt release_docs/RELEASE.txt; do
for f in README.md release_docs/RELEASE.txt; do
echo "HDF5 version $VERS released on $release_date" >$f.x
sed -e 1d $f >>$f.x
mv $f.x $f

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -178,7 +178,7 @@ LOCATE_SZLIB()
esac
;; # end of case ncsa
unknown)
# Unknow domain. Give a shot at the some standard places.
# Unknown domain. Give a shot at the some standard places.
szlibpaths="/usr/local"
;;
esac # end of case $mydomain

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -10,7 +10,7 @@ use warnings;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -44,7 +44,27 @@ foreach $arg (@ARGV) {
#
# If a user specifies one file, process it no matter what so people
# can inspect files we normally skip (like H5system.c).
$ignore = 0;
# Ignored files in src/
if($#ARGV gt 0 and $filename =~ /H5FDmulti|H5FDstdio|H5VLpassthru|H5system|H5detect|H5make_libsettings/) {
$ignore = 1;
}
# Ignored atomic test files in test/
if($#ARGV gt 0 and $filename =~ /atomic_reader|atomic_writer/) {
$ignore = 1;
}
# Ignored filter plugins in test/
if($#ARGV gt 0 and $filename =~ /^filter_plugin\d_/) {
$ignore = 1;
}
# Ignored generators in test/
if($#ARGV gt 0 and $filename =~ /^gen_/) {
$ignore = 1;
}
if($ignore) {
print "$filename is exempt from using Standard library macro wrappers\n";
next;
}
@@ -95,13 +115,13 @@ foreach $arg (@ARGV) {
# These are really HDF5 functions/macros even though they don't
# start with `h' or `H'.
next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NOFS|_NOCLEAR|_NOINIT)?(_NOFUNC|_TAG)?$/;
next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NOFS|_NOCLEAR|_NOINIT|_NOPUSH)?(_NOFUNC|_TAG)?$/;
next if $name =~ /^(BEGIN|END)_FUNC$/;
next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)(_VAR)?$/;
next if $name =~ /^CI_(PRINT_STATS|INC_SRC|INC_DST)$/;
next if $name =~ /^(ABS|ADDR_OVERFLOW|ALL_MEMBERS|BOUND|CONSTR|DETECT_[I|F|M]|DOWN)$/;
next if $name =~ /^(MIN3?|MAX3?|NELMTS|POWER_OF_TWO|REGION_OVERFLOW)$/;
next if $name =~ /^(UNIQUE_MEMBERS|S_ISDIR)$/;
next if $name =~ /^(SIZE_OVERFLOW|UNIQUE_MEMBERS|S_ISDIR)$/;
next if $name =~ /^addr_defined$/;
# These functions/macros are exempt.
@@ -140,15 +160,38 @@ foreach $arg (@ARGV) {
next if $name =~ /^(pow_fun|round_fun|abs_fun|lround_fun|llround_fun)$/;
}
# This is a macro parameter in H5Rint.c. Ignore it in this file.
if($filename =~ /H5Rint/) {
next if $name =~ /^(func)$/;
}
# Internal calls in the HDFS VFD (H5FDhdfs.c). Ignore it in this file.
if($filename =~ /H5FDhdfs/) {
next if $name =~ /^(hdfs)/;
}
# Macros, etc. from the mirror VFD (H5FDmirror.c). Ignore in this file.
if($filename =~ /H5FDmirror/) {
next if $name =~ /^(LOG)/;
next if $name =~ /^(BSWAP_64|is_host_little_endian)$/;
}
# These are things in H5FDs3comms.c and H5FDros3.c. Ignore them in these files.
if($filename =~ /H5FDs3comms|H5FDros3/) {
next if $name =~ /^(curl_|curlwritecallback|gmnow)/;
next if $name =~ /^(ros3_|ROS3_|S3COMMS_)/;
next if $name =~ /^(EVP_sha256|SHA256|ISO8601NOW)$/;
}
# TESTING (not comprehensive - just noise reduction)
# Test macros and functions (testhdf5.h)
next if $name =~ /^(AddTest|TestErrPrintf|TestSummary|TestCleanup|TestShutdown)$/;
next if $name =~ /^(CHECK|CHECK_PTR|CHECK_PTR_NULL|CHECK_PTR_EQ|CHECK_I)$/;
next if $name =~ /^(VERIFY|VERIFY_STR|VERIFY|TYPE|MESSAGE|ERROR)$/;
next if $name =~ /^(VERIFY|VERIFY_STR|VERIFY_TYPE|MESSAGE|ERROR)$/;
# Test macros and functions (h5test.h)
next if $name =~ /^(TESTING|PASSED|SKIPPED|FAIL_PUTS_ERROR|FAIL_STACK_ERROR|TEST_ERROR)$/;
next if $name =~ /^(TESTING|PASSED|SKIPPED|PUTS_ERROR|FAIL_PUTS_ERROR|FAIL_STACK_ERROR|TEST_ERROR|AT)$/;
next if $name =~ /^(GetTestExpress)$/;
# Ignore functions that start with test_ or check_
@@ -158,9 +201,49 @@ foreach $arg (@ARGV) {
# Ignore functions that start with h5_
next if $name =~ /^h5_/;
# Ignore process completed status
next if $name =~ /(WIFEXITED|WEXITSTATUS|WIFSIGNALED|WTERMSIG|WCOREDUMP|WIFSTOPPED|WSTOPSIG)/;
# Ignore usage functions
next if $name =~ /^usage$/;
# Ignore callbacks
next if $name =~ /(_cb\d?)$/;
# Specific tests (not even remotely comprehensive)
# accum test code
if($filename =~ /accum/) {
next if $name =~ /^(accum_)/;
}
# cache test code
if($filename =~ /cache/) {
next if $name =~ /(_entry|_entries|_cache|_check|_dependency|_status|_op)$/;
next if $name =~ /^(verify_|smoke_check_|row_major_|col_major_)/;
next if $name =~ /^(resize_configs_are_equal|CACHE_ERROR)$/
}
# Splitter VFD test code. Ignore in vfd.c.
if($filename =~ /vfd/) {
next if $name =~ /^(SPLITTER_|splitter_)/;
next if $name =~ /(_splitter_)/;
next if $name =~ /^(file_exists)$/;
}
# S3 VFD test code. Ignore in ros3.c and s3comms.c.
# HDFS VFD test code. Ignore in hdfs.c.
if($filename =~ /ros3|s3comms|hdfs/) {
next if $name =~ /^(JSVERIFY|JSFAILED_|JSERR_|jserr_|FAIL_)/;
next if $name =~ /^(curl_)/;
next if $name =~ /^(S3COMMS_FORMAT_CREDENTIAL|ISO8601NOW|gmnow)$/;
}
# VDS test code. Ignore in vds.c.
if($filename =~ /vds/) {
next if $name =~ /^(vds_)/;
}
print "$filename:$.: $name\n";
}

View File

@@ -6,7 +6,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
##

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -199,7 +199,7 @@ DUMP_LOGFILE()
# Show a start time stamp
TIMESTAMP
# Initialize njobs if $AMKE is defined
# Initialize njobs if $MAKE is defined
if [ -n "$MAKE" ]; then
# assume all arguments are for --jobs
njobs=`echo $MAKE | cut -s -d' ' -f2-`
@@ -365,7 +365,7 @@ STEP "Test the library and tools..." "ctest . -C Release $njobs" $testlog
# 7. Create an install image with this command:
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
# The implementation of installation is imcomplete (only works for linux).
# The implementation of installation is incomplete (only works for linux).
# Screen it out for now till it is completed.
if false; then
# 8. Install with this command:

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -10,7 +10,7 @@ eval 'exec perl -p -x -S $0 ${1+"$@"}'
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -13,11 +13,11 @@ use Text::Tabs;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Robb Matzke, matzke@llnl.gov
# Robb Matzke
# 30 Aug 1997
#
# Purpose: This script will read standard input which should be a

26
bin/format_source Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
#
# Recursively format all C & C++ sources and header files, except those in the
# 'config' directory and generated files, such as H5LTanalyze.c, etc.
#
# Note that any files or directories that are excluded here should also be
# added to the 'exclude' list in .github/workflows/clang-format-check.yml
#
# (Remember to update both bin/format_source and bin/format_source_patch)
find . \( -type d -path ./config -prune -and -not -path ./config \) \
-or \( \( \! \( \
-name H5LTanalyze.c \
-or -name H5LTparse.c \
-or -name H5LTparse.h \
-or -name H5Epubgen.h \
-or -name H5Einit.h \
-or -name H5Eterm.h \
-or -name H5Edefin.h \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
| xargs clang-format -style=file -i -fallback-style=none
exit 0

34
bin/format_source_patch Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
#
# Recursively format all C & C++ sources and header files, except those in the
# 'config' directory and generated files, such as H5LTanalyze.c, etc.
#
# Note that any files or directories that are excluded here should also be
# added to the 'exclude' list in .github/workflows/clang-format-check.yml
#
# (Remember to update both bin/format_source and bin/format_source_patch)
find . \( -type d -path ./config -prune -and -not -path ./config \) \
-or \( \( \! \( \
-name H5LTanalyze.c \
-or -name H5LTparse.c \
-or -name H5LTparse.h \
-or -name H5Epubgen.h \
-or -name H5Einit.h \
-or -name H5Eterm.h \
-or -name H5Edefin.h \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
| xargs clang-format -style=file -i -fallback-style=none
git diff > clang_format.patch
# Delete if 0 size
if [ ! -s clang_format.patch ]
then
rm clang_format.patch
fi
exit 0

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.

View File

@@ -1,12 +1,12 @@
#! /bin/bash
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -27,7 +27,7 @@
# IMPORTANT OS X NOTE
#
# If you are using OS X, you will probably not have flex or bison
# installed. In addtion, even if you do have bison installed, the bison
# installed. In addition, even if you do have bison installed, the bison
# version you have installed may also have a bug that makes it unable to
# process our input files.
#
@@ -200,28 +200,34 @@ if [ "$verbose" = true ] ; then
fi
${HDF5_FLEX} --nounistd -PH5LTyy -o ${path_to_hl_src}/H5LTanalyze.c ${path_to_hl_src}/H5LTanalyze.l
# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
# instead of int. Currently the generated function H5LTyyparse is
# fix H5LTparse.c and H5LTlparse.h to declare H5LTyyparse return type as an
# hid_t instead of int. Currently the generated function H5LTyyparse is
# generated with a return value of type int, which is a mapping to the
# flex yyparse function. The return value in the HL library should be
# an hid_t.
# I propose to not use flex to generate this function, but for now I am
# an hid_t.
# I propose to not use flex to generate this function, but for now I am
# adding a perl command to find and replace this function declaration in
# H5LTparse.c.
perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.c
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.c
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.c
perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.h
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.h
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.h
# Add code that disables warnings in the flex/bison-generated code.
#
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
# will simply ignore them, but we want to avoid those warnings.
#
# Note also that although clang defines __GNUC__, it doesn't support every
# warning that GCC does.
for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c
do
echo '#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__ ' >> tmp.out
echo '#if defined (__GNUC__) ' >> tmp.out
echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
@@ -230,11 +236,19 @@ do
echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
echo '#if !defined (__clang__) ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out
echo '#endif ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
echo '#endif ' >> tmp.out
echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600 ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wnull-dereference" ' >> tmp.out
echo '#endif ' >> tmp.out
echo '#elif defined __SUNPRO_CC ' >> tmp.out
echo '#pragma disable_warn ' >> tmp.out
echo '#elif defined _MSC_VER ' >> tmp.out

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -40,7 +40,7 @@ HL="@HL@"
## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS ##
## $LIBS $clibpath $link_objs $link_args $shared_link ##
## ##
## These settings can be overriden by setting HDF5_CFLAGS, ##
## These settings can be overridden by setting HDF5_CFLAGS, ##
## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
## ##
############################################################################
@@ -144,7 +144,7 @@ usage() {
echo " shared libraries]"
echo " "
echo " You can also add or change paths and flags to the compile line using"
echo " the following environment varibles or by assigning them to their counterparts"
echo " the following environment variables or by assigning them to their counterparts"
echo " in the 'Things You Can Modify to Override...'" section of $prog_name
echo " "
echo " Variable Current value to be replaced"
@@ -318,7 +318,7 @@ fi
if test "x$do_link" = "xyes"; then
shared_link=""
# conditionnaly link with the hl library
# conditionally link with the hl library
if test "X$HL" = "Xhl"; then
libraries=" $libraries -lhdf5_hl -lhdf5 "
else

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -13,11 +13,11 @@ use strict;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Robb Matzke <matzke@llnl.gov>
# Robb Matzke
# 17 July 1998
### Purpose
@@ -66,7 +66,7 @@ use strict;
# ./H5public.h or ./src/H5public.h.
#
# If the version number is changed (either `-s' or `-i' was used on
# the command line) then the first line of the README.txt and RELEASE.txt files
# the command line) then the version line of the README.md and RELEASE.txt files
# one directory above the H5public.h file is also modified so it looks
# something like: This is hdf5-1.2.3-pre1 currently under development.
# The AC_INIT macro in configure.ac will also change in this case to be
@@ -156,10 +156,10 @@ while ($_ = shift) {
}
die "mutually exclusive options given\n" if $set && $inc;
# Determine file to use as H5public.h, README.txt,
# Determine file to use as H5public.h, README.md,
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h
# config/lt_vers.am and config/cmake/scripts/HDF5config.cmake.
# The README.txt, release_docs/RELEASE.txt, configure.ac,
# The README.md, release_docs/RELEASE.txt, configure.ac,
# windows/src/H5pubconf.h, config/lt_vers.am and
# config/cmake/scripts/HDF5config.cmake
# files are always in the directory above H5public.h
@@ -178,9 +178,9 @@ die "unable to read file: $LT_VERS\n" unless -r $file;
my $HDF5CONFIGCMAKE = $file;
$HDF5CONFIGCMAKE =~ s/[^\/]*$/..\/config\/cmake\/scripts\/HDF5config.cmake/;
die "unable to read file: $HDF5CONFIGCMAKE\n" unless -r $file;
# README.txt
# README.md
my $README = $file;
$README =~ s/[^\/]*$/..\/README.txt/;
$README =~ s/[^\/]*$/..\/README.md/;
die "unable to read file: $README\n" unless -r $file;
# release_docs/RELEASE.txt
my $RELEASE = $file;
@@ -303,7 +303,7 @@ if ($LT_VERS && $version_increased) {
# close FILE;
}
# Update the README.txt file
# Update the README.md file
if ($README) {
open FILE, $README or die "$README: $!\n";
my @contents = <FILE>;

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -11,7 +11,7 @@ use warnings;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -38,7 +38,7 @@ sub print_copyright ($) {
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
print $fh " * the COPYING file, which can be found at the root of the source code *\n";
print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n";
print $fh " * distribution tree, or in https://www.hdfgroup.org/licenses. *\n";
print $fh " * If you do not have access to either file, you may request a copy from *\n";
print $fh " * help\@hdfgroup.org. *\n";
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
@@ -64,8 +64,8 @@ sub print_startprotect ($$) {
$file =~ s/(\w*)\.h/$1/;
# Print the ifdef info
print $fh "\n#ifndef _${file}_H\n";
print $fh "#define _${file}_H\n";
print $fh "\n#ifndef ${file}_H\n";
print $fh "#define ${file}_H\n";
}
##############################################################################

View File

@@ -16,7 +16,7 @@ my @ctypes = ( () );
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -67,7 +67,7 @@ sub print_copyright ($) {
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
print $fh " * the COPYING file, which can be found at the root of the source code *\n";
print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n";
print $fh " * distribution tree, or in https://www.hdfgroup.org/licenses. *\n";
print $fh " * If you do not have access to either file, you may request a copy from *\n";
print $fh " * help\@hdfgroup.org. *\n";
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
@@ -93,8 +93,8 @@ sub print_startprotect ($$) {
$file =~ s/(\w*)\.h/$1/;
# Print the ifdef info
print $fh "\n#ifndef _${file}_H\n";
print $fh "#define _${file}_H\n";
print $fh "\n#ifndef ${file}_H\n";
print $fh "#define ${file}_H\n";
}
##############################################################################

View File

@@ -25,7 +25,7 @@ $indent = 2;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -52,7 +52,7 @@ sub print_copyright ($) {
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
print $fh " * the COPYING file, which can be found at the root of the source code *\n";
print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n";
print $fh " * distribution tree, or in https://www.hdfgroup.org/licenses. *\n";
print $fh " * If you do not have access to either file, you may request a copy from *\n";
print $fh " * help\@hdfgroup.org. *\n";
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
@@ -78,8 +78,8 @@ sub print_startprotect ($$) {
$file =~ s/(\w*)\.h/$1/;
# Print the ifdef info
print $fh "\n#ifndef _${file}_H\n";
print $fh "#define _${file}_H\n";
print $fh "\n#ifndef ${file}_H\n";
print $fh "#define ${file}_H\n";
}
##############################################################################

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -19,7 +19,7 @@
# Created Date: 2005/07/06
# Modification:
# Albert Cheng 2005/8/30
# Changed from two arguments to mulitple arguments.
# Changed from two arguments to multiple arguments.
if test $# -lt 2; then
exit 1

View File

@@ -4,7 +4,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -8,7 +8,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -39,7 +39,7 @@ USAGE()
{
cat << EOF
Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ...
-d DIR The name of the directory where the releas(es) should be
-d DIR The name of the directory where the release(es) should be
placed.
--docver BRANCHNAME This is added for 1.8 and beyond to get the correct
version of documentation files from the hdf5docs
@@ -60,7 +60,7 @@ for compressing the resulting tar archive (if none are given then
cmake-tgz -- create a tar file using the gzip default level with a build-unix.sh
command file and all other CMake files needed to build HDF5 source
using CMake on unix machines.
cmake-zip -- convert all text files to DOS style and create a zip file inluding cmake
cmake-zip -- convert all text files to DOS style and create a zip file including cmake
scripts and .bat files to build HDF5 source using CMake on Windows.
hpc-cmake-tgz
-- create a tar file using the gzip default level with a build-unix.sh
@@ -229,11 +229,14 @@ tar2cmakezip()
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf5.log" > build-VS2015-64.bat; chmod 755 build-VS2015-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2019 -C Release -V -O hdf5.log" > build-VS2019-32.bat; chmod 755 build-VS2019-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201964 -C Release -V -O hdf5.log" > build-VS2019-64.bat; chmod 755 build-VS2019-64.bat)
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.4-Source.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir
@@ -328,7 +331,8 @@ tar2cmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.4-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir
@@ -411,7 +415,8 @@ tar2hpccmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.4-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
@@ -507,7 +512,7 @@ if [ "X$methods" = "X" ]; then
methods="tar"
fi
# Create the temporay work directory.
# Create the temporary work directory.
if mkdir $tmpdir; then
echo "temporary work directory for release. "\
"Can be deleted after release completes." > $tmpdir/README
@@ -567,9 +572,9 @@ ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
test -f Makefile && mv Makefile $tmpdir/Makefile.x
cp -p Makefile.dist Makefile
# Update README.txt and release_docs/RELEASE.txt with release information in
# Update README.md and release_docs/RELEASE.txt with release information in
# line 1.
for f in README.txt release_docs/RELEASE.txt; do
for f in README.md release_docs/RELEASE.txt; do
echo "HDF5 version $VERS released on $release_date" >$f.x
sed -e 1d $f >>$f.x
mv $f.x $f

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -11,7 +11,7 @@ $indent=4;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -630,7 +630,7 @@ while [ $# -gt 0 ]; do
# setup the directory structure for snapshot test.
CMD=setup
;;
-*) # Unknow option
-*) # Unknown option
PRINT "Unknown option ($1)"
USAGE
exit 1
@@ -830,7 +830,7 @@ if [ -z "$NOCVS" ]; then
else
# make sure the cvs update, if done by another host, has completed.
# First wait for the presence of $CVSLOG which signals some host
# has started the cvs update. Then wait for the absense of $CVSLOG_LOCK
# has started the cvs update. Then wait for the absence of $CVSLOG_LOCK
# which signals the host has completed the cvs update.
WAITFOR $CVSLOG 90
if [ $WAIT_STATUS -ne 0 ]; then
@@ -911,7 +911,7 @@ if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then
PRINT $h is not reachable "(`date`)"
;;
*)
PRINT "CHECK_RSH for $h returned unknow result ($RSH)"
PRINT "CHECK_RSH for $h returned unknown result ($RSH)"
;;
esac >> $TMP_OUTPUT 2>&1
done

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -156,7 +156,7 @@ Usage: $PROGNAME [all] [checkout] [ftp <URL> [diff] [test] [srcdir] [release] [h
"snapshot srcdir" is equivalent to "snapshot srcdir all"
"snapshot srcdir checkout" is equivalent to "snapshot checkout"
srcdirname <dir>:
Use <dir> as the srcdir testing directory if srcdir is choosen.
Use <dir> as the srcdir testing directory if srcdir is chosen.
If <dir> starts with '-', it is append to the default name
E.g., "snapshot srcdir srcdirname -xx" uses hostname-xx
[Default is hostname]
@@ -422,7 +422,7 @@ while [ $# -gt 0 ] ; do
fi
cmd=""
EXEC_CMD_ARG="$@"
# exit the parsing while loop since all arguments have been consummed.
# exit the parsing while loop since all arguments have been consumed.
break
;;
check-vfd)
@@ -455,7 +455,7 @@ while [ $# -gt 0 ] ; do
OP_CONFIGURE="$OP_CONFIGURE $1"
;;
*)
echo "Unkown option $1"
echo "Unknown option $1"
errcode=1
cmd="help"
break
@@ -623,7 +623,7 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then
fi
fi
# if diff is choosen, exit 0 if no significant differences are found.
# if diff is chosen, exit 0 if no significant differences are found.
# otherwise, exit 1. This includes cases of other failures.
if [ -n "$cmddiff" ]; then
if [ $snapshot = no ]; then
@@ -799,7 +799,7 @@ if [ "$cmd" = "all" -o -n "$cmdrel" ]; then
# Replace the previous version with the current version.
# Should check if the errcode of the release process but there
# are other failures after release was done (e.g. h5vers or git failures)
# that should allow the replacement to occure.
# that should allow the replacement to occur.
rm -rf ${PREVIOUS}
mv ${CURRENT} ${PREVIOUS}
fi #Release snapshot

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##

422
bin/trace
View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -28,61 +28,105 @@ $Source = "";
# usually the same as the package name.
#
%TypeString = ("haddr_t" => "a",
"H5A_info_t" => "Ai",
"H5A_operator1_t" => "Ao",
"H5A_operator2_t" => "AO",
"hbool_t" => "b",
"H5AC_cache_config_t" => "Cc",
"H5AC_cache_image_config_t" => "CC",
"double" => "d",
"H5D_alloc_time_t" => "Da",
"H5D_append_cb_t" => "DA",
"H5FD_mpio_collective_opt_t" => "Dc",
"H5D_fill_time_t" => "Df",
"H5D_fill_value_t" => "DF",
"H5D_gather_func_t" => "Dg",
"H5FD_mpio_chunk_opt_t" => "Dh",
"H5D_mpio_actual_io_mode_t" => "Di",
"H5FD_file_image_callbacks_t" => "DI",
"H5D_chunk_index_t" => "Dk",
"H5D_layout_t" => "Dl",
"H5D_mpio_no_collective_cause_t" => "Dn",
"H5D_mpio_actual_chunk_opt_mode_t" => "Do",
"H5D_operator_t" => "DO",
"H5D_space_status_t" => "Ds",
"H5D_vds_view_t" => "Dv",
"H5D_scatter_func_t" => "DS",
"H5FD_mpio_xfer_t" => "Dt",
"H5FD_splitter_vfd_config_t" => "Dr",
"H5D_vds_view_t" => "Dv",
"H5FD_class_value_t" => "DV",
"H5D_chunk_iter_op_t" => "x",
"herr_t" => "e",
"H5E_auto1_t" => "Ea",
"H5E_auto2_t" => "EA",
"H5ES_event_complete_func_t" => "EC",
"H5E_direction_t" => "Ed",
"H5E_error_t" => "Ee",
"H5E_type_t" => "Et",
"H5ES_event_insert_func_t" => "EI",
"H5ES_status_t" => "Es",
"H5E_type_t" => "Et",
"H5FD_class_t" => "FC",
"H5F_close_degree_t" => "Fd",
"H5F_fspace_strategy_t" => "Ff",
"H5F_file_space_type_t" => "Ff",
"H5F_flush_cb_t" => "FF",
"H5F_info2_t" => "FI",
"H5F_mem_t" => "Fm",
"H5F_scope_t" => "Fs",
"H5F_fspace_type_t" => "Ft",
"H5F_file_space_type_t" => "Ft",
"H5F_libver_t" => "Fv",
"H5G_iterate_t" => "Gi",
"H5G_obj_t" => "Go",
"H5G_stat_t" => "Gs",
"hsize_t" => "h",
"H5_alloc_stats_t" => "Ha",
"H5_atclose_func_t" => "Hc",
"hssize_t" => "Hs",
"H5E_major_t" => "i",
"H5E_minor_t" => "i",
"H5_iter_order_t" => "Io",
"H5_index_t" => "Ii",
"H5E_major_t" => "i", # H5E_major_t is typedef'd to hid_t
"H5E_minor_t" => "i", # H5E_minor_t is typedef'd to hid_t
"hid_t" => "i",
"H5I_future_discard_func_t" => "ID",
"H5I_free_t" => "If",
"H5_index_t" => "Ii",
"H5I_iterate_func_t" => "II",
"H5_iter_order_t" => "Io",
"H5I_future_realize_func_t" => "IR",
"int" => "Is",
"int32_t" => "Is",
"H5I_search_func_t" => "IS",
"H5I_type_t" => "It",
"unsigned" => "Iu",
"unsigned int" => "Iu",
"uint32_t" => "Iu",
"uint64_t" => "UL",
"H5I_type_t" => "It",
"H5O_token_t" => "k",
"H5L_iterate1_t" => "Li",
"H5L_iterate2_t" => "LI",
"H5G_link_t" => "Ll", #Same as H5L_type_t now
"H5L_type_t" => "Ll",
"H5L_elink_traverse_t" => "Lt",
"H5MM_allocate_t" => "Ma",
"MPI_Comm" => "Mc",
"H5MM_free_t" => "Mf",
"MPI_Info" => "Mi",
"H5M_iterate_t" => 'MI',
"H5FD_mem_t" => "Mt",
"off_t" => "o",
"H5O_iterate1_t" => "Oi",
"H5O_iterate2_t" => "OI",
"H5O_mcdt_search_cb_t" => "Os",
"H5O_type_t" => "Ot",
"H5P_class_t" => "p",
"hobj_ref_t" => "Ro",
"H5P_cls_create_func_t" => "Pc",
"H5P_prp_create_func_t" => "PC",
"H5P_prp_delete_func_t" => "PD",
"H5P_prp_get_func_t" => "PG",
"H5P_iterate_t" => "Pi",
"H5P_cls_close_func_t" => "Pl",
"H5P_prp_close_func_t" => "PL",
"H5P_prp_compare_func_t" => "PM",
"H5P_cls_copy_func_t" => "Po",
"H5P_prp_copy_func_t" => "PO",
"H5P_prp_set_func_t" => "PS",
"hdset_reg_ref_t" => "Rd",
"hobj_ref_t" => "Ro",
"H5R_ref_t" => "Rr",
"H5R_type_t" => "Rt",
"char" => "s",
@@ -92,124 +136,84 @@ $Source = "";
"H5S_sel_type" => "St",
"htri_t" => "t",
"H5T_cset_t", => "Tc",
"H5T_conv_t" => "TC",
"H5T_direction_t", => "Td",
"H5T_pers_t" => "Te",
"H5T_conv_except_func_t" => "TE",
"H5T_norm_t" => "Tn",
"H5T_order_t" => "To",
"H5T_pad_t" => "Tp",
"H5T_pers_t" => "Te",
"H5T_sign_t" => "Ts",
"H5T_class_t" => "Tt",
"H5T_str_t" => "Tz",
"unsigned long" => "Ul",
"unsigned long long" => "UL",
"H5VL_subclass_t" => "VS",
"H5VL_get_conn_lvl_t" => "VL",
"uint64_t" => "UL",
"H5VL_attr_get_t" => "Va",
"H5VL_attr_optional_t" => "Vs",
"H5VL_blob_optional_t" => "VA",
"H5VL_attr_specific_t" => "Vb",
"H5VL_blob_specific_t" => "VB",
"H5VL_class_value_t" => "VC",
"H5VL_dataset_get_t" => "Vc",
"H5VL_class_value_t" => "VC",
"H5VL_dataset_specific_t" => "Vd",
"H5VL_dataset_optional_t" => "Vt",
"H5VL_datatype_get_t" => "Ve",
"H5VL_datatype_specific_t" => "Vf",
"H5VL_datatype_optional_t" => "Vu",
"H5VL_file_get_t" => "Vg",
"H5VL_file_specific_t" => "Vh",
"H5VL_file_optional_t" => "Vv",
"H5VL_group_get_t" => "Vi",
"H5VL_group_specific_t" => "Vj",
"H5VL_group_optional_t" => "Vw",
"H5VL_link_create_type_t" => "Vk",
"H5VL_link_create_t" => "Vk",
"H5VL_link_get_t" => "Vl",
"H5VL_get_conn_lvl_t" => "VL",
"H5VL_link_specific_t" => "Vm",
"H5VL_link_optional_t" => "Vx",
"H5VL_object_get_t" => "Vn",
"H5VL_request_notify_t" => "VN",
"H5VL_object_specific_t" => "Vo",
"H5VL_object_optional_t" => "Vy",
"H5VL_request_specific_t" => "Vr",
"H5VL_attr_optional_t" => "Vs",
"H5VL_subclass_t" => "VS",
"H5VL_dataset_optional_t" => "Vt",
"H5VL_datatype_optional_t" => "Vu",
"H5VL_file_optional_t" => "Vv",
"H5VL_group_optional_t" => "Vw",
"H5VL_link_optional_t" => "Vx",
"H5VL_object_optional_t" => "Vy",
"H5VL_request_optional_t" => "Vz",
"H5VL_blob_optional_t" => "VA",
"void" => "x",
"FILE" => "x",
"H5_alloc_stats_t" => "x",
"H5A_operator_t" => "x",
"H5A_operator1_t" => "x",
"H5A_operator2_t" => "x",
"H5A_info_t" => "x",
"H5AC_cache_config_t" => "x",
"H5AC_cache_image_config_t" => "x",
"H5D_append_cb_t" => "x",
"H5D_gather_func_t" => "x",
"H5D_operator_t" => "x",
"H5D_scatter_func_t" => "x",
"H5E_auto_t" => "x",
"H5E_auto1_t" => "x",
"H5E_auto2_t" => "x",
"H5E_walk_t" => "x",
"H5E_walk1_t" => "x",
"H5E_walk2_t" => "x",
"H5F_flush_cb_t" => "x",
"H5F_info1_t" => "x",
"H5F_info2_t" => "x",
"H5F_retry_info_t" => "x",
"H5FD_t" => "x",
"H5FD_class_t" => "x",
"H5FD_stream_fapl_t" => "x",
"H5FD_ros3_fapl_t" => "x",
"H5FD_hdfs_fapl_t" => "x",
"H5FD_file_image_callbacks_t" => "x",
"H5FD_mirror_fapl_t" => "x",
"H5G_iterate_t" => "x",
"H5G_info_t" => "x",
"H5I_free_t" => "x",
"H5I_iterate_func_t" => "x",
"H5I_search_func_t" => "x",
"H5L_class_t" => "x",
"H5L_elink_traverse_t" => "x",
"H5L_info1_t" => "x",
"H5L_info2_t" => "x",
"H5L_iterate1_t" => "x",
"H5L_iterate2_t" => "x",
"H5M_iterate_t" => 'x',
"H5MM_allocate_t" => "x",
"H5MM_free_t" => "x",
"H5O_info1_t" => "x",
"H5O_info2_t" => "x",
"H5O_native_info_t" => "x",
"H5O_iterate1_t" => "x",
"H5O_iterate2_t" => "x",
"H5O_mcdt_search_cb_t" => "x",
"H5P_cls_create_func_t" => "x",
"H5P_cls_copy_func_t" => "x",
"H5P_cls_close_func_t" => "x",
"H5P_iterate_t" => "x",
"H5P_prp_create_func_t" => "x",
"H5P_prp_copy_func_t" => "x",
"H5P_prp_close_func_t" => "x",
"H5P_prp_delete_func_t" => "x",
"H5P_prp_get_func_t" => "x",
"H5P_prp_set_func_t" => "x",
"H5P_prp_compare_func_t" => "x",
"H5T_cdata_t" => "x",
"H5T_conv_t" => "x",
"H5T_conv_except_func_t" => "x",
"H5VL_t" => "x",
"H5VL_class_t" => "x",
"H5VL_loc_params_t" => "x",
"H5VL_request_notify_t" => "x",
"H5Z_func_t" => "x",
"H5Z_filter_func_t" => "x",
"va_list" => "x",
"void" => "x",
"size_t" => "z",
"H5Z_SO_scale_type_t" => "Za",
"H5Z_class_t" => "Zc",
"H5Z_EDC_t" => "Ze",
"H5Z_filter_t" => "Zf",
"H5Z_filter_func_t" => "ZF",
"ssize_t" => "Zs",
# Types below must be defined here, as they appear in function arguments,
# but they are not yet supported in the H5_trace_args() routine yet. If
# they are used as an actual parameter type (and not just as a pointer to
# to the type), they must have a "real" abbreviation added (like the ones
# above), moved to the section of entries above, and support for displaying
# the type must be added to H5_trace_args().
"H5ES_err_info_t" => "#",
"H5FD_t" => "#",
"H5FD_hdfs_fapl_t" => "#",
"H5FD_mirror_fapl_t" => "#",
"H5FD_ros3_fapl_t" => "#",
"H5FD_splitter_vfd_config_t" => "#",
"H5L_class_t" => "#",
"H5VL_class_t" => "#",
"H5VL_loc_params_t" => "#",
"H5VL_request_status_t" => "#",
);
##############################################################################
# Maximum length of H5TRACE macro line
# If the ColumnLimit in .clang-format is changed, this value will need to be updated
#
my $max_trace_macro_line_len = 110;
##############################################################################
# Print an error message.
#
@@ -240,7 +244,9 @@ sub argstring ($$$) {
# Normalize the data type by removing redundant white space,
# certain type qualifiers, and indirection.
$atype =~ s/^\bconst\b//;
$atype =~ s/^\bconst\b//; # Leading const
$atype =~ s/\s*const\s*//; # const after type, possibly in the middle of '*'s
$atype =~ s/^\bstatic\b//;
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
$atype =~ s/\bH5_ATTR_DEPRECATED_USED\b//g;
$atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g;
@@ -264,53 +270,65 @@ sub argstring ($$$) {
--$ptr;
$tstr = $TypeString{"$atype*"};
} elsif (!exists $TypeString{$atype}) {
errmesg $file, $func, "untraceable type \`$atype", '*'x$ptr, "\'";
# Defer throwing error until type is actually used
# errmesg $file, $func, "untraceable type \`$atype", '*'x$ptr, "\'";
} else {
$tstr = $TypeString{$atype};
}
return ("*" x $ptr) . ($array?"[$array]":"") . $tstr;
return ("*" x $ptr) . ($array ? "[$array]" : "") . $tstr;
}
##############################################################################
# Given information about an API function, rewrite that function with
# updated tracing information.
#
my $file_api = 0;
my $file_args = 0;
my $total_api = 0;
my $total_args = 0;
sub rewrite_func ($$$$$) {
my ($file, $type, $name, $args, $body) = @_;
my ($arg,$trace);
my (@arg_name, @arg_str);
my ($arg, $trace, $argtrace);
my (@arg_name, @arg_str, @arg_type);
local $_;
# Keep copy of original arguments
my $orig_args = $args;
# Parse return value
my $rettype = argstring $file, $name, $type;
goto error if $rettype =~ /!/;
# Parse arguments
if ($args eq "void") {
$trace = "H5TRACE0(\"$rettype\",\"\");\n";
$trace = "H5TRACE0(\"$rettype\", \"\");\n";
$argtrace = "H5ARG_TRACE0(\"\")";
} else {
# Split arguments. First convert `/*in,out*/' to get rid of the
# comma, then split the arguments on commas.
$args =~ s/(\/\*\s*in),\s*(out\s*\*\/)/$1_$2/g;
# comma and remove lines beginning with a '#', then split the arguments
# on commas.
$args =~ s/(\/\*\s*in),\s*(out\s*\*\/)/$1_$2/g; # Get rid of comma in 'in,out'
$args =~ s/H5FL_TRACK_PARAMS//g; # Remove free list macro
$args =~ s/\n#.*?\n/\n/g; # Remove lines beginning with '#'
my @args = split /,[\s\n]*/, $args;
my $argno = 0;
my %names;
for $arg (@args) {
if($arg=~/\w*\.{3}\w*/){
if($arg=~/\w*\.{3}\w*/){ # Skip "..." for varargs parameter
next;
}
unless ($arg=~/^(([a-z_A-Z]\w*\s+)+\**)
unless ($arg=~/^((\s*[a-z_A-Z](\w|\*)*\s+)+(\s*\*\s*|\s*const\s*|\s*volatile\s*)*)
([a-z_A-Z]\w*)(\[.*?\])?
(\s*\/\*\s*(in|out|in_out)\s*\*\/)?\s*$/x) {
errmesg $file, $name, "unable to parse \`$arg\'";
goto error;
} else {
my ($atype, $aname, $array, $adir) = ($1, $3, $4, $6);
my ($atype, $aname, $array, $adir) = ($1, $5, $6, $8);
$names{$aname} = $argno++;
$adir ||= "in";
$atype =~ s/\s+$//;
push @arg_name, $aname;
push @arg_type, $atype;
if ($adir eq "out") {
push @arg_str, "x";
@@ -331,71 +349,184 @@ sub rewrite_func ($$$$$) {
}
}
}
# Compose the trace macro
$trace = "H5TRACE" . scalar(@arg_str) . "(\"$rettype\", \"";
$argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(__func__, \"";
$trace .= join("", @arg_str) . "\"";
my $len = 4 + length $trace;
for (@arg_name) {
if ($len + length >= 77) {
$trace .= ",\n $_";
$len = 13 + length;
$argtrace .= join("", @arg_str) . "\"";
# Add 4 for indenting the line
my $len = 4 + length($trace);
for my $i (0 .. $#arg_name) {
# Handle wrapping
# Be VERY careful here! clang-format and this script MUST agree
# on which lines get wrapped or there will be churn as each tries
# to undo the other's output.
#
# TWO cases must be handled:
# 1) The argument is that last one and ');' will be appended
# 2) The argument is NOT the last one and ',' will be appended
#
# NB: clang-format does NOT consider terminal newlines when
# counting columns for the ColumnLimit
#
# The extra '2' added after $len includes the ', ' that would be
# added BEFORE the argument.
#
my $adjust = ($i + 1 == scalar(@arg_str)) ? 2 : 1;
my $len_if_added = $len + 2 + length($arg_name[$i]) + $adjust;
# Wrap lines that will be longer than the limit
if ($len_if_added > $max_trace_macro_line_len) {
# Wrap line, with indentation
$trace .= ",\n ";
$len = 13; # Set to 13, for indentation
# Indent an extra space to account for extra digit in 'H5TRACE' macro
if (scalar(@arg_str) >= 10) {
$trace .= " ";
$len++;
}
} else {
$trace .= ", $_";
$len += 1 + length;
$trace .= ", ";
$len += 2; # Add 2, for ', '
}
# Append argument
$trace .= "$arg_name[$i]";
$argtrace .= ", $arg_name[$i]";
# Add length of appended argument name
$len += length($arg_name[$i]);
}
# Append final ');' for macro
$trace .= ");\n";
}
goto error if grep {/!/} @arg_str;
# The H5TRACE() statement
if ($body =~ /\/\*[ \t]*NO[ \t]*TRACE[ \t]*\*\//) {
# Ignored due to NO TRACE comment.
} elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
# Replaced an H5TRACE macro.
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*[ \t]*(\(.*?\))?;??)\n/"$1$2$trace"/es) {
# Added an H5TRACE macro after a FUNC_ENTER macro.
} else {
errmesg $file, $name, "unable to insert tracing information";
print "body = ", $body, "\n";
goto error;
$argtrace .= ")";
}
# Check for API / non-API routine name
if( $name =~ /H5[A-Z]{0,2}[a-z].*/) {
# The H5TRACE() statement, for API routines
if ($body =~ /\/\*[ \t]*NO[ \t]*TRACE[ \t]*\*\//) {
# Ignored due to NO TRACE comment.
} else {
# Check for known, but unsupported type
if ( $trace =~ /(^#)|([^*]#)/ ) {
# Check for unsupported return type
if ( $type =~ /(^#)|([^*]#)/ ) {
errmesg $file, $name, "unsupported type in return type\nAdd to TypeString hash in trace script and update H5_trace_args()";
print "type = '$type'\n";
}
# Check for unsupported argument type
$index = 0;
for (@arg_str) {
if ( $_ =~ /(^#)|([^*]#)/ ) {
errmesg $file, $name, "unsupported type in args\nAdd to TypeString hash in trace script and update H5_trace_args()";
print "type = $arg_type[$index]\n";
}
$index++;
}
goto error;
}
# Check for unknown (and therefore unsupported) type
if ( $trace =~ /(^!)|([^*]!)/ ) {
# Check for unsupported return type
if ( $type =~ /(^!)|([^*]!)/ ) {
errmesg $file, $name, "unknown type in return type\nAdd to TypeString hash in trace script and also update H5_trace_args() if used by value";
print "type = '$type'\n";
}
# Check for unsupported argument type
$index = 0;
for (@arg_str) {
if ( $_ =~ /(^!)|([^*]!)/ ) {
errmesg $file, $name, "unknown type in args\nAdd to TypeString hash in trace script and also update H5_trace_args() if used by value";
print "type = $arg_type[$index]\n";
}
$index++;
}
goto error;
}
if ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
# Replaced an H5TRACE macro.
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*[ \t]*(\(.*?\))?;??)\n/"$1$2$trace"/es) {
# Added an H5TRACE macro after a FUNC_ENTER macro.
} else {
errmesg $file, $name, "unable to insert tracing information";
print "body = ", $body, "\n";
goto error;
}
}
#Increment # of API routines modified
$file_api++;
}
# Check for H5ARG_TRACE macros in non-API routines
if ( $body =~ /H5ARG_TRACE/ ) {
# Check for untraceable type (deferred until $argtrace used)
if ( $argtrace =~ /(^!)|([^*]!)/ ) {
errmesg $file, $name, "untraceable type in args";
print "args = '$orig_args'\n";
goto error;
}
# Replace / update H5ARG_TRACE macro.
$body =~ s/(H5ARG_TRACE(\d+\s*\(.*?\))?)/"$argtrace"/esg;
#Increment # of non-API routines modified
$file_args++;
}
error:
return "\n$type\n$name($args)\n$body";
return "\n$type\n$name($orig_args)\n$body";
}
##############################################################################
# Process each source file, rewriting API functions with updated
# tracing information.
#
my $total_api = 0;
for $file (@ARGV) {
$file_api = 0;
$file_args = 0;
# Ignore some files that do not need tracing macros
unless ($file eq "H5FDmulti.c" or $file eq "src/H5FDmulti.c" or $file eq "H5FDstdio.c" or $file eq "src/H5FDstdio.c") {
unless ($file eq "H5FDmulti.c" or $file eq "src/H5FDmulti.c" or $file eq "H5FDstdio.c" or $file eq "src/H5FDstdio.c" or $file eq "src/H5TS.c" or $file eq "src/H5FDperform.c") {
# Snarf up the entire file
open SOURCE, $file or die "$file: $!\n";
$Source = join "", <SOURCE>;
close SOURCE;
# Make modifications
# Make a copy of the original data
my $original = $Source;
my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
(H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name
\s*\((.*?)\)\s* #args
(\{.*?\n\}[^\n]*) #body
/rewrite_func($file,$1,$3,$4,$5)/segx;
$total_api += $napi;
# Make modifications
$Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
(H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
\s*\((.*?)\)\s* #args
(\{.*?\n\}[^\n]*) #body
/rewrite_func($file,$1,$3,$4,$5)/segx;
# If the source changed then print out the new version
if ($original ne $Source) {
printf "%s: instrumented %d API function%s\n",
$file, $napi, 1==$napi?"":"s";
printf "%s: instrumented %d API function%s and %d argument list%s\n",
$file, $file_api, (1 == $file_api ? "" : "s"),
$file_args, (1 == $file_args ? "" : "s");
rename $file, "$file~" or die "unable to make backup";
open SOURCE, ">$file" or die "unable to modify source";
print SOURCE $Source;
close SOURCE;
$total_api += $file_api;
$total_args += $file_args;
}
}
}
@@ -407,6 +538,9 @@ if ($found_errors eq 1) {
printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
exit 1;
} else {
printf "Finished processing HDF5 API calls\n";
printf "Finished processing HDF5 API calls:\n";
printf "\tinstrumented %d API function%s and %d argument list%s\n",
$total_api, (1 == $total_api ? "" : "s"),
$total_args, (1 == $total_args ? "" : "s");
}

View File

@@ -15,7 +15,7 @@ use warnings;
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
# Quincey Koziol, koziol@hdfgroup.org
# Quincey Koziol
# 9 Aug 2013
#
# Purpose: Given an input file containing the output from a build of the
@@ -30,10 +30,13 @@ use Getopt::Std;
# Global variables, for accumulating information
my $totalcount = 0;
my $notecount = 0;
my $dupcount = 0;
my %warn_count = ();
my $warncount;
my %warn_file = ();
my %warn_file_line = ();
my %warn_file_line_offset = ();
my %file_count = ();
my $filecount;
my $ignorecount = 0;
@@ -48,10 +51,13 @@ my %file_warn_line = ();
my $current_warning = 0;
my $current_file = 0;
my $warn_index;
my $genericize = 1;
# Info about last name / line / offset for file
my $last_c_name;
my $last_fort_name;
my $last_fort_line;
my $genericize = 1;
my $last_fort_offset;
# Display usage
sub do_help {
@@ -72,7 +78,7 @@ sub do_help {
print "\t-S <file string list>\tDisplay warnings for files which contain a string, <file string list>\n";
print "\t\t<file string list> is a comma separated list, with no spaces\n";
print "\t\tFor example: 'H5Fint' or 'H5Fint,H5Gnode'\n";
print "\t-l\tDisplay line nunbers for file/warning\n";
print "\t-l\tDisplay line numbers for file/warning\n";
print "\t-u\tLeave 'unique' types in warnings, instead of genericizing them\n";
print "\t-i <name list>\tIgnore named files, <name list>\n";
print "\t\t<name list> is a comma separated list, with no spaces\n";
@@ -98,7 +104,7 @@ if($options{h}) {
# Parse list of file names to ignore
if(exists $options{i}) {
@ignorenames = split /,/, $options{i};
#print @ignorenames;
#print STDERR @ignorenames;
}
# Parse list of warning indices to expand file names
@@ -106,18 +112,18 @@ if(exists $options{w}) {
my @tmp_indices;
@tmp_indices = split /,/, $options{w};
#print @tmp_indices;
#print STDERR @tmp_indices;
for my $x (@tmp_indices) {
#print "x = '$x'\n";
#print STDERR "x = '$x'\n";
if($x =~ /\-/) {
my $start_index;
my $end_index;
#print "matched = '$x'\n";
#print STDERR "matched = '$x'\n";
($start_index, $end_index) = split /\-/, $x;
#print "start_index = '$start_index', end_index = '$end_index'\n";
#print STDERR "start_index = '$start_index', end_index = '$end_index'\n";
for my $y ($start_index..$end_index) {
#print "y = '$y'\n";
#print STDERR "y = '$y'\n";
if(!exists $warn_file_indices{$y}) {
$warn_file_indices{$y} = $y;
}
@@ -130,14 +136,14 @@ if(exists $options{w}) {
}
}
#foreach (sort keys %warn_file_indices) {
# print "$_ : $warn_file_indices{$_}\n";
# print STDERR "$_ : $warn_file_indices{$_}\n";
#}
}
# Parse list of warning strings to expand file names
if(exists $options{s}) {
@warn_match_strings = split /,/, $options{s};
# print @warn_match_strings;
# print STDERR @warn_match_strings;
}
# Parse list of file indices to expand warnings
@@ -145,18 +151,18 @@ if(exists $options{f}) {
my @tmp_indices;
@tmp_indices = split /,/, $options{f};
#print @tmp_indices;
#print STDERR @tmp_indices;
for my $x (@tmp_indices) {
#print "x = '$x'\n";
#print STDERR "x = '$x'\n";
if($x =~ /\-/) {
my $start_index;
my $end_index;
#print "matched = '$x'\n";
#print STDERR "matched = '$x'\n";
($start_index, $end_index) = split /\-/, $x;
#print "start_index = '$start_index', end_index = '$end_index'\n";
#print STDERR "start_index = '$start_index', end_index = '$end_index'\n";
for my $y ($start_index..$end_index) {
#print "y = '$y'\n";
#print STDERR "y = '$y'\n";
if(!exists $file_warn_indices{$y}) {
$file_warn_indices{$y} = $y;
}
@@ -169,14 +175,14 @@ if(exists $options{f}) {
}
}
#foreach (sort keys %warn_file_indices) {
# print "$_ : $warn_file_indices{$_}\n";
# print STDERR "$_ : $warn_file_indices{$_}\n";
#}
}
# Parse list of warning strings for files to expand warnings
if(exists $options{S}) {
@file_match_strings = split /,/, $options{S};
# print @file_match_strings;
# print STDERR @file_match_strings;
}
# Check if warnings should stay unique and not be "genericized"
@@ -197,7 +203,7 @@ while (<>) {
# Retain last FORTRAN compile line, which comes a few lines before warning
if($_ =~ /.*\.[fF]90:.*/) {
($last_fort_name, $last_fort_line, $toss) = split /\:/, $_;
($last_fort_name, $last_fort_line, $last_fort_offset) = split /\:/, $_;
($last_fort_line, $toss) = split /\./, $last_fort_line;
}
@@ -217,38 +223,34 @@ while (<>) {
# Skip warnings from linker
next if $_ =~ /ld: warning:/;
# Skip warnings from build_py and install_lib
# Skip warnings from build_py and install_lib
next if $_ =~ /warning: (build_py|install_lib)/;
# Skip variables with the word 'warning' in them
next if $_ =~ /_warning_/;
# "Hide" the C++ '::' symbol until we've parsed out the parts of the line
while($_ =~ /\:\:/) {
$_ =~ s/\:\:/@@@@/g;
}
# Check for weird formatting of warning message
$line = "??";
$offset = "??";
if($_ =~ /^cc1: warning:.*/) {
$name = $last_c_name;
$line = "??";
($toss, $toss, $warning, $extra, $extra2) = split /\:/, $_;
# Check for CMAKE build with warning on first line and no filename
} elsif($_ =~ /^\s*[Ww]arning:.*/) {
$name = $last_c_name;
$line = "??";
($toss, $warning, $extra, $extra2) = split /\:/, $_;
# Check for FORTRAN warning output
} elsif($_ =~ /^Warning:.*/) {
$name = $last_fort_name;
$line = $last_fort_line;
$offset = $last_fort_offset;
($toss, $warning, $extra, $extra2) = split /\:/, $_;
#print "1:",$.,":",$_;
# $_ = <>;
#print "2:",$.,":",$_;
# if($_ =~ /^\sFC.*/) {
# $_ = <>;
#print "3:",$.,":",$_;
# }
# ($name, $line, $toss) = split /\:/, $_;
#print "4:","'",$name,"'","-","'",$line,"'","\n";
# Check for improperly parsed filename or line
if($name =~ /^$/) {
print "Filename is a null string! Input line #$. is: '$_'";
@@ -265,8 +267,6 @@ while (<>) {
$name =~ s/^\"//g;
$name =~ s/\"$//g;
$line =~ s/^\s*line\s*//g;
# print "name:'", $name, "'-'", $line, "'\n";
# print "warning:'", $warning, "'\n";
# Check for Intel icc warning
} elsif($_ =~ /.*[A-Za-z0-9_]\.[chC]\(.*[0-9]\):.*#.*/) {
($last_c_name, $toss, $warning) = split /\:/, $last_c_name;
@@ -310,9 +310,7 @@ while (<>) {
# Check for ignored file
if(exists $options{i}) {
for my $x (@ignorenames) {
#print "x = '$x'\n";
if($name =~ /$x/) {
# print "matched name = '$name'\n";
$ignorecount++;
if(!(exists $ignored_files{$name})) {
$ignored_files{$name} = $name;
@@ -347,13 +345,22 @@ while (<>) {
# These skipped messages & "genericizations" may be specific to GCC
# Skip supplemental warning message
next if $warning =~ /near initialization for/;
if($warning =~ /near initialization for/) {
$notecount++;
next
}
# Skip C++ supplemental warning message
next if $warning =~ /in call to/;
if($warning =~ /in call to/) {
$notecount++;
next
}
# Skip GCC warning that should be a note
next if $_ =~ /\(this will be reported only once per input file\)/;
if($_ =~ /\(this will be reported only once per input file\)/) {
$notecount++;
next
}
if($genericize) {
# Eliminate C/C++ "{aka <some type>}" and "{aka '<some type>'}" info
@@ -402,16 +409,16 @@ while (<>) {
$warning =~ s/[A-Za-z_0-9]*\([A-Za-z_,0-9]*\) in [A-Za-z_0-9]*/-\(-\) in -/g;
}
}
# print "warning = $warning\n";
# <end possible GCC-specific code>
# Check if we've already seen this warning on this line in this file
# (Can happen for warnings from inside header files)
if( !exists $warn_file_line{$warning}{$name}{$line} ) {
if( !exists $warn_file_line_offset{$warning}{$name}{$line}{$offset} ) {
# Increment count for [generic] warning
$warn_count{$warning}++;
$warn_file{$warning}{$name}++;
$warn_file_line{$warning}{$name}{$line}++;
$warn_file_line_offset{$warning}{$name}{$line}{$offset}++;
# Increment count for filename
$file_count{$name}++;
@@ -421,14 +428,20 @@ while (<>) {
# Increment total count of warnings
$totalcount++;
}
else {
# Increment count of duplicate warnings
$dupcount++;
}
# print "name = $name\n";
# print "line = $line\n";
# print "offset = $offset\n";
# print "warning = \"$warning\"\n";
# print STDERR "name = $name\n";
# print STDERR "line = $line\n";
# print STDERR "offset = $offset\n";
# print STDERR "warning = \"$warning\"\n";
}
print "Total unique [non-ignored] warnings: $totalcount\n";
print "Ignored notes / supplemental warning lines [not counted in unique warnings]: $notecount\n";
print "Duplicated warning lines [not counted in unique warnings]: $dupcount\n";
print "Total ignored warnings: $ignorecount\n";
$warncount = keys %warn_count;
print "Total unique kinds of warnings: $warncount\n";
@@ -439,7 +452,7 @@ print "Total files with warnings: $filecount\n\n";
print "# of Warnings by frequency (file count)\n";
print "=======================================\n";
for my $x (sort {$warn_count{$b} <=> $warn_count{$a}} keys(%warn_count)) {
printf ("[%2d] %4d (%2d) - %s\n", $current_warning++, $warn_count{$x}, scalar(keys %{$warn_file_line{$x}}), $x);
printf ("[%2d] %4d (%2d) - %s\n", $current_warning++, $warn_count{$x}, scalar(keys %{$warn_file{$x}}), $x);
if((exists $options{W}) || (exists $options{w}) || (exists $options{s})) {
my $curr_index = $current_warning - 1;
my $match = 0;
@@ -447,9 +460,9 @@ for my $x (sort {$warn_count{$b} <=> $warn_count{$a}} keys(%warn_count)) {
# Check for string from list in current warning
if(exists $options{s}) {
for my $y (@warn_match_strings) {
# print "y = '$y'\n";
# print STDERR "y = '$y'\n";
if($x =~ /$y/) {
# print "matched warning = '$x'\n";
# print STDERR "matched warning = '$x'\n";
$match = 1;
last;
}
@@ -477,7 +490,7 @@ for my $x (sort {$warn_count{$b} <=> $warn_count{$a}} keys(%warn_count)) {
print "\n# of Warnings by filename (warning type)\n";
print "========================================\n";
for my $x (sort {$file_count{$b} <=> $file_count{$a}} keys(%file_count)) {
printf ("[%3d] %4d (%2d) - %s\n", $current_file++, $file_count{$x}, scalar(keys %{$file_warn_line{$x}}), $x);
printf ("[%3d] %4d (%2d) - %s\n", $current_file++, $file_count{$x}, scalar(keys %{$file_warn{$x}}), $x);
if((exists $options{F}) || (exists $options{f}) || (exists $options{S})) {
my $curr_index = $current_file - 1;
my $match = 0;
@@ -485,9 +498,9 @@ for my $x (sort {$file_count{$b} <=> $file_count{$a}} keys(%file_count)) {
# Check for string from list in current file
if(exists $options{S}) {
for my $y (@file_match_strings) {
# print "y = '$y'\n";
# print STDERR "y = '$y'\n";
if($x =~ /$y/) {
# print "matched warning = '$x'\n";
# print STDERR "matched warning = '$x'\n";
$match = 1;
last;
}

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -1,13 +0,0 @@
Copyright by The HDF Group and
The Board of Trustees of the University of Illinois.
All rights reserved.
The files and subdirectories in this directory are part of HDF5.
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -28,11 +28,6 @@ endif
if BUILD_CXX_CONDITIONAL
SUBDIRS=src $(TEST_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.
VOL_LIST = native "pass_through under_vol=0;under_info={}" \
"pass_through under_vol=505;under_info={under_vol=0;under_info={}}"
endif
DIST_SUBDIRS = src test examples

View File

@@ -34,38 +34,52 @@ set (tutr_examples
foreach (example ${examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
target_include_directories (cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_include_directories (cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cpp_ex_${example} STATIC)
target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (cpp_ex_${example} SHARED)
target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
if (MINGW)
if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PRIVATE -static-libgcc -static-libstdc++
)
endif ()
endif ()
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_CPP_EXAMPLES_${example}_FORMAT cpp_ex_${example})
endif ()
endforeach ()
foreach (example ${tutr_examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
target_include_directories (cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_include_directories (cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cpp_ex_${example} STATIC)
target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (cpp_ex_${example} SHARED)
target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
if (MINGW)
if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PRIVATE -static-libgcc -static-libstdc++
)
endif ()
endif ()
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_CPP_EXAMPLES_${example}_FORMAT cpp_ex_${example})
endif ()
endforeach ()
if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)

View File

@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,11 +16,7 @@
* We will read from the file created by extend.cpp
*/
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;
@@ -28,20 +24,20 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "SDSextendible.h5" );
const H5std_string DATASET_NAME( "ExtendibleArray" );
const int NX = 10;
const int NY = 5;
const int RANK = 2;
const int RANKC = 1;
const H5std_string FILE_NAME("SDSextendible.h5");
const H5std_string DATASET_NAME("ExtendibleArray");
const int NX = 10;
const int NY = 5;
const int RANK = 2;
const int RANKC = 1;
int main (void)
int
main(void)
{
hsize_t i, j;
hsize_t i, j;
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
@@ -51,8 +47,8 @@ int main (void)
/*
* Open the file and the dataset.
*/
H5File file( FILE_NAME, H5F_ACC_RDONLY );
DataSet dataset = file.openDataSet( DATASET_NAME );
H5File file(FILE_NAME, H5F_ACC_RDONLY);
DataSet dataset = file.openDataSet(DATASET_NAME);
/*
* Get filespace for rank and dimension
@@ -67,10 +63,9 @@ int main (void)
/*
* Get and print the dimension sizes of the file dataspace
*/
hsize_t dims[2]; // dataset dimensions
rank = filespace.getSimpleExtentDims( dims );
cout << "dataset rank = " << rank << ", dimensions "
<< (unsigned long)(dims[0]) << " x "
hsize_t dims[2]; // dataset dimensions
rank = filespace.getSimpleExtentDims(dims);
cout << "dataset rank = " << rank << ", dimensions " << (unsigned long)(dims[0]) << " x "
<< (unsigned long)(dims[1]) << endl;
/*
@@ -81,13 +76,12 @@ int main (void)
/*
* Read dataset back and display.
*/
int data_out[NX][NY]; // buffer for dataset to be read
dataset.read( data_out, PredType::NATIVE_INT, mspace1, filespace );
int data_out[NX][NY]; // buffer for dataset to be read
dataset.read(data_out, PredType::NATIVE_INT, mspace1, filespace);
cout << "\n";
cout << "Dataset: \n";
for (j = 0; j < dims[0]; j++)
{
for (j = 0; j < dims[0]; j++) {
for (i = 0; i < dims[1]; i++)
cout << data_out[j][i] << " ";
cout << endl;
@@ -117,20 +111,20 @@ int main (void)
*/
hsize_t col_dims[1];
col_dims[0] = 10;
DataSpace mspace2( RANKC, col_dims );
DataSpace mspace2(RANKC, col_dims);
/*
* Define the column (hyperslab) to read.
*/
hsize_t offset[2] = { 0, 2 };
hsize_t count[2] = { 10, 1 };
int column[10]; // buffer for column to be read
hsize_t offset[2] = {0, 2};
hsize_t count[2] = {10, 1};
int column[10]; // buffer for column to be read
/*
* Define hyperslab and read.
*/
filespace.selectHyperslab( H5S_SELECT_SET, count, offset );
dataset.read( column, PredType::NATIVE_INT, mspace2, filespace );
filespace.selectHyperslab(H5S_SELECT_SET, count, offset);
dataset.read(column, PredType::NATIVE_INT, mspace2, filespace);
cout << endl;
cout << "Third column: " << endl;
@@ -161,20 +155,18 @@ int main (void)
*/
hsize_t chunk_dims[2];
int rank_chunk;
if( H5D_CHUNKED == cparms.getLayout() )
{
if (H5D_CHUNKED == cparms.getLayout()) {
/*
* Get chunking information: rank and dimensions
*/
rank_chunk = cparms.getChunk( 2, chunk_dims);
cout << "chunk rank " << rank_chunk << "dimensions "
<< (unsigned long)(chunk_dims[0]) << " x "
<< (unsigned long)(chunk_dims[1]) << endl;
rank_chunk = cparms.getChunk(2, chunk_dims);
cout << "chunk rank " << rank_chunk << "dimensions " << (unsigned long)(chunk_dims[0]) << " x "
<< (unsigned long)(chunk_dims[1]) << endl;
/*
* Define the memory space to read a chunk.
*/
DataSpace mspace3( rank_chunk, chunk_dims );
DataSpace mspace3(rank_chunk, chunk_dims);
/*
* Define chunk in the file (hyperslab) to read.
@@ -183,17 +175,16 @@ int main (void)
offset[1] = 0;
count[0] = chunk_dims[0];
count[1] = chunk_dims[1];
filespace.selectHyperslab( H5S_SELECT_SET, count, offset );
filespace.selectHyperslab(H5S_SELECT_SET, count, offset);
/*
* Read chunk back and display.
*/
int chunk_out[2][5]; // buffer for chunk to be read
dataset.read( chunk_out, PredType::NATIVE_INT, mspace3, filespace );
int chunk_out[2][5]; // buffer for chunk to be read
dataset.read(chunk_out, PredType::NATIVE_INT, mspace3, filespace);
cout << endl;
cout << "Chunk:" << endl;
for (j = 0; j < chunk_dims[0]; j++)
{
for (j = 0; j < chunk_dims[0]; j++) {
for (i = 0; i < chunk_dims[1]; i++)
cout << chunk_out[j][i] << " ";
cout << endl;
@@ -204,25 +195,22 @@ int main (void)
* 2 0 0 0 0
*/
}
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,11 +17,7 @@
* and read back fields' subsets.
*/
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;
@@ -29,175 +25,170 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "SDScompound.h5" );
const H5std_string DATASET_NAME( "ArrayOfStructures" );
const H5std_string MEMBER1( "a_name" );
const H5std_string MEMBER2( "b_name" );
const H5std_string MEMBER3( "c_name" );
const int LENGTH = 10;
const int RANK = 1;
const H5std_string FILE_NAME("SDScompound.h5");
const H5std_string DATASET_NAME("ArrayOfStructures");
const H5std_string MEMBER1("a_name");
const H5std_string MEMBER2("b_name");
const H5std_string MEMBER3("c_name");
const int LENGTH = 10;
const int RANK = 1;
int main(void)
int
main(void)
{
/* First structure and dataset*/
typedef struct s1_t {
/* First structure and dataset*/
typedef struct s1_t {
int a;
float b;
double c;
} s1_t;
} s1_t;
/* Second structure (subset of s1_t) and dataset*/
typedef struct s2_t {
/* Second structure (subset of s1_t) and dataset*/
typedef struct s2_t {
double c;
int a;
} s2_t;
} s2_t;
// Try block to detect exceptions raised by any of the calls inside it
try
{
/*
* Initialize the data
*/
int i;
s1_t s1[LENGTH];
for (i = 0; i< LENGTH; i++)
{
s1[i].a = i;
s1[i].b = i*i;
s1[i].c = 1./(i+1);
}
// Try block to detect exceptions raised by any of the calls inside it
try {
/*
* Initialize the data
*/
int i;
s1_t s1[LENGTH];
for (i = 0; i < LENGTH; i++) {
s1[i].a = i;
s1[i].b = i * i;
s1[i].c = 1. / (i + 1);
}
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Create the data space.
*/
hsize_t dim[] = {LENGTH}; /* Dataspace dimensions */
DataSpace space( RANK, dim );
/*
* Create the data space.
*/
hsize_t dim[] = {LENGTH}; /* Dataspace dimensions */
DataSpace space(RANK, dim);
/*
* Create the file.
*/
H5File* file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
/*
* Create the file.
*/
H5File *file = new H5File(FILE_NAME, H5F_ACC_TRUNC);
/*
* Create the memory datatype.
*/
CompType mtype1( sizeof(s1_t) );
mtype1.insertMember( MEMBER1, HOFFSET(s1_t, a), PredType::NATIVE_INT);
mtype1.insertMember( MEMBER3, HOFFSET(s1_t, c), PredType::NATIVE_DOUBLE);
mtype1.insertMember( MEMBER2, HOFFSET(s1_t, b), PredType::NATIVE_FLOAT);
/*
* Create the memory datatype.
*/
CompType mtype1(sizeof(s1_t));
mtype1.insertMember(MEMBER1, HOFFSET(s1_t, a), PredType::NATIVE_INT);
mtype1.insertMember(MEMBER3, HOFFSET(s1_t, c), PredType::NATIVE_DOUBLE);
mtype1.insertMember(MEMBER2, HOFFSET(s1_t, b), PredType::NATIVE_FLOAT);
/*
* Create the dataset.
*/
DataSet* dataset;
dataset = new DataSet(file->createDataSet(DATASET_NAME, mtype1, space));
/*
* Create the dataset.
*/
DataSet *dataset;
dataset = new DataSet(file->createDataSet(DATASET_NAME, mtype1, space));
/*
* Write data to the dataset;
*/
dataset->write( s1, mtype1 );
/*
* Write data to the dataset;
*/
dataset->write(s1, mtype1);
/*
* Release resources
*/
delete dataset;
delete file;
/*
* Release resources
*/
delete dataset;
delete file;
/*
* Open the file and the dataset.
*/
file = new H5File( FILE_NAME, H5F_ACC_RDONLY );
dataset = new DataSet (file->openDataSet( DATASET_NAME ));
/*
* Open the file and the dataset.
*/
file = new H5File(FILE_NAME, H5F_ACC_RDONLY);
dataset = new DataSet(file->openDataSet(DATASET_NAME));
/*
* Create a datatype for s2
*/
CompType mtype2( sizeof(s2_t) );
/*
* Create a datatype for s2
*/
CompType mtype2(sizeof(s2_t));
mtype2.insertMember( MEMBER3, HOFFSET(s2_t, c), PredType::NATIVE_DOUBLE);
mtype2.insertMember( MEMBER1, HOFFSET(s2_t, a), PredType::NATIVE_INT);
mtype2.insertMember(MEMBER3, HOFFSET(s2_t, c), PredType::NATIVE_DOUBLE);
mtype2.insertMember(MEMBER1, HOFFSET(s2_t, a), PredType::NATIVE_INT);
/*
* Read two fields c and a from s1 dataset. Fields in the file
* are found by their names "c_name" and "a_name".
*/
s2_t s2[LENGTH];
dataset->read( s2, mtype2 );
/*
* Read two fields c and a from s1 dataset. Fields in the file
* are found by their names "c_name" and "a_name".
*/
s2_t s2[LENGTH];
dataset->read(s2, mtype2);
/*
* Display the fields
*/
cout << endl << "Field c : " << endl;
for( i = 0; i < LENGTH; i++)
cout << s2[i].c << " ";
cout << endl;
/*
* Display the fields
*/
cout << endl << "Field c : " << endl;
for (i = 0; i < LENGTH; i++)
cout << s2[i].c << " ";
cout << endl;
cout << endl << "Field a : " << endl;
for( i = 0; i < LENGTH; i++)
cout << s2[i].a << " ";
cout << endl;
cout << endl << "Field a : " << endl;
for (i = 0; i < LENGTH; i++)
cout << s2[i].a << " ";
cout << endl;
/*
* Create a datatype for s3.
*/
CompType mtype3( sizeof(float) );
/*
* Create a datatype for s3.
*/
CompType mtype3(sizeof(float));
mtype3.insertMember( MEMBER2, 0, PredType::NATIVE_FLOAT);
mtype3.insertMember(MEMBER2, 0, PredType::NATIVE_FLOAT);
/*
* Read field b from s1 dataset. Field in the file is found by its name.
*/
float s3[LENGTH]; // Third "structure" - used to read float field of s1
dataset->read( s3, mtype3 );
/*
* Read field b from s1 dataset. Field in the file is found by its name.
*/
float s3[LENGTH]; // Third "structure" - used to read float field of s1
dataset->read(s3, mtype3);
/*
* Display the field
*/
cout << endl << "Field b : " << endl;
for( i = 0; i < LENGTH; i++)
cout << s3[i] << " ";
cout << endl;
/*
* Display the field
*/
cout << endl << "Field b : " << endl;
for (i = 0; i < LENGTH; i++)
cout << s3[i] << " ";
cout << endl;
/*
* Release resources
*/
delete dataset;
delete file;
} // end of try block
/*
* Release resources
*/
delete dataset;
delete file;
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the H5File operations
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataTypeIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataTypeIException error) {
error.printErrorStack();
return -1;
}
return 0;
return 0;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,115 +15,105 @@
* This example writes a dataset to a new HDF5 file.
*/
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "SDS.h5" );
const H5std_string DATASET_NAME( "IntArray" );
const int NX = 5; // dataset dimensions
const int NY = 6;
const int RANK = 2;
const H5std_string FILE_NAME("SDS.h5");
const H5std_string DATASET_NAME("IntArray");
const int NX = 5; // dataset dimensions
const int NY = 6;
const int RANK = 2;
int main (void)
int
main(void)
{
/*
* Data initialization.
*/
int i, j;
int data[NX][NY]; // buffer for data to write
for (j = 0; j < NX; j++)
{
for (i = 0; i < NY; i++)
data[j][i] = i + j;
}
/*
* 0 1 2 3 4 5
* 1 2 3 4 5 6
* 2 3 4 5 6 7
* 3 4 5 6 7 8
* 4 5 6 7 8 9
*/
/*
* Data initialization.
*/
int i, j;
int data[NX][NY]; // buffer for data to write
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++)
data[j][i] = i + j;
}
/*
* 0 1 2 3 4 5
* 1 2 3 4 5 6
* 2 3 4 5 6 7
* 3 4 5 6 7 8
* 4 5 6 7 8 9
*/
// Try block to detect exceptions raised by any of the calls inside it
try
{
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
// Try block to detect exceptions raised by any of the calls inside it
try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Create a new file using H5F_ACC_TRUNC access,
* default file creation properties, and default file
* access properties.
*/
H5File file( FILE_NAME, H5F_ACC_TRUNC );
/*
* Create a new file using H5F_ACC_TRUNC access,
* default file creation properties, and default file
* access properties.
*/
H5File file(FILE_NAME, H5F_ACC_TRUNC);
/*
* Define the size of the array and create the data space for fixed
* size dataset.
*/
hsize_t dimsf[2]; // dataset dimensions
dimsf[0] = NX;
dimsf[1] = NY;
DataSpace dataspace( RANK, dimsf );
/*
* Define the size of the array and create the data space for fixed
* size dataset.
*/
hsize_t dimsf[2]; // dataset dimensions
dimsf[0] = NX;
dimsf[1] = NY;
DataSpace dataspace(RANK, dimsf);
/*
* Define datatype for the data in the file.
* We will store little endian INT numbers.
*/
IntType datatype( PredType::NATIVE_INT );
datatype.setOrder( H5T_ORDER_LE );
/*
* Define datatype for the data in the file.
* We will store little endian INT numbers.
*/
IntType datatype(PredType::NATIVE_INT);
datatype.setOrder(H5T_ORDER_LE);
/*
* Create a new dataset within the file using defined dataspace and
* datatype and default dataset creation properties.
*/
DataSet dataset = file.createDataSet( DATASET_NAME, datatype, dataspace );
/*
* Create a new dataset within the file using defined dataspace and
* datatype and default dataset creation properties.
*/
DataSet dataset = file.createDataSet(DATASET_NAME, datatype, dataspace);
/*
* Write the data to the dataset using default memory space, file
* space, and transfer properties.
*/
dataset.write( data, PredType::NATIVE_INT );
} // end of try block
/*
* Write the data to the dataset using default memory space, file
* space, and transfer properties.
*/
dataset.write(data, PredType::NATIVE_INT);
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the H5File operations
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataTypeIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataTypeIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,11 +18,7 @@
*
*/
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>
using std::cout;
@@ -32,201 +28,195 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "SDSextendible.h5" );
const H5std_string DATASET_NAME( "ExtendibleArray" );
const int NX = 10;
const int NY = 5;
const int RANK = 2;
const H5std_string FILE_NAME("SDSextendible.h5");
const H5std_string DATASET_NAME("ExtendibleArray");
const int NX = 10;
const int NY = 5;
const int RANK = 2;
int main (void)
int
main(void)
{
/*
* Try block to detect exceptions raised by any of the calls inside it
*/
try
{
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Try block to detect exceptions raised by any of the calls inside it
*/
try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Create the data space with unlimited dimensions.
*/
hsize_t dims[2] = { 3, 3}; // dataset dimensions at creation
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
DataSpace mspace1( RANK, dims, maxdims);
/*
* Create the data space with unlimited dimensions.
*/
hsize_t dims[2] = {3, 3}; // dataset dimensions at creation
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
DataSpace mspace1(RANK, dims, maxdims);
/*
* Create a new file. If file exists its contents will be overwritten.
*/
H5File file( FILE_NAME, H5F_ACC_TRUNC );
/*
* Create a new file. If file exists its contents will be overwritten.
*/
H5File file(FILE_NAME, H5F_ACC_TRUNC);
/*
* Modify dataset creation properties, i.e. enable chunking.
*/
DSetCreatPropList cparms;
/*
* Modify dataset creation properties, i.e. enable chunking.
*/
DSetCreatPropList cparms;
hsize_t chunk_dims[2] ={2, 5};
cparms.setChunk( RANK, chunk_dims );
hsize_t chunk_dims[2] = {2, 5};
cparms.setChunk(RANK, chunk_dims);
/*
* Set fill value for the dataset
*/
int fill_val = 0;
cparms.setFillValue( PredType::NATIVE_INT, &fill_val);
/*
* Set fill value for the dataset
*/
int fill_val = 0;
cparms.setFillValue(PredType::NATIVE_INT, &fill_val);
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
DataSet dataset = file.createDataSet(DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
/*
* Extend the dataset. This call assures that dataset is at least 3 x 3.
*/
hsize_t size[2];
size[0] = 3;
size[1] = 3;
dataset.extend( size );
/*
* Extend the dataset. This call assures that dataset is at least 3 x 3.
*/
hsize_t size[2];
size[0] = 3;
size[1] = 3;
dataset.extend(size);
/*
* Select a hyperslab.
*/
DataSpace fspace1 = dataset.getSpace ();
hsize_t offset[2];
offset[0] = 0;
offset[1] = 0;
hsize_t dims1[2] = { 3, 3}; /* data1 dimensions */
fspace1.selectHyperslab( H5S_SELECT_SET, dims1, offset );
/*
* Select a hyperslab.
*/
DataSpace fspace1 = dataset.getSpace();
hsize_t offset[2];
offset[0] = 0;
offset[1] = 0;
hsize_t dims1[2] = {3, 3}; /* data1 dimensions */
fspace1.selectHyperslab(H5S_SELECT_SET, dims1, offset);
/*
* Write the data to the hyperslab.
*/
int data1[3][3] = { {1, 1, 1}, /* data to write */
{1, 1, 1},
{1, 1, 1} };
dataset.write( data1, PredType::NATIVE_INT, mspace1, fspace1 );
/*
* Write the data to the hyperslab.
*/
int data1[3][3] = {{1, 1, 1}, /* data to write */
{1, 1, 1},
{1, 1, 1}};
dataset.write(data1, PredType::NATIVE_INT, mspace1, fspace1);
/*
* Extend the dataset. Dataset becomes 10 x 3.
*/
hsize_t dims2[2] = { 7, 1}; /* data2 dimensions */
dims[0] = dims1[0] + dims2[0];
size[0] = dims[0];
size[1] = dims[1];
dataset.extend( size );
/*
* Extend the dataset. Dataset becomes 10 x 3.
*/
hsize_t dims2[2] = {7, 1}; /* data2 dimensions */
dims[0] = dims1[0] + dims2[0];
size[0] = dims[0];
size[1] = dims[1];
dataset.extend(size);
/*
* Select a hyperslab.
*/
DataSpace fspace2 = dataset.getSpace ();
offset[0] = 3;
offset[1] = 0;
fspace2.selectHyperslab( H5S_SELECT_SET, dims2, offset );
/*
* Select a hyperslab.
*/
DataSpace fspace2 = dataset.getSpace();
offset[0] = 3;
offset[1] = 0;
fspace2.selectHyperslab(H5S_SELECT_SET, dims2, offset);
/*
* Define memory space
*/
DataSpace mspace2( RANK, dims2 );
/*
* Define memory space
*/
DataSpace mspace2(RANK, dims2);
/*
* Write the data to the hyperslab.
*/
int data2[7] = { 2, 2, 2, 2, 2, 2, 2};
dataset.write( data2, PredType::NATIVE_INT, mspace2, fspace2 );
/*
* Write the data to the hyperslab.
*/
int data2[7] = {2, 2, 2, 2, 2, 2, 2};
dataset.write(data2, PredType::NATIVE_INT, mspace2, fspace2);
/*
* Extend the dataset. Dataset becomes 10 x 5.
*/
hsize_t dims3[2] = { 2, 2}; /* data3 dimensions */
dims[1] = dims1[1] + dims3[1];
size[0] = dims[0];
size[1] = dims[1];
dataset.extend( size );
/*
* Extend the dataset. Dataset becomes 10 x 5.
*/
hsize_t dims3[2] = {2, 2}; /* data3 dimensions */
dims[1] = dims1[1] + dims3[1];
size[0] = dims[0];
size[1] = dims[1];
dataset.extend(size);
/*
* Select a hyperslab
*/
DataSpace fspace3 = dataset.getSpace ();
offset[0] = 0;
offset[1] = 3;
fspace3.selectHyperslab( H5S_SELECT_SET, dims3, offset );
/*
* Select a hyperslab
*/
DataSpace fspace3 = dataset.getSpace();
offset[0] = 0;
offset[1] = 3;
fspace3.selectHyperslab(H5S_SELECT_SET, dims3, offset);
/*
* Define memory space.
*/
DataSpace mspace3( RANK, dims3 );
/*
* Define memory space.
*/
DataSpace mspace3(RANK, dims3);
/*
* Write the data to the hyperslab.
*/
int data3[2][2] = { {3, 3}, {3, 3} };
dataset.write( data3, PredType::NATIVE_INT, mspace3, fspace3 );
/*
* Write the data to the hyperslab.
*/
int data3[2][2] = {{3, 3}, {3, 3}};
dataset.write(data3, PredType::NATIVE_INT, mspace3, fspace3);
/*
* Read the data from this dataset and display it.
*/
int i, j;
int data_out[NX][NY];
for (i = 0; i < NX; i++)
{
for (j = 0; j < NY; j++)
data_out[i][j] = 0;
}
dataset.read( data_out, PredType::NATIVE_INT );
/*
* Resulting dataset
*
* 1 1 1 3 3
* 1 1 1 3 3
* 1 1 1 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
*/
/*
* Display the result.
*/
for (i=0; i < NX; i++)
{
for(j=0; j < NY; j++)
cout << data_out[i][j] << " ";
cout << endl;
}
} // end of try block
/*
* Read the data from this dataset and display it.
*/
int i, j;
int data_out[NX][NY];
for (i = 0; i < NX; i++) {
for (j = 0; j < NY; j++)
data_out[i][j] = 0;
}
dataset.read(data_out, PredType::NATIVE_INT);
/*
* Resulting dataset
*
* 1 1 1 3 3
* 1 1 1 3 3
* 1 1 1 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0
*/
/*
* Display the result.
*/
for (i = 0; i < NX; i++) {
for (j = 0; j < NY; j++)
cout << data_out[i][j] << " ";
cout << endl;
}
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the H5File operations
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataTypeIException error )
{
error.printErrorStack();
return -1;
}
return 0;
// catch failure caused by the DataSpace operations
catch (DataTypeIException error) {
error.printErrorStack();
return -1;
}
return 0;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,11 +20,7 @@
* the C version is used in this example.
*/
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;
@@ -32,22 +28,21 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "Group.h5" );
const H5std_string FILE_NAME("Group.h5");
const int RANK = 2;
// Operator function
extern "C" herr_t file_info(hid_t loc_id, const char *name, const H5L_info2_t *linfo,
void *opdata);
extern "C" herr_t file_info(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *opdata);
int main(void)
int
main(void)
{
hsize_t dims[2];
hsize_t cdims[2];
hsize_t dims[2];
hsize_t cdims[2];
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
@@ -58,12 +53,12 @@ int main(void)
* Create the named file, truncating the existing one if any,
* using default create and access property lists.
*/
H5File *file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
H5File *file = new H5File(FILE_NAME, H5F_ACC_TRUNC);
/*
* Create a group in the file
*/
Group* group = new Group( file->createGroup( "/Data" ));
Group *group = new Group(file->createGroup("/Data"));
/*
* Create dataset "Compressed Data" in the group using absolute
@@ -71,21 +66,20 @@ int main(void)
* GZIP compression with the compression effort set to 6.
* Note that compression can be used only when dataset is chunked.
*/
dims[0] = 1000;
dims[1] = 20;
cdims[0] = 20;
cdims[1] = 20;
DataSpace *dataspace = new DataSpace(RANK, dims); // create new dspace
DSetCreatPropList ds_creatplist; // create dataset creation prop list
ds_creatplist.setChunk( 2, cdims ); // then modify it for compression
ds_creatplist.setDeflate( 6 );
dims[0] = 1000;
dims[1] = 20;
cdims[0] = 20;
cdims[1] = 20;
DataSpace * dataspace = new DataSpace(RANK, dims); // create new dspace
DSetCreatPropList ds_creatplist; // create dataset creation prop list
ds_creatplist.setChunk(2, cdims); // then modify it for compression
ds_creatplist.setDeflate(6);
/*
* Create the first dataset.
*/
DataSet* dataset = new DataSet(file->createDataSet(
"/Data/Compressed_Data", PredType::NATIVE_INT,
*dataspace, ds_creatplist ));
DataSet *dataset = new DataSet(
file->createDataSet("/Data/Compressed_Data", PredType::NATIVE_INT, *dataspace, ds_creatplist));
/*
* Close the first dataset.
@@ -96,11 +90,10 @@ int main(void)
/*
* Create the second dataset.
*/
dims[0] = 500;
dims[1] = 20;
dims[0] = 500;
dims[1] = 20;
dataspace = new DataSpace(RANK, dims); // create second dspace
dataset = new DataSet(file->createDataSet("/Data/Float_Data",
PredType::NATIVE_FLOAT, *dataspace));
dataset = new DataSet(file->createDataSet("/Data/Float_Data", PredType::NATIVE_FLOAT, *dataspace));
delete dataset;
delete dataspace;
@@ -110,16 +103,16 @@ int main(void)
/*
* Now reopen the file and group in the file.
*/
file = new H5File(FILE_NAME, H5F_ACC_RDWR);
file = new H5File(FILE_NAME, H5F_ACC_RDWR);
group = new Group(file->openGroup("Data"));
/*
* Access "Compressed_Data" dataset in the group.
*/
try { // to determine if the dataset exists in the group
dataset = new DataSet( group->openDataSet( "Compressed_Data" ));
try { // to determine if the dataset exists in the group
dataset = new DataSet(group->openDataSet("Compressed_Data"));
}
catch( GroupIException not_found_error ) {
catch (GroupIException not_found_error) {
cout << " Dataset is not found." << endl;
}
cout << "dataset \"/Data/Compressed_Data\" is open" << endl;
@@ -132,17 +125,16 @@ int main(void)
/*
* Create hard link to the Data group.
*/
file->link( H5L_TYPE_HARD, "Data", "Data_new" );
file->link(H5L_TYPE_HARD, "Data", "Data_new");
/*
* We can access "Compressed_Data" dataset using created
* hard link "Data_new".
*/
try { // to determine if the dataset exists in the file
dataset = new DataSet(file->openDataSet( "/Data_new/Compressed_Data" ));
try { // to determine if the dataset exists in the file
dataset = new DataSet(file->openDataSet("/Data_new/Compressed_Data"));
}
catch( FileIException not_found_error )
{
catch (FileIException not_found_error) {
cout << " Dataset is not found." << endl;
}
cout << "dataset \"/Data_new/Compressed_Data\" is open" << endl;
@@ -165,11 +157,10 @@ int main(void)
* of the objects in the file root direvtory.
*/
cout << "Unlinking..." << endl;
try { // attempt to unlink the dataset
file->unlink( "Data" );
try { // attempt to unlink the dataset
file->unlink("Data");
}
catch( FileIException unlink_error )
{
catch (FileIException unlink_error) {
cout << " unlink failed." << endl;
}
cout << "\"Data\" is unlinked" << endl;
@@ -183,32 +174,28 @@ int main(void)
*/
delete group;
delete file;
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the Attribute operations
catch( AttributeIException error )
{
catch (AttributeIException error) {
error.printErrorStack();
return -1;
}
@@ -236,4 +223,3 @@ file_info(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *opdata
H5Gclose(group);
return 0;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,20 +24,20 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME("h5tutr_cmprss.h5");
const H5std_string DATASET_NAME("Compressed_Data");
const int DIM0 = 100;
const int DIM1 = 20;
const H5std_string FILE_NAME("h5tutr_cmprss.h5");
const H5std_string DATASET_NAME("Compressed_Data");
const int DIM0 = 100;
const int DIM1 = 20;
int main (void)
int
main(void)
{
hsize_t dims[2] = { DIM0, DIM1 }; // dataset dimensions
hsize_t chunk_dims[2] = { 20, 20 }; // chunk dimensions
int i,j, buf[DIM0][DIM1];
hsize_t dims[2] = {DIM0, DIM1}; // dataset dimensions
hsize_t chunk_dims[2] = {20, 20}; // chunk dimensions
int i, j, buf[DIM0][DIM1];
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
@@ -49,7 +49,7 @@ int main (void)
DataSpace *dataspace = new DataSpace(2, dims);
// Modify dataset creation property to enable chunking
DSetCreatPropList *plist = new DSetCreatPropList;
DSetCreatPropList *plist = new DSetCreatPropList;
plist->setChunk(2, chunk_dims);
// Set ZLIB (DEFLATE) Compression using level 6.
@@ -62,12 +62,12 @@ int main (void)
// plist->setSzip(szip_options_mask, szip_pixels_per_block);
// Create the dataset.
DataSet *dataset = new DataSet(file.createDataSet( DATASET_NAME,
PredType::STD_I32BE, *dataspace, *plist) );
DataSet *dataset =
new DataSet(file.createDataSet(DATASET_NAME, PredType::STD_I32BE, *dataspace, *plist));
for (i = 0; i< DIM0; i++)
for (j=0; j<DIM1; j++)
buf[i][j] = i+j;
for (i = 0; i < DIM0; i++)
for (j = 0; j < DIM1; j++)
buf[i][j] = i + j;
// Write data to dataset.
dataset->write(buf, PredType::NATIVE_INT);
@@ -83,41 +83,41 @@ int main (void)
// information for dataset and read the data back.
// -----------------------------------------------
int rbuf[DIM0][DIM1];
int numfilt;
size_t nelmts={1}, namelen={1};
unsigned flags, filter_info, cd_values[1], idx;
char name[1];
int rbuf[DIM0][DIM1];
int numfilt;
size_t nelmts = {1}, namelen = {1};
unsigned flags, filter_info, cd_values[1], idx;
char name[1];
H5Z_filter_t filter_type;
// Open the file and the dataset in the file.
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
dataset = new DataSet(file.openDataSet( DATASET_NAME));
dataset = new DataSet(file.openDataSet(DATASET_NAME));
// Get the create property list of the dataset.
plist = new DSetCreatPropList(dataset->getCreatePlist ());
plist = new DSetCreatPropList(dataset->getCreatePlist());
// Get the number of filters associated with the dataset.
numfilt = plist->getNfilters();
cout << "Number of filters associated with dataset: " << numfilt << endl;
for (idx=0; idx < numfilt; idx++) {
for (idx = 0; idx < numfilt; idx++) {
nelmts = 0;
filter_type = plist->getFilter(idx, flags, nelmts, cd_values, namelen, name , filter_info);
filter_type = plist->getFilter(idx, flags, nelmts, cd_values, namelen, name, filter_info);
cout << "Filter Type: ";
switch (filter_type) {
case H5Z_FILTER_DEFLATE:
cout << "H5Z_FILTER_DEFLATE" << endl;
break;
case H5Z_FILTER_SZIP:
cout << "H5Z_FILTER_SZIP" << endl;
break;
default:
cout << "Other filter type included." << endl;
}
case H5Z_FILTER_DEFLATE:
cout << "H5Z_FILTER_DEFLATE" << endl;
break;
case H5Z_FILTER_SZIP:
cout << "H5Z_FILTER_SZIP" << endl;
break;
default:
cout << "Other filter type included." << endl;
}
}
// Read data.
@@ -125,31 +125,27 @@ int main (void)
delete plist;
delete dataset;
file.close(); // can be skipped
file.close(); // can be skipped
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,69 +21,62 @@
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "h5tutr_dset.h5" );
const H5std_string DATASET_NAME( "dset" );
const H5std_string ATTR_NAME( "Units" );
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const H5std_string ATTR_NAME("Units");
const int DIM1 = 2;
const int DIM1 = 2;
int main (void)
int
main(void)
{
int attr_data[2] = { 100, 200};
hsize_t dims[1] = { DIM1 };
int attr_data[2] = {100, 200};
hsize_t dims[1] = {DIM1};
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Try block to detect exceptions raised by any of the calls inside it
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Open an existing file and dataset.
H5File file( FILE_NAME, H5F_ACC_RDWR );
DataSet dataset = file.openDataSet( DATASET_NAME );
H5File file(FILE_NAME, H5F_ACC_RDWR);
DataSet dataset = file.openDataSet(DATASET_NAME);
// Create the data space for the attribute.
DataSpace attr_dataspace = DataSpace (1, dims );
DataSpace attr_dataspace = DataSpace(1, dims);
// Create a dataset attribute.
Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE,
attr_dataspace);
Attribute attribute = dataset.createAttribute(ATTR_NAME, PredType::STD_I32BE, attr_dataspace);
// Write the attribute data.
attribute.write( PredType::NATIVE_INT, attr_data);
attribute.write(PredType::NATIVE_INT, attr_data);
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch( DataSpaceIException error )
{
// catch failure caused by the H5File operations
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
}
// catch failure caused by the H5File operations
catch( AttributeIException error )
{
// catch failure caused by the H5File operations
catch (AttributeIException error) {
error.printErrorStack();
return -1;
}
}
// catch failure caused by the H5File operations
catch( FileIException error )
{
// catch failure caused by the H5File operations
catch (FileIException error) {
error.printErrorStack();
return -1;
}
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
// catch failure caused by the DataSet operations
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,17 +22,17 @@
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int NX = 4; // dataset dimensions
const int NY = 6;
const int RANK = 2;
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int NX = 4; // dataset dimensions
const int NY = 6;
const int RANK = 2;
int main (void)
int
main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
@@ -41,7 +41,7 @@ int main (void)
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset.
hsize_t dims[2]; // dataset dimensions
hsize_t dims[2]; // dataset dimensions
dims[0] = NX;
dims[1] = NY;
DataSpace dataspace(RANK, dims);
@@ -49,29 +49,25 @@ int main (void)
// Create the dataset.
DataSet dataset = file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace);
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,11 +26,11 @@ using namespace H5;
const H5std_string FILE_NAME("h5tutr_group.h5");
int main(void)
int
main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
@@ -46,14 +46,12 @@ int main(void)
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the Group operations
catch(GroupIException error)
{
catch (GroupIException error) {
error.printErrorStack();
return -1;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,12 +26,12 @@ using namespace H5;
const H5std_string FILE_NAME("h5tutr_groups.h5");
int main(void)
int
main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately.
@@ -44,7 +44,7 @@ int main(void)
// Create group "MyGroup" in the root group using an absolute name.
Group group1(file.createGroup( "/MyGroup"));
Group group1(file.createGroup("/MyGroup"));
// Create group "Group_A" in group "MyGroup" using an
// absolute name.
@@ -54,7 +54,7 @@ int main(void)
// Create group "Group_B" in group "MyGroup" using a
// relative name.
Group group3(group1.createGroup ("Group_B"));
Group group3(group1.createGroup("Group_B"));
// Close the groups and file.
@@ -66,20 +66,16 @@ int main(void)
} // end of try block
// catch failure caused by the File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the Group operations
catch(GroupIException error)
{
catch (GroupIException error) {
error.printErrorStack();
return -1;
}
return 0;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,20 +27,20 @@ using namespace H5;
const H5std_string FILE_NAME("h5tutr_groups.h5");
const H5std_string DATASET_NAME1("/MyGroup/dset1");
const H5std_string DATASET_NAME2("dset2");
const int RANK = 2;
const int D1DIM1 = 3;
const int D1DIM2 = 3;
const int D2DIM1 = 2;
const int D2DIM2 = 10;
const int RANK = 2;
const int D1DIM1 = 3;
const int D1DIM2 = 3;
const int D2DIM1 = 2;
const int D2DIM2 = 10;
int main(void)
int
main(void)
{
int dset1_data[D1DIM1][D1DIM2], dset2_data[D2DIM1][D2DIM2]; // data buffers
int i, j;
// Try block to catch exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
@@ -48,12 +48,12 @@ int main(void)
// Initialize the first dataset.
for (i = 0; i < D1DIM1; i++)
for (j = 0; j < D1DIM2; j++)
dset1_data[i][j] = j + 1;
dset1_data[i][j] = j + 1;
// Initialize the second dataset.
for (i = 0; i < D2DIM1; i++)
for (j = 0; j < D2DIM2; j++)
dset2_data[i][j] = j + 1;
for (j = 0; j < D2DIM2; j++)
dset2_data[i][j] = j + 1;
// Open an existing file and dataset.
H5File file(FILE_NAME, H5F_ACC_RDWR);
@@ -62,15 +62,14 @@ int main(void)
// pointer for the instance 'dataspace'. It can be deleted and
// used again later for another data space. An HDF5 identifier is
// closed by the destructor or the method 'close()'.
hsize_t dims[RANK]; // dataset dimensions
dims[0] = D1DIM1;
dims[1] = D1DIM2;
DataSpace *dataspace = new DataSpace (RANK, dims);
hsize_t dims[RANK]; // dataset dimensions
dims[0] = D1DIM1;
dims[1] = D1DIM2;
DataSpace *dataspace = new DataSpace(RANK, dims);
// Create the dataset in group "MyGroup". Same note as for the
// dataspace above.
DataSet *dataset = new DataSet (file.createDataSet(DATASET_NAME1,
PredType::STD_I32BE, *dataspace));
DataSet *dataset = new DataSet(file.createDataSet(DATASET_NAME1, PredType::STD_I32BE, *dataspace));
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
@@ -81,16 +80,15 @@ int main(void)
delete dataspace;
// Create the data space for the second dataset.
dims[0] = D2DIM1;
dims[1] = D2DIM2;
dataspace = new DataSpace (RANK, dims);
dims[0] = D2DIM1;
dims[1] = D2DIM2;
dataspace = new DataSpace(RANK, dims);
// Create group "Group_A" in group "MyGroup".
Group group(file.openGroup("/MyGroup/Group_A"));
// Create the second dataset in group "Group_A".
dataset = new DataSet (group.createDataSet(DATASET_NAME2,
PredType::STD_I32BE, *dataspace));
dataset = new DataSet(group.createDataSet(DATASET_NAME2, PredType::STD_I32BE, *dataspace));
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
@@ -104,31 +102,27 @@ int main(void)
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printErrorStack();
return -1;
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printErrorStack();
return -1;
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the Group operations
catch(GroupIException error)
{
catch (GroupIException error) {
error.printErrorStack();
return -1;
}
return 0;
return 0;
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,34 +24,28 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME("h5tutr_extend.h5");
const H5std_string DATASETNAME("ExtendibleArray");
const H5std_string FILE_NAME("h5tutr_extend.h5");
const H5std_string DATASETNAME("ExtendibleArray");
int main (void)
int
main(void)
{
hsize_t dims[2] = {3,3}; // dataset dimensions at creation
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] ={2, 5};
int data[3][3] = { {1, 1, 1}, // data to write
{1, 1, 1},
{1, 1, 1} };
hsize_t dims[2] = {3, 3}; // dataset dimensions at creation
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {2, 5};
int data[3][3] = {{1, 1, 1}, // data to write
{1, 1, 1},
{1, 1, 1}};
// Variables used in extending and writing to the extended portion of dataset
// Variables used in extending and writing to the extended portion of dataset
hsize_t size[2];
hsize_t offset[2];
hsize_t dimsext[2] = {7, 3}; // extend dimensions
int dataext[7][3] = { {2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4} };
hsize_t size[2];
hsize_t offset[2];
hsize_t dimsext[2] = {7, 3}; // extend dimensions
int dataext[7][3] = {{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}};
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
@@ -63,15 +57,15 @@ int main (void)
// for the instance 'dataspace'. It can be deleted and used again
// later for another dataspace. An HDF5 identifier can be closed
// by the destructor or the method 'close()'.
DataSpace *dataspace = new DataSpace (2, dims, maxdims);
DataSpace *dataspace = new DataSpace(2, dims, maxdims);
// Modify dataset creation property to enable chunking
DSetCreatPropList prop;
prop.setChunk(2, chunk_dims);
// Create the chunked dataset. Note the use of pointer.
DataSet *dataset = new DataSet(file.createDataSet( DATASETNAME,
PredType::STD_I32BE, *dataspace, prop) );
DataSet *dataset =
new DataSet(file.createDataSet(DATASETNAME, PredType::STD_I32BE, *dataspace, prop));
// Write data to dataset.
dataset->write(data, PredType::NATIVE_INT);
@@ -82,9 +76,9 @@ int main (void)
dataset->extend(size);
// Select a hyperslab in extended portion of the dataset.
DataSpace *filespace = new DataSpace(dataset->getSpace ());
offset[0] = 3;
offset[1] = 0;
DataSpace *filespace = new DataSpace(dataset->getSpace());
offset[0] = 3;
offset[1] = 0;
filespace->selectHyperslab(H5S_SELECT_SET, dimsext, offset);
// Define memory space.
@@ -105,25 +99,26 @@ int main (void)
// Re-open the file and read the data back
// ---------------------------------------
int rdata[10][3];
int i,j, rank, rank_chunk;
hsize_t chunk_dimsr[2], dimsr[2];
int rdata[10][3];
int i, j, rank, rank_chunk;
hsize_t chunk_dimsr[2], dimsr[2];
// Open the file and dataset.
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
dataset = new DataSet(file.openDataSet( DATASETNAME));
dataset = new DataSet(file.openDataSet(DATASETNAME));
// Get the dataset's dataspace and creation property list.
filespace = new DataSpace(dataset->getSpace());
prop = dataset->getCreatePlist();
prop = dataset->getCreatePlist();
// Get information to obtain memory dataspace.
rank = filespace->getSimpleExtentNdims();
rank = filespace->getSimpleExtentNdims();
herr_t status_n = filespace->getSimpleExtentDims(dimsr);
if (H5D_CHUNKED == prop.getLayout())
rank_chunk = prop.getChunk(rank, chunk_dimsr);
cout << "rank chunk = " << rank_chunk << endl;;
rank_chunk = prop.getChunk(rank, chunk_dimsr);
cout << "rank chunk = " << rank_chunk << endl;
;
memspace = new DataSpace(rank, dimsr, NULL);
dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace);
@@ -131,7 +126,7 @@ int main (void)
cout << endl;
for (j = 0; j < dimsr[0]; j++) {
for (i = 0; i < dimsr[1]; i++)
cout << " " << rdata[j][i];
cout << " " << rdata[j][i];
cout << endl;
}
@@ -142,29 +137,25 @@ int main (void)
delete dataset;
file.close();
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,53 +21,51 @@
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int DIM0 = 4; // dataset dimensions
const int DIM1 = 6;
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int DIM0 = 4; // dataset dimensions
const int DIM1 = 6;
int main (void)
int
main(void)
{
// Data initialization.
int i, j;
int data[DIM0][DIM1]; // buffer for data to write
int data[DIM0][DIM1]; // buffer for data to write
for (j = 0; j < DIM0; j++)
for (i = 0; i < DIM1; i++)
data[j][i] = i * 6 + j + 1;
data[j][i] = i * 6 + j + 1;
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Open an existing file and dataset.
H5File file(FILE_NAME, H5F_ACC_RDWR);
H5File file(FILE_NAME, H5F_ACC_RDWR);
DataSet dataset = file.openDataSet(DATASET_NAME);
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
dataset.write(data, PredType::NATIVE_INT);
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,23 +24,23 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME("h5tutr_subset.h5");
const H5std_string DATASET_NAME("IntArray");
const H5std_string FILE_NAME("h5tutr_subset.h5");
const H5std_string DATASET_NAME("IntArray");
const int RANK = 2;
const int DIM0_SUB = 3; // subset dimensions
const int DIM1_SUB = 4;
const int DIM0 = 8; // size of dataset
const int DIM1 = 10;
const int RANK = 2;
const int DIM0_SUB = 3; // subset dimensions
const int DIM1_SUB = 4;
const int DIM0 = 8; // size of dataset
const int DIM1 = 10;
int main (void)
int
main(void)
{
int i,j;
int data[DIM0][DIM1], sdata[DIM0_SUB][DIM1_SUB], rdata[DIM0][DIM1];
int i, j;
int data[DIM0][DIM1], sdata[DIM0_SUB][DIM1_SUB], rdata[DIM0][DIM1];
// Try block to detect exceptions raised by any of the calls inside it
try
{
try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
@@ -54,28 +54,26 @@ int main (void)
H5File file(FILE_NAME, H5F_ACC_TRUNC);
hsize_t dims[2];
dims[0] = DIM0;
dims[1] = DIM1;
DataSpace dataspace = DataSpace (RANK, dims);
DataSet dataset(file.createDataSet( DATASET_NAME,
PredType::STD_I32BE, dataspace) );
dims[0] = DIM0;
dims[1] = DIM1;
DataSpace dataspace = DataSpace(RANK, dims);
DataSet dataset(file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace));
for (j = 0; j < DIM0; j++) {
for (i = 0; i < DIM1; i++)
if (i< (DIM1/2))
for (i = 0; i < DIM1; i++)
if (i < (DIM1 / 2))
data[j][i] = 1;
else
else
data[j][i] = 2;
}
}
dataset.write(data, PredType::NATIVE_INT);
cout << endl << "Data Written to File:" << endl;
for (j = 0; j < DIM0; j++) {
for (i = 0; i < DIM1; i++)
cout << " " << data[j][i];
cout << " " << data[j][i];
cout << endl;
}
@@ -99,8 +97,8 @@ int main (void)
offset[0] = 1;
offset[1] = 2;
count[0] = DIM0_SUB;
count[1] = DIM1_SUB;
count[0] = DIM0_SUB;
count[1] = DIM1_SUB;
stride[0] = 1;
stride[1] = 1;
@@ -126,17 +124,16 @@ int main (void)
cout << " offset=1x2 stride=1x1 count=3x4 block=1x1" << endl;
for (j = 0; j < DIM0_SUB; j++) {
for (i = 0; i < DIM1_SUB; i++)
sdata[j][i] = 5;
sdata[j][i] = 5;
}
dataset.write(sdata, PredType::NATIVE_INT, memspace, dataspace);
dataset.read(rdata, PredType::NATIVE_INT);
cout << endl << "Data in File after Subset is Written:" << endl;
for (i = 0; i < DIM0; i++) {
for (j = 0; j < DIM1; j++)
cout << " " << rdata[i][j];
cout << " " << rdata[i][j];
cout << endl;
}
cout << endl;
@@ -148,29 +145,25 @@ int main (void)
dataset.close();
file.close();
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,11 +17,7 @@
// information about the dataset in the SDS.h5 file is obtained.
//
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;
@@ -29,184 +25,174 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "SDS.h5" );
const H5std_string DATASET_NAME( "IntArray" );
const int NX_SUB = 3; // hyperslab dimensions
const int NY_SUB = 4;
const int NX = 7; // output buffer dimensions
const int NY = 7;
const int NZ = 3;
const int RANK_OUT = 3;
const H5std_string FILE_NAME("SDS.h5");
const H5std_string DATASET_NAME("IntArray");
const int NX_SUB = 3; // hyperslab dimensions
const int NY_SUB = 4;
const int NX = 7; // output buffer dimensions
const int NY = 7;
const int NZ = 3;
const int RANK_OUT = 3;
int main (void)
int
main(void)
{
/*
* Output buffer initialization.
*/
int i, j, k;
int data_out[NX][NY][NZ ]; /* output buffer */
for (j = 0; j < NX; j++)
{
for (i = 0; i < NY; i++)
{
for (k = 0; k < NZ ; k++)
data_out[j][i][k] = 0;
}
}
/*
* Output buffer initialization.
*/
int i, j, k;
int data_out[NX][NY][NZ]; /* output buffer */
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++) {
for (k = 0; k < NZ; k++)
data_out[j][i][k] = 0;
}
}
/*
* Try block to detect exceptions raised by any of the calls inside it
*/
try
{
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Try block to detect exceptions raised by any of the calls inside it
*/
try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
*/
Exception::dontPrint();
/*
* Open the specified file and the specified dataset in the file.
*/
H5File file( FILE_NAME, H5F_ACC_RDONLY );
DataSet dataset = file.openDataSet( DATASET_NAME );
/*
* Open the specified file and the specified dataset in the file.
*/
H5File file(FILE_NAME, H5F_ACC_RDONLY);
DataSet dataset = file.openDataSet(DATASET_NAME);
/*
* Get the class of the datatype that is used by the dataset.
*/
H5T_class_t type_class = dataset.getTypeClass();
/*
* Get the class of the datatype that is used by the dataset.
*/
H5T_class_t type_class = dataset.getTypeClass();
/*
* Get class of datatype and print message if it's an integer.
*/
if( type_class == H5T_INTEGER )
{
cout << "Data set has INTEGER type" << endl;
/*
* Get class of datatype and print message if it's an integer.
*/
if (type_class == H5T_INTEGER) {
cout << "Data set has INTEGER type" << endl;
/*
* Get the integer datatype
*/
IntType intype = dataset.getIntType();
/*
* Get the integer datatype
*/
IntType intype = dataset.getIntType();
/*
* Get order of datatype and print message if it's a little endian.
*/
H5std_string order_string;
H5T_order_t order = intype.getOrder( order_string );
cout << order_string << endl;
/*
* Get order of datatype and print message if it's a little endian.
*/
H5std_string order_string;
H5T_order_t order = intype.getOrder(order_string);
cout << order_string << endl;
/*
* Get size of the data element stored in file and print it.
*/
size_t size = intype.getSize();
cout << "Data size is " << size << endl;
}
/*
* Get size of the data element stored in file and print it.
*/
size_t size = intype.getSize();
cout << "Data size is " << size << endl;
}
/*
* Get dataspace of the dataset.
*/
DataSpace dataspace = dataset.getSpace();
/*
* Get dataspace of the dataset.
*/
DataSpace dataspace = dataset.getSpace();
/*
* Get the number of dimensions in the dataspace.
*/
int rank = dataspace.getSimpleExtentNdims();
/*
* Get the number of dimensions in the dataspace.
*/
int rank = dataspace.getSimpleExtentNdims();
/*
* Get the dimension size of each dimension in the dataspace and
* display them.
*/
hsize_t dims_out[2];
int ndims = dataspace.getSimpleExtentDims( dims_out, NULL);
cout << "rank " << rank << ", dimensions " <<
(unsigned long)(dims_out[0]) << " x " <<
(unsigned long)(dims_out[1]) << endl;
/*
* Get the dimension size of each dimension in the dataspace and
* display them.
*/
hsize_t dims_out[2];
int ndims = dataspace.getSimpleExtentDims(dims_out, NULL);
cout << "rank " << rank << ", dimensions " << (unsigned long)(dims_out[0]) << " x "
<< (unsigned long)(dims_out[1]) << endl;
/*
* Define hyperslab in the dataset; implicitly giving strike and
* block NULL.
*/
hsize_t offset[2]; // hyperslab offset in the file
hsize_t count[2]; // size of the hyperslab in the file
offset[0] = 1;
offset[1] = 2;
count[0] = NX_SUB;
count[1] = NY_SUB;
dataspace.selectHyperslab( H5S_SELECT_SET, count, offset );
/*
* Define hyperslab in the dataset; implicitly giving strike and
* block NULL.
*/
hsize_t offset[2]; // hyperslab offset in the file
hsize_t count[2]; // size of the hyperslab in the file
offset[0] = 1;
offset[1] = 2;
count[0] = NX_SUB;
count[1] = NY_SUB;
dataspace.selectHyperslab(H5S_SELECT_SET, count, offset);
/*
* Define the memory dataspace.
*/
hsize_t dimsm[3]; /* memory space dimensions */
dimsm[0] = NX;
dimsm[1] = NY;
dimsm[2] = NZ ;
DataSpace memspace( RANK_OUT, dimsm );
/*
* Define the memory dataspace.
*/
hsize_t dimsm[3]; /* memory space dimensions */
dimsm[0] = NX;
dimsm[1] = NY;
dimsm[2] = NZ;
DataSpace memspace(RANK_OUT, dimsm);
/*
* Define memory hyperslab.
*/
hsize_t offset_out[3]; // hyperslab offset in memory
hsize_t count_out[3]; // size of the hyperslab in memory
offset_out[0] = 3;
offset_out[1] = 0;
offset_out[2] = 0;
count_out[0] = NX_SUB;
count_out[1] = NY_SUB;
count_out[2] = 1;
memspace.selectHyperslab( H5S_SELECT_SET, count_out, offset_out );
/*
* Define memory hyperslab.
*/
hsize_t offset_out[3]; // hyperslab offset in memory
hsize_t count_out[3]; // size of the hyperslab in memory
offset_out[0] = 3;
offset_out[1] = 0;
offset_out[2] = 0;
count_out[0] = NX_SUB;
count_out[1] = NY_SUB;
count_out[2] = 1;
memspace.selectHyperslab(H5S_SELECT_SET, count_out, offset_out);
/*
* Read data from hyperslab in the file into the hyperslab in
* memory and display the data.
*/
dataset.read( data_out, PredType::NATIVE_INT, memspace, dataspace );
/*
* Read data from hyperslab in the file into the hyperslab in
* memory and display the data.
*/
dataset.read(data_out, PredType::NATIVE_INT, memspace, dataspace);
for (j = 0; j < NX; j++)
{
for (i = 0; i < NY; i++)
cout << data_out[j][i][0] << " ";
cout << endl;
}
/*
* 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0
* 3 4 5 6 0 0 0
* 4 5 6 7 0 0 0
* 5 6 7 8 0 0 0
* 0 0 0 0 0 0 0
*/
} // end of try block
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++)
cout << data_out[j][i][0] << " ";
cout << endl;
}
/*
* 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0
* 3 4 5 6 0 0 0
* 4 5 6 7 0 0 0
* 5 6 7 8 0 0 0
* 0 0 0 0 0 0 0
*/
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the H5File operations
catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSet operations
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch( DataTypeIException error )
{
error.printErrorStack();
return -1;
}
// catch failure caused by the DataSpace operations
catch (DataTypeIException error) {
error.printErrorStack();
return -1;
}
return 0; // successfully terminated
return 0; // successfully terminated
}

View File

@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.

View File

@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -67,11 +67,7 @@ temp_FILES="a.out $applib"
cat > $appmain <<EOF
#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include "H5Cpp.h"
@@ -95,19 +91,11 @@ EOF
# generate prog1
cat > $prog1 <<EOF
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <iostream>
#include <string>
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
using std::cout;
using std::endl;
int sub1(void)
{
cout << "in sub1" << endl;
@@ -117,19 +105,11 @@ EOF
# generate prog2
cat > $prog2 <<EOF
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <iostream>
#include <string>
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
using std::cout;
using std::endl;
int sub2(void)
{
cout << "in sub2" << endl;
@@ -142,11 +122,7 @@ EOF
cat > $hdf5main <<EOF
#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include "H5Cpp.h"

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,11 +20,7 @@
* file is closed. Program reopens the file and reads and displays the result.
*/
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;
@@ -32,31 +28,31 @@ using std::endl;
#include "H5Cpp.h"
using namespace H5;
const H5std_string FILE_NAME( "Select.h5" );
const H5std_string DATASET_NAME( "Matrix in file" );
const int MSPACE1_RANK = 1; // Rank of the first dataset in memory
const int MSPACE1_DIM = 50; // Dataset size in memory
const int MSPACE2_RANK = 1; // Rank of the second dataset in memory
const int MSPACE2_DIM = 4; // Dataset size in memory
const int FSPACE_RANK = 2; // Dataset rank as it is stored in the file
const int FSPACE_DIM1 = 8; // Dimension sizes of the dataset as it is
const int FSPACE_DIM2 = 12; // stored in the file
const int MSPACE_RANK = 2; // Rank of the first dataset in memory
const int MSPACE_DIM1 = 8; // We will read dataset back from the file
const int MSPACE_DIM2 = 9; // to the dataset in memory with these
// dataspace parameters
const int NPOINTS = 4; // Number of points that will be selected
// and overwritten
const H5std_string FILE_NAME("Select.h5");
const H5std_string DATASET_NAME("Matrix in file");
const int MSPACE1_RANK = 1; // Rank of the first dataset in memory
const int MSPACE1_DIM = 50; // Dataset size in memory
const int MSPACE2_RANK = 1; // Rank of the second dataset in memory
const int MSPACE2_DIM = 4; // Dataset size in memory
const int FSPACE_RANK = 2; // Dataset rank as it is stored in the file
const int FSPACE_DIM1 = 8; // Dimension sizes of the dataset as it is
const int FSPACE_DIM2 = 12; // stored in the file
const int MSPACE_RANK = 2; // Rank of the first dataset in memory
const int MSPACE_DIM1 = 8; // We will read dataset back from the file
const int MSPACE_DIM2 = 9; // to the dataset in memory with these
// dataspace parameters
const int NPOINTS = 4; // Number of points that will be selected
// and overwritten
int main (void)
int
main(void)
{
int i,j; // loop indices */
int i, j; // loop indices */
/*
* Try block to detect exceptions raised by any of the calls inside it
*/
try
{
try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
@@ -66,47 +62,51 @@ int main (void)
/*
* Create a file.
*/
H5File* file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
H5File *file = new H5File(FILE_NAME, H5F_ACC_TRUNC);
/*
* Create property list for a dataset and set up fill values.
*/
int fillvalue = 0; /* Fill value for the dataset */
* Create property list for a dataset and set up fill values.
*/
int fillvalue = 0; /* Fill value for the dataset */
DSetCreatPropList plist;
plist.setFillValue(PredType::NATIVE_INT, &fillvalue);
/*
* Create dataspace for the dataset in the file.
*/
hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2}; // dim sizes of ds (on disk)
DataSpace fspace( FSPACE_RANK, fdim );
hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2}; // dim sizes of ds (on disk)
DataSpace fspace(FSPACE_RANK, fdim);
/*
* Create dataset and write it into the file.
*/
DataSet* dataset = new DataSet(file->createDataSet(
DATASET_NAME, PredType::NATIVE_INT, fspace, plist));
DataSet *dataset =
new DataSet(file->createDataSet(DATASET_NAME, PredType::NATIVE_INT, fspace, plist));
/*
* Select hyperslab for the dataset in the file, using 3x2 blocks,
* (4,3) stride and (2,4) count starting at the position (0,1).
*/
hsize_t start[2]; // Start of hyperslab
hsize_t start[2]; // Start of hyperslab
hsize_t stride[2]; // Stride of hyperslab
hsize_t count[2]; // Block count
hsize_t block[2]; // Block sizes
start[0] = 0; start[1] = 1;
stride[0] = 4; stride[1] = 3;
count[0] = 2; count[1] = 4;
block[0] = 3; block[1] = 2;
fspace.selectHyperslab( H5S_SELECT_SET, count, start, stride, block);
start[0] = 0;
start[1] = 1;
stride[0] = 4;
stride[1] = 3;
count[0] = 2;
count[1] = 4;
block[0] = 3;
block[1] = 2;
fspace.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
/*
* Create dataspace for the first dataset.
*/
hsize_t dim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
(in memory) */
DataSpace mspace1( MSPACE1_RANK, dim1 );
hsize_t dim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
(in memory) */
DataSpace mspace1(MSPACE1_RANK, dim1);
/*
* Select hyperslab.
@@ -117,7 +117,7 @@ int main (void)
stride[0] = 1;
count[0] = 48;
block[0] = 1;
mspace1.selectHyperslab( H5S_SELECT_SET, count, start, stride, block);
mspace1.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
/*
* Write selection from the vector buffer to the dataset in the file.
@@ -132,7 +132,7 @@ int main (void)
* 0 41 42 0 43 44 0 45 46 0 47 48
* 0 0 0 0 0 0 0 0 0 0 0 0
*/
int vector[MSPACE1_DIM]; // vector buffer for dset
int vector[MSPACE1_DIM]; // vector buffer for dset
/*
* Buffer initialization.
@@ -141,7 +141,7 @@ int main (void)
for (i = 1; i < MSPACE1_DIM - 1; i++)
vector[i] = i;
dataset->write( vector, PredType::NATIVE_INT, mspace1, fspace );
dataset->write(vector, PredType::NATIVE_INT, mspace1, fspace);
/*
* Reset the selection for the file dataspace fid.
@@ -151,27 +151,31 @@ int main (void)
/*
* Create dataspace for the second dataset.
*/
hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset
(in memory */
DataSpace mspace2( MSPACE2_RANK, dim2 );
hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset
(in memory */
DataSpace mspace2(MSPACE2_RANK, dim2);
/*
* Select sequence of NPOINTS points in the file dataspace.
*/
hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points
from the file dataspace */
coord[0][0] = 0; coord[0][1] = 0;
coord[1][0] = 3; coord[1][1] = 3;
coord[2][0] = 3; coord[2][1] = 5;
coord[3][0] = 5; coord[3][1] = 6;
coord[0][0] = 0;
coord[0][1] = 0;
coord[1][0] = 3;
coord[1][1] = 3;
coord[2][0] = 3;
coord[2][1] = 5;
coord[3][0] = 5;
coord[3][1] = 6;
fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hsize_t *)coord);
fspace.selectElements(H5S_SELECT_SET, NPOINTS, (const hsize_t *)coord);
/*
* Write new selection of points to the dataset.
*/
int values[] = {53, 59, 61, 67}; /* New values to be written */
dataset->write( values, PredType::NATIVE_INT, mspace2, fspace );
int values[] = {53, 59, 61, 67}; /* New values to be written */
dataset->write(values, PredType::NATIVE_INT, mspace2, fspace);
/*
* File dataset should look like this:
@@ -195,12 +199,12 @@ int main (void)
/*
* Open the file.
*/
file = new H5File( FILE_NAME, H5F_ACC_RDONLY );
file = new H5File(FILE_NAME, H5F_ACC_RDONLY);
/*
* Open the dataset.
*/
dataset = new DataSet( file->openDataSet( DATASET_NAME ));
dataset = new DataSet(file->openDataSet(DATASET_NAME));
/*
* Get dataspace of the dataset.
@@ -215,10 +219,14 @@ int main (void)
* 0 59 0 61
*
*/
start[0] = 1; start[1] = 2;
block[0] = 1; block[1] = 1;
stride[0] = 1; stride[1] = 1;
count[0] = 3; count[1] = 4;
start[0] = 1;
start[1] = 2;
block[0] = 1;
block[1] = 1;
stride[0] = 1;
stride[1] = 1;
count[0] = 3;
count[1] = 4;
fspace.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
/*
@@ -234,10 +242,14 @@ int main (void)
* 19 20
* 0 61
*/
start[0] = 2; start[1] = 4;
block[0] = 1; block[1] = 1;
stride[0] = 1; stride[1] = 1;
count[0] = 6; count[1] = 5;
start[0] = 2;
start[1] = 4;
block[0] = 1;
block[1] = 1;
stride[0] = 1;
stride[1] = 1;
count[0] = 6;
count[1] = 5;
fspace.selectHyperslab(H5S_SELECT_OR, count, start, stride, block);
/*
@@ -253,15 +265,23 @@ int main (void)
* Select two hyperslabs in memory. Hyperslabs has the same
* size and shape as the selected hyperslabs for the file dataspace.
*/
start[0] = 0; start[1] = 0;
block[0] = 1; block[1] = 1;
stride[0] = 1; stride[1] = 1;
count[0] = 3; count[1] = 4;
start[0] = 0;
start[1] = 0;
block[0] = 1;
block[1] = 1;
stride[0] = 1;
stride[1] = 1;
count[0] = 3;
count[1] = 4;
mspace.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
start[0] = 1; start[1] = 2;
block[0] = 1; block[1] = 1;
stride[0] = 1; stride[1] = 1;
count[0] = 6; count[1] = 5;
start[0] = 1;
start[1] = 2;
block[0] = 1;
block[1] = 1;
stride[0] = 1;
stride[1] = 1;
count[0] = 6;
count[1] = 5;
mspace.selectHyperslab(H5S_SELECT_OR, count, start, stride, block);
/*
@@ -289,9 +309,8 @@ int main (void)
* 0 0 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0 0 0
*/
for (i=0; i < MSPACE_DIM1; i++)
{
for(j=0; j < MSPACE_DIM2; j++)
for (i = 0; i < MSPACE_DIM1; i++) {
for (j = 0; j < MSPACE_DIM2; j++)
cout << matrix_out[i][j] << " ";
cout << endl;
}
@@ -301,28 +320,25 @@ int main (void)
*/
delete dataset;
delete file;
} // end of try block
} // end of try block
// catch failure caused by the H5File operations
catch( FileIException error )
{
// catch failure caused by the H5File operations
catch (FileIException error) {
error.printErrorStack();
return -1;
}
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
// catch failure caused by the DataSet operations
catch (DataSetIException error) {
error.printErrorStack();
return -1;
}
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
// catch failure caused by the DataSpace operations
catch (DataSpaceIException error) {
error.printErrorStack();
return -1;
}
}
return 0;
return 0;
}

View File

@@ -1,13 +1,6 @@
cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_SRC CXX)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
#-----------------------------------------------------------------------------
# Define cpp Library
#-----------------------------------------------------------------------------
@@ -87,7 +80,7 @@ set (CPP_HDRS
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS})
target_include_directories (${HDF5_CPP_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
@@ -105,7 +98,7 @@ endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS})
target_include_directories (${HDF5_CPP_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
@@ -117,7 +110,7 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
PUBLIC ${HDF5_LIBSH_TARGET}
)
if (MINGW)
if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PRIVATE -static-libgcc -static-libstdc++
)
@@ -128,6 +121,17 @@ if (BUILD_SHARED_LIBS)
set (install_targets ${install_targets} ${HDF5_CPP_LIBSH_TARGET})
endif ()
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
if (NOT ONLY_SHARED_LIBS)
clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIB_TARGET})
else ()
clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIBSH_TARGET})
endif ()
endif ()
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
@@ -183,22 +187,26 @@ if (BUILD_SHARED_LIBS)
set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
endif ()
set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}")
set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}")
set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.pc.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
${HDF_CONFIG_DIR}/libhdf5.pc.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}.pc
@ONLY
)
install (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}.pc
DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
COMPONENT cpplibraries
)
if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5c++

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -38,7 +38,9 @@ namespace H5 {
///\brief Default constructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::AbstractDs(){}
AbstractDs::AbstractDs()
{
}
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
@@ -61,19 +63,20 @@ AbstractDs::AbstractDs(){}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t AbstractDs::getTypeClass() const
H5T_class_t
AbstractDs::getTypeClass() const
{
// Gets the datatype used by this dataset or attribute.
// p_get_type calls either H5Dget_type or H5Aget_type depending on
// which object invokes getTypeClass
hid_t datatype_id;
try {
datatype_id = p_get_type(); // returned value is already validated
datatype_id = p_get_type(); // returned value is already validated
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getTypeClass", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getTypeClass", E.getDetailMsg());
}
@@ -82,8 +85,7 @@ H5T_class_t AbstractDs::getTypeClass() const
// Close temporary datatype_id
herr_t ret_value = H5Tclose(datatype_id);
if (ret_value < 0)
{
if (ret_value < 0) {
if (fromClass() == "DataSet")
throw DataTypeIException("DataSet::getTypeClass", "H5Tclose failed");
else if (fromClass() == "Attribute")
@@ -91,14 +93,13 @@ H5T_class_t AbstractDs::getTypeClass() const
}
// Check on the returned type_class
if (type_class == H5T_NO_CLASS)
{
if (type_class == H5T_NO_CLASS) {
if (fromClass() == "DataSet")
throw DataTypeIException("DataSet::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
else if (fromClass() == "Attribute")
throw DataTypeIException("Attribute::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
}
return(type_class);
return (type_class);
}
//--------------------------------------------------------------------------
@@ -109,7 +110,8 @@ H5T_class_t AbstractDs::getTypeClass() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType AbstractDs::getDataType() const
DataType
AbstractDs::getDataType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -118,12 +120,12 @@ DataType AbstractDs::getDataType() const
try {
DataType datatype;
f_DataType_setId(&datatype, p_get_type());
return(datatype);
return (datatype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getDataType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getDataType", E.getDetailMsg());
}
}
@@ -136,7 +138,8 @@ DataType AbstractDs::getDataType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
ArrayType AbstractDs::getArrayType() const
ArrayType
AbstractDs::getArrayType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -147,12 +150,12 @@ ArrayType AbstractDs::getArrayType() const
// problem described in the JIRA issue HDFFV-7947
ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_type());
return(arraytype);
return (arraytype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getArrayType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getArrayType", E.getDetailMsg());
}
}
@@ -165,7 +168,8 @@ ArrayType AbstractDs::getArrayType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType AbstractDs::getCompType() const
CompType
AbstractDs::getCompType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -174,12 +178,12 @@ CompType AbstractDs::getCompType() const
try {
CompType comptype;
f_DataType_setId(&comptype, p_get_type());
return(comptype);
return (comptype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getCompType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getCompType", E.getDetailMsg());
}
}
@@ -192,7 +196,8 @@ CompType AbstractDs::getCompType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType AbstractDs::getEnumType() const
EnumType
AbstractDs::getEnumType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -201,12 +206,12 @@ EnumType AbstractDs::getEnumType() const
try {
EnumType enumtype;
f_DataType_setId(&enumtype, p_get_type());
return(enumtype);
return (enumtype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getEnumType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getEnumType", E.getDetailMsg());
}
}
@@ -219,7 +224,8 @@ EnumType AbstractDs::getEnumType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType AbstractDs::getIntType() const
IntType
AbstractDs::getIntType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -228,12 +234,12 @@ IntType AbstractDs::getIntType() const
try {
IntType inttype;
f_DataType_setId(&inttype, p_get_type());
return(inttype);
return (inttype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getIntType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getIntType", E.getDetailMsg());
}
}
@@ -246,7 +252,8 @@ IntType AbstractDs::getIntType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType AbstractDs::getFloatType() const
FloatType
AbstractDs::getFloatType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -255,12 +262,12 @@ FloatType AbstractDs::getFloatType() const
try {
FloatType floatype;
f_DataType_setId(&floatype, p_get_type());
return(floatype);
return (floatype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getFloatType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getFloatType", E.getDetailMsg());
}
}
@@ -273,7 +280,8 @@ FloatType AbstractDs::getFloatType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType AbstractDs::getStrType() const
StrType
AbstractDs::getStrType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -282,12 +290,12 @@ StrType AbstractDs::getStrType() const
try {
StrType strtype;
f_DataType_setId(&strtype, p_get_type());
return(strtype);
return (strtype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getStrType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getStrType", E.getDetailMsg());
}
}
@@ -300,7 +308,8 @@ StrType AbstractDs::getStrType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
VarLenType AbstractDs::getVarLenType() const
VarLenType
AbstractDs::getVarLenType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -309,12 +318,12 @@ VarLenType AbstractDs::getVarLenType() const
try {
VarLenType varlentype;
f_DataType_setId(&varlentype, p_get_type());
return(varlentype);
return (varlentype);
}
catch (DataSetIException& E) {
catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getVarLenType", E.getDetailMsg());
}
catch (AttributeIException& E) {
catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getVarLenType", E.getDetailMsg());
}
}
@@ -324,6 +333,8 @@ VarLenType AbstractDs::getVarLenType() const
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::~AbstractDs() {}
AbstractDs::~AbstractDs()
{
}
} // end namespace
} // namespace H5

View File

@@ -7,13 +7,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __AbstractDs_H
#define __AbstractDs_H
#ifndef H5AbstractDs_H
#define H5AbstractDs_H
namespace H5 {
@@ -34,51 +34,51 @@ class DataSpace;
and DataSet.
*/
class H5_DLLCPP AbstractDs {
public:
// Gets a copy the datatype of that this abstract dataset uses.
// Note that this datatype is a generic one and can only be accessed
// via generic member functions, i.e., member functions belong
// to DataType. To get specific datatype, i.e. EnumType, FloatType,
// etc..., use the specific functions, that follow, instead.
DataType getDataType() const;
public:
// Gets a copy the datatype of that this abstract dataset uses.
// Note that this datatype is a generic one and can only be accessed
// via generic member functions, i.e., member functions belong
// to DataType. To get specific datatype, i.e. EnumType, FloatType,
// etc..., use the specific functions, that follow, instead.
DataType getDataType() const;
// Gets a copy of the specific datatype of this abstract dataset.
ArrayType getArrayType() const;
CompType getCompType() const;
EnumType getEnumType() const;
IntType getIntType() const;
FloatType getFloatType() const;
StrType getStrType() const;
VarLenType getVarLenType() const;
// Gets a copy of the specific datatype of this abstract dataset.
ArrayType getArrayType() const;
CompType getCompType() const;
EnumType getEnumType() const;
IntType getIntType() const;
FloatType getFloatType() const;
StrType getStrType() const;
VarLenType getVarLenType() const;
///\brief Gets the size in memory of this abstract dataset.
virtual size_t getInMemDataSize() const = 0;
///\brief Gets the size in memory of this abstract dataset.
virtual size_t getInMemDataSize() const = 0;
///\brief Gets the dataspace of this abstract dataset - pure virtual.
virtual DataSpace getSpace() const = 0;
///\brief Gets the dataspace of this abstract dataset - pure virtual.
virtual DataSpace getSpace() const = 0;
// Gets the class of the datatype that is used by this abstract
// dataset.
H5T_class_t getTypeClass() const;
// Gets the class of the datatype that is used by this abstract
// dataset.
H5T_class_t getTypeClass() const;
///\brief Returns the amount of storage size required - pure virtual.
virtual hsize_t getStorageSize() const = 0;
///\brief Returns the amount of storage size required - pure virtual.
virtual hsize_t getStorageSize() const = 0;
// Returns this class name - pure virtual.
virtual H5std_string fromClass() const = 0;
// Returns this class name - pure virtual.
virtual H5std_string fromClass() const = 0;
// Destructor
virtual ~AbstractDs();
// Destructor
virtual ~AbstractDs();
protected:
// Default constructor
AbstractDs();
protected:
// Default constructor
AbstractDs();
private:
// This member function is implemented by DataSet and Attribute - pure virtual.
virtual hid_t p_get_type() const = 0;
private:
// This member function is implemented by DataSet and Attribute - pure virtual.
virtual hid_t p_get_type() const = 0;
}; // end of AbstractDs
} // namespace H5
#endif // __AbstractDs_H
#endif // H5AbstractDs_H

View File

@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -34,7 +34,9 @@ namespace H5 {
///\brief Default constructor: Creates a stub ArrayType
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType() : DataType() {}
ArrayType::ArrayType() : DataType()
{
}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
@@ -43,14 +45,18 @@ ArrayType::ArrayType() : DataType() {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id) {}
ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id)
{
}
//--------------------------------------------------------------------------
// Function: ArrayType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const ArrayType& original) : DataType(original) {}
ArrayType::ArrayType(const ArrayType &original) : DataType(original)
{
}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
@@ -62,7 +68,7 @@ ArrayType::ArrayType(const ArrayType& original) : DataType(original) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims) : DataType()
{
// Call C API to create an array data type
hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
@@ -87,7 +93,7 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
// improve usability.
// -BMR, Dec 2016
//--------------------------------------------------------------------------
ArrayType::ArrayType(const H5Location& loc, const char *dtype_name) : DataType()
ArrayType::ArrayType(const H5Location &loc, const char *dtype_name) : DataType()
{
id = p_opentype(loc, dtype_name);
}
@@ -106,7 +112,7 @@ ArrayType::ArrayType(const H5Location& loc, const char *dtype_name) : DataType()
// to improve usability.
// -BMR, Dec 2016
//--------------------------------------------------------------------------
ArrayType::ArrayType(const H5Location& loc, const H5std_string& dtype_name) : DataType()
ArrayType::ArrayType(const H5Location &loc, const H5std_string &dtype_name) : DataType()
{
id = p_opentype(loc, dtype_name.c_str());
}
@@ -122,21 +128,21 @@ ArrayType::ArrayType(const H5Location& loc, const H5std_string& dtype_name) : Da
// each data member from the rhs object. (Issue HDFFV-9562)
// Programmer Binh-Minh Ribler - Mar 2016
//--------------------------------------------------------------------------
ArrayType& ArrayType::operator=(const ArrayType& rhs)
ArrayType &
ArrayType::operator=(const ArrayType &rhs)
{
if (this != &rhs)
{
if (this != &rhs) {
// handling references to this id
try {
setId(rhs.id);
// Note: a = b, so there are two objects with the same hdf5 id
// that's why incRefCount is needed, and it is called by setId
}
catch (Exception& close_error) {
catch (Exception &close_error) {
throw DataTypeIException(inMemFunc("operator="), close_error.getDetailMsg());
}
}
return(*this);
return (*this);
}
//--------------------------------------------------------------------------
@@ -147,7 +153,8 @@ ArrayType& ArrayType::operator=(const ArrayType& rhs)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType* ArrayType::decode() const
DataType *
ArrayType::decode() const
{
hid_t encoded_arrtype_id = H5I_INVALID_HID;
try {
@@ -158,7 +165,7 @@ DataType* ArrayType::decode() const
}
ArrayType *encoded_arrtype = new ArrayType;
encoded_arrtype->p_setId(encoded_arrtype_id);
return(encoded_arrtype);
return (encoded_arrtype);
}
//--------------------------------------------------------------------------
@@ -168,16 +175,16 @@ DataType* ArrayType::decode() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims() const
int
ArrayType::getArrayNDims() const
{
// Get the rank of the array type specified by id from the C API
int ndims = H5Tget_array_ndims(id);
if (ndims < 0)
{
if (ndims < 0) {
throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
}
return(ndims);
return (ndims);
}
//--------------------------------------------------------------------------
@@ -188,7 +195,8 @@ int ArrayType::getArrayNDims() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims) const
int
ArrayType::getArrayDims(hsize_t *dims) const
{
// Get the dimensions
int ndims = H5Tget_array_dims2(id, dims);
@@ -196,7 +204,7 @@ int ArrayType::getArrayDims(hsize_t* dims) const
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// Return the number of dimensions
return(ndims);
return (ndims);
}
//--------------------------------------------------------------------------
@@ -204,6 +212,8 @@ int ArrayType::getArrayDims(hsize_t* dims) const
///\brief Properly terminates access to this array datatype.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::~ArrayType() {}
ArrayType::~ArrayType()
{
}
} // end namespace
} // namespace H5

View File

@@ -7,13 +7,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __H5ArrayType_H
#define __H5ArrayType_H
#ifndef H5ArrayType_H
#define H5ArrayType_H
namespace H5 {
@@ -23,46 +23,50 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP ArrayType : public DataType {
public:
// Constructor that creates a new array data type based on the
// specified base type.
ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
public:
// Constructor that creates a new array data type based on the
// specified base type.
ArrayType(const DataType &base_type, int ndims, const hsize_t *dims);
// Assignment operator
ArrayType& operator=(const ArrayType& rhs);
// Assignment operator
ArrayType &operator=(const ArrayType &rhs);
// Constructors that open an array datatype, given a location.
ArrayType(const H5Location& loc, const char* name);
ArrayType(const H5Location& loc, const H5std_string& name);
// Constructors that open an array datatype, given a location.
ArrayType(const H5Location &loc, const char *name);
ArrayType(const H5Location &loc, const H5std_string &name);
// Returns an ArrayType object via DataType* by decoding the
// binary object description of this type.
virtual DataType* decode() const;
// Returns an ArrayType object via DataType* by decoding the
// binary object description of this type.
virtual DataType *decode() const override;
// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
//int getArrayNDims(); // removed 1.8.18 and 1.10.1
// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
// int getArrayNDims(); // removed 1.8.18 and 1.10.1
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims) const;
//int getArrayDims(hsize_t* dims); // removed 1.8.18 and 1.10.1
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t *dims) const;
// int getArrayDims(hsize_t* dims); // removed 1.8.18 and 1.10.1
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("ArrayType"); }
///\brief Returns this class name.
virtual H5std_string
fromClass() const override
{
return ("ArrayType");
}
// Copy constructor: same as the original ArrayType.
ArrayType(const ArrayType& original);
// Copy constructor: same as the original ArrayType.
ArrayType(const ArrayType &original);
// Constructor that takes an existing id
ArrayType(const hid_t existing_id);
// Constructor that takes an existing id
ArrayType(const hid_t existing_id);
// Noop destructor
virtual ~ArrayType();
// Noop destructor
virtual ~ArrayType() override;
// Default constructor
ArrayType();
// Default constructor
ArrayType();
}; // end of ArrayType
} // namespace H5
#endif // __H5ArrayType_H
#endif // H5ArrayType_H

View File

@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -35,7 +35,9 @@ namespace H5 {
// Purpose Default constructor: creates a stub atomic datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType() : DataType() {}
AtomType::AtomType() : DataType()
{
}
//--------------------------------------------------------------------------
// Function: AtomType overloaded constructor [protected]
@@ -44,14 +46,18 @@ AtomType::AtomType() : DataType() {}
// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType(const hid_t existing_id) : DataType(existing_id) {}
AtomType::AtomType(const hid_t existing_id) : DataType(existing_id)
{
}
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType(const AtomType& original) : DataType(original) {}
AtomType::AtomType(const AtomType &original) : DataType(original)
{
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
@@ -61,12 +67,12 @@ AtomType::AtomType(const AtomType& original) : DataType(original) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setSize(size_t size) const
void
AtomType::setSize(size_t size) const
{
// Call C routine H5Tset_size to set the total size
herr_t ret_value = H5Tset_size(id, size);
if (ret_value < 0)
{
if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setSize"), "H5Tset_size failed");
}
}
@@ -81,18 +87,17 @@ void AtomType::setSize(size_t size) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder() const
H5T_order_t
AtomType::getOrder() const
{
// Call C routine to get the byte ordering
H5T_order_t type_order = H5Tget_order(id);
// return a byte order constant if successful
if (type_order == H5T_ORDER_ERROR)
{
throw DataTypeIException(inMemFunc("getOrder"),
"H5Tget_order returns H5T_ORDER_ERROR");
if (type_order == H5T_ORDER_ERROR) {
throw DataTypeIException(inMemFunc("getOrder"), "H5Tget_order returns H5T_ORDER_ERROR");
}
return(type_order);
return (type_order);
}
//--------------------------------------------------------------------------
@@ -112,7 +117,8 @@ H5T_order_t AtomType::getOrder() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder(H5std_string& order_string) const
H5T_order_t
AtomType::getOrder(H5std_string &order_string) const
{
// Call the overloaded to get the type order without text
H5T_order_t type_order = getOrder();
@@ -124,7 +130,7 @@ H5T_order_t AtomType::getOrder(H5std_string& order_string) const
order_string = "Big endian byte ordering (1)";
else if (type_order == H5T_ORDER_VAX)
order_string = "VAX mixed byte ordering (2)";
return(type_order);
return (type_order);
}
//--------------------------------------------------------------------------
@@ -137,12 +143,12 @@ H5T_order_t AtomType::getOrder(H5std_string& order_string) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOrder(H5T_order_t order) const
void
AtomType::setOrder(H5T_order_t order) const
{
// Call C routine to set the byte ordering
herr_t ret_value = H5Tset_order(id, order);
if (ret_value < 0)
{
if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setOrder"), "H5Tset_order failed");
}
}
@@ -158,17 +164,17 @@ void AtomType::setOrder(H5T_order_t order) const
/// value returned by \c DataType::getSize().
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t AtomType::getPrecision() const
size_t
AtomType::getPrecision() const
{
size_t num_signi_bits = H5Tget_precision(id); // C routine
size_t num_signi_bits = H5Tget_precision(id); // C routine
// returns number of significant bits if successful
if (num_signi_bits == 0)
{
if (num_signi_bits == 0) {
throw DataTypeIException(inMemFunc("getPrecision"),
"H5Tget_precision returns invalid number of significant bits");
"H5Tget_precision returns invalid number of significant bits");
}
return(num_signi_bits);
return (num_signi_bits);
}
//--------------------------------------------------------------------------
@@ -181,12 +187,12 @@ size_t AtomType::getPrecision() const
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setPrecision(size_t precision) const
void
AtomType::setPrecision(size_t precision) const
{
// Call C routine to set the datatype precision
herr_t ret_value = H5Tset_precision(id, precision);
if (ret_value < 0)
{
if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setPrecision"), "H5Tset_precision failed");
}
}
@@ -205,17 +211,16 @@ void AtomType::setPrecision(size_t precision) const
// - return type changed from size_t to int
// - offset = -1 when failure occurs vs. 0
//--------------------------------------------------------------------------
int AtomType::getOffset() const
int
AtomType::getOffset() const
{
int offset = H5Tget_offset(id); // C routine
int offset = H5Tget_offset(id); // C routine
// returns a non-negative offset value if successful
if (offset == -1)
{
throw DataTypeIException(inMemFunc("getOffset"),
"H5Tget_offset returns a negative offset value");
if (offset == -1) {
throw DataTypeIException(inMemFunc("getOffset"), "H5Tget_offset returns a negative offset value");
}
return(offset);
return (offset);
}
//--------------------------------------------------------------------------
@@ -228,12 +233,12 @@ int AtomType::getOffset() const
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOffset(size_t offset) const
void
AtomType::setOffset(size_t offset) const
{
// Call C routine to set the bit offset
herr_t ret_value = H5Tset_offset(id, offset);
if (ret_value < 0)
{
if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setOffset"), "H5Tset_offset failed");
}
}
@@ -252,12 +257,12 @@ void AtomType::setOffset(size_t offset) const
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::getPad(H5T_pad_t& lsb, H5T_pad_t& msb) const
void
AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
{
// Call C routine to get the padding type
herr_t ret_value = H5Tget_pad(id, &lsb, &msb);
if (ret_value < 0)
{
if (ret_value < 0) {
throw DataTypeIException(inMemFunc("getPad"), "H5Tget_pad failed");
}
}
@@ -275,12 +280,12 @@ void AtomType::getPad(H5T_pad_t& lsb, H5T_pad_t& msb) const
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
void
AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
{
// Call C routine to set the padding type
herr_t ret_value = H5Tset_pad(id, lsb, msb);
if (ret_value < 0)
{
if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setPad"), "H5Tset_pad failed");
}
}
@@ -291,7 +296,9 @@ void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::~AtomType() {}
AtomType::~AtomType()
{
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
} // end namespace
} // namespace H5

View File

@@ -7,13 +7,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __H5AtomType_H
#define __H5AtomType_H
#ifndef H5AtomType_H
#define H5AtomType_H
namespace H5 {
@@ -26,57 +26,61 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP AtomType : public DataType {
public:
// Returns the byte order of an atomic datatype.
H5T_order_t getOrder() const;
H5T_order_t getOrder(H5std_string& order_string) const;
public:
// Returns the byte order of an atomic datatype.
H5T_order_t getOrder() const;
H5T_order_t getOrder(H5std_string &order_string) const;
// Sets the byte ordering of an atomic datatype.
void setOrder(H5T_order_t order) const;
// Sets the byte ordering of an atomic datatype.
void setOrder(H5T_order_t order) const;
// Retrieves the bit offset of the first significant bit.
// 12/05/00 - changed return type to int from size_t - C API
int getOffset() const;
// Retrieves the bit offset of the first significant bit.
// 12/05/00 - changed return type to int from size_t - C API
int getOffset() const;
// Sets the bit offset of the first significant bit.
void setOffset(size_t offset) const;
// Sets the bit offset of the first significant bit.
void setOffset(size_t offset) const;
// Retrieves the padding type of the least and most-significant bit padding.
void getPad(H5T_pad_t& lsb, H5T_pad_t& msb) const;
// Retrieves the padding type of the least and most-significant bit padding.
void getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const;
// Sets the least and most-significant bits padding types
void setPad(H5T_pad_t lsb, H5T_pad_t msb) const;
// Sets the least and most-significant bits padding types
void setPad(H5T_pad_t lsb, H5T_pad_t msb) const;
// Returns the precision of an atomic datatype.
size_t getPrecision() const;
// Returns the precision of an atomic datatype.
size_t getPrecision() const;
// Sets the precision of an atomic datatype.
void setPrecision(size_t precision) const;
// Sets the precision of an atomic datatype.
void setPrecision(size_t precision) const;
// Sets the total size for an atomic datatype.
void setSize(size_t size) const;
// Sets the total size for an atomic datatype.
void setSize(size_t size) const;
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("AtomType"); }
///\brief Returns this class name.
virtual H5std_string
fromClass() const override
{
return ("AtomType");
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Copy constructor: same as the original AtomType.
AtomType(const AtomType& original);
// Copy constructor: same as the original AtomType.
AtomType(const AtomType &original);
// Noop destructor
virtual ~AtomType();
// Noop destructor
virtual ~AtomType() override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
protected:
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
AtomType();
// Default constructor
AtomType();
// Constructor that takes an existing id
AtomType(const hid_t existing_id);
// Constructor that takes an existing id
AtomType(const hid_t existing_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of AtomType
} // namespace H5
#endif // __H5AtomType_H
#endif // H5AtomType_H

View File

@@ -6,19 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>
#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -41,14 +36,16 @@ namespace H5 {
using std::cerr;
using std::endl;
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
class H5Object; // forward declaration for UserData4Aiterate
//--------------------------------------------------------------------------
// Function: Attribute default constructor
///\brief Default constructor: Creates a stub attribute
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID) {}
Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID)
{
}
//--------------------------------------------------------------------------
// Function: Attribute copy constructor
@@ -56,7 +53,7 @@ Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID) {}
///\param original - IN: Original Attribute object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute(const Attribute& original) : AbstractDs(), H5Location(), id(original.id)
Attribute::Attribute(const Attribute &original) : AbstractDs(), H5Location(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -82,11 +79,11 @@ Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(e
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Attribute::write(const DataType& mem_type, const void *buf) const
void
Attribute::write(const DataType &mem_type, const void *buf) const
{
herr_t ret_value = H5Awrite(id, mem_type.getId(), buf);
if (ret_value < 0)
{
herr_t ret_value = H5Awrite(id, mem_type.getId(), buf);
if (ret_value < 0) {
throw AttributeIException("Attribute::write", "H5Awrite failed");
}
}
@@ -100,32 +97,29 @@ void Attribute::write(const DataType& mem_type, const void *buf) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
void Attribute::write(const DataType& mem_type, const H5std_string& strg) const
void
Attribute::write(const DataType &mem_type, const H5std_string &strg) const
{
// Check if this attribute has variable-len string or fixed-len string and
// proceed appropriately.
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
if (is_variable_len < 0)
{
if (is_variable_len < 0) {
throw AttributeIException("Attribute::write", "H5Tis_variable_str failed");
}
// Convert string to C-string
const char* strg_C;
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
const char *strg_C;
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
herr_t ret_value = 0;
// Pass string in differently depends on variable or fixed length
if (!is_variable_len)
{
if (!is_variable_len) {
ret_value = H5Awrite(id, mem_type.getId(), strg_C);
}
else
{
else {
// passing third argument by address
ret_value = H5Awrite(id, mem_type.getId(), &strg_C);
}
if (ret_value < 0)
{
if (ret_value < 0) {
throw AttributeIException("Attribute::write", "H5Awrite failed");
}
}
@@ -138,11 +132,11 @@ void Attribute::write(const DataType& mem_type, const H5std_string& strg) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Attribute::read(const DataType& mem_type, void *buf) const
void
Attribute::read(const DataType &mem_type, void *buf) const
{
herr_t ret_value = H5Aread(id, mem_type.getId(), buf);
if (ret_value < 0)
{
herr_t ret_value = H5Aread(id, mem_type.getId(), buf);
if (ret_value < 0) {
throw AttributeIException("Attribute::read", "H5Aread failed");
}
}
@@ -167,22 +161,21 @@ void Attribute::read(const DataType& mem_type, void *buf) const
// variable-len string data: p_read_fixed_len and
// p_read_variable_len. This should improve readability. -BMR
//--------------------------------------------------------------------------
void Attribute::read(const DataType& mem_type, H5std_string& strg) const
void
Attribute::read(const DataType &mem_type, H5std_string &strg) const
{
// Check if this attribute has variable-len string or fixed-len string and
// proceed appropriately.
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
if (is_variable_len < 0)
{
if (is_variable_len < 0) {
throw AttributeIException("Attribute::read", "H5Tis_variable_str failed");
}
if (!is_variable_len) // only allocate for fixed-len string
if (!is_variable_len) // only allocate for fixed-len string
{
p_read_fixed_len(mem_type, strg);
}
else
{
else {
p_read_variable_len(mem_type, strg);
}
}
@@ -194,62 +187,55 @@ void Attribute::read(const DataType& mem_type, H5std_string& strg) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr 2009
//--------------------------------------------------------------------------
size_t Attribute::getInMemDataSize() const
size_t
Attribute::getInMemDataSize() const
{
const char *func = "Attribute::getInMemDataSize";
// Get the data type of this attribute
hid_t mem_type_id = H5Aget_type(id);
if (mem_type_id < 0)
{
if (mem_type_id < 0) {
throw AttributeIException(func, "H5Aget_type failed");
}
// Get the data type's size by first getting its native type then getting
// the native type's size.
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
if (native_type < 0)
{
if (native_type < 0) {
throw AttributeIException(func, "H5Tget_native_type failed");
}
size_t type_size = H5Tget_size(native_type);
if (type_size == 0)
{
if (type_size == 0) {
throw AttributeIException(func, "H5Tget_size failed");
}
// Close the native type and the datatype of this attribute.
if (H5Tclose(native_type) < 0)
{
if (H5Tclose(native_type) < 0) {
throw DataSetIException(func, "H5Tclose(native_type) failed");
}
if (H5Tclose(mem_type_id) < 0)
{
if (H5Tclose(mem_type_id) < 0) {
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
}
// Get number of elements of the attribute by first getting its dataspace
// then getting the number of elements in the dataspace
hid_t space_id = H5Aget_space(id);
if (space_id < 0)
{
if (space_id < 0) {
throw AttributeIException(func, "H5Aget_space failed");
}
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
if (num_elements < 0)
{
if (num_elements < 0) {
throw AttributeIException(func, "H5Sget_simple_extent_npoints failed");
}
// Close the dataspace
if (H5Sclose(space_id) < 0)
{
if (H5Sclose(space_id) < 0) {
throw DataSetIException(func, "H5Sclose failed");
}
// Calculate and return the size of the data
size_t data_size = type_size * num_elements;
return(data_size);
return (data_size);
}
//--------------------------------------------------------------------------
@@ -259,20 +245,19 @@ size_t Attribute::getInMemDataSize() const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace Attribute::getSpace() const
DataSpace
Attribute::getSpace() const
{
// Calls C function H5Aget_space to get the id of the dataspace
hid_t dataspace_id = H5Aget_space(id);
// Calls C function H5Aget_space to get the id of the dataspace
hid_t dataspace_id = H5Aget_space(id);
// If the dataspace id is valid, create and return the DataSpace object
if (dataspace_id > 0)
{
// If the dataspace id is valid, create and return the DataSpace object
if (dataspace_id > 0) {
DataSpace dataspace;
f_DataSpace_setId(&dataspace, dataspace_id);
return(dataspace);
return (dataspace);
}
else
{
else {
throw AttributeIException("Attribute::getSpace", "H5Aget_space failed");
}
}
@@ -294,22 +279,21 @@ DataSpace Attribute::getSpace() const
/// first argument and ignore the second argument.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
ssize_t
Attribute::getName(char *attr_name, size_t buf_size) const
{
// H5Aget_name will get buf_size-1 chars of the name to null terminate it
ssize_t name_size = H5Aget_name(id, buf_size, attr_name);
// If H5Aget_name returns a negative value, raise an exception
if (name_size < 0)
{
if (name_size < 0) {
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
else if (name_size == 0)
{
else if (name_size == 0) {
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
// Return length of the name
return(name_size);
return (name_size);
}
//--------------------------------------------------------------------------
@@ -322,40 +306,38 @@ ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
// Mar 2014 - BMR
// Revised to use the modified getName() above
//--------------------------------------------------------------------------
H5std_string Attribute::getName() const
H5std_string
Attribute::getName() const
{
H5std_string attr_name(""); // attribute name to return
H5std_string attr_name; // attribute name to return
// Preliminary call to get the size of the attribute name
ssize_t name_size = H5Aget_name(id, static_cast<size_t>(0), NULL);
ssize_t name_size = H5Aget_name(id, 0, NULL);
// If H5Aget_name failed, throw exception
if (name_size < 0)
{
if (name_size < 0) {
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
else if (name_size == 0)
{
else if (name_size == 0) {
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
// Attribute's name exists, retrieve it
else if (name_size > 0)
{
char* name_C = new char[name_size+1]; // temporary C-string
HDmemset(name_C, 0, name_size+1); // clear buffer
else if (name_size > 0) {
// Create buffer for C string
char *name_C = new char[name_size + 1]();
// Use overloaded function
name_size = getName(name_C, name_size+1);
name_size = getName(name_C, name_size + 1);
// Convert the C attribute name to return
attr_name = name_C;
// Clean up resource
delete []name_C;
delete[] name_C;
}
// Return attribute's name
return(attr_name);
return (attr_name);
}
//--------------------------------------------------------------------------
@@ -371,14 +353,15 @@ H5std_string Attribute::getName() const
// Mar 2014 - BMR
// Revised to use the new getName() below
//--------------------------------------------------------------------------
H5std_string Attribute::getName(size_t len) const
H5std_string
Attribute::getName(size_t len) const
{
H5std_string attr_name;
ssize_t name_size = getName(attr_name, len);
ssize_t name_size = getName(attr_name, len);
if (name_size < 0)
return("");
return ("");
else
return(attr_name);
return (attr_name);
}
//--------------------------------------------------------------------------
@@ -398,35 +381,34 @@ H5std_string Attribute::getName(size_t len) const
// Added to replace getName(size_t, H5std_string&) so that it'll
// allow the argument "len" to be skipped.
//--------------------------------------------------------------------------
ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
ssize_t
Attribute::getName(H5std_string &attr_name, size_t len) const
{
ssize_t name_size = 0;
// If no length is provided, get the entire attribute name
if (len == 0)
{
if (len == 0) {
attr_name = getName();
name_size = attr_name.length();
}
// If length is provided, get that number of characters in name
else
{
char* name_C = new char[len+1]; // temporary C-string
HDmemset(name_C, 0, len+1); // clear buffer
else {
// Create buffer for C string
char *name_C = new char[len + 1]();
// Use overloaded function
name_size = getName(name_C, len+1);
name_size = getName(name_C, len + 1);
// Convert the C attribute name to return
attr_name = name_C;
// Clean up resource
delete []name_C;
delete[] name_C;
}
// Otherwise, keep attr_name intact
// Return name size
return(name_size);
return (name_size);
}
//--------------------------------------------------------------------------
@@ -444,7 +426,7 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
//ssize_t Attribute::getName(size_t len, H5std_string& attr_name) const
// ssize_t Attribute::getName(size_t len, H5std_string& attr_name) const
//{
// return (getName(attr_name, len));
//}
@@ -458,10 +440,11 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
// function should have no failure. (from SLU)
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
hsize_t Attribute::getStorageSize() const
hsize_t
Attribute::getStorageSize() const
{
hsize_t storage_size = H5Aget_storage_size(id);
return (storage_size);
hsize_t storage_size = H5Aget_storage_size(id);
return (storage_size);
}
//--------------------------------------------------------------------------
@@ -480,9 +463,10 @@ hsize_t Attribute::getStorageSize() const
// an attribute id can be used to specify a location in HDF5
// library.
//--------------------------------------------------------------------------
hid_t Attribute::getId() const
hid_t
Attribute::getId() const
{
return(id);
return (id);
}
//--------------------------------------------------------------------------
@@ -494,13 +478,13 @@ hid_t Attribute::getId() const
// This private function is used in AbstractDs.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t Attribute::p_get_type() const
hid_t
Attribute::p_get_type() const
{
hid_t type_id = H5Aget_type(id);
if (type_id > 0)
return(type_id);
else
{
return (type_id);
else {
throw AttributeIException("", "H5Aget_type failed");
}
}
@@ -517,7 +501,8 @@ hid_t Attribute::p_get_type() const
// Separated the fixed length case from the original
// Attribute::read
//--------------------------------------------------------------------------
void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const
void
Attribute::p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const
{
// Only allocate for fixed-len string.
@@ -525,19 +510,17 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
size_t attr_size = getInMemDataSize();
// If there is data, allocate buffer and read it.
if (attr_size > 0)
{
char *strg_C = new char[attr_size+1];
if (attr_size > 0) {
char * strg_C = new char[attr_size + 1];
herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C);
if (ret_value < 0)
{
delete []strg_C; // de-allocate for fixed-len string
if (ret_value < 0) {
delete[] strg_C; // de-allocate for fixed-len string
throw AttributeIException("Attribute::read", "H5Aread failed");
}
// Get string from the C char* and release resource allocated locally
strg_C[attr_size] = '\0';
strg = strg_C;
delete []strg_C;
strg = strg_C;
delete[] strg_C;
}
}
@@ -553,7 +536,8 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
// Separated the variable length case from the original
// Attribute::read. -BMR
//--------------------------------------------------------------------------
void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const
void
Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) const
{
// Prepare and call C API to read attribute.
char *strg_C;
@@ -561,14 +545,13 @@ void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg
// Read attribute, no allocation for variable-len string; C library will
herr_t ret_value = H5Aread(id, mem_type.getId(), &strg_C);
if (ret_value < 0)
{
if (ret_value < 0) {
throw AttributeIException("Attribute::read", "H5Aread failed");
}
// Get string from the C char* and release resource allocated by C API
strg = strg_C;
HDfree(strg_C);
free(strg_C);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -579,18 +562,19 @@ void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
// The underlaying reference counting in the C library ensures
// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Attribute::p_setId(const hid_t new_id)
void
Attribute::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
catch (Exception& close_error) {
catch (Exception &close_error) {
throw AttributeIException("Attribute::p_setId", close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -605,13 +589,12 @@ void Attribute::p_setId(const hid_t new_id)
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
void Attribute::close()
void
Attribute::close()
{
if (p_valid_id(id))
{
if (p_valid_id(id)) {
herr_t ret_value = H5Aclose(id);
if (ret_value < 0)
{
if (ret_value < 0) {
throw AttributeIException("Attribute::close", "H5Aclose failed");
}
// reset the id
@@ -634,9 +617,9 @@ Attribute::~Attribute()
try {
close();
}
catch (Exception& close_error) {
catch (Exception &close_error) {
cerr << "Attribute::~Attribute - " << close_error.getDetailMsg() << endl;
}
}
} // end namespace
} // namespace H5

View File

@@ -7,13 +7,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __H5Attribute_H
#define __H5Attribute_H
#ifndef H5Attribute_H
#define H5Attribute_H
namespace H5 {
@@ -27,78 +27,81 @@ namespace H5 {
*/
// Inheritance: multiple H5Location/AbstractDs -> IdComponent
class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
public:
public:
// Copy constructor: same as the original Attribute.
Attribute(const Attribute &original);
// Copy constructor: same as the original Attribute.
Attribute(const Attribute& original);
// Default constructor
Attribute();
// Default constructor
Attribute();
// Creates a copy of an existing attribute using the attribute id
Attribute(const hid_t attr_id);
// Creates a copy of an existing attribute using the attribute id
Attribute(const hid_t attr_id);
// Closes this attribute.
virtual void close() override;
// Closes this attribute.
virtual void close();
// Gets the name of this attribute.
ssize_t getName(char *attr_name, size_t buf_size = 0) const;
H5std_string getName(size_t len) const;
H5std_string getName() const;
ssize_t getName(H5std_string &attr_name, size_t len = 0) const;
// The overloaded function below is replaced by the one above and it
// is kept for backward compatibility purpose.
ssize_t getName(size_t buf_size, H5std_string &attr_name) const;
// Gets the name of this attribute.
ssize_t getName(char* attr_name, size_t buf_size = 0) const;
H5std_string getName(size_t len) const;
H5std_string getName() const;
ssize_t getName(H5std_string& attr_name, size_t len = 0) const;
// The overloaded function below is replaced by the one above and it
// is kept for backward compatibility purpose.
ssize_t getName(size_t buf_size, H5std_string& attr_name) const;
// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const override;
// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const;
// Returns the amount of storage size required for this attribute.
virtual hsize_t getStorageSize() const override;
// Returns the amount of storage size required for this attribute.
virtual hsize_t getStorageSize() const;
// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const override;
// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const;
// Reads data from this attribute.
void read(const DataType &mem_type, void *buf) const;
void read(const DataType &mem_type, H5std_string &strg) const;
// Reads data from this attribute.
void read(const DataType& mem_type, void *buf) const;
void read(const DataType& mem_type, H5std_string& strg) const;
// Writes data to this attribute.
void write(const DataType &mem_type, const void *buf) const;
void write(const DataType &mem_type, const H5std_string &strg) const;
// Writes data to this attribute.
void write(const DataType& mem_type, const void *buf) const;
void write(const DataType& mem_type, const H5std_string& strg) const;
///\brief Returns this class name.
virtual H5std_string
fromClass() const override
{
return ("Attribute");
}
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("Attribute"); }
// Gets the attribute id.
virtual hid_t getId() const override;
// Gets the attribute id.
virtual hid_t getId() const;
// Destructor: properly terminates access to this attribute.
virtual ~Attribute();
// Destructor: properly terminates access to this attribute.
virtual ~Attribute() override;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the attribute id.
virtual void p_setId(const hid_t new_id);
protected:
// Sets the attribute id.
virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
hid_t id; // HDF5 attribute id
private:
hid_t id; // HDF5 attribute id
// This function contains the common code that is used by
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const;
// This function contains the common code that is used by
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const override;
// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const;
void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const;
// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
void p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const;
// Friend function to set Attribute id. For library use only.
friend void f_Attribute_setId(Attribute* attr, hid_t new_id);
// Friend function to set Attribute id. For library use only.
friend void f_Attribute_setId(Attribute *attr, hid_t new_id);
}; // end of Attribute
} // namespace H5
#endif // __H5Attribute_H
#endif // H5Attribute_H

View File

@@ -7,40 +7,40 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __H5Classes_H
#define __H5Classes_H
#ifndef H5Classes_H
#define H5Classes_H
namespace H5 {
class Exception;
class IdComponent;
class H5Location;
class H5Object;
class PropList;
class FileCreatPropList;
class FileAccPropList;
class LinkAccPropList;
class DSetCreatPropList;
class DSetMemXferPropList;
class DTypePropList;
class DataType;
class DataSpace;
class AtomType;
class PredType;
class IntType;
class FloatType;
class StrType;
class EnumType;
class CompType;
class AbstractDs;
class DataSet;
class Group;
class H5File;
class Attribute;
class H5Library;
}
#endif // __H5Classes_H
class Exception;
class IdComponent;
class H5Location;
class H5Object;
class PropList;
class FileCreatPropList;
class FileAccPropList;
class LinkAccPropList;
class DSetCreatPropList;
class DSetMemXferPropList;
class DTypePropList;
class DataType;
class DataSpace;
class AtomType;
class PredType;
class IntType;
class FloatType;
class StrType;
class EnumType;
class CompType;
class AbstractDs;
class DataSet;
class Group;
class H5File;
class Attribute;
class H5Library;
} // namespace H5
#endif // H5Classes_H

Some files were not shown because too many files have changed in this diff Show More