Commit Graph

3380 Commits

Author SHA1 Message Date
David Young
b4492dba50 Reduce diffs with develop. 2020-05-20 09:37:22 -05:00
David Young
f8096dcea3 Use H5_ATTR_NDEBUG_UNUSED instead of H5_ATTR_SANITY_CHECK. 2020-05-20 09:37:21 -05:00
David Young
d91b9f9b0a Fix compilation: use H5Oget_info() instead of specifying the version
(H5O_getinfo2).
2020-05-20 09:37:20 -05:00
Dana Robinson
29fca624e5 Misc warning fixes. 2020-05-20 09:37:20 -05:00
Quincey Koziol
a96e6246d0 Align contents of CMake and autotools testfile cleanup lists. 2020-05-20 09:37:20 -05:00
Quincey Koziol
4ad7dca124 Avoid allocating a chunk index for datasets with 0-sized dimensions, until
the dataset is extended.
2020-05-20 09:37:20 -05:00
Dana Robinson
e0d954f845 Updates to tools warning PR from code review. 2020-05-20 09:37:20 -05:00
Dana Robinson
3efed9c111 Fixes for warnings in the tools code. 2020-05-20 09:37:20 -05:00
David Young
1cff43a935 For compatibility with non-C99 Visual Studio versions, use "%" PRIuMAX
instead of "%ju".
2020-05-20 09:37:19 -05:00
David Young
0f2bc7d918 Fix `test/swmr_sparse_reader.c:118:77: error: cast from pointer
to integer of different size [-Werror=pointer-to-int-cast]` and
`test/snapshots-hdf5/current/test/swmr_sparse_reader.c:129:100:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]`.
2020-05-20 09:37:19 -05:00
Quincey Koziol
d35daa45e9 Trim trailing whitespace 2020-05-20 09:37:19 -05:00
Jacob Smith
a3f6f24c82 Tidying of Mirror VFD.
* Rename server-stop utility to mirror_server_stop.
* Remove external dependency on bzero().
* Modify test/use_common to use only the public API.
* Rename internal bitswap macro to follow convention.
2020-05-20 09:34:20 -05:00
Jacob Smith
b11015c4cc Add Splitter VFD to library.
* "Simultaneous and equivalent" Read-Write and Write-Only channels for
  file I/O.
* Only supports drivers with the H5FD_FEAT_DEFAULT_VFD_COMPATIBLE flag for
  now, preventing issues with multi-file drivers.

Add Mirror VFD to library.

* Write-only operations over a network.
* Uses TCP/IP sockets.
* Server and auxiliary server-shutdown programs provided in a new directory,
  `utils/mirror_vfd`.
* Automated testing via loopback ("remote" of localhost).
2020-05-20 09:34:20 -05:00
vchoi
9c153cce90 Modifications based on PR review feedback. 2020-05-20 09:31:58 -05:00
vchoi
517d630718 Add two routines gen_ref_files() and gen_sel_files() to generate test files related to
references and selections.
These test files will be copied to 1.12, 1.10 and 1.8 for compatibility testing.
2020-05-20 09:31:58 -05:00
Allen Byrne
e9f711699d Minor updates and fix settings for fortran flags 2020-05-20 09:31:57 -05:00
Allen Byrne
f5dc2a2f8d TRILAB-192 add c++ and fortran warnings build systems one file 2020-05-20 09:31:57 -05:00
vchoi
3a2d222a52 A fix in the cleaning up code for datatype when datatype initialization via H5D__init_type() fails.
This is triggered by the tests for revised references when the libver bounds setting does not allow version
4 datatype message to be created.  The test failure is abort core dumped.
This is due to the datatype initialization fails before the datatype ID is registered.
The datatype cleanup code should provide for the above situation.
The code to fix the problem is the same as what is done in H5D__open_oid().
2020-05-20 09:31:57 -05:00
Quincey Koziol
358558ad03 Refactor to reduce verbosity. 2020-05-20 09:31:57 -05:00
Quincey Koziol
aad3ff8244 Correct macro check 2020-05-20 09:31:56 -05:00
Quincey Koziol
f2e152c9db Correct failure when allocation tracking are disabled. 2020-05-20 09:31:56 -05:00
Quincey Koziol
7b119d614b Revise API for H5get_alloc_stats() to take a struct instead of separate values. 2020-05-20 09:31:56 -05:00
Quincey Koziol
20df4bd395 Add routines to query the library's free list sizes and allocation stats. 2020-05-20 09:31:56 -05:00
Allen Byrne
3e42250f0f Fix threadsafe for new test 2020-05-20 09:31:56 -05:00
David Young
4bbd9649c0 Complete the comment on thread_main(), explaining why the barrier is used. 2020-05-20 09:31:55 -05:00
David Young
4562a584af The first implementation seemed to allow for the possibility that a thread
could block at the barrier, wake and exit the barrier, re-acquire the barrier
lock and increase `nentered` before the other blocked threads woke and checked
`nentered % count == 0`.  Then the other blocked threads would check `nentered
% count == 0` and, finding it false, go back to sleep in the barrier.  This new
implementation waits for a looser condition to obtain so that threads don't go
back to sleep in the barrier.
2020-05-20 09:31:55 -05:00
David Young
88920baf53 Test the right condition for the EBUSY return in pthread_barrier_destroy(). 2020-05-20 09:31:55 -05:00
David Young
b7f27e0381 s/exit_failure/EXIT_FAILURE/g 2020-05-20 09:31:55 -05:00
David Young
8c5e0a1e53 Implement pthread_barrier(3) for Darwin using a counter, condition variable,
and mutex.  Untested.
2020-05-20 09:31:55 -05:00
Allen Byrne
60a4987f97 TRILAB-142 Change minimum CMake version to 3.12 2020-05-20 09:31:55 -05:00
David Young
28103327a5 H5_HAVE_PARALLEL, _DEBUG_API, etc. Add attributes to some variables and
parameters that are unused under some configurations.
2020-05-20 09:31:55 -05:00
David Young
5640d832e4 Use HD prefix. 2020-05-20 09:31:55 -05:00
David Young
50d7f83e6e Provide local copies of err(3)- and errx(3)-alike functions
for Visual Studio compatibility.
2020-05-20 09:31:55 -05:00
David Young
e3ce3bf76a Take out the temporary performance tests. 2020-05-20 09:31:54 -05:00
David Young
b00d843c2d Make calls through a function pointer. Use the same number of arguments,
always.
2020-05-20 09:31:54 -05:00
David Young
17f8b2913b Increase iterations, provide a baseline for no-op, simplify the overhead
case a bit.
2020-05-20 09:31:54 -05:00
David Young
66334f899d Temporarily add some code that measures the time to run the simplest possible
H5T__copy_all()-like routine 10 million times and then measures the version
with FUNC_ENTER_STATIC/_LEAVE_NOAPI and a HGOTO_ERROR() statement.
2020-05-20 09:31:54 -05:00
David Young
f6bf61975e Oops, the test has to return success in the unimplemented case. 2020-05-20 09:31:54 -05:00
David Young
cc57aa73c8 src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
test/thread_id.c: move threads_failure() inside #ifdefs.
2020-05-20 09:31:54 -05:00
David Young
364a277143 Change thread IDs to uint64_t from unsigned long, per Quincey's suggestion.
Fix a typo in the H5TS_thread_init() comment and reword some ID
properties.
2020-05-20 09:31:54 -05:00
David Young
5178dd70ec Add thread_id.c to the MANIFEST and the CMakeLists.txt per Allen's
request.
2020-05-20 09:31:54 -05:00
David Young
06dfd6025d Replace pthread_self_ulong() with H5TS_thread_id(). The POSIX Threads
implementation ought to be portable to any system that has POSIX
Threads.  On Windows, I use the same API call as before.
2020-05-20 09:31:54 -05:00
David Young
13bb3afdc6 Reduce differences between my -Werror branch and develop:
Rename index -> idx, fileno -> fnumber, fileno -> fno to avoid GCC
shadowed declaration warnings about index(3).

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

Use the right format string for a pointer.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

tools/test/perform/pio_engine.c: the compiler fusses if you cast a
        function call returning double directly to off_t.  It's ok if
        you cast a variable that's a double to off_t, however.  Write
        and use a new function, sqrto(), to avoid the cast warnings.
2020-05-20 09:31:53 -05:00
kmu
f06ae5ec74 initialization discards const warning 2020-05-20 09:31:53 -05:00
kmu
1e5dd76d25 fix unused function warning 2020-05-20 09:31:53 -05:00
Jordan Henderson
2e962dc49b Introduce new H5VL _by_value routines 2020-05-20 09:31:53 -05:00
kmu
51f9a51c25 fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow 2020-05-20 09:31:53 -05:00
Dana Robinson
f935bc271a Cleaned up warnings in test/tid.c. 2020-05-20 09:31:53 -05:00