Commit Graph

404 Commits

Author SHA1 Message Date
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
Pedro Vicente Nunes
d3c3b4138a [svn-r14339] bug fix: aligned a line in usage that was not aligned
tested: linux
2007-12-12 13:27:26 -05:00
Pedro Vicente Nunes
c15315539b [svn-r14324] bug fix: #786 (E3) h5dump refers to the user block as "boot block"
replaced usage message  with "super block"

tested: linux
2007-12-06 11:25:51 -05:00
Quincey Koziol
2f36ea99d4 [svn-r14284] Description:
Add H5Lvisit_by_name() API routine to library.

	Eliminated all (five!) other group traversal routines and changed them
all to use the new API routine.

	Cleaned up output of h5ls & h5stat:
		- Issue error when requesting recursive traversal of a file
			with the "group info" flag, but no group given
		- Print info about root group in all(?) appropriate situations
		- Don't print "verbose" information about root group until the
			root group is in the list of objects to display
	(mostly because h5ls & h5stat had a different twist on traversing the
groups in a file that the other utilities)

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-11-24 11:49:36 -05:00
Pedro Vicente Nunes
39f23efa17 [svn-r14273] new feature: added some long options to the tests
tested: linux
2007-11-20 11:07:40 -05:00
Pedro Vicente Nunes
78898b38c0 [svn-r14267] enhancement: formatted h5diff usage
tested: linux
2007-11-19 14:38:34 -05:00
Pedro Vicente Nunes
f0e99ad5d0 [svn-r14266] enhancement: format usage message
tested: linux
2007-11-19 13:46:59 -05:00
Pedro Vicente Nunes
d3507c4a5a [svn-r14264] new features: 1) new usage for h5diff " A la" h5dump format
2) new usage for h5repack and new command line parsing using the tools library parsing code

tested: windows, linux, solaris
2007-11-16 15:15:19 -05:00
Pedro Vicente Nunes
5c16c09f91 [svn-r14259] New feature: removed one test and file from the h5diff shell script that prints an error
message that has an absolute path (invalid option), thus not suitable for the multi platform test
2007-11-13 16:49:07 -05:00
Pedro Vicente Nunes
1a3c5f6aeb [svn-r14258] new feature: make h5diff use the same command line parsing code and syntax than h5dump
usage is now 
h5diff  [OPTIONS]  file1 file2  [obj1[obj2]]

tested: windows, linux, solaris
2007-11-13 16:40:23 -05:00
Pedro Vicente Nunes
aaddd739b4 [svn-r14216] add a -V version information for h5diff
tested: windows, linux
2007-10-22 16:02:40 -05:00
Pedro Vicente Nunes
8e4bcb5fee [svn-r14201] attribute ordering: added objects that do not have creation order tracked
current behavior is
if DCPL has creation order tracked for attributes  then sort the attributes  by creation order otherwise by name
regarding sort order (ascending or descending) it is done in whatever is requested

tested: linux
2007-10-11 14:42:30 -05:00
Pedro Vicente Nunes
e387120f94 [svn-r14200] added tests for XML output of attribute iteration orders (same calls as DDL )
tested: linux
2007-10-11 13:47:55 -05:00
Pedro Vicente Nunes
29fef95eb5 [svn-r14190]
Bug fixes
Avoid passing iteration flags on the dump_group function parameters but instead inspect the groups's property list just before calling H5Literate and H5Aiterate, in this later case checking the creation order flags with H5Pget_attr_creation_order

Tested: windows, linux
2007-10-06 09:54:02 -05:00
Pedro Vicente Nunes
59b7b09846 [svn-r14188] added a named datatype with attributes to the h5 file that shows attributes with several iteration orders
tested: windows, linux
2007-10-05 09:53:24 -05:00
Pedro Vicente Nunes
041de441c5 [svn-r14186] Added support for displaying several iteration orders on group and named datatype attributes
tested: windows, linux
2007-10-04 15:44:07 -05:00
Pedro Vicente Nunes
3026ace6ae [svn-r14182]
Added support for displaying several iteration orders on dataset attributes, 4 new tests in test script (name ascending, name descending, creation_order ascending, creation_order descending)
New h5 file is made on the generator program

Tested: windows, linux
2007-10-04 11:21:30 -05:00
Quincey Koziol
59b51a2ea7 [svn-r14180] Description:
Make H5Aiterate() versioned and change all internal use to H5Aiterate2()
	
	Leave some regression tests that exercise H5Aiterate1()

	Fix attribute display in h5dump & h5ls to be "by name" by default

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 2.6 (smirom) 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
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-04 10:06:28 -05:00
Pedro Vicente Nunes
fa94f16ad8 [svn-r14174] new h5dump usage to include -q and -z
tested: windows, linux, solaris 5.10

usage: h5dump [OPTIONS] file
  OPTIONS
     -h, --help           Print a usage message and exit
     -n, --contents       Print a list of the file contents and exit
     -B, --bootblock      Print the content of the boot block
     -H, --header         Print the header only; no data is displayed
     -A, --onlyattr       Print the header and value of attributes
     -i, --object-ids     Print the object ids
     -r, --string         Print 1-byte integer datasets as ASCII
     -e, --escape         Escape non printing characters
     -V, --version        Print version number and exit
     -a P, --attribute=P  Print the specified attribute
     -d P, --dataset=P    Print the specified dataset
     -y, --noindex        Do not print array indices with the data
     -p,   --properties   Print dataset filters, storage layout and fill value
     -f D, --filedriver=D Specify which driver to open the file with
     -g P, --group=P      Print the specified group and all members
     -l P, --soft-link=P  Print the value(s) of the specified soft link
     -o F, --output=F     Output raw data into file F
     -b B, --binary=B     Binary file output, of form B
     -t P, --datatype=P   Print the specified named datatype
     -w N, --width=N      Set the number of columns of output
     -q Q, --sort_by=Q    Sort groups and attributes by index Q
     -z Z, --sort_order=Z Sort groups and attributes by order Z
     -x, --xml            Output in XML using Schema
     -u, --use-dtd        Output in XML using DTD
     -D U, --xml-dtd=U    Use the DTD or schema at U
     -X S, --xml-ns=S      (XML Schema) Use qualified names n the XML
                          ":": no namespace, default: "hdf5:"
                          E.g., to dump a file called `-f', use h5dump -- -f

 Subsetting is available by using the following options with a dataset
 attribute. Subsetting is done by selecting a hyperslab from the data.
 Thus, the options mirror those for performing a hyperslab selection.
 The START and COUNT parameters are mandatory if you do subsetting.
 The STRIDE and BLOCK parameters are optional and will default to 1 in
 each dimension.

      -s L, --start=L     Offset of start of subsetting selection
      -S L, --stride=L    Hyperslab stride
      -c L, --count=L     Number of blocks to include in selection
      -k L, --block=L     Size of block in hyperslab

  D - is the file driver to use in opening the file. Acceptable values
        are "sec2", "family", "split", "multi", "direct", and "stream". Without
        the file driver flag, the file will be opened with each driver in
        turn and in the order specified above until one driver succeeds
        in opening the file.
  F - is a filename.
  P - is the full path from the root group to the object.
  N - is an integer greater than 1.
  L - is a list of integers the number of which are equal to the
        number of dimensions in the dataspace being queried
  U - is a URI reference (as defined in [IETF RFC 2396],
        updated by [IETF RFC 2732])
  B - is the form of binary output: MEMORY for a memory type, FILE for the
        file type, LE or BE for pre-existing little or big endian types.
        Must be used with -o (output file) and it is recommended that
        -d (dataset) is used
  Q - is the sort index type. It can be "creation_order" or "name" (default)
  Z - is the sort order type. It can be "descending" or "ascending" (default)

  Examples:

  1) Attribute foo of the group /bar_none in file quux.h5

        h5dump -a /bar_none/foo quux.h5

  2) Selecting a subset from dataset /foo in file quux.h5

      h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5

  3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' using a litt
le-endian type

      h5dump -d /dset -b LE -o out.bin quux.h5
2007-10-02 14:54:36 -05:00
Pedro Vicente Nunes
b2b63b3c75 [svn-r14173]
bug fix

the binary option expects a full path in -o
TOOLTEST   tbin1.ddl -d integer -o $TESTDIR/out1.bin -b LE    tbinary.h5

and it prints it in the expected output , making it absolutely not portable

Solution: made a special macro function TOOLTEST1 identical to TOOLTEST  except that it does not print the Expected output header

#############################
Expected output for 'h5dump -d integer -o /home/pvn/kagiso/build_hdf5/tools/h5dump/../testfiles/out1.bin -b LE tbinary.h5'
#############################



Tested : linux
2007-10-02 13:34:30 -05:00
Pedro Vicente Nunes
d0bcb06e7a [svn-r14172]
1)	added 5 new tests for the group creation order
2)	modified the h5dump test script to automatically generated non existing (new) output files
3)	cleaning of unused DDL files
4)	new modified DDL files include tcomp-3.ddl ( new form of named datatype) and the binary output files

tested : linux
2007-10-02 11:45:46 -05:00
Pedro Vicente Nunes
1bafc18730 [svn-r14164]
first batch for displaying groups in creation order

1) Added extra parameter to dump_group of type H5_index_t , to be passed to H5Literate.

When a group is tried to be displayed, an inquiry of its creation properties is made. If H5P_CRT_ORDER_TRACKED is present on the group property list then the display is made by creation order, otherwise it is made by name

2) Added a new file to h5dumpgentest that generates a file with a hierarchy of groups with creation order on and off in alternately  


Note : XML code was not modified

Tested : windows, linux
2007-10-01 09:49:23 -05:00