Commit Graph

425 Commits

Author SHA1 Message Date
Quincey Koziol
0de252524d [svn-r19179] Description:
Bring changes from Coverity branch back to trunk:

r19079 & 19080:
[BZ1942]  h5dump -u to generate XML, it does not respect the -m option

xml version of dump_data function didn't check for use of fp_format variable.

Added new test expected file for committed bug 1942

r19103, 19104 & 19105:
[BZ1821] h5repack -v did not display correct output for a selected compression. Needed new test for comparing output of -v option.

Added new test file for solution to BZ1821

BZ1821 - Bring test changes from the shell script actually used.

Tested on:
    Mac OS X/32 10.6.4 (amazon) debug & production
    (h5committested on branch)
2010-08-05 18:19:01 -05:00
Jonathan Kim
af749bafb7 [svn-r19051] Purpose:
Add --no-dangling-links option to h5ls. 

Description:
Related to "Bug 1830 - Following an dangling external link in h5ls should set non-zero return code."
If --no-dangling-links option is specified and any dangling link is found, return exit code 1 (error).

Tested:
 jam, amani and heiwa
2010-07-07 13:52:04 -05:00
Jonathan Kim
1a02e37f16 [svn-r18943] Purpose:
Support follow symbolic links.

Description:
    Add '--follow-symlinks' option to follow symbolic links (soft and external).
    Update help page according to RM.
    Remove some warning messages from compiler.

Tested:
    jam, amani and linew
2010-06-02 10:13:13 -05:00
Quincey Koziol
674c2def44 [svn-r17899] Description:
*sigh* Bring along another updated file after recent object header
message info update.

Tested on:
        FreeBSD/32 6.3 (duty) in debug mode
        FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
                w/C++ & FORTRAN, w/threadsafe, in debug mode
        Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
                w/C++ & FORTRAN, in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                w/szip filter, in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                in production mode
        Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
        Mac OS X/32 10.6.2 (amazon) in debug mode
        Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
                in production mode
2009-11-16 22:04:12 -05:00
Quincey Koziol
37ec6dc75e [svn-r17582] Description:
Bring changes from file free space branch back to the trunk.  *yay!*

Tested on:
        FreeBSD/32 6.3 (duty) in debug mode
        FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
                w/C++ & FORTRAN, w/threadsafe, in debug mode
        Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
                w/C++ & FORTRAN, in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                w/szip filter, in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                in production mode
        Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
        Mac OS X/32 10.5.8 (amazon) in debug mode
        Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe,
                in production mode
2009-10-01 21:08:59 -05:00
Allen Byrne
43db823044 [svn-r17475] Added error handling to h5dump and region reference handling functions in the tools lib. Bring back from NPOESS. Added missing tests to h5dump test script for region references.
Tested:   local linux
2009-09-14 14:52:42 -05:00
Allen Byrne
c7590ca38e [svn-r17450] Bring h5dump single subsetting selection and region reference changes from NPOESS
Tested: local linux smirom
2009-09-04 09:50:13 -05:00
Allen Byrne
2b3b747d4c [svn-r17289] Added test targeted for bug 1520, which was fixed last week. The test generates an array datatype of ints larger than the display buffer. The bug was exposed when the buffer was reallocated.
Tested: linux
2009-07-31 15:11:07 -05:00
Raymond Lu
8a56b4d081 [svn-r17177] In H5Odtype.c, the decoding function used to mark the datatype as on disk (see bug
#1585).  I changed it to undefined and let the caller functions decide the location 
of the datatype.  For H5Tdecode, it should mark the datatype as in memory.  For other 
callers like H5Dopen or H5Aopen, they should makr it as on disk.

Tested it on jam, smirom, linew.
2009-07-13 11:26:24 -05:00
Allen Byrne
2a876ea086 [svn-r17075] Implemented nowrap option (Bug 811) equivalent to h5ls tool. Also updated usage output.
Tested: linux
2009-06-17 13:25:34 -05:00
Allen Byrne
24160340ce [svn-r16669] Corrected the urls for h5dump xml dtd and schema
Tested: Fedora 10 gcc
2009-04-03 16:53:22 -05:00
Pedro Vicente Nunes
972a1bba5d [svn-r16629] removed a h5dump test (array type) that has a different bogus output in frebsd (liberty)
removed  the call to the file generation in the test generation program
removed the binary h5 and ddl from svn

tested: linux
2009-03-30 16:47:29 -05:00
Pedro Vicente Nunes
bd1fe8cd74 [svn-r16614] 3. #1501 (B1) tools bug if dataset is larger than H5TOOLS_BUFSIZE limit.
ISSUE : the tools use the following formula to read by hyperslabs: hyperslab_size[i] = MIN( dim_size[i], H5TOOLS_BUFSIZE / datum_size) where H5TOOLS_BUFSIZE is a constant defined of 1024K. This is OK as long as the datum_size does not exceed 1024K, otherwise we have a hyperslab size of 0 (since 1024K/(greater than 1024K) = 0). This affects h5dump. h5repack, h5diff
SOLUTION: add a check for a 0 size and define as 1 if so. 
TEST FOR H5DUMP: Defined a case in the h5dump test generator program of such a type (an array type of doubles with a large array dimension, that was the case the user reported).  Since the written file commited in svn would be around 1024K, opted for not writing the data (the part of the code where the hyperslab is defined is executed, since h5dump always reads the files). Defined a macro WRITE_ARRAY to enable such writing if needed. Added a run on the h5dump shell script. Added 2 new files to svn: tools/testfiles/tarray8.ddl, tools/testfiles/tarray8.h5. NOTE: while doing this I thought of adding this dataset case to an existing file, but that would add the large array output to those files (the ddls). The issue is that the file list is increasing.
TEST FOR H5DIFF: for h5diff the check for reading by hyperslabs is H5TOOLS_MALLOCSIZE (128 * H5TOOLS_BUFSIZE) or 128 Mb. This makes it not possible to add such a file to svn, so used the same method as h5dump (only write the dataset if WRITE_ARRAY is defined). As opposed to h5dump, the hyperslab code is NOT executed when the dataset is empty (dataset is not read). Added the new dataset to existing files and shell run (tools/h5diff/testfiles/h5diff_dset1.h5 and tools/h5diff/testfiles/h5diff_dset2.h5 and output in tools/h5diff/testfiles/h5diff_80.txt).
TEST FOR H5REPACK: similar issue as h5diff with the difference that the hyperslab code is run. Added a run to the shell script (with a filter, otherwise the code uses H5Ocopy). 

tested: linux (h5commitest failed , apparently it did not detect the code changes in /tools/lib that fix the bug: the error in an assertion in the hyperslab of 0. I am sure that making h5ccomitest --distclean will detect the new code , but don't want to wait more 3 hours :-) )
2009-03-25 15:28:50 -05:00
Pedro Vicente Nunes
f8c5384aa5 [svn-r16518] have 2 expected outputs for 2 h5ls runs depending if run on a big or little endian machine. Configure.in was modified to export a variable carrying endianess information to testh5ls.sh. This script then compares the current run with 2 expected outputs, one for a big-endian machine (linew was used to generate the output), other for little endian (jam was used to generate the output)
the way h5ls prints types, it starts searching for NATIVE types first. One solution would be h5ls not to detect these native types, using for example the same print datatype function that h5dump does, that would make the output look the same on all platforms  ("32-bit little-endian integer" would be printed instead).  Drawback, this "native" information would not be available. Other solution is to have not one but 2 expected outputs and make the shell script detect the endianess and compare with one output or other
tested: h5committest
2009-02-26 15:21:50 -05:00
Neil Fortner
5a9903cdde [svn-r16377] Revert unintentional change to tfamily00000.h5 2009-01-29 15:51:25 -05:00
Neil Fortner
ec61416324 [svn-r16376] Purpose: Fix a bug encountered when copying shared messages
Description: When attempting to copy an object with a message shared in its own
object header, the library attempts to protect the same object header twice.
Previously, it was possible for the object header to be protected with write
access in one or both of these protects, which would be illegal.  The library
should now always protect with read only access in this case.  The conditions
for fixing incorrect datatype versions have been made weaker to support this
change.  The version will only be corrected if the object header the datatype
is in is modified.

Tested: jam, smirom (h5committest)
2009-01-29 15:43:16 -05:00
Pedro Vicente Nunes
050ded21d3 [svn-r16299] Print a message of
Storage:   information not available
When displaying storage information for VL and dataset region types
Added 2 shell runs that display this information
#818

Tested: windows, linux
2009-01-13 10:37:37 -05:00
Pedro Vicente Nunes
8f00f520ff [svn-r15991] Merge with 1.8 rev 15969
Introduced a new feature in the tools library regarding command line parsing
In the definition of arguments, an "*" means that the switch can or can not have an optional argument. This "*" is put in the code regarding the letter definition, and it is transparent to the user (e.g b* instead of the previous b: ), where ":" notes a required argument after the letter (and no ":" or "*" notes no argument, mandatory)
Used for the h5dump binary option -b
It can be now
1)	-b (defaults to NATIVE)
2)	- b NATIVE
3)	- b FILE
4)	-b LE
5)	-b BE
Note: the keyword NATIVE replaces MEMORY
This feature (-b with no argument) was tested with the sequence of h5dump to binary (NATIVE) then h5import to generate an HDF5 file from the binary file and h5diff to compare the 2 HDF5 files
Tested: linux
2008-10-29 15:11:51 -05:00
Neil Fortner
ad28fa5b0c [svn-r15886] Purpose: Close bug 1332
Description: Improved external link traversal of h5dump.  h5dump will now
    properly avoid all cycles, even those spanning multiple files.  Improvement
    to the output of committed datatypes.  Committed datatypes are now checked
    for uniqueness (like other objects).  Tests added for these cases.

Tested: kagiso, linew, smirom (h5committest)
2008-10-15 22:52:16 -05:00
Neil Fortner
698a6d8845 [svn-r15804] Purpose: Add option to h5ls to enable external link traversal.
Description: Added -E option to h5ls.  When set, this alows h5ls to enter
external files (currently only through an external link).  The -r option by
itself will no longer allow h5ls to traverse external links.

Tested: kagiso, linew, smirom (h5committest)
2008-10-07 09:54:26 -05:00
Neil Fortner
6d28e06f30 [svn-r15668] Purpose: Add feature requested in bug #1282
Description: Adds capability to h5ls to traverse external links when the -r
(recursive) option is given.  Changes to the way absolute path names are patched
in h5trav.c.  Changes to the way recursive traversal starting from a non-root
group is handled (which also fixes some preexisting issues).  Tests added for
these cases.

Tested: kagiso, smirom, linew (h5committest)
2008-09-21 13:35:43 -05:00
Neil Fortner
4f61812180 [svn-r15458] Purpose: Modify the library to take the proper action when files with incorrect
datatype versions are encountered.

Description: The library now recognizes some problems with datatype versions in
H5O_decode_helper(), and, if not performing strict format checks, automatically
corrects them.  Framework added for other message decode routines to
automatically correct file errors.  Datatype version information added to
h5debug.

Tested: kagiso, smirom, linew (h5committest)
2008-08-11 10:16:34 -05:00
Pedro Vicente Nunes
a5de140500 [svn-r15446] bug fix
http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=788
don't print array indices for regions

tested: windows, linux
2008-08-07 10:15:04 -05:00
Pedro Vicente Nunes
5bf91156a7 [svn-r15315] remove h5jam files 2008-07-03 08:37:46 -05:00
Pedro Vicente Nunes
89bb6df86e [svn-r15314] moved h5jam test files to tools/h5jam/testfiles
tested: linux
2008-07-03 08:32:39 -05:00
Pedro Vicente Nunes
efc8bb49b3 [svn-r15251] Moved all h5copy testfiles from /tools/testfiles to tools/h5copy/testfiles
tested: linux
2008-06-20 10:44:45 -05:00
Pedro Vicente Nunes
91a0ec7b08 [svn-r15247] Moved all h5repack testfiles from /tools/testfiles to tools/h5repack/testfiles
tested: linux
2008-06-20 09:17:16 -05:00
Pedro Vicente Nunes
83ddc834f4 [svn-r15238]
Moved all h5diff testfiles from /tools/testfiles to tools/h5diff/testfiles

Tested: linux, solaris
2008-06-19 10:34:12 -05:00
Pedro Vicente Nunes
fb81baa62c [svn-r15222] moved the h52jpeg testfiles location from /tools/testfiles to /tools/h52jpeg/testfiles
updated the shell script accordingly

tested: linux
2008-06-16 21:01:24 -05:00
Pedro Vicente Nunes
0df34ad232 [svn-r15219] added a test file and a test script
for now, the test script just calls the tool binary with the command line parameters, with no special
checking of the accuracy of the output contents (jpeg files)

tested: linux
2008-06-16 15:28:52 -05:00
Pedro Vicente Nunes
671d37e6c5 [svn-r15143]
Fix for #1169
http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=1169

don't print attributes to stdout when doing binary output
added an attribute to the file run on the binary output test

tested: windows, linux
2008-06-05 09:37:21 -05:00
Quincey Koziol
b75540244f [svn-r15133] Description:
Fixed bug in h5ls that prevented relative group listings (like
"h5ls foo.h5/bar") from working correctly.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.5.3 (amazon) in debug mode
        Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2008-06-03 19:17:27 -05:00
Albert Cheng
fc7aea6f7f [svn-r15124] Purpose:
bug fixes.

Description:
Added code to create an empty hdf5 (named h5diff_empty.h5) in order to test
if h5diff compares correctly an empty hdf5 vs. a non-empty one.

Tested:
Tested in kagiso of h5diffgentest itself.
Verified by h5dump that h5diff_empty.h5 was indeed empty.
Then "h5diff h5diff_empty.h5 h5diff_basic1.h5" returned 0 (should have
returned non-zero).
2008-06-02 12:47:30 -05:00
Pedro Vicente Nunes
ed8882c52d [svn-r14976] Support for external links follow up. The format is to print the target object as part of TARGETPATH, noted with some extra indentation
The previous printing of 
LINKCLASS 64
was removed

HDF5 "textlinksrc.h5" {
GROUP "/" {
   EXTERNAL_LINK "ext_link1" {
      TARGETFILE "textlinktar.h5"
      TARGETPATH "dset"
         DATASET "dset" {
            DATATYPE  H5T_STD_I32LE
            DATASPACE  SIMPLE { ( 6 ) / ( 6 ) }
            DATA {
            (0): 1, 2, 3, 4, 5, 6
            }
         }
   }
}
}

There is no script test for this behavior so far, because test script uses complete paths that vary from test to test, making not possible to define a valid TARGETFILE in the file

tested: windows, linux, solaris
2008-05-12 14:32:13 -05:00
Pedro Vicente Nunes
5fffde0c1c [svn-r14935] correct an error in the usage text
tested: windows, linux, solaris
2008-05-05 15:31:21 -05:00
Pedro Vicente Nunes
26d880217b [svn-r14934] Add a test for the floating point user defined printf format
Usage is 

-m T, --format=T

Where T - is a string containing the floating point format, e.g '%.3f'

The test consists of writing a number with 7 fractional digits (default precision display of %f is 6 digits) and have the 7 digits displayed with 

-m %.7f fpformat.h5

Tested: windows, linux, solaris

Note: the output file was generated in linux, it may be possible that platforms other than the ones tested have a different representation of the number
2008-05-05 15:06:22 -05:00
Pedro Vicente Nunes
7a5edc075a [svn-r14905] Introduced a ratio formula compression ratio = uncompressed size / compressed size
in the printing of the compression with 3 digits of precision per hdf-forum NASA developers suggestion

tested: windows, linux, solaris
2008-05-01 11:45:32 -05:00
Scot Breitenfeld
aec106e324 [svn-r14903] Undoing change committed in r14902. 2008-04-30 14:51:13 -05:00
Scot Breitenfeld
5773fd34bc [svn-r14902] Merged fortran_1_8 branch changes r14505:14901 into the trunk. New fortran wrappers added. 2008-04-30 14:23:26 -05:00
Pedro Vicente Nunes
6b41367ac6 [svn-r14892] RFC display compression ratio in h5dump
Here's the current behavior of h5dump regarding the printing of the dataset creation property list

For example

./h5dump -H -p -d filters

HDF5 "tfilters.h5" {
DATASET "deflate" {
   DATATYPE  H5T_STD_I32LE
   DATASPACE  SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
   STORAGE_LAYOUT {
      CHUNKED ( 10, 5 )
      SIZE 385 
    }
   FILTERS {
      COMPRESSION DEFLATE { LEVEL 9 }
   }
   FILLVALUE {
      FILL_TIME H5D_FILL_TIME_IFSET
      VALUE  0
   }
   ALLOCATION_TIME {
      H5D_ALLOC_TIME_INCR
   }
}
}


The proposed behavior is to add this information after SIZE

SIZE 385 (51.9%COMPRESSION)

That percentage is obtained trough

Per = (b-a) / a

Where a = theoretical size obtained by multiplying datum size times number of elements
b =  size obtained with H5Dget_storage_size

The final print would look like

HDF5 "tfilters.h5" {
DATASET "deflate" {
   DATATYPE  H5T_STD_I32LE
   DATASPACE  SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
   STORAGE_LAYOUT {
      CHUNKED ( 10, 5 )
      SIZE 385 (51.9%COMPRESSION)
    }
   FILTERS {
      COMPRESSION DEFLATE { LEVEL 9 }
   }
   FILLVALUE {
      FILL_TIME H5D_FILL_TIME_IFSET
      VALUE  0
   }
   ALLOCATION_TIME {
      H5D_ALLOC_TIME_INCR
   }
}
}

tested: windows, linux, solaris
2008-04-29 13:02:05 -05:00
Pedro Vicente Nunes
c83dbd9c18 [svn-r14792] bug fix: #1106 h5dump -b will dump ASCII values for datasets after the first one. One variable that controls the binary output was incorrectly reset to zero after a binary output was done a first time. The effect was that on cases of several datasets, the ones after the first were not binary written. Eliminated the resetting of that variable and tested a file with several datasets. Modified the test file so that it is easier to test with the tool binread, that reads the binary output of h5dump.
tested: windows, linux
2008-04-03 16:07:27 -05:00
Quincey Koziol
66fa79b423 [svn-r14690] Description:
Handle comparing datasets & attributes w/variable-length strings properly.

Tested on:
    Linux/64 2.6.9 (chicago)
2008-02-28 09:49:48 -05:00
Pedro Vicente Nunes
8005df6417 [svn-r14437] bug fix for h5dump subsetting (deal with blocks)and new test runs
add a check for block overlap after the command line parsing

* Algorithm
 *
 * In a inner loop, the parameters from SSET are translated into temporary 
 * variables so that 1 row is printed at a time (getting the coordinate indices 
 * at each row).
 * We define the stride, count and block to be 1 in the row dimension to achieve 
 * this and advance until all points are printed. 
 * An outer loop for cases where dimensionality is greater than 2D is made. 
 * In each iteration, the 2D block is displayed in the inner loop. The remaining 
 * slower dimensions above the first 2 are incremented one at a time in the outer loop
 *
 * The element position is obtained from the matrix according to:
 *       Given an index I(z,y,x) its position from the beginning of an array 
 *       of sizes A(size_z, size_y,size_x) is given by
 *       Position of I(z,y,x) = index_z * size_y * size_x 
 *                             + index_y * size_x
 *                             + index_x
 * 

tested: windows, linux
2008-01-16 11:12:08 -05:00
Pedro Vicente Nunes
be4ca1f67e [svn-r14414] revert the subsetting calls of h5dump to 1 size block, still a bug with size > 1
tested: linux
2008-01-14 19:18:29 -05:00
Pedro Vicente Nunes
a6605796b3 [svn-r14412] more progress on the block hyperslab bug, clean code
modified the 3D test case for subsetting with block and stride factors

tested: windows, linux
2008-01-14 16:57:19 -05:00
Pedro Vicente Nunes
1c3e5859d1 [svn-r14411] more progress on the block hyperslab bug, clean code
modified the 2D test case for subsetting with block and stride factors


tested: windows, linux
2008-01-14 16:29:09 -05:00
Pedro Vicente Nunes
b8b215b34a [svn-r14409] more progress on the block hyperslab bug, clean code
modified the 1D test case for subsetting with block and stride factors

tested: windows, linux
2008-01-14 16:08:55 -05:00
Pedro Vicente Nunes
7e80ad2af2 [svn-r14384] new file with output regarding the new binary file 2008-01-08 16:09:19 -05:00
Pedro Vicente Nunes
91b0b68167 [svn-r14383] new binary file: with double dataset with NaN values 2008-01-08 16:01:51 -05:00
Quincey Koziol
6878261a43 [svn-r14353] Description:
- Add hash value for skip list string types, to reduce # of string
        comparisons.
    - Fixed bug with metadata/small data block aggregator adding size == 0
        block into file free space list.
    - Refactored metadata/small data block aggregator code into single set of
        common routines.
    - Changed block aggregator code to be smarter about releasing space in the
        'other' block when the 'other' block has aggregated enough data.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
        Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-12-20 15:36:08 -05:00