Commit Graph

122 Commits

Author SHA1 Message Date
Larry Knox
4819f89d3f
Update license url (#332)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING
file - src and test directories.
2021-02-17 08:52:04 -06:00
Quincey Koziol
05f6f2becd
Avoid aligned access for references by decoding into temporary buffer and then copying the result into the actual buffer. Update test to be more thorough with using compound datatype fields everywhere. (#206) 2020-12-19 12:37:45 -06:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05: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
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
08dca47475 Minor normalizations with hdf5_1_10 2020-07-31 11:40:29 -07: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
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
Dana Robinson
6358a27498 Minor tweaks to testhdf5 code after normalization with 1.10. 2020-05-27 17:41:59 -07:00
Quincey Koziol
9e5dbf6906 Trim trailing whitespace 2020-04-20 18:12:00 -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
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
kmu
838d4ec56b squash cast warning fix 2020-01-23 15:12:00 -06:00
Dana Robinson
a92c735c9b Squashed commit of the token_refactoring branch: 2020-01-16 13:29:34 -08: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
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
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
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
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
Allen Byrne
ba974c031d OESS-29 Update HD prefix mostly 2019-08-24 14:07:33 -05:00
Dana Robinson
b40a6f75aa Fixed a memory issue in trefer.c. 2019-06-25 12:08:33 -07:00
Vailin Choi
2886cd9e45 HDFFV-10365: Changes as described in the RFC: H5Sencode/H5Sdecode Format Change.
This also addresses HDFFV-10255: H5Sencode/decode performance issue.
2019-04-06 16:55:14 -05:00
Vailin Choi
0073f19897 Set V112 as the latest format and extend the arrays of version bounds. 2019-04-04 16:29:37 -05:00
hdftest
b193bc11c9 Revert "Merge pull request #1116 in HDFFV/hdf5 from ~HDFTEST/hdf5_hft:hdf5_1_10 to develop"
This reverts commit e9f476dad4, reversing
changes made to 2ff00b1b93.
2018-06-24 18:04:23 -05:00
M. Scot Breitenfeld
f484649347 Merge branch 'develop' into hdf5_1_10.sync 2018-06-04 14:41:12 -05:00
Vailin Choi
b178d80be0 Changes made based on feedback from pull request #1039. 2018-05-14 12:26:48 -05:00
Vailin Choi
e6bc326ec0 Fix for HDFFV-10180 Performance issues with H5Oget_info. 2018-04-24 15:10:13 -05:00
M. Scot Breitenfeld
496af1be89 Needs to sync with lib version and Sencode. 2018-03-07 15:49:14 -06:00
Allen Byrne
fc875eb5b7 HDFFV-10384 and includes cleanup merged from devlop 2018-02-16 09:25:51 -06:00
Allen Byrne
41d541f1c2 More includes cleanup 2018-02-14 11:14:26 -06:00
Vailin Choi
3d84163ad3 Fix for HDFFV-9947 H5Sencode
Modifications to fix H5Sencode bug when num points selected is > 2^32.
2017-11-28 11:11:27 -06:00
Larry Knox
89fbe00dec Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '54957d37f5aa73912763dbb6e308555e863c43f4':
  Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes.
  Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh.
  Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1
  Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
2017-04-25 16:05:36 -05:00
lrknox
25ec07450a Change copyright headers to replace url referring to file to be removed
and replace it with new url for COPYING file.

Fix 2 lines in java error test expected output file where messages
include line numbers changed by reducing the copyright header by 2
lines.
2017-04-14 11:54:16 -05:00
Quincey Koziol
f40381b0ea [svn-r30285] Description:
More warning cleanups, bringing the build down to 25 unique types of
warnings, with 550 warnings in 122 files (down from 28, 770, and 134).

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial & parallel
    (h5committest forthcoming)
2016-08-13 04:23:53 -05:00
Neil Fortner
c365b9a59f [svn-r27593] Merge revisions 27453 through 27592 from trunk to vds branch.
Tested: ummon
2015-08-27 12:06:54 -05:00
Neil Fortner
32bf83f1cf [svn-r27546] Add tests for H5O__dset_bh_info (H5Oget_info) and unlimited selections in a
region reference.

Tested: ummon
2015-08-21 14:57:29 -05:00
Dana Robinson
ec5d13d65b [svn-r27460] Minor code cleanup in test/trefer.c
- Fixed an out-of-range char assignment.

- Added a couple of malloc() casts.

Tested on: jam (minor change, tests only)
2015-08-03 22:00:45 -05:00
Mohamad Chaarawi
fc45d5fcb0 [svn-r27133] - Add a new attribute function characterstic for format:
* H5_ATTR_FORMAT(X,Y,Z)  __attribute__((format(X, Y, Z)))
- Rename UNUSED attribute characterstic to H5_ATTR_UNUSED.
- Rename NORETURN attribute characterstic to H5_ATTR_NORETURN

tested with h5committest.
2015-06-01 14:38:09 -05:00
Larry Knox
63bd09ec8b [svn-r26389] Revision 26387 failed with configure option --with-default-api-version=v16.
Changed H5Dcreate() to H5Dcreate2 in test/trefer.c line 633.

Tested with h5committest and with --with-default-api-version=v16 on platypus.
2015-03-08 12:06:02 -05:00
Scot Breitenfeld
ca0a4d24b6 [svn-r26373] Fix for HDFFV-7959:
H5Rdereference should check for default (HADDR_UNDEF) value and not continue processing and return so that ret value can be checked and handled properly 

Tested: jam (gnu)
2015-03-05 16:42:42 -05:00
Mohamad Chaarawi
88fb6b1374 [svn-r25531] remove use of C99 PRI that failed on windows in dtypes.c
fix bugs where hid_t were assumed to be 32 bit ints or herr_t.
2014-08-11 14:13:45 -05:00
Quincey Koziol
33ea1ada24 [svn-r25496] Description:
Merge 64-bit ID changes from branch to trunk.  (Plus a few minor cleanups
that aren't on the branch)

Tested on:
    Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN
    (h5committested on branch already for a week)
2014-07-30 15:55:14 -05:00
Scot Breitenfeld
ee10548723 [svn-r24681] Description:
Fix for HDF5/HDFFV-8620 H5Rget_name with NULL name parameter fails.
The name parameter now excepts NULL, in which case the length of then
name is returned.


Tested: jam (intel and gnu)
2014-02-04 10:11:20 -05:00
Dana Robinson
e6cace9ee4 [svn-r24376] Updated all code to use HDmalloc, HDcalloc, and HDfree.
Prep work for adding a memory free function, part of HDFFV-8551.

Tested on:
    32-bit LE linux (jam) 
        * with C++, Fortran
        * with thread safety on

    These are minor changes (almost entirely renaming foo functions
    to HDfoo) that don't change functionality.  This should not
    require a full commit test.
2013-10-30 23:20:36 -05:00