Commit Graph

3537 Commits

Author SHA1 Message Date
Jerome Soumagne
a7648879d7 Add test for reference shutdown issue 2020-01-15 17:23:33 -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
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
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
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