Commit Graph

14 Commits

Author SHA1 Message Date
Constantine Khrulev
bb45db457e Add regression tests modifying attributes 2^16 times
This commit adds three new tests:

- a test documenting the limitation originally reported in #350 (in
  general modifying an attribute about 2^16 times makes it impossible
  to modify this file in ways requiring nc_redef() and nc_enddef() calls).
- a test ensuring that a scalar attribute can be modified 2^16 times
  as long as its type and size remain the same
- a test ensuring that a text attribute can be modified 2^16 times as
  long as its size remains the same

This version uses the nc_redef(), nc_put_att_...(), nc_enddef()
sequence. One could also use nc_open(), nc_put_att_...(), nc_close()
but that would make these tests significantly slower.
2019-11-13 10:08:31 -09:00
Ward Fisher
462ec93913 Whew! Updated copyright stanza in nc_test4. 2018-12-06 15:27:32 -07:00
Wei-keng Liao
116f303182 correct error code for operation not allowed in data mode is NC_ENOTINDEFINE 2018-08-24 21:26:25 -05:00
Ed Hartnett
3a08d85e13 clean up 2018-07-12 07:08:27 -06:00
Ed Hartnett
786c5a8f2e moved hdf5 specific header stuff to hdf5internal.h 2018-07-12 07:05:21 -06:00
Dennis Heimbigner
25f062528b This completes (for now) the refactoring of libsrc4.
The file docs/indexing.dox tries to provide design
information for the refactoring.

The primary change is to replace all walking of linked
lists with the use of the NCindex data structure.
Ncindex is a combination of a hash table (for name-based
lookup) and a vector (for walking the elements in the index).
Additionally, global vectors are added to NC_HDF5_FILE_INFO_T
to support direct mapping of an e.g. dimid to the NC_DIM_INFO_T
object. These global vectors exist for dimensions, types, and groups
because they have globally unique id numbers.

WARNING:
1. since libsrc4 and libsrchdf4 share code, there are also
   changes in libsrchdf4.
2. Any outstanding pull requests that change libsrc4 or libhdf4
   are likely to cause conflicts with this code.
3. The original reason for doing this was for performance improvements,
   but as noted elsewhere, this may not be significant because
   the meta-data read performance apparently is being dominated
   by the hdf5 library because we do bulk meta-data reading rather
   than lazy reading.
2018-03-16 11:46:18 -06:00
Ward Fisher
8e169175e4
Merge branch 'master' into newhash0.dmh 2018-02-22 14:55:31 -07:00
Ed Hartnett
70d815b6c8 pulled in some attribute testing that got missed in recent merges 2018-02-12 08:33:20 -07:00
Dennis Heimbigner
727b613459 This is the initial step in moving to the new higher performance
(I hope) metadata mechanism. This mostly just adds new pieces of
code (e.g. nclistmap) and does some minor fixes.

It should be transparent to everything else.
The next set of changes will be the big step.
2018-02-08 19:53:40 -07:00
Ward Fisher
5107655682 Accomodate Visual Studio 2018-02-06 13:32:30 -06:00
Ed Hartnett
7c936a7bb6 brought in changes from ejh_att 2018-01-31 08:44:33 -07:00
Ward Fisher
1c11fc5d59 More refactoring, pushing to avoid accidental loss. 2016-10-21 19:24:40 +00:00
Ed Hartnett
965a3aac70 minor refactor of the build system to work better for cross-compiling 2011-03-15 10:19:08 +00:00
Ed Hartnett
0b54b49991 moved some tests which used v2 API from libsrc4 to nc_test4, to allow the library to be built before the tests 2010-06-15 15:24:28 +00:00