Commit Graph

3188 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
b4f607bc13 Intermin commit to allow update from Vailin's recent changes 2019-01-15 16:36:51 -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
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
Allen Byrne
8d7bdb7041 CMake changes for SKIPPED and flush tests 2018-09-24 14:38:46 -05:00
Dana Robinson
265652fe54 Normalization with vol_integration (property lists, file drivers,
other misc).
2018-09-21 12:12:05 -07:00
Dana Robinson
67a126c7ba Normalization with vol_integration (test code and H5Xtest.c) 2018-09-20 10:40:51 -07:00
Dana Robinson
eb78fd8832 Develop normalization with vol_integration.
Mostly peripheral things like the tools and wrappers,
with just enough core library code to support that.
2018-09-18 22:57:37 -07: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
Allen Byrne
27af9a7922 HD prefix and whitespace 2018-08-28 10:54:54 -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
ad317226ea Fix for HDFFV-9277: update the ainfo message after removing an attribute. 2018-07-20 11:21:50 -05:00
Larry Knox
64d8a67943 Merge pull request #1143 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop
* commit '3c6654921000a8659276f1fcb32dd0ada1353558':
  Apply Cygwin pathches from Marco Atzeri. Commit Joe Lee's typo corrections for src/H5MF.c.
2018-07-18 17:15:42 -05:00
Larry Knox
3c66549210 Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into develop 2018-07-18 17:06:59 -05:00
Larry Knox
892252106a Apply Cygwin pathches from Marco Atzeri.
Commit Joe Lee's typo corrections for src/H5MF.c.
2018-07-18 17:01:53 -05:00
Allen Byrne
e5156823bd TRILABS-137 Convert tcheck_version script to cmake tests 2018-07-18 10:42:14 -05:00
Allen Byrne
47780cb4e0 TRILAB-31 Working locally 2018-07-16 13:01:53 -05:00
Larry Knox
0f6d0803ef Merge pull request #1128 in HDFFV/hdf5 from HDFFV-10525-typo-in-vds.c to develop
* commit '863148d1fe0b6949708698ad9277dbdba8129e0c':
  fixed typo.
2018-07-15 23:35:54 -05:00
Binh-Minh Ribler
ec31438afd Fixed HDFFV-10404
Description:
    Applied the typo fixes from user's report.
    The previous pull request couldn't be merged because it was too old,
    and it was too complicated for me to resolve conflicts.
Platform tested:
    Linux/64 (jelly) - very minor
2018-07-13 13:40:22 -05:00