Add tools usage text as doxygen for Tools UG (#4602)

This commit is contained in:
Allen Byrne 2024-07-15 09:43:20 -05:00 committed by GitHub
parent 4cbdf1a5f8
commit f8069fa850
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 1604 additions and 1 deletions

View File

@ -689,6 +689,8 @@ FILE_PATTERNS = H5*public.h H5*module.h H5*develop.h H5FD*.h \
*.F90 \
*.dox \
*.md \
h5copy.h h5diff_main.h h5dump.h h5format_convert.h h5import.h h5jam.h h5ls.h h5repack.h h5stat.h \
h5watch.h h5clear.h h5debug.h h5delete.h h5mkgrp.h h5repart.h \
H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5CommonFG.h H5CompType.h \
H5DataSet.h H5DataSpace.h H5DataType.h H5OcreatProp.h H5DaccProp.h H5DcreatProp.h \
H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h H5FcreatProp.h H5File.h \

29
doxygen/dox/Tools.dox Normal file
View File

@ -0,0 +1,29 @@
/** @page CommandTools Command Line Tools for HDF5 Files
Navigate back: \ref index "Main"
<hr>
\section sec_cltools Command Line Tools for HDF5 Files
There are several command line tools provided with HDF5.
\li \ref sec_cltools_h5copy
\li \ref sec_cltools_h5diff
\li \ref sec_cltools_h5dump
\li \ref sec_cltools_h5format_convert
\li \ref sec_cltools_h5import
\li \ref sec_cltools_h5jam
\li \ref sec_cltools_h5ls
\li \ref sec_cltools_h5repack
\li \ref sec_cltools_h5stat
\li \ref sec_cltools_h5clear
\li \ref sec_cltools_h5debug
\li \ref sec_cltools_h5delete
\li \ref sec_cltools_h5mkgrp
\li \ref sec_cltools_h5repart
\li \ref sec_cltools_h5watch
<hr>
Navigate back: \ref index "Main"
*/

View File

@ -309,6 +309,8 @@
\ref sec_map
\ref sec_cltools
\ref sec_addition
\page AR_UG Additional Resources

View File

@ -0,0 +1,62 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5WATCH_H
#define H5WATCH_H
/** \page H5TOOL_WH_UG The HDF5 h5watch Tool
*
* \section sec_cltools_h5watch h5watch
*
* \subsection subsec_cltools_h5watch_intro Introduction
* With h5watch, you can dump stats from an HDF5 file.
*
* \subsection subsec_cltools_h5watch_usage Usage
* <h4>h5watch [OPTIONS] [OBJECT]</h4>
*
* \subsection subsec_cltools_h5watch_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5watch_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--label</strong> Label members of compound typed dataset.
* \li <strong>--simple</strong> Use a machine-readable output format.
* \li <strong>--dim</strong> Monitor changes in size of dataset dimensions only.
* \li <strong>--width=N</strong> Set the number of columns to N for output.<br />
* A value of 0 sets the number of columns to the
* maximum (65535). The default width is 80 columns.
* \li <strong>--polling=N</strong> Set the polling interval to N (in seconds) when the
* dataset will be checked for appended data.
* The default polling interval is 1.
* \li <strong>--fields=\<list_of_fields\></strong>
* Display data for the fields specified in \<list_of_fields\>
* for a compound data type.
* \<list_of_fields\> can be specified as follows:
* <ul><li>1) A comma-separated list of field names in a
* compound data type. "," is the separator for field names while "." is the separator
* for a nested field.</li>
* <li>2) A single field name in a compound data type.
* This option can be used multiple times.</li></ul>
* Note that backslash is the escape character to avoid
* characters in field names that conflict with the tool's separators.
*
* \subsection subsec_cltools_h5watch_objs Object
* <strong>OBJECT</strong> is specified as [\<filename\>/\<path_to_dataset\>/\<dsetname\>]
* \li <strong>\<filename\></strong> Name of the HDF5 file. It may be preceded by path
* separated by slashes to the specified HDF5 file.
* \li <strong>\<path_to_dataset\></strong> Path separated by slashes to the specified dataset
* \li <strong>\<dsetname\></strong> Name of the dataset
*
*/
#endif /* H5WATCH_H */

View File

@ -765,6 +765,10 @@ New Features
Tools:
------
- Add doxygen files for the tools
Implement the tools usage text as pages in doxygen.
- Add option to adjust the page buffer size in tools
The page buffer cache size for a file can now be adjusted using the

72
tools/src/h5copy/h5copy.h Normal file
View File

@ -0,0 +1,72 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5COPY_H
#define H5COPY_H
/** \page H5TOOL_CP_UG The HDF5 h5copy Tool
*
* \section sec_cltools_h5copy h5copy
*
* \subsection subsec_cltools_h5copy_intro Introduction
* With h5copy, you can copy objects from an HDF5 file to another file.
*
* \subsection subsec_cltools_h5copy_usage Usage
* <h4>h5copy [OPTIONS] [OBJECTS...]</h4>
*
* \subsection subsec_cltools_h5copy_objs Objects
* \li <strong>--input</strong> input file name
* \li <strong>--output</strong> output file name
* \li <strong>--source</strong> source object name
* \li <strong>--destination</strong> destination object name
*
* \subsection subsec_cltools_h5copy_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5copy_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--parents</strong> No error if existing, make parent groups as needed
* \li <strong>--verbose</strong> Print information about OBJECTS and OPTIONS
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--flag</strong> Flag type
*
* \subsubsection subsubsec_cltools_h5copy_options_args Flag Type Options
* Flag type is one of the following strings:
* \li <strong>shallow</strong> Copy only immediate members for groups
* \li <strong>soft</strong> Expand soft links into new objects
* \li <strong>ext</strong> Expand external links into new objects
* \li <strong>ref</strong> Copy references and any referenced objects, i.e., objects
* that the references point to.<br />
* Referenced objects are copied in addition to the objects
* specified on the command line and reference datasets are
* populated with correct reference values. Copies of referenced
* datasets outside the copy range specified on the command line
* will normally have a different name from the original.<br />
* (Default: Without this option, reference value(s) in any
* reference datasets are set to NULL and referenced objects are
* not copied unless they are otherwise within the copy range
* specified on the command line.)
* \li <strong>noattr</strong> Copy object without copying attributes
* \li <strong>allflags</strong> Switches all flags from the default to the non-default setting
*
* These flag types correspond to the following API symbols
* \li <strong>#H5O_COPY_SHALLOW_HIERARCHY_FLAG</strong>
* \li <strong>#H5O_COPY_EXPAND_SOFT_LINK_FLAG</strong>
* \li <strong>#H5O_COPY_EXPAND_EXT_LINK_FLAG</strong>
* \li <strong>#H5O_COPY_EXPAND_REFERENCE_FLAG</strong>
* \li <strong>#H5O_COPY_WITHOUT_ATTR_FLAG</strong>
* \li <strong>#H5O_COPY_ALL</strong>
*
*/
#endif /* H5COPY_H */

View File

@ -0,0 +1,214 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5DIFF_H
#define H5DIFF_H
/** \page H5TOOL_DF_UG The HDF5 h5diff Tool
*
* \section sec_cltools_h5diff h5diff
*
* \subsection subsec_cltools_h5diff_intro Introduction
* With h5diff, you can compare objects between an HDF5 file and objects in another or the same HDF5 file.
*
* \subsection subsec_cltools_h5diff_usage Usage
* <h4> h5diff [OPTIONS] file1 file2 [obj1[ obj2]]</h4>
* \li <strong>file1</strong> File name of the first HDF5 file
* \li <strong>file2 </strong> File name of the second HDF5 file
* \li <strong>[obj1]</strong> Name of an HDF5 object, in absolute path
* \li <strong>[obj2]</strong> Name of an HDF5 object, in absolute path
*
* \subsection subsec_cltools_h5diff_error Error Report
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5diff_options Options
* \li <strong>--help</strong> Print a usage message and exit.
* \li <strong>--version</strong> Print the library version number and exit.
* \li <strong>--report</strong> Report mode. Print differences.
* \li <strong>--verbose</strong> Verbose mode. Print differences information and list of objects.
* \li <strong>--verbose=N</strong> Verbose mode with level. Print differences and list of objects.
* Level of detail depends on value of N:
* <ul><li> <strong>0</strong> Identical to '-v' or '--verbose'.</li>
* <li> <strong>1</strong> All level 0 information plus one-line attribute status summary.</li>
* <li> <strong>2</strong> All level 1 information plus extended attribute status report.</li>
* <li> <strong>3</strong> All level 2 information plus file names.</li></ul>
* \li <strong>--quiet</strong> Quiet mode. Do not produce output.
* \li <strong>--page-buffer-size=N</strong> Set the page buffer cache size, N=non-negative integers
* \li <strong>--vol-value-1</strong> Value (ID) of the VOL connector to use for opening the
* first HDF5 file specified
* \li <strong>--vol-name-1</strong> Name of the VOL connector to use for opening the first
* HDF5 file specified
* \li <strong>--vol-info-1</strong> VOL-specific info to pass to the VOL connector used for
* opening the first HDF5 file specified
* \li <strong>--vol-value-2</strong> Value (ID) of the VOL connector to use for opening the
* second HDF5 file specified
* \li <strong>--vol-name-2</strong> Name of the VOL connector to use for opening the second
* HDF5 file specified
* \li <strong>--vol-info-2</strong> VOL-specific info to pass to the VOL connector used for
* opening the second HDF5 file specified.<br />
* If none of the above options are used to specify a VOL for a file, then
* the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,
* if that environment variable is unset) will be used
* \li <strong>--vfd-value-1</strong> Value (ID) of the VFL driver to use for opening the
* first HDF5 file specified
* \li <strong>--vfd-name-1</strong> Name of the VFL driver to use for opening the first
* HDF5 file specified
* \li <strong>--vfd-info-1 </strong> VFD-specific info to pass to the VFL driver used for
* opening the first HDF5 file specified
* \li <strong>--vfd-value-2 </strong> Value (ID) of the VFL driver to use for opening the
* second HDF5 file specified
* \li <strong>--vfd-name-2</strong> Name of the VFL driver to use for opening the second
* HDF5 file specified
* \li <strong>--vfd-info-2</strong> VFD-specific info to pass to the VFL driver used for
* opening the second HDF5 file specified
* \li <strong>--follow-symlinks</strong>
* Follow symbolic links (soft links and external links) and compare the
* links' target objects.<br />
* If symbolic link(s) with the same name exist in the files being
* compared, then determine whether the target of each link is an existing
* object (dataset, group, or named datatype) or the link is a dangling
* link (a soft or external link pointing to a target object that does
* not yet exist).
* <ul><li> If both symbolic links are dangling links, they are treated as being
* the same; by default, h5diff returns an exit code of 0.
* If, however, --no-dangling-links is used with --follow-symlinks,
* this situation is treated as an error and h5diff returns an
* exit code of 2.</li>
* <li> If only one of the two links is a dangling link,they are treated as
* being different and h5diff returns an exit code of 1.
* If, however, --no-dangling-links is used with --follow-symlinks,
* this situation is treated as an error and h5diff returns an
* exit code of 2.</li>
* <li> If both symbolic links point to existing objects, h5diff compares the
* two objects.</li></ul>
* If any symbolic link specified in the call to h5diff does not exist,
* h5diff treats it as an error and returns an exit code of 2.
* \li <strong>--no-dangling-links</strong>
* Must be used with <strong>--follow-symlinks</strong> option; otherwise, h5diff shows
* error message and returns an exit code of 2.<br />
* Check for any symbolic links (soft links or external links) that do not
* resolve to an existing object (dataset, group, or named datatype).
* If any dangling link is found, this situation is treated as an error
* and h5diff returns an exit code of 2.
* \li <strong>--compare</strong> List objects that are not comparable
* \li <strong>--nan</strong> Avoid NaNs detection
* \li <strong>--count=C</strong> Print differences up to \b C. \b C must be a positive integer.
* \li <strong>--delta=D</strong>
* Print difference if (<strong>|a-b| > D</strong>). \b D must be a positive number, where \b a
* is the data point value in file1 and b is the data point value in file2.
* Can not use with '--relative' or '--use-system-epsilon'.
* \li <strong>--relative=R</strong>
* Print difference if (<strong>|(a-b)/b| > R</strong>). \b R must be a positive number, where \b a
* is the data point value in file1 and \b b is the data point value in file2.
* Can not use with '--delta' or '--use-system-epsilon'.
* \li <strong>--use-system-epsilon</strong>
* Print difference if (<strong>|a-b| > EPSILON</strong>), \b EPSILON is system defined value, where
* \b a is the data point value in file1 and \b b is the data point value in file2. If the system epsilon is
* not defined,one of the following predefined values will be used: <ul><li><code
* style="background-color:whitesmoke;">FLT_EPSILON = 1.19209E-07</code> for floating-point type</li>
* <li><code style="background-color:whitesmoke;">DBL_EPSILON = 2.22045E-16</code>
* for double precision</li></ul>
* type Can not use with '--relative' or '--delta'.
* \li <strong>--exclude-path "path"</strong> Exclude the specified path to an object when
* comparing files or groups. If a group is excluded, all member objects will also be excluded.
* The specified path is excluded wherever it occurs. This flexibility enables the same option
* to exclude either objects that exist only in one file or common objects that are known to differ.<br />
* When comparing files, "path" is the absolute path to the excluded object;
* when comparing groups, "path" is similar to the relative path from the group to the excluded object. This
* "path" can be taken from the first section of the output of the <strong>--verbose</strong> option.<br />
* For example, if you are comparing the group <code style="background-color:whitesmoke;">/groupA</code>
* in two files and you want to exclude
* <code style="background-color:whitesmoke;">/groupA/groupB/groupC</code> in both files,
* the exclude option would read as follows:<br />
* <code style="background-color:whitesmoke;">--exclude-path "/groupB/groupC"</code> <br />
* If there are multiple paths to an object, only the specified path(s) will be excluded; the
* comparison will include any path not explicitly excluded.<br />
* This option can be used repeatedly to
* exclude multiple paths.
* \li <strong>--exclude-attribute "path/to/object/with/attribute"</strong> Exclude
* attributes on the specified path to an object when comparing files or groups.<br />
* If there are multiple paths to an object, only the specified path(s) will be excluded;
* the comparison will include any path not explicitly excluded.<br />
* This option can be used repeatedly to exclude multiple paths.
*
* \subsubsection subsubsec_cltools_h5diff_modee Modes of output
* \li <strong>Default mode</strong> print the number of differences found and where they occurred
* \li <strong>Report mode</strong> print the above plus the differences
* \li <strong>Verbose mode</strong> print the above plus a list of objects and warnings
* \li <strong>Quiet mode</strong> do not print output
*
* \subsubsection subsubsec_cltools_h5diff_file File comparison
* If no objects [obj1[ obj2]] are specified, the h5diff comparison proceeds as
* a comparison of the two files' root groups. That is, h5diff first compares
* the names of root group members, generates a report of root group objects
* that appear in only one file or in both files, and recursively compares
* common objects.
*
* \subsubsection subsubsec_cltools_h5diff_object Object comparison
* \li 1) <strong>Groups</strong>
* First compares the names of member objects (relative path, from the
* specified group) and generates a report of objects that appear in only
* one group or in both groups. Common objects are then compared recursively.
* \li 2) <strong>Attributes and Datasets</strong>
* Array rank and dimensions, datatypes, and data values are compared.
* \li 3) <strong>Datatypes</strong>
* The comparison is based on the return value of H5Tequal.
* \li 4) <strong>Symbolic links</strong>
* The paths to the target objects are compared.
* (The option --follow-symlinks overrides the default behavior when
* symbolic links are compared.)
*
* \subsubsection subsubsec_cltools_h5diff_subset Subsetting Options
* \li <strong>--no-compact-subset</strong> Disable compact form of subsetting and allow the use
* of "[" in dataset names.
*
* Subsetting is available by using the fcompact form of subsetting, as follows:
* <code style="background-color:whitesmoke;">obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]</code>
*
* It is not required to use all parameters, but until the last parameter value used,
* all of the semicolons (;) are required, even when a parameter value is not specified.
*
* Example:
* <code style="background-color:whitesmoke;">obj1 /foo/mydataset[START;;COUNT;BLOCK]</code>
* <code style="background-color:whitesmoke;">obj1 /foo/mydataset[START]</code>
*
* The \b STRIDE, \b COUNT, and \b BLOCK parameters are optional and will default to 1 in
* each dimension. \b START is optional and will default to 0 in each dimension.
* Each of \b START, \b STRIDE, \b COUNT, and \b BLOCK must be a comma-separated list of integers with
* one integer for each dimension of the dataset.
*
* \subsubsection subsubsec_cltools_h5diff_exit Exit code
* \li 0 if no differences
* \li 1 if differences found
* \li 2 if error
*
* \subsubsection subsubsec_cltools_h5diff_examples Examples
* \li 1) h5diff file1 file2 /g1/dset1 /g1/dset2
*
* Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2
*
* \li 2) h5diff file1 file2 /g1/dset1
*
* Compares object '/g1/dset1' in both files
*
* \li 3) h5diff file1 file2
*
* Compares all objects in both files
*
* Notes:
* file1 and file2 can be the same file.
* Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare '/g1/dset1' and '/g1/dset2' in the same file
*
*/
#endif /* H5DIFF_H */

View File

@ -12,6 +12,187 @@
#ifndef H5DUMP_H
#define H5DUMP_H
/** \page H5TOOL_DP_UG The HDF5 h5dump Tool
*
* \section sec_cltools_h5dump h5dump
*
* \subsection subsec_cltools_h5dump_intro Introduction
* With h5dump, you can display objects from an HDF5 file.
*
* \subsection subsec_cltools_h5dump_usage Usage
* <h4>h5dump [OPTIONS] [files</h4>
*
* \subsection subsec_cltools_h5dump_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5dump_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--version</strong> Print the library version number and exit
*
* \subsection subsec_cltools_h5dump_options_file File Options
* \li <strong>--contents</strong> Print a list of the file contents, group and dataset,
* names and values, then exit. Optional value 1 also prints attributes, --contents=1.
* \li <strong>--superblock</strong> Print the content of the super block
* \li <strong>--header</strong> Print the header only; no data is displayed
* \li <strong>--filedriver=D</strong> Specify which driver to open the file with
* \li <strong>--output=F</strong> Output raw data into file F
* \li <strong>--binary=B</strong> Binary file output, of form B
* \li <strong>--ddl=F</strong> Output ddl text into file F
* Use blank(empty) filename F to suppress ddl display
* \li <strong>--page-buffer-size=N</strong> Set the page buffer cache size, N=non-negative integers
* \li <strong>--s3-cred=\<cred\></strong> Supply S3 authentication information to "ros3" vfd.
* \code \<cred\> :: "(<aws-region>,<access-id>,<access-key>)" \endcode
* If absent or \code \<cred\> -> "(,,)" \endcode, no authentication.
* Has no effect if filedriver is not "ros3".
* \li <strong>--hdfs-attrs=\<attrs\></strong> Supply configuration information for HDFS file access.
* For use with <strong>--filedriver=hdfs</strong>
* \code \<attrs\> :: (\<namenode name\>,\<namenode port\>,
* \<kerberos cache path\>,\<username\>,
* \<buffer size\>) \endcode
* Any absent attribute will use a default value.
* \li <strong>--vol-value</strong> Value (ID) of the VOL connector to use for opening the HDF5 file specified
* \li <strong>--vol-name</strong> Name of the VOL connector to use for opening the HDF5 file specified
* \li <strong>--vol-info</strong> VOL-specific info to pass to the VOL connector used for
* opening the HDF5 file specified.<br />
* If none of the above options are used to specify a VOL, then
* the VOL named by \b HDF5_VOL_CONNECTOR (or the native VOL connector,
* if that environment variable is unset) will be used
* \li<strong>--vfd-value</strong> Value (ID) of the VFL driver to use for opening the HDF5 file specified
* \li <strong>--vfd-name</strong> Name of the VFL driver to use for opening the HDF5 file specified
* \li <strong>--vfd-info</strong> VFD-specific info to pass to the VFL driver used for
* opening the HDF5 file specified
*
* \subsection subsec_cltools_h5dump_options_obj Object Options
* \li <strong>--attribute=P</strong> Print the specified attribute
* If an attribute name contains a slash (/), escape the
* slash with a preceding backslash (\).
* (See example section below.)
* \li <strong>--dataset=P</strong> Print the specified dataset
* \li <strong>--group=P</strong> Print the specified group and all members
* \li <strong>--soft-link=P</strong> Print the value(s) of the specified soft link
* \li <strong>--datatype=P</strong> Print the specified named datatype
* \li <strong>--any_path=P</strong> Print any attribute, dataset, group, datatype, or link that matches P
* P can be the absolute path or just a relative path.
* \li <strong>--onlyattr</strong> Print the header and value of attributes
* Optional value 0 suppresses printing attributes.
* \li <strong>--vds-view-first-missing</strong> Set the VDS bounds to first missing mapped elements.
* \li <strong>--vds-gap-size=N</strong> Set the missing file gap size, N=non-negative integers
*
* \subsection subsec_cltools_h5dump_options_prop Object Property Options
* \li <strong>--object-ids</strong> Print the object ids
* \li <strong>--properties</strong> Print dataset filters, storage layout and fill value
* \li <strong>--packedbits=L</strong> Print packed bits as unsigned integers, using mask
* format L for an integer dataset specified with
* option -d. L is a list of offset,length values,
* separated by commas. Offset is the beginning bit in
* the data value and length is the number of bits of
* the mask.
* \li <strong>--region</strong> Print dataset pointed by region references
*
* \subsection subsec_cltools_h5dump_options_fmt Formatting Options
* \li <strong>--escape</strong> Escape non printing characters
* \li <strong>--string</strong> Print 1-byte integer datasets as ASCII
* \li <strong>--noindex</strong> Do not print array indices with the data
* \li <strong>--format=T</strong> Set the floating point output format
* \li <strong>--sort_by=Q</strong> Sort groups and attributes by index Q
* \li <strong>--sort_order=Z</strong> Sort groups and attributes by order Z
* \li <strong>--no-compact-subset</strong> Disable compact form of subsetting and allow the use
* of "[" in dataset names.
* \li <strong>--width=N</strong> Set the number of columns of output. A value of 0 (zero)
* sets the number of columns to the maximum (65535).
* Default width is 80 columns.
*
* \subsection subsec_cltools_h5dump_options_xml XML Options
* \li <strong>--xml</strong> Output in XML using Schema
* \li <strong>--use-dtd</strong> Output in XML using DTD
* \li <strong>--xml-dtd=U</strong> Use the DTD or schema at U
* \li <strong>--xml-ns=S</strong> (XML Schema) Use qualified names n the XML
* ":": no namespace, default: "hdf5:"
* E.g., to dump a file called "-f", use h5dump -- -f
*
* \subsection subsec_cltools_h5dump_options_subset Subsetting Options
* Subsetting is available by using the following options with a dataset
* option. Subsetting is done by selecting a hyperslab from the data.
* Thus, the options mirror those for performing a hyperslab selection.<br />
* One of the \b START, \b COUNT, \b STRIDE, or \b BLOCK parameters are mandatory if you do subsetting.
* The \b STRIDE, \b COUNT, and \b BLOCK parameters are optional and will default to 1 in
* each dimension. \b START is optional and will default to 0 in each dimension.
*
* \li <strong>--start=START</strong> Offset of start of subsetting selection
* \b START - is a list of integers, the number of which are equal to the
* number of dimensions in the dataspace being queried.<br />
* \li <strong>--stride=STRIDE</strong> Hyperslab stride
* \b COUNT - is a list of integers, the number of which are equal to the
* number of dimensions in the dataspace being queried.<br />
* \li <strong>--count=COUNT</strong> Number of blocks to include in selection
* \b STRIDE - is a list of integers, the number of which are equal to the
* number of dimensions in the dataspace being queried.<br />
* \li <strong>--block=BLOCK</strong> Size of block in hyperslab
* \b BLOCK - is a list of integers, the number of which are equal to the
* number of dimensions in the dataspace being queried.<br />
* (Alternate compact form of subsetting is described in the Reference Manual)
*
* \subsubsection subsubsec_cltools_h5dump_options_args Option Argument Conventions
* \li <strong>D</strong> - is the file driver to use in opening the file. Acceptable values are available
* from https://support.hdfgroup.org/documentation/HDF5/registered_virtual_file_drivers_vfds.html. 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. See examples below for family, split, and multi driver
* special file name usage.
*
* \li <strong>F</strong> - is a filename.
* \li <strong>P</strong> - is the full path from the root group to the object.
* \li <strong>N</strong> - is an integer greater than 1.
* \li <strong>T</strong> - is a string containing the floating point format, e.g '%.3f'
* \li <strong>U</strong> - is a URI reference (as defined in [IETF RFC 2396],
* updated by [IETF RFC 2732])
* \li <strong>B</strong> - is the form of binary output: NATIVE 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. B is an optional argument, defaults to NATIVE
* \li <strong>Q</strong> - is the sort index type. It can be "creation_order" or "name" (default)
* \li <strong>Z</strong> - is the sort order type. It can be "descending" or "ascending" (default)
*
* \subsection subsec_cltools_h5dump_examples Usage Examples
*
* \li 1) Attribute foo of the group /bar_none in file quux.h5
*
* h5dump --attribute=/bar_none/foo quux.h5
*
* \li 2) Attribute "high/low" of the group /bar_none in the file quux.h5
*
* h5dump --attribute="/bar_none/high\/low" quux.h5
*
* \li 3) Selecting a subset from dataset /foo in file quux.h5
*
* h5dump --dataset=/foo --start="0,1" --stride="1,1" --count="2,3" --block="2,2" quux.h5
*
* \li 4) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' using a little-endian type
*
* h5dump --dataset=/dset --binary=LE --output=out.bin quux.h5
*
* \li 5) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
*
* h5dump -d-dataset=/dset --packedbits=0,1,4,3 quux.h5
*
* \li 6) Dataset foo in files file1.h5 file2.h5 file3.h5
*
* h5dump --dataset=/foo file1.h5 file2.h5 file3.h5
*
* \li 7) Dataset foo in split files splitfile-m.h5 splitfile-r.h5
*
* h5dump --dataset=/foo --filedriver=split splitfile
*
* \li 8) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5
*
* h5dump --dataset=/foo --filedriver=multi mf
*
* \li 9) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5
*
* h5dump --dataset=/foo --filedriver=family fam%05d.h5
*
*/
#include "hdf5.h"
#include "H5private.h"
#include "h5tools.h"

View File

@ -0,0 +1,58 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5FORMAT_CONVERT_H
#define H5FORMAT_CONVERT_H
/** \page H5TOOL_FC_UG The HDF5 h5format_convert Tool
*
* \section sec_cltools_h5format_convert h5format_convert
*
* \subsection subsec_cltools_h5format_convert_intro Introduction
* With h5format_convert, you can convert a datasets format in an HDF5 file.
*
* \subsection subsec_cltools_h5format_convert_usage Usage
* <h4>h5format_convert [OPTIONS] file_name</h4>
*
* \subsection subsec_cltools_h5format_convert_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5format_convert_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--verbose</strong> Turn on verbose mode
* \li <strong>--dname=dataset_name</strong> Pathname for the dataset
* \li <strong>--noop</strong> Perform all the steps except the actual conversion
*
* \subsubsection subsubsec_cltools_h5format_convert_examples Usage Examples
* \li 1) h5format_convert --dname=/group/dataset file_name
*
* Convert the dataset </group/dataset> in the HDF5 file <file_name>:
* - chunked dataset: convert the chunk indexing type to version 1 B-tree
* - compact/contiguous dataset: downgrade the layout version to 3
* - virtual dataset: no action
*
* \li 2) h5format_convert file_name
*
* Convert all datasets in the HDF5 file <file_name>:
* - chunked dataset: convert the chunk indexing type to version 1 B-tree
* - compact/contiguous dataset: downgrade the layout version to 3
* - virtual dataset: no action
*
* \li 3) h5format_convert --noop --dname=/group/dataset file_name
*
* Go through all the steps except the actual conversion when
* converting the dataset </group/dataset> in the HDF5 file <file_name>.
*
*/
#endif /* H5FORMAT_CONVERT_H */

View File

@ -19,6 +19,294 @@
#ifndef H5IMPORT_H
#define H5IMPORT_H
/** \page H5TOOL_IM_UG The HDF5 h5import Tool
*
* \section sec_cltools_h5import h5import
*
* \subsection subsec_cltools_h5import_intro Introduction
* With h5import, you can convert data stored in one or more ASCII or binary files
* into one or more datasets (in accordance with the
* user-specified type and storage properties) in an existing
* or new HDF5 file.
*
* \subsection subsec_cltools_h5import_desc Description
* The primary objective of the utility is to convert floating
* point or integer data stored in \b ASCII text or binary form
* into a dataset according to the type and storage properties
* specified by the user. The utility can also accept \b ASCII
* text files and store the contents in a compact form as an
* array of one-dimensional strings.
*
* The input data to be written as a dataset can be provided
* to the utility in one of the following forms:
* \li 1. ASCII text file with numeric data (floating point or
* integer data)
* \li 2. Binary file with native floating point data (32-bit or
* 64-bit)
* \li 3. Binary file with native integer (signed or unsigned)
* data (8-bit or 16-bit or 32-bit or 64-bit)
* \li 4. ASCII text file containing strings (text data)
*
* Every input file is associated with a configuration file
* also provided as an input to the utility. (See Section
* \ref subsec_cltools_h5import_config to know how it is to be organized).
* The class, size and dimensions of the input data is
* specified in this configuration file. A point to note is
* that the floating point data in the \b ASCII text file may be
* organized in the fixed floating form (for example 323.56)
* or in scientific notation (for example 3.23E+02). A
* different input-class specification is to be used for both forms.
*
* The utility extracts the input data from the input file
* according to the specified parameters and saves it into
* an HDF5 dataset.
*
* The user can specify output type and storage properties in
* the configuration file. The user is required to specify the
* path of the dataset. If the groups in the path leading to
* the dataset do not exist, the groups will be created by the
* utility. If no group is specified, the dataset will be
* created under the root group.
*
* In addition to the name, the user is also required to
* provide the class and size of output data to be written to
* the dataset and may optionally specify the output-architecture,
* and the output-byte-order. If output-architecture is not
* specified, the default is \b NATIVE. Output-byte-orders are fixed
* for some architectures and may be specified only if output-
* architecture is \b IEEE, \b UNIX or \b STD.
*
* Also, layout and other storage properties such as
* compression, external storage and extendible datasets may be
* optionally specified. The layout and storage properties
* denote how raw data is to be organized on the disk. If these
* options are not specified, the default is \b Contiguous layout
* and storage.
*
* The dataset can be organized in any of the following ways:
* \li 1. <strong>Contiguous</strong>
* \li 2. <strong>Chunked</strong>
* \li 3. <strong>External Storage File</strong> (has to be contiguous)
* \li 4. <strong>Extendible data sets</strong>(has to be chunked)
* \li 5. <strong>Compressed </strong> (has to be chunked)
* \li 6. <strong>Compressed & Extendible</strong> (has to be chunked)
*
* If the user wants to store raw data in a non-HDF5 file then
* the external storage file option is to be used and the name
* of the file is to be specified.
*
* If the user wants the dimensions of the dataset to be
* unlimited, the extendible data set option can be chosen.
*
* The user may also specify the type of compression and the
* level to which the data set must be compressed by setting
* the compressed option.
*
* \subsection subsec_cltools_h5import_usage Usage
* <h4>h5import -h[elp], OR h5import \<infile\> -c[onfig] \<configfile\> [\<infile\>
* -c[config]\<confile2\>...] -o[utfile] \<outfile\></h4>
*
* \subsection subsec_cltools_h5import_help Help
* \li <strong>-h[elp]</strong> Print a usage message and exit
*
* \subsubsection subsubsec_cltools_h5import_options Program Options
* \li <strong>\<infile(s)\></strong>
* Name of the Input file(s), containing a
* single n-dimensional floating point or integer array
* in either ASCII text, native floating point(32-bit
* or 64-bit) or native integer(8-bit or 16-bit or
* 32-bit or 64-bit). Data to be specified in the order
* of fastest changing dimensions first.
*
* \li <strong>-c[config] \<configfile\></strong>
* Every input file should be associated with a
* configuration file and this is done by the -c option.
* \<configfile\> is the name of the configuration file.
* (See Section \ref subsec_cltools_h5import_config).
*
* \li <strong>-o[utfile] \<outfile\></strong>
* Name of the HDF5 output file. Data from one or more
* input files are stored as one or more data sets in
* \<outfile\>. The output file may be an existing file or
* it may be new, in which case it will be created.
*
* \subsection subsec_cltools_h5import_config Configuration File
* The configuration file is an ASCII text file and must be
* the ddl formatted file (without data values) produced by \b h5dump
* when used with the options \code -o outfilename -b \endcode of a single dataset (-d)
* OR organized as <strong>CONFIG-KEYWORD VALUE</strong> pairs, one pair on each
* line.
*
* The configuration file may have the following keywords each
* followed by an acceptable value.
*
* \subsubsection subsubsec_cltools_h5import_config_req Required KEYWORDS
* \li <strong>PATH</strong>
* \li <strong>INPUT-CLASS</strong>
* \li <strong>INPUT-SIZE</strong>
* \li <strong>INPUT-BYTE-ORDER</strong>
* \li <strong>RANK</strong>
* \li <strong>DIMENSION-SIZES</strong>
* \li <strong>OUTPUT-CLASS</strong>
* \li <strong>OUTPUT-SIZE</strong>
*
* \subsubsection subsubsec_cltools_h5import_config_opt Optional KEYWORDS
* \li <strong>OUTPUT-ARCHITECTURE</strong>
* \li <strong>OUTPUT-BYTE-ORDER</strong>
* \li <strong>CHUNKED-DIMENSION-SIZES</strong>
* \li <strong>COMPRESSION-TYPE</strong>
* \li <strong>COMPRESSION-PARAM</strong>
* \li <strong>EXTERNAL-STORAGE</strong>
* \li <strong>MAXIMUM-DIMENSIONS</strong>
*
* \subsubsection subsubsec_cltools_h5import_config_val Values for keywords
* \li <strong>PATH</strong>
* Strings separated by spaces to represent
* the path of the dataset. If the groups in
* the path do not exist, they will be created.
* For example,
* <ul><li>PATH grp1/grp2/dataset1</li>
* <li>PATH: keyword</li>
* <li>grp1: group under the root. If non-existent will be created</li>
* <li>grp2: group under grp1. If non-existent will be created under grp1</li>
* <li>dataset1: the name of the dataset to be created</li></ul>
*
* \li <strong>INPUT-CLASS</strong>
* String denoting the type of input data.
* <ul><li>TEXTIN</li>
* <li>TEXTFP</li>
* <li>FP</li>
* <li>IN</li>
* <li>STR</li>
* <li>TEXTUIN</li>
* <li>UIN</li></ul>
* \b INPUT-CLASS "TEXTIN" denotes an ASCII text file with signed integer data in ASCII form,
* \b INPUT-CLASS "TEXTUIN" denotes an ASCII text file with unsigned integer data in ASCII form,
* "TEXTFP" denotes an ASCII text file containing floating point data in the fixed notation
* (325.34), <br />
* "FP" denotes a floating point binary file,
* "IN" denotes a signed integer binary file,
* "UIN" denotes an unsigned integer binary file,
* & "STR" denotes an ASCII text file the contents of which should be stored as a 1-D
* array of strings.<br />
* If \b INPUT-CLASS is "STR", then \b RANK,
* \b DIMENSION-SIZES, \b OUTPUT-CLASS, \b OUTPUT-SIZE,
* \b OUTPUT-ARCHITECTURE and \b OUTPUT-BYTE-ORDER
* will be ignored.
*
* \li <strong>INPUT-SIZE</strong>
* Integer denoting the size of the input data (8, 16, 32, 64).
* <ul><li>For floating point, \b INPUT-SIZE can be 32 or 64.</li>
* <li>For integers (signed and unsigned) \b INPUT-SIZE can be 8, 16, 32 or 64.</li></ul>
*
* \li <strong>RANK</strong>
* Integer denoting the number of dimensions.
*
* \li <strong>DIMENSION-SIZES</strong>
* Integers separated by spaces to denote the dimension sizes for the number of dimensions
* determined by rank.
*
* \li <strong>OUTPUT-CLASS</strong>
* String denoting data type of the dataset to be written ("IN","FP", "UIN")
*
* \li <strong>OUTPUT-SIZE</strong>
* Integer denoting the size of the data in the output dataset to be written.
* If \b OUTPUT-CLASS is "FP", \b OUTPUT-SIZE can be 32 or 64.
* If \b OUTPUT-CLASS is "IN" or "UIN", \b OUTPUT-SIZE can be 8, 16, 32 or 64.
*
* \li <strong>OUTPUT-ARCHITECTURE</strong>
* \b STRING denoting the type of output architecture. Can accept the following values
* <ul><li>STD</li>
* <li>IEEE</li>
* <li>INTEL</li>
* <li>CRAY</li>
* <li>MIPS</li>
* <li>ALPHA</li>
* <li>NATIVE (default)</li>
* <li>UNIX</li></ul>
*
* \li <strong>OUTPUT-BYTE-ORDER</strong>
* String denoting the output-byte-order. Ignored if the \b OUTPUT-ARCHITECTURE is not specified or
* if it is \b IEEE, \b UNIX or \b STD. Can accept the following values.
* <ul><li>BE (default)</li>
* <li>LE</li></ul>
*
* \li <strong>CHUNKED-DIMENSION-SIZES</strong>
* Integers separated by spaces to denote the dimension sizes of the chunk for the number of
* dimensions determined by rank. Required field to denote that the dataset will be stored with
* chunked storage. If this field is absent the dataset will be stored with contiguous storage.
*
* \li <strong>COMPRESSION-TYPE</strong>
* String denoting the type of compression to be used with the chunked storage. Requires the
* \b CHUNKED-DIMENSION-SIZES to be specified. The only currently supported compression method is \b GZIP.
* Will accept the following value
* <ul><li>GZIP</li></ul>
*
* \li <strong>COMPRESSION-PARAM</strong>
* Integer used to denote compression level and this option is to be always specified when
* the \b COMPRESSION-TYPE option is specified. The values are applicable only to \b GZIP
* compression.<br />
* Value 1-9: The level of Compression.<br />
* 1 will result in the fastest compression while 9 will result in
* the best compression ratio.<br />
* The default level of compression is 6.
*
* \li <strong>EXTERNAL-STORAGE</strong>
* String to denote the name of the non-HDF5 file to store data to. Cannot be used if \b
* CHUNKED-DIMENSIONS or \b COMPRESSION-TYPE or \b EXTENDIBLE-DATASET is specified. Value
* \<external-filename\>: the name of the external file as a string to be used.
*
* \li <strong>MAXIMUM-DIMENSIONS</strong>
* Integers separated by spaces to denote the maximum dimension sizes of all the
* dimensions determined by rank. Requires the \b CHUNKED-DIMENSION-SIZES to be specified. A value of
* -1 for any dimension implies \b UNLIMITED \b DIMENSION size for that particular dimension.
*
* \subsection subsec_cltools_h5import_examples Usage Examples
* \li <strong>Configuration File may look like</strong>
* \code
* PATH work h5 pkamat First-set
* INPUT-CLASS TEXTFP
* RANK 3
* DIMENSION-SIZES 5 2 4
* OUTPUT-CLASS FP
* OUTPUT-SIZE 64
* OUTPUT-ARCHITECTURE IEEE
* OUTPUT-BYTE-ORDER LE
* CHUNKED-DIMENSION-SIZES 2 2 2
* \endcode
* The above configuration will accept a floating point array
* (5 x 2 x 4) in an ASCII file with the rank and dimension sizes
* specified and will save it in a chunked dataset (of pattern
* 2 X 2 X 2) of 64-bit floating point in the little-endian order
* and IEEE architecture. The dataset will be stored at
* "/work/h5/pkamat/First-set"
*
* \li <strong>Another configuration could be</strong>
* \code
* PATH Second-set
* INPUT-CLASS IN
* RANK 5
* DIMENSION-SIZES 6 3 5 2 4
* OUTPUT-CLASS IN
* OUTPUT-SIZE 32
* CHUNKED-DIMENSION-SIZES 2 2 2 2 2
* EXTENDIBLE-DATASET 1 3
* COMPRESSION-TYPE GZIP
* COMPRESSION-PARAM 7
* \endcode
* The above configuration will accept an integer array
* (6 X 3 X 5 x 2 x 4) in a binary file with the rank and
* dimension sizes specified and will save it in a chunked dataset
* (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in
* native format (as output-architecture is not specified). The
* first and the third dimension will be defined as unlimited. The
* dataset will be compressed using GZIP and a compression level
* of 7.<br />
* The dataset will be stored at \code /Second-set \endcode
*
*
*/
/*
* state table tokens
*/

65
tools/src/h5jam/h5jam.h Normal file
View File

@ -0,0 +1,65 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5JAM_H
#define H5JAM_H
/** \page H5TOOL_JAM_UG The HDF5 h5jam/h5unjam Tool
*
* \section sec_cltools_h5jam h5jam and h5unjam
*
* \subsection subsec_cltools_h5jam_intro Introduction
* \li h5jam Adds user block to the front of an HDF5 file and creates a new concatenated file.
* \li h5unjam Splits an HDF5 file into two files, one containing the user block data and the other the HDF5
* data.
*
* \subsection subsec_cltools_h5jam_usage Usage
* <h4>h5jam -i \<in_file.h5\> -u \<in_user_file\> [-o \<out_file.h5\>] [--clobber]</h4>
* <h4>h5unjam -i \<in_file.h5\> [-o \<out_file.h5\> ] [-u \<out_user_file\> | --delete]</h4>
*
* \subsection subsec_cltools_h5jam_options h5jam Options
* \li <strong>-i in_file.h5</strong> Specifies the input HDF5 file.
* \li <strong>-u in_user_file</strong> Specifies the file to be inserted into the user block.
* Can be any file format except an HDF5 format.
* \li <strong>-o out_file.h5</strong> Specifies the output HDF5 file.
* If not specified, the user block will be concatenated in
* place to the input HDF5 file.
* \li <strong>--clobber</strong> Wipes out any existing user block before concatenating
* the given user block.
* The size of the new user block will be the larger of:
* - the size of existing user block in the input HDF5 file
* - the size of user block required by new input user file
* (size = 512 x 2N, N is positive integer.)
* \li <strong>-h</strong> Prints a usage message and exits.
* \li <strong>-V</strong> Prints the HDF5 library version and exits.
*
* \subsection subsec_cltools_h5unjam_options h5unjam Options
* \li <strong>-i in_file.h5</strong> Specifies the HDF5 as input. If the input HDF5 file
* contains no user block, exit with an error message.
* \li <strong>-o out_file.h5</strong> Specifies output HDF5 file without a user block.
* If not specified, the user block will be removed from the
* input HDF5 file.
* \li <strong>-u out_user_file</strong>
* Specifies the output file containing the data from the
* user block.
* Cannot be used with --delete option.
* \li <strong>--delete</strong> Remove the user block from the input HDF5 file. The content
* of the user block is discarded.
* Cannot be used with the -u option.
* \li <strong>-h</strong> Prints a usage message and exits.
* \li <strong>-V</strong> Prints the HDF5 library version and exits.
*
* If neither <strong>--delete</strong> nor <strong>-u</strong> is specified, the user block from the input
* file will be displayed to stdout.
*
*/
#endif /* H5JAM_H */

108
tools/src/h5ls/h5ls.h Normal file
View File

@ -0,0 +1,108 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5LS_H
#define H5LS_H
/** \page H5TOOL_LS_UG The HDF5 h5ls Tool
*
* \section sec_cltools_h5ls h5ls
*
* \subsection subsec_cltools_h5ls_intro Introduction
* With h5ls, you can dump objects from an HDF5 file.
*
* \subsection subsec_cltools_h5ls_usage Usage
* <h4>h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]</h4>
*
* \subsection subsec_cltools_h5ls_objs file/OBJECT
* Each object consists of an HDF5 file name optionally followed by a
* slash and an object name within the file (if no object is specified
* within the file then the contents of the root group are displayed).
* The file name may include a printf(3C) integer format such as
* "%05d" to open a file family.
*
* \subsection subsec_cltools_h5ls_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5ls_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--address</strong> Print raw data address. If dataset is contiguous, address
* is offset in file of beginning of raw data. If chunked,
* returned list of addresses indicates offset of each chunk.
* Must be used with <strong>--verbose option</strong>.
* Provides no information for non-dataset objects.
* \li <strong>--data</strong> Print the values of datasets
* \li <strong>--follow-symlinks</strong>
* Follow symbolic links (soft links and external links)
* to display target object information.<br />
* Without this option, h5ls identifies a symbolic link
* as a soft link or external link and prints the value
* assigned to the symbolic link; it does not provide any
* information regarding the target object or determine
* whether the link is a dangling link.
* \li <strong>--no-dangling-links</strong>
* Must be used with <strong>--follow-symlinks</strong> option;
* otherwise, h5ls shows error message and returns an exit
* code of 1.<br />
* Check for any symbolic links (soft links or external links)
* that do not resolve to an existing object (dataset, group,
* or named datatype).<br />
* If any dangling link is found, this situation is treated
* as an error and h5ls returns an exit code of 1.
* \li <strong>--full</strong> Print full path names instead of base names
* \li <strong>--group</strong> Show information about a group, not its contents
* \li <strong>--label</strong> Label members of compound datasets
* \li <strong>--recursive</strong> List all groups recursively, avoiding cycles
* \li <strong>--string</strong> Print 1-byte integer datasets as ASCII
* \li <strong>--simple</strong> Use a machine-readable output format
* \li <strong>--width=N</strong> Set the number of columns of output
* \li <strong>--verbose</strong> Generate more verbose output
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--page-buffer-size=N</strong> Set the page buffer cache size, N=non-negative integers
* \li <strong>--vfd=DRIVER</strong> Use the specified virtual file driver
* \li <strong>--hexdump</strong> Show raw data in hexadecimal format
* \li <strong>--s3-cred=C</strong> Supply S3 authentication information to "ros3" vfd.
* Accepts tuple of \code (\<aws-region\>,\<access-id\>,\<access-key\>) \endcode.
* If absent or C = \code (,,) \endcode defaults to no-authentication.
* Has no effect if vfd flag not set to "ros3".
* \li <strong>--hdfs-attrs=A</strong> Supply configuration information to Hadoop VFD.
* Accepts tuple of \code (\<namenode name\>,\<namenode port\>,
* ...\<kerberos cache path\>,\<username\>,\<buffer size\>) \endcode
* If absent or A == \code (,,,,) \endcode all default values are used.
* Has no effect if vfd flag is not 'hdfs'.
* \li <strong>--vol-value</strong> Value (ID) of the VOL connector to use for opening the
* HDF5 file specified
* \li <strong>--vol-name</strong> Name of the VOL connector to use for opening the
* HDF5 file specified
* \li <strong>--vol-info</strong> VOL-specific info to pass to the VOL connector used for
* opening the HDF5 file specified
* If none of the above options are used to specify a VOL, then
* the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,
* if that environment variable is unset) will be used
* \li <strong>--vfd-value</strong> Value (ID) of the VFL driver to use for opening the
* HDF5 file specified
* \li <strong>--vfd-name</strong> Name of the VFL driver to use for opening the
* HDF5 file specified
* \li <strong>--vfd-info</strong> VFD-specific info to pass to the VFL driver used for
* opening the HDF5 file specified
*
* \subsubsection subsubsec_cltools_h5ls_options_depre Deprecated Options
* The following options have been removed in HDF5 1.12. Use the indicated
* replacement option in all work.
* \li <strong>--external</strong> Follow external links.<br />
* Replaced by <strong>--follow-symlinks</strong>.
* \li <strong>--errors</strong> Show all HDF5 error reporting<br />
* Replaced by <strong>--enable-error-stack</strong>.
*
*/
#endif /* H5LS_H */

View File

@ -13,6 +13,231 @@
#ifndef H5REPACK_H
#define H5REPACK_H
/** \page H5TOOL_RP_UG The HDF5 h5repack Tool
*
* \section sec_cltools_h5repack h5repack
*
* \subsection subsec_cltools_h5repack_intro Introduction
* With h5repack, you can write an HDF5 file to a new file and change the layout for objects in the new file.
*
* \subsection subsec_cltools_h5repack_usage Usage
* <h4>h5repack [OPTIONS] file1 file2</h4>
* \li <strong>file1</strong> Input HDF5 File
* \li <strong>file2</strong> Output HDF5 File
*
* \subsection subsec_cltools_h5repack_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5repack_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--verbose=N</strong> Verbose mode, print object information.
* N - is an integer greater than 1, 2 displays read/write timing
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--native</strong> Use a native HDF5 type when repacking
* \li <strong>--page-buffer-size=N</strong> Set the page buffer cache size, N=non-negative integers
* \li <strong>--src-vol-value</strong> Value (ID) of the VOL connector to use for opening the
* input HDF5 file specified
* \li <strong>--src-vol-name</strong> Name of the VOL connector to use for opening the input
* HDF5 file specified
* \li <strong>--src-vol-info</strong> VOL-specific info to pass to the VOL connector used for
* opening the input HDF5 file specified
* \li <strong>--dst-vol-value</strong> Value (ID) of the VOL connector to use for opening the
* output HDF5 file specified
* \li <strong>--dst-vol-name</strong> Name of the VOL connector to use for opening the output
* HDF5 file specified
* \li <strong>--dst-vol-info</strong> VOL-specific info to pass to the VOL connector used for
* opening the output HDF5 file specified
* \li <strong>--src-vfd-value</strong> Value (ID) of the VFL driver to use for opening the
* input HDF5 file specified
* \li <strong>--src-vfd-name</strong> Name of the VFL driver to use for opening the input
* HDF5 file specified
* \li <strong>--src-vfd-info</strong> VFD-specific info to pass to the VFL driver used for
* opening the input HDF5 file specified
* \li <strong>--dst-vfd-value</strong> Value (ID) of the VFL driver to use for opening the
* output HDF5 file specified
* \li <strong>--dst-vfd-name</strong> Name of the VFL driver to use for opening the output
* HDF5 file specified
* \li <strong>--dst-vfd-info</strong> VFD-specific info to pass to the VFL driver used for
* opening the output HDF5 file specified
* \li <strong>--latest</strong> Use latest version of file format
* This option will take precedence over the options
* --low and --high
* \li <strong>--low=BOUND</strong> The low bound for library release versions to use
* when creating objects in the file
* (default is #H5F_LIBVER_EARLIEST)
* \li <strong>--high=BOUND</strong> The high bound for library release versions to use
* when creating objects in the file
* (default is #H5F_LIBVER_LATEST)
* \li <strong>--merge</strong> Follow external soft link recursively and merge data
* \li <strong>--prune</strong> Do not follow external soft links and remove link
* \li <strong>--merge --prune</strong> Follow external link, merge data and remove dangling link
* \li <strong>--compact=L1</strong> Maximum number of links in header messages
* \li <strong>--indexed=L2</strong> Minimum number of links in the indexed format
* \li <strong>--ssize=S[:F]</strong> Shared object header message minimum size
* \li <strong>--minimum=M</strong> Do not apply the filter to datasets smaller than M
* \li <strong>--file=E</strong> Name of file E with the --file and --layout options
* \li <strong>--ublock=U</strong> Name of file U with user block data to be added
* \li <strong>--block=B</strong> Size of user block to be added
* \li <strong>--metadata_block_size=A</strong> Metadata block size for #H5Pset_meta_block_size
* \li <strong>--threshold=T</strong> Threshold value for #H5Pset_alignment
* \li <strong>--alignment=A</strong> Alignment value for #H5Pset_alignment
* \li <strong>--sort_by=Q</strong> Sort groups and attributes by index Q
* \li <strong>--sort_order=Z</strong> Sort groups and attributes by order Z
* \li <strong>--filter=FILT</strong> Filter type
* \li <strong>--layout=LAYT</strong> Layout type
* \li <strong>--fs_strategy=FS_STRATEGY</strong> File space management strategy for
* #H5Pset_file_space_strategy
* \li <strong>--fs_persist=FS_PERSIST</strong> Persisting or not
* persisting free-space for #H5Pset_file_space_strategy
* \li <strong>--fs_threshold=FS_THRESHOLD</strong> : Free-space section
* threshold for #H5Pset_file_space_strategy
* \li <strong>--fs_pagesize=FS_PAGESIZE</strong> File space page size for #H5Pset_file_space_page_size
*
* \subsubsection subsubsec_cltools_h5repack_options_args Arguments to Certain Options
* \li <strong>M</strong> - is an integer greater than 1, size of dataset in bytes (default is 0)
* \li <strong>E</strong> - is a filename.
* \li <strong>S</strong> - is an integer
* \li <strong>U</strong> - is a filename.
* \li <strong>T</strong> - is an integer
* \li <strong>A</strong> - is an integer greater than zero
* \li <strong>Q</strong> - is the sort index type for the input file. It can be "name" or
* "creation_order" (default)
* \li <strong>Z</strong> - is the sort order type for the input file. It can be "descending" or
* "ascending" (default)
* \li <strong>B</strong> - is the user block size, any value that is 512 or greater and is
* a power of 2 (1024 default)
* \li <strong>F</strong> - is the shared object header message type, any of <dspace|dtype|fill|
* pline|attr>. If F is not specified, S applies to all messages
*
* \subsubsection subsubsec_cltools_h5repack_options_bound Library Version Bounds
* <strong>BOUND</strong> is an integer indicating the library release versions to use when
* creating objects in the file (see #H5Pset_libver_bounds()):
* \li <strong>0</strong> This is #H5F_LIBVER_EARLIEST in #H5F_libver_t struct
* \li <strong>1</strong> This is #H5F_LIBVER_V18 in #H5F_libver_t struct
* \li <strong>2</strong> This is #H5F_LIBVER_V110 in #H5F_libver_t struct
* \li <strong>3</strong> This is #H5F_LIBVER_V112 in #H5F_libver_t struct
* \li <strong>4</strong> This is #H5F_LIBVER_V114 in #H5F_libver_t struct
* \li <strong>5</strong> This is #H5F_LIBVER_V116 in #H5F_libver_t struct
* \li #H5F_LIBVER_LATEST is aliased to #H5F_LIBVER_V116 for this release
*
* \subsubsection subsubsec_cltools_h5repack_options_fs File Strategy Settings
* <strong>FS_STRATEGY</strong> is a string indicating the file space strategy used:
* \li <strong>FSM_AGGR</strong>
* The mechanisms used in managing file space are free-space
* managers, aggregators and virtual file driver.
* \li <strong>PAGE</strong>
* The mechanisms used in managing file space are free-space
* managers with embedded paged aggregation and virtual file driver.
* \li <strong>AGGR</strong>
* The mechanisms used in managing file space are aggregators and
* virtual file driver.
* \li <strong>NONE</strong>
* The mechanisms used in managing file space are virtual file
* driver.
* \li The default strategy when not set is \b FSM_AGGR without persisting free-space.
*
* \li <strong>FS_PERSIST</strong> is 1 for persisting free-space or 0 for not persisting free-space.
* The default when not set is not persisting free-space.
* The value is ignored for \b AGGR and \b NONE strategies.
*
* \li <strong>FS_THRESHOLD</strong> is the minimum size (in bytes) of free-space sections to be
* tracked by the library. The default when not set is 1.
* The value is ignored for \b AGGR and \b NONE strategies.
*
* \li <strong>FS_PAGESIZE</strong> is the size (in bytes) >=512 that is used by the library when
* the file space strategy \b PAGE is used.
* The default when not set is 4096.
*
* \subsubsection subsubsec_cltools_h5repack_options_filt Applying a Third-party Filter
* <strong>FILT</strong> - is a string with the format:
*
* \li <strong>\<objects list\>:\<name of filter\>=\<filter parameters\></strong>
*
* \li <strong>\<objects list\></strong> is a comma separated list of object names, meaning apply
* compression only to those objects. If no names are specified, the filter
* is applied to all objects
* \li <strong>\<name of filter\></strong> can be:
* <ul><li><strong>GZIP</strong> to apply the HDF5 GZIP filter (GZIP compression)</li>
* <li><strong>SZIP</strong> to apply the HDF5 SZIP filter (SZIP compression)</li>
* <li><strong>SHUF</strong> to apply the HDF5 shuffle filter</li>
* <li><strong>FLET</strong> to apply the HDF5 checksum filter</li>
* <li><strong>NBIT</strong> to apply the HDF5 NBIT filter (NBIT compression)</li>
* <li><strong>SOFF</strong> to apply the HDF5 Scale/Offset filter</li>
* <li><strong>UD</strong> to apply a user defined filter</li>
* <li><strong>NONE</strong> to remove all filters</li></ul>
* \li <strong>\<filter parameters\></strong> is optional filter parameter information
* <ul><li><strong>GZIP=\<deflation level\></strong> from 1-9</li>
* <li><strong>SZIP=<pixels per block,coding></strong> pixels per block is a even number in
* 2-32 and coding method is either EC or NN</li>
* <li><strong>SHUF</strong> (no parameter)</li>
* <li><strong>FLET</strong> (no parameter)</li>
* <li><strong>NBIT</strong> (no parameter)</li>
* <li><strong>SOFF=\<scale_factor,scale_type\></strong> scale_factor is an integer and scale_type
* is either IN or DS</li>
* <li><strong>UD=\<filter_number,filter_flag,cd_value_count,value1[,value2,...,valueN]\></strong>
* <ul><li><strong>Required values</strong> filter_number, filter_flag, cd_value_count,
* value1</li> <li><strong>Optional values</strong> value2 to valueN</li> <li><strong>filter_flag</strong> 1
* is OPTIONAL or 0 is MANDATORY</li></ul></li> <li><strong>NONE</strong> (no parameter)</li></ul>
*
* \subsubsection subsubsec_cltools_h5repack_options_lay Layout Settings
* <strong>LAYT</strong> - is a string with the format:
*
* \li <strong>\<objects list\>:\<layout type\>=\<layout parameters\></strong>
*
* \li <strong>\<objects list\></strong> is a comma separated list of object names, meaning that
* layout information is supplied for those objects. If no names are
* specified, the layout type is applied to all objects
* \li <strong>\<layout type\></strong> can be:
* <ul><li><strong>CHUNK</strong> to apply chunking layout</li>
* <li><strong>COMPA</strong> to apply compact layout</li>
* <li><strong>CONTI</strong> to apply contiguous layout</li></ul>
* \li <strong>\<layout parameters\></strong> is optional layout information
* <ul><li><strong>CHUNK=DIM[xDIM...xDIM]</strong>, the chunk size of each dimension</li>
* <li><strong>COMPA</strong> (no parameter)</li>
* <li><strong>CONTI</strong> (no parameter)</li></ul>
*
* \subsubsection subsubsec_cltools_h5repack_options_note NOTE
* The environment variable <strong>H5TOOLS_BUFSIZE</strong> can be set to
* the number of MBs to change the default hyperslab buffer size from 32MB.
* \code setenv H5TOOLS_BUFSIZE=64 to double the hyperslab buffer. \endcode
*
* \subsection subsec_cltools_h5repack_examples Usage Examples
*
* \li 1) h5repack --verbose --filter=GZIP=1 file1 file2
*
* GZIP compression with level 1 to all objects
*
* \li 2) h5repack --verbose --filter=dset1:SZIP=8,NN file1 file2
*
* SZIP compression with 8 pixels per block and NN coding method to object dset1
*
* \li 3) h5repack --verbose --layout=dset1,dset2:CHUNK=20x10 --filter=dset3,dset4,dset5:NONE file1 file2
*
* Chunked layout, with a layout size of 20x10, to objects dset1 and dset2
* and remove filters to objects dset3, dset4, dset5
*
* \li 4) h5repack --latest --compact=10 --ssize=20:dtype file1 file2
*
* Using latest file format with maximum compact group size of 10 and
* minimum shared datatype size of 20
*
* \li 5) h5repack --filter=SHUF --filter=GZIP=1 file1 file2
*
* Add both filters SHUF and GZIP in this order to all datasets
*
* \li 6) h5repack --filter=UD=307,0,1,9 file1 file2
*
* Add bzip2 filter to all datasets
*
* \li 7) h5repack --low=0 --high=1 file1 file2
*
* Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via
* H5Pset_libver_bounds() when creating the repacked file, file2
*
*
*/
#include "H5private.h"
#include "hdf5.h"
#include "h5trav.h"

65
tools/src/h5stat/h5stat.h Normal file
View File

@ -0,0 +1,65 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5STAT_H
#define H5STAT_H
/** \page H5TOOL_ST_UG The HDF5 h5stat Tool
*
* \section sec_cltools_h5stat h5stat
*
* \subsection subsec_cltools_h5stat_intro Introduction
* With h5stat, you can dump stats from an HDF5 file.
*
* \subsection subsec_cltools_h5stat_usage Usage
* <h4>h5stat [OPTIONS] file</h4>
*
* \subsection subsec_cltools_h5stat_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5stat_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--file</strong> Print file information
* \li <strong>--filemetadata</strong> Print file space information for file's metadata
* \li <strong>--group</strong> Print group information
* \li <strong>--links=N</strong> Set the threshold for the # of links when printing
* information for small groups. N is an integer greater
* than 0. The default threshold is 10.
* \li <strong>--groupmetadata </strong> Print file space information for groups' metadata
* \li <strong>--dset</strong> Print dataset information
* \li <strong>--dims=N</strong> Set the threshold for the dimension sizes when printing
* information for small datasets. N is an integer greater
* than 0. The default threshold is 10.
* \li <strong>--dsetmetadata</strong> Print file space information for datasets' metadata
* \li <strong>--dtypemetadata</strong> Print datasets' datatype information
* \li <strong>--attribute</strong> Print attribute information
* \li <strong>--numattrs=N</strong> Set the threshold for the number of attributes when printing
* information for small number of attributes. N is an integer greater
* than 0. The default threshold is 10.
* \li <strong>--freespace</strong> Print free space information
* \li <strong>--summary</strong> Print summary of file space information
* \li <strong>--page-buffer-size=N</strong> Set the page buffer cache size, N=non-negative integers
* \li <strong>--s3-cred=C</strong> Supply S3 authentication information to "ros3" vfd.
* Accepts tuple of \code (\<aws-region\>,\<access-id\>,\<access-key\>) \endcode.
* If absent or C = \code (,,) \endcode defaults to no-authentication.
* Has no effect if vfd flag not set to "ros3".
* \li <strong>--hdfs-attrs=A</strong> Supply configuration information to Hadoop VFD.
* Accepts tuple of \code (\<namenode name\>,\<namenode port\>,
* ...\<kerberos cache path\>,\<username\>,\<buffer size\>) \endcode
* If absent or A == \code (,,,,) \endcode all default values are used.
* Has no effect if vfd flag is not 'hdfs'.<br />
* If an attribute is empty, a default value will be used.
*
*/
#endif /* H5STAT_H */

67
tools/src/misc/h5clear.h Normal file
View File

@ -0,0 +1,67 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5CLEAR_H
#define H5CLEAR_H
/** \page H5TOOL_CR_UG The HDF5 h5clear Tool
*
* \section sec_cltools_h5clear h5clear
*
* \subsection subsec_cltools_h5clear_intro Introduction
* With h5clear, you can clear the superblock status flag field, remove the metadata cache image, print
* the EOA and EOF, or set the EOA of a file. It is not a general repair tool and should not
* be used to fix file corruption. If a process doesn't shut down cleanly, the
* superblock mark can be left that prevents opening a file without SWMR. Then,
* h5clear can be used to remove this superblock mark so that the file can be inspected
* and appropriate actions can be taken.
*
* \subsection subsec_cltools_h5clear_usage Usage
* <h4>h5clear [OPTIONS] file_name</h4>
*
* \subsection subsec_cltools_h5clear_error Error Report Option
* \li <strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5clear_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--status</strong> Clear the status_flags field in the file's superblock
* \li <strong>--image</strong> Remove the metadata cache image from the file
* \li <strong>--filesize </strong> Print the file's EOA and EOF
* \li <strong>--increment=C</strong> Set the file's EOA to the maximum of (EOA, EOF) + C for
* the file \<file_name\>.
* C is >= 0; C is optional and will default to 1M when not set.
* This option helps to repair a crashed SWMR file when the stored
* EOA in the superblock is different from the actual EOF.
* The file's EOA and EOF will be the same after applying
* this option to the file.
*
* \subsection subsec_cltools_h5clear_examples Usage Examples
* \li 1) h5clear -s file_name
*
* Clear the status_flags field in the superblock of the HDF5 file <file_name>.
*
* \li 2) h5clear -m file_name
*
* Remove the metadata cache image from the HDF5 file <file_name>.
*
* \li 3) h5clear --increment file_name
*
* Set the EOA to the maximum of (EOA, EOF) + 1M for the file <file_name>.
*
* \li 4) h5clear --increment=512 file_name
*
* Set the EOA to the maximum of (EOA, EOF) + 512 for the file\<file_name>.
*
*/
#endif /* H5CLEAR_H */

31
tools/src/misc/h5debug.h Normal file
View File

@ -0,0 +1,31 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5DEBUG_H
#define H5DEBUG_H
/** \page H5TOOL_DG_UG The HDF5 h5debug Tool
*
* \section sec_cltools_h5debug h5debug
*
* \subsection subsec_cltools_h5debug_intro Introduction
* With h5debug, you can debug an existing HDF5 file at a low level.
*
* \subsection subsec_cltools_h5debug_usage Usage
* <h4>h5debug filename [signature-addr [extra]*]</h4>
*
* \subsection subsec_cltools_h5debug_options Options
* \li <strong>signature-addr</strong> Primary data structure to dump
* \li <strong>extra</strong> Extra arguments for primary data structure
*
*/
#endif /* H5DEBUG_H */

30
tools/src/misc/h5delete.h Normal file
View File

@ -0,0 +1,30 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5DELETE_H
#define H5DELETE_H
/** \page H5TOOL_DT_UG The HDF5 h5delete Tool
*
* \section sec_cltools_h5delete h5delete
*
* \subsection subsec_cltools_h5delete_intro Introduction
* With h5delete, you can delete an HDF5 file.
*
* \subsection subsec_cltools_h5delete_usage Usage
* <h4>h5delete [-f] \<filename\></h4>
*
* \subsection subsec_cltools_h5delete_options Options
* \li <strong>-f</strong> Suppress output
*
*/
#endif /* H5DELETE_H */

53
tools/src/misc/h5mkgrp.h Normal file
View File

@ -0,0 +1,53 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5MKGRP_H
#define H5MKGRP_H
/** \page H5TOOL_MG_UG The HDF5 h5mkgrp Tool
*
* \section sec_cltools_h5mkgrp h5mkgrp
*
* \subsection subsec_cltools_h5mkgrp_intro Introduction
* With h5mkgrp, you can create group(s) in an HDF5 file
*
* \subsection subsec_cltools_h5mkgrp_usage Usage
* <h4>h5mkgrp [OPTIONS] FILE GROUP</h4>
*
* \subsection subsec_cltools_h5mkgrp_error Error Report Option
* \li<strong>--enable-error-stack</strong> Prints messages from the HDF5 error stack as they occur.
* Optional value 2 also prints file open errors, --enable-error-stack=2.
*
* \subsection subsec_cltools_h5mkgrp_options Options
* \li <strong>--help</strong> Print a usage message and exit
* \li <strong>--version</strong> Print the library version number and exit
* \li <strong>--verbose</strong> Print information about OBJECTS and OPTIONS
* \li <strong>--latest</strong> Use latest version of file format to create groups
* \li <strong>--parents</strong> No error if existing, make parent groups as needed
* \li <strong>--vol-value</strong> Value (ID) of the VOL connector to use for opening the
* HDF5 file specified
* \li <strong>--vol-name</strong> Name of the VOL connector to use for opening the
* HDF5 file specified
* \li <strong>--vol-info</strong> VOL-specific info to pass to the VOL connector used for
* opening the HDF5 file specified.<br />
* If none of the above options are used to specify a VOL, then
* the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,
* if that environment variable is unset) will be used
* \li <strong>--vfd-value</strong> Value (ID) of the VFL driver to use for opening the
* HDF5 file specified
* \li <strong>--vfd-name</strong> Name of the VFL driver to use for opening the
* HDF5 file specified
* \li <strong>--vfd-info</strong> VFD-specific info to pass to the VFL driver used for
* opening the HDF5 file specified
*
*/
#endif /* H5MKGRP_H */

47
tools/src/misc/h5repart.h Normal file
View File

@ -0,0 +1,47 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef H5REPART_H
#define H5REPART_H
/** \page H5TOOL_RT_UG The HDF5 h5repart Tool
*
* \section sec_cltools_h5repart h5repart
*
* \subsection subsec_cltools_h5repart_intro Introduction
* With h5repart, you can repartition a file family. This program can be used to
* split a single file into a family of files, join a family of
* files into a single file, or copy one family to another while
* changing the size of the family members. It can also be used
* to copy a single file to a single file with holes.
*
* \subsection subsec_cltools_h5repart_usage Usage
* <h4>h5repart [OPTIONS] SRC DST</h4>
*
* \subsection subsec_cltools_h5repart_objs SRC/DST
* \li <strong>SRC</strong> The name of the source file
* \li <strong>DST</strong> The name of the destination files
*
* \subsection subsec_cltools_h5repart_options Options
* \li <strong>-v</strong> Produce verbose output
* \li <strong>-V</strong> Print version number and exit
* \li <strong>-b N</strong> The I/O block size, defaults to 1kB
* \li <strong>-m N</strong> The destination member size or 1GB
* \li <strong>-family_to_sec2</strong> Deprecated version of -family_to_single (below)
* \li <strong>-family_to_single</strong> Change file driver from family to the default single-file
* VFD (windows or sec2)
*
* Sizes may be suffixed with 'g' for GB, 'm' for MB or 'k' for kB.
* File family names include an integer printf format such as '%%d'
*
*/
#endif /* H5REPART_H */

View File

@ -549,7 +549,7 @@
ADD_H5_TEST2 (grp_dsets_rename 2 ${HDF_FILE1}.h5 grp_dsets grp_rename -v -s grp_dsets -d /grp_rename/grp_dsets)
endif ()
# "Test copying objects into group hier. that doesn't exist yet in destination file"
# "Test copying objects into group that doesn't exist yet in destination file"
ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B1/simple)
ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B2/simple2)
ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple)