Commit Graph

426 Commits

Author SHA1 Message Date
Jonathan Kim
3b7a375179 [svn-r19752] Purpose:
Fixed Bug# 1979 Output from h5ls -rdlS on nested compound datatypes is 
    difficult to parse.

Description:
    Update to add curly brackets for the nested compound members, when
    S (--simple) option is used with -l (--label), so user can tell 
    which members blong to which compound type.
    Merged from hdf5 trunk r19751.


Tested:
 jam (linux32-LE), amani (linux64-LE)
2010-11-09 16:32:26 -05:00
Allen Byrne
d65e4dbd7e [svn-r19287] Corrected name of file appearing in expected output.
(Missed edit from local test)
2010-08-24 08:48:15 -05:00
Allen Byrne
23da86c0dc [svn-r19280] Fix test scripts (Cmake needs to capture output yet)
linux script needed -R and double compare:

Tested: local linux
2010-08-23 17:28:52 -05:00
Quincey Koziol
525caddd9e [svn-r19254] Description:
Bring r19252 & 19253 from trunk to 1.8 branch:

   Bring Coverity changes from branch to trunk:


r19161:
Fixed the part for matching the subset info with dataset

r19189:
BZ1646: h5dump does not check number of dimensions for subsetting parameters against the dataset

Changed subset_t structure from holding hsize_t pointers to holding new subset_d pointers, which hold the original hsize_t pointer + len. this len is then checked against dataset ndims in the handle_dataset function of h5dump.

Changed all references to use new data structure.

Added tests for each subset parameter.

r19190:
Added new h5dump ddl files

Tested on:
    Mac OS X/32 10.6.4 (amazon) w/debug & production
    (h5committested on Coverity branch)
2010-08-19 16:16:28 -05:00
Allen Byrne
02b5824f57 [svn-r19198] [BZ1953]implementation for the proposed changes suggested by the "h5dump_output_option" RFC. This required that the region reference code be duplicated and reduced to allow the do_bin_output() function to understand region references. The container type-id also needed to be propagated into the do_bin_output() function and functions referenced (render_bin_output*).
Existing tests tested the binary function, so only one test was added to test the region reference generated file.
Tested: local linux
2010-08-09 12:15:06 -05:00
Quincey Koziol
ae32ba97fd [svn-r19182] Description:
Bring r19179 from trunk to 1.8 branch:

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-06 12:51:53 -05:00
Jonathan Kim
435f58c1b8 [svn-r19053] 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).
Merged from hdf5 trunk r19051

Tested:
 jam, amani, heiwa
2010-07-07 15:06:20 -05:00
Jonathan Kim
3aa2b25b99 [svn-r18946] Purpose:
Support follow symbolic links.

Description:
    Merged from hdf5 trunk r18943.
    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
2010-06-02 14:53:59 -05:00
Albert Cheng
fdaeddcdcd [svn-r18892] Improvment:
Revised the online help page of h5dump to explain the packed bits feature and
added an example too.

Tested: h5committest plus jam tested with --disable-h5dump-packedbits.
2010-05-25 15:29:36 -05:00
Albert Cheng
7144b18c76 [svn-r18826] Added packed bits tests on Compound and Array data types.
Tested: AlbertPax. Will do h5committest after check in.
2010-05-17 10:44:57 -05:00
Albert Cheng
174cc7b19e [svn-r18821] Packed bits codes tidy up. Removed codes that are not needed
any more. Changed algorithm of creating mask which now sits
at the least significant bits. Display data by down shift
first and then mask it for display. Changed the variable
names to reflect the new purpose better.

Tested: AlbertPax (linux)
2010-05-15 00:40:00 -05:00
Albert Cheng
5f2cf7e80c [svn-r18794] Enhancement 1853:
Install packed-bits feature for h5dump.

testfiles/packedbits.h5:
New HDF5 test data file. Generated by h5dump/h5dumpgentest.

testfiles/tpbitsLengthPositive.ddl:
testfiles/tpbitsMaxExceeded.ddl:
testfiles/tpbitsSigned.ddl:
testfiles/tpbitsOffsetNegative.ddl:
testfiles/tpbitsUnsigned.ddl:
testfiles/tpbitsMax.ddl:
testfiles/tpbitsIncomplete.ddl:
testfiles/tpbitsOverlapped.ddl:
testfiles/tpbitsLengthExceeded.ddl:
testfiles/tpbitsOffsetExceeded.ddl:
    Expected output files created to test various
    components of the packed-bits feature.

testfiles/tpackedbits2.ddl:
testfiles/tpackedbits.ddl:
    Previous output files no longer used.

Tested: albertPax (linux)
2010-05-13 15:49:31 -05:00
Albert Cheng
7c16aec7e1 [svn-r18743] enhancement 1853:
Install packed-bits feature for h5dump.

Allen has installed the feature in the NPOESS feature branch.
I ported it back to the v1.8 branch for v1.8.5 release.

tools/h5dump/testh5dump.sh.in:
    Added tests for the packed-bits feature.
tools/h5dump/h5dump.c
tools/h5dump/h5dump.h
    Added code to parse and handled the packed-bits request.
tools/lib/h5tools.h
tools/lib/h5tools_str.c
tools/lib/h5tools.c
    Added code to print packed-bits.
tools/testfiles/tpackedbits2.ddl
tools/testfiles/tnofilename-with-packed-bits.ddl
tools/testfiles/tpackedbits.ddl
    Expected output files for packed-bits feature.

Tested:
    h5committested the NPOESS branch.
    Tested in the linux VM machine in my Dove.
2010-05-07 15:56:54 -05:00
Allen Byrne
c44c9feb35 [svn-r17493] Bring changes from trunk to tools lib, h5dump and error handling.
Tested: h5committest, local linux
2009-09-17 15:37:09 -05:00
Allen Byrne
1cbd7b4fd7 [svn-r17290] 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:51 -05:00
Raymond Lu
75800cf6b5 [svn-r17176] In H5Odtype.c, the decoding function used to mark the datatype as on disk. 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 10:39:05 -05:00
Allen Byrne
c75dd8fadc [svn-r17078] Implemented nowrap option (Bug 811) equivalent to h5ls tool. Also updated usage output.
Tested: linux
2009-06-17 13:49:51 -05:00
Allen Byrne
d623d950b6 [svn-r16668] Corrected the urls for h5dump xml dtd and schema
Tested: Fedora 10 gcc
2009-04-03 16:50:53 -05:00
Pedro Vicente Nunes
443e8cdafb [svn-r16520] one file escape deletion from previous check in 2009-02-26 16:33:15 -05:00
Pedro Vicente Nunes
086c205ca4 [svn-r16519] merge 16518 from trunk
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: jam, linew
2009-02-26 16:25:57 -05:00
Pedro Vicente Nunes
98d4ba5d8a [svn-r16310] merge 16299
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-14 10:58:16 -05:00
Pedro Vicente Nunes
f08f9340a7 [svn-r15969]
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: windows, linux
2008-10-27 15:06:28 -05:00
Neil Fortner
b195e33d3f [svn-r15887] 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:54:19 -05:00
Pedro Vicente Nunes
3b451f709a [svn-r15817] move h5jam testfiles to its own testfiles folder
tested: linux
2008-10-08 11:13:38 -05:00
Neil Fortner
d0ae398d95 [svn-r15805] 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:55:32 -05:00
Pedro Vicente Nunes
313d2cc82c [svn-r15759] move h5copy testfiles to /tools/h5copy/testfiles
tested: linux
2008-10-02 15:39:04 -05:00
Pedro Vicente Nunes
bb206d572c [svn-r15750] move h5repack test files to /tools/h5repack/testfiles
tested: linux
2008-10-01 15:04:33 -05:00
Pedro Vicente Nunes
e43c4a5a38 [svn-r15745] Move h5diff testfiles to /tools/h5diff/testfiles
Tested: linux
2008-10-01 14:07:55 -05:00
Pedro Vicente Nunes
0cd5c3edb2 [svn-r15720] Added a file with user block data to be used by the h5repack windows shell script only Note: for the unix shell script this file is not used 2008-09-29 13:11:39 -05:00
Neil Fortner
531822d443 [svn-r15672] Add missing test file, re-add it to the manifest (sorry).
Tested: kagiso
2008-09-21 23:54:38 -05:00
Neil Fortner
13f5dbc05d [svn-r15669] 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:36:09 -05:00
Neil Fortner
f040f990a0 [svn-r15459] 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.  Resolves bz#1236, 1266.  Test files with incorrect datatype versions
corrected.

Tested: kagiso, smirom, linew (h5committest)
2008-08-11 10:18:54 -05:00
Pedro Vicente Nunes
c827f0450c [svn-r15447]
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:35:42 -05:00
Pedro Vicente Nunes
e46107ca75 [svn-r15433] http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=1170
Summary: when using h5diff to compare the results of h5repack (or other tools that copy one HDF5 file to another), a new option is needed to allow h5diff to make an "absolute" comparison of the 2 files. This is the "contents" mode explained in the usage below.


If this mode is present, objects in both files must match (must be exactly the same). If this does not happen, the tool returns an error code of 1 (instead of the success code of 0)


Changes to the h5repack test script: the call to h5diff was changed to include -c (maintaining the previous -q). 


tested: windows, linux
2008-08-05 14:35:46 -05:00
Pedro Vicente Nunes
1229fc7886 [svn-r15151]
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 14:26:35 -05:00
Albert Cheng
018ba9a701 [svn-r15136] 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-04 12:14:23 -05:00
Quincey Koziol
6e196a7b66 [svn-r15134] Description:
Brought revision 15133 back from trunk:

        Fixed bug in h5ls that prevented relative group listings (like
    "h5ls foo.h5/bar") from working correctly.

Tested on:
    Mac OS X/32 10.5.3 (amazon)
2008-06-03 19:25:29 -05:00
Pedro Vicente Nunes
20c6bdda65 [svn-r14978] 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 15:20:00 -05:00
Pedro Vicente Nunes
eb9ba954a5 [svn-r14948] 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-06 15:08:11 -05:00
Pedro Vicente Nunes
bee6951ac6 [svn-r14906] 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:46:58 -05:00
Pedro Vicente Nunes
b2a2c17c44 [svn-r14895] 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 14:15:53 -05:00
Pedro Vicente Nunes
59f29fa02f [svn-r14802] 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-07 10:53:35 -05:00
Quincey Koziol
a233b8a08d [svn-r14691] Description:
Handle comparing datasets & attributes w/variable-length strings properly.

Tested on:
    Linux/64 2.6.9 (chicago)
2008-02-28 09:53:38 -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