Commit Graph

3855 Commits

Author SHA1 Message Date
Dana Robinson
249008d4ce
Converts testhdf5 macros to h5test macros in chunk_info.c (#1820)
The two macro schemes were not designed to work together. Also
quiets some MSVC warnings about comparing pointers and integers.
2022-06-23 09:11:30 -07:00
Sean McBride
c064d3481b
sprintf to snprintf (#1815)
* Straightforward conversion of sprintf to the safer snprintf

* Trickier conversion of sprintf to safer snprintf

This involved minor changes to private function signatures to take the size of the buffer.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 11:58:18 -07:00
Sean McBride
8b2e7b32b5
Various warning fixes (#1812)
* Fixed -Wreserved-id-macro warnings from header include guards

* Removed all __int64 and LL suffix stuff now that C99 is minimum requirement

* Rename `H5FD_CTL__` to `H5FD_CTL_` to fix -Wreserved-id-macro warnings

Double underscore is reserved in C++ and this public header should be C++ compatible.

* Never define __STDC_FORMAT_MACROS anymore

Defining it causes a -Wreserved-id-macro.

Happily, according to the C++11 standard:

"The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++."

https://cplusplus.github.io/LWG/issue984

So looks like it's not necessary to define it with reasonably new toolchains.

* Fixed some -Wunused-macros warnings, removed dead code

* Fixed all -Wdouble-promotion warnings in C++ files

* Fixed remaining -Wsuggest-destructor-override warnings

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 09:16:30 -07:00
Allen Byrne
081b3902bf
Set default level to minimum time (#1722) 2022-05-17 11:54:05 -05:00
Dana Robinson
d0ea8a1d8c
Revert "Cleanup and shellcheck fixes in the SWMR test script (#1741)" (#1758)
This reverts commit cea0dc4565.
2022-05-10 09:42:22 -07:00
Dana Robinson
cea0dc4565
Cleanup and shellcheck fixes in the SWMR test script (#1741) 2022-05-07 12:52:41 -07:00
Dana Robinson
1b413fe61a
Minor things noticed while merging to 1.10 (#1739)
* Minor things noticed while merging to 1.10

* Set HDF5_DRIVER back in string
2022-05-06 11:06:52 -07:00
jhendersonHDF
cdf837d0a1
Fix a few Clang sanitizer warnings (#1727) 2022-05-05 13:32:49 -07:00
Dana Robinson
838d050a63
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops

* Adds missed macro in hl C++ code

* Fixes macro in Windows code
2022-05-04 08:49:01 -07:00
Dana Robinson
08861aa903
Fixes unused/unset variable warnings from aocc (#1712)
* Fixes unused/unset variable warnings from aocc

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-02 19:25:57 -05:00
Ben Boeckel
b3ef8044cf
test/dt_arith: use isnan instead of self comparison (#1709)
It is more obvious what is being asked this way.

Also include a `clang-format` fix.
2022-05-02 19:20:51 -05:00
jhendersonHDF
2ba7a01bff
Fix some const cast and stack/static object size warnings (#1700)
* Fix various warnings

* Move HDfree_const to H5private.h for wider use

* Print output from all ranks in parallel tests on allocation failure

* Move const pointer freeing macro to h5test.h for now
2022-05-01 15:54:41 -05:00
jhendersonHDF
5eba258d90
Fix object size warnings in cache.c test (#1701) 2022-05-01 15:54:22 -05:00
Dana Robinson
ffd311cf36
Fixes stack size warnings in set_extent test (#1698) 2022-04-28 16:04:23 -07:00
Dana Robinson
180a7f9c71
Fixes stack size warnings in dtransform (#1696) 2022-04-26 21:52:00 -05:00
Dana Robinson
0ea3be4dc1
Fixes stack size warnings in ntypes (#1695) 2022-04-26 13:18:52 -05:00
Quincey Koziol
417ee1393b
Correct concurrency bugs when running tests, along with a bugfix & small warning cleanup (#1683)
* Correct concurrency bugs when running tests, along with a bugfix & small
warning cleanup.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-04-26 11:07:15 -05:00
Dana Robinson
0fba6cbcda
Fixes stack size warnings in tcoords.c (#1688) 2022-04-25 12:17:48 -05:00
jhendersonHDF
2b323159a7
Warnings fixes (#1680) 2022-04-25 12:16:18 -05:00
Dana Robinson
822fa43b12
Adds the -q flag to all swmr test programs, quieting noisy output (#1665) 2022-04-20 14:51:52 -07:00
Quincey Koziol
f875a73711
Mirror vfd test fixes (#1629)
* Use the FAPL that was created earlier in the test (and delete an unused
variable).   This allows 'make check-vfd' to pass with --enable-mirror-vfd.

* Check for testing directory before creating, to avoid warning from bash.
Clean out .libs directory before re-using it (after a failed test), to
remove any files generated by libtool.

* Committing clang-format changes

* Increment error count on failed file open and skip tests for VFDs that need
modified filenames.

* Skip the mirror VFD for 'make check-vfd' - the mirror VFD requires networking
configuration parameters and can't be provided for an automated test that
is configured with an environment variable.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-04-18 15:28:20 -05:00
H. Joe Lee
9131d5289c
OESS-168: Remove clang warnings. (#1309)
* OESS-168: Remove clang warnings.

* OESS-168: Address @lrknox review.
2022-04-15 13:16:37 -07:00
Dana Robinson
95909be9c3
Minor things discovered while preparing 1.12.2 (#1620) 2022-04-08 09:50:20 -05:00
Scot Breitenfeld
e8ea850004
spelling fixes (#1561) 2022-03-31 10:42:30 -05:00
Dana Robinson
23ab623955
Removes unused H5HP (private heap) package (#1548) 2022-03-29 20:56:37 -05:00
Dana Robinson
b86be5df35
Removes unused memory pool (H5MP) package (#1547) 2022-03-29 20:54:02 -05:00
Neil Fortner
0d3182c7da
Fix bugs in test/vfd.c (#1538)
* Added support for vector I/O calls to the VFD layer, and
associated test code.  Note that this includes the optimization
to allow shortened sizes and types arrays to allow more space
efficient representations of vectors in which all entries are
of the same size and/or type.  See the Selection I/o RFC for
further details.

Tested serial and parallel, debug and production on Charis.
       serial and parallel debug only on Jelly.

* ran code formatter

quick serial build and test on jelly

* Add H5FD_read_selection() and H5FD_write_selection().  Currently only
translate to scalar calls.  Fix const buf in H5FD_write_vector().

* Format source

* Fix comments

* Added vector read / write support to the MPIO VFD, with associated
test code (see testpar/t_vfd.c).

Note that this implementation does NOT support vector entries of
size greater than 2 GB.  This must be repaired before release,
but it should be good enough for correctness testing.

As MPIO requires vector I/O requests to be sorted in increasing
address order, also added a vector sort utility in H5FDint.c  This
function is tested in passing by the MPIO vector I/O extension.

In passing, repaired a bug in size / type vector extension management
in H5FD_read/write_vector()

Tested parallel debug and production on charis and Jelly.

* Ran source code formatter

* Minor optimization to vector I/O request sort routine.

Tested parallel / debug on Jelly.

* Add selection I/O to chunk code, used when: not using chunk cache, no
datatype conversion, no I/O filters, no page buffer, not using collective
I/O.  Requires global variable H5_use_selection_io_g be set to TRUE.
Implemented selection to vector I/O transaltion at the file driver
layer.

* Fix formatting unrelated to previous change to stop github from
complaining.

* Add full API support for selection I/O.  Add tests for this.

* Added "ctl" callback to the VFD interfance, and the associated
H5FDctl() and H5FD_ctl() calls.

Modified the MPIO VFD accordingly -- specifically:

Added ctl() call with op-code support to expose rank, size,
and communicator.

Modified H5FD_mpi_get_rank(), H5FD_mpi_get_size(),
and H5FD_mpi_get_comm() to use the new ctl() callback.  In passing
removed the const qualifier from the file parameter of these
functions, as the file parameter of the ctl callback is not
const.

Deleted the old  H5FD__mpio_mpi_rank(), H5FD__mpio_mpi_size(), and
H5FD__mpio_communicator() calls from the MPIO VFD.

Deleted H5FD_class_mpi_t from H5FDprivate.h, and modified the
MPIO VFD accordingly.  Note that all VFDs now use H5FD_class_t,
with no special class for VFDs that that support MPI.

Some minor touch ups to the Neil's selection I/O mods in passing.

Tested serial and parallel, debug and production on charis and
jelly.

* Implement selection I/O for contiguous datasets.  Fix bug in selection
I/O translation.  Add const qualifiers to some internal selection I/O
routines to maintain const-correctness while avoiding memcpys.

* Add support for independent parallel I/O with selection I/O.  Add
HDF5_USE_SELECTION_IO env var to control selection I/O (default off).

* Implement parallel collective support for selection I/O.

* Fix comments and run formatter.

* Committing clang-format changes

* Run formatter

* Update selection IO branch with develop (#1215)

Merged branch 'develop' into selection_io

* Sync with develop (#1262)

Updated the branch with develop changes.

* Committing clang-format changes

* fixed spelling (#1353)

* Implement big I/O support for vector I/O requests in the MPIO file
driver.

* Committing clang-format changes

* Update dummy file driver in h5test.c to match new struct.

* Fix another outdated H5FD_class_t struct.

* Free arrays in H5FD__mpio_read/write_vector() as soon as they're not
needed, to cut down on memory usage during I/O.

* Committing clang-format changes

* Address comments from code review.  Fix const warnings with
H5S_SEL_ITER_INIT().

* Committing clang-format changes

* Fix warnings in selection I/O code

* Refactor H5FD__mpio_read/write_vector() to bring common code for
constructing MPI Datatype into a shared function.

* Committing clang-format changes

* Fix bugs in selection I/O code.

* Fix bugs in selection I/O code

* Address comments from review.  Add "version" field to H5FD_class_t
struct and accompanying H5FD_CLASS_VERSION macro.

* Committing clang-format changes

* Committing clang-format changes

* Address comments from selection I/O PR

* Committing clang-format changes

* Fix spelling

* Fix bugs int test/vfd.c

Co-authored-by: mainzer <mainzer#hdfgroup.org>
Co-authored-by: jrmainzer <72230804+jrmainzer@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org>
2022-03-28 22:34:18 -05:00
Neil Fortner
42b767fc67
Merge initial version of selection I/O feature into develop (#1367) 2022-03-26 14:30:53 -05:00
David Young
1fb3743f04
Fix JNI bug, fix warnings noticed in MSVC CI, be modern & portable (#1480) 2022-03-10 13:54:20 -06:00
Dana Robinson
b9470be379
Plugin test cleanup (#1479)
* Autotools plugin test cleanup

* Combines filter, VFD, and VOL plugin tests
* Adds VFD plugin tests to the Autotools
* Implements a uniform shell script naming scheme in test/

* codespell fix

* Changes after code review
2022-03-10 12:22:16 -06:00
Dana Robinson
d5ddf61803
Minor tweaks from VFD SWMR normalization (#1474) 2022-03-09 14:07:54 -06:00
Allen Byrne
2db4c770f8
Fix release check version logic (#1438) 2022-02-24 10:59:15 -06:00
Neil Fortner
0f847f30bc
Fix issue with H5_now_usec() with 32 bit systems (#1416)
* Implement H5ESget_requests() to retrieve request pointers and
corresponding connector IDs from an event set.  Add tests for this
function.

* Add "order" parameter to H5ESget_requests, to allow the user to specify
the order in which requests are returned.

* Fix bugs with H5ESinsert_request()

* Change H5ESget_requests() API to have separate input and output
parameters for the allocated array length(s) (in) and the number of events in
the event set (out).

* Fix issue with H5_now_usec() with 32 bit systems.  Also improve event
set test.

* Committing clang-format changes

* Add comments to H5_now_usec() explaining rationale for uint64_t casts.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-10 17:23:26 -06:00
Allen Byrne
c9347450c1
Implemented suggestion in #1381 for dtransform test (#1415)
* Implemented suggestion in #1380

* fix typo

* Use differently named files in tests

* format fix

* Revise comments

* fic typos

* Change test display and file name
2022-02-04 16:50:45 -06:00
David Young
856de93673
Don't use a nonliteral format string in test/fheap.c:begin_test(). (#1401)
* Avoid using a non-literal formatting string with sprintf in begin_test.
Use snprintf.  Don't duplicate a string on the heap unnecessarily.

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

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-03 10:41:41 -06:00
Sean McBride
4ac6ccc021
Snprintf2 (#1399)
* Replaced many uses of sprintf with safer snprintf

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

* Removed unnecessary use of static on small buffers

This improves thread safety.

* Committing clang-format changes

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

* also remove const from H5_get_option and parse_command_line.

* Committing clang-format changes

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

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 10:34:57 -06:00
Sean McBride
44de59b642
Used clang-tidy to change all floating point f suffixes to F (#1359) 2022-01-28 08:31:26 -06:00
Sean McBride
d45124d708
Open bsd fixes (#1195) 2022-01-20 08:38:56 -06:00
Neil Fortner
dd6ad33c75
Implement H5ESget requests function to retrieve requests from an event set (#1355)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-20 07:34:43 -06:00
Baljak
8430e3d661
Fix compilation issues with Mingw (#1342) 2022-01-07 22:29:25 -06:00
Scot Breitenfeld
cf1aab28fb
Changed to correct return datatype for H5Lexists (#1330)
* changed to correct return datatype for H5Lexists

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-04 09:12:11 -06:00
Allen Byrne
5580d7ec81
Fix directory variable in shell scripts (#1273)
* Fix testswmr scripts with utils/test variable

* Change format of configure var assignment

* quote the variable value in configure

* Use sh.in expected var pattern

* Only ref builddir in script

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

* Use abs_top_builddir in test scripts

* Change script var to make it easier to read.

* Use @abs_top_builddir@ directly in paths

* Correct typos/comment
2021-12-09 23:06:53 -06:00
H. Joe Lee
e36aa06950
OESS-168: Remove clang warnings. (#1269) 2021-12-08 16:00:19 -06:00
Allen Byrne
83cf2cb15b
Convert vds swmr test script to powershell (#1245)
* Convert SWMR shell scripts to Windows powershell.

* Use $LastExitCode instead of $? in script

* Prevent execution in a different window

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

* Use stdout instead of file for configure check

* Make change requested by #1157

* Change fortran to use stderr for configure

* Correct typo

* remove obsolete file check

* Fortran statement fix

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

* Fixes const warnings in H5ES package (#1211)

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

* Convert vds swmr test script to powershell

* Enable vdsswmr powershell test

* Add configure vdsswmr statement

* Correct powershell script vars

* Convert SWMR shell scripts to Windows powershell.

* Use $LastExitCode instead of $? in script

* Prevent execution in a different window

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

* Use stdout instead of file for configure check

* Make change requested by #1157

* Change fortran to use stderr for configure

* Correct typo

* remove obsolete file check

* Fortran statement fix

* Convert vds swmr test script to powershell

* Enable vdsswmr powershell test

* Add configure vdsswmr statement

* Correct powershell script vars

* Cleanup review issues

* Fix variable assignment

* Change the wait function to pass in the path

* Disable actual test execution until programs fixed

* Adjust copyright text

* Fix spelling

Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
2021-12-08 11:21:15 -06:00
H. Joe Lee
abb05bce6e
OESS-168: Remove clang warnings. (#1263) 2021-12-08 08:38:40 -06:00
Scot Breitenfeld
f859cb732b
Fixed Spelling Errors (#1166)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

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

* Committing clang-format changes

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

* Committing clang-format changes

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

* fixed error function string

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

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

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

* misc

* added missing file

* misc

* misc.

* misc

* switch to using Codespell with GitHub Actions

* misc.

* misc.

* fixed more sp errors

* Fix new typos found by codespell.

* fixed proceed with precede

* fixed variable in fortran test

* fixed minnum

* updated spelling list

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-12-07 08:27:29 -06:00
Dana Robinson
ca6f9e3716
Fixes an assert in H5Pget_filter_by_id1/2 w/ out-of-range IDs (#1222)
* Fixes an assert in H5Pget_filter_by_id1/2 w/ out-of-range IDs

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

* Committing clang-format changes

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

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

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 08:09:05 -06:00