Compare commits

...

1582 Commits

Author SHA1 Message Date
Dana Robinson
5ceaf920ec VFD SWMR: Warning fixes and minor cleanup (#1847)
* Normalization with develop

* Moves remaining datatype code changes over from develop

* Cleanup in examples files

* Warning cleanup in VFD SWMR code

* Committing clang-format changes

* Warning cleanup

* Warning reduction

* More warning fixes

* Committing clang-format changes

* Even more warning reduction in the VFD SWMR tests

* More warning fixes in the VFD SWMR tests

* Even more VFD SWMR test warning fixes

* Last warning fixes in VFD SWMR

* Committing clang-format changes

* Minor things missed from develop

* Warning fixes from GitHub build failures

* Committing clang-format changes

* Fix for warning due to weird bit shift type promotion

* Yet another attempt at fixing the integral promotion warning

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-05 16:55:18 -07:00
Dana Robinson
ac7bddf2af VFD SWMR: sync with develop (#1825)
* bin directory sync

* doxygen changes

* C++ sync with develop

* Fortran sync with develop

* Sync various docs with develop

* Java sync with develop

* More doxygen sync with develop

* tools sync with develop

* h5test.h testing macros get enclosed in do..while loops (#1721)

* Minor examples normalization with develop

* hl sync with develop

* sprintf to snprintf (#1815)

* Misc sync w/ develop

* Brings some selection I/O bits over from develop

* Brings over some const fixes from develop

* Brings over more const bits from develop

* Minor bits missed in early syncs

* Brings over rest of selection I/O

* Sync of mirror VFD changes w/ develop

* Committing clang-format changes

* Adds missing testpar file

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 20:16:21 -07:00
vchoi-hdfgroup
50b3fb09a7 Merge pull request #1806 from vchoi-hdfgroup/to_merge_echidna_fixes
To merge echidna fixes
2022-06-08 01:09:28 -05:00
github-actions
3848c783b6 Committing clang-format changes 2022-06-08 06:08:34 +00:00
vchoi
1c7f3aa4db Merge branch 'to_merge_echidna_fixes' of https://github.com/vchoi-hdfgroup/hdf5 into to_merge_echidna_fixes 2022-06-08 01:06:09 -05:00
vchoi
cf2b9d600a (1) Modify test/vfd_swmr_bigset_writer.c to use h5_retry routines instead of "for loop for NUM_ATTEMPTS" times.
(2) Clean up test/vfd_swmr.c
2022-06-08 01:05:04 -05:00
vchoi-hdfgroup
c698497575 Merge pull request #1802 from vchoi-hdfgroup/to_merge_echidna_fixes
To merge echidna fixes
2022-06-07 11:00:23 -05:00
github-actions
a284ec5ece Committing clang-format changes 2022-06-07 03:31:55 +00:00
vchoi
7bbe45e71d Fixes for:
(1) H5O_refresh_metadata(): address failure when make check-passthrough-vol: use H5VL_object_data()
to retrieve the vol object.
(2) H5FD__vfd_swmr_open(): use HADDR_UNDEF as maxaddr when opening the underlying hdf5 file;
otherwise it will casue problem when the hdf5 file is opened with the core driver.
(3) src/H5Fvfd_swmr.c and vfd swmr tests:
--Use long long for constant define in H5Fvfd_swmr.c and when snprintf the updater file's sequence number
--Modify test/vfd_swmr.c to accommodate endianness of machine and also long long for sequence number
--Modify vfd_swmr_bigset_writer.c, vfd_swmr_common.c, vfd_swmr_gfail_writer.c, vfd_swmr_gperf_writer.c
to use long long for constant define
2022-06-06 22:27:40 -05:00
vchoi-hdfgroup
63c777b913 Merge pull request #67 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2022-06-06 11:53:58 -05:00
vchoi-hdfgroup
b34aa88f48 Merge pull request #1800 from vchoi-hdfgroup/merge_john_tarball
Merge john tarball
2022-06-03 21:46:43 -05:00
github-actions
86c725c319 Committing clang-format changes 2022-06-03 19:35:52 +00:00
vchoi
22ff522173 Merge branch 'merge_john_tarball' of https://github.com/vchoi-hdfgroup/hdf5 into merge_john_tarball 2022-06-03 14:33:17 -05:00
vchoi
ff77fd7abc Correct spelling errors. 2022-06-03 14:18:45 -05:00
github-actions
fae493e84c Committing clang-format changes 2022-06-03 19:12:40 +00:00
vchoi
c766dc8d88 Merge in VFD SWMR changes by John Mainzer.
Commit log message from John:
    Returned VFD SWMR to using the VFD SWMR reader VFD only in the reader case.
    In passing, added a private VFD SWMR reader VFD fapl entry that is pushed
    and popped off the FAPL during file open, and removed the code that set
    the VFD SWMR reader VFD as the driver in the FAPL when VFD SWMR is
    configured.  This was necessary, as there is no mechanism to prevent the
    user from overwriting this entry on the FAPL before file open.  While
    we don't use it now, it also gives us a mechanism for allowing the
    user to specify an underlying VFD for VFD SWMR.

    Modified code to compare file opens to compare the terminal VFDs, not
    the top level VFDs.  Failure to do this allowed multiple opens of
    the same file with the same VFD but with different pass through
    VFDs to appear to be treated as different files -- with the obvious
    file corruption issues.  To support this, added a new VFD ctl op code
    to return a pointer to the instance of H5FD_t associated with the
    terminal VFD.

    Note that this change does not address the case of the same file being
    opened twice with different terminal VFDs -- that will have to be addressed
    another day.

Overview of major changes from John:
1) Reworked file open so that the VFD SWMR reader VFD is only
   used when a file is opened VFD SWMR reader.  This required
   the following changes:
   a) Removed code to set the driver in H5Pset_vfd_swmr_config()
   b) Added a private fapl entry for the VFD SWMR reader VFD
   c) Modified H5F_open to test for VFD SWMR reader opens, and push the
      vfd swmr reader vfd FAPL entry on the VFD stack if so.  In this case
      the entry is popped off the VFD stack on exit so as to avoid any net
      modification from the supplied FAPL.
2) Removed dedup code, and augmented H5FD_cmp() to provide the
   necessary functionality.  This required the following changes:
   a) Added the get terminal VFD op code to the H5FD ctl call.
      This allows duplicate file opens with the same VFD but different overlying
      pass through VFDs to be recognized.  Updated ctl callback in VFDs as required
      to support the new op code.
   b) Modified H5FD_cmp to use the above ctl op code to allow it to recognize
      duplicate file opens with the same VFD but with different overlying
      passthoguh VFDs.  This is necessary to recognize duplicate VFD SWMR reader
      and regular opens.  Note that this does not allow us to recognize duplicate
      opens with different terminal VFDs.
2022-06-03 14:09:32 -05:00
vchoi-hdfgroup
54fdbd3af2 Merge pull request #66 from HDFGroup/feature/vfd_swmr
Merge pull request #1786 from vchoi-hdfgroup/feature/vfd_swmr
2022-05-25 15:48:57 -05:00
vchoi-hdfgroup
cfdc7f262f Merge pull request #1786 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2022-05-19 14:40:03 -05:00
vchoi-hdfgroup
64e730c4f1 Merge pull request #65 from vchoi-hdfgroup/new_vds_feature_vfd_swmr
New vds feature vfd swmr
2022-05-16 12:08:27 -05:00
github-actions
b4bcd01292 Committing clang-format changes 2022-05-16 16:20:11 +00:00
vchoi
06d0f73981 Add test to verify multiple opens of the same file with different VFDs. 2022-05-16 11:15:59 -05:00
vchoi-hdfgroup
22c57f1aa1 Merge pull request #64 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2022-05-13 16:46:06 -05:00
vchoi-hdfgroup
469e8da61e Merge pull request #63 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2022-05-13 12:20:39 -05:00
Dana Robinson
b2e1a59c73 Check for parallel HDF5 before running SWMR acceptance tests (#1764) 2022-05-11 16:32:32 -07:00
vchoi-hdfgroup
11a88dbda3 New vds feature vfd swmr (#1743)
* 1) Add feature flag H5FD_FEAT_SUPPORTS_VFD_SWMR to sec2, core and stdio drivers
2) Disable file locking for VFD SWMR reader in H5F_open()
3) Add checking of VFD SWMR feature flag in test/page_buffer.c and test/vfd_swmr.c.
Skip tests if the driver does not support VFD SWMR feature.
4) Add new tests + cleanups to test/vfd_swmr.c.

* Committing clang-format changes

* Fix failing check for Windows:
Add the VFD SWMR feature flag also to test_windows() (which is sec2) in test/vfd.c.

* Committing clang-format changes

Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-06 15:04:00 -07:00
github-actions
13d6e10dc6 Committing clang-format changes 2022-05-06 21:32:20 +00:00
vchoi
45b4f9ed10 Merge branch 'new_vds_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into new_vds_feature_vfd_swmr 2022-05-06 16:30:03 -05:00
vchoi
a8d506ffce Fix failing check for Windows:
Add the VFD SWMR feature flag also to test_windows() (which is sec2) in test/vfd.c.
2022-05-06 16:26:58 -05:00
github-actions
6e043ce6f2 Committing clang-format changes 2022-05-06 19:58:54 +00:00
vchoi
3b312e2606 Merge branch 'new_vds_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into new_vds_feature_vfd_swmr 2022-05-06 14:56:10 -05:00
vchoi
080b6d0405 1) Add feature flag H5FD_FEAT_SUPPORTS_VFD_SWMR to sec2, core and stdio drivers
2) Disable file locking for VFD SWMR reader in H5F_open()
3) Add checking of VFD SWMR feature flag in test/page_buffer.c and test/vfd_swmr.c.
Skip tests if the driver does not support VFD SWMR feature.
4) Add new tests + cleanups to test/vfd_swmr.c.
2022-05-06 14:54:21 -05:00
vchoi-hdfgroup
702dd6910d Merge pull request #1671 from vchoi-hdfgroup/new_vds_feature_vfd_swmr
New vds feature vfd swmr
2022-04-21 17:27:08 -05:00
github-actions
fd3e7a1781 Committing clang-format changes 2022-04-21 22:03:02 +00:00
vchoi
21c9366d1d Merge branch 'new_vds_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into new_vds_feature_vfd_swmr 2022-04-21 17:00:00 -05:00
vchoi
9163f6ca9b 1) Fix spelling errors
2) Fix couple routine names due to FUNC_ENTER_PACKAGE.
2022-04-21 15:10:29 -05:00
github-actions
3ed0a0ee54 Committing clang-format changes 2022-04-21 19:00:37 +00:00
vchoi
3e990fed8e Modifications to:
A) Allow automatic generation of metadata file names for VDS support
B) Allow VFD SWMR reader to open an existing HDF5 file either before
the VFD SWMR writer has opened it or after it has closed.
C) Remove the usage of H5P_FILE_ACCESS_ANY_VFD.
D) Add H5FD_FEAT_SUPPORTS_VFD_SWMR feature flag.
E) Do not map H5FD_MEM_GHEAP to H5FD_MEM_DRAW when vfd swmr IS enabled;
   map H5FD_MEM_GHEAP to H5FD_MEM_DRAW when vfd swmr is NOT enabled.

For details regarding #A and #B above, see version 9 of the RFC.
2022-04-21 13:56:59 -05:00
vchoi-hdfgroup
ff8f512871 Merge pull request #62 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2022-04-21 12:46:54 -05:00
vchoi-hdfgroup
2f86cba3ec Merge pull request #61 from HDFGroup/feature/vfd_swmr
VFD SWMR: Merges from develop (#1670)
2022-04-21 12:09:51 -05:00
Dana Robinson
ec14985c85 VFD SWMR: Merges from develop (#1670)
* Cleans up SWMR test scripts (both legacy and VFD)

* Brings over format source changes for Java

* Normalization of HL, Fortran, C++, Java w/ develop

* Removes the STATIC flavor of FUNC_ENTER macros (#1622)

* Removes the STATIC flavor of FUNC_ENTER macros

* Remove H5_NO_ALIGNMENT_RESTRICTIONS (#1426)

* 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.

* Committing clang-format changes

* Per discussion, use HD and add comments.

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

* Removes unused definitions from module headers (#1624)

* Misc stuff from develop (includes some parallel things)

* Brings over SWMR test quiet mode changes from develop

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-04-20 22:24:35 -07:00
vchoi-hdfgroup
ff7fe9e9af Merge pull request #60 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2022-04-04 14:40:16 -05:00
Dana Robinson
bc62da7eb9 VFD SWMR: Normalization with develop and cleanup (#1559)
* Brought over plugin and test script changes

* Removes remaining register keywords (#1481)

* Fixed warnings in the aux process code

* Minor fixes from develop

* Minor changes from develop, fixed format warnings

* Formatted source

* Added HD prefix to timespec_get

* Cleanup in new files

* Removes the MANIFEST file and unused release files (#1497)

* Removes the MANIFEST file and unused release files

* Updated tar command

* checkposix corrections

* More checkposix fixes

* Ripped out unused instrumentation functionality

* Brought over cache tagging changes from develop

* Changes to tagged metadata expulsion iteration

* Fixed typo

* Brought over H5O__free() changes from develop

* Brings (unused) parallel page buffer test in line with develop

* Moved the functionality in supervise.subr to test_vfd_swmr.sh

* Tools VFD parameter updates

* Committing clang-format changes

* H5F VFD SWMR refactoring

* Committing clang-format changes

* Misc changes

* Acceptance test cleanup

* HD prefix
* H5_get_option instead of getopt
* Some bool fixes

* Changes to VFD SWMR acceptance tests

* Minor cleanup

* Use AC_MSG_RESULT/AC_MSG_ERROR/AC_MSG_WARN instead of echo (#1532)

* Merges from develop

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-31 00:56:29 -07:00
Dana Robinson
fbb532cd63 VFD SWMR: Normalization with develop (#1506)
* Brought over plugin and test script changes

* Removes remaining register keywords (#1481)

* Fixed warnings in the aux process code

* Minor fixes from develop

* Minor changes from develop, fixed format warnings

* Formatted source

* Added HD prefix to timespec_get

* Cleanup in new files

* Removes the MANIFEST file and unused release files (#1497)

* Removes the MANIFEST file and unused release files

* Updated tar command

* checkposix corrections

* More checkposix fixes

* Ripped out unused instrumentation functionality

* Brought over cache tagging changes from develop

* Changes to tagged metadata expulsion iteration

* Fixed typo

* Brought over H5O__free() changes from develop

* Brings (unused) parallel page buffer test in line with develop

* Moved the functionality in supervise.subr to test_vfd_swmr.sh

* Tools VFD parameter updates

* Committing clang-format changes

* H5F VFD SWMR refactoring

* Committing clang-format changes

* Misc changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-23 06:48:05 -07:00
Dana Robinson
7837588248 VFD SWMR: normalization with develop (#1472)
Much normalization with develop. Still needs tools changes wrt VFD plugins.
2022-03-06 15:33:00 -08:00
vchoi-hdfgroup
e3ff70f44a Merge pull request #58 from HDFGroup/feature/vfd_swmr
VFD SWMR: Aux process changes (#1451)
2022-02-18 23:08:41 -06:00
Dana Robinson
7e176db164 VFD SWMR: Aux process changes (#1451)
* Removed the aux process submodule

* Directly added aux process files after submodule delete

* Updated Akadio copyright on appropriate files

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-18 15:28:43 -08:00
vchoi-hdfgroup
950b5cbf08 Merge pull request #56 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2022-02-17 16:13:53 -06:00
Dana Robinson
e569dc948f Merge pull request #1445 from derobins/vfd_swmr/license
Updated VFD SWMR's Akadio license
2022-02-17 12:20:33 -08:00
Dana Robinson
c9a363fdd9 Updated the submodule to point to the correct commit so the tests pass 2022-02-17 11:19:28 -08:00
Dana Robinson
b4866778a6 Updated VFD SWMR's Akadio license 2022-02-17 10:56:42 -08:00
raylu-hdf
5c782f794a Merge pull request #1333 from raylu-hdf/raylu_aux_process
Changes Related to the Auxiliary Process
2022-01-31 10:16:53 -06:00
Ray Lu
7e36d2b065 Enable submodule checkout for vfd_swmr. 2022-01-27 18:46:05 -06:00
Dana Robinson
fad439a465 Updated utils/vfd_swmr submodule commit to point to HEAD (#1385) 2022-01-23 18:06:07 -08:00
vchoi-hdfgroup
bd84b66129 Merge pull request #1346 from vchoi-hdfgroup/obj_reg_ref_feature_vfd_swmr
Obj reg ref feature vfd swmr
2022-01-12 18:14:34 -06:00
github-actions
864279f75d Committing clang-format changes 2022-01-10 17:10:16 +00:00
vchoi
e75e593440 Modifications to test/vfd_swmr_dsetops_writer.c for testing references.
Add test for references to test/testvfdswmr.sh.in.
2022-01-10 11:05:45 -06:00
vchoi-hdfgroup
d517a98b3c Merge pull request #51 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2022-01-07 14:56:16 -06:00
vchoi-hdfgroup
c8ab842e02 Merge pull request #50 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2022-01-07 11:34:40 -06:00
vchoi-hdfgroup
8bf4de7fd4 Merge pull request #1322 from vchoi-hdfgroup/group_tests_issues
Group tests issues
2022-01-05 14:38:05 -06:00
github-actions
d3f039b814 Committing clang-format changes 2022-01-04 23:28:27 +00:00
vchoi
2262a24689 Merge branch 'group_tests_issues' of https://github.com/vchoi-hdfgroup/hdf5 into group_tests_issues 2022-01-04 17:26:18 -06:00
vchoi-hdfgroup
d8ef511b2a Merge pull request #49 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2022-01-04 17:23:33 -06:00
vchoi
b12565b815 (A) Address issue #2 and issue #4 of the group test failures.
See Kent's documentation "Designed to Fail Tests and Issues".
    (a) Fix for issue #2:
    --Print out meaningful message about max_lag when there is
    checksum error in loading an entry via H5C__load_entry().
    --H5C.c: H5C_protect()
    (b) Fix for issue #4:
    --Allocate more space when the copy of the index read from the metadata file is
      bigger than the existing size
    --H5Fvfd_swmr.c: H5F_vfd_swmr_reader_end_of_tick()
(B) When putting the old index into the delayed free list, use the old
    writer_index_offset instead of the current writer_index_offset
    --H5Fvfd_swmr.c: vfd_swmr_enlarge_shadow_index()
(C) When there is error form calling H5F_vfd_swmr_process_eot_queue() in
    VFD_SWMR_ENTER(err) and VFD_SWMR_LEAVE(err), should report
    FAIL instead of "err"
    --H5private.h: VFD_SWMR_ENTER and VFD_SWMR_LEAVE macros
(D) Add tests to verify issue #2 and issue #4 are fixed.
2022-01-04 16:57:20 -06:00
github-actions
826dd3848d Committing clang-format changes 2022-01-04 03:14:14 +00:00
Ray Lu
7fa3e66be5 Rearragned how the auxiliary process is tested: let the test script launch it if the --enable-aux-process option is enabled during configure. 2022-01-03 20:55:33 -06:00
github-actions
2d6db3afdc Committing clang-format changes 2021-12-21 18:31:29 +00:00
vchoi
cdc93ea7fa Address issue #1 and issue #3 of the group test failures.
See Kent's documentation "Designed to Fail Tests and Issues".
(A) Fix for issue #1: HDassert the < and = cases between old and new
entry length.  John will take care of the > case.
(B) Fix for issue #3:  set the cache copy of page_size again if different
    from f->shared->fs_page_size.
2021-12-21 12:25:32 -06:00
vchoi-hdfgroup
a30ca5afcd Merge pull request #48 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-12-19 00:54:39 -06:00
Ray Lu
0d084f201d Added the option to run the auxiliary process ('-A'). For now, it's enabled by hand for testing. 2021-12-17 11:33:01 -06:00
vchoi-hdfgroup
707c48e63c Merge pull request #1296 from vchoi-hdfgroup/nfs_feature_vfd_swmr
Nfs feature vfd swmr
2021-12-14 17:47:35 -06:00
vchoi
51a3a47bc3 Fix the failure triggered by running the bigset test with 2D dataset that expands
for more than 200 times.  It is due to the indexing error for the metadata file index
and the change list array.
2021-12-14 13:04:27 -06:00
vchoi-hdfgroup
4744cbdfac Merge pull request #47 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-12-14 00:20:02 -06:00
vchoi-hdfgroup
85c430a27e Merge pull request #46 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-12-13 21:01:55 -06:00
github-actions
810fb5b601 Committing clang-format changes 2021-12-08 20:18:30 +00:00
myang6
57b9935b75 update the init_vfd_swmr_config to catch up the latest NFS pull request 2021-12-08 14:16:08 -06:00
kyang2014
63f084bc8d Merge pull request #1247 from kyang2014/feature/vfd_swmr
Feature/vfd swmr
2021-12-08 12:09:10 -06:00
Dana Robinson
0247538fc5 VFD SWMR: Normalization with develop (#1270)
Brings many October-November changes from develop
2021-12-08 09:40:30 -08:00
vchoi-hdfgroup
1ca806a04e Merge pull request #1208 from vchoi-hdfgroup/nfs_feature_vfd_swmr
Nfs feature vfd swmr
2021-12-07 13:50:18 -06:00
vchoi
ca8180f21a Add comments about the window test failure. 2021-12-07 13:08:24 -06:00
github-actions
4b4c7c4b73 Committing clang-format changes 2021-12-07 18:29:24 +00:00
myang6
b78f393d80 Revise comments to address the PR review. 2021-12-07 12:27:31 -06:00
vchoi
ae5680405d Trying to fix the PR's window test failures. 2021-12-07 12:01:38 -06:00
vchoi
395453cbc7 Merge branch 'nfs_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into nfs_feature_vfd_swmr 2021-12-06 18:59:32 -06:00
vchoi
03047ba4c0 Clang format changes. 2021-12-06 18:58:29 -06:00
github-actions
cf7f42cbd5 Committing clang-format changes 2021-12-07 00:54:55 +00:00
vchoi
7253d772b8 Changes to address feedback from PR review. 2021-12-06 18:52:04 -06:00
github-actions
829c3a83c3 Committing clang-format changes 2021-12-06 23:40:28 +00:00
myang6
4734ef5529 Add comments. 2021-12-06 17:38:14 -06:00
myang6
904c2efdde Add some comments. 2021-12-01 16:52:28 -06:00
Muqun Yang
75518fb5be Merge branch 'indep_test' into feature/vfd_swmr 2021-12-01 14:51:29 -06:00
github-actions
67c0a04d74 Committing clang-format changes 2021-12-01 18:17:15 +00:00
myang6
210464603e Add the test for independence of reader and writer. 2021-12-01 12:13:22 -06:00
Dana Robinson
9ee9d67dc9 Updated submodule to reflect recent changes (#1235) 2021-11-29 15:08:09 -08:00
github-actions
68ddc3029a Committing clang-format changes 2021-11-17 17:30:05 +00:00
vchoi
97a37aa849 1) Core changes for adding NFS/updater support as described in the RFC.
src/H5Pfapl.c
src/H5Fvfd_swmr.c
src/H5Fpublic.h
src/H5Fpkg.h
src/H5Fprivate.h

2) For VFD SWMR testing, add private property for checksum generation of metadata files:
src/H5Fint.c
src/H5Fvfd_swmr.c
src/H5Pfapl.c
src/H5Fpkg.h
src/H5Fprivate.h

3) Fix the following in H5F_vfd_swmr_init() and H5F_vfd_swmr_close_or_flush():
(a) Allocate metadata file index right after metadata file header.
(b) Set tick number to 0 when creating header and index for file open case.
(c) Remove tick number increment at file close.
src/H5Fvfd_swmr.c
src/H5Ftest.c

4) To be consistent with the RFC, change the name for field "chksum" to "checksum" in struct H5FD_vfd_swmr_idx_entry_t:
src/H5FDprivate.h
src/H5FDtest.c
src/H5FDvfd_swmr.c
src/H5Ftest.c
src/H5PB.c

4) Add tests for NFS/updater
test/vfd_swmr.c

5) Modify common routine init_vfd_swmr_config() to accept updater_file_path
test/vfd_swmr_common.c
test/vfd_swmr_common.h

6) Changes to the tests due to the common routine init_vfd_swmr_config():
test/vfd_swmr_addrem_writer.c
test/vfd_swmr_attrdset_writer.c
test/vfd_swmr_bigset_writer.c
test/vfd_swmr_dsetchks_writer.c
test/vfd_swmr_dsetops_writer.c
test/vfd_swmr_generator.c
test/vfd_swmr_gfail_writer.c
test/vfd_swmr_gperf_writer.c
test/vfd_swmr_group_writer.c
test/vfd_swmr_reader.c
test/vfd_swmr_remove_reader.c
test/vfd_swmr_remove_writer.c
test/vfd_swmr_sparse_reader.c
test/vfd_swmr_sparse_writer.c
test/vfd_swmr_vlstr_reader.c
test/vfd_swmr_vlstr_writer.c
test/vfd_swmr_writer.c
test/page_buffer.c
2021-11-17 11:25:20 -06:00
vchoi-hdfgroup
f3293556b7 Merge pull request #45 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-11-16 17:39:05 -06:00
vchoi-hdfgroup
d4bd58d1ec Merge pull request #44 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-11-16 16:59:28 -06:00
raylu-hdf
a58fbf52f0 Merge pull request #1156 from raylu-hdf/raylu_bigset_test2
Two Minor Changes for the Big Set Test
2021-11-03 11:59:34 -05:00
kyang2014
4f0b40fade Merge pull request #1145 from kyang2014/feature/vfd_swmr
Feature/vfd swmr - adding the log feature
2021-11-02 16:44:27 -05:00
github-actions
ff024427f8 Committing clang-format changes 2021-11-02 20:52:46 +00:00
myang6
0e3dc9ffed Make entry log code as a #define macro as John suggests. 2021-11-02 15:41:28 -05:00
github-actions
43c2c955b8 Committing clang-format changes 2021-11-02 17:25:26 +00:00
myang6
2045b7984b 1. Close the log file when the file closing flag is true in H5F_vfd_swmr_close_or_flush().
2. Move the log test to the group performance test code with an option.
3. Use constant variables for log message lengths.
4. Misc. clean-up.
2021-11-02 12:20:14 -05:00
github-actions
e5c8d80a12 Committing clang-format changes 2021-11-01 16:14:45 +00:00
Songyu Lu
ad76c0de4e Two purposes for this PR:
1. added an option to enable the legacy SWMR in vfd_swmr_bigset_writer.c.
2. adjusted the options for big set test to make sure it passes the exhaustive test in testvfdswmr.sh.in.
2021-11-01 10:57:55 -05:00
github-actions
abed0f75f2 Committing clang-format changes 2021-10-29 20:02:12 +00:00
myang6
b8a775cbe4 Update comments to use the HDF5 timer for the log feature. 2021-10-29 15:00:02 -05:00
github-actions
553c1b449e Committing clang-format changes 2021-10-29 16:01:17 +00:00
myang6
d0e0e9a418 Use HDF5 timer function 2021-10-29 10:59:16 -05:00
github-actions
40f67b4b19 Committing clang-format changes 2021-10-28 23:15:32 +00:00
myang6
65cf226e8a Add macros to make windows ignore the HDgetclock_time(). 2021-10-28 18:13:19 -05:00
myang6
81f733ea66 Revise a comment to trigger another github check 2021-10-28 14:56:49 -05:00
github-actions
89ed2f2004 Committing clang-format changes 2021-10-28 17:32:03 +00:00
Muqun Yang
7a527aac5a Modify comments. 2021-10-28 12:29:39 -05:00
myang6
e52f6fdb13 Add vfd_swmr_log_writer.c to the MANIFEST. 2021-10-28 10:32:12 -05:00
myang6
caec2d284f Merge branch 'vfd_swmr_log' into feature/vfd_swmr 2021-10-28 10:22:10 -05:00
vchoi-hdfgroup
b92c7e58a9 Merge pull request #43 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-10-27 22:45:11 -05:00
Muqun Yang
645aadd77b Modify the description a bit. 2021-10-27 17:53:33 -05:00
vchoi-hdfgroup
33630ee545 Merge pull request #42 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-10-27 16:43:04 -05:00
github-actions
be9a0b58b2 Committing clang-format changes 2021-10-27 17:34:01 +00:00
myang6
f3bca0e22f Add comments, descriptions for the VFD log feature. 2021-10-27 12:30:40 -05:00
github-actions
060d02023b Committing clang-format changes 2021-10-25 21:40:45 +00:00
Muqun Yang
016a42fd6e Remove the compiler warnings. 2021-10-25 16:37:35 -05:00
github-actions
fb51aa0da2 Committing clang-format changes 2021-10-25 19:53:48 +00:00
myang6
09e891477e Update comments, formats etc. 2021-10-25 14:51:28 -05:00
github-actions
d89fb6e09c Committing clang-format changes 2021-10-25 18:14:29 +00:00
myang6
56e0e6ad35 add macro, need to debug an error caused by using the macro 2021-10-25 13:12:23 -05:00
myang6
c17ec107bb Still need to support the NULL pointer in the log report function. 2021-10-20 08:59:16 -05:00
github-actions
9f3adc68aa Committing clang-format changes 2021-10-18 23:25:06 +00:00
Muqun Yang
21459351bd Merge branch 'vfd_swmr_log' of https://github.com/kyang2014/hdf5 into vfd_swmr_log 2021-10-18 18:22:54 -05:00
Muqun Yang
25bcb8e953 Revise the H5Fopen log test. 2021-10-18 18:20:56 -05:00
github-actions
148606eff8 Committing clang-format changes 2021-10-18 22:42:32 +00:00
myang6
5d9248aab7 Merge branch 'vfd_swmr_log' of https://github.com/kyang2014/hdf5 into vfd_swmr_log 2021-10-18 17:40:11 -05:00
myang6
383fd055af Make sure to check the file point. 2021-10-18 17:17:26 -05:00
github-actions
cbf5ca9147 Committing clang-format changes 2021-10-18 21:25:39 +00:00
myang6
a9670aaa11 Add the log entry report function, also add logs for 'File open','File close' and 'EOT processing time' 2021-10-18 16:23:25 -05:00
github-actions
9d48ca295f Committing clang-format changes 2021-10-15 21:58:04 +00:00
myang6
de46905677 Merge branch 'vfd_swmr_log' of https://github.com/kyang2014/hdf5 into vfd_swmr_log 2021-10-15 16:54:33 -05:00
myang6
217a758983 skeleton of the logging report function 2021-10-15 16:53:45 -05:00
github-actions
519c50b981 Committing clang-format changes 2021-10-15 19:15:11 +00:00
myang6
9763864703 Clean up H5Fint.c, ready to implement the report function. 2021-10-15 14:12:00 -05:00
myang6
89cde3e000 Test to just write a log file for H5Fopen. Add a testing routine vfd_swmr_log_writer.c. 2021-10-15 13:29:19 -05:00
Dana Robinson
572201b560 VFD SWMR: Added VFD SWMR utils directory as a submodule (#1086)
* Added VFD SWMR utils directory as a submodule

* Fixed MANIFEST
2021-10-11 15:20:31 -07:00
Dana Robinson
a45b73e427 VFD SWMR: Normalization with develop (#1078)
Brings many changes from develop, particularly VOL changes for async
2021-10-05 22:37:12 -07:00
kyang2014
5592111747 Merge pull request #1006 from kyang2014/feature/vfd_swmr
Feature/vfd swmr
2021-10-01 15:43:41 -05:00
myang6
3447897051 Correct typos for the design-to-fail test. 2021-10-01 14:55:16 -05:00
raylu-hdf
1c3e79c123 Merge pull request #717 from raylu-hdf/raylu_bigset_test
Some changes to the big set test
2021-09-15 20:03:17 -05:00
github-actions
03f90ee196 Committing clang-format changes 2021-09-14 16:49:15 +00:00
Songyu Lu
db4a1755b3 Changed fprintf to HDfprintf and also printed out the write speed for performance information. 2021-09-14 11:46:40 -05:00
Muqun Yang
f96583190c Add vfd_swmr_gfail_writer.c for the "design to fail" test. 2021-09-13 16:23:07 -05:00
github-actions
8d3cf7eb46 Committing clang-format changes 2021-09-13 20:26:40 +00:00
github-actions
6c9dfa8c4b Committing clang-format changes 2021-09-13 20:23:10 +00:00
Songyu Lu
54f414bd56 Some minor changes and more comments. 2021-09-13 15:22:57 -05:00
Muqun Yang
7eab511b7a Add options for users to choose max_lag, tick_len, page size and page buffer size. 2021-09-13 15:19:46 -05:00
github-actions
50db5f9572 Committing clang-format changes 2021-09-13 18:47:43 +00:00
Muqun Yang
54e7dd014b 1. Revise the VFD SWMR reader side code to make the expected design fail. JRM will review the change in the future.
2. Add comments on how to repeat the issues discovered when testing the expected design fail.
2021-09-13 13:39:06 -05:00
github-actions
e430c5ceab Committing clang-format changes 2021-09-10 21:00:18 +00:00
myang6
859dd4d975 Add the expected design fail for the long running API on the reader side. 2021-09-10 15:56:19 -05:00
Songyu Lu
6685a58b8d Add a function call to allocate space early during H5Dcreate and H5Dextend. 2021-09-03 15:06:06 -05:00
Songyu Lu
9a9e4983a3 Minor adjustment to a parameter. 2021-09-01 11:44:26 -05:00
Songyu Lu
093849cfcb Merge branch 'raylu_bigset_test' of https://github.com/raylu-hdf/hdf5 into raylu_bigset_test 2021-09-01 11:40:33 -05:00
Songyu Lu
4333e342e8 Merge branch 'feature/vfd_swmr' of https://github.com/raylu-hdf/hdf5 into raylu_bigset_test 2021-09-01 11:30:06 -05:00
github-actions
a95bf70967 Committing clang-format changes 2021-09-01 16:12:48 +00:00
Songyu Lu
77321a5564 Some important updates to the test: added test for 3D datasets and several new command-line options. 2021-09-01 11:08:15 -05:00
vchoi-hdfgroup
5d453a6055 Merge pull request #41 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-27 15:47:46 -05:00
vchoi-hdfgroup
bb54464d2d Merge pull request #40 from HDFGroup/feature/vfd_swmr
VFD SWMR: Updates the mirror VFD tests so they compile and pass tests…
2021-08-27 15:06:31 -05:00
vchoi-hdfgroup
00199c5a2c Merge pull request #39 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-27 13:13:05 -05:00
Dana Robinson
b1f1c6339f VFD SWMR: Updates the mirror VFD tests so they compile and pass tests (#971)
* Updates the mirror VFD tests so they compile and pass tests

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-27 11:10:26 -07:00
Songyu Lu
5de1b14ed8 Merge branch 'feature/vfd_swmr' of https://github.com/raylu-hdf/hdf5 into raylu_bigset_test 2021-08-27 11:21:08 -05:00
vchoi-hdfgroup
d13485924d Merge pull request #38 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-27 11:20:15 -05:00
kyang2014
0aa6a8d33d Merge pull request #943 from kyang2014/feature/vfd_swmr
Feature/vfd swmr
2021-08-26 13:28:57 -05:00
Muqun Yang
6e2a2fed3a fixed comment issues. 2021-08-26 12:59:04 -05:00
vchoi-hdfgroup
88082d7d46 Merge pull request #916 from vchoi-hdfgroup/obj_reg_ref_feature_vfd_swmr
Obj reg ref feature vfd swmr
2021-08-23 21:23:52 -05:00
Muqun Yang
8555ac9f19 Add vfd_gperf_writer.c to MANIFEST. 2021-08-20 14:19:55 -05:00
github-actions
25c8ea101a Committing clang-format changes 2021-08-20 18:55:19 +00:00
Muqun Yang
404784189c Add more description. 2021-08-20 13:51:25 -05:00
github-actions
55caf37315 Committing clang-format changes 2021-08-19 20:54:04 +00:00
Muqun Yang
1ce07e7bcc Merge branch 'feature/vfd_swmr' of https://github.com/kyang2014/hdf5 into feature/vfd_swmr 2021-08-19 15:51:33 -05:00
Muqun Yang
49c9cea3a8 Add statistics information, comments. Also clean up code a bit. 2021-08-19 15:45:55 -05:00
github-actions
ee86255610 Committing clang-format changes 2021-08-18 21:09:46 +00:00
Muqun Yang
79652fa099 1. Add the VL string type test.
2. Remove the reader test.
3. Fix trivial bugs and remove some warnings.
2021-08-18 16:04:38 -05:00
Muqun Yang
2181a3d602 Merge remote-tracking branch 'upstream/feature/vfd_swmr' into feature/vfd_swmr 2021-08-17 16:34:48 -05:00
github-actions
4d368b7b5b Committing clang-format changes 2021-08-17 21:17:42 +00:00
Muqun Yang
2b62f2a263 Add options fo max_lag, tick_len and page_size. 2021-08-17 16:12:58 -05:00
github-actions
6eaa6012ff Committing clang-format changes 2021-08-17 17:05:16 +00:00
vchoi
b815aecb85 Modifications as indicated by valgrind --tool=memcheck for the following files:
(1) test/vfd_swmr_attrdset_writer.c
Free memory for variable length string + cleanup
(2) test/vfd_swmr_bigset_writer.c
Free memory for s.dataset and s.sources
(3) test/vfd_swmr_vlstr_reader.c
Free memory for content[]

Also fix a bug in test/testvfdswmr.sh.in so that os_groups_seg test will only be executed when specified.
2021-08-17 12:01:39 -05:00
vchoi-hdfgroup
0a4ee8910a Merge pull request #36 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-12 16:47:09 -05:00
vchoi-hdfgroup
b5a5be4a56 Merge pull request #887 from vchoi-hdfgroup/noflush_feature_vfd_swmr
Noflush feature vfd swmr
2021-08-12 11:46:52 -05:00
github-actions
139142cb79 Committing clang-format changes 2021-08-12 16:43:22 +00:00
vchoi
4a35f8480b Modifications based on PR feedback. 2021-08-12 11:40:58 -05:00
vchoi
81025a6e25 Merge branch 'noflush_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into noflush_feature_vfd_swmr 2021-08-10 14:38:10 -05:00
vchoi-hdfgroup
7a9af2bd7d Merge pull request #35 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-10 14:37:47 -05:00
vchoi
0bb13dcf92 (1)
src/H5Fvfd_swmr.c
--enable or disable raw data flush depending on configuration
(2)
vfd_swmr_dsetchks_writer.c
vfd_swmr_dsetops_writer.c
--modifications to test/verify when flushing of raw data is enabled/disabled
--refactor coding
(3)
testvfdswmr.sh.in
--add testing with/without flush of raw data to tests: dsetchks and dsetops
(4)
vfd_swmr_attrdset_writer.c
--pass true for flushing raw data to the common routine init_vfd_swmr_config()
--refactor coding so that it has similar format as the other two tests: dsetops and dsetchks
(5)
vfd_swmr_addrem_writer.c
vfd_swmr_bigset_writer.c
vfd_swmr_generator.c
vfd_swmr_group_writer.c
vfd_swmr_reader.c
vfd_swmr_remove_reader.c
vfd_swmr_remove_writer.c
vfd_swmr_sparse_reader.c
vfd_swmr_sparse_writer.c
vfd_swmr_vlstr_reader.c
vfd_swmr_vlstr_writer.c
vfd_swmr_writer.c
vfd_swmr_zoo_writer.c
--pass true for flushing raw data to the common routine init_vfd_swmr_config()
2021-08-10 14:25:06 -05:00
vchoi-hdfgroup
704dc8e238 Merge pull request #34 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-10 13:34:55 -05:00
Muqun Yang
99f1eeedc8 Merge remote-tracking branch 'upstream/feature/vfd_swmr' into HEAD 2021-08-09 14:34:23 -05:00
vchoi-hdfgroup
9084bfaaea Merge pull request #880 from vchoi-hdfgroup/config_feature_vfd_swmr
Config feature vfd swmr
2021-08-09 13:04:09 -05:00
vchoi
105d3c4d49 Merge branch 'config_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into config_feature_vfd_swmr 2021-08-09 12:01:38 -05:00
vchoi
cf4a523ab7 Modifications based on PR feedback. 2021-08-09 11:59:03 -05:00
vchoi-hdfgroup
0212f12d60 Merge pull request #33 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-07 11:43:56 -05:00
github-actions
acaabcba43 Committing clang-format changes 2021-08-05 22:36:58 +00:00
vchoi
94ca861b4e Fix the segmentation fault that occurs when running test/vfd_swmr_group_writer with one million old style groups.
(A) src/vfd_swmr_enlarge_shadow_index():
--When enlarging the metadata file index entries, HDmalloc() is used to allocate space for the index entries,
but they are later freed at file close via H5MM_xfree() in H5F__dest().
This is corrected to use H5MM_calloc() instead to be consistent.  Note that entries are initially allocated
also via H5MM_calloc() in H5F__vfd_swmr_create_index().
--If the pointer to the old metadata file index entries exists (shared->old_mdf_idx), need to free
the old entries via H5MM_xfree().
(B) test/testvfdswmr.sh.in:
--The test is added to verify that the bug is resolved.
2021-08-05 17:34:11 -05:00
vchoi-hdfgroup
14cbceaa96 Merge pull request #32 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-05 14:32:43 -05:00
vchoi-hdfgroup
58759a7355 Merge pull request #31 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-08-05 13:38:47 -05:00
github-actions
5bf08f0dd7 Committing clang-format changes 2021-08-05 13:05:01 +00:00
Muqun Yang
d89db6effb Merge branch 'feature/vfd_swmr' of https://github.com/kyang2014/hdf5 into feature/vfd_swmr 2021-08-05 08:02:21 -05:00
Muqun Yang
3cdef1e84c Add the group level support. 2021-08-05 07:51:44 -05:00
Dana Robinson
a7f3feee87 VFD SWMR: UG updates from beta 1 (#878)
* Brings MacOS basename fix from feature/vfd_swmr (#875)

* Updated the user's guide with a note about debug builds
2021-08-04 10:07:21 -07:00
Dana Robinson
3082cd226e VFD SWMR: Fixes naked basename() call on MacOS (#874)
* Fixes naked basename() call on MacOS

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-04 10:05:13 -07:00
github-actions
84b8db9485 Committing clang-format changes 2021-08-03 20:28:31 +00:00
Muqun Yang
85c647de12 Merge branch 'feature/vfd_swmr' of https://github.com/kyang2014/hdf5 into feature/vfd_swmr 2021-08-03 15:25:49 -05:00
Muqun Yang
da7fec09b9 1)remove named pipe from the program. 2) make the number of attributes for each group configuratable. The attribute datatype is 32-bit integer. 2021-08-03 15:20:37 -05:00
Dana Robinson
a93e5420fa Updated the VFD SWMR user's guide (#855) 2021-07-26 13:58:17 -07:00
Dana Robinson
dbd850ccc1 VFD SWMR: Fixes for using base versions of versioned API calls (#850)
* Fixes for using base versions of versioned API calls

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-07-22 10:47:44 -07:00
Dana Robinson
3ba7926509 Updates user's guide (#845) 2021-07-21 14:47:31 -07:00
Dana Robinson
a9e8b12a0a VFD SWMR: Removes dedup callback + cleanup (#842)
* HDF5-ification of dedup calls

* Removes dedup callback from VFD struct

* VFD SWMR library code cleanup

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-07-16 17:44:37 -07:00
vchoi-hdfgroup
7002311692 Merge pull request #30 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-07-15 11:33:49 -05:00
vchoi-hdfgroup
44c8d4aba3 Merge pull request #29 from HDFGroup/feature/vfd_swmr
VFD SWMR: sync with develop (#830)
2021-07-15 10:35:12 -05:00
Songyu Lu
0bfc2b7f70 Minor change: move the end tick function to just before the file is closed. 2021-07-15 09:49:29 -05:00
Songyu Lu
fedd949b4f Merge branch 'feature/vfd_swmr' of https://github.com/raylu-hdf/hdf5 into raylu_bigset_test 2021-07-14 12:49:28 -05:00
vchoi-hdfgroup
4e52705ded Merge pull request #831 from vchoi-hdfgroup/config_feature_vfd_swmr
config_feature_vfd_swmr
2021-07-14 10:44:06 -05:00
github-actions
b6aa2680ed Committing clang-format changes 2021-07-13 22:39:33 +00:00
vchoi
3d5c597c49 Modifications to common routines used by VFD SWMR tests:
(1) Add a parameter page_buf_size to the common routine vfd_swmr_create_fapl().
(2) Add a new common routine vfd_swmr_create_fcpl() to set the file space strategy and file space page size.
VFD SWMR tests are modified accordingly to call the above routines.
2021-07-13 17:36:48 -05:00
Dana Robinson
eebaee6529 VFD SWMR: sync with develop (#830)
* Normalization with develop

* Removes checks and work-arounds for strtoll and strtoull (#769)

* Removes checks for (v)snprintf, which are C99 (#772)

* Update missing release note info. (#776)

* Replaces the H5_OVERRIDE macro with override (#773)

The macro is no longer necessary now that we require C++11.

* Cleans up some POSIX header bits in H5private.h (#783)

* Removes outdated checks for ways inline might be defined (#781)

These are obsolete now that we require C99.

* Removes checks for system(), which is C89/90 (#782)

* 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>

* 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.

* Release Note (#784)

* 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.

* Fix tools test (#794)

* Removes ancient Autotools cruft (#790)

* 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>

* Removes checks for signal and set/longjmp, which are C89 (#798)

Also removes checks for setjmp.h and stddef.h

* Assume frexpl/f and fabsl/f, which are C99 (#799)

* 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>

* Removes obsolete equivalents of C99's __func__ (#800)

* 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>

* 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

* Removes type guesses when C99 types are missing (#807)

* Assume C99 types exist in H5detect.c (#808)

* Fixes parallel issues from recent C99 changes

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

* Fix typo

* 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

* Removes remaining H5_TIME_WITH_SYS_TIME cruft (#810)

Mostly from CMake

* Merges with develop

* Committing clang-format changes

* Normalization with develop

* direct_chunk test and H5Dget_chunk_storage_size changes
* Removes unused H5O call

* Brings some dataspace changes from the combo branch merge

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-07-12 13:30:20 -07:00
Songyu Lu
cab2b3fc5f Some minor corrections and adjustments. 2021-07-08 12:06:26 -05:00
Songyu Lu
4ac67187fa Merge branch 'feature/vfd_swmr' of https://github.com/raylu-hdf/hdf5 into raylu_bigset_test 2021-07-08 11:38:00 -05:00
github-actions
082de1cb75 Committing clang-format changes 2021-07-08 16:20:33 +00:00
Songyu Lu
4f0a03189b 1. Added the test for 3D datasets;
2. Added performance measurement.
2021-07-08 11:17:44 -05:00
github-actions
b1e75e7816 Committing clang-format changes 2021-07-02 18:14:04 +00:00
Muqun Yang
354c1237a5 Merge branch 'feature/vfd_swmr' of https://github.com/kyang2014/hdf5 into feature/vfd_swmr 2021-07-02 13:11:24 -05:00
Muqun Yang
9d07011f4e More code to performance check. 2021-07-02 13:02:33 -05:00
vchoi-hdfgroup
7e47925193 Merge pull request #28 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-30 14:37:27 -05:00
vchoi-hdfgroup
fd014862f7 Merge pull request #27 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-30 13:04:20 -05:00
Dana Robinson
b9dbabc152 VFD SWMR: Sync with develop (#811)
* Normalization with develop

* Removes checks and work-arounds for strtoll and strtoull (#769)

* Removes checks for (v)snprintf, which are C99 (#772)

* Update missing release note info. (#776)

* Replaces the H5_OVERRIDE macro with override (#773)

The macro is no longer necessary now that we require C++11.

* Cleans up some POSIX header bits in H5private.h (#783)

* Removes outdated checks for ways inline might be defined (#781)

These are obsolete now that we require C99.

* Removes checks for system(), which is C89/90 (#782)

* 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>

* 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.

* Release Note (#784)

* 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.

* Fix tools test (#794)

* Removes ancient Autotools cruft (#790)

* 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>

* Removes checks for signal and set/longjmp, which are C89 (#798)

Also removes checks for setjmp.h and stddef.h

* Assume frexpl/f and fabsl/f, which are C99 (#799)

* 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>

* Removes obsolete equivalents of C99's __func__ (#800)

* 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>

* 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

* Removes type guesses when C99 types are missing (#807)

* Assume C99 types exist in H5detect.c (#808)

* Fixes parallel issues from recent C99 changes

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

* Fix typo

* 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

* Removes remaining H5_TIME_WITH_SYS_TIME cruft (#810)

Mostly from CMake

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-06-30 11:02:42 -07:00
vchoi-hdfgroup
18c08c5adc Merge pull request #759 from vchoi-hdfgroup/dsetchks_feature_vfd_swmr
Dsetchks feature vfd swmr
2021-06-30 11:18:26 -05:00
vchoi
823b8a8298 Remove the duplicate entry. 2021-06-29 13:24:21 -05:00
vchoi
a396a18d40 Modifications based on PR feedback. 2021-06-29 13:15:28 -05:00
github-actions
3dc6265bae Committing clang-format changes 2021-06-29 16:57:20 +00:00
Muqun Yang
b4cd03bd54 Add the first version of group performance code. 2021-06-29 11:54:28 -05:00
Muqun Yang
83de84f88d Add the Makefile.am for the performance. 2021-06-29 10:42:11 -05:00
vchoi-hdfgroup
b558b7fa69 Merge pull request #26 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-28 19:27:29 -05:00
vchoi-hdfgroup
63db18aa65 Merge pull request #25 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-28 19:27:12 -05:00
vchoi-hdfgroup
df20a8b6e7 Merge pull request #24 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-28 16:00:32 -05:00
Dana Robinson
79c2a900d3 VFD SWMR: Minor fixes (#771)
* Fixes missing C99 format specifiers in page_buffer test

* Warning and other misc fixes in VFD SWMR accept. tests

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-18 06:07:35 -07:00
Dana Robinson
a00ad2b657 VFD SWMR: Normalization with develop (#765)
* Brings CMake updates from develop

* Brings reduction in pedantic casts from develop

* 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>

* 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>

* Committing clang-format changes

* 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>

* Formatted source

* Bring over some VOL registration changes

* VOL cleanup

* H5VL_request_status_t substitutions

* H5F.c cleanup

* Minor API tweaks from develop

* Moves H5G package init/teardown to H5Gint.c

* H5G cleanup

* H5M cleanup

* H5SM cleanup

* H5T cleanup

* H5R cleanup

* H5Lpublic.h cleanup

* H5L cleanup

* H5O cleanup

* H5A, H5CS, and H5AC cleanup

* Moved H5A init/teardown code to H5Aint.c

* Moves H5D I/O functions to H5D.c

* H5D cleanup

* Misc minor cleanup

* H5P close cleanup

* H5Tpublic.h cleanup

* Fixes err_compat test

* H5PLpublic.h cleanup

* Updates H5Ppublic.h

* H5Fpublic.h updates

* H5A.c cleanup

* Brings over H5Aexists and related changes

* Brings CMake shell testing changes from develop

* Close callback changes

* H5R and H5Tcommit normalization

* err_compat test works now

* H5O tweaks

* Updates VOL registration code

* Brings over H5VL_create_object

* H5Tconv.c reformatting

* H5T.c tweaks

* Brings datatype and reference updates from develop

* Brings VOL plugin loading changes from develop

* Brings event sets from develop

* Brings async functions over

* Tools changes

* Brings over many tools changes from develop

* Brings VOL flags from develop

* Fixes h5dump double/float tests

* Updates h5repack tests

* Brings h5diff test changes from develop

* Last h5dump changes

* Brings test changes from develop

* Committing clang-format changes

* Tidied h5_testing()

* Brings chunk iteration code + misc from develop

* Updates vds test

* Enables external link parallel test

* Brings updated property lists from develop

* H5G changes from develop

* H5MF cleanup

* Brings vfd_swmr test back into CMake

* Updates threadsafe test

* Updates plist test

* Brings recent changes from develop

* 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>

* Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)

* Removes pre-C99 build and header cruft (#700)

* 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

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

* Updates release documents

* Brings parallel changes from develop

* Adds a VFD/parallel check program for the VFD SWMR shell test

* Updates MANIFEST

* Disable building VFD SWMR acceptance tests on CMake

* Removes err.h from genall5.c

* Partial cleanup of H5Cpkg.h

* Fixes printf specifiers in H5Cdbg.c

* 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>

* 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>

* 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>

* Clean up type size checks in configure.ac (#702)

* Committing clang-format changes

* 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>

* Removes some DEC Alpha cruft from H5detect and H5private.h (#708)

* Cleans up hsize_t and haddr_t size guessing (#709)

* Cleans up definitions of haddr_t and hsize_t + cruft removal

* Formatted source

* Updates PGI C/C++ configurations (#715)

* Updates PGI C/C++ configurations

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

* Updated copyright information

* 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>

* 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

* 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

* Updates CMake size_t and ssize_t checks for MacOS

* Moved a little boilerplate over from develop

* Fixes some warnings

* Committing clang-format changes

* 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

* 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>

* Moves H5PacketTable default ctor inside source file (#731)

* Brings (most) H5Xdevelop.h headers from develop

* Trivial H5F and H5O changes during normalization

* Renames buf_ptr back to page_buf to better align with develop

* Removed H5HGtrap.c

* Brings changes from develop

* Normalization (mainly cache) with develop

* Fix Direct VFD Testing in CMake (#742)

* Fixes C++ warnings when passing hsize_t values to printf in test code (#745)

* 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>

* Committing clang-format changes

* Cache code tidying

* Constification of cache code

* Renaming of static calls in cache

* Fixes H5C mess made by git during merge

* Committing clang-format changes

* Fixes a printf format issue w/ parallel

* Revert "Committing clang-format changes"

This reverts commit 1265fe87fe.

* Turns off clang formatter in H5C while syncing with develop

* Adds a lot of HD prefixes and cleans up err.h usage

* Committing clang-format changes

* Brings cache skip list optimization from develop

* Brings recent changes from develop

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-17 14:19:24 -07:00
vchoi-hdfgroup
a7f729581b Maximum jump in tick for VFD SWMR reader (#752)
* Calculate the maximum jump in ticks for the reader and printed it out at file closing.
The max_log configured is printed out as well.

* Committing clang-format changes

* Change printing format as indicated in the PR feedback.

* Committing clang-format changes

Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-16 12:24:26 -07:00
github-actions
ca981a460b Committing clang-format changes 2021-06-16 15:10:14 +00:00
vchoi
00db3355ad Add new test that handles chunk operations for chunked datasets. 2021-06-16 10:05:56 -05:00
vchoi-hdfgroup
0ba96f793f Merge pull request #23 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-11 16:21:50 -05:00
vchoi-hdfgroup
0803dbcd39 Merge pull request #22 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-11 14:48:43 -05:00
vchoi-hdfgroup
4e2c1ffd77 Merge pull request #743 from vchoi-hdfgroup/testtime_feature_vfd_swmr
Testtime feature vfd swmr
2021-06-11 13:38:24 -05:00
github-actions
0a33dd8847 Committing clang-format changes 2021-06-10 16:53:41 +00:00
vchoi
a1647afd60 Reduce running time and verbosity for VFD SWMR tests.
(1) Change choose_dataset() to print out related info based on verbosity.
(2) Modify all routines in legacy and VFD SWMR tests that call choose_dataset().
(3) Modify testvfdswmr.sh.in to run tests based on HDF5TestExpress setting so as to reduce running time.
2021-06-10 11:46:28 -05:00
vchoi-hdfgroup
3da740a5b8 Merge pull request #21 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-09 18:26:04 -05:00
vchoi-hdfgroup
09d739d349 Merge pull request #20 from HDFGroup/feature/vfd_swmr
VFD SWMR: sync with develop (#725)
2021-06-09 16:15:17 -05:00
github-actions
da0ea555df Committing clang-format changes 2021-06-07 15:09:33 +00:00
Songyu Lu
a30dbdea29 Some simple format changes. 2021-06-07 10:06:02 -05:00
Dana Robinson
9a4b225cb0 VFD SWMR: sync with develop (#725)
* Brings CMake updates from develop

* Brings reduction in pedantic casts from develop

* 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>

* 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>

* Committing clang-format changes

* 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>

* Formatted source

* Bring over some VOL registration changes

* VOL cleanup

* H5VL_request_status_t substitutions

* H5F.c cleanup

* Minor API tweaks from develop

* Moves H5G package init/teardown to H5Gint.c

* H5G cleanup

* H5M cleanup

* H5SM cleanup

* H5T cleanup

* H5R cleanup

* H5Lpublic.h cleanup

* H5L cleanup

* H5O cleanup

* H5A, H5CS, and H5AC cleanup

* Moved H5A init/teardown code to H5Aint.c

* Moves H5D I/O functions to H5D.c

* H5D cleanup

* Misc minor cleanup

* H5P close cleanup

* H5Tpublic.h cleanup

* Fixes err_compat test

* H5PLpublic.h cleanup

* Updates H5Ppublic.h

* H5Fpublic.h updates

* H5A.c cleanup

* Brings over H5Aexists and related changes

* Brings CMake shell testing changes from develop

* Close callback changes

* H5R and H5Tcommit normalization

* err_compat test works now

* H5O tweaks

* Updates VOL registration code

* Brings over H5VL_create_object

* H5Tconv.c reformatting

* H5T.c tweaks

* Brings datatype and reference updates from develop

* Brings VOL plugin loading changes from develop

* Brings event sets from develop

* Brings async functions over

* Tools changes

* Brings over many tools changes from develop

* Brings VOL flags from develop

* Fixes h5dump double/float tests

* Updates h5repack tests

* Brings h5diff test changes from develop

* Last h5dump changes

* Brings test changes from develop

* Committing clang-format changes

* Tidied h5_testing()

* Brings chunk iteration code + misc from develop

* Updates vds test

* Enables external link parallel test

* Brings updated property lists from develop

* H5G changes from develop

* H5MF cleanup

* Brings vfd_swmr test back into CMake

* Updates threadsafe test

* Updates plist test

* Brings recent changes from develop

* 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>

* Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)

* Removes pre-C99 build and header cruft (#700)

* 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

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

* Updates release documents

* Brings parallel changes from develop

* Adds a VFD/parallel check program for the VFD SWMR shell test

* Updates MANIFEST

* Disable building VFD SWMR acceptance tests on CMake

* Removes err.h from genall5.c

* Partial cleanup of H5Cpkg.h

* Fixes printf specifiers in H5Cdbg.c

* 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>

* 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>

* 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>

* Clean up type size checks in configure.ac (#702)

* Committing clang-format changes

* 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>

* Removes some DEC Alpha cruft from H5detect and H5private.h (#708)

* Cleans up hsize_t and haddr_t size guessing (#709)

* Cleans up definitions of haddr_t and hsize_t + cruft removal

* Formatted source

* Updates PGI C/C++ configurations (#715)

* Updates PGI C/C++ configurations

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

* Updated copyright information

* 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>

* 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

* 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

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-04 07:29:02 -07:00
Songyu Lu
79fc79c416 Some changes to the big set test:
1. changed the signal handling to named pipes for communication between the writer and reader;
2. the writer writes as many chunks within a tick then notify the reader to verify the data;
3. some refactoring work.
2021-06-03 10:52:56 -05:00
vchoi-hdfgroup
fe0fffdae2 Merge pull request #19 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-02 18:28:41 -05:00
vchoi-hdfgroup
4fa86ee885 Merge pull request #18 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-06-02 16:20:22 -05:00
Dana Robinson
7dded355b8 VFD SWMR: Sync with develop (#711)
* Brings CMake updates from develop

* Brings reduction in pedantic casts from develop

* 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>

* 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>

* Committing clang-format changes

* 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>

* Formatted source

* Bring over some VOL registration changes

* VOL cleanup

* H5VL_request_status_t substitutions

* H5F.c cleanup

* Minor API tweaks from develop

* Moves H5G package init/teardown to H5Gint.c

* H5G cleanup

* H5M cleanup

* H5SM cleanup

* H5T cleanup

* H5R cleanup

* H5Lpublic.h cleanup

* H5L cleanup

* H5O cleanup

* H5A, H5CS, and H5AC cleanup

* Moved H5A init/teardown code to H5Aint.c

* Moves H5D I/O functions to H5D.c

* H5D cleanup

* Misc minor cleanup

* H5P close cleanup

* H5Tpublic.h cleanup

* Fixes err_compat test

* H5PLpublic.h cleanup

* Updates H5Ppublic.h

* H5Fpublic.h updates

* H5A.c cleanup

* Brings over H5Aexists and related changes

* Brings CMake shell testing changes from develop

* Close callback changes

* H5R and H5Tcommit normalization

* err_compat test works now

* H5O tweaks

* Updates VOL registration code

* Brings over H5VL_create_object

* H5Tconv.c reformatting

* H5T.c tweaks

* Brings datatype and reference updates from develop

* Brings VOL plugin loading changes from develop

* Brings event sets from develop

* Brings async functions over

* Tools changes

* Brings over many tools changes from develop

* Brings VOL flags from develop

* Fixes h5dump double/float tests

* Updates h5repack tests

* Brings h5diff test changes from develop

* Last h5dump changes

* Brings test changes from develop

* Committing clang-format changes

* Tidied h5_testing()

* Brings chunk iteration code + misc from develop

* Updates vds test

* Enables external link parallel test

* Brings updated property lists from develop

* H5G changes from develop

* H5MF cleanup

* Brings vfd_swmr test back into CMake

* Updates threadsafe test

* Updates plist test

* Brings recent changes from develop

* 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>

* Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)

* Removes pre-C99 build and header cruft (#700)

* 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

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

* Updates release documents

* Brings parallel changes from develop

* Adds a VFD/parallel check program for the VFD SWMR shell test

* Updates MANIFEST

* Disable building VFD SWMR acceptance tests on CMake

* Removes err.h from genall5.c

* Partial cleanup of H5Cpkg.h

* Fixes printf specifiers in H5Cdbg.c

* 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>

* 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>

* 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>

* Clean up type size checks in configure.ac (#702)

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-01 09:05:56 -07:00
Dana Robinson
62868dabe1 Parallel updates and fixes for VFD SWMR (#705)
* Brings CMake updates from develop

* Brings reduction in pedantic casts from develop

* 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>

* 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>

* Committing clang-format changes

* 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>

* Formatted source

* Bring over some VOL registration changes

* VOL cleanup

* H5VL_request_status_t substitutions

* H5F.c cleanup

* Minor API tweaks from develop

* Moves H5G package init/teardown to H5Gint.c

* H5G cleanup

* H5M cleanup

* H5SM cleanup

* H5T cleanup

* H5R cleanup

* H5Lpublic.h cleanup

* H5L cleanup

* H5O cleanup

* H5A, H5CS, and H5AC cleanup

* Moved H5A init/teardown code to H5Aint.c

* Moves H5D I/O functions to H5D.c

* H5D cleanup

* Misc minor cleanup

* H5P close cleanup

* H5Tpublic.h cleanup

* Fixes err_compat test

* H5PLpublic.h cleanup

* Updates H5Ppublic.h

* H5Fpublic.h updates

* H5A.c cleanup

* Brings over H5Aexists and related changes

* Brings CMake shell testing changes from develop

* Close callback changes

* H5R and H5Tcommit normalization

* err_compat test works now

* H5O tweaks

* Updates VOL registration code

* Brings over H5VL_create_object

* H5Tconv.c reformatting

* H5T.c tweaks

* Brings datatype and reference updates from develop

* Brings VOL plugin loading changes from develop

* Brings event sets from develop

* Brings async functions over

* Tools changes

* Brings over many tools changes from develop

* Brings VOL flags from develop

* Fixes h5dump double/float tests

* Updates h5repack tests

* Brings h5diff test changes from develop

* Last h5dump changes

* Brings test changes from develop

* Committing clang-format changes

* Tidied h5_testing()

* Brings chunk iteration code + misc from develop

* Updates vds test

* Enables external link parallel test

* Brings updated property lists from develop

* H5G changes from develop

* H5MF cleanup

* Brings vfd_swmr test back into CMake

* Updates threadsafe test

* Updates plist test

* Brings recent changes from develop

* 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>

* Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699)

* Removes pre-C99 build and header cruft (#700)

* 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

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

* Updates release documents

* Brings parallel changes from develop

* Adds a VFD/parallel check program for the VFD SWMR shell test

* Updates MANIFEST

* Disable building VFD SWMR acceptance tests on CMake

* Removes err.h from genall5.c

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 12:04:18 -07:00
Dana Robinson
f86004dbde Normalization with develop (#704) 2021-05-28 08:48:51 -07:00
Dana Robinson
2ddf5fbd92 Much normalization with develop (#701)
* Brings CMake updates from develop

* Brings reduction in pedantic casts from develop

* 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>

* 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>

* Committing clang-format changes

* 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>

* Formatted source

* Bring over some VOL registration changes

* VOL cleanup

* H5VL_request_status_t substitutions

* H5F.c cleanup

* Minor API tweaks from develop

* Moves H5G package init/teardown to H5Gint.c

* H5G cleanup

* H5M cleanup

* H5SM cleanup

* H5T cleanup

* H5R cleanup

* H5Lpublic.h cleanup

* H5L cleanup

* H5O cleanup

* H5A, H5CS, and H5AC cleanup

* Moved H5A init/teardown code to H5Aint.c

* Moves H5D I/O functions to H5D.c

* H5D cleanup

* Misc minor cleanup

* H5P close cleanup

* H5Tpublic.h cleanup

* Fixes err_compat test

* H5PLpublic.h cleanup

* Updates H5Ppublic.h

* H5Fpublic.h updates

* H5A.c cleanup

* Brings over H5Aexists and related changes

* Brings CMake shell testing changes from develop

* Close callback changes

* H5R and H5Tcommit normalization

* err_compat test works now

* H5O tweaks

* Updates VOL registration code

* Brings over H5VL_create_object

* H5Tconv.c reformatting

* H5T.c tweaks

* Brings datatype and reference updates from develop

* Brings VOL plugin loading changes from develop

* Brings event sets from develop

* Brings async functions over

* Tools changes

* Brings over many tools changes from develop

* Brings VOL flags from develop

* Fixes h5dump double/float tests

* Updates h5repack tests

* Brings h5diff test changes from develop

* Last h5dump changes

* Brings test changes from develop

* Committing clang-format changes

* Tidied h5_testing()

* Brings chunk iteration code + misc from develop

* Updates vds test

* Enables external link parallel test

* Brings updated property lists from develop

* H5G changes from develop

* H5MF cleanup

* Brings vfd_swmr test back into CMake

* Updates threadsafe test

* Updates plist test

* Brings recent changes from develop

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 07:10:51 -07:00
vchoi-hdfgroup
0bddd5ffae Merge pull request #17 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-05-26 14:31:00 -05:00
vchoi-hdfgroup
f77aaebcbb Merge pull request #16 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-05-26 12:53:17 -05:00
kyang2014
e22687912d Merge pull request #631 from kyang2014/feature/vfd_swmr
Add group operation tests and object header continuation block tests  to VFD SWMR
2021-05-24 16:37:06 -05:00
github-actions
c82c7abb29 Committing clang-format changes 2021-05-21 20:00:12 +00:00
Muqun Yang
4658fef3a0 use TEST_ERROR when possible 2021-05-21 14:43:48 -05:00
Muqun Yang
ada0e3ae61 Merge remote-tracking branch 'upstream/feature/vfd_swmr' into feature/vfd_swmr 2021-05-21 11:08:07 -05:00
vchoi-hdfgroup
7ebc6f267d Merge pull request #626 from vchoi-hdfgroup/dsetops_feature_vfd_swmr
Dsetops feature vfd swmr
2021-05-20 11:29:58 -05:00
github-actions
b99c806f80 Committing clang-format changes 2021-05-19 20:12:14 +00:00
vchoi
790e87f2f3 Merge branch 'dsetops_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into dsetops_feature_vfd_swmr 2021-05-19 15:09:59 -05:00
vchoi
e25e384dcf Address feedback from PR review:
1) Remove unnecessary header files
2) Move coding from main() to subroutines
2021-05-19 15:06:33 -05:00
github-actions
2f2a75aefb Committing clang-format changes 2021-05-19 19:47:11 +00:00
Muqun Yang
7efe80b125 Merge branch 'feature/vfd_swmr' of https://github.com/kyang2014/hdf5 into feature/vfd_swmr 2021-05-19 14:44:14 -05:00
Muqun Yang
8798c8cac9 Add the object header continuation block tests. 2021-05-19 14:36:08 -05:00
Dana Robinson
668f49d613 Merge pull request #641 from derobins/vfd_swmr/thg_standards
Brings more things from develop
2021-05-12 10:32:45 -07:00
github-actions
5bef162549 Committing clang-format changes 2021-05-10 04:44:03 +00:00
vchoi
8ce78a1352 Merge branch 'dsetops_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into dsetops_feature_vfd_swmr 2021-05-09 23:41:42 -05:00
vchoi
f8a856182b Modifications based on PR feedback plus some cleaning up. 2021-05-09 00:06:00 -05:00
Dana Robinson
13df301e77 Merge branch 'vfd_swmr/thg_standards' of https://github.com/derobins/hdf5 into vfd_swmr/thg_standards 2021-05-07 23:39:30 -07:00
Dana Robinson
b25d924aca Updates the VOL struct 2021-05-07 23:39:15 -07:00
github-actions
2b861c1945 Committing clang-format changes 2021-05-08 06:31:59 +00:00
Dana Robinson
6e38479134 Brings missing error stack append test from develop 2021-05-07 23:31:06 -07:00
Dana Robinson
974482c372 Misc H5VL updates from develop 2021-05-07 23:30:00 -07:00
Dana Robinson
94bb7e1f78 Normalization of H5T 2021-05-07 17:27:03 -07:00
Dana Robinson
f8e8b340dc Brings over a bunch of develop boilerplate 2021-05-07 16:20:19 -07:00
Dana Robinson
af84ce737d Brings over VOL arg setup 2021-05-07 15:38:40 -07:00
Dana Robinson
5ef0958d32 More normalization from develop 2021-05-07 15:16:41 -07:00
Dana Robinson
a51a20a413 Merge branch 'vfd_swmr/thg_standards' of https://github.com/derobins/hdf5 into vfd_swmr/thg_standards 2021-05-07 14:06:24 -07:00
Dana Robinson
99c8b35bbf Brings optional filters from develop 2021-05-07 14:06:07 -07:00
github-actions
c8d62a9a5a Committing clang-format changes 2021-05-07 19:47:55 +00:00
Dana Robinson
2f92cb5d19 Normalization of parallel 2021-05-07 12:46:03 -07:00
Dana Robinson
304df18dab Normalization of dataspace code + reorg of public dataset calls 2021-05-07 12:00:33 -07:00
Dana Robinson
e9464c11b5 Normalization of H5E with develop 2021-05-07 11:14:28 -07:00
Dana Robinson
d33f696dca Brings hash table IDs from develop 2021-05-07 11:05:02 -07:00
Dana Robinson
7f58a89578 Misc normalization from develop 2021-05-07 10:56:07 -07:00
Dana Robinson
79b92df2a2 Adds missing H5F_delete() prototype 2021-05-07 09:02:09 -07:00
Dana Robinson
5d0a4339ba Normalizes extensible arrays with develop 2021-05-07 09:01:24 -07:00
Dana Robinson
c0c8efc4d7 Normalization of object header code 2021-05-06 22:16:51 -07:00
Dana Robinson
7a5b440fa8 Brings H5Z and many test changes from develop 2021-05-06 19:48:58 -07:00
Dana Robinson
f2cb86499e Brings java wrapper updates from develop
The wrappers compile but fail tests due to some missing develop
functionality
2021-05-06 14:07:08 -07:00
Dana Robinson
457b199a38 Brings much of the printf changes over from develop 2021-05-06 13:49:15 -07:00
github-actions
fc4f1b5ecc Committing clang-format changes 2021-05-06 17:58:49 +00:00
Muqun Yang
86a3e7c339 Merge remote-tracking branch 'upstream/feature/vfd_swmr' into feature/vfd_swmr 2021-05-06 12:54:31 -05:00
Muqun Yang
ec5ce26bb3 Add all the group operation tests. The tests include create_group,delete_group,
move_group, insert_links, delete_links, link storage transition and old-styled group
creation.
2021-05-06 09:49:32 -05:00
Dana Robinson
a24428efb7 Merge branch 'vfd_swmr/thg_standards' of https://github.com/derobins/hdf5 into vfd_swmr/thg_standards 2021-05-05 19:43:16 -07:00
Dana Robinson
8d4873173f Brings native H5Fdelete implementation from develop 2021-05-05 15:07:40 -07:00
github-actions
eb8f0988e0 Committing clang-format changes 2021-05-05 19:55:57 +00:00
Dana Robinson
54c202e4ec Normalization with develop (mainly VFDs) 2021-05-05 12:52:43 -07:00
Dana Robinson
8e27e73575 Brings atom-->ID and other ID-related changes from develop 2021-05-04 19:01:23 -07:00
github-actions
1b1fcf979b Committing clang-format changes 2021-05-04 23:08:14 +00:00
vchoi
a4cf8aea72 Add new test vfd_swmr_dsetops_writer.c to test writing operations for:
Dataset types:
--dataset with compact layout
--dataset with contiguous layout
--datasets with chunked layout: single/implicit/fixed array/extensible array/btree2 indexes
Types of writes:
--Sequential writes
--Random writes
--Regular hyperslab writes
--Raw data modifications
2021-05-04 18:04:58 -05:00
vchoi-hdfgroup
8d7593cfcf Merge pull request #15 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-05-03 19:57:17 -05:00
vchoi-hdfgroup
e174e19f5c Merge pull request #13 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-05-03 19:13:27 -05:00
Dana Robinson
16eda679e3 Removes dead H5ST code 2021-05-03 16:23:33 -07:00
Dana Robinson
7aa1bdc137 Merge branch 'vfd_swmr/thg_standards' of https://github.com/derobins/hdf5 into vfd_swmr/thg_standards 2021-05-03 15:04:37 -07:00
Dana Robinson
165a673279 Adds feature/vfd_swmr to the PR check branch list 2021-05-03 15:04:09 -07:00
Dana Robinson
eb54ae3abe Merge pull request #620 from derobins/vfd_swmr/thg_standards
Brings more develop code to VFD SWMR
2021-05-03 15:03:00 -07:00
github-actions
0ca65235b7 Committing clang-format changes 2021-05-03 22:02:43 +00:00
Dana Robinson
20c328e2d5 Adds github action files 2021-05-03 15:00:43 -07:00
Dana Robinson
0ab5dd5e8e Brings more develop code over, especially Doxygen 2021-05-03 14:55:26 -07:00
vchoi-hdfgroup
15ad7b8dcd Merge pull request #12 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-05-03 16:20:44 -05:00
vchoi-hdfgroup
83cc1a493b Merge pull request #11 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-05-03 16:11:00 -05:00
Dana Robinson
51fbbac671 Merge pull request #619 from derobins/vfd_swmr/thg_standards
More code from develop
2021-05-03 13:36:39 -07:00
Dana Robinson
fca509b7d6 Fixes issue in vfd_swmr_attrdset_writer.c 2021-05-03 13:35:22 -07:00
Dana Robinson
ed31eeacfa Many small changes from develop. Should allows running VFD SWMR
tests from CMake.
2021-05-03 12:54:30 -07:00
Dana Robinson
383be26616 Merge pull request #617 from derobins/vfd_swmr/thg_standards
Update top-level COPYING file and remove COPYING files from subdirect…
2021-05-03 11:26:49 -07:00
Dana Robinson
a58881550d 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-05-03 11:24:11 -07:00
Dana Robinson
3de0b0afe5 Merge pull request #613 from derobins/vfd_swmr/thg_standards
Normalizations with develop
2021-05-03 10:34:48 -07:00
Dana Robinson
c83ca64bd0 Merge remote-tracking branch 'canonical/feature/vfd_swmr' into vfd_swmr/thg_standards 2021-05-03 10:11:25 -07:00
Dana Robinson
4442691d80 Disables attrdset tests while we investigate failures
Also switches bin/bash shebang to use env instead
2021-04-30 14:03:55 -07:00
Muqun Yang
dbae13cffa Merge remote-tracking branch 'origin/feature/vfd_swmr_grp_op' into feature/vfd_swmr 2021-04-30 13:14:50 -05:00
vchoi-hdfgroup
65db73eb48 Merge pull request #10 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-30 13:09:37 -05:00
vchoi-hdfgroup
67c75039d5 Merge pull request #9 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-30 13:07:33 -05:00
Muqun Yang
ca2dbd7a8c Merge remote-tracking branch 'origin/feature/vfd_swmr_grp_op' into feature/vfd_swmr
group operation code should be updated at the vfd_swmr branch.
2021-04-30 12:27:47 -05:00
Kent Yang
c1553a2156 Add group creation/deletion/move/link insertion 2021-04-30 12:24:07 -05:00
kyang2014
4042f4c2d4 Merge pull request #571 from kyang2014/feature/vfd_swmr
Add group attribute tests for VFD SWMR
2021-04-30 09:13:03 -05:00
Muqun Yang
16b2b76b26 Close the space id used for attributes. 2021-04-30 09:10:01 -05:00
Muqun Yang
5bac3e28f0 Replace all string functions with HDF's corresponding string functions. 2021-04-29 18:31:13 -05:00
Muqun Yang
226002d583 Use /* */ instead of // for comments. 2021-04-29 15:58:23 -05:00
Muqun Yang
87482f46c2 1. Add the attribute storage check
2. Change the test names and remove unnecessary debugging information
Tested at jelly.
2021-04-29 11:31:34 -05:00
vchoi-hdfgroup
35318ad9b5 Merge pull request #8 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-28 15:11:19 -05:00
vchoi-hdfgroup
49600e5e84 Merge pull request #7 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-28 15:07:10 -05:00
Muqun Yang
ebb87d4105 Add skeleton of group operation test.
The group operations include create/delete/move/add links/delete links/link storage.
2021-04-28 14:45:04 -05:00
Muqun Yang
e70444ccd2 Add the old-styled group creation attribute tests. 2021-04-26 16:24:23 -05:00
Muqun Yang
7aa93ccf61 Forgot passing group property list when merging the code 2021-04-26 10:12:08 -05:00
Muqun Yang
25c3a55b65 Use -q option for the group attribute test. 2021-04-23 14:10:01 -05:00
Muqun Yang
fba7c887d9 Merge remote-tracking branch 'upstream/feature/vfd_swmr' into feature/vfd_swmr 2021-04-23 12:31:09 -05:00
Muqun Yang
90cbdd34c8 correct the code a bit, add comments to the shell script. 2021-04-23 12:11:59 -05:00
Muqun Yang
2afc32cc13 More comments and shorten the test time a bit 2021-04-22 16:16:26 -05:00
Muqun Yang
798776d6c1 Clean up code and add comments. More to do. 2021-04-22 14:37:44 -05:00
vchoi-hdfgroup
41ab0ced0b Merge pull request #547 from vchoi-hdfgroup/dset_feature_vfd_swmr
Add new test: vfd_swmr_attrdset_writer.c
2021-04-22 11:33:13 -05:00
Muqun Yang
a0c9f955f0 Correct the debugging mismatch issue, add more comments. 2021-04-21 16:23:23 -05:00
Muqun Yang
679a529f96 Make the modifying attribute value obvious 2021-04-21 12:52:34 -05:00
vchoi
c9e495c674 Modifications based on PR feedback. 2021-04-20 17:47:18 -05:00
Muqun Yang
a93fdce4a6 1. Merge the group attribute test code to vfd_swmr_group_writer.c. Typical tests are fine. Need to clean up code and add comments/descriptions.
2. Add group attribute tests to testvfdswmr.sh.in. Only use typical cases for the standard and the quick runs for saving time.
2021-04-20 16:33:35 -05:00
vchoi-hdfgroup
791b9893e4 Merge pull request #6 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-13 14:05:00 -05:00
vchoi-hdfgroup
62198a3ee1 Merge pull request #5 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-13 13:59:35 -05:00
raylu-hdf
d9e9fe017c Merge pull request #436 from raylu-hdf/raylu_zoo_test
Changed the signal handling to named pipes in the zoo test
2021-04-13 11:48:02 -05:00
Songyu Lu
95718b27fd Minor change: removed an unused line. 2021-04-13 11:45:10 -05:00
Songyu Lu
625bc5db3c Minor changes: refactored to simplify the code. 2021-04-13 11:41:58 -05:00
Songyu Lu
06380a7c98 Refactored the code to reduce the length of the main function. 2021-04-12 12:07:24 -05:00
vchoi
d6227619a9 (1) Remove header files as indicated by PR review comment.
(2) Add ifdef for windows as indicated by PR review comment.
(3) Misc. cleanup.
2021-04-09 15:33:23 -05:00
Dana Robinson
a2f39152a0 Merge remote-tracking branch 'canonical/feature/vfd_swmr' into vfd_swmr/thg_standards 2021-04-09 10:05:59 -07:00
Dana Robinson
ee655cf374 Brings a lot of smaller changes from develop 2021-04-09 07:07:53 -07:00
raylu-hdf
4fc1dacf9e Merge pull request #546 from raylu-hdf/raylu_group_test3
Added an option to disable named pipes in the group test
2021-04-08 10:08:52 -05:00
Songyu Lu
90ee7f6779 Changed the command-line option for disabling named pipes from -p to -N to be consistent with other tests. 2021-04-08 10:03:13 -05:00
Songyu Lu
64458a8ddb Changed the command-line option for disabling named pipes from -p to -N, to be consistent with other tests. 2021-04-07 21:29:19 -05:00
Dana Robinson
94ecd14100 Brings many CMake changes from develop 2021-04-07 19:07:31 -07:00
Dana Robinson
ce39d7501c Brings H5CX_pop() changes from develop 2021-04-07 17:35:30 -07:00
Dana Robinson
2f4152d02d Brings many parallel changes from develop 2021-04-07 14:32:08 -07:00
vchoi
74b1d42bbf Add new test vfd_swmr_attrdset_writer.c.
It is to test attribute handling for different dataset types.
2021-04-07 15:03:16 -05:00
Dana Robinson
1a75bc504f Brings inline changes from develop 2021-04-07 12:26:09 -07:00
Dana Robinson
85cbe79836 Brings (trivial) skip list changes from develop 2021-04-07 11:29:32 -07:00
Dana Robinson
dfc2a0993c Brings H5module.h from develop and fixes Autotools badness 2021-04-07 11:25:39 -07:00
Dana Robinson
b7dc1ef6f4 Fixes MANIFEST and missing H5TSpublic.h file 2021-04-07 10:20:03 -07:00
Dana Robinson
a96849027a Brings thread-safety changes from develop 2021-04-07 10:13:12 -07:00
Songyu Lu
14b1a821b7 Added an option to disable named pipes, mainly for running the writer and reader seperately or not using VFD SWMR. 2021-04-07 11:36:46 -05:00
Dana Robinson
17c7cf9475 Moves VFD and VOL make check targets to conclude.am 2021-04-07 09:29:27 -07:00
Songyu Lu
1ddc44852e Removed an unused macro definition. 2021-04-06 21:32:37 -05:00
Songyu Lu
422c48af68 Removed the two functions (vfd_swmr_writer_may_increase_tick_to and vfd_swmr_reader_did_increase_tick_to) that overrode the functions of the same names in the SWMR driver.
Also added a command-line option to disable named pipes so that the writer and reader can run seperately.
2021-04-06 12:00:17 -05:00
Dana Robinson
4857beeb30 Better VFD SWMR parallel skip test 2021-04-06 04:43:31 -07:00
Dana Robinson
555d6593b7 Fix for (serial) VFD SWMR test failure in pHDF5 2021-04-06 03:03:09 -07:00
Dana Robinson
245950c383 Brings trace changes from develop 2021-04-06 02:43:53 -07:00
Dana Robinson
847be78dbe Brings H5RS changes from develop 2021-04-05 20:40:06 -07:00
Dana Robinson
f0d1a03aa1 Brings the rest of the header changes from develop 2021-04-05 18:34:37 -07:00
Dana Robinson
32e6c3dcae Brings include guard changes from develop 2021-04-05 18:28:19 -07:00
Dana Robinson
72aad5ebdf Normalized Fortran with develop 2021-04-05 16:18:08 -07:00
Dana Robinson
0c6ff43fbc Normalizes C++ with develop 2021-04-05 15:59:36 -07:00
Dana Robinson
4402e696e4 Normalized high-level library with develop 2021-04-05 15:35:03 -07:00
vchoi-hdfgroup
6d26ec995b Merge pull request #4 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-05 14:06:41 -05:00
vchoi-hdfgroup
fef0001155 Merge pull request #3 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-04-05 14:03:53 -05:00
Songyu Lu
da80917711 Two main changes include: re-arranging the communication between the writer and reader through the named pipes; using the error report consistent with other tests. 2021-04-05 11:29:15 -05:00
raylu-hdf
22159bc646 Merge pull request #482 from HDFGroup/raylu_group_test2
Changing the signal handling to named pipe in the group test for better portablity (2nd improvement)
2021-03-30 15:01:18 -05:00
Songyu Lu
4d15702ca0 Merge branch 'feature/vfd_swmr' of https://github.com/HDFGroup/hdf5 into raylu_group_test2 2021-03-30 12:46:24 -05:00
Dana Robinson
4d459e1ceb Adds missing utils Makefile.in entries to MANIFEST 2021-03-26 17:14:24 -07:00
Dana Robinson
bddf457034 Merge pull request #525 from derobins/vfd_swmr/thg_standards
Fixed 1.6 compatibility issues and ran source formatter
2021-03-26 16:18:37 -07:00
Dana Robinson
0a73f3dd4b Fixed 1.6 compatibility issues and ran source formatter 2021-03-26 16:16:38 -07:00
Songyu Lu
209a194993 Added the prefix (HD) to several C functions. 2021-03-26 12:25:14 -05:00
Songyu Lu
fde17589d8 Merge branch 'raylu_zoo_test' of https://github.com/HDFGroup/hdf5 into raylu_zoo_test 2021-03-25 17:44:49 -05:00
Songyu Lu
998aca32e6 Merge branch 'feature/vfd_swmr' of https://github.com/HDFGroup/hdf5 into raylu_zoo_test 2021-03-25 17:42:01 -05:00
Dana Robinson
c81afbff45 Merge pull request #518 from derobins/vfd_swmr/thg_standards
Vfd swmr/thg standards
2021-03-25 11:28:38 -07:00
Dana Robinson
0011a5e758 Temporarily disable some tests that fail on Windows 2021-03-25 11:26:52 -07:00
Songyu Lu
79a94e0f43 Added the HDF5 prefix (HD_) to several system calls. 2021-03-25 11:50:34 -05:00
Dana Robinson
8d526ed137 test_same_file_opens() works on Windows now (vfd_swmr.c) 2021-03-25 02:48:27 -07:00
Dana Robinson
3176c92453 Merge pull request #515 from derobins/vfd_swmr/thg_standards
Brings file locking from develop, fixes parallel
2021-03-25 02:14:15 -07:00
Dana Robinson
df685806b2 Fixes phdf5 2021-03-25 02:11:45 -07:00
Dana Robinson
c0c978e627 Normalization of the bin scripts (with develop) 2021-03-25 01:16:59 -07:00
Dana Robinson
2cf9bed552 Brings Windows file locking from develop 2021-03-25 00:57:21 -07:00
Dana Robinson
1dbb83aabd Brings file locking changes from develop 2021-03-25 00:32:40 -07:00
Dana Robinson
9d8344d88c Merge pull request #514 from derobins/vfd_swmr/thg_standards
Brings the 'warnings-as-errors' changes from develop
2021-03-24 19:13:24 -07:00
Dana Robinson
711d12bb58 Brings the 'warnings-as-errors' changes from develop 2021-03-24 19:11:34 -07:00
Dana Robinson
091ed42aa5 Merge pull request #513 from derobins/vfd_swmr/thg_standards
Updates license url and history docs
2021-03-24 18:37:07 -07:00
Dana Robinson
67cfa2396c Updates license url and history docs 2021-03-24 18:29:11 -07:00
Dana Robinson
8589bd0148 Merge pull request #512 from derobins/vfd_swmr/thg_standards
Formats the source, misc Autotools fixes
2021-03-24 17:41:58 -07:00
Dana Robinson
feb20aac30 Formats the source and updates the gcc warning pragmas 2021-03-24 17:39:37 -07:00
Dana Robinson
bdac2ecdbf Brings some Autotools improvements over from develop
* configure.ac tidying
* helpful XCode comments
* FreeBSD improvements
* Fixes for finding Java on MacOS
* The improved warnhist script
2021-03-24 16:02:07 -07:00
Dana Robinson
2e3b24078e Brings the clang-format files from develop
NOTE: Not wired into github actions at this time.
2021-03-24 15:46:48 -07:00
Dana Robinson
93080fa619 Brings fixes for splitter VFD test from develop 2021-03-24 15:34:04 -07:00
Dana Robinson
bef660f867 Merge pull request #511 from derobins/vfd_swmr/thg_standards
Removes Dave Young from the COPYING document
2021-03-24 15:02:33 -07:00
Dana Robinson
a091157a42 Removes Dave Young from the COPYING document
His personal code has been removed.
2021-03-24 14:58:46 -07:00
Dana Robinson
3adde0cc19 Merge pull request #510 from derobins/vfd_swmr/thg_standards
More changes that bring the branch closer to working on Windows
2021-03-24 14:56:32 -07:00
Dana Robinson
ca3721e3d7 Merge remote-tracking branch 'canonical/feature/vfd_swmr' into vfd_swmr/thg_standards 2021-03-23 14:37:51 -07:00
Dana Robinson
13d4ed7e3a Merge pull request #504 from derobins/vfd_swmr/hide_timespeccmp
Protects timespeccmp
2021-03-23 14:36:00 -07:00
Dana Robinson
915e36f1d2 Protects timespeccmp 2021-03-23 14:32:25 -07:00
Songyu Lu
89570ab68e Fixed a few typos. 2021-03-23 11:17:08 -05:00
Dana Robinson
1598238b2f Merge pull request #500 from derobins/vfd_swmr/minor
Fixed MANIFEST
2021-03-22 18:22:21 -07:00
Dana Robinson
d2e5e45e10 Fixed MANIFEST 2021-03-22 18:21:16 -07:00
Dana Robinson
b5302290b7 Merge pull request #499 from derobins/vfd_swmr/missing_dedups
Adds missing dedup callback entries to other VFDs
2021-03-22 17:07:06 -07:00
Dana Robinson
5a5a2dbca8 Adds missing dedup callback entries to other VFDs
NOTE: The mirror VFD and parallel are currently broken
2021-03-22 17:03:40 -07:00
Dana Robinson
1e71b31e8a Fixes H5CX_pop badness 2021-03-22 16:45:12 -07:00
Dana Robinson
e736ca2b69 Adds a dedup callback to the mirror VFD 2021-03-22 15:08:31 -07:00
Songyu Lu
cace7d45ca Adding group number adjustment for vfd_swmr_group_writer.c based on the level of HDF5TestExpress, to speed up the test or do more thorough test. 2021-03-22 16:08:27 -05:00
Dana Robinson
0a9e2fed69 Removes pre-2015 Visual Studio cruft (from develop) 2021-03-22 11:58:45 -07:00
Dana Robinson
904315962c Brings the tcheck_version test changes from develop 2021-03-22 11:50:26 -07:00
Dana Robinson
f695908160 Brings HSYS_GOTO_ERROR changes from develop 2021-03-22 11:45:49 -07:00
Dana Robinson
0d4ed0eb9a Brings accum.c changes from develop 2021-03-22 11:45:32 -07:00
Songyu Lu
35f1b6c3cb Merge branch 'feature/vfd_swmr' of https://github.com/HDFGroup/hdf5 into raylu_group_test2 2021-03-19 18:06:22 -05:00
Songyu Lu
1cc3f187ee Rearranged the test in the following way:
1. Reader waits for a number of ticks (3 by default) before verifying the creation of groups and attributes;
2. Error handling is consistent with traditional setup of the test suite.
2021-03-19 11:25:22 -05:00
vchoi-hdfgroup
f689d5790a Merge pull request #2 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
2021-03-18 12:15:49 -05:00
vchoi-hdfgroup
2a4ec12cb8 Merge pull request #1 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
2021-03-18 12:04:35 -05:00
raylu-hdf
e74ffa9578 Merge pull request #456 from HDFGroup/raylu_group_test
Changing the signal handling to named pipe in the group test for better portablity
2021-03-17 20:50:33 -05:00
Songyu Lu
796018e558 Re-arranged the communication between the writer and reader through named pipes to facilitate possible test improvements in the future. 2021-03-16 20:39:01 -05:00
Songyu Lu
20cbe68958 Adding more comments. 2021-03-15 11:01:25 -05:00
Songyu Lu
923e15b749 Some minor changes. 2021-03-15 10:49:43 -05:00
Songyu Lu
11486e26a2 Changing the signal handling to named pipe for better portablity. 2021-03-10 11:07:21 -06:00
Dana Robinson
f213ff673d Windows cleanup
* A splitter VFD test in vfd.c fails
* Several vfd_swmr.c tests are #ifdef'd around
2021-03-09 19:16:38 -08:00
Dana Robinson
a44ac1af3f Excludes VFD SWMR acceptance tests on Windows
Via #ifdefs, not build system
2021-03-09 17:14:09 -08:00
Dana Robinson
3ba3ce9bfa Converts nanosleep to H5_nanosleep in genall5.c 2021-03-09 16:52:59 -08:00
Dana Robinson
c3825a3a6f Fix brackets on non-POSIX vfd_swmr.c 2021-03-09 16:21:47 -08:00
Dana Robinson
9aa3b40b9e Removes err.h cruft from genall5.c and vfd_swmr_common.c 2021-03-09 16:19:13 -08:00
Dana Robinson
d5b5f022cd Removes an unused variable from vfd_swmr.c 2021-03-09 13:06:37 -08:00
Dana Robinson
9d914b1bb0 Fixes order of magnitude issue in Windows nanosleep equivalent 2021-03-09 12:47:31 -08:00
Dana Robinson
f0c562554f Hides use of clock_gettime() on Windows
timespec_get() is C11 and probably only has about 10 ms resolution. We
may have to revisit this.
2021-03-09 12:44:41 -08:00
Dana Robinson
829432e3fd Rips out unused, unportable "print elapsed time" code in page_buffer.c 2021-03-09 12:42:14 -08:00
Dana Robinson
6d239fc41e Adds DLLVAR macros to allow exporting symbols on Windows 2021-03-09 12:19:04 -08:00
Dana Robinson
79b0aa571d Replaces BSD random functions with ISO 2021-03-09 10:57:48 -08:00
Dana Robinson
b8c5c9f20d Removes libgen.h detection from Autotools and CMake 2021-03-09 06:52:26 -08:00
Dana Robinson
22723e87d8 Replaces basename and dirname with code that will work everywhere 2021-03-09 06:50:13 -08:00
Dana Robinson
d72405e43d Changes to help vfd_swmr.c build on Windows 2021-03-08 14:19:41 -08:00
raylu-hdf
9835edcdad Merge branch 'feature/vfd_swmr' into raylu_zoo_test 2021-03-05 10:05:41 -06:00
songyulu
8e14c386aa Changed the signal handling to named pipes for communication between the writer and reader, mainly in the zoo test as a starting point. 2021-03-05 09:44:36 -06:00
Dana Robinson
84b31b5a55 Merge pull request #416 from derobins/vfd_swmr/thg_standards
Brings VFD SWMR code closer to THG standards and allows C library compilation on Windows
2021-03-04 12:53:35 -08:00
Dana Robinson
ef5a1941f7 Merge remote-tracking branch 'canonical/feature/vfd_swmr' into vfd_swmr/thg_standards 2021-03-04 11:54:43 -08:00
Dana Robinson
7cd0949828 Merge pull request #426 from vchoi-hdfgroup/demo_feature_vfd_swmr
Add the two VFD SWMR demo programs to "examples" directory.
2021-03-04 11:48:41 -08:00
vchoi
b0ce859b2c Add the two VFD SWMR demo programs to "examples" directory.
Provide instructions on compiling and running the demos.
2021-03-04 13:36:39 -06:00
vchoi-hdfgroup
0e61a9abf6 Merge pull request #413 from vchoi-hdfgroup/feature/vfd_swmr
VFD SWMR TestExpress limits on testvfdswmr.sh
2021-03-03 14:20:33 -06:00
Dana Robinson
94694f91a3 Engineers around naked clock_gettime() calls
This is a temporary solution, as not all POSIX platforms will have
clock_gettime(). Further code fixes will be required.

With this change, the main C library should compile on Windows.
2021-03-02 17:22:22 -08:00
Dana Robinson
eb24fbe89c Adds missing private VFD SWMR headers to CMake 2021-03-02 16:49:40 -08:00
Dana Robinson
dea61b33b3 Removed Wnanosleep stub and adds Win32 code to H5_nanosleep() 2021-03-02 16:38:17 -08:00
Dana Robinson
99237a7291 Switch to using H5_nanosleep() instead of HDnanosleep()
* Just in the main library and test/vfd_swmr.c
* VFD SWMR acceptance tests still use HDnanosleep() directly
2021-03-02 16:04:42 -08:00
Dana Robinson
c7518ef299 Fixes a missing declaration for H5_get_win32_times() 2021-03-02 15:19:31 -08:00
Dana Robinson
ae24b82f77 Brings MacOS fixes from main feature branch 2021-03-02 14:30:01 -08:00
vchoi
c18b6eaea8 Add test settings for vfd_swmr_bigset_writer.c based on HDF5TestExpress:
Default, Exhaustive, and quick runs.
2021-03-02 11:59:33 -06:00
Dana Robinson
69b2061d68 HD prefix and hbool_t changes in test/vfd_swmr.c 2021-03-02 06:42:50 -08:00
Dana Robinson
132dd66269 Fixes a bug from when the hlog code was removed 2021-03-02 05:42:17 -08:00
Dana Robinson
0455457cc7 Switch to hbool_t and TRUE/FALSE in library code 2021-03-02 05:20:03 -08:00
Dana Robinson
7d53a8b837 Removed the rest of the hlog code 2021-03-02 04:34:09 -08:00
Dana Robinson
6661b21e9a Stripped hlog code from H5MV.c 2021-03-02 04:07:31 -08:00
Dana Robinson
f1bc0c97a9 Makes libgen.h functions ready for implementation on Windows 2021-03-02 03:22:50 -08:00
Dana Robinson
6639693cff Removed most C library include lines from tests 2021-03-02 02:51:55 -08:00
Dana Robinson
eea7c11b6a Fix unfreed memory after fork in vfd_swmr test
The writer configuration in the vfd_swmr test was not freed in the
child process after a call to fork() causing a memory leak.
2021-03-02 02:39:36 -08:00
Dana Robinson
7b603397c3 Switches memcpy to H5MM_memcpy in H5Fvfd_swmr.c 2021-03-02 02:29:01 -08:00
Dana Robinson
4173c4b0b9 Switches H5FDvfd_swmr.c memory calls to use H5MM 2021-03-02 02:13:31 -08:00
Dana Robinson
cd3011edad H5MF.c cleanup
* Removes hlog code
* Mostly meets THG coding standards now
* Still needs commenting and probably another tidying pass
2021-03-02 01:40:05 -08:00
Dana Robinson
46865e70af Switches H5MF memory calls to use H5MM 2021-03-01 20:32:15 -08:00
Dana Robinson
65bf098ee6 Adds HD prefix to POSIX calls in src 2021-03-01 20:25:33 -08:00
vchoi
d9f44665cd Revert "Add the two VFD SWMR demo programs to the test directory so that they can be built as needed."
This reverts commit f6e7edcedf.
2021-03-01 18:10:07 -06:00
vchoi
f792bdbbc5 Merge remote-tracking branch 'canonical/feature/vfd_swmr' into feature/vfd_swmr 2021-03-01 18:04:33 -06:00
Dana Robinson
3d90a076fb Fixes include guards for a few headers 2021-03-01 14:31:16 -08:00
Dana Robinson
fa87a22f82 Fixes the MANIFEST
Also renames "SWMR Example.png" to SWMR_Example.png since the MANIFEST
doesn't deal with spaces very well.
2021-03-01 14:24:50 -08:00
Dana Robinson
db95737047 Merge pull request #388 from derobins/vfd_swmr/H5FD_public_fix
Moves the BSD queue to a wrapper to keep it out of the public API
2021-03-01 14:06:03 -08:00
Dana Robinson
d7b277a22a Improves autotools and CMake support for sigtimedwait alternative 2021-03-01 13:54:27 -08:00
Dana Robinson
051cf5330b Minor change to H5FDvfd_swmr.h include guard name 2021-03-01 12:47:53 -08:00
Dana Robinson
77f2b0b207 Fixes leading underscores in VFD SWMR include guards 2021-03-01 12:45:20 -08:00
vchoi
f6e7edcedf Add the two VFD SWMR demo programs to the test directory so that they can be built as needed. 2021-02-26 13:54:11 -06:00
Dana Robinson
0e9f9a280a Adds MacOS work-around for sigtimedwait(2) in the VFD SWMR tests 2021-02-26 11:34:53 -08:00
Dana Robinson
0a1444ea78 Adapts H5queue.h to work on MacOS 2021-02-26 11:21:49 -08:00
Dana Robinson
90bfcb9fba Moves H5queue.h to H5private.h and yanks circular queue macros 2021-02-26 10:39:46 -08:00
Dana Robinson
ba5808196e Moves H5queue.h from H5FDpublic.h to H5FD.c 2021-02-26 10:03:54 -08:00
Dana Robinson
8c7b4c7de3 Moves the BSD queue to a wrapper to keep it out of the public API 2021-02-26 03:37:03 -08:00
raylu-hdf
511b940da6 Merge pull request #331 from HDFGroup/raylu_fixed_array
Adding the test case for fixed-array chunked dataset and VDS
2021-02-15 11:31:16 -06:00
songyulu
c20fb7c76d Corrected a typo in the comment. 2021-02-15 11:26:34 -06:00
songyulu
1d6b21a4a1 Added some comments. 2021-02-12 16:21:34 -06:00
songyulu
ddd24e2651 Adding the test case for fixed-array chunked dataset and VDS. 2021-02-12 11:26:39 -06:00
vchoi-hdfgroup
85ae0a2687 Merge pull request #305 from vchoi-hdfgroup/feature/vfd_swmr
(1) Add new routine to configure for VFD SWMR: init_vfd_swmr_config()
2021-02-02 18:11:45 -06:00
vchoi
d8e77f13be (1) Add new routine to configure for VFD SWMR: init_vfd_swmr_config()
(2) Revise routine to setup fapl for VFD SWMR legacy and other integration tests: vfd_swmr_create_fapl()
(3) Update all VFD SWMR integration tests to use the above two routines
(4) Clean up VFD SWMR legacy tests: turn on compression in test script, remove #ifdef OUT H5Fflush(), message file name
2021-02-02 16:01:35 -06:00
Dana Robinson
592f8b738e Merge pull request #35 from derobins/thg/feature/vfd_swmr
Updates CMake files to work with VFD SWMR
2020-10-14 12:18:41 -07:00
Dana Robinson
16fbbfb766 Updates CMake files to work with VFD SWMR
- CMake files were updated to build new files in src and test.

- As with legacy SWMR, the test programs that are run via shell
  scripts are built but not run.

- Updated whitespace in the links_env output file. It's unclear why
  this changed, but CMake does an exact diff on the file whereas
  the autotools do not.
2020-10-14 10:45:53 -07:00
John Mainzer
0698d23269 Merge pull request #2893 in HDFFV/hdf5 from ~MAINZER/vfd_swmr:feature/vfd_swmr to feature/vfd_swmr
* commit '47b1c667c64677d2e28c4128fc027cfdfe60b354':
  More minor edits to users guide.
  Updated users guide for location of alpha 1 release & repaired several typos.
  Added .pdf and .docx versions of the most recent version of the VFD SWMR RFC.  Updates on the RFC are cursory, and mostly in the introduction.  The design section is dated -- added a warning to this effect.
2020-09-21 17:41:09 -05:00
mainzer
47b1c667c6 More minor edits to users guide. 2020-09-21 17:38:18 -05:00
mainzer
2dd0cbe9a7 Updated users guide for location of alpha 1 release & repaired
several typos.
2020-09-21 17:30:06 -05:00
Dana Robinson
35b47b892a Merge pull request #2890 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:feature/vfd_swmr to feature/vfd_swmr
* commit '594b17165effd9ce43bf0b2dd97e0b3df281e69d':
  Removes older VFD SWMR RFC versions
2020-09-21 16:45:01 -05:00
mainzer
3696129c7b Added .pdf and .docx versions of the most recent version of the
VFD SWMR RFC.  Updates on the RFC are cursory, and mostly in the
introduction.  The design section is dated -- added a warning to
this effect.

Reviewed and editied the users guide -- specifically:

   Verified instructions for build and test, and also for demos.
   Removed mention of call to autogen.sh, as that will already be
   run on the friendly user release version.

   Re-worked the introduction to better discribe VFD SWMR, and
   to outline current limitations.

   Changed references to "shadow file" to "metadata file" to match
   field names.

Still need to update pointer to the bit-bucket repository for the
friendly user release.

Also, must verify that the demo code mentioned in the user guide
is publicly available.
2020-09-21 09:01:06 -05:00
David Young
b3cf131855 Merge pull request #2889 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:quiet-zoo to feature/vfd_swmr
* commit 'aebc84053f9a592aac765fbd3b26f2941015d2e5':
  Limit the repeat rate for duplicate zoo warnings to once every five seconds.
  Move below_speed_limit() from vfd_swmr_bigset_writer.c to vfd_swmr_common.c, document it, and fix a bug.
  Document some of the functions in here.  Update the comment at the top of the file.  NFCI.
2020-09-17 17:18:15 -05:00
Dana Robinson
594b17165e Removes older VFD SWMR RFC versions
These are archived in hdf5doc.
2020-09-17 14:49:48 -07:00
David Young
aebc84053f Merge branch 'vswmr-base' into quiet-zoo 2020-09-17 15:31:33 -05:00
David Young
07ad063b4b Limit the repeat rate for duplicate zoo warnings to once every five
seconds.
2020-09-17 15:24:36 -05:00
David Young
8e2053bb3d Move below_speed_limit() from vfd_swmr_bigset_writer.c to
vfd_swmr_common.c, document it, and fix a bug.
2020-09-17 14:35:54 -05:00
David Young
da688311af Document some of the functions in here. Update the comment at the top
of the file.  NFCI.
2020-09-17 14:34:46 -05:00
David Young
43470c8daf Merge branch 'feature/vfd_swmr' into multi 2020-09-14 12:42:33 -05:00
David Young
69f4053692 Move the open issues noted in the outdated VFD_SWMR_Guide.md to
vfd-swmr-user-guide.md and delete VFD_SWMR_Guide.md.
2020-09-14 12:41:27 -05:00
David Young
c96c891d32 Merge branch 'feature/vfd_swmr' into multi 2020-09-14 11:17:11 -05:00
David Young
2b7d87ecbe Add the U. of California copyright notice from src/H5queue.h. 2020-09-14 11:16:31 -05:00
David Young
86ee920e8c Merge branch 'feature/vfd_swmr' into multi 2020-09-14 11:07:55 -05:00
Dana Robinson
a56e5dc7e4 Fixes a leak of the metadata index memory 2020-09-14 10:48:02 -05:00
David Young
de03f876f5 Merge branch 'feature/vfd_swmr' into multi 2020-09-14 10:47:34 -05:00
Dana Robinson
361861da89 Merge pull request #1 in ~DYOUNG/vchoi_fork from ~DEROBINS/hdf5_der:svd_multi_memory_fix to multi
* commit '09981b58d800d784a2aa7e3ea5f7f1cad576e8db':
  Fixes a leak of the metadata index memory
2020-09-08 20:04:06 -05:00
Dana Robinson
09981b58d8 Fixes a leak of the metadata index memory 2020-09-08 14:59:33 -07:00
David Young
1acfef5737 Rewrap lines. 2020-09-03 16:48:33 -05:00
David Young
ff8b70dc0f Merge branch 'feature/vfd_swmr' into multi 2020-09-03 14:58:57 -05:00
David Young
9bb743136e Individually track the steps verified on each dataset. Take care
not to skip a step.
2020-09-03 14:58:15 -05:00
David Young
68643772e3 Mention that creating new objects is not possible with legacy SWMR.
Add abbreviation TBD where we need to add a hyperlink.
2020-09-03 14:58:15 -05:00
David Young
101f040b80 Add Dana's words about MS Windows support. 2020-09-03 14:58:15 -05:00
David Young
a4a969f0fd Give an overview of the bigsets test in a mega-comment at the top. Also,
describe the test pattern.  And while I'm here, repair a comment,
s/writer/reader/.
2020-09-03 14:58:14 -05:00
David Young
f58c2c5cce Merge branch 'feature/vfd_swmr' into multi 2020-09-02 11:08:34 -05:00
David Young
135af42c09 Describe the command-line options for the bigset reader/writer
with a handful of bullets.
2020-09-02 10:50:34 -05:00
David Young
bfc42a18ce Don't pass CFLAGS to the configure script, that's not in the HDF5 configure
idiom and it's just too much detail.

Repair a TBD: mention the vfdswmr@hdfgroup.org address for contacting the VFD
SWMR developers.
2020-09-02 10:06:20 -05:00
David Young
79560265af Merge branch 'feature/vfd_swmr' into multi 2020-08-31 18:56:25 -05:00
David Young
f45bb21979 Write a comment about a bit of overflow-avoidance logic. NFCI. 2020-08-31 17:21:58 -05:00
David Young
599be55d97 Be less specific about Windows support. 2020-08-31 17:01:50 -05:00
David Young
53fe9189e1 Improve/expand the comments on the file->writer assertions. 2020-08-31 15:57:59 -05:00
David Young
aaeb21bdea Delete an unhelpful comment. NFCI. 2020-08-31 15:57:39 -05:00
David Young
918d8894a0 Add some header comments to functions. 2020-08-31 15:56:46 -05:00
David Young
4f833668b0 Rename api_elapsed_nslots to api_elapsed_nbuckets: possibly clarifies
things, possibly does not?  NFCI.
2020-08-31 15:55:20 -05:00
David Young
349ed1418b Document vfd_swmr_pageno_to_mdf_idx_entry() and rename its parameter
nindices -> nentries.
2020-08-31 15:52:48 -05:00
David Young
96c6a7c8d8 Wrap a line in a comment at 80 columns. 2020-08-31 15:52:17 -05:00
David Young
733a02386b Add/improve some struct/member documentation per John's request. 2020-08-31 15:50:31 -05:00
David Young
fd406a654c Document vfd_swmr_writer_may_increase_tick_to() and
vfd_swmr_reader_did_increase_tick_to().  NFCI.
2020-08-31 15:46:47 -05:00
David Young
5756ac4233 Document H5HG_trap(). 2020-08-31 15:46:22 -05:00
David Young
60787f34e7 Delete unused local variable. NFCI. 2020-08-31 15:46:05 -05:00
David Young
aecd29c2ad Use the DECODE macro with the correct signedness for the variable. 2020-08-31 15:43:35 -05:00
David Young
b0e9960460 Merge branch 'feature/vfd_swmr' into multi 2020-08-28 12:51:39 -05:00
David Young
0624ed2e48 Also accept transitions of the superblock status flags to
H5F_SUPER_WRITE_ACCESS|H5F_SUPER_SWMR_WRITE_ACCESS.  This should fix the
problem Dana's seeing on his test VM.
2020-08-28 12:49:40 -05:00
David Young
0c7c4ba490 Fix a typo in a comment. NFCI. 2020-08-28 09:23:46 -05:00
David Young
a9d7f0d2ec Merge branch 'feature/vfd_swmr' into multi 2020-08-25 15:47:07 -05:00
David Young
c97970f7a1 Use the terminology "expected" and "unexpected" errors instead of "soft" and
"hard" errors.
2020-08-25 15:46:34 -05:00
David Young
ea6dd16fbb Describe the behavior of H5FD_vfd_swmr_dedup() in excruciating detail. 2020-08-25 15:46:34 -05:00
David Young
9ee6be22b9 Clarify my descriptions of H5FD_dedup() and H5FD_deduplicate(). 2020-08-25 15:46:34 -05:00
David Young
e1419c872e Do not use first person singular in the SWMR demos section.
In the `vfd_swmr_create_fapl()` dissection, change the /** **/
comments in the literal code to plain markdown paragraphs.

Slightly change wording and markdown elsewhere.
2020-08-25 10:46:36 -05:00
David Young
da4c72a138 Incorporate Mike's changes, fix some of my punctuation and markdown. 2020-08-25 10:23:01 -05:00
David Young
c492036b0d Add the VFD SWMR User's Guide, a work in progress. 2020-08-25 09:22:04 -05:00
David Young
563665c894 Merge branch 'feature/vfd_swmr' into multi 2020-08-21 13:44:27 -05:00
David Young
7af1fa67d6 When the superblock status flags don't meet our expectations, print
the flags and the expectations.
2020-08-21 13:43:41 -05:00
David Young
482ee0765d Apply Dana's fix for production mode builds. 2020-08-21 13:43:08 -05:00
David Young
0bbf92da01 Merge branch 'feature/vfd_swmr' into multi 2020-08-21 09:53:50 -05:00
David Young
c68700769f Avoid potential shadow-file clashes, call the shadow file group-shadow. 2020-08-21 09:53:17 -05:00
David Young
d0f1d9ab7b Call the shadow files bigset-shadow-<number> for some <number>,
to avoid unlikely shadow-file clashes.
2020-08-21 09:52:26 -05:00
David Young
fe4b7110a7 Avoid potential shadow-file clashes, call the file generator-shadow. 2020-08-21 09:51:32 -05:00
David Young
88342f8b3f Use the safe calloc() idiom, p = calloc(1, sizeof(*p)), and do
not gratuitously cast to p's type.
2020-08-21 09:50:49 -05:00
David Young
2fe7d17a76 Avoid potential shadow-file clashes, call the shadow file rw-shadow. 2020-08-21 09:49:44 -05:00
David Young
2f30671e84 Straggler from last: call the shadow file vlstr-shadow. 2020-08-21 09:48:39 -05:00
David Young
24e6e55c56 Avoid shadow file clashes, call the file vlstr-shadow. 2020-08-21 09:48:17 -05:00
David Young
0c741c5997 To avoid potential clashes with other tests, call the shadow file zoo-shadow. 2020-08-21 09:47:14 -05:00
David Young
bcf91a09df Derive the name of the shadow file from the HDF5 file: drop the .h5, add
.shadow.
2020-08-21 09:46:30 -05:00
David Young
2ef65c82a6 Merge branch 'feature/vfd_swmr' into multi 2020-08-20 10:15:49 -05:00
David Young
cd9c80925e Delete disused routine H5FD_has_conflict(). 2020-08-20 10:14:48 -05:00
David Young
1373eec7e5 Merge branch 'feature/vfd_swmr' into multi 2020-08-18 17:43:01 -05:00
David Young
38310e9176 Sleep 1/10s between H5Dopen() tries. Make a couple of warning/error messages
more clear/correct.
2020-08-18 17:42:35 -05:00
David Young
2d1fc21f49 Merge branch 'feature/vfd_swmr' into multi 2020-08-18 12:08:37 -05:00
David Young
a06d6f235d Perform the dataset opens in reverse order to their creation, and if
H5Dopen fails, rapidly retry up to 9,999 times.  Log H5Dopen failures,
but log no more than once every five seconds to avoid spamming the
terminal.

With these changes, it's easier for the reader to open the last dataset
before the writer created it, but the reader recovers instead of
quitting with an error.  It should only be necessary to retry opening
the *last* dataset; all previous datasets should open on one try if the
last is open.
2020-08-18 12:08:05 -05:00
David Young
a51442b8ad Merge branch 'feature/vfd_swmr' into multi 2020-08-17 10:38:01 -05:00
David Young
0619c3dfd8 Fix copy-and-paste error: do not copy the H5T_C_S1 type twice. 2020-08-17 10:36:12 -05:00
David Young
cb1c50dfb1 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-08-05 13:39:40 -05:00
David Young
695bd92140 Fix a regression that crept in with the August merge: use the "swmr" VFD when
that's called for.
2020-08-05 13:37:49 -05:00
David Young
9bdd3878e7 Merge branch 'aug-merge-attempt/feature/vfd_swmr' into aug-merge-attempt/may-merge-mainzer-to-mine 2020-08-04 12:38:25 -05:00
David Young
dc97b9a165 Merge branch 'aug-develop' into aug-merge-attempt/feature/vfd_swmr 2020-08-04 10:22:47 -05:00
David Young
f28c92bb36 Merge branch 'may-develop' into may-merge-head/feature/vfd_swmr 2020-08-04 10:03:49 -05:00
David Young
e5f061d5a4 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-08-03 16:24:31 -05:00
David Young
316aa34bac Make tests pass on both of my branches, like they ought to: in the tests that
call H5F__vfd_swmr_writer_md_test(), actually sleep for more than `max_lag`
ticks so that the deferred-frees queue is actually flushed before we force new
items onto the queue and count them.

In H5F__vfd_swmr_writer_md_test(), check that the number of deferred
shadow-space frees is *precisely* the number `nshadow_defrees`, since that
seems to be what the tests that call this routine intend.
2020-08-03 15:00:25 -05:00
David Young
6500ea09a0 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-08-03 11:13:06 -05:00
David Young
20a6b82597 In VFD SWMR, use H5F_shared_t instead of H5F_t wherever that is possible. 2020-08-03 11:11:23 -05:00
David Young
b9888cceff The second argument to H5MV__sect_shrink() has to be an actual H5F_t *, not
NULL, so pass an actual H5F_t *.  Bug found by code inspection.
2020-08-03 11:06:14 -05:00
David Young
88e8b4fd7d Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-31 16:15:25 -05:00
David Young
d01bcf6667 Perform virtual dataset tests with multiple source files, too. 2020-07-31 16:14:10 -05:00
David Young
6caa0c5ac5 Let us use virtual datasets with multiple source files that are open with VFD
SWMR mode: pass H5P_FILE_ACCESS_ANY_VFD so that the discrepancy between VFD
SWMR file-access properties and default file-access properties is ignored.
2020-07-31 16:12:27 -05:00
David Young
7321d0e813 Improve code readability: extract common subexpressions into temporary
variables.
2020-07-30 17:21:24 -05:00
David Young
a8cbf2579d In test_reader_md_concur(), the child has to exit(3), not FAIL_STACK_ERROR, on
error.
2020-07-30 17:01:16 -05:00
David Young
bf004fcba8 Bug fixes: don't double-close a FAPL ID. Always close a file ID. 2020-07-30 17:00:38 -05:00
David Young
92887cad1c Update an out-of-date comment. 2020-07-30 16:58:37 -05:00
David Young
b6b92aff09 Remove superfluous casts from void * to another pointer type prior to
assignment. Use a safer sizeof(array element) idiom.  NFCI.
2020-07-30 16:56:20 -05:00
David Young
2a64d2fe93 Change H5F_open to perform deduplication of open VFDs in a more flexible way,
using the new routine H5FDdeduplicate().

Simplify H5F_open() a bit, pushing some of the configuration checks into the
SMWR VFD.  For example, check that page buffering is enabled in
H5FD_vfd_swmr_open() instead of in H5F_open().  Compare VFD SWMR configurations
in H5FD_vfd_swmr_dedup() instead of in H5F_open().

Clone the default file-access property list at a new file-access property list
ID, H5P_FILE_ACCESS_ANY_VFD.  The new ID is used to indicate that if the file
that's being opened is already open under an existing virtual file, and if that
virtual file would not ordinarily be opened with the default FAPL, then it's ok
to use that virtual file.

Add a new optional method, `dedup`, to H5FD_class_t, and use it to customize a
VFD's deduplication.

Customize the SWMR VFD's deduplication.  Make it honor H5P_FILE_ACCESS_ANY_VFD
Embed the VFD SWMR configuration in the H5FD_vfd_swmr_t to facilitate
comparison of configuration between new and old SWMR virtual files.

In H5F__sfile_search(), match using a pointer comparison instead of H5FD_cmp(),
because we will only ever enter H5F__sfile_search() with a deduplicated
H5FD_t *.
2020-07-30 16:53:01 -05:00
David Young
0b189968ff Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-28 09:41:09 -05:00
David Young
5632094d5c Initialize refresh member. 2020-07-28 09:40:35 -05:00
David Young
0cb028b717 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-28 09:20:28 -05:00
David Young
d93bc843aa Promote more warnings to errors. 2020-07-28 09:14:12 -05:00
David Young
0fd4a7f5e1 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-21 11:25:28 -05:00
David Young
04e775b127 Straggler from last: update declaration of vfd_swmr_create_fapl(). 2020-07-21 11:15:44 -05:00
David Young
78bd491aad Add to the "bigset" writer a -M command-line option that enables the use of
multiple files with virtual datasets.

Add to vfd_swmr_create_fapl() printf(3)-like arguments for setting the shadow
filename.  Update all callers.
2020-07-21 11:13:05 -05:00
David Young
a9fefff620 Add evsnprintf for printing a va_list to a buffer or aborting the program on
an overflow or other error.
2020-07-21 10:18:43 -05:00
David Young
6e3ad3213d Delete superfluous comments that interpret obvious program syntax/semantics. 2020-07-21 10:15:56 -05:00
David Young
0ae43ff6cd Mention an improvement asked for by ITER. 2020-07-21 10:04:49 -05:00
David Young
43cec81db6 Only count metadata reads/writes on the page buffer. Neaten the count logs. 2020-07-21 10:01:12 -05:00
David Young
c66f7d5b65 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-15 16:47:07 -05:00
David Young
c9d8f3e4f1 Log the number of page-buffer accesses at various multiples of the page size
with log outlet `pb_access_sizes`.
2020-07-15 16:44:52 -05:00
David Young
be0b2f132d Perform the few_big and many_small tests with and without VDS enabled. 2020-07-15 16:43:48 -05:00
David Young
91a7258dbf Don't perform EOT processing on the same H5F_shared_t more than once if it has
multiple referring H5F_t on the EOT queue.  This stops the VFD SWMR writer from
advancing the shadow file's tick number too fast when we're using virtual
datasets (VDS) with VFD SWMR.
2020-07-15 16:28:52 -05:00
David Young
767afc60be Update comment. 2020-07-15 16:26:52 -05:00
David Young
0e9f3038d2 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-14 15:13:45 -05:00
David Young
a0be3626c8 Delete whitespace at EOL. NFCI. 2020-07-14 15:13:20 -05:00
David Young
814b428b2a When H5FD_vfd_swmr_read() reads a page from the shadow file whose checksum
fails, re-load the shadow-file header and log the last-read and current tick
number.
2020-07-14 15:10:30 -05:00
David Young
2056e23fc9 Avoid some casts, change some parameters from H5FD_t to H5FD_vfd_swmr_t when
that's what both the callers and callees expect.  NFCI.
2020-07-14 15:09:18 -05:00
David Young
c3120ac3da Delete some dead code. 2020-07-14 15:06:02 -05:00
David Young
5c9d2724be Add some new diagnostic logging. 2020-07-14 15:04:37 -05:00
David Young
3d89d6ca4e Suppress the error-stack printouts while attempting to open and read an
attribute: failures are expected.
2020-07-14 15:02:49 -05:00
David Young
30a62d1380 Don't check an unsigned integer for being negative. Quiets a GCC warning. 2020-07-14 15:01:50 -05:00
David Young
7840f5f3b5 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-14 09:06:43 -05:00
David Young
63c7ec2496 Bug fix: avoid leaking memory and other resources, perform the reader-only
close activities under the correct condition!  Extract the reader-only open and
close code into helper routines.
2020-07-14 09:00:44 -05:00
David Young
f7fab27b25 If the function-enter macro fails, return FAIL. Now the compiler can see that
if H5FD__vfd_swmr_header_deserialize() succeeds, then the header that was
passed in was actually initialized.  This squashes a used-before-initialized
warning from GCC.
2020-07-14 08:58:11 -05:00
David Young
12e5f29e48 Take care to initialize the metadata file descriptor to -1 so that we don't try
to close descriptor 0, later.
2020-07-14 08:56:32 -05:00
David Young
323380e6b9 If a group's attribute isn't present, that's ok. Retry. 2020-07-14 08:55:26 -05:00
David Young
8593cd2d93 Close attribute after use. 2020-07-14 08:54:56 -05:00
David Young
fefc6cf885 Delete dead code. NFCI. 2020-07-14 08:54:44 -05:00
David Young
326b98fd08 Delete whitespace at EOL. Join consecutive line. NFCI. 2020-07-13 10:09:40 -05:00
David Young
62240b1a55 Delete whitespace at EOL. 2020-07-13 10:03:12 -05:00
David Young
0e1b6bfcef Fix a copy-pasto in an error message. 2020-07-10 16:18:39 -05:00
David Young
a2308ffd2c Move the dapl initialization to state_init and, if VDS is enabled,
set the virtual view to "first missing."
2020-07-10 16:17:51 -05:00
David Young
2882736643 Delete unused local variables. Delete an empty line. NFCI. 2020-07-10 16:16:40 -05:00
David Young
0c98fe96e5 Don't leak a fapl on error. 2020-07-10 16:16:01 -05:00
David Young
09b17b6563 Remove gratuitous local variable initialization: it's better to let the
compiler detect use-before-initialization.  Use the safer `memset(p, ...,
sizeof(*p))` idiom.
2020-07-10 16:12:05 -05:00
David Young
98f441a606 Add a new log outlet and some log statements for EOT queue manipulation. 2020-07-10 16:10:41 -05:00
David Young
8aeba09f55 Straggler from previous: bsdqueue.h -> H5queue.h 2020-07-10 16:09:37 -05:00
David Young
847d22244a Change some H5F_t uses to H5F_shared_t uses: gradually we will rid VFD SWMR of
H5F_t.
2020-07-10 16:06:22 -05:00
David Young
9907d5fdcd Be brief: remove gratuitous cast of _xfree(). Use reference to member pub
instead of cast to H5FD_t *.
2020-07-10 16:04:19 -05:00
David Young
3553c7617d Make a VFD SWMR writer use the SWMR VFD, to facilitate avoiding conflicting
multiple opens of the same file with VFD SWMR---i.e., twice for writing, or for
reading and for writing.  In the long run, this will help me encapsulate more
of the SWMR functionality in the VFD, too.
2020-07-10 16:00:09 -05:00
David Young
03cdbe9376 Straggler from previous commit: when closing the VFD SWMR virtual file, clear
the lower virtual file's `exc_owner` field.  While I'm here, remove a
gratuitous assertion.

This is part of a changeset that helps us avoid creating multiple H5F_shared_t
for one file when virtual datasets are used with VFD SWMR.  The old code for
deduplicating VFD SWMR H5F_shared_t instances did not work correctly with VFD
SWMR, so we'd end up with multiple H5F_shared_t all active on the same file.
2020-07-10 15:23:38 -05:00
David Young
b030664aaa Delete gratuitous comment and initialization from a variable declaration. 2020-07-10 15:16:25 -05:00
David Young
2e66b5cf86 Add all extant virtual files to a list. Add an "exclusive owner" (exc_owner)
member to all virtual files.  Add a routine, H5FD_has_conflict(), that returns
true if a new virtual file is identical to an existing virtual file that has an
exclusive owner.  Establish an exclusive owner for a VFD SWMR virtual file's
lower virtual file.

Rename bsdqueue.h to H5queue.h and install it, since it's used by H5FDpublic.h.

This is part of a changeset that helps us avoid creating multiple H5F_shared_t
for one file when virtual datasets are used with VFD SWMR.  The old code for
deduplicating VFD SWMR H5F_shared_t instances did not work correctly with VFD
SWMR, so we'd end up with multiple H5F_shared_t all active on the same file.
2020-07-10 15:09:29 -05:00
David Young
5e0c814296 Fix a bug where I was trying to store ndatasets * 4 source-dataset
handles in 4 variables and, of course, failing.  Refactor the
dataspace/dataset initialization.
2020-07-07 12:57:39 -05:00
David Young
6ff70c9e03 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-07-07 12:57:39 -05:00
David Young
5493f4faac Fix a bug where I was trying to store ndatasets * 4 source-dataset
handles in 4 variables and, of course, failing.  Refactor the
dataspace/dataset initialization.
2020-07-07 12:56:03 -05:00
David Young
b9c2b8faff 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-07-07 12:52:00 -05:00
David Young
f2305cfc67 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-07-02 14:57:06 -05:00
David Young
5cb598fb11 Use native byte order unless big-endian is specified with -b option. 2020-07-02 14:56:18 -05:00
David Young
49bb232d6f Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-30 15:13:52 -05:00
David Young
6274081bdd Add a VDS mode to the bigset test. 2020-06-30 15:13:15 -05:00
David Young
92cf20e865 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-26 16:43:43 -05:00
David Young
c6250072da Gather a couple of assertions. 2020-06-26 16:43:13 -05:00
David Young
26d5a950e8 Create one dataset creation property list and one file dataspace and
share them across all datasets/iterations.  Extract common code into
state_destroy().
2020-06-26 16:41:38 -05:00
David Young
ef699d8880 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-26 14:36:28 -05:00
David Young
bf4fca57f7 When extending the dataset in one dimension, add columns instead of rows
so that it's possible to produce a virtual dataset (VDS) variant of the
test.
2020-06-26 14:35:10 -05:00
vchoi
9f48f4e266 (1) Add public routines H5Fvfd_swmr_end_tick, H5Fvfd_swmr_disable_end_of_tick, H5Fvfd_swmr_enable_end_of_tick().
(2) Tests for the above APIs.
2020-06-26 14:18:19 -05:00
vchoi
7d50012a40 (1) Add public routines H5Fvfd_swmr_end_tick, H5Fvfd_swmr_disable_end_of_tick, H5Fvfd_swmr_enable_end_of_tick().
(2) Tests for the above APIs.
2020-06-24 10:58:22 -05:00
David Young
5449b2af49 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-22 16:14:39 -05:00
David Young
d98d6746e0 Add/check a group attribute every so many steps. delete some dead code, and
set a non-zero default for the number of steps.
2020-06-22 16:12:41 -05:00
David Young
99245b55f3 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-19 17:04:33 -05:00
David Young
efd1c0a305 Extract common subexpressions into oent and nent for brevity.
Assert index entries are in sorted order earlier in the loop over
old and new indices.

When looping over the remaining new index entries, just do
`entries_added++` to match the other loops.

In the final log entry in H5F_vfd_swmr_reader_end_of_tick(), mention
whether the call will exit with success or failure.
2020-06-19 17:00:26 -05:00
David Young
2b1df16925 Make H5Drefresh() copy non-persistent properties---e.g., dataset access
property lists---from the closed dataset to the reopened dataset.  Now my
chunk-cache settings appear to survive H5Drefresh() calls.
2020-06-19 16:38:01 -05:00
David Young
bd87af0408 Create a dataset access property list (dapl) that disables the chunk cache and
apply it individually to each dataset instead of setting the chunk-cache
parameters on the file.  Alas, it didn't make any difference, but I'll keep the
change.
2020-06-19 16:34:53 -05:00
David Young
64cedaa228 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-17 10:24:16 -05:00
David Young
afd49812d5 On each SWMR VFD open for reading, keep a histogram for the number of
ticks elapsed during API calls.  Write the histogram to the swmr_stats
log outlet when the SWMR VFD closes.
2020-06-16 17:09:09 -05:00
David Young
a5afe927e1 Rename H5F__vfd_swmr_writer__create_index to H5F__vfd_swmr_create_index.
H5F_vfd_swmr_reader_end_of_tick: delete superfluous assertions and
extract a com mon subexpression into a H5FD_t * variable.

Carry on with HGOTO_ERROR() cleanup.  Delete superfluous parentheses to
reduce visual clutter.  Delete superfluous casts.  Delete out-of-date
comment: the index size is not fixed any longer.
2020-06-16 17:05:29 -05:00
David Young
8810656911 Delete superfluous casts. Remove superfluous backslashes and
statement-ify, changing

    HGOTO_ERROR(..., \
             )

to

    HGOTO_ERROR(...,
             );

Remove blank lines between if-clause and HGOTO_ERROR.  Add some curly
braces to if-statements where that clarifies things.

NFCI.
2020-06-16 16:58:30 -05:00
David Young
cb18697b3b Close all of the datasets we opened. 2020-06-16 16:53:15 -05:00
David Young
3fa6b2e09f Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-12 11:26:45 -05:00
David Young
625ef85fe5 Avoid leaving a v1 B-tree used as a chunk index in a bad state
that makes assertions fail.

Add an optional `close` method to the `H5D_chunk_ops_t`, and use that to
release "holds" on metadata cache (MDC) entries.

For extensible arrays and v2 B-trees, use the existing `dest`(roy)
method to implement `close`.  For v1 B-trees and other chunk indices,
don't provide `close`: we cannot safely close the v1 B-tree index, and
the other indices don't have a meaningful presence in the MDC.

Revert my first attempt at making v1 B-tree chunk indices closeable
with `dest`.

Put my comment about the stopgap fix for VFD SWMR at the right place
in src/H5Dchunk.c.
2020-06-12 11:24:27 -05:00
David Young
749a718c23 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-11 17:42:04 -05:00
David Young
ff43cd3631 Activate tests few_big and many_small, now that they pass. 2020-06-11 17:40:10 -05:00
David Young
8505c1262c Always restart H5C_evict_or_refresh_all_entries_in_page()'s scan of
the entries in a hash bucket after evicting tagged entries.  Evicting
tagged entries can can affect both entries before and after the current
entry in the bucket's linked list, so we cannot be sure that either
`entry_ptr` or `follow_ptr` is valid.

This stops the assertion (entry_ptr->page != page) ||
(entry_ptr->refreshed_in_tick == tick) from failing in the test
`testvfdswmr.sh many_small`.
2020-06-11 17:37:51 -05:00
David Young
b5d304acf6 Extract a subroutine that closes chunk indices,
H5D__chunk_index_close(), and call it in H5D__chunk_read() after reading
a chunked dataset.  In this way, indices based on extensible arrays and
v2 B-trees do not leave pinned/tagged entries in the metadata cache that
we cannot evict/refresh when we load changes from the shadow file.

Make some changes to the v1 B-tree code that set the pointer to the
closed B-tree to NULL and, further, tolerate a NULL pointer where
previously that was impossible.
2020-06-11 17:02:22 -05:00
David Young
ff8f7e6da4 Limit every chunk cache to 1 slot and 1kB so that the test doesn't run
my dinky development server out of memory.
2020-06-11 16:24:30 -05:00
David Young
56bc1ea535 Make the test more challenging: on every other step, read a chunk-sized
region offset by 1 unit from a chunk boundary.
2020-06-11 16:23:09 -05:00
David Young
57fde42f7d Wrap a line. NFCI. 2020-06-11 16:21:52 -05:00
David Young
5cde36e2cd Delete code that has no effect: don't empty a mask set only to fill it
in the next expression.
2020-06-11 16:20:46 -05:00
David Young
f8a26a86c6 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-08 17:48:36 -05:00
David Young
4351ad6c4e Only remove shadow-index entries in H5PB__evict_entry() if we're a
VFD SWMR writer, so that the reader does not lose track of the real
shadow-index content.
2020-06-08 17:47:17 -05:00
David Young
05dafca8e0 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-06-03 15:25:03 -05:00
David Young
052257ec62 Delete unused variables and struct members. 2020-06-03 15:24:15 -05:00
David Young
8e8cece303 Be concise and more obviously correct, and knock many line widths
below than 80 columns: use the malloc idiom,

```
type *p;

p = malloc(sizeof(*p));
```

instead of

```
type *p;

p = (type *)malloc(sizeof(type));
```

Make a similar change to some `memset` calls.  NFCI.
2020-06-03 15:21:54 -05:00
David Young
1f488a60e6 If we're processing the EOT queue when we *enter* a function, use
HGOTO_ERROR() instead of HDONE_ERROR() so that we jump to the `done`
label right away.  This ought to fix the problem Vailin was seeing,
where the library left H5F_vfd_swmr_reader_end_of_tick() prematurely for
seemingly no reason.
2020-06-03 15:18:29 -05:00
David Young
5a3f7830db Improve debug output: when the lower file's shadow file image moves,
tell old and new shadow file offset.
2020-06-03 15:17:05 -05:00
David Young
01cf824faa Add a label, addr, to an HDF5 file address in debug output. 2020-06-03 15:16:13 -05:00
David Young
44c114017e Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-05-29 12:46:50 -05:00
David Young
6e23b5d263 In H5FD_vfd_swmr_read(), log on outlet swmr_read whether the read is
satisfied from the lower file or the shadow file.
2020-05-29 12:46:04 -05:00
David Young
7bfba8aa39 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-05-28 15:49:12 -05:00
David Young
7ecf5d5466 Perform a test where a writer creates 10,000 groups while a reader waits for
each to appear.

Add but do not yet perform tests on many small extensible datasets and a few
big extensible datasets.  Vailin is working on a bug that causes both tests to
fail virtually always.
2020-05-28 15:36:39 -05:00
David Young
5c534e41b6 If there were hard errors, report any soft errors, too. 2020-05-28 15:36:21 -05:00
David Young
1410aa21a0 Straggler from previous: don't count errors *and* exit, just count. 2020-05-28 15:35:42 -05:00
David Young
47890e826f A zoo error is not a soft error. Count it as a hard error instead of a soft
error.
2020-05-28 15:34:31 -05:00
David Young
91d388a41c Don't count up errors *and* exit right away when there is an error. Just
count.
2020-05-28 15:33:41 -05:00
David Young
cb73324ce5 Disable the error-stack printing around the H5Gopen() call that we know will
sometimes fail.
2020-05-28 15:31:51 -05:00
David Young
a9ad156810 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-05-27 10:48:53 -05:00
David Young
f8d469ca38 Add a test writer that creates groups under the root and a reader that polls
until all of the expected groups appear.
2020-05-27 10:47:04 -05:00
David Young
56fd83f66a Delete unused state_t members. NFCI. 2020-05-27 10:31:02 -05:00
David Young
6759aaa012 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-05-26 16:32:10 -05:00
David Young
1280b34b7f Join some lines. NFCI. 2020-05-26 16:31:29 -05:00
David Young
38e959b2f2 Add -a steps option and if steps != 0, then add (or verify) an attribute on
each dataset every `steps` steps.

Update usage message.

Add a cast to `time_t` to quiet a compiler warning.

Replace two occurrences of a debug statement in `verify_extensible_dset()` with
one occurrence in `verify_chunk()`.

Replace the anonymous constant `2` with `hang_back` and increase `hang_back` to
3.  XXX Now that I've fixed a bug, reduce `hang_back` to 2, again.

Verify datasets in the reverse of the order they are written so that we spend
less time re-verifying datasets written in the same step.
2020-05-26 16:30:46 -05:00
David Young
cd0eaf6271 Cast a non-negative int to size_t before comparing with size_t so that
the compiler believes we know what we're doing and does not warn.
2020-05-26 15:48:17 -05:00
David Young
132f0f6ce2 We don't write through the metadata accumulator any more. We only write
through the lower VFD.  Update error message to match.
2020-05-26 15:46:47 -05:00
David Young
e917d66df6 Merge branch 'feature/vfd_swmr' into may-merge-mainzer-to-mine 2020-05-26 13:14:20 -05:00
David Young
d46b2c5afb When a checksum fails, indicate the address and size of the affected metadata. 2020-05-26 13:11:33 -05:00
David Young
cc58a22b37 Reduce differences with may-merge-mainzer-to-mine. 2020-05-26 13:10:39 -05:00
David Young
cc28a6c67a On the VFD SWMR branches, treat warnings as errors. 2020-05-26 13:09:09 -05:00
David Young
a6d88e2b81 When the new index is bigger than the old, invalidate all of the pages affected
by the added entries.  This fixes a bug in the vfd_swmr_bigset_writer/_reader
test, where the reader would read metadata with a bad checksum.  This may also
fix an error that Vailin is seeing.
2020-05-26 13:06:06 -05:00
David Young
eeda47bcf6 Reduce differences with pre-rebase state. 2020-05-21 09:55:56 -05:00
mainzer
18dab4e576 Modified page buffer to split entries only where necessary -- specifically
when handling an I/O request on a metadata entry that has been sub-allocated
from a larger file space allocation (i.e. fixed and extensible array), and
that crosses at least one page boundary.  .

This required modifying the metadata cache to provide the type of the
metadata cache entry in the current I/O request.  For now, this is done
with a function call.  Once we are sure this works, it may be appropriate
to convert this to a macro, or to add a flags parameter to the H5F block
read/write calls.

Also updated the metadata cache to report whether a read request is
speculative -- again via a function call.  This allowed me to remove
the last address static variable in the H5PB_read() call, which is
necessary to support multiple files opened in VFD SWMR mode.

Also re-wrote the H5PB_remove_entries() call to handle release
of large metadata file space allocations that have been sub-allocated
into multiple metadata entries.  Also modified the call to
H5PB_remove_entries() in H5MF__xfree_impl() to invoke it whenever
the page buffer is enabled and the size of the space to be freed is
of page size or larger.

Tested serial / debug on charis and Jelly.

Found a bug in H5MF_xfree_impl(), in which the call to H5PB_remove_entries()
is skipped due to HGOTO_DONE calls earlier in the function.  While the
obvious action is to move the call earlier in the function, best to
consult with Vailin first, as there is much going on and it would be
best to avoid making the situation worse.  If nothing else, there are
some error management issues.
2020-05-21 09:51:39 -05:00
David Young
d5ad503cfe and vfd_swmr_reader_did_increase_tick_to declarations. 2020-05-20 12:06:58 -05:00
David Young
168858b9a1 Rebase repair: do not list any VFD SWMR source files twice. 2020-05-20 12:06:33 -05:00
David Young
abced7dc4e Rebase repair: add stubs.c back to the test library sources. 2020-05-20 12:06:00 -05:00
David Young
b5ec806496 Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
0750c5bded Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
cf4d51f2d3 Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
9eb33fe812 Reduce diffs with develop, where H5C_move_entry takes an H5C_t *
argument, first, not `H5F_t *`.
2020-05-20 09:37:22 -05:00
David Young
95c57f07bc Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
dcb9aa4518 Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
b4492dba50 Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
7f0d3f431e Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
eae6bb5efd Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
19a6976899 Make sure to initialize vfd_info.fname. 2020-05-20 09:37:22 -05:00
David Young
dd31948823 Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
c54c92bf13 Use new style of error reporting. 2020-05-20 09:37:21 -05:00
David Young
f8096dcea3 Use H5_ATTR_NDEBUG_UNUSED instead of H5_ATTR_SANITY_CHECK. 2020-05-20 09:37:21 -05:00
David Young
e083b2834e Be sure to fill the fname field in vfd_info. 2020-05-20 09:37:21 -05:00
David Young
975fc23fb4 Use the write name for the VFD index, SWMR_IDX -> SWMR_VFD_IDX. 2020-05-20 09:37:21 -05:00
David Young
25585400e6 Repair a bunch of H5_ATTR_SANITY_CHECK uses that should have been
H5_ATTR_NDEBUG_UNUSED.  This really makes me wonder what else I have
screwed up in this merge....
2020-05-20 09:37:21 -05:00
David Young
3de98efff8 Fix tools compilation. 2020-05-20 09:37:20 -05:00
David Young
d91b9f9b0a Fix compilation: use H5Oget_info() instead of specifying the version
(H5O_getinfo2).
2020-05-20 09:37:20 -05:00
David Young
0103e8f1e0 Move declarations before statements, ugh. 2020-05-20 09:37:20 -05:00
Dana Robinson
13bbc96261 Replaced a few calls to HDmemcpy with H5MM_memcpy, which does overlap
checking.
2020-05-20 09:37:20 -05:00
Dana Robinson
29fca624e5 Misc warning fixes. 2020-05-20 09:37:20 -05:00
Dana Robinson
ef51913e29 Removed HDgets macros since gets was deprecated in C99 and removed
in C11 (gets() is not used in our repo).
2020-05-20 09:37:20 -05:00
Allen Byrne
a809ab0285 Comment out pull-request action and enable fail fast 2020-05-20 09:37:20 -05:00
Allen Byrne
ca0df1b87e Correct filename 2020-05-20 09:37:20 -05:00
Allen Byrne
c04878cbf2 Change to use alias 2020-05-20 09:37:20 -05:00
Allen Byrne
981ff81e37 Fix name setting 2020-05-20 09:37:20 -05:00
Allen Byrne
71a0b376d1 OESS-65 fix packaging config files 2020-05-20 09:37:20 -05:00
Allen Byrne
60f84d1b85 Correct path 2020-05-20 09:37:20 -05:00
Allen Byrne
2a7df0f50c Correct step name 2020-05-20 09:37:20 -05:00
Allen Byrne
2d07dba725 Correct test 2020-05-20 09:37:20 -05:00
Allen Byrne
a8a31334a1 Add github actions 2020-05-20 09:37:20 -05:00
Quincey Koziol
a96e6246d0 Align contents of CMake and autotools testfile cleanup lists. 2020-05-20 09:37:20 -05:00
Quincey Koziol
4ad7dca124 Avoid allocating a chunk index for datasets with 0-sized dimensions, until
the dataset is extended.
2020-05-20 09:37:20 -05:00
Dana Robinson
7fa219e204 Protected H5Oset_comment() in h5dump test generator.
(Assumes environment variable overrides default VOL connector)
2020-05-20 09:37:20 -05:00
Quincey Koziol
82e3368f78 Range check # of 'extra' command-line parameters against array size. 2020-05-20 09:37:20 -05:00
Quincey Koziol
2eec9f839b Refactor "extra" command-line arguments, and clean up code so the tool doesn't
assert when exiting.
2020-05-20 09:37:20 -05:00
Quincey Koziol
828504f46a Extend h5debug to support 3-D datasets for chunks. 2020-05-20 09:37:20 -05:00
Jordan Henderson
3454833bf7 Fix memory error in h5dump xml 'escape the string' routine 2020-05-20 09:37:20 -05:00
Dana Robinson
aa30bd054d Fixed pio_perf const pointers. 2020-05-20 09:37:20 -05:00
Dana Robinson
6eebd57742 Further updates to the tools warnings fixes from code review. 2020-05-20 09:37:20 -05:00
Dana Robinson
e0d954f845 Updates to tools warning PR from code review. 2020-05-20 09:37:20 -05:00
Dana Robinson
3efed9c111 Fixes for warnings in the tools code. 2020-05-20 09:37:20 -05:00
Dana Robinson
97431e256b Moved -Woverlength-strings to the developer flags. 2020-05-20 09:37:19 -05:00
Allen Byrne
d90b2ae7e2 Add "override with" to error message 2020-05-20 09:37:19 -05:00
Allen Byrne
6e84122833 HDFFV-10576 add Option name to Error Message 2020-05-20 09:37:19 -05:00
Allen Byrne
5383152d67 Restrict errors to gcc 4.8 and above. 2020-05-20 09:37:19 -05:00
David Young
1cff43a935 For compatibility with non-C99 Visual Studio versions, use "%" PRIuMAX
instead of "%ju".
2020-05-20 09:37:19 -05:00
David Young
0f2bc7d918 Fix `test/swmr_sparse_reader.c:118:77: error: cast from pointer
to integer of different size [-Werror=pointer-to-int-cast]` and
`test/snapshots-hdf5/current/test/swmr_sparse_reader.c:129:100:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]`.
2020-05-20 09:37:19 -05:00
David Young
c506a1f435 Fix `src/H5FDdirect.c:1346:5: error: ISO C90 forbids mixed declarations
and code [-Werror=declaration-after-statement]`.
2020-05-20 09:37:19 -05:00
Allen Byrne
b5481fac24 Fix NoFilter build 2020-05-20 09:37:19 -05:00
Allen Byrne
117ead60a3 TRILAB-244 separate CXX warnings and errors from C 2020-05-20 09:37:19 -05:00
Larry Knox
68e1561d87 Add missing ')'. 2020-05-20 09:37:19 -05:00
Larry Knox
8767748f87 Add C++ warnings treated as error for autotools builds. 2020-05-20 09:37:19 -05:00
Larry Knox
7fd40ef81e Move macro ADD_H5_CFLAGS to cmake_ext_mod/HDFMacros.cmake and remove
duplicate versions.
2020-05-20 09:37:19 -05:00
Larry Knox
38abd125c1 Address PR suggestions and add overlooked GCC compiler version flags. 2020-05-20 09:37:19 -05:00
Larry Knox
76af1a4b5f Don't add general warnings flags for unsupported old versions of gcc and
g++ (older than gcc/g++ 4.2).
Correct gnu-cxxflags to determine warnings flags to be added based on
C++ compiler version instead of C compiler version.
2020-05-20 09:37:19 -05:00
Allen Byrne
9b21908223 Remove old szip line 2020-05-20 09:37:19 -05:00
Dana Robinson
2f5d6bac34 Fixed h5diff command-line parameters to use 1 and 2 instead of src
and dst.
2020-05-20 09:37:19 -05:00
Dana Robinson
957e4eba9c Added VOL command-line options to (p)h5diff, h5ls, h5dump, and h5mkgrp. 2020-05-20 09:37:19 -05:00
Allen Byrne
7381bea1e8 OESS-65 add option to use AEC library in place of SZip 2020-05-20 09:37:19 -05:00
Dana Robinson
ce4be694e8 Separated VFD and VOL parameters in tools. 2020-05-20 09:37:19 -05:00
Quincey Koziol
d35daa45e9 Trim trailing whitespace 2020-05-20 09:37:19 -05:00
Dana Robinson
071fe1dc39 Fixed some minor cmp callback bugs and cleaned warnings. 2020-05-20 09:35:18 -05:00
Dana Robinson
58dfaafcce Fixed problems with S3 and HDFS VFDs.
* Updated info struct parameter to correct info_string
* Fixed Makefile.am where the S3 VFD was listed twice, causing
  duplicated symbols errors.
2020-05-20 09:35:18 -05:00
Dana Robinson
6609048ecf Update h5repack long arguments for id-->value changes. 2020-05-20 09:34:20 -05:00
Dana Robinson
755971029c Changed identifiers and command-line options from "id" to "value" in tools
code to be in agreement with H5VL API terminology.
2020-05-20 09:34:20 -05:00
Allen Byrne
aea3232b32 TRILAB-192 version of std=f2008 special check 2020-05-20 09:34:20 -05:00
Allen Byrne
21de7f2818 Fix shadowed type 2020-05-20 09:34:20 -05:00
Allen Byrne
8521689caa TRILAB-192 - cleanup edits and match CMake CXX to autotools 2020-05-20 09:34:20 -05:00
Jacob Smith
094effdf0d Add enable-mirror-vfd flag to configure options. 2020-05-20 09:34:20 -05:00
Jacob Smith
a3f6f24c82 Tidying of Mirror VFD.
* Rename server-stop utility to mirror_server_stop.
* Remove external dependency on bzero().
* Modify test/use_common to use only the public API.
* Rename internal bitswap macro to follow convention.
2020-05-20 09:34:20 -05:00
Jacob Smith
3bc8877513 Add function header comment for mirror_writer:run_writer(). 2020-05-20 09:34:20 -05:00
Jacob Smith
b11015c4cc Add Splitter VFD to library.
* "Simultaneous and equivalent" Read-Write and Write-Only channels for
  file I/O.
* Only supports drivers with the H5FD_FEAT_DEFAULT_VFD_COMPATIBLE flag for
  now, preventing issues with multi-file drivers.

Add Mirror VFD to library.

* Write-only operations over a network.
* Uses TCP/IP sockets.
* Server and auxiliary server-shutdown programs provided in a new directory,
  `utils/mirror_vfd`.
* Automated testing via loopback ("remote" of localhost).
2020-05-20 09:34:20 -05:00
Larry Knox
333388c744 Add missing " and update function calls incorrectly named
load_gcc_arguments.
2020-05-20 09:31:58 -05:00
Allen Byrne
481e3aff7c TRILAB-192 update LTparse files 2020-05-20 09:31:58 -05:00
Dana Robinson
59d1a0e7a1 Added support for passing connector info strings via the command
line to the tools internals.
2020-05-20 09:31:58 -05:00
Dana Robinson
55e2b3170e Fix for passthrough VOL not passing tools tests due to incorrect
optional callback queries.
2020-05-20 09:31:58 -05:00
Larry Knox
9c8ec41791 Update all load_gcc_arguments to load_gnu_arguments.
Fixes TRILAB-212.
2020-05-20 09:31:58 -05:00
vchoi
5aa4de3c32 Fix according to PR feedback. 2020-05-20 09:31:58 -05:00
vchoi
8754e38ce7 Fix an error in previous merge: should use NULL instead of FAIL. 2020-05-20 09:31:58 -05:00
Larry Knox
74fdd50f59 Squashed commit of the following:
commit 8963c3bf756f8f8ec21beea9bd29a767e77675a8
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Wed Apr 8 16:52:27 2020 -0500

    Commit changes to gnu-cxxflags to remove unmatched " and to gnu-fflags
    to not add C warnings flags to H5_FCFLAGS.
2020-05-20 09:31:58 -05:00
Larry Knox
01a152f83c Add \d to list of characters allowed after '-' in versions. 2020-05-20 09:31:58 -05:00
Jordan Henderson
14bb06448b Fix memory leak in t_span_tree.c test 2020-05-20 09:31:58 -05:00
Allen Byrne
b46882fb0a Hide Frortran directive warnings 2020-05-20 09:31:58 -05:00
Dana Robinson
da9752598f Updated test ddl files so CMake passes after h5dump failures. 2020-05-20 09:31:58 -05:00
vchoi
9c153cce90 Modifications based on PR review feedback. 2020-05-20 09:31:58 -05:00
vchoi
517d630718 Add two routines gen_ref_files() and gen_sel_files() to generate test files related to
references and selections.
These test files will be copied to 1.12, 1.10 and 1.8 for compatibility testing.
2020-05-20 09:31:58 -05:00
Allen Byrne
dc86e0ec5d Remove flag from gfort-general in gfort-5, add /EHsc to Win C++ 2020-05-20 09:31:58 -05:00
Allen Byrne
af99886167 Update printf pointer syntax and revert fortran to f2003 2020-05-20 09:31:58 -05:00
Allen Byrne
ca81ce29fb Reduce window fortran standard to f90 2020-05-20 09:31:58 -05:00
Dana Robinson
503720de02 Updated tools dump output when dataset offset is undefined. 2020-05-20 09:31:58 -05:00
Dana Robinson
12ecc595d8 Added checks for native optional call support in some of the tools. 2020-05-20 09:31:57 -05:00
Dana Robinson
2001e80bb2 Misc changes for h5dump VOL changes. 2020-05-20 09:31:57 -05:00
Scot Breitenfeld
3ecdd3c0f9 Narrowed the scope of ISO_C_BINDING with ONLY additions 2020-05-20 09:31:57 -05:00
Allen Byrne
e9f711699d Minor updates and fix settings for fortran flags 2020-05-20 09:31:57 -05:00
Allen Byrne
f2ae83054a Update intel flags 2020-05-20 09:31:57 -05:00
Allen Byrne
269478552f Fix missing endif 2020-05-20 09:31:57 -05:00
Allen Byrne
c56d76e122 Correct improper file move 2020-05-20 09:31:57 -05:00
Allen Byrne
e1db7ff410 Move intel warnings to subfolder, update autotools files 2020-05-20 09:31:57 -05:00
Allen Byrne
f94696a662 Corrected note 2020-05-20 09:31:57 -05:00
Allen Byrne
a35379b296 Remove overzealous additions 2020-05-20 09:31:57 -05:00
Allen Byrne
c178ec429e Correct whitespace in flags, force list mode 2020-05-20 09:31:57 -05:00
Allen Byrne
75b878326d Flag construction must be after compiler detection 2020-05-20 09:31:57 -05:00
Jordan Henderson
8d9323aab7 Skip testing of passthrough VOL connector in a Family File tools test 2020-05-20 09:31:57 -05:00
Jordan Henderson
1a1343cb19 Restore previous tools library driver name behavior with passthrough VOL connector 2020-05-20 09:31:57 -05:00
Allen Byrne
f5dc2a2f8d TRILAB-192 add c++ and fortran warnings build systems one file 2020-05-20 09:31:57 -05:00
Allen Byrne
9cc06d671a Update release note for CMake warnings 2020-05-20 09:31:57 -05:00
Allen Byrne
48e81261e6 Add missing header include 2020-05-20 09:31:57 -05:00
Dana Robinson
02f8df1937 Fixed unnecessary H5R casts in the tools that were raising warnings. 2020-05-20 09:31:57 -05:00
vchoi
3a2d222a52 A fix in the cleaning up code for datatype when datatype initialization via H5D__init_type() fails.
This is triggered by the tests for revised references when the libver bounds setting does not allow version
4 datatype message to be created.  The test failure is abort core dumped.
This is due to the datatype initialization fails before the datatype ID is registered.
The datatype cleanup code should provide for the above situation.
The code to fix the problem is the same as what is done in H5D__open_oid().
2020-05-20 09:31:57 -05:00
Dana Robinson
27c3a519e9 Changed default dataset shared struct to initialize hid_t IDs to
H5I_INVALID_HID.
2020-05-20 09:31:57 -05:00
David Young
8040d73fbe Remove tongue-in-cheek credit for Rusty Shackleford and Dale Alvin Gribble.
Delete the comment questioning whether pthread_mutex_lock is allowed
in a key destructor, since pthread_key_create(3) provides the answer:

   There  is  no  notion  of a destructor-safe function. If an application
   does not call pthread_exit() from a signal handler, or if it blocks any
   signal whose handler may call pthread_exit() while calling async-unsafe
   functions, all functions may be safely called from destructors.

Delete redundant comment.
2020-05-20 09:31:57 -05:00
David Young
8ae25d32b0 Follow HDF5 conventions. 2020-05-20 09:31:57 -05:00
Allen Byrne
70d43341ec Correct extra flags 2020-05-20 09:31:57 -05:00
Dana Robinson
d4a43eebdf Minor renaming in the tools code. 2020-05-20 09:31:57 -05:00
Gerd Heber
a641a130e7 Fix for HDFFV-11065. 2020-05-20 09:31:57 -05:00
Jordan Henderson
ba79f94586 Fix latent bug in h5repack options file reading
Add 'enable-error-stack' option to h5format_convert
2020-05-20 09:31:57 -05:00
Allen Byrne
e36accb306 TRILAB-192 remove comment 2020-05-20 09:31:57 -05:00
Quincey Koziol
358558ad03 Refactor to reduce verbosity. 2020-05-20 09:31:57 -05:00
Dana Robinson
5b17d45120 Minor renaming in h5dump (addr --> token) 2020-05-20 09:31:57 -05:00
Allen Byrne
b4534374f7 TRILAB-192 add comparable clang flags 2020-05-20 09:31:57 -05:00
Jordan Henderson
0368174822 Fix some missing symbols issues in tools library 2020-05-20 09:31:57 -05:00
Jordan Henderson
46a9771a9e A few small tweaks to the tools from review 2020-05-20 09:31:56 -05:00
Jordan Henderson
1da4855528 Replace usage of some standard library functions with HD- versions 2020-05-20 09:31:56 -05:00
Jordan Henderson
254388494a Update Tools library to be better compatible with VOL connectors
Modify h5repack to integrate with VOL connectors

Update tools library to accomodate VOL connectors

Update logic in h5tools_fopen for VOL connectors

Add command-line options to h5repack for specifying in/out VOL
connectors

Implement h5tools_set_vol_fapl

Fix library shutdown issue

Integrate ROS3 and HDFS VFDs into new h5tools_get_fapl() scheme

Avoid H5Ocopy in h5repack when using different VOL connectors

Update h5tools_test_utils.c for ROS3 and HDFS integration
2020-05-20 09:31:56 -05:00
Allen Byrne
0a72a7bf6b TRILAB-24 use CHECK_STRUCT_HAS_MEMBER 2020-05-20 09:31:56 -05:00
Quincey Koziol
aad3ff8244 Correct macro check 2020-05-20 09:31:56 -05:00
Allen Byrne
f4333990dd Add extensive warnings to tools executables 2020-05-20 09:31:56 -05:00
Allen Byrne
ac64ea0b63 Reorg comments 2020-05-20 09:31:56 -05:00
Allen Byrne
ad5dbf9539 Correct warning flag form 2020-05-20 09:31:56 -05:00
Allen Byrne
579625801a Because of tools macro, this needs to be a warning 2020-05-20 09:31:56 -05:00
Allen Byrne
3e81528f3b unused set-variable in macro 2020-05-20 09:31:56 -05:00
Allen Byrne
e498e3ac3e Fix Werror issues in JNI and tools 2020-05-20 09:31:56 -05:00
Allen Byrne
1bd5fb6bf1 TRILAB-192 fix JNI shadow warning 2020-05-20 09:31:56 -05:00
Allen Byrne
e7c76ec46f TRILAB-192 restrict extensive warnings to libraries 2020-05-20 09:31:56 -05:00
Quincey Koziol
f2e152c9db Correct failure when allocation tracking are disabled. 2020-05-20 09:31:56 -05:00
Allen Byrne
b373cd9a44 TRILAB-192 add release note 2020-05-20 09:31:56 -05:00
Allen Byrne
42828098ed TRILAB-192 Identify warnings that fail as errors 2020-05-20 09:31:56 -05:00
David Young
27e3c31d6c Update the MANIFEST for the autoconf/cmake shared warnings files. 2020-05-20 09:31:56 -05:00
Quincey Koziol
7b119d614b Revise API for H5get_alloc_stats() to take a struct instead of separate values. 2020-05-20 09:31:56 -05:00
Quincey Koziol
20df4bd395 Add routines to query the library's free list sizes and allocation stats. 2020-05-20 09:31:56 -05:00
Allen Byrne
7afe25de20 Correct syntax 2020-05-20 09:31:56 -05:00
Allen Byrne
00edda5aa8 Update CMake compiler flags to use same set of warnings 2020-05-20 09:31:56 -05:00
David Young
5050218f74 Move the GNU warnings configuration under config/gnu-warnings/ and trim
the filename prefixes.  Update config/gnu-flags to suit.

I also made changes to config/cmake/HDFCompilerFlags.cmake, but I'm not
sure they're correct.
2020-05-20 09:31:56 -05:00
David Young
0822b91ec9 By default, demote warnings promoted to errors back to warnings. 2020-05-20 09:31:56 -05:00
David Young
03a86e551d Incorporate the H5_ECFLAGS into the library CFLAGS. Now a bunch of errors will
occur.  Next commit will demote the warnings promoted to errors back to
warnings again.
2020-05-20 09:31:56 -05:00
David Young
5e3e0308db Break out warnings into more files that autoconf and CMake can share. This
change temporarily disables the warnings that were promoted to errors, but I
will add those warnings back as warnings, not errors, in the next commit.
2020-05-20 09:31:56 -05:00
Allen Byrne
cde72dfc27 Allow use of INTEL icl/icl++ for clang 2020-05-20 09:31:56 -05:00
Allen Byrne
3e42250f0f Fix threadsafe for new test 2020-05-20 09:31:56 -05:00
Dana Robinson
ce9ef0ba12 Fixed the RELEASE.txt note for HDFFV-11057 2020-05-20 09:31:56 -05:00
Dana Robinson
4cfafa10d5 Fix shutdown errors when using the HDF5_VOL_CONNECTOR environment
variable to set a dynamically loaded plugin as the default VOL
connector. Fixes HDFFV-11057
2020-05-20 09:31:56 -05:00
Dana Robinson
c7fd077ffb Very minor comment change in H5VLconnector.h. 2020-05-20 09:31:56 -05:00
David Young
5df5bc37da Use the correct error macro. 2020-05-20 09:31:56 -05:00
Vailin Choi
1612e90c2b Fix issues when deserializing point/all/none selection with version beyond the library's supported version:
(1) Verify the decoded version before proceeding further with deserialization
(2) Close the dataspace if errors occurred after opening the dataspace
2020-05-20 09:31:56 -05:00
David Young
313501fd17 Avoid a crash, don't check if we're flushing when the file is closing:
there's no need to check if the metadata cache is flushing if we already
know the file is closing, because the condition we rely on is "closing
OR flushing."  Further, the cache may have already gone away, so
sometimes calling into the cache to see if it's flushing will crash the
program.
2020-05-20 09:31:56 -05:00
David Young
84f402deea Use a naked pthread_self() call in the HDF5 thread wrappers. 2020-05-20 09:31:56 -05:00
David Young
4ffc7ad8df Add semicolons to more PASSED() invocations. 2020-05-20 09:31:55 -05:00
Allen Byrne
52a797e697 Remove system command from valgrind reports 2020-05-20 09:31:55 -05:00
Jacob Smith
95d6578dea Fix incorrect FUNC_LEAVE macro (should match FUNC_ENTER_*_TAG). 2020-05-20 09:31:55 -05:00
Allen Byrne
506991575f Whitespace 2020-05-20 09:31:55 -05:00
kmu
5228f61f79 revert type cast 2020-05-20 09:31:55 -05:00
Quincey Koziol
47e2160f22 Switch the 'get offset' operation from a dataset 'get' callback to a [native]
dataset 'optional' operation.
2020-05-20 09:31:55 -05:00
David Young
4bbd9649c0 Complete the comment on thread_main(), explaining why the barrier is used. 2020-05-20 09:31:55 -05:00
David Young
4562a584af The first implementation seemed to allow for the possibility that a thread
could block at the barrier, wake and exit the barrier, re-acquire the barrier
lock and increase `nentered` before the other blocked threads woke and checked
`nentered % count == 0`.  Then the other blocked threads would check `nentered
% count == 0` and, finding it false, go back to sleep in the barrier.  This new
implementation waits for a looser condition to obtain so that threads don't go
back to sleep in the barrier.
2020-05-20 09:31:55 -05:00
David Young
88920baf53 Test the right condition for the EBUSY return in pthread_barrier_destroy(). 2020-05-20 09:31:55 -05:00
David Young
b7f27e0381 s/exit_failure/EXIT_FAILURE/g 2020-05-20 09:31:55 -05:00
David Young
8c5e0a1e53 Implement pthread_barrier(3) for Darwin using a counter, condition variable,
and mutex.  Untested.
2020-05-20 09:31:55 -05:00
Larry Knox
eeb8a5a754 Modfy expression to match mpicc build with Intel as intel compiler, not
gcc.
2020-05-20 09:31:55 -05:00
M. Scot Breitenfeld
d40e543e63 Fixed issue building HDF5 with NAG Fortran 7.0.
Accounted for the additon of half precision floating-point with a KIND=16.

HDFFV-11033
2020-05-20 09:31:55 -05:00
Allen Byrne
e417c01bd3 Add java version and reference libsettings 2020-05-20 09:31:55 -05:00
Allen Byrne
95c4222cd1 Update examples and fix old version references. 2020-05-20 09:31:55 -05:00
Allen Byrne
ccdb8f360f Move MODEL check to before usage in CTestScript.cmake. 2020-05-20 09:31:55 -05:00
Allen Byrne
481c11b3f9 Copy generated files instead creating twice 2020-05-20 09:31:55 -05:00
Allen Byrne
0e45724b69 Fix standalone link 2020-05-20 09:31:55 -05:00
Allen Byrne
8ad375d345 Fix Fortran macro use and jni comment 2020-05-20 09:31:55 -05:00
Allen Byrne
a549df80b3 Update Windows platforms 2020-05-20 09:31:55 -05:00
David Young
c12bda5d37 Add missing MANIFEST entry, ./doc/code-conventions.md . 2020-05-20 09:31:55 -05:00
Allen Byrne
bc2e406f78 HDFFV-11036 add release note 2020-05-20 09:31:55 -05:00
Allen Byrne
0aadc45530 HDFFV-11036 add file compare test process 2020-05-20 09:31:55 -05:00
Allen Byrne
799873706a Correct usage of add_compile_definitions 2020-05-20 09:31:55 -05:00
Allen Byrne
60a4987f97 TRILAB-142 Change minimum CMake version to 3.12 2020-05-20 09:31:55 -05:00
Allen Byrne
d6c2f9966f Fix always true issue because member is not dynamically allocated 2020-05-20 09:31:55 -05:00
Allen Byrne
925d3e82bd CMake cleanup 2020-05-20 09:31:55 -05:00
Allen Byrne
a2dc6e0285 HDFFV-11032 fix JNI call 2020-05-20 09:31:55 -05:00
David Young
422f5adebe Replace the old H5F_DECODE_LENGTH() implementation with one that
initializes the variable it's loading on every path.
2020-05-20 09:31:55 -05:00
M. Scot Breitenfeld
995c8126ae Corrected INTERFACE INTENT(IN) to INTENT(OUT) for buf_size inh5fget_file_image_f.
HDFFV-11029
2020-05-20 09:31:55 -05:00
David Young
71231f3726 Start to document the function/parameter/variable attribute macros. 2020-05-20 09:31:55 -05:00
David Young
4cd3dc95d9 Filter all of the new _USED / _UNUSED type modifiers. 2020-05-20 09:31:55 -05:00
David Young
28103327a5 H5_HAVE_PARALLEL, _DEBUG_API, etc. Add attributes to some variables and
parameters that are unused under some configurations.
2020-05-20 09:31:55 -05:00
David Young
5640d832e4 Use HD prefix. 2020-05-20 09:31:55 -05:00
David Young
0afcd66d2b Delete unhelpful comment per Jordan's question. 2020-05-20 09:31:55 -05:00
David Young
f44798804d Make sure that H5TS_thread_id() is available as either a function or a macro in
all configurations.

Previously it was neither declared nor defined in --disable-threadsafety
builds.  The compiler's warning got lost in the noise---I first saw the issue
because my -Werror branch stopped compiling cold---and the tests still linked
and ran.
2020-05-20 09:31:55 -05:00
David Young
50d7f83e6e Provide local copies of err(3)- and errx(3)-alike functions
for Visual Studio compatibility.
2020-05-20 09:31:55 -05:00
David Young
40d104b5c2 Provide C99/POSIX.1 format strings PRI[doux]{8,16,32,64,MAX,PTR} on systems
that are missing <inttypes.h>.
2020-05-20 09:31:55 -05:00
David Young
e3ce3bf76a Take out the temporary performance tests. 2020-05-20 09:31:54 -05:00
David Young
b00d843c2d Make calls through a function pointer. Use the same number of arguments,
always.
2020-05-20 09:31:54 -05:00
David Young
17f8b2913b Increase iterations, provide a baseline for no-op, simplify the overhead
case a bit.
2020-05-20 09:31:54 -05:00
David Young
66334f899d Temporarily add some code that measures the time to run the simplest possible
H5T__copy_all()-like routine 10 million times and then measures the version
with FUNC_ENTER_STATIC/_LEAVE_NOAPI and a HGOTO_ERROR() statement.
2020-05-20 09:31:54 -05:00
David Young
d21d9aa1fb H5T_copy() constification plus Quincey's contributions. 2020-05-20 09:31:54 -05:00
Allen Byrne
ad9424bed4 TRILAB-148 fix sanitizer and -fsanitize usage 2020-05-20 09:31:54 -05:00
Allen Byrne
9f024afb2a Update sanitizer note. 2020-05-20 09:31:54 -05:00
Jacob Smith
3ef00a150d Fix improper S3 signing key null check (HDFFV-11015). 2020-05-20 09:31:54 -05:00
M. Scot Breitenfeld
2a252eada1 HDFFV-11018 Add Fortran H5F_LIBVER_V*_F definitions
Added
------
New Definitions:

  INTEGER :: H5F_LIBVER_ERROR_F
  INTEGER :: H5F_LIBVER_NBOUNDS_F
  INTEGER :: H5F_LIBVER_V18_F
  INTEGER :: H5F_LIBVER_V110_F
  INTEGER :: H5F_LIBVER_V112_F
  INTEGER :: H5F_LIBVER_V114_F

New API:
  h5pget_libver_bounds_f(fapl_id, low, high, hdferr)

Removed:
  call to C wrapper h5pset_libver_bounds_c in h5pset_libver_bounds_f
2020-05-20 09:31:54 -05:00
Muqun Yang
9c3fe9fe7c HDFFV-11014, fix the h5repack issue that misses a few attributes during the repacking. The flag that checks the object reference attribute is not updated properly. The fix is trivial. Just need to move the flag update line into the inner loop. Tested at Jelly. Also update the release.txt. 2020-05-20 09:31:54 -05:00
David Young
f6bf61975e Oops, the test has to return success in the unimplemented case. 2020-05-20 09:31:54 -05:00
David Young
25f69a687a If H5_HAVE_THREADSAFE is not #defined, define nothing but a stub implementation
of H5TS_thread_id().
2020-05-20 09:31:54 -05:00
David Young
cc57aa73c8 src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
test/thread_id.c: move threads_failure() inside #ifdefs.
2020-05-20 09:31:54 -05:00
David Young
364a277143 Change thread IDs to uint64_t from unsigned long, per Quincey's suggestion.
Fix a typo in the H5TS_thread_init() comment and reword some ID
properties.
2020-05-20 09:31:54 -05:00
David Young
5178dd70ec Add thread_id.c to the MANIFEST and the CMakeLists.txt per Allen's
request.
2020-05-20 09:31:54 -05:00
David Young
06dfd6025d Replace pthread_self_ulong() with H5TS_thread_id(). The POSIX Threads
implementation ought to be portable to any system that has POSIX
Threads.  On Windows, I use the same API call as before.
2020-05-20 09:31:54 -05:00
Jordan Henderson
ecdaf09c11 Add RELEASE.txt note for token refactoring changes 2020-05-20 09:31:54 -05:00
Allen Byrne
55a2411851 HDFFV-11012 - add release note 2020-05-20 09:31:54 -05:00
Allen Byrne
676f014e30 HDFFV-11012 - add correct fortran include path properties 2020-05-20 09:31:54 -05:00
Allen Byrne
e8e8ae8f58 HDFFV-10996 add release note 2020-05-20 09:31:54 -05:00
Allen Byrne
0bdf289f98 HDFFV-10996 - add java vol tests 2020-05-20 09:31:54 -05:00
Dana Robinson
1311f9e999 Minor refactoring to the VFD info free call. 2020-05-20 09:31:54 -05:00
Dana Robinson
aacc603804 Updated the 'const memory free' changes based on PR feedback. 2020-05-20 09:31:54 -05:00
Dana Robinson
5e76dccbe0 Added a free wrapper that lets us free constant pointers without
generating warnings.

Also, brought the const-ness of the VOL connector info in line with
the VFD info (not visible externally).
2020-05-20 09:31:54 -05:00
Allen Byrne
c3974173a1 VS2010 needs an underscore 2020-05-20 09:31:54 -05:00
Dana Robinson
dea87efdf9 Cleaned up remaining warnings in high-level library. 2020-05-20 09:31:54 -05:00
Allen Byrne
e0e020eb6b Small fixes for tools and skip autotools tests for no filter 2020-05-20 09:31:54 -05:00
David Young
13bb3afdc6 Reduce differences between my -Werror branch and develop:
Rename index -> idx, fileno -> fnumber, fileno -> fno to avoid GCC
shadowed declaration warnings about index(3).

Convert #pragma GCC diagnostic push/pop/ignored to the HDF5 library's
H5_GCC_DIAG_OFF()/H5_GCC_DIAG_ON() macros.
2020-05-20 09:31:54 -05:00
David Young
2badc1bf32 Reduce casts of HDcalloc()/HDmalloc() that -Wc++-compat required.
Reduce gratuitous casts---e.g., (size_t)1.

Use the right format string for a pointer.

In the H5C sanity checks, change a "size increase" variable from ssize_t
(too narrow) to int64_t (wide enough).

Parenthesize every appearance of `storage` in the macro
`H5D_CHUNK_STORAGE_INDEX_CHK(storage)` so that you can pass in an
expression like &sc and it works properly.

Disallow re-assignment of the `dset` parameter to H5D__chunk_init()
because it helped assure me that it's safe to replace the repeating
expression `&dset->shared->layout.storage.u.chunk` with `sc` throughout.

Replace lengthy expressions such as
`&dset->shared->layout.storage.u.chunk` with `sc` throughout several
functions in H5Dchunk.c ISTR that the compiler warned that `sc` was
declared but unused in a couple of functions, and then I found that `sc`
could be used in many places.  Maybe the disused `sc` appeared because a
bunch of code was copied and pasted, I don't know.  Anyway, it's a lot
tighter code now that I use `sc`.

In H5D__chunk_update_old_edge_chunks() and H5D__chunk_delete()
I actually expand `sc` and another temporary variable, `pline`,
because they're used only in !defined(NDEBUG) code.  This squashes
unused-variable warnings in the defined(NDEBUG) configuration.

Don't drop the `volatile` qualification with a cast in
tools/src/h5import/h5import.c.
2020-05-20 09:31:53 -05:00
David Young
2360f6e644 testpar/t_2Gio.c: Fix a typo that I think was introduced by a
previous warnings PR.  An array element was assigned to
        itself---shape[2]Â =Â shape[2];---instead of being assigned to
        chunk[2].

fortran/src/H5Pf.c: move conditional compilation controlled by
        H5_NO_DEPRECATED_SYMBOLS outside of a function for readability.

fortran/src/H5match_types.c: put a variable's declaration under the same
        conditional compilation (H5_FORTRAN_HAVE_C_LONG_DOUBLE) as its
        use.

For now, skip compilation of some unused debug dump routines in the JNI.
While I'm in the JNI, delete a set-but-unused variable.

src/H5Z.c: condition a variable declaration on H5_NO_DEPRECATED_SYMBOLS
        so that it's not declared but unused or vice versa.

test/cache_common.h: add an #include in to get some symbols we need to
        avoid implicit declaration warnings.

test/dsets.c: use a more conventional conditional-compilation syntax.

test/dt_arith.c, test/fillval.c: initialize a bunch of uninitialized
        variables before use.

test/vfd.c: pass the expected type of `void **` to posix_memalign(3)
        instead of `int **`.

testpar/t_bigio.c: explicitly compare with 0 instead of using ! when
        "equal to 0?" is the question not "is false?"  Repair some
        indentation while I'm here.

testpar/testpar.h: repair misaligned line-continuation backslashes in a
        macro that probably should be a function so that we don't have
        to fiddle with the line continuation to begin with.

tools/src/h5repack/h5repack_main.c: fix some compiler fussing about
        enums.

tools/test/perform/pio_engine.c: the compiler fusses if you cast a
        function call returning double directly to off_t.  It's ok if
        you cast a variable that's a double to off_t, however.  Write
        and use a new function, sqrto(), to avoid the cast warnings.
2020-05-20 09:31:53 -05:00
kmu
cfcac15f03 fix bad function cast warning 2020-05-20 09:31:53 -05:00
kmu
f06ae5ec74 initialization discards const warning 2020-05-20 09:31:53 -05:00
kmu
1e5dd76d25 fix unused function warning 2020-05-20 09:31:53 -05:00
Allen Byrne
9908743dd7 HDFFV-11011 - merge include list 2020-05-20 09:31:53 -05:00
Allen Byrne
b44b3d136d HDFFV-11011 correct issues with target file extension 2020-05-20 09:31:53 -05:00
Jordan Henderson
2e962dc49b Introduce new H5VL _by_value routines 2020-05-20 09:31:53 -05:00
Allen Byrne
09ba68d026 Correctly manage warnings for new tests 2020-05-20 09:31:53 -05:00
Allen Byrne
55212d3a02 Ext libs ZLIB and SZIP warnings are separate concerns 2020-05-20 09:31:53 -05:00
Allen Byrne
99993f3360 Remove commented warnings line 2020-05-20 09:31:53 -05:00
kmu
76c0e0aa4c rename macro 2020-05-20 09:31:53 -05:00
kmu
d59460e632 change condition 2020-05-20 09:31:53 -05:00
kmu
c3549ae3f9 pick up from Dave's fix 2020-05-20 09:31:53 -05:00
kmu
d63080b19a leave Wswitch-default for later fix 2020-05-20 09:31:53 -05:00
kmu
51f9a51c25 fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow 2020-05-20 09:31:53 -05:00
kmu
4d9155bade fix issues from test fail 2020-05-20 09:31:53 -05:00
Dana Robinson
eaaedabaa5 Replaced my_isnan with C99 isnan in h5diff. 2020-05-20 09:31:53 -05:00
Allen Byrne
2a2dc4ab93 Add another warning variation 2020-05-20 09:31:53 -05:00
Allen Byrne
c0a1ba8750 Correct ignore warnings 2020-05-20 09:31:53 -05:00
Allen Byrne
c01add2ac7 Only use sanitizer with Clang 2020-05-20 09:31:53 -05:00
Allen Byrne
c491fd1cfc Remove cmake macros from valgrind tests 2020-05-20 09:31:53 -05:00
Larry Knox
27e35a62e9 Restore fix of test assert fail eror undone by later commit. 2020-05-20 09:31:53 -05:00
Dana Robinson
f935bc271a Cleaned up warnings in test/tid.c. 2020-05-20 09:31:53 -05:00
kmu
136d3b7ea2 fix assert fail 2020-05-20 09:31:53 -05:00
Dana Robinson
6e8ce00c0b Optimized the floating point comparisons a little bit. 2020-05-20 09:31:53 -05:00
Dana Robinson
23f103cf6b Fix for failing h5diff tests involving floating-point compares. 2020-05-20 09:31:53 -05:00
Dana Robinson
0479a345cc Removed H5_DEC_ENUM 2020-05-20 09:31:52 -05:00
Dana Robinson
3290803120 Revert "Revert "Moved -Wunsuffixed-float-constants to the developer warnings.""
This reverts commit 6486e06545.
2020-05-20 09:31:52 -05:00
Dana Robinson
36647e79b9 Revert "Moved -Wunsuffixed-float-constants to the developer warnings."
This reverts commit 12bc75c617.
2020-05-20 09:31:52 -05:00
Dana Robinson
40c5e67e41 Moved -Wunsuffixed-float-constants to the developer warnings. 2020-05-20 09:31:52 -05:00
Dana Robinson
2c520b2ba6 Fixed a bug in testpar/t_cache.c concerning checking expected
vs. actual cache entry reads and writes.
2020-05-20 09:31:52 -05:00
kmu
9f5444199e remove unnecessary stuff 2020-05-20 09:31:52 -05:00
kmu
30e61cf090 squash cast warning fix 2020-05-20 09:31:52 -05:00
Allen Byrne
cfd8856288 Change tools debug macros to not use error stack 2020-05-20 09:31:52 -05:00
Larry Knox
812e7eda57 Max Library "index" should be 7. 2020-05-20 09:31:51 -05:00
kmu
f0ee8b2883 not use hdf5 private header 2020-05-20 09:31:51 -05:00
kmu
1c226ac077 fix float type cmp warning 2020-05-20 09:31:51 -05:00
kmu
8d5ae4f460 fix float type cmp warning 2020-05-20 09:31:51 -05:00
kmu
742aa75cd0 fix missing prototype warning 2020-05-20 09:31:51 -05:00
kmu
af79e1613e more cleanup 2020-05-20 09:31:51 -05:00
kmu
364d25abea change it back 2020-05-20 09:31:51 -05:00
kmu
d03083de5f pick up missing piece 2020-05-20 09:31:51 -05:00
kmu
27c618b91d fix unused related warnings 2020-05-20 09:31:51 -05:00
kmu
8377789f8f removed unused parameter 2020-05-20 09:31:51 -05:00
kmu
6b07d692f4 more fix and address comments 2020-05-20 09:31:51 -05:00
kmu
a6e8f34b7b remove unsed var,function,macro, etc 2020-05-20 09:31:51 -05:00
kmu
0c9d2de9e2 fix uninitizlized warning 2020-05-20 09:31:50 -05:00
Dana Robinson
f77d99d3e9 Fixed yet another small issue in test/efc.c. 2020-05-20 09:31:50 -05:00
Larry Knox
08c29a0995 Remove irrelevant sentence from comment. 2020-05-20 09:31:50 -05:00
Larry Knox
ec3847712c Remove duplicate lines noted on forum by Eric Bavier 2020-05-20 09:31:50 -05:00
Larry Knox
7bbca40652 Add v111 version for H5O functions to enable version1 default for HDF5
1.8-1.10 and version 3 default for HDF5 1.12.  Version 2 functions are
available (deprecated) but will not be the default for any version.
2020-05-20 09:31:50 -05:00
Larry Knox
531530551f Only 2 versions of H5O_info_t and H5O_iterate_t. 2020-05-20 09:31:50 -05:00
Larry Knox
48036abeed H5vers.txt has versions v10 that should be v110 and some missing v110
entries.
2020-05-20 09:31:50 -05:00
Dana Robinson
4405118a04 PATH_MAX fix in efc test for Windows. 2020-05-20 09:31:50 -05:00
Dana Robinson
55b41104b9 Tidying from code review. 2020-05-20 09:31:50 -05:00
Dana Robinson
0585e6fb34 Fixed stack and frame size warnings. Not complete, but fixes most of
the easier cases.
2020-05-20 09:31:50 -05:00
Dana Robinson
d11be7974e Removed UIUC from copyright, added helpful comment. 2020-05-20 09:31:50 -05:00
Dana Robinson
6c0ecdc496 Updated MANIFEST 2020-05-20 09:31:50 -05:00
Dana Robinson
55b96a9fff Added a config file for ARM (Tested on a Raspberry Pi 3B+
w/ gcc 6).
2020-05-20 09:31:50 -05:00
Allen Byrne
d8e352ec4f Note for common warnings files 2020-05-20 09:31:50 -05:00
Allen Byrne
23493cb1b2 Create common build system files for warnings 2020-05-20 09:31:50 -05:00
Allen Byrne
e54dcb1609 Correct standalone function attributes 2020-05-20 09:31:50 -05:00
Allen Byrne
f59dfcb711 Standalone should not use import/export attributes 2020-05-20 09:31:50 -05:00
Dana Robinson
3e6a192e9c Squashed commit of the token_refactoring branch: 2020-05-20 09:31:50 -05:00
Jerome Soumagne
335fc0096c Add test for reference shutdown issue 2020-05-20 09:20:26 -05:00
Jerome Soumagne
3ab7612604 H5R: set app ref when incrementing ref_count on location held by reference
(fix HDFFV-10992)
2020-05-20 09:20:26 -05:00
Allen Byrne
53d6f0dc3e HDFFV-11001 fix if block 2020-05-20 09:20:26 -05:00
Allen Byrne
6b106b2cab HDFFV-11001 need to qualify all by parallel or serial types 2020-05-20 09:20:26 -05:00
Allen Byrne
234492f9e7 HDDFV-11001 add note 2020-05-20 09:20:26 -05:00
Allen Byrne
6682c717e2 HDFFV-11001 Add fine control over testing 2020-05-20 09:20:26 -05:00
Allen Byrne
9ebf36e893 Adjust regex for warnings 2020-05-20 09:20:26 -05:00
Allen Byrne
16245b0440 Update tools hid_t declarations with H5I_INVALID_HID 2020-05-20 09:20:26 -05:00
Allen Byrne
280329e192 Ignore ZLIB warnings 2020-05-20 09:20:26 -05:00
Allen Byrne
b98190628f Added JIRA note 2020-05-20 09:20:26 -05:00
Larry Knox
14e2c9d3f7 Modify external_env.c to prevent deleting test file of external.c.
Fix for HDFFV-10941.
2020-05-20 09:20:26 -05:00
Allen Byrne
738b025b3e io_timer.c uses a parallel lib function 2020-05-20 09:20:25 -05:00
Allen Byrne
d915fa7f07 Fix standalone compile issues 2020-05-20 09:20:25 -05:00
Allen Byrne
4a977332f0 Separate result variables for the function performed 2020-05-20 09:20:25 -05:00
Allen Byrne
f4e614c5cd Check for actual content before using file 2020-05-20 09:20:25 -05:00
Allen Byrne
207b87cbb9 HDFFV-10995 - add missing import 2020-05-20 09:20:25 -05:00
Allen Byrne
f9f4774065 HDFFV-10995 - need to add import 2020-05-20 09:20:25 -05:00
Allen Byrne
0c852d4ae7 HDFFV-10995 - Update all time instances 2020-05-20 09:20:25 -05:00
Allen Byrne
91729ca3d0 HDFFV-10995 adjust testing to tolerate non-US locale 2020-05-20 09:20:25 -05:00
kmu
156bc312ed fix test assert fail error 2020-05-20 09:20:25 -05:00
kmu
a52f4135f9 add new type support 2020-05-20 09:20:25 -05:00
kmu
fd374fb234 address problems from comments 2020-05-20 09:20:25 -05:00
kmu
95e509db46 fix and address comments 2020-05-20 09:20:25 -05:00
kmu
9281d24a5b change according to previous comments 2020-05-20 09:20:25 -05:00
kmu
740d491ef3 add missing piece 2020-05-20 09:20:25 -05:00
kmu
271bce5b10 remove unnecessary check macro 2020-05-20 09:20:25 -05:00
kmu
1d46e82317 fix intel compile warnings 2020-05-20 09:20:25 -05:00
kmu
fb8f955a73 Revert "fix warnings from Intel compiler"
This reverts commit 8b9338ab57.
2020-05-20 09:20:24 -05:00
kmu
3e4a99d17d Revert "fix warnings and some text alignment"
This reverts commit d06474c4e1.
2020-05-20 09:20:24 -05:00
kmu
71610c9677 Revert "let hdf5 pick up the right compiler in Intel environment"
This reverts commit 3613ec7296.
2020-05-20 09:20:24 -05:00
kmu
9d8fb46a2c Revert "fix issues from previous PR comments"
This reverts commit d242a900f4.
2020-05-20 09:20:24 -05:00
kmu
f2028c7568 Revert "using a different MACRO"
This reverts commit fc61b7a9f3.
2020-05-20 09:20:24 -05:00
kmu
9a3a13cacb using a different MACRO 2020-05-20 09:20:23 -05:00
kmu
bb53a566e8 fix issues from previous PR comments 2020-05-20 09:20:23 -05:00
kmu
540e50df28 let hdf5 pick up the right compiler in Intel environment 2020-05-20 09:20:23 -05:00
kmu
c1f6c50b35 fix warnings and some text alignment 2020-05-20 09:20:23 -05:00
kmu
6725222332 fix warnings from Intel compiler 2020-05-20 09:20:23 -05:00
Quincey Koziol
d1d4635550 Small changes from the token_refactoring branch, to reduce the delta to develop 2020-05-20 09:20:23 -05:00
Jordan Henderson
d459e350a5 Fix some places where H5P_DEFAULT gets passed down to a VOL connector 2020-05-20 09:20:22 -05:00
Dana Robinson
37a141db61 Changed -Wformat-truncation to level 2 in CMake w/ gcc. 2020-05-20 09:20:22 -05:00
Dana Robinson
6cfeb96b36 Changed -Wformat-truncation's level from 2 to 1. 2020-05-20 09:20:22 -05:00
Jordan Henderson
295185f368 Fix issue in h5dump where reference objects weren't being destroyed 2020-05-20 09:20:22 -05:00
Jordan Henderson
ac6aeb9adf Clean up tools warnings introduced by H5TOOLS_ERR_INIT macro 2020-05-20 09:20:22 -05:00
Jordan Henderson
d4aa380dd1 Refactor tools library error handling macros 2020-05-20 09:20:22 -05:00
Allen Byrne
4f86f43b60 Add MPI libs to standalone perf 2020-05-20 09:20:22 -05:00
Allen Byrne
8c43c2a955 Grep needs to search error file 2020-05-20 09:20:22 -05:00
Allen Byrne
9701014075 Correct flaws in test scripts and files 2020-05-20 09:20:22 -05:00
Allen Byrne
f66d3366ce grep for failure text in error stack 2020-05-20 09:20:22 -05:00
Allen Byrne
dcfeaddb32 Add list to function arg 2020-05-20 09:20:22 -05:00
Allen Byrne
ffb7d748f6 Test files for new ref types 2020-05-20 09:20:22 -05:00
Allen Byrne
1301b25aa9 h5diff test script files 2020-05-20 09:20:22 -05:00
Allen Byrne
a9b6fde99e Add ref changes to test script 2020-05-20 09:20:22 -05:00
Allen Byrne
0b2fe3fcc7 Add new h5diff files 2020-05-20 09:20:22 -05:00
Allen Byrne
463671a4f4 Fix compile statement order 2020-05-20 09:20:22 -05:00
Allen Byrne
972c57f769 HDFFV-10976,-10980 Init obj_type before calling H5Rget_obj_type3 2020-05-20 09:20:22 -05:00
Allen Byrne
e5cb404bb2 Add unknown define for h5dump ref objects 2020-05-20 09:20:22 -05:00
Allen Byrne
d486a9b27e HDFFV-10980 - h5diff uses new ref APIs 2020-05-20 09:20:22 -05:00
Quincey Koziol
b6b0567bdf Remove unnecessary H5CX call 2020-05-20 09:20:21 -05:00
Quincey Koziol
53e62bcbeb Refactor H5Dvlen_get_buf_size to use optional dataset operation, with generic fallback for VOL connectors that don't implement operation 2020-05-20 09:20:21 -05:00
Quincey Koziol
ba9f12b6d8 Cleanups from PR reviews 2020-05-20 09:20:21 -05:00
Quincey Koziol
996e12e796 Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what
the operation is and decide whether to implement it or not.

Added a new VOL sub-class called "introspect" where callbacks that report
information about the connector or container can be placed.  Added an
'opt_query' callback to this sub-class, for a connector to report back
to the library whether a particular optional callback operation is supported.
Also added a 'get_conn_cls' introspection callback, to retrieve the H5VL_class_t
of a connector (either the "current" connector, H5VL_GET_CONN_LVL_CURR, or
the terminal connector, H5VL_GET_CONN_LVL_TERM).

Moved the "post open" operation from a file 'specific' operation to a file
'optional' operation, now that it's possible to detect (with the 'opt_query'
introspection callback) whether a VOL connector implements an optional
operation, without just returning an error.

Added new internal VOL helper routines: H5VL_object_is_native, to determine
if an object is in (or is a) native file, and H5VL_file_is_same, to determine
if two objects are in (or are) the same terminal VOL connector's container.
(And moved the special handling for FILE_IS_EQUAL operation out of internal VOL
callback routine into H5VL_file_is_same)

Made new dataset 'get' operation for H5Dvlen_get_buf_size, aligning it better
with other 'get' operations in API.

Fixed several issues with pass-through connectors, which are now passing the
'make check-passthrough-vol' tests again.

A bunch of warning and style cleanups as well.
2020-05-20 09:20:21 -05:00
Allen Byrne
68373c2d78 Standalone doesn't use h5test lib implementation. 2020-05-20 09:20:21 -05:00
David Young
2914c7baf8 In portable shell scripts (using #!/bin/sh) we have to use single square
brackets, [ ], instead of the bash-ism double square brackets, [[ ]].
2020-05-20 09:20:21 -05:00
David Young
5ad9d9277e Make this script work on hosts where PERL is not installed at
/usr/bin/perl.
2020-05-20 09:20:21 -05:00
Allen Byrne
e3f12a5a22 Add missing note 2020-05-20 09:20:21 -05:00
Allen Byrne
9f5fdc677a Remove const 2020-05-20 09:20:21 -05:00
Allen Byrne
344f4139d7 Fix compile error - declaration after executable statement 2020-05-20 09:20:21 -05:00
Allen Byrne
def01d7676 Adjust cache.c only variables. 2020-05-20 09:20:21 -05:00
Allen Byrne
2cff38d38e Fix include to correct memory calls - big-endian issue. 2020-05-20 09:20:21 -05:00
Quincey Koziol
091b45c02d Update h5debug to retrieve file pointer through VOL framework 2020-05-20 09:20:21 -05:00
Allen Byrne
b71046be5a Minor whitespace 2020-05-20 09:20:21 -05:00
Dana Robinson
0e133ade90 Fixed bugs in pread/pwrite I/O in VFDs.
Fixes HDFFV-10945.
2020-05-20 09:20:21 -05:00
Vailin Choi
19934f8654 More fixes for previous committed PR #2079 dated Dec 5 2019.
(1) H5O_dtype_ver_bounds[] for V112 should be H5O_DTYPE_VRESION_4
(2) The tests for the new reference types should work for V112 and beyond
2020-05-20 09:20:21 -05:00
Allen Byrne
bc69c4177b Remove duplicate instance 2020-05-20 09:20:21 -05:00
Allen Byrne
931bc7fa51 Revert and move declaration 2020-05-20 09:20:21 -05:00
Allen Byrne
d6356f58f1 Correct struct access 2020-05-20 09:20:20 -05:00
Allen Byrne
1814f0363f Fix duplicate and varname 2020-05-20 09:20:20 -05:00
Allen Byrne
1409fcee4e Fix compile and test issues from DT 2020-05-20 09:20:20 -05:00
Allen Byrne
ba4eaeb660 Add release note for sanitizer support 2020-05-20 09:20:20 -05:00
Allen Byrne
5b50f47f31 HDFFV-10979 cleanup globals 2020-05-20 09:20:20 -05:00
Allen Byrne
371439c6bd TRILABS-135 Add clang analyzers 2020-05-20 09:20:20 -05:00
Neil Fortner
958ba4c8a2 Modify H5VL initialization routines to initialize all VOL-managed object
types.  Modify H5VLwrap_register() to reject non-VOL-managed object
types.  Also fix overisights in h5trace.c from previous changes.
2020-05-20 09:20:20 -05:00
Allen Byrne
59d5321a33 HDFFV-10979 fix global name clash 2020-05-20 09:20:20 -05:00
Allen Byrne
d91fa68f27 Fix 2010 compile issues 2020-05-20 09:20:20 -05:00
Allen Byrne
34518626c4 Fix issues found with ONLY_SHARED_LIBS option 2020-05-20 09:20:20 -05:00
Richard Warren
c1eae1a659 Change from using H5Dcreate to H5Dcreate2 2020-05-20 09:20:20 -05:00
Allen Byrne
85bf828d0c Correct assignment 2020-05-20 09:20:20 -05:00
Allen Byrne
64da9d289b Fix java include, h5watch and remove clang tool. 2020-05-20 09:20:20 -05:00
Allen Byrne
c054c43a9f Add missing filenames 2020-05-20 09:20:20 -05:00
Chris Hogan
e7895c4b3a Update RELEASE.txt with performance improvements 2020-05-20 09:20:20 -05:00
Allen Byrne
1401be4805 HDFFV-10974 Change defines to eliminate Windows conflict 2020-05-20 09:20:20 -05:00
Chris Hogan
c5a7afb7a0 Add RELEASE.txt entry for Jira 10934 2020-05-20 09:20:20 -05:00
Allen Byrne
271432db35 Add H5Rdestroy calls to cleanup 2020-05-20 09:20:20 -05:00
Allen Byrne
ff35d0e423 Remove problem tests for now 2020-05-20 09:20:20 -05:00
Allen Byrne
ed40350312 Add new test reference 2020-05-20 09:20:20 -05:00
Allen Byrne
768d9897b6 HDFFV-10876 fix compare reference 2020-05-20 09:20:20 -05:00
Allen Byrne
a768dd5a0c HDFFV-10876 ignore old reference API tests 2020-05-20 09:20:20 -05:00
Allen Byrne
7319765239 Add missing quotes 2020-05-20 09:20:20 -05:00
Allen Byrne
82751ecbb9 Fix windows 10 compile error 2020-05-20 09:20:20 -05:00
Allen Byrne
c7fe3b143b Correct indentation 2020-05-20 09:20:20 -05:00
Allen Byrne
70b7848c8e Revert declaration used in macro. 2020-05-20 09:20:20 -05:00
Dana Robinson
fe1f87bc5c Minor tweaks noticed while going over VOL documentation. 2020-05-20 09:20:20 -05:00
Neil Fortner
79557814af Add note to RELEASE.txt for H5Sselect_adjust. 2020-05-20 09:20:20 -05:00
Neil Fortner
9f77be02e5 Add RELEASE.txt note for H5Sselect_project_interesection 2020-05-20 09:20:20 -05:00
Allen Byrne
91a6e37dbc Revert declaration deletion. 2020-05-20 09:20:20 -05:00
Neil Fortner
6d5169c1da Add RELEASE.txt note for HVLget_file_type() 2020-05-20 09:20:20 -05:00
Allen Byrne
64af1dab2c HDFFV-10876 add note 2020-05-20 09:20:19 -05:00
Allen Byrne
56249af938 Address compile warnings 2020-05-20 09:20:19 -05:00
Richard Warren
972ce40f36 Fixed PR issues pointed out by Allen 2020-05-20 09:20:19 -05:00
Richard Warren
41eada6dac Remove the Copyright UofI per Larry's guidance 2020-05-20 09:20:19 -05:00
Richard Warren
62639a4568 Adds a new t_2Gio.c MPI test 2020-05-20 09:20:19 -05:00
Allen Byrne
14578dabd4 Fix compile errors - mostly in jni 2020-05-20 09:20:19 -05:00
Jerome Soumagne
56d210ac3f Fix H5VL_token_t type and fix H5VL_loc_by_token to use H5VL_token_t * 2020-05-20 09:20:19 -05:00
David Young
7bbe57d309 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.

An interesting side-effect that we probably should *not* rely on is
that the struct-encapsulation changes the alignment so that some GCC
warnings about casts that increase the alignment requirement of the
operand go away.  Warnings like that have to be taken seriously:  I will
add -Werror=cast-align to the default compiler flags so that they stop
the build quickly.

GCC warnings led me to some surprising casts in test/trefer.c. I found
that it was possible to make many simplifications after introducing the
struct-encapsulation that I described, above.

In test objcopy_ref `same_file` is assigned but never used.  Delete it.
2020-05-20 09:20:19 -05:00
Neil Fortner
d00c5685b6 Implement support for using H5Dvlen_get_buf_size with
non-native VOL connectors.
2020-05-20 09:20:19 -05:00
Vailin Choi
44e8fe048b Two fixes:
(1) Set the version for reference datatype messge to H5O_DTYPE_VERSION_4.
(2) Verify the decoded version for hyperslab selection.
2020-05-20 09:20:19 -05:00
Neil Fortner
1ece440e78 Add H5VL_MAP_OPTIONAL operation id (unused currently). 2020-05-20 09:20:19 -05:00
Allen Byrne
64601e9a96 HDFFV-10876 Update dump to match DDL spec 2020-05-20 09:20:19 -05:00
Dana Robinson
e4f9ad3dbb Yanked -Wc++-compat from the flags used to build the C library in both
the Autotools and CMake.
2020-05-20 09:20:18 -05:00
Allen Byrne
715374934d Add extra line 2020-05-20 09:20:18 -05:00
Allen Byrne
6a8a3f826d Adjust whitespace 2020-05-20 09:20:18 -05:00
Allen Byrne
19e6c0b26a Update h5ls help and rework dump_mem routines for attrs 2020-05-20 09:20:18 -05:00
Allen Byrne
bb26e035e6 Update create calls 2020-05-20 09:20:18 -05:00
Allen Byrne
417b890436 Add debug compile option as comment 2020-05-20 09:20:18 -05:00
Allen Byrne
1e32da3e3f Update reference calls 2020-05-20 09:20:18 -05:00
Neil Fortner
d2b93dbc9e Fix issues with using H5Pget_fill_value() with file datatypes retrieved
from H5VLget_file_type().
2020-05-20 09:20:18 -05:00
Neil Fortner
08d6ed84b7 Add support for scalar dataspaces to H5Sproject_intersection. Add
checking for ank validity.
2020-05-20 09:20:18 -05:00
Dana Robinson
57b38f58bd Fixed missing blob callbacks in test VOL connectors. 2020-05-20 09:20:18 -05:00
Allen Byrne
69937a4b8a Add missing javadoc for new arg 2020-05-20 09:20:18 -05:00
Allen Byrne
2a30c55439 Update data output reference 2020-05-20 09:20:18 -05:00
Allen Byrne
8972b96622 Update reference files and fix int as string 2020-05-20 09:20:18 -05:00
Jordan Henderson
f56dbdc823 Add OAPL parameter to H5Rcreate_ APIs 2020-05-20 09:20:18 -05:00
Chris Hogan
8c86d9a7ba Fix failing test and retain semantics for chunk cache properties in non-chunked datasets 2020-05-20 09:20:18 -05:00
Chris Hogan
8ef9cc1fc0 Add two missing calls to H5I_dec_ref for new dapl_id 2020-05-20 09:20:18 -05:00
Chris Hogan
9ae1382fb4 Community-proposed fix 2020-05-20 09:20:18 -05:00
Allen Byrne
9e2bc84d64 Update to new error text 2020-05-20 09:20:18 -05:00
Allen Byrne
60bb18eee3 Update reference files to latest output 2020-05-20 09:20:18 -05:00
Neil Fortner
fc34a593a7 Fix missing free in H5T__ref_mem_read() 2020-05-20 09:20:17 -05:00
Neil Fortner
175a14466c Fix bugs in H5VL file comparison code. Add short circuit success to
H5VL_cmp_connector_cls().
2020-05-20 09:20:17 -05:00
Neil Fortner
22ad1bd668 Implement file comparison VOL callback. Other changes to allow
references to work with non-native connectors.  There is a bug
somewhere.
2020-05-20 09:20:17 -05:00
Jerome Soumagne
267b97c3ea H5R: fix H5Tconv to check for null references
Valid for both deprecated and non-deprecated references

Update test
2020-05-20 09:20:17 -05:00
Neil Fortner
aae787569b Add support for point selections to H5S_select_project_intersection. 2020-05-20 09:20:17 -05:00
Jerome Soumagne
e1f67e8610 Remove H5VL_NATIVE_FILE_GET_FILE_ID and add H5VL_OBJECT_GET_FILE
Remove H5F__get_file_id() and use only private routine instead
2020-05-20 09:20:17 -05:00
David Young
77144641df Revert "Make a squash commit of 'Quiet some warnings by adjusting warnings level and fixing some code.' (commit 5c911d8baf)" 2020-05-20 09:20:17 -05:00
David Young
e07ca4b4a5 Revert "Oops, remove more C99 designated initializers for VS 2010 compatibility."
This reverts commit f907b511d0.
2020-05-20 09:19:38 -05:00
Neil Fortner
975a360db2 Move checking for zero offset in selection adjust calls to the selection callbacks. This makes the
procedure for checking it consistent across selection types and between
_s and _u, ensures it is always is performed even when called within the H5S package, and removes the redundant check that would occur when callins H5S_select_adjust_s() from outside the H5S package.
2020-05-20 09:19:38 -05:00
Neil Fortner
c7c302a64b Replace H5Sselect_adjust_u() and H5Shyper_adjust_s() with
H5Sselect_adjust.  Implement "adjust_s" callback for all selection
types.  Add range checking to H5Sselect_adjust().
2020-05-20 09:19:38 -05:00
Dana Robinson
fcfc5700df Trivial parameter renaming in VOL API calls. 2020-05-20 09:19:38 -05:00
David Young
10911a1176 Oops, remove more C99 designated initializers for VS 2010 compatibility. 2020-05-20 09:19:38 -05:00
David Young
dffa21d2fb Add an #include to get a function declaration. 2020-05-20 09:19:38 -05:00
David Young
c258fc10fc Don't use C99 designated initializers, they're not compatible with
Visual Studio 2010.
2020-05-20 09:19:37 -05:00
David Young
f77dbfe4ac Quiet some more maybe-uninitialized warnings---each is a false positive,
*sigh*.  This is more code that may not compile with VS2010, *sigh
sigh*.
2020-05-20 09:19:37 -05:00
David Young
765ab7ee45 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.
2020-05-20 09:19:37 -05:00
David Young
0e7dffc0dd 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.
2020-05-20 09:19:37 -05:00
David Young
9734b5993c Only use -Werror=cast-function-type with GCC 8 and later. 2020-05-20 09:19:37 -05:00
David Young
1fed8986df 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.
2020-05-20 09:19:37 -05:00
David Young
4a4f4b76cf Add new source files to CMakeLists.txt. 2020-05-20 09:19:37 -05:00
David Young
1fc2171299 Mention the -Werror= flags in libhdf5.settings.in. 2020-05-20 09:19:37 -05:00
David Young
a7c153fff1 free -> HDfree 2020-05-20 09:19:37 -05:00
David Young
312496013e Promote decleration-after-statement warnings to errors. 2020-05-20 09:19:37 -05:00
David Young
d1ceb04c5d Quiet decleration-after-statement warnings. 2020-05-20 09:19:37 -05:00
David Young
34e51def7e Move a statement under some declarations since some vintages of Visual
Studio don't like declarations after statements.
2020-05-20 09:19:37 -05:00
David Young
902cb3e0d0 Document H5D__chunk_mem_xfree_wrapper(). 2020-05-20 09:19:37 -05:00
David Young
b1be318a62 Undo accidental test deletion. 2020-05-20 09:19:37 -05:00
David Young
3a65ddc936 Oops, delete a debug printf that snuck in here. 2020-05-20 09:19:37 -05:00
David Young
9685e4fb64 Undo my changes to the HD macros, hadn't really intended those to be on
this branch....
2020-05-20 09:19:37 -05:00
David Young
c30b30258d 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.
2020-05-20 09:19:37 -05:00
David Young
2aa85f15ea Cast to the parameter type, H5VL_token_t *, instead of to unsigned char *.
(H5VL_token_t, too, probably should turn from a typedef for a
constant-length array to an array encapsulated in a struct.)
2020-05-20 09:19:37 -05:00
David Young
224653db64 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.

An interesting side-effect that we probably should *not* rely on is
that the struct-encapsulation changes the alignment so that some GCC
warnings about casts that increase the alignment requirement of the
operand go away.  Warnings like that have to be taken seriously:  I will
add -Werror=cast-align to the default compiler flags so that they stop
the build quickly.

GCC warnings led me to some surprising casts in test/trefer.c. I found
that it was possible to make many simplifications after introducing the
struct-encapsulation that I described, above.
2020-05-20 09:19:37 -05:00
David Young
386138daa3 In every instance, x is initialized by memcpy, but GCC isn't smart
enough to figure that out.  Quiet some warnings by always initializing
`x` to 0.
2020-05-20 09:19:37 -05:00
David Young
7605df3cf0 same_file is assigned but never used. Delete it. 2020-05-20 09:19:37 -05:00
David Young
354fca5b59 Don't assign a constant string to a pointer to non-constant character. 2020-05-20 09:19:37 -05:00
David Young
cbd2e29914 GCC isn't smart enough to realize that fill_c is always initialized
and exclusively used in `datatype == H5T_COMPOUND` branches, so just
initialize it at its declaration so that GCC doesn't warn.
2020-05-20 09:19:37 -05:00
David Young
7638fbb258 I'm not sure what the previous code was trying to do, casting an array
of `hsize_t`, `start`, to `long long`, but I think the way that I have
rewritten it, it probably produces a more useful result?  As a bonus,
GCC has stopped warning about it.
2020-05-20 09:19:37 -05:00
David Young
1132ed87bc Quiet a warning about an unused variable. This code looks like it
should be heavily restructured to avoid the use of globals like `pass`,
but that's a project for another day and another person.
2020-05-20 09:19:37 -05:00
David Young
6b80036fde Straggler from previous commit: build and link the new .c files where I
moved some previously-static variables and functions that were causing
unused-variable/function warnings.
2020-05-20 09:19:37 -05:00
David Young
ad2b1fa0c5 Explicitly initialize type_flags; the compiler does not realize that
it is set before use by passing it as a reference to another function.
2020-05-20 09:17:27 -05:00
David Young
395d4f0716 Initialize a couple of return values to avoid used-before-set warnings. 2020-05-20 09:17:27 -05:00
David Young
1f7fdfe14c Initialize a couple of variables that the compiler does not realize are
initialized when they're passed by reference to functions.
2020-05-20 09:17:27 -05:00
David Young
ca0fcd34f3 To quiet a warning, initialize some struct timevals that the compiler
does not realize are always set before use by `gettimeofday`.
2020-05-20 09:17:27 -05:00
David Young
0206b1055e Move some static functions and variables to .c files to avoid unused
function/variable warnings.
2020-05-20 09:17:27 -05:00
David Young
f7699a7be4 Delete unused variable. 2020-05-20 09:17:27 -05:00
David Young
4440ccca7d Change a signed variable to unsigned to avoid a warning about the sign
being lost by a cast.
2020-05-20 09:17:27 -05:00
David Young
46ed46aa72 Avoid unused-variable warnings: change static const strings in a couple
of header-file templates to #defines.
2020-05-20 09:17:27 -05:00
David Young
f089da9c15 Demote errors to warnings for a couple of unused-but-set variables that
I cannot untangle right now.
2020-05-20 09:17:27 -05:00
David Young
ea084e6383 Delete an unused variable. 2020-05-20 09:17:27 -05:00
David Young
440bf2fc34 Mark an unused parameter H5_ATTR_UNUSED. 2020-05-20 09:17:27 -05:00
David Young
72a8f38a9f Delete variables that are unused or set and unused. 2020-05-20 09:17:27 -05:00
David Young
7b601c2611 Initialize a variable before its first use. 2020-05-20 09:17:27 -05:00
David Young
2b863a8119 Change some GCC warnings to errors. Fix code to quiet some warnings. 2020-05-20 09:17:27 -05:00
Allen Byrne
5069cbf96f Remove unneeded flag overwrites 2020-05-20 09:17:26 -05:00
Chris Hogan
ba7db398e0 Add documentation for H5CX_get_ohdr_flags 2020-05-20 09:17:26 -05:00
Chris Hogan
847a16dccc Add object header flags to API context
Add missing DCPL to API context state
Replace a couple LCPL H5P_get calls with H5CX_get_*
2020-05-20 09:17:26 -05:00
Chris Hogan
45f56375dc Use major error code of calling package 2020-05-20 09:17:26 -05:00
Chris Hogan
e5b0979bf7 Handle H5CX_state_t for lcpl 2020-05-20 09:17:26 -05:00
Chris Hogan
d596963eb9 Add character encoding to lcpl context 2020-05-20 09:17:26 -05:00
Chris Hogan
7555de2a26 Change LC property name from 'create_intermediate_group' to 'intermediate_group' 2020-05-20 09:17:26 -05:00
Chris Hogan
d4fb9dbc61 Use API context to store/retrieve LCPL when creating intermediate groups 2020-05-20 09:17:26 -05:00
Neil Fortner
49a4f6e64b Modify H5Ssel_iter_get_seq_list() to accept iterators that have reached
the end of iteration (returning zero sequences).  Previously it could
cause an assertion failure.
2020-05-20 09:17:26 -05:00
Allen Byrne
753e0ff0c9 Comment correction 2020-05-20 09:17:26 -05:00
Allen Byrne
b7e1dd706c Minor correction 2020-05-20 09:17:26 -05:00
Allen Byrne
820baf8531 Update list of tested platforms 2020-05-20 09:17:26 -05:00
Allen Byrne
66fc35d49c Add VS2019 support 2020-05-20 09:17:26 -05:00
Richard Warren
c77bda497a Fixed the H5_mpi_get_bigio_count function prototype 2020-05-20 09:17:26 -05:00
Allen Byrne
ac3ffbeff9 Correct file extension 2020-05-20 09:17:26 -05:00
Neil Fortner
0d9624b4d5 Implement public H5Sselect_project_intersection(). Updated internal
algorithm to (optionally) avoid sharing selection data structures.
Tested internal code (including with valgrind) by setting VDS code to
avoid sharing selection, has since been changed to share selection for
performance, so this code is not yet tested in regression tests.  API
has not been tested.
2020-05-20 09:17:26 -05:00
David Young
e067612d25 Use HD prefix. 2020-05-20 09:17:26 -05:00
Neil Fortner
814d5c3875 Fix issue where H5R__reopen_file did not make the file "post open"
callback.
2020-05-20 09:17:26 -05:00
David Young
058d7a1b3c Apparently, + has no special meaning, and neither does \+, in so-called
"obsolete" / POSIX "basic" regular expressions.  Also, not every version of
`sed` out there supports the `-E` option.  So delete the -E flag and use
the regex `[^/][^/]*` instead of `[^/]+`.

Add config/netbsd to the MANIFEST.
2020-05-20 09:17:26 -05:00
Neil Fortner
31fd2e60c7 Implement H5VLget_file_type() to return a copy of a datatype with the
location set to be in a file.  Only meant to be used by VOL connectors.
Implement H5VLpeek_connector_id() to support connectors querying their
own IDs.  Fix app_ref with connector IDs in a couple places (external
VOLs registered as default through ENV should be visible to the
application).  Modify vlen and reference interfaces to work with
arbitrary VOL connectors.  Implement file "post open" specific
callback, to enable connectors to update their file structs after a
wrap context has been set.
2020-05-20 09:17:26 -05:00
Allen Byrne
1e7387a5f8 HDFFV-10876 Update h5dump and h5ls for new ref api. 2020-05-20 09:17:26 -05:00
David Young
408146236d Make these scripts relocatable again: derive a relative path for the
original installation prefix from the examples prefix.  Use that
relative path to locate the current installation prefix, always.  Fall
back to an absolute installation prefix if the relative path cannot be
derived.
2020-05-20 09:17:25 -05:00
David Young
3fee0cf435 Get the path to prefix right: needs a ../ to back out of subdirectory
c/.
2020-05-20 09:17:25 -05:00
David Young
94ecdfe1a3 Make this script relocatable again: derive a relative path for the
original installation prefix from the examples prefix.  Use that
relative path to locate the current installation prefix, always.  Fall
back to an absolute installation prefix if the relative path cannot be
derived.
2020-05-20 09:17:25 -05:00
David Young
8d3d457890 Let us override the examples directory using --with-examplesdir=DIR.
This is handy for NetBSD where HDF5 examples are installed
by convention in $prefix/share/examples/hdf5/ rather than in
${prefix}/share/hdf5_examples/, which is the HDF5 default.

Place hdf5_examples/ under ${datarootdir} which on most systems will be
${prefix}/share/, anyway.
2020-05-20 09:17:25 -05:00
Jordan Henderson
4c481e5564 Partial fix for HDFFV-10792 2020-05-20 09:17:25 -05:00
David Young
2943ab87e0 Add missing newline to dbgf() statement. 2020-05-15 12:26:40 -05:00
David Young
eb69be608d Make -q actually quiet the program. 2020-05-15 12:24:52 -05:00
David Young
a2ad44f419 Make the personality detection more robust like I did for
vfd_swmr_zoo_writer, previously.
2020-05-15 12:20:21 -05:00
David Young
ad79ca8ae7 Let us change the chunk size with command-line options, -r rows and -c
columns.  If the number of datasets is greater than the number of steps,
then only pause between steps, do not pause between individual datasets
written/verified.  Otherwise, pause between each dataset written/verified.
2020-05-15 11:36:00 -05:00
David Young
2fe43bd423 Fix inverted logic: report "soft" errors if there were *not* 0 of them. 2020-05-13 11:46:54 -05:00
David Young
89bf6de17f This test doesn't need to log/modify traps in the global heap, so don't
provide a H5HG_trap() routine.
2020-05-13 11:46:30 -05:00
David Young
b4813b0c54 In H5FD_vfd_swmr_read(), do not verify checksums on shadow entries
that are longer than the buffer that the caller supplied: the checksum
usually will fail, but that's not actually a fatal condition, and
usually we will have another opportunity to verify the checksum.

In H5FD_vfd_swmr_read(), remove a bunch of disused code.

In H5FD_vfd_swmr_read(), do not re-read a shadow image that has a
bad checksum, because a bad checksum indicates a serious problem
(writer outran reader, OS defect, hardware failure) from which
H5FD_vfd_swmr_read() cannot recover.

Rationale: the writer write(2)s new shadow images before the new index,
and the new index before the new header.  In H5FD_vfd_swmr_read(),
the reader has read(2) both the index and the header in full.  POSIX
semantics indicate that in these circumstances, the last shadow image
write(2) MUST be completely visible when we read(2).  That is, the index
write(2) & read(2) and the header write(2) & read(2) pair cannot
divide a preceding shadow-image write(2).

The reader may see a "torn" image at this juncture if, for example,
the writer got max_lag ticks ahead of it and reused the storage for
this shadow image.  Even if the reader "recovers" by re-reading the
image until its checksum is correct, it cannot be sure that the
image thus read is the right one for the HDF5 address passed to
H5FD_vfd_swmr_read(), and it cannot be sure that the image thus read is
not stale, because it's operating with an out-of-date shadow index.

Add log outlets swmr_read, swmr_read_exception, and swmr_read_err.
Log to `swmr_read` on entry to H5FD_vfd_swmr_read(), log to
`swmr_read_exception` when checksums are skipped for exceptional
conditions (page buffer not configured, buffer shorter than shadow
image), and log to `swmr_read_err` when the checksum fails.
2020-05-13 10:30:00 -05:00
David Young
92142cba38 When an entry changes size, remove it from the tick list and add it back
to keep the cumulative bytes in the tick list up-to-date.  That prevents
an assertion, later.
2020-05-11 18:06:23 -05:00
David Young
cc6e4055cb Don't initialize seed without need. NFCI. 2020-05-11 17:24:53 -05:00
David Young
562d5beab2 Look for the personality in the program name *suffix*, because on
`jelly` libtool adds an `lt-` prefix to the program name.
2020-05-11 15:17:42 -05:00
David Young
8ed6529fc0 In H5MF__xfree_impl(), always invalidate the page-table entries
overlapped by the freed region.  Previously, the page-table entries were
only freed on one success path through _xfree_impl().
2020-05-11 15:14:58 -05:00
David Young
4b61113d2f Split VFD_SWMR_TEST_FOR_END_OF_TICK() into VFD_SWMR_ENTER() and
VFD_SWMR_LEAVE() for use by FUNC_ENTER_API/_LEAVE_API macros.  In the
macros, don't HGOTO_ERROR(), since that will jump back to the `out`
label, but HDONE_ERROR() on error, instead.
2020-05-08 19:33:15 -05:00
David Young
35a4bfb551 Extend VFD SWMR tick length and maximum lag parameters. 2020-05-08 19:32:24 -05:00
David Young
d1de9d695f Delete extra line. NFCI. 2020-05-08 19:32:09 -05:00
David Young
561974d329 Add missing return-value check. 2020-05-08 19:31:54 -05:00
David Young
a69c33af13 Take care not to leak property lists or data spaces. 2020-05-08 19:31:32 -05:00
David Young
b7c05d2231 Fix bugs in the dataset dimensions checks. 2020-05-07 14:34:34 -05:00
David Young
5d4b109abf Create a reader for the extensible datasets tests. 2020-05-07 12:09:15 -05:00
David Young
f8e494ba80 Add my work-in-progress dataset test. It writes a handful of datasets
that expand in one or two dimensions, depending on the setting of the -d
option argument.
2020-05-06 15:01:29 -05:00
David Young
696173c284 Add esnprintf that prints to the given buffer, observing the given
buffer size, using vsnprintf(3), but exits with err(3)/errx(3) if the
buffer is too small or if vsnprintf returns < 0.
2020-05-06 14:44:59 -05:00
David Young
c07a958e1d Insert a random delay between zoo-writer test steps. Let us control
the random seed with an environment variable, H5_ZOO_STEP_SEED, and the
maximum delay in milliseconds with a command-line option, `-m ms`.
2020-04-30 15:39:35 -05:00
David Young
fdeeac1c1b Use a one-character buffer to send/receive messages to/from
writer/reader, since that's all we need.  Avoid deadlock by flushing the
file before waiting for the reader's message.
2020-04-30 15:26:39 -05:00
David Young
57e5c4305c Avoid deadlock of reader and writer: make the writer flush file content
before waiting for the reader's message.
2020-04-30 15:22:36 -05:00
David Young
becb9d8292 In fetch_env_ulong(), report a parse that consumes fewer than all
characters differently than other parse failures.
2020-04-30 15:21:26 -05:00
David Young
a5ca065b7c Add a rudimentary zoo test to the VFD SWMR test script.
Briefly describe the variable-length test with a comment.
2020-04-28 10:27:55 -05:00
David Young
17a1789b85 Change some fprintf callss to dbgf calls, and increase the debug level
of several dbgf statements from 1 to 2 so that `-q` quiets them.
2020-04-28 08:44:35 -05:00
David Young
a204a184aa Let catch_out_err_and_rc() callers redirect the standard input and
output streams using STDIN_PATH and STDOUT_PATH.  I will use that for
the zoo reader and writer.  Move redirection of standard error output to
the standard output stream outside of the curly braces, since usually
I want to save the `echo` and `wait` output, too, and it makes the
redirection of the supervised program a little easier to follow, I
think.
2020-04-28 08:40:58 -05:00
David Young
4e48041a13 Move fetch_env_ulong() from vfd_swmr.c to vfd_swmr_common.c for eventual
reuse by the zoo writer.
2020-04-28 08:35:12 -05:00
David Young
d16006c45d To avoid name clashes, rename FILENAME -> COMMON_FILENAME in
test/vfd_swmr_common.h and in all files that #include it.  Now I can
2020-04-27 10:28:10 -05:00
David Young
068399054a Implement the remainder of the delete/validate-delete cases. 2020-04-23 16:03:29 -05:00
David Young
8966557705 Flesh out the delete/validate-deletion tests. Extract a shared
subroutine.
2020-04-23 15:33:39 -05:00
David Young
a9849089c6 Delete dead code. Re-enable the coordination between reader and writer:
the writer expects to read a character on its standard input stream when
the reader is ready for it to delete the zoo content.
2020-04-23 15:31:56 -05:00
David Young
b1e2eceed7 Let the reader-side tick instrumentation know about the first tick read
from the shadow file.
2020-04-23 15:29:53 -05:00
David Young
a0b6979c6f Relax an assertion condition. 2020-04-23 15:29:17 -05:00
David Young
3cc2644c70 Bug fix: in the freespace manager, use a new routine,
H5PB_remove_entries(), to remove *all* pages overlapped by the freed
space, instead of just the first one.
2020-04-23 15:26:25 -05:00
David Young
744ff2b84d Delete an assertion that doesn't hold true for multipage entries. 2020-04-21 16:42:59 -05:00
David Young
13e930d306 Add a skip compact configuration for skipping the "zoo" tests for
compact datasets.

Bundle the zoo-test configuration into a new type, zoo_config_t.

Add a couple new "zoo" test phases, "delete" and "validate-deletion", to
the existing "create" and "verify" phases.  Give names and numbers to
all phases with the new `enum`, `phase_t`, and refactor so that tend_zoo
runs a selection of phases at each step.

Stub the "delete" and "validate-deletion" phases for most test steps.
Actually implement for compact dataset (ds_cpt_i) test.

In tend_zoo(), delay for 50 milliseconds after running all steps.
Really, this should delay after each step....

Implement vfd_swmr_writer_may_increase_tick_to() and
vfd_swmr_reader_did_increase_tick_to() with a file that reader and
writer share.  The reader saves its current tick number in the shared
file.  The writer does not advance its tick number past the reader's.
Collect some statistics in vfd_swmr_writer_may_increase_tick_to() and
print them before the writer exits.

Add option flags for skipping compact dataset tests (-C) and for
printing error stacks (-e).  Update the usage message, which was
stale before the new options were added.

Delete some dead code.

Add #if 0'd-out code for the reader to wait for the writer before
running "delete" and "validate-deletion" steps.
2020-04-21 15:39:25 -05:00
David Young
de18e8c95a Make await_signal() await any signal instead of just SIGINT. Add a
(commented out) private version of strsignal(3), just in case we need
one on some platform.
2020-04-21 15:19:19 -05:00
David Young
95105d3fac Prevent a spurious assertion by using the correct index, oops! 2020-04-21 14:24:01 -05:00
David Young
b1de3197d3 Delete an empty line. NFCI. 2020-04-21 14:23:23 -05:00
David Young
62ae44da95 Straggler from last: provide stub implementations
of vfd_swmr_writer_may_increase_tick_to() and
vfd_swmr_reader_did_increase_tick_to().
2020-04-21 14:20:52 -05:00
David Young
1d9ab42c57 Add a second bool argument to H5F_vfd_swmr_writer_end_of_tick() that
tells whether the call may wait for the reader tick to catch up.

Add stub routines vfd_swmr_writer_may_increase_tick_to() and
vfd_swmr_reader_did_increase_tick_to() for tests---e.g.,
vfd_swmr_zoo_writer/_reader---to use to coordinate their tick numbers.

vfd_swmr_writer_may_increase_tick_to(new_tick, wait_for_reader) returns
true if the writer may increase its tick number to `new_tick` without
overrunning the reader.

A reader uses vfd_swmr_reader_did_increase_tick_to() to tell a writer
that its tick number has increased.
2020-04-21 14:17:15 -05:00
David Young
ea51b2e095 Condense H5F_vfd_swmr_close_or_flush() for readability: remove
unnecessary comments and trim whitespace.  Remove unnecessary backslash
line continuations and add semicolons to HGOTO_ERROR() statements.
NFCI.
2020-04-21 14:10:00 -05:00
David Young
f05358b410 Quiet some used-before-initialized warnings. 2020-04-20 16:15:48 -05:00
David Young
53cb28016d Straggler from last: retire vfd_swmr_writer_g. 2020-04-20 16:08:25 -05:00
David Young
aee40b370d Retire globals vfd_swmr_writer_g and end_of_tick_g. 2020-04-20 16:05:27 -05:00
David Young
fc36f53115 Quiet some used-before-initialized warnings and, while I am here,
initialize one variable with a named constant instead of -1.
2020-04-20 15:55:03 -05:00
David Young
752af2134f Stragglers from previous: globally declare some hlog outlets and add
declare some new functions.
2020-04-16 17:04:21 -05:00
David Young
69e95c3748 Add a log outlet for metadata cache (MDC) invalidations,
`mdc_invalidation`, and use it to log a message when
H5C_evict_or_refresh_all_entries_in_page() does not find any affected
entries.

Pass a page length to H5C_evict_or_refresh_all_entries_in_page() so that
it can assert if a multipage eviction overlaps a single-page entry,
which had better not happen.

Fix a bug in H5F_vfd_swmr_reader_end_of_tick() and heavily rework it:
remove page-table entries and evict/refresh MDC entries that overlap
*added* shadow-index entries.  Because we didn't do that before, in the
zoo test, the reader didn't see all of the changes made by the writer
until the writer closed the file:  MDC entries covered the new content
in the shadow file.

In H5F_vfd_swmr_reader_end_of_tick(), log changes to the shadow index
with the new outlet, `shadow_index_update`.

Convert a some of John's disused diagnostic printfs to an
`hlog_fast(eot, ...)` call.
2020-04-16 17:03:25 -05:00
David Young
71b7a186ef Delete unused line, shorten a comment, wrap some lines, add missing
semicolons and curly braces.  NFCI.
2020-04-16 16:36:27 -05:00
David Young
9c6b5a270c Re-enable reclamation of disused shadow-index entries. 2020-04-16 16:20:56 -05:00
David Young
98838cb0f3 Remove unnecessary pointer test: it cannot possibly be NULL. 2020-04-16 16:16:12 -05:00
David Young
ad4206a604 Remove gratuitous initialization, comment, and assertions. 2020-04-16 16:13:59 -05:00
David Young
6f65412b76 Extract a subroutine, H5F_vfd_swmr_process_eot_queue(), from the
end-of-tick processing macro.  H5F_vfd_swmr_process_eot_queue() looks
for files due for end-of-tick processing and calls either the reader or
writer EOT routine.

Always call the reader/writer EOT routines with an actual H5F_t instead
of NULL.
2020-04-16 16:08:15 -05:00
David Young
21f3fae469 Refactor: extract subroutine estack_get_state() for reuse in a commit
that's coming soon.
2020-04-16 15:30:27 -05:00
David Young
86be273386 Send debug messages to stderr instead of to stdout. 2020-04-16 15:29:26 -05:00
David Young
1f563c80b5 Improve diagnostic logging. 2020-04-16 15:26:00 -05:00
David Young
c69d756f75 Oops, properly the outlet symbol-name prefix with the rest of the symbol
name, so the symbols are not prefixed with `HLOG_PREFIX` but with
`hlog_gbl_`.
2020-04-16 15:21:09 -05:00
David Young
aebeeada31 When hlog_set_state() changes the state of an outlet, reset each
outlet's cached state so that its state is reevaluated.
2020-04-16 15:18:51 -05:00
David Young
6bf7e1cada Log page-buffer reads and writes no matter what storage type. (Used to
log only the global heap-type reads and writes.)
2020-04-16 15:02:15 -05:00
David Young
f51f69faad Re-wrap paragraphs at < 80 columns. 2020-04-15 09:44:14 -05:00
David Young
4b40738946 Mark a task complete, fix some typos, wrap some paragraphs. 2020-04-15 09:40:17 -05:00
David Young
671c28bfad Put multiline if-body in curly braces, repair indentation, remove
gratuitous backslash line continuation, add missing semicolons.
2020-04-14 12:15:49 -05:00
David Young
a6d7004c03 Wrap a line before 80 characters. NFCI. 2020-04-14 10:55:53 -05:00
David Young
4dc315dfb7 Document hlog a bit. 2020-04-14 09:04:18 -05:00
David Young
43b8671231 Change the prefix for hlog_outlet_t's from log_ to hlog_gbl_ to avoid
namespace pollution.  Use a `#define HLOG_PREFIX hlog_gbl_` so that I
can change all of the prefixes in one place if need be.
2020-04-13 17:10:30 -05:00
David Young
03a91f3cf5 Add a log outlet, tick, and log some changes to the tick number there.
While I'm here, assert in the reader that the tick number hasn't leapt
forward by more than max_lag ticks.
2020-04-13 16:16:53 -05:00
David Young
5248e9f2c5 tick_num_g has been gone for a while, so do not refer to it in
comments any longer.
2020-04-13 16:14:01 -05:00
David Young
647091ab53 Add clean_shadow_index() for removing shadow-index entries that were
flushed more than max_lag ticks ago.  This conserves space in the shadow
file, which would grow great big while the `credel` demo ran.
2020-04-13 16:02:55 -05:00
vchoi
2b5dbc7d42 Add H5MV split method for alignment. 2020-04-13 14:52:26 -05:00
David Young
1ce8ff1fea Check whether or not the shadow entry size is different from the
pagebuffer entry size.  If the sizes are different, then release the old
shadow space (using the correct size) and set the shadow page number to
0 so that H5F_update_vfd_swmr_metadata_file() will allocate new shadow
space with the right size.

Vailin says that this fixes the bug she found, where a 4096-byte buffer
allocated by H5MV_alloc() is released with H5MV_free() as if it was 8192
bytes long.
2020-04-13 12:10:02 -05:00
David Young
8ec3ad3d93 Be brief: remove commas and equal signs from diagnostic log messages. 2020-04-08 10:13:00 -05:00
David Young
6d0d1b490b Fix spelling in a comment. 2020-04-08 10:12:15 -05:00
David Young
c1b655b568 Count failures of the variable-length string tests as "soft errors"
that don't count as VFD SWMR test failures.

The variable-length string tests are nondeterministic, so we expect them to
fail, and they do fail quite often on `jelly`, for example.
2020-04-07 16:36:16 -05:00
David Young
25968a795b Add a new log outlet and change an fprintf(stderr, to an
`hlog_fast(lengthen_pbentry,`.  This quiets one of the VFD SWMR tests.
2020-04-07 10:56:50 -05:00
David Young
1292630c62 Straggler from previous: declare the new shadow_index_reclaim log
outlet.
2020-04-07 10:51:23 -05:00
David Young
3aaa7a4f27 Don't try to free a NULL pointer. 2020-04-07 10:51:00 -05:00
David Young
a3262d2274 Quiet a warning about the variable being used before it is initialized.
Looks like the compiler actually was wrong, but this is a harmless
change to make.
2020-04-07 10:50:08 -05:00
David Young
7b83633d5e Simplify H5PB_vfd_swmr__update_index(), which figures in
my investigation of shadow-file freespace leaks.

Copy the tick number from the H5F_shared_t to a temporary variable
and use the temporary instead of spelling out `shared->tick_num`.

Assert that every entry on the tick list is dirty, since clean
entries will not appear on the tick list.  Mark each corresponding
shadow-index entry dirty, and set its "tick of last change" to the
current tick and "tick of last flush" to 0.  This makes the scan
for entries that do not appear on the tick list more believable.

Lower staircase in the loop that scans for shadow-index entries that
did not appear on the tick list.  Log indicies that are marked for
reclamation.
2020-04-07 10:39:33 -05:00
David Young
46832e59ec Declutter: remove superfluous comment and assertion. NFCI. 2020-04-07 09:45:00 -05:00
David Young
d9ee55cbd9 Remove extraneous whitespace. NFCI. 2020-04-07 09:44:35 -05:00
David Young
1137ffef6a After adding a shadow page to the deferred free list, set the entry's
page number to 0 so that we cannot free it again by accident.
2020-04-07 09:41:49 -05:00
David Young
8d6c1eca16 Add a log outlet and shorten the name of an existing outlet. 2020-04-07 09:22:07 -05:00
David Young
25bafe0063 Fix the width of an index variable. 2020-04-07 09:21:27 -05:00
David Young
a788202831 If the shadow-index size is 0 in the current step, don't calloc(3)
anything, since calloc(0, ...) is undefined.
2020-04-06 12:32:54 -05:00
David Young
9678dcffbf Make some changes to conserve filespace and ensure that all filespace is
eventually reclaimed.

Defer reclamation of raw data filespace, only.

XXX Deferring only raw-data reclamation isn't *quite* sufficient because
XXX a writer could conceivably reuse metadata space as raw-data space
XXX before max_lag ticks have elapsed.  Readers could see metadata
XXX corrupted by raw data.

Once a file starts to close, stop deferring reclamation.

In H5MF_free_aggrs(), perform all deferred reclamations if the file is
closing.
2020-04-06 12:32:20 -05:00
David Young
fd079a2357 Improve diagnostic logging. 2020-04-02 15:58:12 -05:00
David Young
1041983d87 Standardize and shorten diagnostic messages to help my search for the
leak of shadow-file space.
2020-04-02 15:56:22 -05:00
David Young
a1175c1b98 Remove superfluous comment. Remove unnecessary variable
initializations: the compiler will tell us if the variables are used
before they're set.  NFCI.
2020-04-02 15:54:29 -05:00
David Young
40c638dcab Remove superfluous whitespace, insert whitespace around / operator,
repair for-loop indentation.  NFCI.
2020-04-02 15:53:44 -05:00
David Young
9c957495db Update comments, shorten comments, remove superfluous comments. 2020-04-02 15:53:02 -05:00
David Young
9b5384b436 Add a reader personality to vfd_swmr_zoo_writer. Remove the disused
`-t` option.  Disable the error stack across create_/validate_zoo()
calls.
2020-03-31 13:14:59 -05:00
David Young
69fcb52eca Prepare for reuse in vfd_swmr_zoo_{reader,writer}: in
validate_zoo()/check_zoo(), instead of checking/modifying the global
variable `pass`, just return `false` on failure, `true` on success.
Update test `cache_image` to match.
2020-03-31 13:13:39 -05:00
David Young
817756a0e0 Rename process_deferred_frees as H5MF_process_deferred_frees and make it
available to other files.  Make the tick number a parameter instead of
using the f->shared->tick_num, so that we can pass a maximal tick number
and that way reclaim all of the deferred frees.
2020-03-31 12:54:10 -05:00
David Young
da70686a5a Fix whitespace at end (beginning?) of line. NFCI. 2020-03-31 09:52:11 -05:00
David Young
928c820d04 Straggler: add htri_to_string() for converting htri_t to a string
constant.
2020-03-30 14:34:27 -05:00
David Young
d0b8accbc1 Relax H5F_update_vfd_swmr_metadata_file() argument checking so that we can call
it with num_entries == 0 and a non-NULL `index`.  Delete some code that isn't
necessary if `num_entries == 0 && index != NULL` is allowed.  NFCI.
2020-03-30 13:44:44 -05:00
David Young
c7af3df890 Simplify: change if (cond) { assert(FALSE); } to assert(!cond);. 2020-03-30 13:43:47 -05:00
David Young
ba7dde8ba9 Lower staircase. NFCI. 2020-03-30 13:42:56 -05:00
David Young
53aee36c3e Delete an #ifdef H5MV_VFD_SWMR_DEBUG debug fprintf that probably never worked
quite as intended.
2020-03-30 13:40:08 -05:00
David Young
9db701e95b Add a log outlet. Replace #ifdef H5MV_VFD_SWMR_DEBUG debug fprintf's with
hlog_fast() calls.
2020-03-30 13:39:14 -05:00
David Young
db5942d3f1 Add log outlets. Convert existing #ifdef H5MF_ALLOC_DEBUG{,_MORE} debug
fprintf's to hlog_fast() calls.  Add some new hlog_fast() calls.
2020-03-30 13:37:05 -05:00
David Young
5f58844bd5 Delete ridiculous comments. Remove superfluous curly braces. NFCI. 2020-03-30 13:22:17 -05:00
David Young
989b6c2063 Delete ridiculous comment and excess for-loop whitespace. NFCI. 2020-03-30 13:22:17 -05:00
David Young
57ae4206ca Delete ridiculous comments and repair some whitespace. NFCI. 2020-03-30 13:22:17 -05:00
David Young
7d50e9c89e Be brief: turn 7 lines of if-else to one line of ?:. Be sensible: don't
assert a pointer we just dereferenced is non-NULL.
2020-03-30 13:22:17 -05:00
David Young
78fac0241a Let us use space as well as comma to separate outlet=yes|no clauses in
the HLOG environment variable.
2020-03-30 13:22:17 -05:00
mainzer
0135ec8d61 Reverted optimization in the metadata cache that avoided re-reading
the first portion of a metadata cache entry in speculative reads.
This is necessary for VFD SWMR as it presumes that metadata entries
are read and written atomically.  See comments in H5C.c / H5C_load_entry()
for further details.
2020-03-26 10:26:49 -05:00
David Young
14a8543c7a Remove a duplicate #define H5FD_TESTING line. 2020-03-24 15:39:19 -05:00
David Young
8ccff19e02 Add option flag -v for verbose messages. Alphabetize the options
switch-statement.
2020-03-24 15:35:47 -05:00
David Young
ad8460cc16 When creating a shadow index for testing, increase the page number from
one entry to the next by *at least* 1 so that the index is well-formed.
This fixes a crash that occurred with H5_SHADOW_INDEX_SEED=1585006453.
2020-03-24 15:30:09 -05:00
David Young
e7b2095809 The forced-fail index comes only from the environment, never from
time(3).
2020-03-24 15:26:40 -05:00
David Young
85f5bfb3b7 Use the name vfd_swmr_zoo.h5 for the zoo file, not vfd_swmr_vlstr.h5. 2020-03-23 14:57:58 -05:00
David Young
cb5e1ead29 Let tests provide a "hook" that runs after each step in create_zoo().
Provide a hook in vfd_swmr_zoo_writer that calls H5Fvfd_swmr_end_tick().
2020-03-23 14:55:07 -05:00
David Young
51b8fa3ffe Take a stab at a "zoo" writer for VFD SWMR: write all of the same
objects as the cache_image test does.  The zoo writer is a work in
progress.

This version is useful as a reproducer for the hang in the global heap
that I stumbled over, yesterday.  I run this to reproduce,

env HLOG="pbio=on" ./vfd_swmr_zoo_writer -W -a
2020-03-20 15:20:51 -05:00
David Young
52f8d8a1b1 Deduplicate create_zoo() and validate_zoo() and refactor for reuse by
VFD SWMR tests.

This change reduces the length of genall5.c by 171 lines.
2020-03-20 15:18:19 -05:00
David Young
a4a2dd2cc0 Add a log outlet for pagebuffer I/O and subordinate outlets for
pagebuffer reads and writes: pbio, pbrd, pbwr.  In H5PB_read() and
H5PB_write(), log only global heap accesses, for now.
2020-03-20 14:56:23 -05:00
David Young
b6b43e6dc4 Protect against an assertion during H5Fflush(): do not doubly-increment
the tick number in H5F_vfd_swmr_close_or_flush() when just flushing,
because that made the assertion in H5PB_vfd_swmr__set_tick(), that the
tick number had not increased by more than one, fail.
2020-03-20 14:26:14 -05:00
David Young
cca9617742 Use more iterations on the variable-length string reader & writer to
lower the possibility of a false test failure.
2020-03-17 17:14:08 -05:00
David Young
f7b44e40c5 In H5PB__write_meta(), extend a single-page entry when overwriting it
with multiple pages.  Update statistics to maintain consistency.

Refactor a bit: in H5PB__write_meta(), move code that's in both the if-
and else- branch to either before the if-else or after and de-duplicate.

In H5PB_vfd_swmr__update_index(), always update the length of a
shadow-index entry to the current size of its corresponding page-table
entry.

In H5PB_vfd_swmr__update_index(), disregard shadow-index entries that
await garbage collection.
2020-03-17 17:13:50 -05:00
David Young
5d94976423 Join some lines. NFCI. 2020-03-17 14:16:15 -05:00
David Young
705f52d222 Test H5Dread() for the right "success" conditions. I'm not sure how
this even appeared to work, before.
2020-03-16 17:20:43 -05:00
David Young
3d51febb37 Fix spelling, alread -> already. NFCI. 2020-03-13 14:17:39 -05:00
David Young
ae351c2376 Add tests for the two expected failure modes for variable-length (VL) strings
in VFD SWMR mode.
2020-03-13 14:16:40 -05:00
David Young
9e81f0103c Add disable_estack() and restore_estack() for disabling the current error-stack
handling and restoring the previous error-stack handling.
2020-03-12 12:27:57 -05:00
David Young
9592b80913 Mention the problems VFD SWMR has with variable-length data. 2020-03-11 14:24:59 -05:00
David Young
8cc8d63d5e Update Guide. Switch to a short and informative function name. 2020-03-11 12:50:18 -05:00
David Young
4e4c1c3850 Add my work in progress on variable-length string test for VFD SWMR. 2020-03-10 17:48:32 -05:00
David Young
ecea500047 Start a user's guide. Mention problems with variable-length data. 2020-03-10 17:21:40 -05:00
David Young
3f2e3659c2 Stop changing the type of global-heap storage to raw data before accessing the
page buffer.  Now variable-length (VL) data such as VL strings work with VFD
SWMR.  This change also makes the library more consistent in its treatment of
global-heap storage, since it's always been allocated as metadata, not raw
data.
2020-03-09 14:06:10 -05:00
David Young
1818420acd In await_signal(), print a less alarming message when exiting in normal
circumstances.

Write a comment that tells why await_signal() periodically calls the HDF5 API.
2020-03-09 13:47:26 -05:00
David Young
d0e6a1bbc6 Don't assert that an H5FD_mem_t read/written through the page buffer is not
H5FD_MEM_GHEAP, that's an out-of-date assumption.
2020-03-06 16:03:33 -06:00
David Young
ba9dd7e926 Instead of duplicating H5F_shared_block_write() and _read() wholesale in
H5F_block_write() and _read(), make the latter functions call the former.
2020-03-06 12:43:54 -06:00
David Young
20e59d90e9 Break metadata reads and writes into up to three pieces, the non-page-aligned
piece in the beginning, 1 or more full pages, and whatever is leftover at the
end.  Passes all of our tests.
2020-03-03 18:08:03 -06:00
David Young
2646ee0ba7 Add an environment variable, H5_SHADOW_INDEX_FAIL, that I can set to an
unsigned integer value that tells at which index to inject a failure
for testing purposes.  I used this to establish that I can start the
shadow-index lookup test with a previous seed and see the same tests run
again.
2020-03-02 15:45:42 -06:00
David Young
32f6a742b3 Add a test for shadow-index lookups per the specification agreed with John and
Mike and described in my email "testing estimates version 2."
2020-02-28 16:46:47 -06:00
David Young
3cb259c5a2 So that I can use PASSED(); anywhere a statement can go, #define PASSED() with
a do-while wrapper.
2020-02-28 16:44:16 -06:00
David Young
0a662ea448 No, Robb Matzke did *not* write this file. Get to the point in a
copy-and-pasted comment.
2020-02-28 16:39:25 -06:00
David Young
b233408fe8 Move the swmr log-outlet declaration to H5FDvfd_swmr_private.h and use swmr
as the parent outlet of a new outlet for messages about the motion of the
shadow index.
2020-02-28 16:36:55 -06:00
David Young
ac4afca0c2 Shave 44 lines off of H5PB_read() by gathering a bunch of checks into one if
condition, reducing diagnostic checks, single-spacing, etc.
2020-02-27 13:13:46 -06:00
David Young
42e6eba1e1 Don't re-test a condition that's assert()'d at function entry and
couldn't change in the mean time, but do be paranoid and re-assert.
2020-02-26 16:34:18 -06:00
David Young
56a9459eb5 On the reader, zero the shadow-index entries before filling fields from the
shadow file so that members like `garbage` are not filled with garbage that
fools us, later.
2020-02-26 16:31:50 -06:00
David Young
8b2ba616eb Update some comments. 2020-02-26 16:29:13 -06:00
David Young
4b70e13e14 Where n is the number of page-table/shadow-index entries, avoid spending O(n^2)
time in H5PB_dest().  While we're in H5PB_dest(), mark deleted shadow-index
entries as "garbage" and skip the O(n) shadow index-entries copy.

Rename shadow index-entry member `moved_to_hdf5_file` to `moved_to_lower_file`
while I'm in here---NFCI.
2020-02-26 16:24:42 -06:00
David Young
d859bc4ba7 Pass the right parameter, H5F_shared_t * not H5F_t *. (Grr, serious warnings
not treated as errors....)
2020-02-26 14:48:44 -06:00
David Young
9d5bb32b83 Add log outlets h5mf and h5mf_defer and write some diagnostic
messages to them.

Move and update a comment about removing (all) items from the deferred queue
before processing them.

Bug fix: don't leak file space, add back to the deferred queue all items that
were not disposed of.
2020-02-24 11:25:36 -06:00
David Young
9a29c2212b Move all frequently-read fields---ls_resolved, ls_state, ls_parent---to the top
of hlog_outlet_t so that they're likely to be in the same cacheline.
2020-02-24 11:07:47 -06:00
David Young
bdc6d8ffcd For bool, true, and false, #include <stdbool.h>. 2020-02-24 11:07:19 -06:00
David Young
ce35b2f35f Change a couple more occurrences of "sink" to "outlet." 2020-02-24 11:05:10 -06:00
David Young
1a4097e55c Don't use the __ prefix for attributes __unused and such, since that's reserved
for the system software, IIUC, and it clashes with a symbol on CentOS.
Instead, use a _ prefix.
2020-02-24 11:03:26 -06:00
David Young
48ca10f80e Improve some comments: fix typos, shorten. 2020-02-19 16:46:42 -06:00
David Young
ac1912b361 Add a log outlet for shadow-index enlargement and use it instead of
mysteriously printing "ding ding!" when the shadow index is enlarged.

While I'm here, place the new index into place regardless of whether we succeed
at the deferred free of the old index's shadow-file space.
2020-02-18 13:01:21 -06:00
David Young
323e8f8d8b Delete an out-of-date comment. 2020-02-18 13:00:00 -06:00
David Young
d19456dae2 In process_deferred_frees(), remove *all* deferred frees from the
H5F_shared_t's queue before processing any, instead of removing just one,
processing it, removing another, processing it, and so on.  While we processed
the first entry on the queue, we often called H5MF_xfree() again, which called
process_deferred_frees() again, which processed the first entry, calling
H5MF_xfree() again, and on and on, until the deferred frees list was exhausted.
This deep recursion showed up as a wide, tall stack in my flame graphs.  Taking
all deferred entries off of the queue to start definitely breaks the recursion
and saves processing time.
2020-02-18 12:43:37 -06:00
David Young
e43895e3b4 Don't perform superfluous casts. 2020-02-18 11:50:15 -06:00
David Young
a162fbbaaa Trim excess detail. Use shadow/lower file terminology. Be less wordy about
"page or multi-page entry."
2020-02-18 09:59:10 -06:00
David Young
dfd3f782ca Share latest changes: change many occurrences of "metadata" file/index/header
to "shadow" file/index/header.  Simplify the description of freespace
management.  Finish describing the floating shadow index.
2020-02-12 16:25:22 -06:00
David Young
848219ccb8 Share my latest RFC changes. 2020-02-12 13:29:32 -06:00
David Young
f99bbd565a Let us provide a default state to HLOG_OUTLET_MEDIUM_DEFN(). 2020-02-12 13:28:33 -06:00
David Young
f75430585b Add a new log outlet for individual deferred shadow frees and use it.
Rename a variable that tells whether or not we started with an empty
deferred-free list, and take care not to set it excessively.
2020-02-12 13:28:33 -06:00
David Young
ec6919449b Delete misleading "Programmer:" field and excessive decoration from the
H5FD_vfd_swmr_write() comment header.  Delete a superfluous comment.  Delete
some whitespace at EOL.  NFCI.
2020-02-12 13:28:33 -06:00
David Young
2b7347d577 Record the state of a log outlet on first use and reuse that state on
subsequent hlog_fast() calls.

While I'm here, add a typedef, hlog_outlet_t, for struct hlog_outlet, and use
it.
2020-02-12 13:28:33 -06:00
David Young
a3e6c35b2d Whitespace repair. NFCI. 2020-02-12 13:28:33 -06:00
David Young
41a8036511 Make a typedef for enum hlog_outlet_state, hlog_outlet_state_t, and use it.
NFCI.
2020-02-12 13:28:33 -06:00
David Young
47438c741a Don't declare a bunch of undefined log outlets. 2020-02-12 13:28:33 -06:00
David Young
2069224d0d Share my latest changes to the RFC. 2020-02-11 13:43:58 -06:00
David Young
89247be681 Add latest commentary on RFC. 2020-02-11 13:43:58 -06:00
David Young
4f452ea359 Call them log "outlets" not log "sinks". 2020-02-10 14:25:27 -06:00
David Young
0d94627836 Rename loglib_ / LOGLIB_ to hlog_ / HLOG_, remove the syslog-based
implementation, rename hlog_log() to hlog(), hlog_vlog() to vhlog(), et cetera.
Rename hlog_lazy() to hlog_fast().

Define some log sinks and use them in the page buffer and in VFD SWMR.
2020-02-10 13:48:35 -06:00
David Young
6500ad88a8 Rename log.c to hlog.c, add hlog.[ch] to MANIFEST. 2020-02-07 16:45:07 -06:00
David Young
76892a3ff9 Add my logging library in existing form. Abbreviate copyright notices in the
sources but put the full notices & license terms in COPYING.
2020-02-06 17:30:05 -06:00
David Young
251d62c5dd Update punch list a bit: mention the over-long postponement of shadow-index
reclamation.  Mention that a writer can delete an object out from under a
reader who holds an hid_t for it.
2020-02-06 16:06:13 -06:00
David Young
ba9dd0b871 Escape some underscores. I'm not sure if this is strictly necessary, but vim's
syntax highlighting colors some (but not all) unescaped underscores red like
there is some problem.  It's possible there is some problem, since underscores
are used to indicate some kind of emphasis---probably underlining.
2020-02-06 16:04:47 -06:00
David Young
8526d61cf4 In a comment, mention that reclamation of shadow indices is postponed for
longer than it needs to be.  NFCI.
2020-02-06 16:03:25 -06:00
David Young
0a544ce307 Extract a routine from shadow_image_defer_free(), shadow_range_defer_free(),
that works in byte offsets rather than page offsets.  Use
shadow_range_defer_free() to defer shadow-index frees.
2020-02-06 14:57:33 -06:00
David Young
5eba819f39 Avoid going back and forth between signed and unsigned in the same expression
with some casts and an unsigned constant.  This quiets GCC warnings, especially
-Wconversion, IIRC.
2020-02-06 14:22:18 -06:00
David Young
34267d8631 Fix a typo in a comment and delete whitespace at EOL. 2020-02-06 14:21:30 -06:00
David Young
afa09c80bd Use an early exit to lower a staircase. 2020-02-06 14:14:34 -06:00
David Young
b972248b73 Reduce code duplication by using vfd_swmr_pageno_to_mdf_idx_entry() to look up
shadow pages.  Reduce casts by choosing correct format strings and compatible
variable types.

Poison writes to addr by making it const.  Don't increase addr in the read(2)
loop because it's never used afterward.

Delete some more dead code.

Rename read_ptr as p and declare it much closer to its use.  Change its type to
`char *` so that no casts are necessary to increase it.
2020-02-06 14:14:34 -06:00
David Young
fcd9e78f8c Delete unused code. 2020-02-06 14:14:34 -06:00
David Young
eaeede0120 Delete the hdf5_page_offset member of shadow_defree_t, it is initialized but
never read.
2020-02-06 14:14:34 -06:00
David Young
4ffc6839e1 Fix a typo in a diagnostic printf and, while I'm here, use the right format
strings.
2020-02-06 14:14:34 -06:00
David Young
bc27f0d1ce Use proper format string. 2020-02-06 14:14:34 -06:00
David Young
9a8ba2a7d3 Make H5FD_vfd_swmr_dump_status() take an unsigned page number to be consistent
with other code.
2020-02-06 14:14:34 -06:00
David Young
456f5c6ee6 Quiet some warnings about jumping over variable initialization,
an improper format string, etc.  NFCI.
2020-02-06 14:14:34 -06:00
David Young
70515b290f Rename the deferred-free queues. There are two of them, and the names I used
for them did not help me keep track of what they were for.

For brevity, I will call a deferred free record a "defree" in the code.

The deferred_free_queue_t becomes a lower_defree_queue_t, and each record on
the queue becomes a lower_defree_t.  A lower_defree_t tracks one deferred free
on the lower VFD---that is, the one under the SWMR VFD.

The old_image_queue_t becomes a shadow_defree_queue_t, and a record therein is
a shadow_defree_t.  A shadow_defree_t tracks one deferred free on the shadow
file.
2020-02-06 14:14:34 -06:00
David Young
3c4a34951e Move the bsdqueue.h #inclusion up with the other #inclusions. 2020-02-06 14:14:34 -06:00
Mike Folk
fbcbf76907 Update VFD_SWMR_Punch_List.md 2020-02-06 13:37:07 -06:00
Mike Folk
ae61a8e826 Update VFD_SWMR_Punch_List.md 2020-02-04 15:25:06 -06:00
David Young
3c65919776 NFCI: exit(EXIT_FAILURE) instead of exit(1) for portability.
Delete a comment on a closing curly brace.
2020-02-03 15:05:58 -06:00
David Young
036dd539d3 It's not necessary to assert(p != NULL) if you're dereferencing p in the next
assertion.
2020-02-03 15:04:52 -06:00
David Young
29ee63787b Numerous changes supporting a floating shadow index:
Add to the H5F_shared_t (!) a new member that tells the index in
the shadow file where the index should be written.

Allocate shadow filespace for the header and the index separately so
that the index can float.  Update tests to match the expected original
location of the index.

Introduce vfd_swmr_enlarge_shadow_index(), a routine that allocates space in
the shadow file for a new index that has (up to) twice as many entries as the
old index, allocates a new in-core index of the same size, and copies the old
in-core index to the new.  Call vfd_swmr_enlarge_shadow_index() in
H5PB_vfd_swmr__update_index() when the in-core index has too few slots.

In the comment at the top of H5FD__vfd_swmr_load_hdr_and_idx(), describe the
protocol that it follows, now, when it reads the shadow header and index.
Delete some dead code in the function and add a bit of diagnostic code.
TBD quiet the diagnostic code.

In H5F_vfd_swmr_init(), follow the protocol: write the index, first, then
the header.

Modify property-list checks and tests to reserve no fewer than two pages at the
front of the shadow file for the header and index.
2020-02-03 15:04:21 -06:00
David Young
64f1ef1fda Make the first argument to H5PB_vfd_swmr__update_index() and H5F_t instead of
an H5F_shared_t because the new routine that will relocate the index (which
will be in a future commit) has to pass an H5F_t to the filespace allocator.
2020-02-03 13:16:05 -06:00
David Young
005bd89ad5 Use FAIL_STACK_ERROR instead of TEST_ERROR after library calls, so that the
error stack will be reported.

Use calloc instead of malloc+memset.
2020-02-03 13:10:11 -06:00
David Young
57fe4a52a2 Consolidate shadow-file allocation code in H5MV.c. 2020-01-30 17:27:59 -06:00
David Young
590c51b68c Remove some dead code and out-of-date comments. 2020-01-30 17:22:01 -06:00
David Young
2e15f48d78 Repair indentation and delete some superfluous comments. NFCI. 2020-01-30 10:48:36 -06:00
David Young
b7f5776c53 Fix typo. NFCI. 2020-01-30 10:25:46 -06:00
David Young
cb66576c7a Use fewer gratuitous casts. Use struct assignment instead of member-by-member
assignment to copy `struct timespec`.  NFCI.
2020-01-28 10:57:57 -06:00
David Young
b34e6d2f45 Add some missing spaces. 2020-01-27 13:41:42 -06:00
David Young
59e7b10a7e Fix spelling. NFCI. 2020-01-27 13:27:01 -06:00
David Young
0fbd8654f7 Prepare the VFD SWMR reader for a "floating" shadow index by overhauling
the way that the shadow header and shadow index are loaded.

In H5FD__vfd_swmr_load_hdr_and_idx(), adopt a new protocol for reading
the shadow file:

0 If the maximum number of retries have been attempted, then exit
  with an error.

1 Try to read the shadow file *header*.  If successful, continue to 2.

  If there is a hard failure, then return an error.  If there is a failure
  that may be transient, then sleep and retry at 0.

2 If the tick number in the header is less than the tick last read by the VFD,
  then return an error.

3 If the tick number in the header is equal to the last tick read by the
  VFD, then exit without doing anything.

4 Try to read the shadow file *index*.  If successful, continue to 5.

  If there is a hard failure, then return an error.  If there is a failure
  that may be transient, then sleep and retry at 0.

5 If a different tick number was read from the index than from the index,
  then continue at 0.

6 Try to *re-read* the shadow file *header*.  If successful, continue to 7.

  If there is a hard failure, then return an error.  If there is a failure
  that may be transient, then sleep and retry at 0.

7 Compare the header that was read previously with the new header.  If
  the new header is different than the old, then we may not have read
  the index at the right shadow-file offset, or the index may have been
  read in an inconsistent state, so sleep and retry at 0.  Otherwise,
  return success.

Simplify H5FD__vfd_swmr_header_deserialize() and
H5FD__vfd_swmr_index_deserialize().  Remove their retry loops.  Make
each return TRUE on success, FALSE on an error that may be transient,
and FAIL on an irrecoverable error.

In H5FD__vfd_swmr_header_deserialize(), do not check the size of the
shadow file with fstat(2), since the read(2) will fail if the file is
too small.  This saves us a system call.

Lightly consti-ify H5FD__vfd_swmr_index_deserialize() arguments.

In H5FD__vfd_swmr_load_hdr_and_idx():

    Consolidate all of the retry-looping.  Increase the initial
    retry delay from 1ns to 1/10s.  Delete the disused maximum-retry
    constants.

    Use #if 0 to disable some error-checking code that ought to be
    unnecessary under the new protocol.

    Don't memset() the header and index header, but make sure
    they're fully initialized with real content, instead.
2020-01-24 14:49:09 -06:00
David Young
33ea1d2b06 Add my newest commentary. Finally reached page 14! 2020-01-17 17:25:38 -06:00
David Young
2754bb2b76 Change md_pages_reserved and pb_expansion_threshold parameters to uint32_t from
int32_t.
2020-01-16 16:51:08 -06:00
David Young
fe7965d38f Don't use the bash-ism [[ ]]. Use the [ ], which is standard and
perfectly adequate in this case.
2020-01-13 11:22:34 -06:00
David Young
16ca8f2c95 Prepare a bit to let the shadow index "float": drastically
simplify H5FD__vfd_swmr_index_deserialize(): reuse
h5_retry_init()/h5_retry_next() for retry loops.

Don't wait for the fstat(2) to read the correct size, because the
read(2) will return short if the file isn't long enough.  (This change
should save at least one system call, always.)

Leave a bunch of comments about the changes that I will have to make so
that the shadow index will float.

NFCI: do not cast H5MM_malloc() return values, this is not C++.
2020-01-10 14:52:19 -06:00
David Young
5fb463bb2e Now that we're buffering the removed pages to process at once,
it's not necessary to iterate over pass numbers any more,
so just use two loops.

While I'm in here, change a comment or formatting here and there.
2020-01-10 14:41:12 -06:00
David Young
7a0a2a0b5d H5F_vfd_swmr_reader_end_of_tick(),
compares both new and old shadow indices and calls H5PB_remove_entry()
on each entry that was in the old index but is not in the new.

Ever since H5PB_remove_entry() started removing shadow index
entries, it has been possible for H5F_vfd_swmr_reader_end_of_tick()
to walk past the end of the new shadow index or even to skip entries
in the new index.  Sometimes an assertion failed when that happened.

I have restructured the code in H5F_vfd_swmr_reader_end_of_tick()
so that it compares the old and new indices, gathering a list of
removed pages, in one step.  In the next step, it processes the
list of removed pages, calling H5PB_remove_entry() on each page.
In the step after that, it notifies the metadata cache of each
removed page.  This fixes the bug I described, above.
2020-01-10 14:22:06 -06:00
David Young
cdbdc33c5a Simplify nested logic in H5FD_vfd_swmr_get_tick_and_idx().
assert() our expectation that either a NULL index was passed, or a
pointer to the index length was passed in, too.
2020-01-10 12:00:22 -06:00
David Young
671f7552ab Correct some irregular indentation, delete an unused line, split an
`if ((p = allocate(...)) == NULL) { }` into two statements, `p =
allocate(...); if (p == NULL) { }`, put a semicolon at the end of an
HGOTO_ERROR(), remove comments /* end if */, /* end for */ after closing
curly braces.
2020-01-10 12:00:22 -06:00
David Young
f19b6c4d48 Make H5FD__vfd_swmr_load_hdr_and_idx() simpler and faster: copy a
pointer to the metadata index instead of copying the index itself.  Use
struct assignment instead of copying individual struct members.  Lower a
staircase.
2020-01-10 12:00:22 -06:00
David Young
c4e19fa84b After quick-sorting the index, go ahead and assert that there are not
duplicate entries for the same HDF5 page offset.  There's an O(n) cost
to that, but it should be no more than the O(n log n) cost of the
quicksort.
2020-01-10 12:00:22 -06:00
David Young
d288a7b93c In H5F__vfd_swmr_writer__create_index(), use calloc(3) instead of
malloc(3) and a for-loop that zeroes the index.
2020-01-10 12:00:22 -06:00
David Young
8d2217d295 In H5PB_remove_entry(), do not call vfd_swmr_mdf_idx_entry_remove(),
because the H5PB__evict_entry() call should have already done that.
Instead, just assert() that the index entry is not present.
2020-01-10 12:00:22 -06:00
David Young
790eccbc20 In vfd_swmr_mdf_idx_entry_remove(), give some local variables less wordy
names.  While I am here, do not copy the last element of the index over
the element that's being deleted, because in the very next step I'm
shifting all elements over by one.
2020-01-10 12:00:22 -06:00
David Young
f4d8894158 Straggler from previous: provide uint64_decode(). 2020-01-10 12:00:22 -06:00
David Young
3fd9dc7b83 Clean up the code a bit: remove some unnecessary casts and such. NFCI. 2020-01-10 12:00:22 -06:00
David Young
3a911e2b39 Change the blah_blah_blah_md_header index_length member from
`uint64_t` to `size_t` because it describes the size of an in-core
structure as well as an on-disk one, and `size_t` is wide enough
to store the size of any in-core structure, while `uint64_t` may
be much too wide.  Check that `index_length` is no more than SIZE_MAX
after we read it.
2020-01-10 12:00:22 -06:00
David Young
1df69ed3a0 Delete unused constants. 2020-01-10 12:00:22 -06:00
David Young
5ae8d135a5 Be brief, replace (H5FS_section_info_t *)node with &node->sect_info. 2020-01-10 12:00:22 -06:00
David Young
f8c5797bd6 Provide a convenience constant, H5_RETRY_ONE_SECOND. 2020-01-10 12:00:22 -06:00
David Young
62e1340bdd Disable C++ compatibility warnings to follow develop on the main fork. 2020-01-10 12:00:22 -06:00
David Young
c09a9e90e1 Update punchlist a bit with John: add some items, update entries that are now
complete.
2020-01-09 11:41:02 -06:00
David Young
0b11cfbf50 Add a new version of the RFC with some commentary by me. 2020-01-08 17:27:43 -06:00
David Young
0ec3340692 Makes some updates: in-progress, needs unit testing. Insert some whitespace
where it makes things more readable.
2020-01-06 15:48:34 -06:00
David Young
12ea13f745 Mention the current situation concerning raw-data flushing. 2019-12-31 09:58:19 -06:00
David Young
68b012f017 Mention that I fixed the VFD SWMR tests. 2019-12-30 16:59:15 -06:00
David Young
0b5dfad751 Don't cast a malloc(3), this is C. Put curly braces around a multiline if
statement.  Delete an unnecessary backslash line continuation.  NFCI.
2019-12-20 09:53:29 -06:00
David Young
e024b2737c Assert that a shadow image is page-aligned since we assume that it is when we
compute its base address and free it.
2019-12-20 09:52:09 -06:00
David Young
37fb4bda71 Delete unnecessary whitespace including invisible whitespace at the end of
lines.  Wrap a couple of lines.  NFCI.
2019-12-20 09:50:53 -06:00
David Young
07e6f39f4b Change the unwieldy name vfd_swmr_idx_entry_defer_free() to
shadow_image_defer_free(), which is also a better description of what the
routine does.
2019-12-19 14:14:13 -06:00
David Young
dc15a6987e Use the "tail queue" from queue(3) for the delayed free list of shadow images.
Delete the little-used free-list length, dl_len, and just count up the list
entries when diagnostic code needs the length.

Extract the code for deferring shadow-image free into a new subroutine,
`vfd_swmr_idx_entry_defer_free()`.

Rename type `deferred_free_head_t` as `deferred_free_queue_t`.

Remove the disused H5F__LL_{REMOVE,PREPEND} macros.

Add some diagnostic code and #if 0'd assertions.

Change `qsort(ptr, n, sizeof(type), cmp)` to
`qsort(ptr, n, sizeof(*ptr), cmp)`.

Use a `continue` statement to lower a staircase in
H5F_update_vfd_swmr_metadata_file().

Add vfd_swmr_mdf_idx_entry_remove() to delete a shadow index entry and add the
image at that entry to a deferred-free list.  Call it whenever a page is
evicted.

Update the comment in H5PB_remove_entry() that asks if we need to remove shadow
index entries: now we *do* remove them.  Remove shadow index entries in
H5PB__evict_entry().  Also mention in the comment that the index-entry removal
performed by H5PB__evict_entry() ought to be sufficient.
2019-12-19 13:43:54 -06:00
David Young
10a7a47415 Remove unnecessary casts. Use the ptr = calloc(n, sizeof(*ptr)) idiom for
specifying the item size to be allocated.  NFCI.
2019-12-19 11:21:57 -06:00
David Young
13386f3c91 Prepare for some changes I'm committing shortly: pass an H5F_shared_t * as
the first argument to H5PB__evict_entry() instead of an `H5PB_t *`.
2019-12-19 11:08:33 -06:00
David Young
9a66eb1377 Make the first parameter of H5PB_remove_entry() non-const to support some
changes I will commit shortly.
2019-12-19 11:03:22 -06:00
David Young
10353ef87d There's no need to name parameters in a function declaration, and it makes them
very long, so just delete the parameters.
2019-12-18 15:53:34 -06:00
David Young
f0a01e6915 Allocate regionsin the shadow file of page size or greater size with page
alignment.  The VFD SWMR code had always assumed that the regions were aligned
to page size.  It would blithely round the start addresses of regions to the
next lower page.  When the region was freed, the freespace manager (H5MV) would
suffer an assertion or corruption.
2019-12-18 15:50:29 -06:00
David Young
3455c4031e Tell the tick number in diagnostic messages. 2019-12-18 15:38:09 -06:00
David Young
2c5c110378 Align the shadow images on page boundaries so that they don't overlap. This
seems to be the programmer's original intention.  It sure makes debugging
easier to have non-overlapping shadow images.
2019-12-18 15:29:48 -06:00
David Young
941daa6b07 In the faked-up shadow-index entries, assign independent page numbers in the
HDF5 file and in the shadow file.  I had added assertions that the page numbers
were unique, and this caused those assertions to fail.  I don't know if I'll
keep the assertions, but this is an inexpensive change that makes the test more
realistic.
2019-12-18 15:26:40 -06:00
David Young
1a55342b3e Allocate and zero using calloc(3) instead of malloc(3)+memset(3). 2019-12-18 15:25:11 -06:00
David Young
2c0dddf263 Follow the naming convention enforced by FUNC_ENTER_/FUNC_EXIT_* macros (?)
where static routines have to have double underscores (__) in their name or
else the library asserts false.
2019-12-18 15:09:13 -06:00
David Young
2d4e4e217c Delete a macro that's not used. 2019-12-13 10:34:03 -06:00
David Young
17d6de5396 Remove disused duplicate of H5F__idx_entry_cmp(). I probably introduced that
by accident when I merged Vailin's changes that moved some functions from one
file to another.
2019-12-13 10:25:25 -06:00
David Young
93175a115c Remove the ugly casts on calloc() and malloc(). Change some malloc() to
calloc() so that all bytes are initialized to something.
2019-12-13 10:24:02 -06:00
David Young
5d163c8d78 Fix some typos. NFCI. 2019-12-13 10:22:19 -06:00
David Young
8f62e5dafb Wrap some comments at <= 80 characters. 2019-12-10 10:56:04 -06:00
David Young
fed174988d Shorten the type name H5F_vfd_swmr_eot_queue_entry_t to eot_queue_entry_t:
people have to read and type this stuff!

Use TAILQ_* macros instead of an unnecessary custom implementation of
doubly-linked lists.
2019-12-10 10:52:58 -06:00
David Young
38902de493 Fix typo. NFCI. 2019-12-09 18:05:04 -06:00
David Young
305a64f674 Remove disused #ifdef QAK code. 2019-12-09 15:47:08 -06:00
David Young
a6be1c0397 Be brief: don't cast the last parameter of H5Pset_file_space_strategy(), the
constant `1`, to `hsize_t`.
2019-12-09 15:42:40 -06:00
David Young
0f33e41541 Don't see a 1GB threshold for tracking free filespace, that workaround for VFD
SWMR was never 100% effective, and now that there is a delay line on filespace
frees, it is not necesesary.
2019-12-09 15:30:17 -06:00
David Young
c8f533cfc3 Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and
I share.

Now I need to put this branch on a fork with a less confusing name than
vchoi_fork!
2019-12-09 10:30:58 -06:00
Vailin Choi
adcf8a315e Fix the FSM bug when setting the FSM threshold to a non-default value.
Check for smaller or larger section size after merging and shrinking a section,
for this case is the section that is smaller than threshold (see H5MF_xfree() in H5MF.c).
It is possible for the section to be smaller after merging/shrinking (see H5MF__sect_large_shrink()
in H5MFsection.c).
2019-12-02 11:07:25 -06:00
David Young
4d50f9a7a8 Update status of the expand/shrink test. 2019-11-25 11:01:42 -06:00
David Young
0f9678b415 Mention the Markdown cheat sheet and tutorial, per John's request. 2019-11-22 15:36:56 -06:00
Vailin Choi
12438c22b7 Fix for punch list #28:
Given that the VFD SWMR configuration FAPL property is set, the writer field must
be consistent with the flags passed in the H5Fopen() (either H5F_ACC_RDWR for the
VFD SWMR writer, or H5F_ACC_RDONLY for the VFD SWMR readers).
2019-11-20 16:23:03 -06:00
Vailin Choi
68ad19d9cc Changes for punch list #4: Add support for opening mulitple files in either VFD SWMR writer or reader mode. See EOT queue in section 3.2.2 and 3.3 and 3.3.2 in the RFC.
Update punch list with items completed and in progress.
2019-11-20 11:39:26 -06:00
David Young
d3055b85b9 Add my name to some entries. 2019-11-19 17:16:06 -06:00
David Young
65c38da1f0 Mention the items that Vailin is working on. 2019-11-19 16:35:02 -06:00
David Young
7579e10abb Use bold to highlight items status. 2019-11-19 15:53:57 -06:00
David Young
898871545d Add some notes about what's done and what I'm working on. 2019-11-19 15:52:38 -06:00
David Young
d84343004e Add URL for the punch list. 2019-11-19 14:14:17 -06:00
David Young
c905d7105a Remove the last (?) vestige of gettimeofday alternate implementation of
VFD SWMR.
2019-11-19 14:12:29 -06:00
vchoi
e847ec43ac Fix for punch list #9 Move VFD SWMR H5F code to its own file: H5Fvfd_swmr.c. 2019-11-15 14:17:02 -06:00
Vailin Choi
350a786486 Fix for punch list #13 item #1: Odd behavior in the superblock refresh routine.
The test "driver_addr != sblock->driver_addr" is failing for superblock version 2 & 3.
Fix: there is no driver_addr in superblock version 2 & 3.
It should decode the root group object header address (root_addr) and verify accordingly.
2019-11-14 15:15:37 -06:00
Vailin Choi
227688c9cd Modifications for the following items in the punch list:
(A) #5: Add the "pb_expansion_threshold" field to the "H5F_vfd_swmr_config_t" structure
and update H5Pset_vfd_swmr_config() and H5Pget_vfd_swmr_config() accordingly
(B) #13 bullet 2: Comment H5F_vfd_swmr_config_t in H5Fpublic.h properly
(copied from John's description in the RFC)
(C) Change the field name "vfd_swmr_writer" to "writer" in "struct H5F_vfd_swmr_config_t"
(as indicated on page 11 in the RFC) and all references to it
2019-11-14 13:15:23 -06:00
David Young
f2bb4e3dbc Good-bye md_open_tries. 2019-11-14 11:11:15 -06:00
David Young
492d8b8b2a Add the latest version of the RFC. 2019-11-13 15:04:46 -06:00
dyoung
d017ff1850 Put the Markdown punch list on the right branch. 2019-11-13 12:17:20 -06:00
David Young
0ea6e75d9f VFD SWMR sparse readers failed to open the .h5 file because the sparse writer
had finished its work and closed the .h5 file, thus removing the shadow file.
Make the sparse writer wait to close the .h5 file for a signal from
testvfdswmr.sh.  In testvfdswmr.sh, send the signal when the readers have all
finished.
2019-10-23 10:47:14 -05:00
David Young
e84a416ad8 Expect the h5ls usage message to mention --poll twice. 2019-10-21 17:08:25 -05:00
David Young
7e4d20453e First, reduce code duplication in h5tools_fopen(). Then, stop h5tools_fopen()
from using the SWMR VFD unless the h5tools_fopen() arguments specifically
choose that VFD.
2019-10-21 16:17:10 -05:00
David Young
6f1469fce4 Fix some tools: try all other VFDs before SWMR. 2019-10-18 15:58:02 -05:00
David Young
63df4fae56 Delay for no more than 1/100 second between any retry in H5C_load_entry().
This lets test/testflushrefresh.sh pass again.  It was timing out while it
waited for expected failures to occur because the retry loop ran for way too
long.
2019-10-18 14:54:06 -05:00
David Young
e100cbdd3c Ntheever skip a read (skip_read is always false). This lets my demos work and
it does not seem to affect either my unit tests or testvfdswmr.sh.
2019-10-18 14:52:59 -05:00
David Young
90a602634e I've changed test/dsets so that every time it needs to visit all
cells in a matrix in an arbitrary order, first it chooses a random
starting `offset` in [0, rows * columns - 1].  Then it chooses a
random `increment` that's relatively prime to `rows * columns`.
Then it visits every cell in `rows * columns` steps:

        for (i = 0; i < rows * columns; i++) {
                visit(cell[offset / columns][offset % columns]);
                offset = (increment + offset) % (rows * columns);
        }

By moving the HDrandom() calls outside of the main loop and visiting
each cell only once, this probably speeds things up quite a bit.  It's
also more resilient to a crummy random sequence.  The new code visits
cells in an order that's probably arbitrary enough for testing purposes.
2019-10-17 16:36:17 -05:00
David Young
fcd490a0bc Use PRIuHADDR. 2019-10-17 13:17:06 -05:00
David Young
8efc3d9757 Move a disused variable inside of the #if 0 region that needs it. 2019-10-17 13:15:54 -05:00
David Young
0850f06862 Repair comments. 2019-10-17 13:14:38 -05:00
David Young
2dd9c3b92f The err_compat test relied on some "lines" on the standard output stream
to end with whitespace padding rather than newlines.  My introduction of
variadic TESTING() got rid of the padding.  I have straightened this out
by newline-terminating the stdout lines in the test program and in its
expected out.  I also add some newlines to the program's standard error
output so that the expected error output still matches.
2019-10-08 16:17:42 -05:00
David Young
c2b841f513 Add NetBSD and Berkeley licenses for struct timespec helper macros. 2019-10-07 17:36:30 -05:00
David Young
730b2fbcb2 Provide the BSD struct timespec arithmetic macro, timespecsub(). 2019-10-07 12:15:40 -05:00
David Young
19304abb51 Fix an off-by-one error in the retries API that made the test "protect
an entry to verify retries" in `test/cache` fail.
2019-10-07 11:50:20 -05:00
David Young
743c9358d1 Introduce PRI*HADDR and PRI*HSIZE for printing haddr_t and hsize_t. 2019-10-03 17:34:05 -05:00
David Young
82f647534c Make some NetBSD compatibility patches. 2019-10-03 17:30:46 -05:00
David Young
09bb031cf1 Refactor a bit, remove dead code, move some helper functions to the top
of the file, remove unused variables.
2019-10-02 17:27:24 -05:00
David Young
4311b2ef9d Fix some comments where "read" was written instead of "write." NFCI. 2019-10-02 16:01:27 -05:00
David Young
b1b98cfafe F ix off-by-one bug affecting metadata-read retries: retries == tries - 1. 2019-10-02 15:48:50 -05:00
David Young
5025be74ea Use int64_t instead of uint64_t to avoid some warnings about sign
conversion.
2019-09-30 14:48:57 -05:00
David Young
20dd9b1372 Initialize data and odata to NULL like the exit sequences
expect.  Free `odata`.
2019-09-30 14:28:13 -05:00
David Young
38f3ece57a Add a test for single-page metadata (SPMDE) writes. Mention in a
comment to myself that I need to reduce code duplication with the MPMDE
test.

In vfd_read_each_equals(), print the correct expected value when there
is a discrepancy.

No functional change intended: correct a comment in
vfd_read_each_equals.  Fix indentation in the test_raw_data_handling()
header comment.
2019-09-30 14:07:15 -05:00
David Young
de33d5cb3c Rename the metadata test again to reflect how it's checking the page
buffer's treatment of multipage metadata entries (MPMDEs).  Mention why
an H5PB_flush() is not necessary for MPMDEs to reach visibility at the
VFD layer.
2019-09-27 13:34:17 -05:00
David Young
f0596cea65 Don't use FILENAME and FILENAME[0] because that looks like worrisome
macro magic.  Use namebases and namebase, instead.

Extract a bunch of copy-and-paste VFD SWMR setup into a new subroutine,
swmr_fapl_augment().

Make sure that the metadata reads all-0s until it reads all -1s.
Extract a subroutine, vfd_read_each_equals(), that reads and compares a
region with one of its arguments.

Rename from test_basic_metadata_handling() to
test_metadata_delay_basic(), since that gets at what we're testing
better.

Don't perform an H5PB_flush(), it's not necessary for this test because
H5Fvfd_swmr_end_tick() has done essentially the same thing.
2019-09-27 13:09:07 -05:00
David Young
078db93752 Fix a typo: adress -> address. 2019-09-27 12:50:48 -05:00
David Young
8b38c2ab1b Skip the metadata accumulator and always perform I/O through the VFD, so
that writes are not delayed.

In H5PB__flush_entry, simplify by eliminating a temporary variable and a
constant.
2019-09-26 17:06:51 -05:00
David Young
b5b9a8907e If a page entry is delayed *until* tick t, and tick t has arrived,
it is eligible to flush *now*, so do that.  Don't wait until tick `t +
1`.
2019-09-26 17:00:05 -05:00
David Young
a6b9394e8c Fix a comment: I don't know what *pbe_ptr was. Refer to page, since
that seems to be the intention.  No functional change intended.
2019-09-26 16:58:38 -05:00
David Young
1b63ff60d2 Rename local variable delay_write_until as until. Reduce
parenthesization in an `if` condition.  Join some lines.  No functional
change intended.
2019-09-26 16:57:22 -05:00
David Young
2fd118ceaf Initialize VFD SWMR configuration block to zeroes. I was hopeful that
this would fix a bug, but I don't think it had any effect.  Still, a
necessary change.
2019-09-26 16:52:41 -05:00
David Young
a68c2c92c3 Oops, straggler from last: rename the nanosecond constants. While I am
here, delete dead code.
2019-09-26 16:49:45 -05:00
David Young
e4f9e45399 SECOND_TO_NANOSECS is the name of a function, not a constant. Rename to
nanosecs_per_second.  Ditto for the tenth-second constant.
2019-09-26 16:48:13 -05:00
David Young
35c049d6a4 Write test data from a different buffer than we read into, since I
anticipate comparing the written buffer with the read buffer.

Don't initialize variables prematurely so that the compiler has a chance
to warn about variables read before they are written.

Repeatedly flush the page buffer, once each time we end the tick.

Write errors to stdout instead of stderr.
2019-09-26 16:43:01 -05:00
David Young
bddf3ff6a5 In H5PB_flush(), skip a page-buffer entry if its write is delayed. 2019-09-26 16:37:15 -05:00
David Young
4d12df1d21 Commit to the clock_gettime() versions of VFD SWMR and delete the
gettimeofday() alternate.  Perform nanoseconds arithmetic using uint64_t
instead of long to avoid unwanted overflows on 32-bit systems like
my i386 (!) development box.
2019-09-25 15:34:16 -05:00
David Young
06806a2765 Add to the page buffer a local printf-like debug function that I can
turn on and off.  Use it here and there.
2019-09-25 11:02:40 -05:00
David Young
bd0c625e38 Clean up excessive casting and parenthesization. No functional change
intended.
2019-09-24 12:18:40 -05:00
David Young
de2edbb238 Add a basic metadata test for VFD SWMR page buffering. Currently the
test fails....

Make some comments more true to reality and fix a couple of typos.
2019-09-23 14:37:53 -05:00
David Young
a8ebf7c541 Tell the compiler that h5_testing() is a printf-like function. 2019-09-23 14:36:13 -05:00
David Young
d4ecff8319 Fix some incorrect format strings. 2019-09-23 14:35:46 -05:00
David Young
0880c57d13 Straggler from last commit: make TESTING() take printf-like varargs
arguments.
2019-09-23 10:34:01 -05:00
David Young
b474650645 Don't calloc() the VFD SWMR configuration, just use a local variable.
Combine the VFD SWMR and non-VFD SWMR raw-data test into one
routine that takes a bool parameter to switch on VFD SMWR.

Update my description of the to-be-written metadata test for VFD SWMR.
2019-09-23 10:30:14 -05:00
David Young
57cfb035ad Delete end-of-block comments, they're uninformative and they make the page
busy.
2019-09-20 14:08:52 -05:00
David Young
89d3461a00 Revise a warning puts() to be more hopeful about VFD SWMR and
multi/split compatibility.
2019-09-20 14:08:52 -05:00
David Young
752fb97ef3 Don't set up raw-data pages for delayed writes. This prevents
an assertion from firing:

"entry_ptr->delay_write_until == 0" failed: file "../../../vchoi_fork/src/H5PB.c", line 4093, function "H5PB__write_raw"

In a comment, mention a change that has to be made to accommodate parallel
mode.
2019-09-19 12:08:55 -05:00
David Young
71499c852b Unse TEST_ERROR instead of the return statement I copied & pasted, oops.
Use a (more) accurate name for the VFD SWMR test routine.
Mention that VFD SWMR isn't expected to work with multi/split VFDs,
yet.
2019-09-19 11:39:13 -05:00
David Young
9cb455ca87 Add the zygote of VFD SWMR-mode page-buffer tests. 2019-09-17 11:26:18 -05:00
David Young
d001d0ec27 Use calloc instead of malloc so that the VFD SWMR configuration
is initialized to default values.
2019-09-17 11:00:10 -05:00
David Young
73e07e2573 Make whitespace consistent: no leading tabs! 2019-09-16 16:57:35 -05:00
David Young
f16d86d3e7 Update function documentation. NFCI. 2019-09-16 16:31:04 -05:00
David Young
2cb57cb926 Enable h5ls to use VFD SWMR. 2019-09-12 14:17:33 -05:00
David Young
1f4dd5692d Use h5_retry_init/_next to retry loading the SWMR shadow file. 2019-09-12 14:16:49 -05:00
David Young
0a81436fab Convert several warnings about const to non-const conversion at H5Tcopy()
invocations to one warning in the H5Tcopy() implementation.
2019-09-12 13:52:38 -05:00
David Young
faf3336f52 Quiet compiler warnings about signedness by changing a signed
integer to an unsigned one.
2019-09-12 13:51:39 -05:00
David Young
93352e65ea Ignore vim swap files and ctags files. 2019-09-12 13:48:52 -05:00
David Young
70152bbd6c Replace a missing curly brace. 2019-09-10 16:38:27 -05:00
David Young
9e2d4344de Merge the latest h5_retry_t code from my sleepy branch. 2019-09-10 15:27:38 -05:00
David Young
508cfab552 Tand the he VFD SWMR test script used | tee to redirect test programs'
output, then it tested $? for an error exit.  $? told the error status of
`tee`, though, not the test programs!  So no test failures were counted, even
when some tests clearly failed.  I changed the test script to use a shell
subroutine, `catch_out_err_and_rc`, to catch test programs' output and result
code.
2019-08-28 13:21:26 -05:00
David Young
e178ab0e11 Consolidate VFD SWMR variable declarations in a new header file,
H5FDvfd_swmr_private.h.

Perform tick processing in FUNC_ENTER_API_NOCLEAR, where it was missing.

Track the number of times the HDF5 library has been entered/exited through its
public API.  Only perform tick processing on the first entry and last exit.
This stops us from performing tick processing in API calls invoked by
application callbacks.  Performing tick processing in nested API calls led to
crashes.

Note well: FUNC_LEAVE_API now performs tick processing even on an error exit!
Previously, it did not.  I'm not sure if the change is ok.
2019-08-28 12:58:08 -05:00
dyoung
1f728439dd In the error message, provide specific information that will help the
developer fix the error.
2019-08-22 14:57:33 -05:00
dyoung
61109c76b2 Quiet warnings, especially signed/unsigned casts. 2019-08-22 14:10:11 -05:00
mainzer
f85986fa9f Merge branch 'feature/vfd_swmr' of https://bitbucket.hdfgroup.org/scm/~vchoi/my_hdf5_fork into feature/vfd_swmr
updated to permit a push.  Should be no changes in VFD SWMR proper.
2019-07-06 18:19:13 -05:00
mainzer
a5b7099215 Tidied up comments and removed some stats code that is un-reachable. 2019-07-06 18:13:36 -05:00
Vailin Choi
311e4ed32d Modifications to the vfd swmr concurrent tests:
(1) Increase the # of records to write (Nrecords) in testvfdswmr.sh.in so as to ensure the writer
will not exit before the reader
(2) Use H5E_BEGIN_TRY/END_TRY when H5Fopen() the test file in reader tests
(3) Add "READER" or "WRITER" to debugging messages
(4) Misc cleanup
2019-01-31 11:47:43 -06:00
mainzer
6feabcb42d Checkin of fixes for a number of bugs in reads to page 0, and in file
open in the VFD SWMR reader case.

Note that the following failures in testvfdswmr.sh:

1) Unable to find metadata file on VFD SWMR reader open.

2) Occasional sanity check failures in the page buffer on raw data write.

3) Filter failures on raw data read in VFD SWMR readers when compression
   is enabled.

4) Unexpected data errors in VFD SWMR readers when compression is
   disabled.

Note that I expect that items 3 & 4 two aspects of the same issues -- the
fact that we don't guarantee that raw data is consistent with metadata.

Item 2) must be addressed, but it is so infrequent that it isn't doesn't
affect the conclusion VFD SWMR seems to work, and thus it can wait until
phase 2.

I am given to understand that Vailin has largely addressed item 1),
and will be checking in her solution to this soon.

Tested on Charis and Jelly.
2019-01-30 15:19:00 -06:00
mainzer
83492f29ed Checkin of fix for the failure to evict all tagged entries issue. 2019-01-16 15:49:54 -06:00
mainzer
5aebfb4f39 Commented out some test code that resulted spurious failures
in un-related tests (i.e. earray, fheap, etc.).

On jelly and charis, vfd_swmr now passes.

testvfdswmr.sh displas the following failures:

1) occasionally ccan't open the metadata file.  This shows
   up more on jelly than charis.

2) occasional complaints about incorrect raw data

3) occasional complaints from Quincey's evict tagged
   entries code that it can't evict all the tagged entries.

4) Numerous filter failures.  At a guess, this is an artifact of
   raw data not making it to file in sync with the metadata.
   I didn't see this on charis, as I don't have compression
   configured.

5) An assertion failure in the page buffer in which a sanity check
    is failing in the code to update the replacement policy.

    This is worrying --- I'll need to look into it on my return.
2019-01-15 23:28:03 -06:00
mainzer
52c5092a63 Merge with Vailin's memory management fixes.
Merge branch 'feature/vfd_swmr' of https://bitbucket.hdfgroup.org/scm/~vchoi/my_hdf5_fork into feature/vfd_swmr
2019-01-15 16:37:41 -06:00
mainzer
b4f607bc13 Intermin commit to allow update from Vailin's recent changes 2019-01-15 16:36:51 -06:00
Vailin Choi
db898db545 Fix for the assertion failure in the free-space manager for the metadata file.
Still need to work on the proper testing for a test in src/H5Ftest.c.
2019-01-06 20:51:50 -06:00
mainzer
4f8917f908 Interim checkin to allow Vailin to address assertion failure in
the memory manager -- details shown below.

Note that there are other issues as well -- this is not a
working version.

[mainzer@jelly test]$ ./vfd_swmr
Testing Configure VFD SWMR with fapl                                   PASSED
Testing VFD SWMR configuration for the file and fapl                   PASSED
Testing H5Fvfd_swmr_end_tick() for VFD SWMR                            PASSED
Testing Create/Open/Flush an HDF5 file for VFD SWMR                    PASSED
Testing Verify the metadata file for VFD SWMR writer                  vfd_swmr: H5MVsection.c:233: H5MV__sect_can_merge: Assertion `((sect1->sect_info.addr)!=((haddr_t)(long)(-1)) && (sect2->sect_info.addr)!=((haddr_t)(long)(-1)) && (sect1->sect_info.addr)<(sect2->sect_info.addr))' failed.
Abort (core dumped)
[mainzer@jelly test]$
2019-01-03 13:50:53 -06:00
Vailin Choi
0e0abc50c8 Fixes for issues #1 and #2 listed in John's email dated Dec 7 2018:
(1) Assertion failure in the vfd_swmr test
(2) Reader error in the vfd swmr concurrent tests
Also fixes for:
(a) Use H5MV_alloc() to allocate space for md_pages_reserved when creating the metadata file in H5F__vfd_swmr_init()
(b) Remove a multi-page (when vfd_swmr_writer is true) from the page buffer in H5MF_xfree()
2018-12-19 16:30:44 -06:00
mainzer
2b613c6c21 Merge branch 'feature/vfd_swmr' of https://bitbucket.hdfgroup.org/scm/~vchoi/my_hdf5_fork into feature/vfd_swmr
resolved conflict in H5PB.c
2018-12-07 16:36:23 -06:00
mainzer
1520b17a34 interim checkin of VFD SWMR writer EOT code.
Added code supporting first cut at the writer end of tick operations.
Tested (to the extent possible) on charis and jelly.
2018-12-07 15:55:55 -06:00
Vailin Choi
49f45640f6 (1) Fix for accumulator issue #1 as described in John's previous checkin
(2) Test files for encoding/decoding property lists
(3) Fix test failures for PB statistics in test/page_buffer.c
    (Will double check with John later about PB statistics collection)
2018-12-02 00:17:15 -06:00
mainzer
8cb185cb08 Merge branch 'feature/vfd_swmr' of https://bitbucket.hdfgroup.org/scm/~vchoi/my_hdf5_fork into feature/vfd_swmr
This merge necessary to access Vailin's latest bug fixes and updates
to the existing SWMR test code.
2018-11-19 02:07:42 -06:00
mainzer
2f2cf050e6 local commit of first cut at vfd swmr writer EOT code.
This is necessary to allow access to Vailin's recent changes

This version passes non-swmr tests in a serial / debug build on charis.
2018-11-19 02:05:37 -06:00
Vailin Choi
ce2748f011 (A) Fixes for the assertion failures described in issue #2 (see John Mainzer's last checkin message):
--src/H5PB.c: checks for size >= page size
--src/H5MF.c: disable/enable page buffering in H5MF_tidy_self_referential_fsm_hack()
--src/H5MFsection.c: call H5PB_remove_entry() for both raw/metadata pages in H5MF__sect_small_merge()
(B) Port and modify existing concurrent swmr tests to VFD SWMR. Also modify the following:
--remove flushes from VFD SWMR writer tests
--set Nreaders to 0 in test/testvfdswmr.sh.in to test for writers only
Please enter the commit message for your changes. Lines starting
2018-11-14 15:35:35 -06:00
mainzer
e62f4bd4fa Initial checkin of page buffer re-implementation to support VFD SWMR.
Tested serial / debug on Charis and Jelly.

Two known issues:

1) New page buffer seems to expose issues in the accumulator code.

   For whatever reason, fheap with the new page buffer exposes corruption
   issues if the page buffer uses H5F__accum_read/write(), but the problems
   go away if the page buffers uses H5FD_read/write() instead.

   Need to either chase this or dis-able page bufffer in combination with
   the accumulator.

2) Encountered a number of assertion failures that are explainable by the
   free space manager code not telling the page buffer to discard pages
   when they are freed.

   Wrote code to handle this -- once the free space manager is modified,
   this code should be removed and the original assertions restored.
2018-11-04 17:54:01 -06:00
Vailin Choi
d4d7687ad1 1) Add concurrent test for VFD SWMR reader
2) Bug fixes in H5FDvfd_swmr.c
2018-10-29 16:46:39 -05:00
Vailin Choi
a1bd33ad08 (1) Add tests for VFD SWMR writer
(2) Bug fixes
2018-10-22 13:43:55 -05:00
Vailin Choi
5c7ca8afff Third batch of checkin:
1) Free space manager for the metadata file
2) Delayed free space release linked list
3) H5F_update_vfd_swmr_metadata_file()
3) VFD SWMR driver: read callback
4) Flushing for VFD SWMR
5) Port one concurrent test from swmr test set
6) Bug fixes and refactoring
2018-09-28 11:29:02 -05:00
Vailin Choi
06fa8a9455 Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~vchoi/my_hdf5_fork into feature/vfd_swmr
Conflicts:
	src/H5AC.c
	src/H5F.c
	src/H5Pfapl.c
Resolve conflicts for H5AC.c, H5F.c and H5Pfapl.c
2018-09-26 12:45:07 -05:00
Vailin Choi
c8b38985ff Bug fixes for the previous checkin. 2018-09-04 16:53:45 -05:00
Vailin Choi
1daccbded7 Second batch of checkin:
1) Define driver for the VFD SWMR reader
2) Implement VFD SWMR open callback
3) Implement H5FD_vfd_swmr_get_tick_and_idx()
4) Load and decode metadata file header and index
4) Closing for VFD SWMR
2018-09-03 23:11:36 -05:00
Vailin Choi
d926ddb1a2 Merge pull request #10 in ~VCHOI/my_hdf5_fork from develop to feature/vfd_swmr
* commit 'c834d9f99d45e5b9752e8525fe8761ea5592bf2c': (41 commits)
  HDFFV-10568 fix hdf5_java library dependency
  Remove another extra path var
  Move muti-config dir setting to root process
  Fix one more intermediate location
  Use different variable
  Cleanup and add intermediate dir for java
  Java must use shared libs to allow dlopen calls
  Correct names
  Call new function
  Correct default API version for develop to 112.
  Fix typo
  HD prefix and whitespace
  Update RELEASE.txt with suggested changes
  Update MANIFEST file for new t_coll_md_read.c file
  Remove now-unused local variable
  Add fix for HDFFV-10501
  Revert testfile FILE change
  change FILE path
  Add testfiles to data copy
  Same changes needed for examples as test
  ...
2018-09-03 22:36:44 -05:00
Vailin Choi
45be06a387 Preliminary checkins for implementation done so far:
1) Public routines: H5Pget/set_vfd_swmr_config
2) Public routine: H5Fvfd_swmr_end_tick
3) Initialization when opening a file with VFD SWMR writer
4) Tests in test/vfd_swmr.c for VFD SWMR
5) Fix a bug in src/H5Fint.c: when error is encountered after the root group is created
Note the following:
--This is WORK IN PROGRESS and will subject to change as implementation goes.
--There is test failure form enc_dec_plist.c: I will fix this when changes to the property list are settled.
--The branch is updated with the latest from develop as of 8/14/2018
2018-08-14 13:21:00 -05:00
Vailin Choi
ce1e816295 Merge pull request #9 in ~VCHOI/my_hdf5_fork from HDFFV/hdf5:develop to feature/vfd_swmr
* commit '5647dea421be9dc8429f08632aa72a8a22904292': (47 commits)
  Rearrange issues by date order
  RELEASE.txt changes for MPI updates
  Update Drop Site options and Coverage settings
  Reorder bugfix release notes from latest to earliest, and miscellaneous format cleanup.
  Add RELEASE.txt entry for HDFFV-10475
  HDFFV-10544 Add more descriptive text
  HDFFV-10544 Correct var name
  HDFFV-10544 remove native from class function
  HDFFV-10544 correct typo
  HDFFV-10544 add release note
  HDFFV-10544 add class name to error text
  HDFFV-10544 exception variable as local class
  Improve error handling of exceptions
  Typo fix
  Set CMAKE_REQUIRED_INCLUDES instead of using path in call
  Add Autotools and CMake checks for big I/O MPI-3 functions
  Add hdf5settings section for parallel compression status in CMake builds
  HDFFV-10508 rework sentence
  HDFFV-10508 clarify library differences
  HDFFV-10508 spelling and grammer
  ...
2018-08-14 12:10:04 -05:00
2170 changed files with 616091 additions and 402678 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.

100
.clang-format Normal file
View File

@@ -0,0 +1,100 @@
---
BasedOnStyle: LLVM
AlignConsecutiveAssignments: true
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
IndentWidth: 4
---
Language: Cpp
#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
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
#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
---
Language: Java
BreakAfterJavaFieldAnnotations: true
JavaImportGroups: ['java', 'hdf', 'hdf.hdf5lib', 'org']
...

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

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
custom: "https://hdfgroup.org/about-us/donate-to-the-hdf-group/"

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 and java programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'c,h,cpp,hpp,java'
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 and Java programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'c,h,cpp,hpp,java'
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,ro,oce

View File

@@ -2,11 +2,18 @@ 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 ]
branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8, feature/vfd_swmr]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'
# 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 +21,184 @@ 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", "Ubuntu Debug Autotools GCC", "-Werror Ubuntu Debug 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- name: "Ubuntu Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "production"
cpp: enable
fortran: enable
java: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
flags: ""
- name: "Ubuntu Debug Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "debug"
cpp: enable
fortran: enable
java: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
flags: ""
# Build that ensures no new warnings sneak into the library.
- name: "-Werror Ubuntu Debug Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "debug"
cpp: disable
fortran: disable
java: disable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
flags: "CFLAGS=-Werror"
# 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- name: "TS Autotools GCC"
artifact: "LinuxATS.tar.xz"
os: ubuntu-latest
build_type: "production"
cpp: disable
fortran: disable
java: disable
ts: enable
hl: disable
parallel: disable
toolchain: ""
generator: "autogen"
flags: ""
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 update
sudo apt install automake autoconf libtool libtool-bin
sudo apt install gcc-11 g++-11 gfortran-11
sudo apt install openmpi-bin openmpi-common
if: matrix.generator == 'autogen'
- name: Install Dependencies (Windows)
run: choco install ninja
if: matrix.os == 'windows-latest'
@@ -57,24 +209,50 @@ 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
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_type }} --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java
shell: bash
env:
CC: gcc-11
CXX: g++-11
FC: gfortran-11
- 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

257
.github/workflows/pr-check.yml vendored Normal file
View File

@@ -0,0 +1,257 @@
name: PR 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, feature/vfd_swmr ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'
# 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", "Ubuntu Debug Autotools GCC", "-Werror Ubuntu Debug 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- name: "Ubuntu Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "production"
cpp: enable
fortran: enable
java: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
flags: ""
- name: "Ubuntu Debug Autotools GCC"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "debug"
cpp: enable
fortran: enable
java: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
flags: ""
# Build that ensures no new warnings sneak into the library.
- name: "-Werror Ubuntu Debug Autotools GCC"
artifact: "LinuxDBG.tar.xz"
os: ubuntu-latest
build_type: "debug"
cpp: disable
fortran: disable
java: disable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
flags: "CFLAGS=-Werror"
# 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- 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"
flags: ""
- name: "TS Autotools GCC"
artifact: "LinuxATS.tar.xz"
os: ubuntu-latest
build_type: "production"
cpp: disable
fortran: disable
java: disable
ts: enable
hl: disable
parallel: disable
toolchain: ""
generator: "autogen"
flags: ""
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 update
sudo apt install automake autoconf libtool libtool-bin
sudo apt install gcc-11 g++-11 gfortran-11
sudo apt install openmpi-bin openmpi-common
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
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_type }} --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java
shell: bash
env:
CC: gcc-11
CXX: g++-11
FC: gfortran-11
- 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,18 +5,21 @@
# 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)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
option (ZLIB_USE_EXTERNAL "Use External Library Building for HDF5_ZLIB" 1)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository")
@@ -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 HDF5_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 HDF5_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,12 +142,16 @@ 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")
set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME})
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "... with library AEC")
endif ()
set (SZIP_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME})
else ()
set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME})
set (SZIP_PACKAGE_NAME ${SZIP_PACKAGE_NAME})
endif ()
else ()
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
@@ -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)
@@ -409,13 +395,19 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
list (APPEND CPACK_GENERATOR "DEB")
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
# list (APPEND CPACK_GENERATOR "RPM")
list (APPEND CPACK_GENERATOR "RPM")
set (CPACK_RPM_PACKAGE_RELEASE "1")
set (CPACK_RPM_PACKAGE_RELEASE_DIST ON)
set (CPACK_RPM_COMPONENT_INSTALL ON)
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
set (CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set (CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
set (CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
set (CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
set (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
@@ -455,16 +447,16 @@ 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)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
if (WIN32)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;headers;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;configinstall;/")
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 +464,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

@@ -2,10 +2,13 @@ cmake_minimum_required (VERSION 3.12)
project (HDF5 C)
if (POLICY CMP0074)
# find_package() uses <PackageName>_ROOT variables.
cmake_policy (SET CMP0074 NEW)
endif ()
if (POLICY CMP0083)
# To control generation of Position Independent Executable (PIE) or not,
# some flags are required at link time.
cmake_policy (SET CMP0083 NEW)
endif ()
@@ -42,9 +45,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 +74,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 +140,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 +213,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 +232,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 +247,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 +264,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 +276,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 +289,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 +302,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 +315,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 +328,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 +341,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 +354,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 +368,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 +438,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 +510,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 +529,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 +615,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 +631,7 @@ if (MSVC)
endif ()
set (MAKE_SYSTEM)
if (CMAKE_BUILD_TOOL MATCHES "make")
if (CMAKE_MAKE_PROGRAM MATCHES "make")
set (MAKE_SYSTEM 1)
endif ()
@@ -659,10 +711,14 @@ if (HDF5_ENABLE_PARALLEL)
# Used by Parallel Compression feature
set (PARALLEL_FILTERED_WRITES ON)
CHECK_SYMBOL_EXISTS (MPI_Mprobe "mpi.h" H5_HAVE_MPI_Mprobe)
CHECK_SYMBOL_EXISTS (MPI_Imrecv "mpi.h" H5_HAVE_MPI_Imrecv)
if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv)
message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located.
CHECK_SYMBOL_EXISTS (MPI_Ibarrier "mpi.h" H5_HAVE_MPI_Ibarrier)
CHECK_SYMBOL_EXISTS (MPI_Issend "mpi.h" H5_HAVE_MPI_Issend)
CHECK_SYMBOL_EXISTS (MPI_Iprobe "mpi.h" H5_HAVE_MPI_Iprobe)
CHECK_SYMBOL_EXISTS (MPI_Irecv "mpi.h" H5_HAVE_MPI_Irecv)
if (H5_HAVE_MPI_Ibarrier AND H5_HAVE_MPI_Issend AND H5_HAVE_MPI_Iprobe AND H5_HAVE_MPI_Irecv)
set (H5_HAVE_PARALLEL_FILTERED_WRITES 1)
else ()
message (WARNING "The MPI_Ibarrier/MPI_Issend/MPI_Iprobe/MPI_Irecv functions could not be located.
Parallel writes of filtered data will be disabled.")
set (PARALLEL_FILTERED_WRITES OFF)
endif ()
@@ -771,40 +827,43 @@ 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 **** ")
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 (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_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)
@@ -816,6 +875,10 @@ if (HDF5_ENABLE_THREADSAFE)
if (Threads_FOUND)
set (H5_HAVE_THREADSAFE 1)
endif ()
else()
# Always check for pthreads for VFD SWMR (for now)
set (THREADS_PREFER_PTHREAD_FLAG ON)
find_package (Threads REQUIRED)
endif ()
#-----------------------------------------------------------------------------
@@ -834,10 +897,10 @@ add_subdirectory (src)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
if (NOT ONLY_SHARED_LIBS)
add_dependencies (${HDF5_LIB_TARGET} ZLIB)
add_dependencies (${HDF5_LIB_TARGET} HDF5_ZLIB)
endif ()
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF5_LIBSH_TARGET} ZLIB)
add_dependencies (${HDF5_LIBSH_TARGET} HDF5_ZLIB)
endif ()
endif ()
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
@@ -850,6 +913,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 +948,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 +1009,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 +1047,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 +1096,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 +1140,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 +1188,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 ()

20
COPYING
View File

@@ -46,6 +46,14 @@ works thereof, in binary and source code form.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Limited portions of HDF5 were developed by Akadio, Inc. Akadio's Copyright
Notice and Licensing Terms can be found here: COPYING_AKADIO file in this
directory or at
http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_AKADIO.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Limited portions of HDF5 were developed by Lawrence Berkeley National
Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be
found here: COPYING_LBNL_HDF5 file in this directory or at
@@ -67,6 +75,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 +111,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.
-----------------------------------------------------------------------------

45
COPYING_AKADIO Normal file
View File

@@ -0,0 +1,45 @@
Copyright Notice and License Terms for
VFD SWMR (Virtual File Driver Single Writer/Multiple Reader)
-----------------------------------------------------------------------------
VFD SWMR (Virtual File Driver Single Writer/Multiple Reader)
Copyright © 2019, Akadio, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted for any purpose (including commercial purposes)
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions, and the following disclaimer in the
documentation and/or materials provided with the distribution.
3. Neither the name of Akadio nor the name of any Contributor may be used
to endorse or promote products derived from this software without
specific prior written permission from Akadio, Inc.
DISCLAIMER:
THIS SOFTWARE IS PROVIDED BY AKADIO, INC. AND THE CONTRIBUTORS "AS IS" WITH
NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT SHALL
AKADIO, INC. OR THE CONTRIBUTORS BE LIABLE FOR ANY DAMAGES SUFFERED BY THE
USERS ARISING OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to Akadio, Inc., without imposing a
separate written license agreement for such Enhancements, then you hereby
grant the following license: a non-exclusive, royalty-free perpetual license
to install, use, modify, prepare derivative works, incorporate into other
computer software, distribute, and sublicense such enhancements or derivative
works thereof, in binary and source code form.
-----------------------------------------------------------------------------
This work was sponsored by the U.S. Department of Energy under Award Number
DE-SC0018504.
-----------------------------------------------------------------------------

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 ()

3683
MANIFEST

File diff suppressed because it is too large Load Diff

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,11 @@
HDF5 version 1.13.0 currently under development
HDF5 version 1.13.2-1 currently under development
------------------------------------------------------------------------------
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
![HDF5 Logo](doxygen/img/HDF5.png)
[![Build](https://img.shields.io/github/workflow/status/HDFGroup/hdf5/hdf5%20dev%20CI/develop)](https://github.com/HDFGroup/hdf5/actions?query=branch%3Adevelop)
[![BSD](https://img.shields.io/badge/License-BSD-blue.svg)](https://github.com/HDFGroup/hdf5/blob/develop/COPYING)
*Please refer to the release_docs/INSTALL file for installation instructions.*
THE HDF GROUP
---------------
@@ -13,17 +16,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 +47,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 +56,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
@@ -67,14 +72,36 @@ use and configuration
https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum
RELEASE SCHEDULE
----------------
![HDF5 release schedule](doc/img/release-schedule.png)
HDF5 does not release on a regular schedule. Instead, releases are driven by
new features and bug fixes, though we try to have at least one release of each
maintenance branch per year. Future HDF5 releases indicated on this schedule
are tentative.
| Release | New Features |
| ------- | ------------ |
| 1.13.2 | VFD SWMR, Onion VFD, Selection I/O |
| 1.13.3 | Subfiling, Multi-Dataset I/O |
This list of feature release versions is also tentative, and the specific release
in which a feature is introduced may change.
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.
#
@@ -50,17 +50,7 @@
# Note that aclocal will attempt to include libtool's share/aclocal
# directory.
#
# This script takes two potential options:
#
# -p
#
# When this is selected, the autotools versions are set to the paths
# and versions used by The HDF Group to produce the released versions
# of the library.
#
# NOTE: This is probably temporary. Once we update our dev machines
# to have recent versions of the autotools this option will probably
# be removed.
# Aside from -h for help, this script takes one potential option:
#
# -v
#
@@ -72,9 +62,6 @@ echo "* HDF5 autogen.sh script *"
echo "**************************"
echo
# Default is not production
production=false
# Default is not verbose output
verbose=false
@@ -86,10 +73,6 @@ while getopts "$optspec" optchar; do
echo
echo " -h Print this help message."
echo
echo " -p Used by THG to use hard-codes autotools"
echo " paths on THG machines. Not for non-HDF-Group"
echo " users!"
echo
echo " -v Show more verbose output."
echo
echo " NOTE: Each tool can be set via an environment variable."
@@ -97,11 +80,6 @@ while getopts "$optspec" optchar; do
echo
exit 0
;;
p)
echo "Setting THG production mode..."
echo
production=true
;;
v)
echo "Setting verbosity: high"
echo
@@ -117,84 +95,52 @@ while getopts "$optspec" optchar; do
esac
done
if [ "$production" = true ] ; then
# Production mode
#
# Hard-code canonical HDF Group tool locations.
# If paths to tools are not specified, assume they are
# located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
if test -z ${HDF5_AUTOCONF}; then
HDF5_AUTOCONF=/usr/hdf/bin/AUTOTOOLS/autoconf
fi
if test -z ${HDF5_AUTOMAKE}; then
HDF5_AUTOMAKE=/usr/hdf/bin/AUTOTOOLS/automake
fi
if test -z ${HDF5_AUTOHEADER}; then
HDF5_AUTOHEADER=/usr/hdf/bin/AUTOTOOLS/autoheader
fi
if test -z ${HDF5_ACLOCAL}; then
HDF5_ACLOCAL=/usr/hdf/bin/AUTOTOOLS/aclocal
fi
if test -z ${HDF5_LIBTOOL}; then
HDF5_LIBTOOL=/usr/hdf/bin/AUTOTOOLS/libtool
fi
if test -z ${HDF5_M4}; then
HDF5_M4=/usr/hdf/bin/AUTOTOOLS/m4
fi
else
# Not in production mode
#
# If paths to autotools are not specified, use whatever the system
# has installed as the default. We use 'which <tool>' to
# show exactly what's being used.
if test -z ${HDF5_AUTOCONF}; then
HDF5_AUTOCONF=$(which autoconf)
fi
if test -z ${HDF5_AUTOMAKE}; then
HDF5_AUTOMAKE=$(which automake)
fi
if test -z ${HDF5_AUTOHEADER}; then
HDF5_AUTOHEADER=$(which autoheader)
fi
if test -z ${HDF5_ACLOCAL}; then
HDF5_ACLOCAL=$(which aclocal)
fi
if test -z ${HDF5_LIBTOOL}; then
case "`uname`" in
Darwin*)
# libtool on OS-X is non-gnu
HDF5_LIBTOOL=$(which glibtool)
;;
*)
HDF5_LIBTOOL=$(which libtool)
;;
esac
fi
if test -z ${HDF5_M4}; then
HDF5_M4=$(which m4)
fi
fi # production
# If paths to autotools are not specified, use whatever the system
# has installed as the default. We use 'command -v <tool>' to
# show exactly what's being used (shellcheck complains that 'which'
# is non-standard and deprecated).
if test -z "${HDF5_AUTOCONF}"; then
HDF5_AUTOCONF="$(command -v autoconf)"
fi
if test -z "${HDF5_AUTOMAKE}"; then
HDF5_AUTOMAKE="$(command -v automake)"
fi
if test -z "${HDF5_AUTOHEADER}"; then
HDF5_AUTOHEADER="$(command -v autoheader)"
fi
if test -z "${HDF5_ACLOCAL}"; then
HDF5_ACLOCAL="$(command -v aclocal)"
fi
if test -z "${HDF5_LIBTOOL}"; then
case "$(uname)" in
Darwin*)
# libtool on OS-X is non-gnu
HDF5_LIBTOOL="$(command -v glibtool)"
;;
*)
HDF5_LIBTOOL="$(command -v libtool)"
;;
esac
fi
if test -z "${HDF5_M4}"; then
HDF5_M4="$(command -v m4)"
fi
# Make sure that these versions of the autotools are in the path
AUTOCONF_DIR=`dirname ${HDF5_AUTOCONF}`
LIBTOOL_DIR=`dirname ${HDF5_LIBTOOL}`
M4_DIR=`dirname ${HDF5_M4}`
AUTOCONF_DIR=$(dirname "${HDF5_AUTOCONF}")
LIBTOOL_DIR=$(dirname "${HDF5_LIBTOOL}")
M4_DIR=$(dirname "${HDF5_M4}")
PATH=${AUTOCONF_DIR}:${LIBTOOL_DIR}:${M4_DIR}:$PATH
# Make libtoolize match the specified libtool
case "`uname`" in
case "$(uname)" in
Darwin*)
# On OS X, libtoolize could be named glibtoolize or
# libtoolize. Try the former first, then fall back
# to the latter if it's not found.
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/glibtoolize"
if [ ! -f $HDF5_LIBTOOLIZE ] ; then
if [ ! -f "$HDF5_LIBTOOLIZE" ] ; then
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/libtoolize"
fi
;;
@@ -249,7 +195,7 @@ echo
# LIBTOOLIZE
libtoolize_cmd="${HDF5_LIBTOOLIZE} --copy --force"
echo ${libtoolize_cmd}
echo "${libtoolize_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_LIBTOOLIZE} --version
fi
@@ -264,7 +210,7 @@ if test -e "${LIBTOOL_DIR}/../share/aclocal" ; then
aclocal_include="-I ${LIBTOOL_DIR}/../share/aclocal"
fi
aclocal_cmd="${HDF5_ACLOCAL} --force -I m4 ${aclocal_include}"
echo ${aclocal_cmd}
echo "${aclocal_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_ACLOCAL} --version
fi
@@ -273,7 +219,7 @@ echo
# AUTOHEADER
autoheader_cmd="${HDF5_AUTOHEADER} --force"
echo ${autoheader_cmd}
echo "${autoheader_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOHEADER} --version
fi
@@ -282,7 +228,7 @@ echo
# AUTOMAKE
automake_cmd="${HDF5_AUTOMAKE} --copy --add-missing --force-missing"
echo ${automake_cmd}
echo "${automake_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOMAKE} --version
fi
@@ -291,7 +237,7 @@ echo
# AUTOCONF
autoconf_cmd="${HDF5_AUTOCONF} --force"
echo ${autoconf_cmd}
echo "${autoconf_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOCONF} --version
fi

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

@@ -1,2 +0,0 @@
The daily tests run copies of some of the scripts in this directory from another repository, notably snapshot and runtest. The copies in this directory should work, but are not used in daily tests, though they should be tested occasionally.

View File

@@ -7,39 +7,20 @@
# 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.
#
# Make a release of hdf5.
#
# Programmer: Robb Matzke
# Creation date: on or before 1998-01-29.
# NOTE:
# This script differs from bin/release in that this has an added
# --revision option to create private releases with the code revision
# hash in the version strings.
#
# Modifications
# Robb Matzke, 1999-07-16
# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like
# `sed s+/CVS++' to `sed 's/\/CVS//'
#
# Albert Cheng, 1999-10-26
# Moved the MANIFEST checking to a separate command file so that
# it can be invoked individually.
#
# Albert Cheng, 2004-08-14
# Added the --private option.
#
# James Laird, 2005-09-07
# Added the md5 method.
#
# Larry Knox, 2016-08-30
# Added the --revision option to create private releases with the
# code revision hash in the version strings. Currently the version
# of this script with the --revision option is named bbrelease. It
# can probably be merged into the original release script in the
# future.
# Commands to get the revision hash have now been converted to git
# to match the source repository change.
# This script can probably be merged into the original release script in
# the future.
# Function definitions
#
@@ -47,27 +28,27 @@
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
Usage: $0 -d <dir> [-h] [--private] [--revision [--branch BRANCHNAME]] <methods> ...
-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
--branch BRANCHNAME This is to get the correct version of the branch name from the
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
-h print the help page.
--nocheck Ignore errors in MANIFEST file.
--private Make a private release with today's date in version information.
--revision Make a private release with the code revision number in version information.
--private Make a private release with today's date in version information.
--revision Make a private release with the code revision number in version information.
This allows --branch to be used for the file name.
--branch BRANCHNAME This is to get the correct version of the branch name from the
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
This must be run at the top level of the source directory.
The other command-line options are the names of the programs to use
for compressing the resulting tar archive (if none are given then
"tar" is assumed):
tar -- use tar and don't do any compressing.
gzip -- use gzip with "-9" and append ".gz" to the output name.
tar -- use tar and don't do any compressing.
gzip -- use gzip with "-9" and append ".gz" to the output name.
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
zip -- convert all text files to DOS style and form a zip file for Windows use.
doc -- produce the latest doc tree in addition to the archive.
zip -- convert all text files to DOS style and form a zip file for Windows use.
An md5 checksum is produced for each archive created and stored in the md5 file.
@@ -97,15 +78,10 @@ EOF
# Function name: tar2zip
# Convert the release tarball to a Windows zipball.
#
# Programmer: Albert Cheng
# Creation date: 2014-04-23
#
# 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.
# the original source directory which may be around.
# 2. convert all its text files to DOS (LF-CR) style;
# 3. form a zip file which is usable by Windows users.
#
@@ -119,8 +95,8 @@ EOF
tar2zip()
{
if [ $# -ne 3 ]; then
echo "usage: tar2zip <tarfilename> <zipfilename>"
return 1
echo "usage: tar2zip <tarfilename> <zipfilename>"
return 1
fi
ztmpdir=/tmp/tmpdir$$
mkdir -p $ztmpdir
@@ -132,23 +108,23 @@ tar2zip()
(cd $ztmpdir; tar xf -) < $tarfile
# sanity check
if [ ! -d $ztmpdir/$version ]; then
echo "untar did not create $ztmpdir/$version source dir"
# cleanup
rm -rf $ztmpdir
return 1
echo "untar did not create $ztmpdir/$version source dir"
# cleanup
rm -rf $ztmpdir
return 1
fi
# step 2: convert text files
# There maybe a simpler way to do this.
# options used in unix2dos:
# -k Keep the date stamp
# -k Keep the date stamp
# -q quiet mode
# grep redirect output to /dev/null because -q or -s are not portable.
find $ztmpdir/$version | \
while read inf; do \
if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
unix2dos -q -k $inf; \
fi\
done
while read inf; do \
if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
unix2dos -q -k $inf; \
fi\
done
# step 3: make zipball
# -9 maximum compression
# -y Store symbolic links as such in the zip archive
@@ -163,14 +139,6 @@ tar2zip()
# This command must be run at the top level of the hdf5 source directory.
# Verify this requirement.
# Since we are running bbrelease to create an HDF5 source tarfile for buildbot
# testing with source that is not for release, there is not a file named
# "configure" but there will be one named "configure.ac". The "configure"
# file will be created when autogen.sh runs. There probably will always
# be a bin/release file, but just in case it is removed, we can check for
# this script, bbrelease, in the bin directory. The bin/release script should
# continue to check for "configure" because it should be present in release
# source.
if [ ! \( -f configure.ac -a -f bin/bbrelease \) ]; then
echo "$0 must be run at the top level of the hdf5 source directory"
exit 1
@@ -182,24 +150,22 @@ VERS=`perl bin/h5vers`
VERS_OLD=
test "$VERS" || exit 1
verbose=yes
check=yes
release_date=`date +%F`
today=`date +%Y%m%d`
pmode='no'
revmode='no'
tmpdir="../#release_tmp.$$" # tmp work directory
DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git
tmpdir="../#release_tmp.$$" # tmp work directory
CPPLUS_RM_NAME=cpplus_RM
# Restore previous Version information
RESTORE_VERSION()
{
if [ X-${VERS_OLD} != X- ]; then
echo restoring version information back to $VERS_OLD
rm -f config/lt_vers.am
cp $tmpdir/lt_vers.am config/lt_vers.am
bin/h5vers -s $VERS_OLD
VERS_OLD=
echo restoring version information back to $VERS_OLD
rm -f config/lt_vers.am
cp $tmpdir/lt_vers.am config/lt_vers.am
bin/h5vers -s $VERS_OLD
VERS_OLD=
fi
}
@@ -209,35 +175,32 @@ while [ -n "$1" ]; do
arg=$1
shift
case "$arg" in
-d)
DEST=$1
shift
;;
--nocheck)
check=no
;;
-h)
USAGE
exit 0
;;
--private)
pmode=yes
;;
-d)
DEST=$1
shift
;;
-h)
USAGE
exit 0
;;
--private)
pmode=yes
;;
--revision)
revmode=yes
;;
--docver)
DOCVERSION=$1
--branch)
BRANCHNAME=$1
shift
;;
-*)
echo "Unknown switch: $arg" 1>&2
USAGE
exit 1
;;
*)
methods="$methods $arg"
;;
-*)
echo "Unknown switch: $arg" 1>&2
USAGE
exit 1
;;
*)
methods="$methods $arg"
;;
esac
done
@@ -246,7 +209,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
@@ -276,14 +239,17 @@ if [ X$revmode = Xyes ]; then
# Copy old version of config/lt_vers.am, since it's hard to
# "undo" changes to it.
cp config/lt_vers.am $tmpdir
branch=`git branch | grep '*' | awk '{print $NF}'`
if [ "${BRANCHNAME}" = "" ]; then
BRANCHNAME=`git symbolic-ref -q --short HEAD`
fi
revision=`git rev-parse --short HEAD`
# Set version information to m.n.r-r$revision.
# Set version information to m.n.r-r$revision.
# (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-$revision
echo Private release of $VERS
HDF5_VERS=hdf5-$BRANCHNAME-$revision
echo file base of $HDF5_VERS
bin/h5vers -s $VERS
HDF5_VERS=hdf5-$branch-$revision
# use a generic directory name for revision releases
HDF5_IN_VERS=hdfsrc
else
@@ -299,30 +265,17 @@ if [ ! -d $DEST ]; then
exit 1
fi
# Check the validity of the MANIFEST file.
bin/chkmanifest || fail=yes
if [ "X$fail" = "Xyes" ]; then
if [ $check = yes ]; then
exit 1
else
echo "Continuing anyway..."
fi
fi
# Create a manifest that contains only files for distribution.
MANIFEST=$tmpdir/H5_MANIFEST
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
# Prepare the source tree for a release.
#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
# Create a symlink to the source so files in the tarball have the prefix
# we want (gnu's --transform isn't portable)
ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1
# Save a backup copy of Makefile if exists.
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
@@ -330,64 +283,38 @@ for f in README.txt release_docs/RELEASE.txt; do
chmod 644 $f
done
# trunk is different than branches.
if [ "${DOCVERSION}" ]; then
DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git -b ${DOCVERSION}
fi
# Create the tar file
test "$verbose" && echo " Running tar..." 1>&2
( \
cd $tmpdir; \
tar cf $HDF5_VERS.tar $HDF5_IN_VERS/Makefile \
`sed 's/^\.\//'$HDF5_IN_VERS'\//' $MANIFEST` || exit 1 \
)
(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_IN_VERS" || exit 1 )
# Compress
MD5file=$HDF5_VERS.md5
cp /dev/null $DEST/$MD5file
for comp in $methods; do
case $comp in
tar)
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
(cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
;;
gzip)
test "$verbose" && echo " Running gzip..." 1>&2
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
(cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
;;
bzip2)
test "$verbose" && echo " Running bzip2..." 1>&2
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
(cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
;;
zip)
test "$verbose" && echo " Creating zip ball..." 1>&2
tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
(cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
;;
doc)
if [ "${DOCVERSION}" = "" ]; then
DOCVERSION=master
fi
test "$verbose" && echo " Creating docs..." 1>&2
# Check out docs from git repo
(cd $tmpdir; git clone $DOC_URL > /dev/null) || exit 1
# Create doxygen C++ RM
(cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1
# Replace version of C++ RM with just-created version
rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
# Compress the docs and move them to the release area
mv $tmpdir/$DOCVERSION $tmpdir/${HDF5_VERS}_docs
(cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
;;
*)
echo "***Error*** Unknown method $comp"
exit 1
;;
tar)
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
(cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
;;
gzip)
test "$verbose" && echo " Running gzip..." 1>&2
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
(cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
;;
bzip2)
test "$verbose" && echo " Running bzip2..." 1>&2
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
(cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
;;
zip)
test "$verbose" && echo " Creating zip ball..." 1>&2
tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
(cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
;;
*)
echo "***Error*** Unknown method $comp"
exit 1
;;
esac
done
@@ -408,4 +335,6 @@ fi
# Remove temporary things
rm -rf $tmpdir
echo "DONE"
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.
#
@@ -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,18 +115,24 @@ 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)?(_NAMECHECK_ONLY|_NO_EOT|_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$/;
next if $name =~ /^TERMINATOR$/;
# These functions/macros are exempt.
# op, cb, and OP are often spuriously flagged so ignore them.
next if $name =~ /^(main|op|cb|OP)$/;
# BSD queue functions
next if $name =~ /^(TAILQ_|SIMPLEQ_)/;
# Ignore callback invocation
next if $name =~ /^(op|cb|OP|iter_op|func)$/;
# Ignore main
next if $name =~ /^main$/;
# This often appears in preprocessor lines that span multiple lines
next if $name =~ /^(defined)$/;
@@ -140,15 +166,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 +207,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

@@ -1,154 +0,0 @@
#!/bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# 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.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Check that all the files in MANIFEST exist and (if this is a
# GIT checkout) that all the GIT-managed files appear in the
# MANIFEST.
#
verbose=yes
MANIFEST=/tmp/HD_MANIFEST.$$
AUTOGEN=./autogen.sh
AUTOGEN_LOG=/tmp/autogen.log.$$
# Main
test "$verbose" && echo " Checking MANIFEST..." 1>&2
# clean up $MANIFEST file when exits
trap "rm -f $MANIFEST" 0
# Only split lines on newline, not whitespace
set -f
IFS='
'
# First make sure i am in the directory in which there is an MANIFEST file
# and then do the checking from there. Will try the following,
# current directory, parent directory, the directory this command resides.
if [ -f MANIFEST ]; then
continue
elif [ -f ../MANIFEST ]; then
cd ..
else
commanddir=`dirname $0`
if [ -d "$commanddir" -a -f $commanddir/MANIFEST ]; then
cd $commanddir
continue
else
echo MANIFEST file not found. Abort.
exit 1
fi
fi
# Do an autogen if generated files (e.g., configure) is not present
if [ ! -f configure ]; then
echo " running $AUTOGEN"
$AUTOGEN > $AUTOGEN_LOG 2>&1
if [ $? -ne 0 ]; then
echo $AUTOGEN encountered error. Abort.
echo output from $AUTOGEN:
cat $AUTOGEN_LOG
exit 1
fi
rm $AUTOGEN_LOG
fi
# Check for duplicate entries. This can be done at any time, but it may as
# well be sooner so that if something else fails the presence of duplicates
# will already be known.
errcode=0
DUPLICATES=`perl -ne 's/#.*//; next if /^\s*$/; if ($uniq{$_}++) { print $_; }' MANIFEST`
if [ "$DUPLICATES" ]; then
cat 1>&2 <<EOF
These entries appear more than once in the MANIFEST:
$DUPLICATES
Please remove the duplicate lines and try again.
EOF
errcode=1
fi
# Copy the manifest file to get a list of file names.
grep '^\.' MANIFEST | expand | cut -f1 -d' ' >$MANIFEST
for file in `cat $MANIFEST`; do
if [ ! -f $file ]; then
echo "- $file"
fail=yes
fi
done
# Get the list of files under version control and check that they are
# present.
#
# First get a list of all the pending files with git status and
# check those.
git_stat=`git status -s`
for file in $git_stat; do
# Newly added files are not listed by git ls-files, which
# we check later.
# The line listing new files starts with 'A'.
letter=`echo $file | head -c 1`
if [ "$letter" = "A" ]; then
# Convert the git status columns to './' so it matches
# the manifest file name.
#
# There is a space between the status columns and file name, hence
# the '3'.
path=`echo $file | sed 's/^.\{3\}/\.\//g'`
# Ignore directories
if [ ! -d $path ]; then
if (grep ^$path$ $MANIFEST >/dev/null); then
:
else
echo "- $path"
fail=yes
fi
fi
fi
done
# Next check git ls-files, which gets a list of all files that are
# checked in.
git_ls=`git ls-files`
for file in $git_ls; do
path="./${file}"
# Ignore directories
if [ ! -d $path ]; then
if (grep ^$path$ $MANIFEST >/dev/null); then
:
else
echo "+ $path"
fail=yes
fi
fi
done
# Finish up
if [ "X$fail" = "Xyes" ]; then
cat 1>&2 <<EOF
The MANIFEST is out of date. Files marked with a minus sign (-) no
longer exist; files marked with a plus sign (+) are GIT-managed but do
not appear in the MANIFEST. Please remedy the situation and try again.
EOF
exit 1
fi
if [ $errcode -ne 0 ]; then
exit 1
fi
test "$verbose" && echo " The MANIFEST is up to date." 1>&2
exit 0

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 -or -iname *.java \) \) \
| 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 -or -iname *.java \) \) \
| 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

@@ -1,238 +0,0 @@
#!/bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# 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.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Try to locate the software as named in argument.
# This is a sequential search of all possible locations of the software.
# Usage: locate_sw <SW-Name>
# It prints a string showing the paths leading to the include, lib and bin
# directory of the software, separated by colons. E.g., if the software is
# located in /usr/sdt/*, it prints
# /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin
# Any component that is not found will be returned as an empty string. E.g.,
# if somehow the header files of the software are not found, it prints
# :/usr/sdt/lib;/usr/sdt/bin
# Function definitions
USAGE()
{
echo "Usage: locate_sw <SW-Name>"
echo " where <SW-Name> can be hdf4, hdf5, zlib"
echo " It prints the paths leading the header files (include),"
echo " library (lib), and tools (bin). E.g.,"
echo " /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin"
echo " Any component that is not found will be returned as an empty string. E.g.,"
echo " if somehow the header files of the software are not found, it prints"
echo " :/usr/sdt/lib;/usr/sdt/bin"
echo "Exit code: 0 if software located; otherwise non-zero"
}
# locate hdf4 software
locate_hdf4()
{
# this default is the best guess of locating hdf4 software
swpaths_defaults="/usr/ncsa /usr/sdt /usr/local"
swpaths=
case "$OSname" in
SunOS)
case "$OSrelease" in
5.7)
swpaths="/afs/ncsa/packages/hdf/SunOS_5.7"
;;
*)
# use default
;;
esac
;;
HP-UX)
case "$OSrelease" in
B.11.00)
swpaths="/afs/ncsa/packages/hdf/HPUX_11.00"
;;
*)
# use default
;;
esac
;;
Linux)
swpaths="/afs/ncsa/packages/hdf/Linux"
;;
OSF1)
swpaths="/afs/ncsa/packages/hdf/OSF1_V4.0"
;;
*)
# just use the defaults
;;
esac
# Check if the hdf4 software is actually available.
# Accept the directory only if needed .h, .a and tools are found
# in the same place. That way, they are more likely to be of the
# same version.
#
swpaths="$swpaths $swpaths_defaults"
for sw in $swpaths; do
if [ -r $sw/include/hdf.h -a -r $sw/lib/libdf.a -a -r $sw/bin/hdp ]; then
SW_inc=$sw/include
SW_lib=$sw/lib
SW_bin=$sw/bin
SW_Location=$sw
break
fi
done
}
# locate hdf5 software
locate_hdf5()
{
# this default is the best guess of locating hdf5 software
swpaths_defaults="/usr/ncsa /usr/sdt /usr/local"
swpaths=
case "$OSname" in
SunOS)
case "$OSrelease" in
5.7)
swpaths="/afs/ncsa/packages/hdf5/SunOS_5.7"
;;
*)
# use default
;;
esac
;;
HP-UX)
case "$OSrelease" in
B.11.00)
swpaths="/afs/ncsa/packages/hdf5/HPUX_11.00"
;;
*)
# use default
;;
esac
;;
Linux)
swpaths="/afs/ncsa/packages/hdf5/Linux"
;;
FreeBSD)
swpaths="/afs/ncsa/packages/hdf5/FreeBSD"
;;
OSF1)
swpaths="/afs/ncsa/packages/hdf5/OSF1_V4.0"
;;
*)
# just use the defaults
;;
esac
# Check if the hdf5 software is actually available.
# Accept the directory only if needed .h, .a and tools are found
# in the same place. That way, they are more likely to be of the
# same version.
#
swpaths="$swpaths $swpaths_defaults"
for sw in $swpaths; do
if [ -r $sw/include/hdf5.h -a -r $sw/lib/libhdf5.a -a -r $sw/bin/h5dump ]; then
SW_inc=$sw/include
SW_lib=$sw/lib
SW_bin=$sw/bin
SW_Location=$sw
break
fi
done
}
# locate zlib software
locate_zlib()
{
# this default is the best guess of locating zlib software
swpaths_defaults="/usr /usr/local /usr/ncsa /usr/sdt"
swpaths=
# Check if the zlib software is actually available.
# Accept the directory only if needed .h, .a and tools are found
# in the same place. That way, they are more likely to be of the
# same version.
# Don't know something specific to check the bin directory. Maybe gzip?
# Just make sure it exists.
#
swpaths="$swpaths $swpaths_defaults"
for sw in $swpaths; do
if [ -r $sw/include/zlib.h -a \
\( -r $sw/lib/libz.a -o -r $sw/lib/libz.so \) -a -d $cw/bin ]; then
SW_inc=$sw/include
SW_lib=$sw/lib
SW_bin=$sw/bin
SW_Location=$sw
break
fi
done
# if none found, try HDF4 software which contains a version of zlib.
if [ x-$SW_Location = x- ]; then
locate_hdf4
fi
}
# Main
#
# Options
#
if [ $# -lt 1 ]; then
USAGE
exit 1
fi
if [ "$1" = -h ]; then
USAGE
exit 0
fi
SW=$1
shift
# locations of the software seeked.
SW_inc= # include place
SW_lib= # library place
SW_bin= # binary place
SW_Location= # parent directory of all the above
OSname=`uname -s`
OSrelease=`uname -r`
case $SW in
hdf4|hdf)
locate_hdf4
;;
hdf5)
locate_hdf5
;;
zlib)
locate_zlib
;;
*)
echo "unknown software ($SW)"
USAGE
exit 1
;;
esac
# show the results located, separated by commas.
if [ -n "${SW_inc}" -a -n "${SW_lib}" -a -n "${SW_bin}" ]; then
echo ${SW_inc},${SW_lib},${SW_bin}
exit 0
else
exit 1
fi

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

@@ -6,7 +6,7 @@ use warnings;
# (The max_idx parameter is the only thing that needs to be changed when adding
# support for a new major release. If support for a prior major release
# is added (like support for 1.4, etc), the min_sup_idx parameter will
# need to be decremented. - QAK)
# need to be decremented.)
# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, etc)
$max_idx = 7;
@@ -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,30 +7,12 @@
# 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.
#
# Make a release of hdf5.
#
# Programmer: Robb Matzke
# Creation date: on or before 1998-01-29.
#
# Modifications
# Robb Matzke, 1999-07-16
# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like
# `sed s+/CVS++' to `sed 's/\/CVS//'
#
# Albert Cheng, 1999-10-26
# Moved the MANIFEST checking to a separate command file so that
# it can be invoked individually.
#
# Albert Cheng, 2004-08-14
# Added the --private option.
#
# James Laird, 2005-09-07
# Added the md5 method.
# Function definitions
#
@@ -38,14 +20,13 @@
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
Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--private] <methods> ...
-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
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
-h print the help page.
--nocheck Ignore errors in MANIFEST file.
--private Make a private release with today's date in version information.
This must be run at the top level of the source directory.
@@ -60,7 +41,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
@@ -100,11 +81,6 @@ EOF
# Function name: tar2zip
# Convert the release tarball to a Windows zipball.
#
# Programmer: Albert Cheng
# Creation date: 2014-04-23
#
# Modifications
#
# Steps:
# 1. untar the tarball in a temporary directory;
# Note: do this in a temporary directory to avoid changing
@@ -167,11 +143,6 @@ tar2zip()
# Function name: tar2cmakezip
# Convert the release tarball to a Windows zipball with files to run CMake build.
#
# Programmer: Larry Knox
# Creation date: 2017-02-20
#
# Modifications
#
# Steps:
# 1. untar the tarball in a temporary directory;
# Note: do this in a temporary directory to avoid changing
@@ -229,11 +200,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
@@ -266,10 +240,6 @@ tar2cmakezip()
# Function name: tar2cmaketgz
# Convert the release tarball to a gzipped tar file with files to run CMake build.
#
# Programmer: Larry Knox
# Creation date: 2017-02-20
#
# Modifications
#
# Steps:
# 1. untar the tarball in a temporary directory;
@@ -328,7 +298,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
@@ -343,11 +314,6 @@ tar2cmaketgz()
# and HDF5options.cmake files for parallel or serial only builds where build
# tests are run on compute nodes using batch scripts.
#
# Programmer: Larry Knox
# Creation date: 2019-01-28
#
# Modifications
#
# Steps:
# 1. untar the tarball in a temporary directory;
# Note: do this in a temporary directory to avoid changing
@@ -411,7 +377,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
@@ -438,7 +405,6 @@ VERS=`perl bin/h5vers`
VERS_OLD=
test "$VERS" || exit 1
verbose=yes
check=yes
release_date=`date +%F`
today=`date +%Y%m%d`
pmode='no'
@@ -477,9 +443,6 @@ while [ -n "$1" ]; do
DEST=$1
shift
;;
--nocheck)
check=no
;;
-h)
USAGE
exit 0
@@ -507,7 +470,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
@@ -541,35 +504,17 @@ if [ ! -d $DEST ]; then
exit 1
fi
# Check the validity of the MANIFEST file.
bin/chkmanifest || fail=yes
if [ "X$fail" = "Xyes" ]; then
if [ $check = yes ]; then
echo ""
echo "Note! If you are running bin/release in a development branch"
echo "later than v 1.8 the MANIFEST check is expected to fail when"
echo "autogen.sh has not been run successfully. Either run autogen.sh "
echo "with /usr/hdf/bin/AUTOTOOLS at the beginning of PATH or add the"
echo "--nocheck argument to the bin/release command."
exit 1
else
echo "Continuing anyway..."
fi
fi
# Create a manifest that contains only files for distribution.
MANIFEST=$tmpdir/H5_MANIFEST
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
# Prepare the source tree for a release.
# Create a symlink to the source so files in the tarball have the prefix
# we want (gnu's --transform isn't portable)
ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
# Save a backup copy of Makefile if exists.
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
@@ -577,18 +522,14 @@ for f in README.txt release_docs/RELEASE.txt; do
chmod 644 $f
done
# trunk is different than branches.
# develop is different than branches.
if [ "${DOCVERSION}" ]; then
DOC_URL="$DOC_URL -b ${DOCVERSION}"
fi
# Create the tar file
test "$verbose" && echo " Running tar..." 1>&2
( \
cd $tmpdir; \
tar cf $HDF5_VERS.tar $HDF5_VERS/Makefile \
`sed 's/^\.\//hdf5-'$VERS'\//' $MANIFEST` || exit 1 \
)
(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_VERS" || exit 1 )
# Compress
MD5file=$HDF5_VERS.md5
@@ -675,4 +616,6 @@ fi
# Remove temporary things
rm -rf $tmpdir
echo "DONE"
exit 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.
#
@@ -48,6 +48,9 @@ rm -f bin/missing
rm -f bin/test-driver
rm -f bin/depcomp
echo "Remove files generated by autoheader"
rm -f src/H5config.h.in
echo "Remove files generated by bin/make_err"
rm -f src/H5Epubgen.h
rm -f src/H5Einit.h

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

@@ -1,966 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# 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.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# run the hdf5/bin/snapshot
# Usage:
# runtest run the test for the local host
# runtest <hostname> run the test for <hostname>
# runtest -all run the test for all predefined hosts
#
# Assumptions in knowing where to find the right scripts to execute.
# 1. assume we are at the top level of the hdf5 source. So, bin/* are
# where the script files are.
# 2. after the cvs update is completed, we can go to the snapshot area
# hdf5 source tree and use the bin/* there.
# 3. Cannot use the snapshot area scripts from the beginning because
# for one, the current directory is renamed as previous right after
# a snapshot release; and for another, some scripts may be changed
# by the cvs update while it is being used.
# local setup
DEBUGMODE=""
test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************"
WHEREAMI='pwd'
CMD=
# the name of this program
PROGNAME="bin/runtest $DEBUGMODE"
# Setup
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
TODAY=`date +%m%d%a`
WEEKDAY=`date +%a`
H5VER= # default to current CVS version
H5VERSION= # default to current CVS version
n_test=0 # Number of tests ran
n_pass=0 # Number of tests passed
n_fail=0 # Number of tests failed
n_skip=0 # Number of tests skipped
# Default to do checkout (only once) and test, no release.
# Will run test only if there is significant differences from previous version.
# If srcdir is not used, don't launched multiple tests
SNAPSHOT="${DEBUGMODE:+echo }bin/snapshot"
SRCDIR="srcdir"
# Default standard Snaptest commands
SNAPCMD="$SRCDIR test clean"
# Default Standard snaptest command options
STANDARD_OPT=""
ENABLE_PARALLEL="--enable-parallel"
CONFIGNAME=$HOSTNAME # Name used in the SNAPTESTCFG file
# test host default as local host.
TESTHOST=""
#################################
# Function definitions
#################################
# Print messages to stdout
# Use this to show output heading to stdout
PRINT()
{
echo "$*"
}
# Show seconds since midnight.
# This is used to calculate seconds elapsed
SecOfDay()
{
set `date '+%H %M %S'`
t_sec=`expr $1 \* 3600 + $2 \* 60 + $3`
echo $t_sec
}
# Calculated the elapsed time (in seconds) between the first
# and second time. If second time is smaller than the first,
# we assume the clock has passed midnight and calculate appropriately.
ElapsedTime()
{
if [ $2 -lt $1 ]; then
t_sec=`expr 3600 \* 24 - $1 + $2`
else
t_sec=`expr $2 - $1`
fi
echo `expr $t_sec / 60`m `expr $t_sec % 60`s
}
# Report errors
# $1--an error message to be printed
REPORT_ERR()
{
ERRMSG=$1
# print it with a banner shifted right a bit
PRINT " *************************************"
PRINT " `date`"
PRINT " $ERRMSG"
PRINT " *************************************"
# report it in the FAILED-LOG file too
PRINT "$ERRMSG" >> $FAILEDLOG
}
#
# Report results of the last test done
REPORT_RESULT()
{
if [ $retcode -eq 0 ]; then
if [ $skiptest = yes ]; then
n_skip=`expr $n_skip + 1`
PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $SKIPPEDLOG
else
n_pass=`expr $n_pass + 1`
PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG
fi
else
# test failed.
n_fail=`expr $n_fail + 1`
REPORT_ERR "****FAILED ${HOSTNAME}: $TEST_TYPE****"
fi
}
# Print a blank line
PRINT_BLANK()
{
PRINT
}
# Print test trailer
PRINT_TEST_TRAILER()
{
PRINT "*** finished $TEST_TYPE tests for $HOSTNAME ***"
date; EndTime=`SecOfDay`
PRINT Total time = `ElapsedTime $StartTime $EndTime`
PRINT_BLANK
}
# Print trailer summary
PRINT_TRAILER()
{
PRINT "*** finished tests in $HOSTNAME ***"
date; TotalEndTime=`SecOfDay`
PRINT "${HOSTNAME}: Ran $n_test($n_pass/$n_fail/$n_skip) $runtest_type, Grand total test time = " \
"`ElapsedTime $TotalStartTime $TotalEndTime`" | tee -a $TIMELOG
PRINT_BLANK
}
# Figure out which remote command to use to reach a host.
# Try ssh first, then rsh since fewer machines support rsh exec.
# $1--hostname to reach.
CHECK_RSH()
{
# Figure out how to use ping command in this host.
# Some hosts use "ping host count", some use "ping -c count host".
# Test "ping -c 3 -w 5" since it has timeout feature.
# Test "ping -c ..." style before "ping host 3" because some machines
# that recognize -c treat 'ping localhost 3' as to ping host '3'.
if [ -z "$PING" ]; then
if ping -c 3 -w 5 localhost >/dev/null 2>&1; then
PING='ping -c 3 -w 5'
PINGCOUNT=
elif ping -c 3 localhost >/dev/null 2>&1; then
PING='ping -c 3'
PINGCOUNT=
elif ping localhost 3 >/dev/null 2>&1; then
PING=ping
PINGCOUNT=3
else # don't know how to use ping.
PING=no_ping
PINGCOUNT=
fi
fi
#
host=$1
# Try remote command with host if it responds to ping.
# Still try it if we don't know how to do ping.
if [ no_ping = "$PING" ] || $PING $host $PINGCOUNT >/dev/null 2>&1; then
if ssh $host -n hostname >/dev/null 2>&1; then
RSH=ssh
elif rsh $host -n hostname >/dev/null 2>&1; then
RSH=rsh
else
PRINT cannot remote command with $host
RSH="NoRemoteCommand"
fi
else
RSH="NotReachable"
fi
}
# Wait for a file for at most number of minutes
# $1--the file
# $2--number of minutes
# WAIT_STATUS set to:
# -1 if errors encountered
# 0 if file found within time limit
# 1 if file not found within time limit
WAITFOR()
{
wait_file=$1
nminutes=$2
if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
then
PRINT "errors in argument of WAITFOR(): wait_file($1) or nminutes($2)"
WAIT_STATUS=-1
return
fi
while [ ! -f $wait_file ]; do
if [ $nminutes -gt 0 ]; then
PRINT "Wait For $wait_file to appear"
sleep 60 #sleep 1 minute
else
WAIT_STATUS=1
return
fi
nminutes=`expr $nminutes - 1`
done
WAIT_STATUS=0
return
}
# Wait till a file disappears for at most number of minutes.
# Useful to wait till a lock is removed by another process.
# $1--the file
# $2--number of minutes
# WAIT_STATUS set to:
# -1 if errors encountered
# 0 if file disappears within time limit
# 1 if file has not disappeared within time limit
WAITTILL()
{
wait_file=$1
nminutes=$2
if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
then
PRINT "errors in argument of WAITTILL(): wait_file($1) or nminutes($2)"
WAIT_STATUS=-1
return
fi
while [ -f $wait_file ]; do
if [ $nminutes -gt 0 ]; then
PRINT "Wait till $wait_file has disappeared"
sleep 60 #sleep 1 minute
else
WAIT_STATUS=1
return
fi
nminutes=`expr $nminutes - 1`
done
WAIT_STATUS=0
return
}
# Run one snapshot test
# $*--Types of test being run
RUNSNAPTEST()
{
SNAPCMD_OPT="$STANDARD_OPT" # snapshot test option
SRCDIRNAME=${HOSTNAME}
# restore CC, PATH in case they were changed in the last test.
CC="$CC_SAVED"
PATH=$PATH_SAVED
export PATH # DEC OSF1 needs to export PATH explicitly
TEST_TYPE=$*
retcode=0
skiptest=no
date
PRINT "*** starting $TEST_TYPE tests in $HOSTNAME ***"
PRINT "Uname -a: `uname -a`"
# Parse the test type and set options accordingly.
# See comments of SNAPTEST_CONFIG_PARSE().
while [ $# -gt 0 ]; do
case $1 in
-n32) # want -n32 option
SRCDIRNAME=${SRCDIRNAME}-n32
CC="cc -n32"
export CC
;;
-64) # want -64 option
SRCDIRNAME=${SRCDIRNAME}-64
CC="cc -64"
export CC
;;
parallel) # want parallel test
SNAPCMD_OPT="$SNAPCMD_OPT $ENABLE_PARALLEL"
SRCDIRNAME=${SRCDIRNAME}-pp
;;
standard) # standard test
;;
--*)
# option for configure
SNAPCMD_OPT="$SNAPCMD_OPT $1"
;;
op-configure)
# option for configure
SNAPCMD_OPT="$SNAPCMD_OPT $1 $2"
shift
;;
op-snapshot)
# option for snapshot
shift
SNAPCMD_OPT="$SNAPCMD_OPT $1"
;;
setenv)
# pass them along to snapshot set environment variable
shift
SNAPCMD_OPT="$SNAPCMD_OPT setenv $1 $2"
shift
;;
setenvN)
# set environment variable with $1 values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
# pass them along to snapshot set environment variable
shift
envN=$1
shift
envname=$1
SNAPCMD_OPT="$SNAPCMD_OPT setenvN $envN $envname"
envalue=
while test $envN -gt 0; do
shift
envalue="$envalue $1"
envN=`expr $envN - 1`
done
SNAPCMD_OPT="$SNAPCMD_OPT $envalue"
;;
skip)
# skip this test
skiptest=yes
;;
srcdirname)
# Use this before using parallel and -n32 since this overrides
# the others.
shift
SRCDIRNAME=$1
;;
deploy)
# deploy the built binary.
shift
SNAPCMD_OPT="$SNAPCMD_OPT deploy $1"
;;
deploydir)
# default directory for deployment.
shift
SNAPCMD_OPT="$SNAPCMD_OPT deploydir $1"
;;
*) # unknown test
PRINT "$0: unknown type of test ($1)"
retcode=1
;;
esac
shift
done
if [ $retcode -ne 0 -o $skiptest = yes ]; then
errcode=$retcode
return $retcode
fi
# Track down the zlib software
ans=`$SNAPYARD/current/bin/locate_sw zlib`
if [ $? = 0 ]; then
Z_INC=`echo $ans | cut -f1 -d,`
Z_LIB=`echo $ans | cut -f2 -d,`
SNAPCMD_OPT="$SNAPCMD_OPT zlib $Z_INC,$Z_LIB"
else
# cannot locate zlib software.
# continue the test, maybe configure can find it.
:
fi
if [ -n "${SRCDIRNAME}" ]; then
SNAPCMD_OPT="$SNAPCMD_OPT srcdirname ${SRCDIRNAME}"
fi
# Setup log file name to save test output
THIS_MINUTE=`date +%H%M`
LOGFILE=${LOGBASENAME}/${SRCDIRNAME}_${TODAY}_${THIS_MINUTE}
PRINT "Running snapshot with output saved in"
PRINT " $LOGFILE"
(date; PRINT Hostname=$HOSTNAME) >> $LOGFILE
(
cd $SNAPYARD/current
$SNAPSHOT $SNAPCMD $SNAPCMD_OPT
) >> $LOGFILE 2>&1
retcode=$?
[ $retcode -ne 0 ] && errcode=$retcode
date >> $LOGFILE
if [ $retcode -ne 0 ]; then
# Dump the first 10 lines and the last 30 lines of the LOGFILE.
( ntail=30
echo =========================
echo "Dumping logfile of ${HOSTNAME}: $TEST_TYPE"
echo "Last $ntail lines of $LOGFILE"
echo =========================
tail -$ntail $LOGFILE
echo =========================
echo Dumping done
echo =========================
echo ""
) >> $FAILEDDETAIL
fi
}
TIMELIMIT_PARSE()
{
# Function returns timeparam for timekeeper via standard out -
# any debug statements should be 'echo "Debug string" >&2' or timekeeper
# will declare timeparam to be non-numeric and ignore it.
while read x y ; do
# Scan for entry for this weekday.
xd=`echo $x | cut -f1 -d/`
if [ "$xd" = ${WEEKDAY} ]; then
# strip away the weekday/ part.
timeparam=`echo $x | cut -f2 -d/`
break
fi
case "$x" in
'' | '#'*)
# blank or comment lines. Continue.
;;
???/*)
# Ignore any entry not of this weekday.
;;
*)
timeparam="$x"
;;
esac
done
echo $timeparam
return
}
# configuration parsing.
# Taking configuration from input.
# This should be invoke with configure file as stdin.
# Syntax of the configure file:
# All lines started with the # are comment lines and are ignored.
# Blank lines are ignored too.
# Each config line starts with a "Scope" followed by test types.
#
# Scope can be:
# standard ... # what the standard test types are.
# <host>: <test> Do <test> for <host>
# all: <test> Do <test> for all hosts.
# <weekday>/... Use this scope if the <weekday> matches.
# <weekday> can be {Mon,Tue,Wed,Thu,Fri,Sat,Sun}
# If no <host>: input for a <host>, the standard test is used.
#
# Test types:
# standard tests defined in standard scope.
# -n32 -n32 mode. Apply to 64/32 bit OS such as IRIX64.
# parallel parallel mode.
# op-configure <option> configure option
# op-snapshot <option> snapshot option
# --* configure option
# setenv <name> <value> set environment variable <name> to <value>
# Pass along to snapshot
# setenvN <N> <name> <value> ...
# set environment variable with <N> values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
# Pass along to snapshot.
# skip skip this test
# srcdirname <name> use <name> as the build-directory.
# deploy <name> deploy the built binary at directory <name>.
# deploydir <name> use <name> as the default directory for deployment.
SNAPTEST_CONFIG_PARSE()
{
while read x y ; do
# Scan for entry for this weekday.
xd=`echo $x | cut -f1 -d/`
if [ "$xd" = ${WEEKDAY} ]; then
# strip away the weekday/ part.
x=`echo $x | cut -f2 -d/`
fi
case "$x" in
'' | '#'*)
# blank or comment lines. Continue.
;;
???/*)
# Ignore any entry not of this weekday.
;;
standard)
#standard configuration
STANDARD_OPT="$y"
;;
all: | ${CONFIGNAME}:)
# types of test for all hosts or this host
if [ -n "$TEST_TYPES" ]; then
TEST_TYPES="$TEST_TYPES ; $y"
else
TEST_TYPES="$y"
fi
;;
*:) # ignore types of test for other hosts
;;
*) # unknown configuration option
PRINT $x $y
PRINT "***Unknown configuration option. Ignored.***"
;;
esac
done
}
# Snap Test configuration parsing.
# If TEST_TYPES is not set, set it to do the "standard" test.
SNAPTEST_CONFIG()
{
TEST_TYPES=
STANDARD_OPT=
if [ -f $SNAPTESTCFG ]; then
SNAPTEST_CONFIG_PARSE < $SNAPTESTCFG
fi
TEST_TYPES=${TEST_TYPES:-'standard'}
}
# Show usage page
USAGE()
{
cat <<EOF
Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [-nodiff] [<host> ...]
-h
print this help page
-debug
turn on debug mode
-r<version>
do runtest for <version>
-all
launch tests for all pre-defined testing hosts
-nocvs
do not do cvs commands
-nodiff
do not do diff commands
-setup
setup the directory structure for snapshot test
-configname <name>
use <name> as hostname in the parsing of the snaptest configure file
<host>
launch tests for <host>
-all and <host> are contradictory and whichever is specified last, is
the one to take effect. If neither are given, do the test for the
local host.
EOF
}
# Verify if directory ($1) exists. If not, create it.
CHECK_DIR()
{
dir=$1
if test ! -e $1; then
echo mkdir $1
mkdir $1
errcode=$?
elif test ! -d $1; then
echo $1 is not a directory
errcode=1
fi
}
#################################
# Main
#################################
#################################
# Set up global variables
#################################
retcode=0 # error code of individula task
errcode=0 # error code of the whole test
skiptest=no # if test is skipped
CC_SAVED="$CC" # CC & PATH maybe changed within a test.
PATH_SAVED=$PATH # These save the original values.
timelimit=300 # default time limit (minutes) for the timekeeper
#################################
# Parse options
#################################
while [ $# -gt 0 ]; do
case "$1" in
-h) # help--show usage
USAGE
exit 0
;;
-debug*)
# set debug mode
DEBUGMODE="$1"
SNAPSHOT="echo bin/snapshot"
PROGNAME="$PROGNAME $DEBUGMODE"
PRINT "******** DEBUGMODE is $DEBUGMODE ************"
;;
-r*)
# version string
H5VER="$1"
;;
-all)
# Test all hosts.
TESTHOST=-all
;;
-nocvs)
# do not do cvs commands.
NOCVS=nocvs
;;
-nodiff)
# do not do diff commands.
NODIFF=nodiff
;;
-configname)
# use <name> as hostname in the parsing of the snaptest configure file.
shift
CONFIGNAME=$1
;;
-setup)
# setup the directory structure for snapshot test.
CMD=setup
;;
-*) # Unknow option
PRINT "Unknown option ($1)"
USAGE
exit 1
;;
*)
TESTHOST=$*
break
;;
esac
shift
done
# setup H5VER if not set yet
if [ -z "$H5VER" -a -f bin/snapshot_version ]
then
. bin/snapshot_version
fi
if [ -n "$H5VER" ]
then
H5VERSION=hdf5_`echo $H5VER | sed -e s/-r// -e s/\\\./_/g`
PROGNAME="$PROGNAME $H5VER"
else
H5VERSION=hdf5
fi
#################################
# Setup snapshot test directories
#################################
BASEDIR=${HOME}/snapshots-${H5VERSION}
# initial processing of setup option if requested
if test x-$CMD = x-setup; then
CHECK_DIR $BASEDIR
test $errcode -ne 0 && exit 1
elif [ ! -d ${BASEDIR} ]; then
echo "BASEDIR ($BASEDIR) does not exist"
exit 1
fi
# Show the real physical path rather than the symbolic path
SNAPYARD=`cd $BASEDIR && /bin/pwd`
# Log file basename
LOGDIR=${SNAPYARD}/log
LOGBASENAME=${LOGDIR}
PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY}
FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY}
FAILEDDETAIL=${LOGDIR}/FAILED_DETAIL_${TODAY}
SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY}
TIMELOG=${LOGDIR}/TIME_LOG_${TODAY}
TIMEKEEPERLOG=${LOGDIR}/TIMEKEEPER_LOG_${TODAY}
CVSLOG=${LOGDIR}/CVS_LOG_${TODAY}
CVSLOG_LOCK=${LOGDIR}/CVS_LOG_LOCK_${TODAY}
DIFFLOG=${LOGDIR}/DIFF_LOG_${TODAY}
COPYRIGHT_ERR=${LOGDIR}/COPYRIGHT_ERR_${TODAY}
# Snap Test hosts and Configuration files
ALLHOSTSFILE=${SNAPYARD}/allhostfile
SNAPTESTCFG=${SNAPYARD}/snaptest.cfg
TIMELIMIT=${SNAPYARD}/timelimit
TMPFILE="${LOGDIR}/#runtest.${TODAY}.$$"
# more processing of setup option if requested
if test x-$CMD = x-setup; then
CHECK_DIR $LOGDIR
test $errcode -ne 0 && exit 1
CHECK_DIR $LOGDIR/OLD
test $errcode -ne 0 && exit 1
CHECK_DIR $SNAPYARD/TestDir
test $errcode -ne 0 && exit 1
# create empty test hosts or configure files if non-existing
for f in $ALLHOSTSFILE $SNAPTESTCFG; do
if test ! -f $f; then
echo Creating $f
touch $f
fi
done
# create or update the current source.
echo update current source
$SNAPSHOT checkout
# setup completed. Exit.
exit 0
fi
#################################
# Show some host status numbers
#################################
# df sometimes hangs due to file system problems. Invoke it as background
# process and give it 10 seconds to finish. If it hangs, just continue.
uptime
df &
sleep 10
#################################
# Setup test host(s)
#################################
if [ "$TESTHOST" = -all ]; then
if [ -f $ALLHOSTSFILE ]; then
TESTHOST=`sed -e '/^#/d;/^ *$/d' $ALLHOSTSFILE`
else
PRINT "could not access the all-hosts-file ($ALLHOSTSFILE)"
USAGE
exit 1
fi
fi
#################################
# Setup to print a trailer summary when exiting not via
# the normal end of the script.
#################################
trap PRINT_TRAILER 0
#
TotalStartTime=`SecOfDay`
# Process the configuration
SNAPTEST_CONFIG
PRINT STANDARD_OPT=$STANDARD_OPT
PRINT TEST_TYPES=$TEST_TYPES
PRINT_BLANK
# Do a checkout if one has not been done today.
# Then check MANIFEST file and copyrights noitces.
if [ -z "$NOCVS" ]; then
PRINT "Running CVS checkout with output saved in"
PRINT " $CVSLOG"
# Set CVS lock first
touch $CVSLOG_LOCK
($SNAPSHOT checkout ) >> $CVSLOG 2>&1
# Save error code and remove the lock
errcode=$?
rm -f $CVSLOG_LOCK
if [ $errcode -ne 0 ]; then
# test failed.
REPORT_ERR "****FAILED ${HOSTNAME}: CVS checkout****"
exit $errcode
fi
# ===================
# Check MANIFEST file
# ===================
PRINT Checking MAINFEST file ...
(cd $SNAPYARD/current; bin/chkmanifest) > $TMPFILE 2>&1
errcode=$?
if [ $errcode -eq 0 ]; then
# test passed.
cat $TMPFILE
else
# test failed.
REPORT_ERR "****FAILED ${HOSTNAME}: MANIFEST check****"
( echo =========================
echo "MANIFEST checking failed output"
echo =========================
cat $TMPFILE
echo =========================
echo "MANIFEST checking failed output done"
echo =========================
echo ""
) >> $FAILEDDETAIL
fi
rm $TMPFILE
PRINT_BLANK
# No copyright checking until what need copyright is decided. 2006/4/7.
if false; then
# ======================
# Check Copyright notice
# ======================
PRINT Checking Copyrights notices ...
if (cd $SNAPYARD/current; bin/chkcopyright) > $TMPFILE 2>&1 ; then
echo Passed.
else
# Save the output and report some of it.
# Do not report it as failed for runtest yet.
# Send a separate report mail via hardcoding.
# Need fixes/cleanup later.
echo "Failed. See detail in another report mail"
cp $TMPFILE $COPYRIGHT_ERR
nheadlines=300
ntaillines=5 # Number of lines in report summary.
(
echo =========================
echo "Copyright checking failed. Showing first $nheadlines lines of output."
echo "Complete output is in file $COPYRIGHT_ERR"
echo =========================
nreportlines=`wc -l < $COPYRIGHT_ERR`
if [ $nreportlines -le `expr $nheadlines + $ntaillines` ]; then
# Just print the whole file.
cat $COPYRIGHT_ERR
else
# Show the first $nheadlines plus report summary
head -$nheadlines $COPYRIGHT_ERR
echo ...
tail -$ntaillines $COPYRIGHT_ERR
fi
) | Mail -s "${H5VERSION} Copyrights check Failed" hdf5lib
fi
rm $TMPFILE
PRINT_BLANK
fi
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
# which signals the host has completed the cvs update.
WAITFOR $CVSLOG 90
if [ $WAIT_STATUS -ne 0 ]; then
errcode=$WAIT_STATUS
REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to start****"
exit $errcode
fi
WAITTILL $CVSLOG_LOCK 10
if [ $WAIT_STATUS -ne 0 ]; then
errcode=$WAIT_STATUS
REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to finish****"
exit $errcode
fi
fi
# run a snapshot diff to see if any significant differences between
# the current and previous versions
if [ -z "$NODIFF" ]; then
$SNAPSHOT diff >> $DIFFLOG 2>&1
errcode=$?
# check the errcode only if NOT in DEBUG MODE
if [ -z "$DEBUGMODE" -a $errcode -eq 0 ]; then
# no need to run test
PRINT "NO TEST: no significant differences between current and previous versions" |
tee -a $PASSEDLOG
exit 0
fi
fi
# we can use the version of script in SNAPYARD/current now.
# Don't do the diff or cvs update any more.
PROGNAME="$SNAPYARD/current/$PROGNAME -nodiff -nocvs"
# Decide to do test for the local host or for remote hosts
if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then
date
PRINT "*** launching tests from $HOSTNAME ***"
PRINT_BLANK
TEST_TYPE="launching"
cd ${SNAPYARD}/log
# Fork off timekeeper if concurrent tests will be used.
if [ -n "$SRCDIR" ]; then
timelimit=`TIMELIMIT_PARSE < $TIMELIMIT`
($SNAPYARD/current/bin/timekeeper $timelimit > $TIMEKEEPERLOG 2>&1 &)
PRINT " Fork off timekeeper $timelimit"
fi
runtest_type="hosts"
for h in $TESTHOST; do
# Must do CONFIGNAME before $h got changed by the second cut.
# cut returns the whole string if there is no / in the string
# at all. But that works okay for the CONFIGNAME too.
CONFIGNAME=`echo $h | cut -f2 -d/`
h=`echo $h | cut -f1 -d/`
n_test=`expr $n_test + 1`
TMP_OUTPUT="#${h}_${CONFIGNAME}.out"
(PRINT "=============="
PRINT "Testing $h"
PRINT "==============") > $TMP_OUTPUT
CHECK_RSH $h
# run the remote shell command with output to $TMP_OUTPUT
case "$RSH" in
rsh|ssh)
CMD="$RSH $h -n $PROGNAME -configname $CONFIGNAME"
PRINT $CMD
# launch concurrent tests only if srcdir is used
if [ -n "$SRCDIR" ]; then
$CMD || REPORT_ERR "****FAILED ${h}: Abnormal exit from runtest****" && PRINT_BLANK &
echo $! > PID.${h}_${CONFIGNAME}
else
$CMD || REPORT_ERR "****FAILED ${h}: Abnormal exit from runtest****" && PRINT_BLANK
fi
;;
NoRemoteCommand)
PRINT $h does not accept Remote Command "(`date`)"
;;
NotReachable)
PRINT $h is not reachable "(`date`)"
;;
*)
PRINT "CHECK_RSH for $h returned unknow result ($RSH)"
;;
esac >> $TMP_OUTPUT 2>&1
done
# wait for all launched tests to finish, then cat them back out.
wait
# Pause a moment in case the timekeeper is terminating processes.
wait 30
for h in $TESTHOST; do
CONFIGNAME=`echo $h | cut -f2 -d/`
h=`echo $h | cut -f1 -d/`
TMP_OUTPUT="#${h}_${CONFIGNAME}.out"
cat $TMP_OUTPUT
# Verify test script did complete by checking the last lines
(tail -5 $TMP_OUTPUT | grep -s 'Grand total' > /dev/null 2>&1) ||
(REPORT_ERR "****FAILED ${h}: snaptest did not complete****" &&
PRINT_BLANK)
rm -f $TMP_OUTPUT PID.${h}_${CONFIGNAME}
done
exit 0
fi
# run the test(s)
# Note that first field is cut without -s but all subsequent cut
# must use -s. If -s is not used at all, a $TEST_TYPES that has
# no ';' (only 1 test), will pass through intact in all cut. That
# results in infinite looping.
# If -s is used with the first field, it will suppress completely
# a $TYPE_TYPES that has no ';' (only 1 tst ). That results in no
# test at all.
# Note that n_test must start as 1.
#
n_test=1
runtest_type="tests"
TEST="`echo $TEST_TYPES | cut -f$n_test -d';'`"
while [ -n "$TEST" ]; do
StartTime=`SecOfDay`
RUNSNAPTEST $TEST
REPORT_RESULT
PRINT_TEST_TRAILER
n_test=`expr $n_test + 1`
TEST="`echo $TEST_TYPES | cut -f$n_test -s -d';'`"
done
# dec n_test to show the actual number of tests ran.
n_test=`expr $n_test - 1`
PRINT_TRAILER
# disable trailer summary printing since all trailers have been
# printed and we are exiting normally.
trap 0
exit $errcode

View File

@@ -1,837 +0,0 @@
#!/bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# 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.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
# This script should be run nightly from cron. It checks out the source
# from the source repository and compares it against the previous
# snapshot. If anything significant changed then a new snapshot is
# created, the minor version number is incremented, and the change is
# checked back into the source repository.
#
# function definitions
TIMESTAMP()
{
echo "=====" "$1": "`date`" "====="
}
EXIT_BANNER()
{
TIMESTAMP "Exit $PROGNAME with status=$?"
}
# Show current total disk usage.
DISKUSAGE()
{
du -ks | \
( read x y; echo "Disk Usage=$x KB" )
}
# function provided for testing software downloaded as tar files. A version of
# this function that properly extracts the downloaded files can be provided in
# the snapshots-${sw}-overrides file.
EXTRACT()
{
echo "Error: ${SWVERSION} is in source repository - does not need extraction."
}
# Standard procedure for checking out or updating source code from an hdfgroup
# git repository. Override the function for other repositories or procedures.
SOURCE_CHECKOUT()
{
if test -n $GIT_URL; then
if [ -n "$AUTOGEN" ]; then
echo "Creating fresh clone of $GIT_URL in $BASEDIR/current_src"
# Check out the current version from source repository.
(cd $BASEDIR; rm -rf current_src
if test -z $GIT_BRANCH; then
echo "Testing empty branch $GIT_BRANCH."
git clone $GIT_URL current_src
else
echo "Testing branch $GIT_BRANCH."
git clone $GIT_URL -b $GIT_BRANCH current_src
fi
) || exit 1
else
echo "Creating fresh clone of $GIT_URL in $BASEDIR/current"
# Check out the current version from source repository.
(cd $BASEDIR; rm -rf current
if test -n $GIT_BRANCH; then
git clone $GIT_URL -b $GIT_BRANCH current
else
git clone $GIT_URL current
fi ) || exit 1
fi
else
echo "Warning! Source directory ("current") is not checked out from git."
fi
}
# Standard procedure for running the configure command in a build (test)
# directory
RUNCONFIGURE()
{
if [ "${CURRENT}" != "${TESTDIR}" -a "$CPSRC" = "yes" ]; then
echo "Copying source files to ${TESTDIR}."
cp -pr ${CURRENT}/* ${TESTDIR}
cd ${TESTDIR}
./${CONFIGURE}
elif [ -n "${AUTOGEN}" ]; then
${CURRENTSRC}/${CONFIGURE}
else
${CURRENT}/${CONFIGURE}
fi
}
# Sometimes "make distclean" doesn't adequately remove files from the previous
# build. If a build (test) directory was used, its contents can be entirely
# deleted to provide a clean start. If the test is building in the source
# directory, the contents can't be deleted, so run "make distclean".
DISTCLEAN()
{
if [ "${srcdir}" = "yes" -a -n "${SRCDIRNAME}" -a -d ${BASEDIR}/TestDir/${SRCDIRNAME} ]; then
echo "Remove contents of $SRCDIRNAME.\n"
rm -rf ${BASEDIR}/TestDir/${SRCDIRNAME}/*
else
echo "$MAKE distclean"
(cd ${TESTDIR} && ${MAKE} distclean)
fi
}
# Several of the software packages tested do not support make check-install.
# Those that support it should have a version of this function in their
# override with the following lines:
# TIMESTAMP "check-install $1"
# ${MAKE} check-install $1
CHECKINSTALL()
{
echo "check-install is not supported for ${SWVERSION}"
}
# Function for hdf4 and hdf5 to override to check in changes after snapshot.
# Safety measure to avoid unintended checkins to other repositories.
COMMITSNAPSHOT()
{
echo "original hdf5 script committed code changes back into git."
}
DISPLAYUSAGE()
{
set -
cat <<EOF
Usage: $PROGNAME [all] [checkout] [ftp <URL> [diff] [test] [srcdir] [release] [help]
[clean] [distclean] [echo] [deploy <dir>] [deploydir <dir>]
[zlib <zlib_path>] [releasedir <dir>] [srcdirname <dir>] [check-vfd]
[check-passthrough-vol]
[exec <command>] [module-load <module-list>] [op-configure <option>]
[--<option>]
all: Run all commands (checkout, test & release)
[Default is all]
checkout: Run source checkout
diff: Run diff on current and previous versions. Exit 0 if
no significant differences are found. Otherwise, non-zero.
deploy: deploy binary to directory <dir>
deploydir: use <dir> as the default directory for deployment
test: Run test
release: Run release
clean: Run make clean
distclean:Run make distclean
echo: Turn on echo mode (set -x)
setenv <name> <value>:
Set environment variable <name> to <value>.
setenvN <N> <name> <value> ...:
Set environment variable with <N> values.
E.g., setenvN 3 x a b c is same as setenv x="a b c".
srcdir: Use srcdir option (does not imply other commands)
"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.
If <dir> starts with '-', it is append to the default name
E.g., "snapshot srcdir srcdirname -xx" uses hostname-xx
[Default is hostname]
help: Print this message
echo: Turn on shell echo
zlib <zlib_path>:
Use <zlib_path> as the ZLIB locations
[Default is $ZLIB_default]
releasedir <dir>:
Use <dir> as the release directory
[Default is $ReleaseDir_default]
check-vfd:
Run make check-vfd instead of just make check.
check-passthrough-vol:
Run make check-passthrough-vol instead of just make check.
NOTE: Will only succeed with passthrough VOL connectors
that use the native VOL connector as the terminal
connector.
exttest <testscript>;
Run testscript;
exec <command>:
Run <command>;
module-load <module-list>:
Load modules in comma-separated <module-list>;
op-configure <option>:
Pass <option> to the configure command
E.g., "snapshot op-configure --enable-parallel"
configures for parallel mode
--<option>:
Pass --<option> to the configure command
E.g., "snapshot --enable-parallel"
configures for parallel mode
EOF
exit $errcode
}
# MAIN
# SGI /bin/sh replaces $0 as function name if used in a function.
# Set the name here to avoid that ambiguity and better style too.
PROGNAME=$0
SNAPSHOTNAME=
HDFREPOS=
DOCVERSION=""
MODULELIST=""
if [ -f bin/snapshot_params ]; then
. bin/snapshot_params
echo "Added snapshot_params."
fi
if [ -z "$SWVER" -a -f bin/snapshot_version ]
then
. bin/snapshot_version
echo "Added snapshot_version."
fi
if [ -n ${HDFREPOS} -a -f bin/snapshot-${HDFREPOS}-overrides ]; then
. bin/snapshot-${HDFREPOS}-overrides
echo "Added snapshot-${HDFREPOS}-overrides."
fi
echo "====================================="
echo "$PROGNAME $*"
echo "====================================="
TIMESTAMP MAIN
uname -a
# setup exit banner message
trap EXIT_BANNER 0 1 2 9 15
# Dump environment variables before option parsing
echo ===Dumping environment variables before option parsing ===
printenv | sort
echo ===Done Dumping environment variables before option parsing ===
# snapshots release directory. Default relative to $BASEDIR.
ReleaseDir_default=release_dir
# Where is the zlib library?
# At NCSA, half of the machines have it in /usr/lib, the other half at
# /usr/ncsa/lib. Leave it unset.
ZLIB_default=
ZLIB=$ZLIB_default
# What compression methods to use? (md5 does checksum). Doc was apparently
# added as a compression method to create a separate tarfile containing the
# documentation files for v 1.8 and above.
if [ "${SWVERSION}" = "hdf5_1_6" ]; then
METHODS="gzip bzip2 md5"
else
METHODS="gzip bzip2 doc"
fi
# Use User's MAKE if set. Else use generic make.
MAKE=${MAKE:-make}
# Default check action.
CHECKVAL=check
#
# Command options
cmd="all"
test_opt=""
errcode=0
AUTOGEN=""
EXTTEST=""
EXEC_CMD_ARG=""
while [ $# -gt 0 ] ; do
case "$1" in
all)
cmd="all"
;;
checkout-autogen)
cmdcheckout="checkout"
AUTOGEN="autogen"
cmd=""
;;
checkout)
cmdcheckout="checkout"
cmd=""
;;
ftp)
echo "Setting ftp flags in snapshot script"
cmdcheckout="checkout"
cmdftp="ftp"
cmd=""
shift
if [ $# -lt 1 ]; then
echo "URL missing"
errcode=1
cmd="help"
break
fi
ftp_url="$1"
echo "ftp_url is $ftp_url"
;;
diff)
cmddiff="diff"
cmd=""
;;
deploy)
# deploy the built binary.
shift
if [ $# -lt 1 ]; then
echo "deploy <dir> missing"
errcode=1
cmd="help"
break
fi
cmddeploy="deploy"
DEPLOYDIRNAME="$1"
;;
deploydir)
# default directory for deployment.
shift
if [ $# -lt 1 ]; then
echo "deploydir <dir> missing"
errcode=1
cmd="help"
break
fi
deploydir="$1"
;;
test)
cmdtest="test"
cmd=""
;;
setenv)
# set environment variable
shift
eval $1="$2"
export $1
shift
;;
setenvN)
# set environment variable with $1 values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
# a kludge now--the extra single quotes are needed
# else eval complains.
shift
envN=$1
shift
envname=$1
envalue=
while test $envN -gt 0; do
shift
envalue="$envalue $1"
envN=`expr $envN - 1`
done
eval $envname="'$envalue'"
export $envname
;;
srcdir)
#use srcdir option for test
srcdir="yes"
;;
srcdirname)
shift
if [ $# -lt 1 ]; then
echo "srcdirname <dir> missing"
errcode=1
cmd="help"
break
fi
SRCDIRNAME="$1"
;;
release)
cmdrel="release"
cmd=""
;;
autogen-release)
cmdrel="autogen-release"
cmd=""
;;
clean | distclean)
cmdclean="$1"
cmd=""
;;
help)
cmd="help"
break
;;
echo)
set -x
break
;;
zlib)
shift
if [ $# -lt 1 ]; then
echo "ZLIB information missing"
errcode=1
cmd="help"
break
fi
ZLIB="$1"
;;
releasedir)
shift
if [ $# -lt 1 ]; then
echo "Release directory name missing"
errcode=1
cmd="help"
break
fi
ReleaseDir="$1"
;;
exttest)
shift
if [ $# -lt 1 ]; then
echo "exttest script name missing"
errcode=1
cmd="help"
break
fi
cmd=""
EXTTEST="$1"
;;
exec)
shift
if [ $# -lt 1 ]; then
echo "exec command name missing"
errcode=1
cmd="help"
break
fi
cmd=""
EXEC_CMD_ARG="$@"
# exit the parsing while loop since all arguments have been consummed.
break
;;
check-vfd)
CHECKVAL=check-vfd
;;
check-passthrough-vol)
CHECKVAL=check-passthrough-vol
;;
module-load)
shift
if [ $# -lt 1 ]; then
echo "missing module list to load"
errcode=1
cmd="help"
break
fi
MODULELIST="$1"
;;
--*)
OP_CONFIGURE="$OP_CONFIGURE $1"
;;
op-configure)
shift
if [ $# -lt 1 ]; then
echo "op-configure option missing"
errcode=1
cmd="help"
break
fi
OP_CONFIGURE="$OP_CONFIGURE $1"
;;
*)
echo "Unkown option $1"
errcode=1
cmd="help"
break
;;
esac
shift
done
if [ -n "$MODULELIST" ]; then
. ~/.bashrc
module use /opt/pkgs/modules/all
# load module command will take a space separated list of modules.
# If we have a comma separated list, convert ',' to ' '.
MODULELIST="$( echo -e "$MODULELIST" | tr ',' ' ' )"
module load $MODULELIST
fi
# Dump environment variables after option parsing
echo ===Dumping environment variables after option parsing ===
printenv | sort
echo ===Done Dumping environment variables after option parsing ===
if [ "$cmd" = help ]; then
DISPLAYUSAGE
fi
# Setup the proper configure option (--with-zlib) to use zlib library
# provide ZLIB is non-empty.
ZLIB=${ZLIB:+"--with-zlib="$ZLIB}
# Adding --prefix as a configure option will put the path to the deploy
# directory in the initial libhdf5*.la files
if [ -n "$DEPLOYDIRNAME" ]; then
OP_CONFIGURE="$OP_CONFIGURE --prefix=${deploydir}/${DEPLOYDIRNAME}"
fi
CONFIGURE="configure $OP_CONFIGURE"
# echo "Configure command is $CONFIGURE"
# Execute the requests
snapshot=yes
BASEDIR=${HOME}/snapshots-${SNAPSHOTNAME}
if [ ! -d ${BASEDIR} ]; then
echo "BASEDIR ($BASEDIR) does not exist"
exit 1
fi
CURRENT=${BASEDIR}/current
PREVIOUS=${BASEDIR}/previous
ReleaseDir=${ReleaseDir:=${BASEDIR}/${ReleaseDir_default}}
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
# Try finding a version of diff that supports the -I option too.
DIFF=diff
for d in `echo $PATH | sed -e 's/:/ /g'` ; do
test -x $d/diff && $d/diff -I XYZ /dev/null /dev/null > /dev/null 2>&1 &&
DIFF=$d/diff && break
done
#=============================
# Run source checkout
#=============================
if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
TIMESTAMP "checkout"
# ${BASEDIR}/bin is now updated from git by EveningMaint or DailyMaint
# to avoid updating the scripts in ${BASEDIR}/bin while they are running.
if [ -z "$AUTOGEN" ]; then
# If there is a Makefile in ${CURRENT}, the last test done in it
# has not been distclean'ed. They would interfere with other
# --srcdir build since make considers the files in ${CURRENT}
# take precedence over files in its own build-directory. Run
# a "make distclean" to clean them all out. This is not really
# part of the "checkout" functions but this is the most convenient
# spot to do the distclean. We will also continue the checkout process
# regardless of the return code of distclean.
( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean)
fi
# echo "cmdftp is $cmdftp; ftp_url is $ftp_url"
if [ -n "$cmdftp" ]; then
echo "Get the NetCDF4 source from their ftp server."
echo "Command executed is: 2>&1 wget -N $ftp_url"
cd ${BASEDIR};
WGET_OUTPUT="`2>&1 wget -N $ftp_url`"
errcode=$?
if [[ $errcode -ne 0 ]]; then
exit $errcode
fi
if [ $? -ne 0 ];then
echo $0: "$WGET_OUTPUT" Exiting.
exit 1
fi
# echo "Wget output was $WGET_OUTPUT"
if echo "$WGET_OUTPUT" | fgrep 'not retrieving' &> /dev/null
then
echo "Snapshot unchanged"
else
echo "New snapshot downloaded"
EXTRACT
fi
else
SOURCE_CHECKOUT
fi
fi # Do source checkout
#=============================
# Run Test the HDF5 library
#=============================
if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then
TIMESTAMP "Run Tests"
# setup if srcdir is used.
if [ -z "$srcdir" ]; then
TESTDIR=${CURRENT}
else
#create TESTDIR if not exist yet
case "$SRCDIRNAME" in
"")
SRCDIRNAME=$HOSTNAME
;;
-*)
SRCDIRNAME="$HOSTNAME$SRCDIRNAME"
;;
esac
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
test -d ${TESTDIR} || mkdir ${TESTDIR}
# set TESTDIR to use the direct path to the local test directory
# rather than the path through ${BASEDIR}.
cd ${TESTDIR}
TESTDIR=`pwd -P`
cd ${CURRENT}
fi
# Make sure current version exists and is clean
if [ -d ${TESTDIR} ]; then
DISTCLEAN
else
errcode=$?
snapshot=no
exit $errcode
fi
# Compare it with the previous version. Compare only files listed in
# the MANIFEST plus the MANIFEST itself.
if [ -d ${PREVIOUS} ]; then
if [ -z "${AUTOGEN}" ]; then
CURRENTSRC=${CURRENT}
else
CURRENTSRC=${BASEDIR}/current_src
fi
if (${DIFF} -c ${PREVIOUS}/MANIFEST ${CURRENTSRC}/MANIFEST); then
snapshot=no
for src in `grep '^\.' ${CURRENTSRC}/MANIFEST|expand|cut -f1 -d' '`; do
if ${DIFF} -I H5_VERS_RELEASE -I " released on " \
-I " currently under development" \
${PREVIOUS}/$src ${CURRENTSRC}/$src
then
: #continue
else
snapshot=yes
break
fi
done
fi
fi
# if diff is choosen, 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
exit 0
else
exit 1
fi
fi
#=============================
# Execute command if defined
#=============================
#echo BEFORE EXEC command
#echo EXEC_CMD_ARG=${EXEC_CMD_ARG}
if [ -n "$EXEC_CMD_ARG" ]; then
TIMESTAMP ${EXEC_CMD_ARG}
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
test -d ${TESTDIR} || mkdir ${TESTDIR}
if cd ${TESTDIR}; then
# clean up the directory before executing the command
# Do we need to clean first?
# rm -rf *
#
# If EXEC_CMD_ARG starts with a '/', it has an absolute path, else it is
# relative to the BASEDIR.
case "$EXEC_CMD_ARG" in
/*)
${EXEC_CMD_ARG}
;;
*)
${BASEDIR}/${EXEC_CMD_ARG}
;;
esac
errcode=$?
else
echo "${TESTDIR} not accessible"
errcode=1
fi
# exit snapshot since nothing else to do, for now.
exit $errcode
fi
# Build, run tests and install procedures
if [ "$snapshot" = "yes" ] && [ "$NOMAKE" != "yes" ]; then
FAIL_SECTION=""
if [ -f ${TESTDIR}/failsection ]; then
rm ${TESTDIR}/failsection
fi
if (cd ${TESTDIR} && \
TIMESTAMP "configure" && echo "configure" > ${TESTDIR}/failsection && \
RUNCONFIGURE && \
sleep 2 && \
TIMESTAMP "make" && echo "make" > ${TESTDIR}/failsection && \
${MAKE} && DISKUSAGE \
TIMESTAMP ${CHECKVAL} && echo "make check" > ${TESTDIR}/failsection && \
${MAKE} ${CHECKVAL} && DISKUSAGE \
TIMESTAMP "install" && echo "make install" > ${TESTDIR}/failsection && \
${MAKE} install && DISKUSAGE \
TIMESTAMP "check-install" && echo "make check-install" > ${TESTDIR}/failsection && \
CHECKINSTALL && DISKUSAGE \
TIMESTAMP "uninstall" && echo "make uninstall" > ${TESTDIR}/failsection && \
${MAKE} uninstall && DISKUSAGE); then
:
else
errcode=$?
FAIL_SECTION=`cat ${TESTDIR}/failsection`
echo "Failed running ${FAIL_SECTION}"
snapshot=no
exit $errcode
fi
elif [ $CPSRC ]; then
cp -pr ${CURRENT}/* ${TESTDIR}
else
cmdclean=""
fi
fi # Test the HDF5 library
# Run external test if configured
#=============================
#=============================
#if [ -d "$CURRENT" ]; then
if [ "$EXTTEST" != "" ]; then
TIMESTAMP ${EXTTEST}
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
test -d ${TESTDIR} || mkdir ${TESTDIR}
cd ${TESTDIR}
sleep 1
TIMESTAMP $pwd
ls
${BASEDIR}/${EXTTEST}
errcode=$?
exit $errcode
fi
#=============================
# Run deployment if requested.
#=============================
if [ -n "$DEPLOYDIRNAME" ]; then
# The daily tests deploy to .../hdf5/... or .../hdf4/... except on cobalt where the
# deploy directory is in .../HDF5/... lc will take care of this. If hdf4 or hdf5
# either upper or lower case isn't in the path, RELEASE.txt won't be found unless
# it is in $CURRENT.
POS4=`perl -e "print index(lc(\"${deploydir}/${DEPLOYDIRNAME}\"), 'hdf4')"`
POS5=`perl -e "print index(lc(\"${deploydir}/${DEPLOYDIRNAME}\"), 'hdf5')"`
if [ "${POS4}" -ge "0" ]; then
RELEASE_TXT_LOC="release_notes"
elif [ "${POS5}" -ge "0" ]; then
RELEASE_TXT_LOC="release_docs"
else
RELEASE_TXT_LOC=""
fi
if [ "$snapshot" = "yes" ]; then
TIMESTAMP "deploy"
if (cd ${TESTDIR} &&
${BASEDIR}/bin/deploy ${deploydir}/${DEPLOYDIRNAME} && \
TIMESTAMP "clean" && \
${MAKE} clean && \
TIMESTAMP "check-install prefix=${deploydir}/${DEPLOYDIRNAME}" && \
CHECKINSTALL prefix=${deploydir}/${DEPLOYDIRNAME}); then
cd ${CURRENT}
cp ${RELEASE_TXT_LOC}/RELEASE.txt ${deploydir}/${DEPLOYDIRNAME}
cp COPYING ${deploydir}/${DEPLOYDIRNAME}
#: #continue
else
errcode=$?
exit $errcode
fi
fi
fi # Deploy
#=============================
# Run Release snapshot, update version, and commit to source repository
#=============================
if [ "$cmd" = "all" -o -n "$cmdrel" ]; then
if [ "$snapshot" = "yes" ]; then
TIMESTAMP "release"
DISTCLEAN
(
# Turn on exit on error in the sub-shell so that it does not
# commit source if errors encounter here.
set -e
if [ "$cmdrel" = "autogen-release" ]; then
cd ${BASEDIR}/current_src
else
cd ${CURRENT}
fi
if [ "$HDFREPOS" = "hdf4" ]; then
RELEASE_VERSION="`perl bin/h4vers -v`"
echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..."
bin/release -d $ReleaseDir $METHODS
perl bin/h4vers -i
elif [ "$HDFREPOS" = "hdf5" ]; then
RELEASE_VERSION="`perl bin/h5vers -v`"
echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..."
if [ "${DOCVERSION}" ]; then
bin/release -d $ReleaseDir --docver ${DOCVERSION} $METHODS
else
bin/release -d $ReleaseDir $METHODS
fi
perl bin/h5vers -i
else
echo "need real release steps. For now, only move current version to previous"
fi
COMMITSNAPSHOT
)
errcode=$?
fi
# 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.
rm -rf ${PREVIOUS}
mv ${CURRENT} ${PREVIOUS}
fi #Release snapshot
#=============================
# Clean the test area. Default is no clean.
#=============================
if [ -n "$cmdclean" ] && [ "$NOMAKE" != "yes" ]; then
TIMESTAMP "clean"
# setup if srcdir is used.
if [ -z "$srcdir" ]; then
TESTDIR=${CURRENT}
else
case "$SRCDIRNAME" in
"")
SRCDIRNAME=$HOSTNAME
;;
-*)
SRCDIRNAME="$HOSTNAME$SRCDIRNAME"
;;
esac
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
fi
# clean it
if (cd ${TESTDIR} && ${MAKE} $cmdclean ) then
:
else
errcode=$?
snapshot=no
exit $errcode
fi
fi # Clean the Test directory
exit $errcode

View File

@@ -1,19 +0,0 @@
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# 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.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# default version for snapshot test
# H5VERSION matches with a source version symbolic name. Will test use the
# latest revision of that branch. If set to "hdf5", it uses the main
# version.
# H5VER tells runtest which version to run
H5VERSION=hdf5

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,129 +0,0 @@
#!/bin/sh
##
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# 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.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
# As a time keeper of the remote daily test process launched by runtest.
# It sleeps for a certain time and then wakes up to hangup those processes
# that are still around, assuming they have run too long.
#
# Programmer: Albert Cheng
# Created Date: 2004/12/23
# variable initialization
waitminutes=300 # default to 5 hours == 300 minutes
debugtimelimit=
debugflag= # no debug
# Function definitions
#
# PRINTMSG
# Print a one line message left justified in a field of 70 characters
# without newline. More output for this line later.
#
PRINTMSG() {
SPACES=" "
echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
}
USAGE()
{
echo "Usage: %0 [-h] [-debug] [<time-limit>]"
echo " Run timekeeper with <time-limit> minutes, default is $waitminutes."
echo " If <time-limit> is in the form of HH:MM, it means wait till then."
echo " -h print this help page"
echo " -debug run debug mode"
}
ParseOption()
{
if [ $# -gt 0 -a "$1" = -h ]; then
shift
USAGE
exit 0
fi
if [ $# -gt 0 -a "$1" = -debug ]; then
shift
debugflag=yes
waitminutes=1 # use shorter time for debug
fi
if [ $# -gt 0 ]; then
targettime=$1
shift
# find out it is minutes to wait or HH:MM to wake up
case $targettime in
*:*) # HH:MM
currenttime=`date +%H:%M`
currenthour=`echo $currenttime | cut -f1 -d:`
currentminute=`echo $currenttime | cut -f2 -d:`
targethour=`echo $targettime | cut -f1 -d:`
targetminute=`echo $targettime | cut -f2 -d:`
waitminutes=`expr \( $targethour - $currenthour \) \* 60 + $targetminute - $currentminute`
if test $waitminutes -le 0; then
# target time is in tomorrow, add 1 day of minutes
waitminutes=`expr 24 \* 60 + $waitminutes`
fi
;;
*)
waitminutes=$targettime
;;
esac
fi
}
# Main body
echo "Timekeeper started at `date`"
ParseOption $*
waitperiod=`expr $waitminutes \* 60` # convert to seconds
if [ -z "$debugflag" ]; then
# normal time keeping mode
# sleep first
echo Timekeeper sleeping for $waitperiod seconds
sleep $waitperiod
# Look for any processes still around
echo "Timekeeper woke up at `date`, looking for processes to terminate..."
for x in PID.* ; do
if [ -f $x ]; then
pid=`cat $x`
# check if process is still around
if test X$pid \!= X && ps -p $pid > /dev/null; then
echo "terminating process $x ($pid)"
kill -HUP $pid
echo "Remote shell command ended. But some processes might still be"
echo "running in the remote machine. Login there to verify."
fi
fi
done
else
# Debug mode. Launch two rsh process, one ends before, the other after
# waitperiod. Must launch timekeeper from a subshell, else the debug
# will wait for it too.
myhostname=`hostname`
( $0 $waitminutes &)
debugtimelimit=`expr $waitperiod - 10`
echo rsh $myhostname sleep $debugtimelimit
rsh $myhostname sleep $debugtimelimit &
echo $! > PID.before
debugtimelimit=`expr $waitperiod + 10`
echo rsh $myhostname sleep $debugtimelimit
rsh $myhostname sleep $debugtimelimit &
echo $! > PID.after
wait
rm PID.before PID.after
fi
echo "Timekeeper ended at `date`"

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,37 @@ 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_/;
# Skip AMD Optimizing Compiler (aocc) lines "<#> warning(s) generated."
next if $_ =~ / warnings? generated\./;
# "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 +270,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 +313,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 +348,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 +412,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 +431,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 +455,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 +463,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 +493,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 +501,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.
@@ -40,16 +40,16 @@ EXIT_FAILURE=1
# This script uses the value of `prefix` in the user's environment, if
# it is set, below. The content of $() is evaluated in a sub-shell, so
# if `prefix` is set in the user's environment, the shell statements in
# $() won't clobbered it.
# $() won't clobber it.
#
prefix_relto_examplesdir=$(
prefix=@prefix@
examplesdir=@examplesdir@
if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
echo $(echo ${examplesdir##${prefix}/} | \
sed 's,[^/][^/]*,..,g')
echo $(echo ${examplesdir##${prefix}/} | \
sed 's,[^/][^/]*,..,g')
else
echo $prefix
echo $prefix
fi
)

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,25 +290,26 @@ 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());
}
}
//--------------------------------------------------------------------------
// Function: AbstractDs::getVarLenType
///\brief Returns the floating-point datatype of this abstract dataset,
///\brief Returns the variable length datatype of this abstract dataset,
/// which can be a dataset or an attribute.
///\return VarLenType instance
///\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

Some files were not shown because too many files have changed in this diff Show More