Commit Graph

3896 Commits

Author SHA1 Message Date
Dana Robinson
2266ee56c3 Fixes minor issues in various virtual file drivers
- HDFS VFD files now ignored in the Autotools when the HDFS VFD is not
  being built.
- All VFD init code uses idiomatic H5I_INVALID_HID instead of -1
  or FAIL.
- The HDFS VFD now includes H5FDdrvr_module.h in the right place.
- The HDFS tests in test/hdfs.c no longer pass NULL to VERIFY macros, which
  raised warnings.
- Minor tweaks to fix const, unused variables, etc. warnings in
  several VFDs.
2020-10-28 23:50:37 -07:00
Dana Robinson
ca3659a014 HD prefix updates in src/ and test/
Adds missing HD prefixes to API calls in src and test.

Adds some extra processing to bin/checkposix to keep the noise
levels down when running the script (not comprehensive).
2020-10-23 17:13:05 -07:00
Quincey Koziol
66bcfd97a8
Update reformatting settings, trace wrapping, and printf-format strings (#22)
* Add BEGIN_FUNC / CATCH / END_FUNC to macros

* Remove incorrect trailing '{'

* Update trace script to wrap H5TRACE macros at 110 characters and improve
comments for code that performs this operation.

* Clean up printf-formatting in H5public.h and correct some oversights in the code.

* Reformat with BEGIN_FUNC / END_FUNC handled correctly by clang-format

* Run clang-format on changes.

* Correct H5_SIZEOF_HSIZE_T/H5_SIZEOF_HSSIZE_T macros to match typedef.

* And make the undef value match also.

* Update comment

* Update clang-format actions to exclude generated files.

* Post-process generated H5LTparse.h file as well as H5LTparse.c file.

* Fix formatting

* Update version of github clang-format action
2020-10-06 17:37:42 -05:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
Allen Byrne
274cd0ba1d Pre-format fixes for warnings as errors 2020-09-29 10:24:49 -05:00
David Young
14851e3b82 Merge pull request #2650 in HDFFV/hdf5 from ~DYOUNG/werror:rebased-fprintf-experiment to develop
* commit 'c0fbc5c086566d5d3c1d1ef26baa81a53d59fc08': (24 commits)
  Use the right format string, "%zu", for size_t.
  Repair more format strings.
  Fix a bunch of format string errors reported by Larry.
  Fix some HDfprintf compilation errors: use the right format strings ("zu", PRIuHSIZE), avoid casting some printf arguments, pass the right number of arguments.
  Test the format string "ll" before "l", "L", and "q", like the ./configure script does.  This ought to fix the compilation failure in test/dt_arith.c that Allen told me about:
  Cast a non-void pointer to void pointer for "%p".
  Use PRIu32 and "zu" formats.  Delete some casts from `size_t`.
  I'm taking a guess that this code intended to point the 2-digit wide hexadecimal octet values, not 2 character-wide pointers to the bytes.  The %02p format, which is a GNU-ism, disagreed with GCC 8.3.0 and the option flags we use.
  %08p is not portable, it's a GNU-ism.  Use %8p, instead.  Squashes a GCC error.
  Add format string macros PRI[doxX]HID for hid_t and use PRIdHID.
  Use HDva_copy() and introduce a bunch of compatbility format-string constants for uppercase hexadecimal strings, `PRIX...`.  Should fix the VS2010 errors that Allen mentioned:
  Always #define HDfprintf as fprintf in this header.  I believe this will fix the Windows build error that Allen reported.
  Provide an HDvasprintf implementation only if it isn't #defined.  This should fix the mingw compilation issue that Allen reported.
  Fix va_list usage in the vasprintf(3) implementation.
  Promote format-string warnings to errors.
  Use the portable `-eq` operator instead of the bash-ism `==`. Fixes the tests on NetBSD, where /bin/sh != bash.
  Restore a literal percent sign ("%%") that I accidentally deleted.
  Fix code that made GCC complain about a NULL or `unsigned char *` arguments for "%s".
  Take pains to provide UINT64_MAX in all conditions.
  Correct a couple of format strings.
  ...
2020-09-28 14:42:18 -05:00
David Young
08034972bc Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-27 15:03:44 -05:00
Allen Byrne
ff0881f35b OESS-98 merge with clang-format changes 2020-09-25 16:43:57 -05:00
Allen Byrne
aa08db839e Merge pull request #2882 in HDFFV/hdf5 from ~BYRN/hdf5_adb:feature/cmakeV2-clang-format to develop
* commit '571a5e9250ca69adb54ef956361a5cf77059f67c':
  Add h5ls test plugin format target
  Fix manifest
  Add code owners file
  Update actions - split push/pull-request commits
  Change to executable
  Change to based on LLVM format
  Fix comment formatting due to tabs conversion
  Disable formatting for file
  File changes to affect formatting
  CMake and script changes for clang-format
2020-09-25 16:11:52 -05:00
David Young
5f0bb85813 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-25 15:34:39 -05:00
Allen Byrne
a117ac6cae Fix comment formatting due to tabs conversion 2020-09-24 09:57:21 -05:00
Jordan Henderson
ce0f87fb35 Add H5Ssel_iter_init API call to reset a selection iterator 2020-09-18 00:12:37 -05:00
Allen Byrne
d8d17d2328 File changes to affect formatting 2020-09-04 16:51:30 -05:00
Allen Byrne
30c7264c2c CMake and script changes for clang-format 2020-09-04 16:36:52 -05:00
David Young
d85cd245d2 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-03 16:13:47 -05:00
Dana Robinson
3d7a0dc6d5 Merge branch 'develop' into develop_minor 2020-08-27 10:36:03 -07:00
Larry Knox
3f5382bb62 Merge pull request #2795 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr2020:hdf5_bmr2020_addrsani to develop
* commit '5352b1dbc92313d91d3502dd8352352abe8749a7':
  Fixed typo
  Fix HDFFV-11101
2020-08-18 08:03:29 -05:00
Dana Robinson
f4d03432a4 Removes inappropriate file locking call 2020-08-18 05:53:33 -07:00
Binh-Minh Ribler
5bb893a2c2 Fix HDFFV-11101
Description
    Added initialization to local structs in the src function
    H5MF_settle_raw_data_fsm() and the test function test_bt2_hdr_fd()
    to prevent the following error in two different occurrences:
        MemorySanitizer: use-of-uninitialized-value
Platforms tested:
    Linux/64 (jelly)
    Linux/64 (platypus)
2020-08-17 17:51:15 -05:00
Dana Robinson
f02ced7e74 Moves lock flag to H5F_shared_t and adds test. 2020-08-17 14:25:04 -07:00
Dana Robinson
b2d917437d Minor refactoring based on 1.10 normalization work 2020-08-17 09:12:59 -07:00
John Mainzer
5d8c5849e5 Merge pull request #2769 in HDFFV/hdf5 from mdc_sl_opt to develop
* commit 'd00bab96fb4da12a18b5de528c96469978c4c927':
  Minor copy edits to comments -- no code changes.
  Tab to space conversions.
  When flushing, the metadata cache attempts to flush entries in increasing address order.  To facilitate this, the metadata cache needs a list of of dirty entries in increasing address order.  This is implemented via a skip list of all dirty entries in the cache.
2020-08-17 08:25:05 -05:00
Binh-Minh Ribler
24c23c79d8 Merge pull request #2771 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr:hdf5_bmr_HDFFV-10933 to develop
Fixed HDFFV-10933

* commit '16349c5fddce8a74644e18d01d7ea8186aaaa255':
  Fixed HDFFV-10933
2020-08-16 15:34:18 -05:00
mainzer
7b9f61c157 Merge branch 'develop' into mdc_sl_opt 2020-08-15 17:53:29 -05:00
Dana Robinson
c5b1765940 Trivialities noticed while merging things to 1.10 2020-08-15 07:32:50 -07:00
Binh-Minh Ribler
16349c5fdd Fixed HDFFV-10933
Description:
    Updated the original fix by Kent Y. in commit
        200a77d8c3
    - used internal functions instead of public API
    - moved some code into the subroutine for a cleaner look.
    - added test to dsets.c
Platforms tested:
    Linux/64 (jelly)
2020-08-14 14:49:42 -05:00
mainzer
12bb6d7665 Tab to space conversions.
Re-applied tab to space conversions accidentally reverted in the
commit of the metadata cache skip list optimization, and performed
some additional tab to space conversions in passing.

Tested parallel / debug on Jelly.
2020-08-14 12:16:47 -05:00
Quincey Koziol
cb5de74ac2 Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-13 19:03:16 -05:00
Quincey Koziol
4f9542c332 Merge pull request #2739 in HDFFV/hdf5 from namespace_cleanup_01 to develop
* commit '3f46a380e084d83a84783383bdfbbd9a443e9f27':
  Correct typos w/HGOTO_DONE & HGOTO_ERROR
  Move H5T_vlen_reclaim to package scope
  Switch H5VM inline routines back to single underscope and put a comment in their header about this naming
  Clean up private / package / static namespace issues (function naming, which header file, FUNC_ENTER / LEAVE, etc).  Removed remaining personal email addresses from library source code (still needs cleaned from other directories). Misc. warning, style, and whitespace cleanup.
2020-08-13 19:00:56 -05:00
Dana Robinson
b806f3e9ac Tweak to hide unused threadsafe callback in non-threadsafe builds 2020-08-13 10:13:18 -07:00
mainzer
3202416936 Merge branch 'develop' into mdc_sl_opt 2020-08-13 11:31:16 -05:00
Dana Robinson
04b24163f7 Cleans warnings and cruft from ttsafe_attr_vlen.c 2020-08-12 15:21:38 -07:00
Dana Robinson
037bad4f72 Fixes Windows issues due to exposed pthread code 2020-08-12 15:07:15 -07:00
Dana Robinson
4f0283db78 Fixes a size mismatch when copying old-style to new-style references 2020-08-12 11:38:04 -07:00
Dana Robinson
ed51c0e302 Fixes memory leads in trefer.c 2020-08-12 09:52:10 -07:00
Quincey Koziol
f2681e36ae Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-12 11:17:52 -05:00
Quincey Koziol
3f46a380e0 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-12 11:17:27 -05:00
Dana Robinson
dca1733238 Merge pull request #2752 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '78c6be05a84f854074a4df2e10c15a56444e4015':
  Fixes the splitter VFD test on Windows.
2020-08-12 08:03:11 -05:00
Dana Robinson
78c6be05a8 Fixes the splitter VFD test on Windows. 2020-08-11 17:46:54 -07:00
Quincey Koziol
c48d1b0ff4 Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-10 13:15:13 -05:00
Quincey Koziol
98c184e130 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-10 13:14:02 -05:00
Quincey Koziol
e1a7a1acbe Remove redundant calls to set the metadata cache tag 2020-08-08 08:44:34 -05:00
Dana Robinson
0ed6534603 Fixes flock Windows failure 2020-08-07 12:40:04 -07:00
Quincey Koziol
a2340cec3b Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-07 10:06:34 -05:00
Dana Robinson
5ce2a17804 Removes staff email addresses from the repository
Removes redundant C library headers from hl library
2020-08-06 17:58:07 -07:00
Dana Robinson
72363de1c0 Merge pull request #2730 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:file_locking_squash_2 to develop
* commit '47ad0ac7237b464e939fe54dd129a151944d9706':
  Renames BEST-EFFORT to BEST_EFFORT for file locking env var
  Updated the file locking Fortran property list wrappers and added a test.
  Fixed missing parens in VFDs
  Minor change to header comments in file locking C++ changes.
  Squash merge of file locking fixes
2020-08-06 18:31:41 -05:00
Quincey Koziol
8fe3cece3c Switch H5VM inline routines back to single underscope and put a comment in their header about this naming 2020-08-06 17:46:40 -05:00
Dana Robinson
7391f5f26c Merge branch 'develop' into file_locking_squash_2 2020-08-06 15:08:28 -07:00
Quincey Koziol
07e4ef9da4 Clean up private / package / static namespace issues (function naming, which
header file, FUNC_ENTER / LEAVE, etc).  Removed remaining personal email
addresses from library source code (still needs cleaned from other directories).
Misc. warning, style, and whitespace cleanup.
2020-08-06 15:56:04 -05:00
Jerome Soumagne
302dfeb11b Merge pull request #2715 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5:fix_vlen_ref to develop
* commit 'ef6db167a86e6c065d46963dbd75cd325fe83813':
  H5R: fix encoding of references that are part of compound types
2020-08-06 14:22:29 -05:00
Dana Robinson
8e7f3e38a7 Fixes warnings in the splitter VFD and tests 2020-08-05 22:13:38 -07:00
Dana Robinson
65e92e1d56 Warning fixes in tools and h5test.c 2020-08-05 17:15:57 -07:00
mainzer
33f35183cb When flushing, the metadata cache attempts to flush entries in increasing
address order.  To facilitate this, the metadata cache needs a list of
of dirty entries in increasing address order.  This is implemented via a
skip list of all dirty entries in the cache.

To date this skip list has been maintained at all times.

However, profiling indicates that we can avoid significant overhead by
constructing the skip list of dirty entries just before a flush, taking
it down afterwareds, and not maintaining it during normal operation.

This commit implements this optimization for both serial and parallel.

Tested serial and parallel, debug and production on charis and jelly.
2020-08-05 15:39:49 -05:00
Dana Robinson
bc1bed2c55 Squash merge of file locking fixes 2020-08-03 09:11:27 -07:00
Dana Robinson
b9de162eae Minor normalizations with 1.12 branch 2020-08-01 10:26:22 -07:00
Dana Robinson
08dca47475 Minor normalizations with hdf5_1_10 2020-07-31 11:40:29 -07:00
David Young
0bb87534a6 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-07-30 18:15:09 -05:00
Jerome Soumagne
ef6db167a8 H5R: fix encoding of references that are part of compound types
Add corresponding test and some debug information
2020-07-28 16:36:19 -05:00
Dana Robinson
c78326eb92 Fixed additional typos in tselect.c comments. 2020-07-27 17:40:25 -07:00
Dana Robinson
dbba42c306 Fixes typo in tselect.c 2020-07-27 17:38:41 -07:00
Dana Robinson
91f5320ff0 Updates H5Sset_extent_none() to set H5S_NULL
The API call used to set the internal H5S_NO_CLASS value which
produced errors when such a dataspace was passed to many other API
calls.

Fixes HDFFV-11027
2020-07-27 17:32:01 -07:00
Vailin Choi
9d3ea366d4 Merge pull request #2693 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/HDFFV-11080-heap-use-after-free-by-the-call to develop
* commit '3023b34272cc6ada84aebfa7441a6a55afa3621c':
  Update MANIFEST. Add new test to Cmake.
  Fix for jira issue HDFFV-11080: (1) Patch up the file pointer when reading attribute of variable length datatype (2) Test to verify the fix when doing multiple threads
2020-07-17 14:27:12 -05:00
vchoi
3023b34272 Update MANIFEST.
Add new test to Cmake.
2020-07-16 16:40:11 -05:00
Jerome Soumagne
aa9d2bd9bc H5R: fix type conversion of references within vlen type
Update trefer.c with vlen test case
2020-07-15 21:00:36 -05:00
vchoi
4bc49d8b2b Fix for jira issue HDFFV-11080:
(1) Patch up the file pointer when reading attribute of variable length datatype
(2) Test to verify the fix when doing multiple threads
2020-07-14 10:56:33 -05:00
David Young
9159b93da6 Fix code that made GCC complain about a NULL or unsigned char * arguments for
"%s".

XXX The duplication between test/ros3.c test/s3comms.c is really annoying.
2020-07-07 10:49:55 -05:00
David Young
c6fcec46c9 Correct a couple of format strings. 2020-07-07 10:49:55 -05:00
David Young
23bbe96c75 Use PRIuHSIZE and PRIXHSIZE for portability. 2020-07-07 10:49:55 -05:00
David Young
307cb5da48 Squash my changes on branch fprintf-experiment into one commit for
reapplication to my new warnings branch, `warnings-again`.  These
changes are included:

commit 915551b7bf64e777dd2007386ec77b1d117770da
Merge: 63858c2 a8892bb
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:39:49 2019 -0600

    Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment

commit a8892bb42d
Merge: 5c911d8 f907b51
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:33:54 2019 -0600

    Merge pull request #2055 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop

    * commit 'f907b511d06612dafc7814a7c30f2f3d2b76d52b':
      Oops, remove more C99 designated initializers for VS 2010 compatibility.

commit 63858c22e168acaec0af8ced6641f26102cc6bb0
Merge: 20ae787 5c911d8
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:04:42 2019 -0600

    Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment

commit 5c911d8baf
Merge: b8a5671 62208b0
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 16:58:27 2019 -0600

    Merge pull request #2030 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop

    * commit '62208b056a09c01855fbac7f75146be58ad6bfe5': (44 commits)
      Add an #include to get a function declaration.
      Don't use C99 designated initializers, they're not compatible with Visual Studio 2010.
      Quiet some more maybe-uninitialized warnings---each is a false positive, *sigh*.  This is more code that may not compile with VS2010, *sigh sigh*.
      Always warn on maybe-uninitialized.  -Wincompatible-pointer-types was not available until GCC 5, so enable it only if that's the GCC version we're using.
      Only promote maybe-uninitialized warnings to errors on GCC 8.  Even on GCC 8, there may be false positives at low optimization levels?  I need to check.
      Only use -Werror=cast-function-type with GCC 8 and later.
      Put all of the -W options back into the order I found them in so that it's easier to compare old and new config/gnu-flags.
      Add new source files to CMakeLists.txt.
      Mention the -Werror= flags in libhdf5.settings.in.
      free -> HDfree
      Promote decleration-after-statement warnings to errors.
      Quiet decleration-after-statement warnings.
      Move a statement under some declarations since some vintages of Visual Studio don't like declarations after statements.
      Document H5D__chunk_mem_xfree_wrapper().
      Undo accidental test deletion.
      Oops, delete a debug printf that snuck in here.
      Undo my changes to the HD macros, hadn't really intended those to be on this branch....
      Make errors of some more warnings.  Move disabled warnings to DEVELOPER_WARNING_CFLAGS.  Put just one warning option on a line, and sort some of the options.
      Cast to the parameter type, H5VL_token_t *, instead of to unsigned char *.
      Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to structs containing those arrays.  Encapsulating the arrays in this way makes it easier to write and think about pointers to these types, casts to/from these types, etc.
      ...

commit 20ae7877e33931b95e8c3502b027d6c3fe94a11f
Merge: 46f8c61 edd5297
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:34:09 2019 -0600

    Merge remote-tracking branch 'origin/add-werror-and-squash-some' into fprintf-experiment

commit 46f8c613d5117a8be5bc8385a072daa0b4262f06
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:29:00 2019 -0600

    GCC really wants us to use `ll` to format `long long`, so try to make that work
    before any other format modifier.  Seems like we're not compiling the autoconf
    test program with -Werror=format ?  Probably should.

commit eee35b8ef3759c391327cd48a9b3c56b6f8abc99
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:28:05 2019 -0600

    It's hard to know just how wide an HDoff_t will be, and I don't think POSIX or
    C standards provide a PRI macro for it, so cast to intmax_t and format using
    PRIdMAX.

commit 86eab12df7a89b546a38e99f8178dd2adbcb3433
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:26:25 2019 -0600

    URemove some casts.se the right format string for the argument.  Here and there
    stop casting a printf argument.

commit f722f7cbecbaa99449941484b014426f62f1bed5
Merge: 58e3743 6d5ec83
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 14:44:16 2019 -0600

    Merge branch 'add-werror-and-squash-some' into fprintf-experiment

commit 58e3743b7faa9836606ee91798fe80dfc0040da7
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Nov 20 21:07:21 2019 -0600

    Remove custom HDfprintf implementation, using the standard library's,
    instead.  Take a swipe at repairing fprintf format strings, mainly
    replacing "%Hu" with "%" PRIuHSIZE, "%a" with "%" PRIuHADDR, "%Zu" with
    "%zu".

    Here and there remove an awkward cast of a printf argument to `long
    long` and use PRI[doux]8, PRI[doux]32, or PRI[doux]64, instead.

    Change occurrences of "%t" to "%s" and perform a suitable change of
    argument, `cond` -> `cond ? "TRUE" : "FALSE"`.

    Some occurrences of %Hu, %a, and %t remain, they just weren't flagged by
    the compiler because of #ifdef'age.

commit d4366909293fa970c23512ac80e5d865d76cddbf
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Nov 20 20:54:32 2019 -0600

    Promote format-string warnigns to errors.
2020-07-07 10:49:55 -05:00
Quincey Koziol
c5258211e7 Add new source files to CMake build 2020-06-27 22:14:52 -05:00
Quincey Koziol
71b601d0d3 Clean up warnings 2020-06-27 20:02:51 -05:00
Quincey Koziol
ce50e34c58 Merge remote-tracking branch 'origin/develop' into monotonic_timer 2020-06-27 09:49:49 -05:00
Quincey Koziol
e767f44e95 Merge remote-tracking branch 'origin/develop' into monotonic_timer 2020-06-26 18:57:38 -05:00
Jacob Smith
e1215177b6 * Fix intermittent error with Splitter VFD.
Mismatch in time of test file creation was creating false negatives.

    Add file-duplication routine: `h5_duplicate_file_by_bytes()`.

* Change library calls in `h5test.c:h5_compare_file_bytes()` to their HD-prefixed equivalents.
2020-06-25 12:24:05 -05:00
Jake Smith
b718bf567f Merge pull request #2615 in HDFFV/hdf5 from ~JAKE.SMITH/hdf5:bugfix/splitter_valgrind_patch to develop
* commit '6462c67b6578e48c1ef6d847be59c0b5e3598a50':
  Patch a few holes in the Splitter VFD implementation.
2020-06-15 14:36:41 -05:00
Larry Knox
c7626f79fd Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'aa338c3a87a4544ccb164832422e3e2462a57b88':
  Detect when there's the same-shaped selection of a single block of elements on both selections, but with different selection types (i.e. one selection defined as an 'all' type and the other as a hyperslab or point type), without falling into the generic selection iteration case.
  Normalization of H5T.c with 1.10.
  Normalization of H5D.c with 1.10.
2020-06-07 15:37:38 -05:00
Larry Knox
de9491e365 Add flags from config/clang-warnings/*general files to H5 C and CXX flags for all versions of Clang and Clang++ compilers.
Switched from cut to awk in testcheck_version.sh.in to avoid dependence
on tab vs. " " in version definitions in H5public.h.
2020-06-06 14:36:44 -05:00
Quincey Koziol
de54cff50c Detect when there's the same-shaped selection of a single block of elements on
both selections, but with different selection types (i.e. one selection defined
as an 'all' type and the other as a hyperslab or point type), without falling
into the generic selection iteration case.
2020-06-05 12:36:20 -05:00
Dana Robinson
cc15d1039a Normalizations with 1.10 branch. 2020-06-02 07:33:00 -07:00
Jacob Smith
6462c67b65 Patch a few holes in the Splitter VFD implementation.
* Missing logfile close on driver-open failure.
* Initialize empty string in test/vfd (logfile path in W/O compat check).
2020-05-29 14:27:14 -05:00
Dana Robinson
6358a27498 Minor tweaks to testhdf5 code after normalization with 1.10. 2020-05-27 17:41:59 -07:00
Dana Robinson
55844f79e9 Misc warning fixes. 2020-05-10 09:48:30 -07:00
Quincey Koziol
deadf25465 Align contents of CMake and autotools testfile cleanup lists. 2020-05-02 20:42:33 -05:00
Quincey Koziol
ac069841f3 Avoid allocating a chunk index for datasets with 0-sized dimensions, until
the dataset is extended.
2020-05-01 17:59:57 -05:00
Dana Robinson
9a598477c6 Merge pull request #2541 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'c03ee563f46013d22f36a1895664a9ba876558e9':
  Further updates to the tools warnings fixes from code review.
  Updates to tools warning PR from code review.
  Fixes for warnings in the tools code.
2020-04-27 10:51:58 -05:00
Dana Robinson
de3bfa697a Updates to tools warning PR from code review. 2020-04-26 02:54:29 -07:00
Dana Robinson
a8676d74d9 Fixes for warnings in the tools code. 2020-04-25 16:49:04 -07:00
David Young
d16eb45d53 For compatibility with non-C99 Visual Studio versions, use "%" PRIuMAX
instead of "%ju".
2020-04-24 18:49:37 -05:00
David Young
737a28dc97 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-04-24 10:22:28 -05:00
Quincey Koziol
9e5dbf6906 Trim trailing whitespace 2020-04-20 18:12:00 -05:00
Jacob Smith
075e74e9b2 Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into feature/vfd_splitter_mirror_a 2020-04-07 10:29:00 -05:00
Jacob Smith
d97c00013d 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-04-07 10:20:44 -05:00
Allen Byrne
61b8018004 Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'f6514c35ea3786206a8db73e1cad8fce8fe6a715':
  Updated test ddl files so CMake passes after h5dump failures.
  Modifications based on PR review feedback.
  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-04-07 07:08:16 -05:00
Vailin Choi
1e52e74ca8 Merge pull request #2472 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/bounds_compat to develop
* commit '3f081c99376ad562dcb6bbf7d6c11216f682aca7':
  Modifications based on PR review feedback.
  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-04-06 16:37:47 -05:00
Allen Byrne
b4dcee96ce Minor updates and fix settings for fortran flags 2020-04-06 12:17:43 -05:00
Allen Byrne
57f5d00a43 TRILAB-192 add c++ and fortran warnings build systems one file 2020-04-05 10:50:08 -05:00
Vailin Choi
bae05235a2 Merge pull request #2461 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/dtype_close_on_error to develop
* commit 'afdcac28b85d690eebc80ab568fa5266081baaaa':
  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-04-01 22:14:42 -05:00
vchoi
3f081c9937 Modifications based on PR review feedback. 2020-03-31 19:53:14 -05:00
vchoi
6740ee1dcd 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-03-26 12:06:04 -05:00
Quincey Koziol
0eb562bc20 Refactor to reduce verbosity. 2020-03-26 11:51:26 -05:00
Quincey Koziol
a3e08862c6 Correct macro check 2020-03-25 15:52:11 -05:00
Quincey Koziol
60e446113f Correct failure when allocation tracking are disabled. 2020-03-24 12:17:25 -05:00
vchoi
afdcac28b8 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-03-23 01:16:32 -05:00
Quincey Koziol
b51585a911 Revise API for H5get_alloc_stats() to take a struct instead of separate values. 2020-03-20 16:39:55 -05:00
Quincey Koziol
66350c3356 Merge remote-tracking branch 'origin/develop' into alloc_stats 2020-03-20 15:50:24 -05:00
Allen Byrne
6be711bbd2 Fix threadsafe for new test 2020-03-18 15:31:27 -05:00
Jacob Smith
b65405439d 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-03-13 17:13:17 -05:00
Quincey Koziol
04b8cc82a8 Add routines to query the library's free list sizes and allocation stats. 2020-03-10 18:37:55 -05:00
David Young
3e93aa9514 So that I can use PASSED(); anywhere a statement can go, #define PASSED() with
a do-while wrapper.
2020-02-28 16:51:55 -06:00
David Young
803d805c74 Complete the comment on thread_main(), explaining why the barrier is used. 2020-02-27 16:14:44 -06:00
David Young
4be589813a 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-02-27 11:27:45 -06:00
David Young
11d22f3ea5 Test the right condition for the EBUSY return in pthread_barrier_destroy(). 2020-02-27 10:17:24 -06:00
David Young
802bf2dc1e s/exit_failure/EXIT_FAILURE/g 2020-02-27 10:16:49 -06:00
David Young
b87d9cb50e Implement pthread_barrier(3) for Darwin using a counter, condition variable,
and mutex.  Untested.
2020-02-26 20:38:57 -06:00
Allen Byrne
666205a55f TRILAB-142 Change minimum CMake version to 3.12 2020-02-21 16:16:06 -06:00
David Young
7b4131c2ae Merge pull request #2367 in HDFFV/hdf5 from ~DYOUNG/werror:unused to develop
* commit '50aac126d7c4082c2aeb0f3a68cad26bd1cd9783':
  Start to document the function/parameter/variable attribute macros.
  Filter all of the new _USED / _UNUSED type modifiers.
  H5_HAVE_PARALLEL, _DEBUG_API, etc.  Add attributes to some variables and parameters that are unused under some configurations.
2020-02-19 09:38:02 -06:00
David Young
b4697f9692 Use HD prefix. 2020-02-12 14:07:47 -06:00
David Young
f9a8fd5a4c H5_HAVE_PARALLEL, _DEBUG_API, etc. Add attributes to some variables and
parameters that are unused under some configurations.
2020-02-10 14:41:20 -06:00
David Young
c7ad81b0ea Provide local copies of err(3)- and errx(3)-alike functions
for Visual Studio compatibility.
2020-02-07 14:45:08 -06:00
David Young
8f77878953 Oops, the test has to return success in the unimplemented case. 2020-02-06 10:43:37 -06:00
David Young
cefacee21b src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
test/thread_id.c: move threads_failure() inside #ifdefs.
2020-02-03 16:33:28 -06:00
David Young
a20b68b257 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-02-03 16:23:06 -06:00
David Young
65600cbd72 Add thread_id.c to the MANIFEST and the CMakeLists.txt per Allen's
request.
2020-02-03 12:59:52 -06:00
David Young
986c7451a0 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-02-03 11:59:14 -06:00
kmu
c586d91ea0 Merge branch 'develop' into misc 2020-01-29 14:03:48 -06:00
David Young
43d41633a1 Merge pull request #2318 in HDFFV/hdf5 from ~DYOUNG/werror:reduce-werror-diffs-1 to develop
* commit 'fa1b2f6ef35c459c9f74ead885c119ae7f61c056':
  Reduce differences between my -Werror branch and `develop`:
2020-01-29 13:51:52 -06:00
David Young
0d6e025888 Merge pull request #2320 in HDFFV/hdf5 from ~DYOUNG/werror:reduce-werror-diffs-2 to develop
* commit 'a5f236e83bdd29e660a55c5577a69a3809605cda':
  Reduce casts of HDcalloc()/HDmalloc() that -Wc++-compat required.
2020-01-29 13:51:27 -06:00
David Young
1b49ccd7fa Merge pull request #2321 in HDFFV/hdf5 from ~DYOUNG/werror:reduce-werror-diffs-3 to develop
* commit 'f19e06b59ee53f17465a7b5974c25c3245a40d9a':
  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].
2020-01-29 13:51:10 -06:00
kmu
0443c582d8 initialization discards const warning 2020-01-29 13:31:14 -06:00
David Young
f19e06b59e 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-01-29 11:44:39 -06:00
David Young
a5f236e83b 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-01-29 10:47:30 -06:00
David Young
fa1b2f6ef3 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-01-28 20:35:28 -06:00
Jordan Henderson
e41f671d2f Introduce new H5VL _by_value routines 2020-01-28 18:18:38 -06:00
kmu
684a9bd9cb Merge branch 'develop' into misc 2020-01-28 14:30:20 -06:00
kmu
52115036dd fix unused function warning 2020-01-28 14:25:40 -06:00
Kimmy Mu
71c050f837 Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop
* commit '406330addf45529ecdd088f4d22e9aab9a03661d':
  rename macro
  change condition
  pick up from Dave's fix
  leave Wswitch-default for later fix
  fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow
2020-01-28 13:28:26 -06:00
kmu
5163a7e1cf fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow 2020-01-27 09:01:32 -06:00
Dana Robinson
51ed3d256e Cleaned up warnings in test/tid.c. 2020-01-23 21:19:24 -08:00
Dana Robinson
492d186a5c Revert "Revert "Moved -Wunsuffixed-float-constants to the developer warnings.""
This reverts commit 6486e06545.
2020-01-23 14:40:47 -08:00
kmu
838d4ec56b squash cast warning fix 2020-01-23 15:12:00 -06:00
Kimmy Mu
8ce59829e4 Merge pull request #2094 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/unused to develop
* commit '145ef3ceee20c28a443bd11507c58858bea3f889':
  more cleanup
  change it back
  pick up missing piece
  fix unused related warnings
  removed unused parameter
  more fix and address comments
  remove unsed var,function,macro, etc
2020-01-22 19:46:53 -06:00
kmu
145ef3ceee more cleanup 2020-01-22 19:46:12 -06:00
Dana Robinson
24fe4b38da Fixed yet another small issue in test/efc.c. 2020-01-21 15:51:46 -08:00
kmu
9be5b2842e merge and fix 2020-01-20 21:11:32 -06:00
Dana Robinson
2f606a7c62 PATH_MAX fix in efc test for Windows. 2020-01-19 18:51:07 -08:00
kmu
628d267162 merge and fix conflict 2020-01-19 08:09:44 -06:00
Dana Robinson
44739ccd47 Merge branch 'develop' into stack_size_warnings 2020-01-16 16:32:33 -08:00
Dana Robinson
a92c735c9b Squashed commit of the token_refactoring branch: 2020-01-16 13:29:34 -08:00
Dana Robinson
46c3bc6b98 Tidying from code review. 2020-01-15 16:43:53 -08:00
Jerome Soumagne
024f7ba092 Merge pull request #2237 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5:HDFFV-10992-fix to develop
* commit 'a7648879d729c1b75bd32f3a151831e9cbfbe31c':
  Add test for reference shutdown issue
  H5R: set app ref when incrementing ref_count on location held by reference (fix HDFFV-10992)
2020-01-15 17:27:48 -06:00
Jerome Soumagne
a7648879d7 Add test for reference shutdown issue 2020-01-15 17:23:33 -06:00
Allen Byrne
a0ae5e9b89 HDFFV-11001 Add fine control over testing 2020-01-15 11:38:06 -06:00
Dana Robinson
1f8f6f019c Fixed stack and frame size warnings. Not complete, but fixes most of
the easier cases.
2020-01-15 09:32:01 -08:00
kmu
d46ea2d08a merge and fix conflicts 2020-01-14 11:28:27 -06:00
kmu
9712fad601 fix unused related warnings 2020-01-13 13:20:19 -06:00
Larry Knox
a7c5c5715a Modify external_env.c to prevent deleting test file of external.c.
Fix for HDFFV-10941.
2020-01-09 16:29:24 -06:00
Kimmy Mu
127f07d64a Merge pull request #2071 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop
* commit '0a2bb11b248df6841daabca3970df5d8504adfc7':
  address problems from comments
  fix and address comments
  change according to previous comments
  add missing piece
  remove unnecessary check macro
  fix intel compile warnings
  Revert "fix warnings from Intel compiler"
  Revert "fix warnings and some text alignment"
  Revert "let hdf5 pick up the right compiler in Intel environment"
  Revert "fix issues from previous PR comments"
  Revert "using a different MACRO"
  using a different MACRO
  fix issues from previous PR comments
  let hdf5 pick up the right compiler in Intel environment
  fix warnings and some text alignment
  fix warnings from Intel compiler
2020-01-06 12:17:10 -06:00
Quincey Koziol
0225e6d596 Small changes from the token_refactoring branch, to reduce the delta to develop 2020-01-03 22:16:38 -06:00
Quincey Koziol
cf5cd3b639 Refactor H5Dvlen_get_buf_size to use optional dataset operation, with generic fallback for VOL connectors that don't implement operation 2019-12-20 22:41:00 -06:00
Quincey Koziol
58cf795321 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.
2019-12-19 22:41:37 -06:00
Allen Byrne
ac87f12afe Remove const 2019-12-18 16:10:12 -06:00
Allen Byrne
27596d1157 Fix compile error - declaration after executable statement 2019-12-18 15:08:40 -06:00
Allen Byrne
b89d428087 Adjust cache.c only variables. 2019-12-18 14:29:46 -06:00
Allen Byrne
527105012b Fix include to correct memory calls - big-endian issue. 2019-12-18 12:44:27 -06:00
Vailin Choi
9ee8c599d7 Merge pull request #2086 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/reference_ver_hyperslab_ver to develop
* commit 'b42325e8f5ff3b6bfa2ce446af5b6dc5cbbff666':
  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
2019-12-16 13:49:16 -06:00
Allen Byrne
3ab183ba99 HDFFV-10979 cleanup globals 2019-12-12 12:20:49 -06:00
Allen Byrne
8ef8f5fda9 HDFFV-10979 fix global name clash 2019-12-11 15:58:59 -06:00
kmu
b0e5b2d933 removed unused parameter 2019-12-11 13:36:56 -06:00
kmu
0a2bb11b24 address problems from comments 2019-12-11 13:35:02 -06:00
kmu
45a62b2d46 fix and address comments 2019-12-11 10:44:56 -06:00
kmu
f2614c9042 more fix and address comments 2019-12-09 14:08:47 -06:00
kmu
8b51394f38 Merge branch 'develop' into bugfix/intel_warnings 2019-12-09 09:18:56 -06:00
kmu
189935ff26 remove unnecessary check macro 2019-12-06 14:12:57 -06:00
kmu
f22e258586 remove unsed var,function,macro, etc 2019-12-06 12:03:19 -06:00
Vailin Choi
b42325e8f5 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
2019-12-06 11:55:36 -06:00
Jerome Soumagne
107bcbd3df Merge pull request #2076 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5:type_fixes to develop
* commit '7b03a1c03633d695b487642e54f897c715f8622e':
  Fix H5VL_token_t type and fix H5VL_loc_by_token to use H5VL_token_t *
  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.
2019-12-05 17:25:22 -06:00
Vailin Choi
1e10b3212e Two fixes:
(1) Set the version for reference datatype messge to H5O_DTYPE_VERSION_4.
(2) Verify the decoded version for hyperslab selection.
2019-12-05 15:09:23 -06:00
David Young
60756183d9 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.
2019-12-05 14:41:45 -06:00
Dana Robinson
1ad02a4459 Yanked -Wc++-compat from the flags used to build the C library in both
the Autotools and CMake.
2019-12-04 00:49:52 -08:00
kmu
132fa33dad fix intel compile warnings 2019-12-03 20:52:55 -06:00
Dana Robinson
43c48fbadc Fixed missing blob callbacks in test VOL connectors. 2019-12-03 15:14:57 -08:00
Jordan Henderson
874900d395 Add OAPL parameter to H5Rcreate_ APIs 2019-12-02 17:05:15 -06:00
Jerome Soumagne
6b68cc352f H5R: fix H5Tconv to check for null references
Valid for both deprecated and non-deprecated references

Update test
2019-11-26 15:50:08 -06:00
David Young
f907b511d0 Oops, remove more C99 designated initializers for VS 2010 compatibility. 2019-11-25 17:30:08 -06:00
David Young
456171651a Add new source files to CMakeLists.txt. 2019-11-20 16:56:00 -06:00
David Young
559bcaf570 free -> HDfree 2019-11-20 15:53:46 -06:00
David Young
bf6b89c841 Quiet decleration-after-statement warnings. 2019-11-13 14:38:22 -06:00
David Young
bd77af437f Undo accidental test deletion. 2019-11-13 13:41:05 -06:00
David Young
305177a51f Oops, delete a debug printf that snuck in here. 2019-11-13 13:39:59 -06:00
David Young
b505226ad5 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.
2019-11-13 13:29:59 -06:00
David Young
695c62bafe 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.
2019-11-13 12:06:01 -06:00
David Young
1e3d63dcdf same_file is assigned but never used. Delete it. 2019-11-13 12:05:16 -06:00
David Young
81a256b02e Don't assign a constant string to a pointer to non-constant character. 2019-11-13 12:04:42 -06:00
David Young
42cd35b717 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.
2019-11-13 12:03:18 -06:00
David Young
7bdf30738d 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.
2019-11-13 11:56:46 -06:00
David Young
dc0d3a3881 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.
2019-11-13 11:50:11 -06:00
David Young
943e601b10 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.
2019-11-13 11:49:15 -06:00
David Young
833c0a2fc6 Move some static functions and variables to .c files to avoid unused
function/variable warnings.
2019-11-13 11:35:00 -06:00
David Young
37eb3dd7d2 Avoid unused-variable warnings: change static const strings in a couple
of header-file templates to #defines.
2019-11-13 11:31:20 -06:00
David Young
62afeec0ee Merge remote-tracking branch 'hdf5/develop' into add-werror-and-squash-some to
see if new warnings-as-errors have cropped up.
2019-11-12 14:02:35 -06:00
David Young
e08b69d3d2 Merge pull request #2027 in HDFFV/hdf5 from ~DYOUNG/hdf5:dsets-randomness to develop
* commit '4d834adba4aeb1a0174bddb83212b7073b64e269':
  Use HD prefix.
  Fix HDFFV-10937: use a more reliable (and probably faster) scheme for visiting all elements of a matrix in an arbitrary order.
2019-11-12 13:25:26 -06:00
David Young
4d834adba4 Use HD prefix. 2019-11-12 12:40:51 -06:00
David Young
4981e83740 Merge remote-tracking branch 'hdf5/develop' into add-werror-and-squash-some
to pick up the NetBSD-compatibility changes that I recently merged.
2019-11-08 12:19:31 -06:00
David Young
2dd5bbfe16 Merge pull request #1984 in HDFFV/hdf5 from ~DYOUNG/netbsd:develop to develop
* commit '0b721858e46a317c370a24115032d5be41688f67':
  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.
  Get the path to prefix right: needs a ../ to back out of subdirectory c/.
  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.
  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.
  Follow longstanding execv convention for compatibility with NetBSD.
  Under the examples directories, always find the installed HDF5 executables and scripts using @prefix@ instead of a relative path, because the number of ../ in the relative path will be different on NetBSD than on other systems.
  Make the HDF5 configure script grok NetBSD.
  For portability, insulate the HDF5 library from some system macros.
  Not every system has perl installed in /usr/bin/, so change the shebang (#!) line to `/usr/bin/env perl` to locate perl on the PATH.
  For portability, use the POSIX sh(1) string-comparison operator `=` instead of `==`.
2019-11-05 15:36:09 -06:00
David Young
34eff2aae5 Change some GCC warnings to errors. Fix code to quiet some warnings. 2019-11-05 12:14:26 -06:00
David Young
e8de6a46e2 Fix HDFFV-10937: use a more reliable (and probably faster) scheme for
visiting all elements of a matrix in an arbitrary order.
2019-10-28 16:54:05 -05:00
Jerome Soumagne
c13078a0ed Make wrappers, tests and tools use H5Treclaim() instead of H5Dvlen_reclaim() 2019-10-08 14:30:24 -05:00
Jerome Soumagne
ae490016b9 Add new H5R API that abstracts object, region and attribute reference types
Also support references to external files

Add new H5T_REF type and type conversion routines

Support conversion from H5T_REF_OBJ/DSET_REG to H5T_REF

Add H5Treclaim() API to reclaim memory of vlen/reference types

Deprecate H5Dvlen_reclaim()

Fix H5T_vlen_reclaim() and H5T_reclaim() to use private callback

Add H5T_ref_reclaim()

Move previous H5R APIs to H5Rdeprec.c

Clean up H5Ocopy

Separate H5O_copy_expand_ref() to H5Ocopy_ref()

Add support for copying new reference types

Clean up deprecated routines to go through VOL and same code path

Fix return codes in existing trefer.c test

Rename trefer.c to trefer_deprec.c

trefer.c is for new references

Add performance test for trefer

Add additional obj_copy_ref test

Make use of tokens and blobs to store references

Skip blob encoding for object references

Start adding new reference examples
2019-10-08 14:30:24 -05:00
Dana Robinson
ff3278f1a0 Fixed a bug (HDFFV-10899) where the behavior of the deprecated
H5Gget_objinfo() call had changed and passing in a non-existing
soft link with a statbuf of NULL passed instead of failed (as
it should as per the RM). The HDF5 1.8 and 1.10 behavior was
restored and H5Gget_objinfo() will now fail and return -1 as
before.
2019-10-04 02:03:11 -07:00
David Young
bbc1264ea6 Follow longstanding execv convention for compatibility with NetBSD. 2019-10-03 16:01:40 -05:00
Vailin Choi
5c9c07b149 Merge pull request #1959 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/iteration_error_in_test_versionbounds to develop
* commit '9ea386b6a660bd29225e96a246439db0c7f73da2':
  Fixed the iteration error in test_versionbounds() in test/dtypes.c.
2019-10-01 10:33:35 -05:00
Jacob Smith
cab37f6314 Move function-scope macro definition to file-scope. 2019-09-30 13:57:09 -05:00
Vailin Choi
9ea386b6a6 Fixed the iteration error in test_versionbounds() in test/dtypes.c. 2019-09-30 12:56:49 -05:00
Jacob Smith
541f50616f Refactor external file addition loop to static function. 2019-09-29 18:52:55 -05:00
Jacob Smith
59aa3afade fix declaring variable in for statement 2019-09-28 16:05:51 -05:00
Larry Knox
3fb711e0ff Number of arguments requires H5Dopen2. 2019-09-28 13:01:30 -05:00
Vailin Choi
a19de0ec83 Merge pull request #1934 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/HDFFV-10585-investigate-slowness-of-regular to develop
* commit '7924eee0e5ee0745b784c635042b8633886fb799':
  (1) Address the feedback from the PR review (2) Add release notes
  Fix for HDFFV-10585 investigate hyperslab slowness: 1) Improve hyperslab performance when doing I/O from 1-d disjoint file dataspace to 1-d contiguous memory dataspace. 2) Move coding in H5D__chunk_io_init() that is constructing the chunk mappings to a separate routine.
2019-09-27 12:39:31 -05:00
Dana Robinson
4fb64c89fe Converted H5O MD cache cork calls to use the VOL. 2019-09-26 19:13:35 -07:00
Vailin Choi
7924eee0e5 (1) Address the feedback from the PR review
(2) Add release notes
2019-09-26 14:10:56 -05:00
Vailin Choi
52fef3c6d2 Merge pull request #21 in ~VCHOI/my_third_fork from develop to bugfix/HDFFV-10585-investigate-slowness-of-regular
* commit '0ea77179d507bd2c29f3b9b357a0c35d4077b29c': (39 commits)
  Fix the errors when updating the versions in the new 1.13 develop branch.
  add missing version to list
  Add new versioned filename to list
  Update N_FSINFO_VERSION_BOUNDS to H5F_LIBVER_NBOUND.
  Remove file script
  Update versioning to next major version
  Update develop branch version to 1.13.0 after creation of hdf5_1_12 branch.
  Merge Binh-Minh's changes for code improvement to chunk_info.c (PR #1942) to develop branch.
  Update to current external file population.
  Revert else-if to single line.
  Fix missing option and incorrect close
  Revert "Moved NDEBUG guards to H5EA_DEBUG in H5EA package."
  Revert "Fix for H5EA debug package when built in release mode."
  Change print calls to HD-wrapped. Minor formatting tweaks (inc. regressions and in-file style-matching).
  Refactor h5repackgentest to have more modular internals, for easier addition of new tests. Update manifest and test script for new hdf5 external-storage .h5 files.
  Remove obsolete symbol
  small syntax changes
  Renamed get/set_time() calls in the tools library to avoid name clash when building static parallel HDF5 w/ static linking to OpenMPI.
  Change unused variable to generic form
  Whitespace cleanup
  ...
2019-09-26 13:41:56 -05:00
Allen Byrne
e6b029e77e add missing version to list 2019-09-26 10:48:37 -05:00
Allen Byrne
a08b3adece Add new versioned filename to list 2019-09-26 08:43:41 -05:00
Allen Byrne
b2f52d0b07 Update versioning to next major version 2019-09-25 17:28:17 -05:00
Larry Knox
2a4bc8c63e Merge Binh-Minh's changes for code improvement to chunk_info.c (PR #1942)
to develop branch.
2019-09-25 14:30:54 -05:00
Jacob Smith
35a9e9c50f Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into bugfix/repack_external_storage 2019-09-23 17:23:02 -05:00
Jacob Smith
1070468dac Change print calls to HD-wrapped.
Minor formatting tweaks (inc. regressions and in-file style-matching).
2019-09-23 16:25:25 -05:00
Vailin Choi
c7b9d5acc6 Fix for HDFFV-10585 investigate hyperslab slowness:
1) Improve hyperslab performance when doing I/O from 1-d disjoint file dataspace
to 1-d contiguous memory dataspace.
2) Move coding in H5D__chunk_io_init() that is constructing the chunk mappings to
a separate routine.
2019-09-19 13:40:02 -05:00
Allen Byrne
624d5d9a8e HDFFV-10740 - skip copying dirs in for loops 2019-09-18 11:04:09 -05:00
Dana Robinson
78fda91295 Fixed some exit calls. 2019-09-06 18:06:26 -07:00
Binh-Minh Ribler
716125887d Reworked the previously refactorred code.
Platforms tested:
    Linux/64 (jelly)
    Linux/64 (platypus)
    Darwin (osx1011test)
2019-09-05 14:14:19 -05:00
Binh-Minh Ribler
339bf241be Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5-bmr into develop 2019-09-04 02:09:35 -05:00
Binh-Minh Ribler
714804b280 Improvement of test code
Description:
    Fixed tests to handle the case when a requested compression filter
    is not available.
Platform tested
    Linux/64 (jelly)
    Darwin (osx1011test)
2019-09-04 02:03:32 -05:00
Allen Byrne
781843da4b Fix CMake build of test needing compression libs 2019-09-03 12:07:29 -05:00
Binh-Minh Ribler
a8af828bbf Merge pull request #1908 in HDFFV/hdf5 from ~BMRIBLER/hdf5-bmr:develop to develop
- Added new chunk query functions: H5Dget_num_chunks(), H5Dget_chunk_info(), and H5Dget_chunk_info_by_coord()
- Fixed iterator issue in H5EA_iterate(), H5FA_iterate(), and H5D__none_idx_iterate()

* commit '96dab622e3bbe75d85b0cef3ca2bd5288cf4ac32':
  Fixed error code and error messages Tested on Jelly (very minor)
  Changed H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COOR to H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD per a review comment.
  Updated comments
  Updated based on reviews and refactored test code
  Code cleanup and refactor
  Re-ordered items w.r.t. date.
  Fixed typo
  Added notes about HDFFV-10677 and HDFFV-10661
  HDFFV-10677 and HDFFV-10661
2019-09-03 11:08:42 -05:00
Binh-Minh Ribler
96dab622e3 Fixed error code and error messages
Tested on Jelly (very minor)
2019-09-03 11:00:29 -05:00
Binh-Minh Ribler
bde9257f02 Updated comments 2019-09-01 01:25:59 -05:00
Binh-Minh Ribler
b679d11bcc Updated based on reviews and refactored test code 2019-09-01 01:13:08 -05:00
Allen Byrne
0b6f5e88cd Fix EXISTS test syntax 2019-08-29 14:43:35 -05:00
Binh-Minh Ribler
a633e33334 Code cleanup and refactor 2019-08-29 00:53:40 -05:00
Allen Byrne
43ff3fdc33 fix get gethostname for windows 2019-08-28 10:19:03 -05:00
Binh-Minh Ribler
e06bf9d263 HDFFV-10677 and HDFFV-10661
Description:
    - Added functions to query chunk information:
        H5Dget_num_chunks(dset_id, fspace_id, *nchunks)
            Gets the number of written chunks that intersect with the given
            dataspace.  However, in this version, the intersection is not
            yet completed.  Thus, the number of all written chunks will be
            returned.
        H5Dget_chunk_info_by_coord(dset_id, *offset, *filter_mask, *addr, *size)
            Given a chunk's logical coordinates, returns the chunk's filter,
            address, and size.
        H5Dget_chunk_info(dset_id, fspace_id, index, *offset, *filter_mask, *addr, *size)
            Given a chunk's index, returns the chunk's logical coordinates, filter,
            address, and size.  The chunk belongs to a set of chunks that have
            nonempty intersection with the specified dataspace.  However, in
            this version, the intersection is not yet completed, and the index
            is of all the written chunks.
        These functions comply with VOL.

    - Fixed some oversights found in the library for the tests in chunk_info.c
      to work correctly.  The returned value from a callback function was not
      checked in H5EA_iterate(), H5FA_iterate(), and H5D__none_idx_iterate().
      This oversight caused a callback function to continue iterating even though
      it's supposed to stop.
Platforms tested:
    Linux/64 (jelly)
    Linux/64 (platypus)
    Darwin (osx1011test)
2019-08-28 10:08:12 -05:00
Allen Byrne
ba974c031d OESS-29 Update HD prefix mostly 2019-08-24 14:07:33 -05:00
Quincey Koziol
5d6f27b32b Merge branch 'develop' into shared_file_ptr 2019-08-21 15:36:17 -05:00
Quincey Koziol
53eaeff26a Begin converting the H5MF interface to use shared file pointers instead
of top file pointers.
2019-08-20 21:07:13 -05:00
Dana Robinson
8c40dab59e Untangle #ifdef mess in ROS3 code. 2019-08-19 18:02:47 -07:00
Quincey Koziol
df36318b5f Rest of changes for 'top' file pointer to 'shared' file pointer for H5F__accum
routines.
2019-08-19 18:00:05 -05:00
Quincey Koziol
85a56a9c4f Partial H5F__accum_* routines. 2019-08-19 17:47:28 -05:00
Allen Byrne
9081fb266c Add missing HD prefix 2019-08-18 11:33:45 -05:00
Allen Byrne
96bf97f534 Update HD prefix and reconcile hl/cpp test 2019-08-16 13:23:29 -05:00
Allen Byrne
64e6665b54 Add HD prefix to tests 2019-08-15 16:46:15 -05:00