Commit Graph

3548 Commits

Author SHA1 Message Date
Quincey Koziol
a90258b04b Switch H5VM inline routines back to single underscope and put a comment in their header about this naming 2020-08-22 14:01:17 -05:00
Quincey Koziol
ba087ce2b5 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-22 14:00:44 -05:00
Dana Robinson
30678596f2 Windows thread-safe fixes from develop 2020-08-14 08:42:39 -07:00
Dana Robinson
1ae6daaa80 Sync with develop 2020-08-01 09:18:18 -07:00
Vailin Choi
02d8c7256e 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-21 12:40:44 -05:00
Larry Knox
538b131764 Squashed commit of the following:
commit 45b0cbc71929930a874e1c09e0770aa64d0ae697
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Thu Apr 23 13:14:56 2020 -0500

    Add C++ warnings treated as error for autotools builds.

commit 6debcddcc766601799d5bd661bd60946f951a07e
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Fri Jun 19 16:50:03 2020 -0500

    Remove tests for develop branch from testh5cc.sh.in.
    Add @H5_ECXXFLAGS@ to AM_CXXFLAGS.

commit fed497e7f207313b2a133d3b68c942b7d7104b90
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Fri Jun 12 15:06:39 2020 -0500

    Merge pull request #2646 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

    * commit '998c6470d78e14228695419c3b514c35ecf3d69e':
      Remove unnecessary version conditions for Clang compilers.

commit 92e52ce5c211bd1d3991a3b8bb67287ac7b652aa
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Wed Jun 10 18:53:45 2020 -0500

    Merge pull request #2639 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

    * commit 'a33667faf226f5d8c9633bf537893e8fce1bf1f6':
      Add c++ to --enable-sanitize-checks option.

commit 2e802534fb997b81fa98fdd1c7d97d4310898e0d
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Wed Jun 10 15:18:36 2020 -0500

    Merge pull request #2633 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

    * commit '20eab963899841c9a003baebead8e3bc07d9e127':
      Remove duplicate entries in MANIFEST.
      Make changes to CMake CompilerFlags.cmake files so extra flags are loaded for non-GNU compilers.
      Update new clang files to not pick up clang as vendor for pgCC. Add new files to MANIFEST Temporary demotion of 2 -Werror warning flags that fail on macos 10.12 Remove Production flag unknown to Apple clang.

commit 96ef60a58a23847a7da89a891f2415055ec2ab60
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Mon Jun 8 16:24:49 2020 -0500

    Merge pull request #2631 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

    * commit 'b942a4d8a3e27317cac50ce37ff5302d477664d8':
      Clean up code to get clang version in config/linux-gnulibc1

commit 8a7c687da568e8b50b38fa53da1ca63759be6ec4
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Mon Jun 8 11:42:37 2020 -0500

    Merge pull request #2623 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

    * commit 'c7626f79fdee4eee13925e240ef41e61f3367eab':
      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.
      Add files for adding warning flags for clang compilers in autotools configure.

commit db3ef7ff3c1ed79167cecef831501411cff8291f
Merge: 5a0f8d7 f9f1310
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Fri Jun 19 14:46:22 2020 -0500

    Merge branch 'hdf5_1_12' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into hdf5_1_12

commit 5a0f8d7940ae57b445f545a0abd7e303ce6924ee
Author: Larry Knox <lrknox@hdfgroup.org>
Date:   Wed Jun 10 20:15:41 2020 -0500

    Merge pull request #2636 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:HDFFV-11000-update-testh5cc.sh.in-for-version to develop

    * commit '5c0bd670d6e9919c463fbc05de99e2ba55b0761e':
      Add tests for all version to H5_NO_DEPRECATED_SYMBOLS section and to section for current version, with and without default API version flags.
      HDFFV-11000:  update-testh5cc.sh.in to test sample versioned functions in HDF5 1.10, 1.12 and develop.
2020-06-20 22:10:49 -05:00
Quincey Koziol
95916c8936 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-07 16:22:40 -05:00
Allen Byrne
2c78a1930b Whitespace updates 2020-05-13 09:15:29 -05:00
David Young
f0485413e0 Complete the comment on thread_main(), explaining why the barrier is used. 2020-05-11 15:34:44 -05:00
David Young
c149f4ca16 The first implementation seemed to allow for the possibility that a thread
could block at the barrier, wake and exit the barrier, re-acquire the barrier
lock and increase `nentered` before the other blocked threads woke and checked
`nentered % count == 0`.  Then the other blocked threads would check `nentered
% count == 0` and, finding it false, go back to sleep in the barrier.  This new
implementation waits for a looser condition to obtain so that threads don't go
back to sleep in the barrier.
2020-05-11 15:34:31 -05:00
David Young
e5f459d86d Test the right condition for the EBUSY return in pthread_barrier_destroy(). 2020-05-11 15:34:22 -05:00
David Young
99034ad9ad s/exit_failure/EXIT_FAILURE/g 2020-05-11 15:34:05 -05:00
David Young
4d6c96bdf5 Implement pthread_barrier(3) for Darwin using a counter, condition variable,
and mutex.  Untested.
2020-05-11 15:34:05 -05:00
David Young
0952346c79 Use HD prefix. 2020-05-11 15:33:40 -05:00
David Young
d7412b7e88 Provide local copies of err(3)- and errx(3)-alike functions
for Visual Studio compatibility.
2020-05-11 15:33:33 -05:00
David Young
efca0c7f56 Oops, the test has to return success in the unimplemented case. 2020-05-11 15:33:22 -05:00
David Young
c0fa07fd9f src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
test/thread_id.c: move threads_failure() inside #ifdefs.
2020-05-11 15:32:40 -05:00
David Young
524af38af8 Change thread IDs to uint64_t from unsigned long, per Quincey's suggestion.
Fix a typo in the H5TS_thread_init() comment and reword some ID
properties.
2020-05-06 15:37:42 -05:00
David Young
bb3e1a5caf Add thread_id.c to the MANIFEST and the CMakeLists.txt per Allen's
request.
2020-05-06 15:37:28 -05:00
David Young
763d7a778e Replace pthread_self_ulong() with H5TS_thread_id(). The POSIX Threads
implementation ought to be portable to any system that has POSIX
Threads.  On Windows, I use the same API call as before.
2020-05-06 15:37:14 -05:00
Quincey Koziol
f8545c459b Align contents of CMake and autotools testfile cleanup lists. 2020-05-04 13:18:31 -05:00
Quincey Koziol
2edc8daa16 Avoid allocating a chunk index for datasets with 0-sized dimensions, until
the dataset is extended.
2020-05-04 13:17:04 -05:00
David Young
743a2adb2a Merge pull request #2537 in HDFFV/hdf5 from ~DYOUNG/werror:fix-werrors to develop
* commit 'd16eb45d536bd13ca3cf1b0bdc76c58d95d13f17':
  For compatibility with non-C99 Visual Studio versions, use "%" PRIuMAX instead of "%ju".
  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]`.
  Fix `src/H5FDdirect.c:1346:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]`.
2020-04-25 22:30:08 -05:00
Allen Byrne
6108186feb TRILAB-192 - merge changes from develop
Single source, config files, for warnings for both autotools and CMake.
Update CMake libraries, tools, tests to use correct flags.
2020-04-07 09:47:29 -05:00
Vailin Choi
b4d06a7e80 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-02 18:30:11 -05:00
Quincey Koziol
32742c0890 Was checking the wrong compiler macro. 2020-03-25 15:54:50 -05:00
Quincey Koziol
a45a994bd4 Correct failure when allocation tracking are disabled. 2020-03-24 13:05:49 -05:00
Quincey Koziol
5144eedd2e Revise API for H5get_alloc_stats() to take a struct instead of separate values. 2020-03-23 18:05:37 -05:00
Quincey Koziol
4065a506bc Add routines to query the library's free list sizes and allocation stats. 2020-03-23 18:04:33 -05:00
Allen Byrne
9ed096fb39 Merge changes from develop mostly cmake 3.12 minimum version 2020-02-23 11:55:47 -06:00
David Young
d42bee3688 Squashed commit of the following:
commit ff7a9a34de2fcd78f5d32a1532f3d0e224b20d94
Author: Kimmy Mu <kmu@hdfgroup.org>
Date:   Wed Jan 29 14:12:18 2020 -0600

    Merge pull request #2324 in HDFFV/hdf5 from ~KMU/hdf5:hdf5_1_12 to hdf5_1_12

    * commit '781fa57f6ee816e037dd12fff02d37ff7ec9c2b1':
      pick up missing piece from merge
      Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop
      remove redundent definition
      Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop
      Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop
      Merge pull request #2315 in HDFFV/hdf5 from ~KMU/hdf5:develop to develop
      missing prototype warning
      prototype issue
      Merge pull request #2306 in HDFFV/hdf5 from ~KMU/hdf5:develop to develop
      Merge pull request #2300 in HDFFV/hdf5 from ~KMU/hdf5:squashed_cast to develop
      Merge pull request #2291 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/uninitialized to develop
      Merge pull request #2295 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/float to develop
      Merge pull request #2292 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/prototype to develop
      Merge pull request #2094 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/unused to develop

commit 9f3d808c05d2a3b308f32c958c6671fcac0a432c
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Jan 29 11:43:55 2020 -0600

    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.

commit 43a4b80b21c0329fbc1f9a0e2854795189f0bb50
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Jan 29 10:47:30 2020 -0600

    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.

commit 035bfa0769a4012881fc659b673bacf44d146537
Author: David Young <dyoung@hdfgroup.org>
Date:   Tue Jan 28 20:35:28 2020 -0600

    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-31 13:53:26 -06:00
Jordan Henderson
edec1f017d Introduce new H5VL _by_value routines 2020-01-29 16:59:41 -06:00
Kimmy Mu
d4dedac70f 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 15:47:58 -06:00
Kimmy Mu
fe75e8f66f Merge pull request #2300 in HDFFV/hdf5 from ~KMU/hdf5:squashed_cast to develop
* commit 'af5c33afabdae2e39bb45eb1b3e9c8366da01145':
  remove unnecessary stuff
  squash cast warning fix
2020-01-27 20:47:06 -06:00
kmu
a7d8693216 Merge branch 'hdf5_1_12' of https://git.hdfgroup.org/scm/~kmu/hdf5 into hdf5_1_12 2020-01-27 20:40:31 -06:00
Kimmy Mu
066b874e5a 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-27 20:39:58 -06:00
Larry Knox
0c4a4974f4 Modify external_env.c to prevent deleting test file of external.c.
Fix for HDFFV-10941.
2020-01-27 09:33:35 -06:00
Kimmy Mu
d038d85100 Merge pull request #2238 in HDFFV/hdf5 from ~KMU/hdf5:hdf5_1_12 to hdf5_1_12
* commit '48cc850199901c5b67a40183262f4ead975b884f':
  fix test assert fail error
  Merge pull request #2071 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop
  Merge pull request #2234 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop
2020-01-23 19:42:50 -06:00
Allen Byrne
6bae11bb5b Improved CMake options for tests 2020-01-19 07:53:46 -06:00
Dana Robinson
2b1709f6ff Squashed commit of the token_refactoring branch: 2020-01-18 20:02:16 -08:00
Jerome Soumagne
847c156917 Add test for reference shutdown issue 2020-01-17 16:36:13 -06:00
Kimmy Mu
ad80fae3cc 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-08 14:06:38 -06:00
Allen Byrne
6b6afd7a94 Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_12)
* commit '7116d82f6b685261b5b4e64fada1a0a031cd7341':
  Remove mismerged code
  Cherry pick of 0225e6d596
  Cleanups from PR reviews
  Remove unnecessary H5CX call
  Refactor H5Dvlen_get_buf_size to use optional dataset operation, with generic fallback for VOL connectors that don't implement operation
  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.
  Update h5debug to retrieve file pointer through VOL framework
2020-01-07 16:33:43 -06:00
Quincey Koziol
fcdcc4beb1 Remove mismerged code 2020-01-07 10:16:20 -06:00
Quincey Koziol
9a155a538b Cherry pick of 0225e6d596 2020-01-04 10:05:22 -06:00
Quincey Koziol
fa599f4508 Refactor H5Dvlen_get_buf_size to use optional dataset operation, with generic fallback for VOL connectors that don't implement operation 2020-01-04 10:02:39 -06:00
Quincey Koziol
7d87aea63f Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what
the operation is and decide whether to implement it or not.

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

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

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

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

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

A bunch of warning and style cleanups as well.
2020-01-04 10:02:08 -06:00
Allen Byrne
8a9a6cdd92 Correct compile statement order 2019-12-20 14:57:06 -06:00
David Young
0f988be683 Use HD prefix. 2019-12-19 15:03:41 -06:00
David Young
687feb489c Fix HDFFV-10937: use a more reliable (and probably faster) scheme for
visiting all elements of a matrix in an arbitrary order.
2019-12-19 15:03:41 -06:00