diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index c25842e913..5411326294 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -2370,284 +2370,284 @@ process(struct Options *opt) void help(char *name) { - (void) fprintf(stderr, "Name:\n\n"); - (void) fprintf(stderr, "\t%s\n\n", name); - (void) fprintf(stderr, "\t TOOL NAME:\n"); - (void) fprintf(stderr, "\t %s\n", name); - (void) fprintf(stderr, "\t SYNTAX:\n"); - (void) fprintf(stderr, "\t %s -h[elp], OR\n", name); - (void) fprintf(stderr, "\t %s -c[onfig] [ -c[config] ...]", name); - (void) fprintf(stderr, "\t\t\t\t -o[utfile] \n\n"); - (void) fprintf(stderr, "\t PURPOSE:\n"); - (void) fprintf(stderr, "\t To convert data stored in one or more ASCII or binary files\n"); - (void) fprintf(stderr, "\t into one or more datasets (in accordance with the \n"); - (void) fprintf(stderr, "\t user-specified type and storage properties) in an existing \n"); - (void) fprintf(stderr, "\t or new HDF5 file.\n\n"); - (void) fprintf(stderr, "\t DESCRIPTION:\n"); - (void) fprintf(stderr, "\t The primary objective of the utility is to convert floating\n"); - (void) fprintf(stderr, "\t point or integer data stored in ASCII text or binary form \n"); - (void) fprintf(stderr, "\t into a data-set according to the type and storage properties\n"); - (void) fprintf(stderr, "\t specified by the user. The utility can also accept ASCII\n"); - (void) fprintf(stderr, "\t text files and store the contents in a compact form as an\n"); - (void) fprintf(stderr, "\t array of one-dimensional strings.\n\n"); - (void) fprintf(stderr, "\t The input data to be written as a data-set can be provided\n"); - (void) fprintf(stderr, "\t to the utility in one of the follwing forms:\n"); - (void) fprintf(stderr, "\t 1. ASCII text file with numeric data (floating point or \n"); - (void) fprintf(stderr, "\t integer data). \n"); - (void) fprintf(stderr, "\t 2. Binary file with native floating point data (32-bit or \n"); - (void) fprintf(stderr, "\t 64-bit) \n"); - (void) fprintf(stderr, "\t 3. Binary file with native integer (signed or unsigned)\n"); - (void) fprintf(stderr, "\t data (8-bit or 16-bit or 32-bit or 64-bit). \n"); - (void) fprintf(stderr, "\t 4. ASCII text file containing strings (text data).\n"); - (void) fprintf(stderr, "\t (Not implemented)\n\n"); - (void) fprintf(stderr, "\t Every input file is associated with a configuration file \n"); - (void) fprintf(stderr, "\t also provided as an input to the utility. (See Section \n"); - (void) fprintf(stderr, "\t \"CONFIGURATION FILE\" to know how it is to be organised).\n"); - (void) fprintf(stderr, "\t The class, size and dimensions of the input data is \n"); - (void) fprintf(stderr, "\t specified in this configuration file. A point to note is\n"); - (void) fprintf(stderr, "\t that the floating point data in the ASCII text file may be\n"); - (void) fprintf(stderr, "\t organized in the fixed floating form (for example 323.56)\n"); - (void) fprintf(stderr, "\t or in a scientific notation (for example 3.23E+02). A \n"); - (void) fprintf(stderr, "\t different input-class specification is to be used for both\n"); - (void) fprintf(stderr, "\t forms.\n\n"); - (void) fprintf(stderr, "\t The utility extracts the input data from the input file \n"); - (void) fprintf(stderr, "\t according to the specified parameters and saves it into \n"); - (void) fprintf(stderr, "\t an H5 dataset. \n\n"); - (void) fprintf(stderr, "\t The user can specify output type and storage properties in \n"); - (void) fprintf(stderr, "\t the configuration file. The user is requited to specify the \n"); - (void) fprintf(stderr, "\t path of the dataset. If the groups in the path leading to \n"); - (void) fprintf(stderr, "\t the data-set do not exist, the groups will be created by the\n"); - (void) fprintf(stderr, "\t utility. If no group is specified, the dataset will be\n"); - (void) fprintf(stderr, "\t created under the root group.\n\n"); - (void) fprintf(stderr, "\t In addition to the name, the user is also required to \n"); - (void) fprintf(stderr, "\t provide the class and size of output data to be written to \n"); - (void) fprintf(stderr, "\t the dataset and may optionally specify the output-architecure,\n"); - (void) fprintf(stderr, "\t and the output-byte-order. If output-architecture is not \n"); - (void) fprintf(stderr, "\t specified the default is NATIVE. Output-byte-orders are fixed\n"); - (void) fprintf(stderr, "\t for some architectures and may be specified only if output-\n"); - (void) fprintf(stderr, "\t architecture is IEEE, UNIX or STD.\n\n"); - (void) fprintf(stderr, "\t Also, layout and other storage properties such as \n"); - (void) fprintf(stderr, "\t compression, external storage and extendible data-sets may be\n"); - (void) fprintf(stderr, "\t optionally specified. The layout and storage properties \n"); - (void) fprintf(stderr, "\t denote how raw data is to be organized on the disk. If these \n"); - (void) fprintf(stderr, "\t options are not specified the default is Contiguous layout \n"); - (void) fprintf(stderr, "\t and storage.\n\n"); - (void) fprintf(stderr, "\t The dataset can be organized in any of the following ways:\n"); - (void) fprintf(stderr, "\t 1. Contiguous.\n"); - (void) fprintf(stderr, "\t 2. Chunked.\n"); - (void) fprintf(stderr, "\t 3. External Storage File (has to be contiguous)\n"); - (void) fprintf(stderr, "\t 4. Extendible data sets (has to be chunked)\n"); - (void) fprintf(stderr, "\t 5. Compressed. (has to be chunked)\n"); - (void) fprintf(stderr, "\t 6. Compressed & Extendible (has to be chunked)\n\n"); - (void) fprintf(stderr, "\t If the user wants to store raw data in a non-HDF file then \n"); - (void) fprintf(stderr, "\t the external storage file option is to be used and the name \n"); - (void) fprintf(stderr, "\t of the file is to be specified. \n\n"); - (void) fprintf(stderr, "\t If the user wants the dimensions of the data-set to be\n"); - (void) fprintf(stderr, "\t unlimited, the extendible data set option can be chosen. \n\n"); - (void) fprintf(stderr, "\t The user may also specify the type of compression and the \n"); - (void) fprintf(stderr, "\t level to which the data set must be compresses by setting \n"); - (void) fprintf(stderr, "\t the compressed option.\n\n"); - (void) fprintf(stderr, "\t SYNOPSIS:\n"); - (void) fprintf(stderr, "\t h5import -h[elp], OR\n"); - (void) fprintf(stderr, "\t h5import -c[onfig] \ + (void) fprintf(stdout, "Name:\n\n"); + (void) fprintf(stdout, "\t%s\n\n", name); + (void) fprintf(stdout, "\t TOOL NAME:\n"); + (void) fprintf(stdout, "\t %s\n", name); + (void) fprintf(stdout, "\t SYNTAX:\n"); + (void) fprintf(stdout, "\t %s -h[elp], OR\n", name); + (void) fprintf(stdout, "\t %s -c[onfig] [ -c[config] ...]", name); + (void) fprintf(stdout, "\t\t\t\t -o[utfile] \n\n"); + (void) fprintf(stdout, "\t PURPOSE:\n"); + (void) fprintf(stdout, "\t To convert data stored in one or more ASCII or binary files\n"); + (void) fprintf(stdout, "\t into one or more datasets (in accordance with the \n"); + (void) fprintf(stdout, "\t user-specified type and storage properties) in an existing \n"); + (void) fprintf(stdout, "\t or new HDF5 file.\n\n"); + (void) fprintf(stdout, "\t DESCRIPTION:\n"); + (void) fprintf(stdout, "\t The primary objective of the utility is to convert floating\n"); + (void) fprintf(stdout, "\t point or integer data stored in ASCII text or binary form \n"); + (void) fprintf(stdout, "\t into a data-set according to the type and storage properties\n"); + (void) fprintf(stdout, "\t specified by the user. The utility can also accept ASCII\n"); + (void) fprintf(stdout, "\t text files and store the contents in a compact form as an\n"); + (void) fprintf(stdout, "\t array of one-dimensional strings.\n\n"); + (void) fprintf(stdout, "\t The input data to be written as a data-set can be provided\n"); + (void) fprintf(stdout, "\t to the utility in one of the follwing forms:\n"); + (void) fprintf(stdout, "\t 1. ASCII text file with numeric data (floating point or \n"); + (void) fprintf(stdout, "\t integer data). \n"); + (void) fprintf(stdout, "\t 2. Binary file with native floating point data (32-bit or \n"); + (void) fprintf(stdout, "\t 64-bit) \n"); + (void) fprintf(stdout, "\t 3. Binary file with native integer (signed or unsigned)\n"); + (void) fprintf(stdout, "\t data (8-bit or 16-bit or 32-bit or 64-bit). \n"); + (void) fprintf(stdout, "\t 4. ASCII text file containing strings (text data).\n"); + (void) fprintf(stdout, "\t (Not implemented)\n\n"); + (void) fprintf(stdout, "\t Every input file is associated with a configuration file \n"); + (void) fprintf(stdout, "\t also provided as an input to the utility. (See Section \n"); + (void) fprintf(stdout, "\t \"CONFIGURATION FILE\" to know how it is to be organised).\n"); + (void) fprintf(stdout, "\t The class, size and dimensions of the input data is \n"); + (void) fprintf(stdout, "\t specified in this configuration file. A point to note is\n"); + (void) fprintf(stdout, "\t that the floating point data in the ASCII text file may be\n"); + (void) fprintf(stdout, "\t organized in the fixed floating form (for example 323.56)\n"); + (void) fprintf(stdout, "\t or in a scientific notation (for example 3.23E+02). A \n"); + (void) fprintf(stdout, "\t different input-class specification is to be used for both\n"); + (void) fprintf(stdout, "\t forms.\n\n"); + (void) fprintf(stdout, "\t The utility extracts the input data from the input file \n"); + (void) fprintf(stdout, "\t according to the specified parameters and saves it into \n"); + (void) fprintf(stdout, "\t an H5 dataset. \n\n"); + (void) fprintf(stdout, "\t The user can specify output type and storage properties in \n"); + (void) fprintf(stdout, "\t the configuration file. The user is requited to specify the \n"); + (void) fprintf(stdout, "\t path of the dataset. If the groups in the path leading to \n"); + (void) fprintf(stdout, "\t the data-set do not exist, the groups will be created by the\n"); + (void) fprintf(stdout, "\t utility. If no group is specified, the dataset will be\n"); + (void) fprintf(stdout, "\t created under the root group.\n\n"); + (void) fprintf(stdout, "\t In addition to the name, the user is also required to \n"); + (void) fprintf(stdout, "\t provide the class and size of output data to be written to \n"); + (void) fprintf(stdout, "\t the dataset and may optionally specify the output-architecure,\n"); + (void) fprintf(stdout, "\t and the output-byte-order. If output-architecture is not \n"); + (void) fprintf(stdout, "\t specified the default is NATIVE. Output-byte-orders are fixed\n"); + (void) fprintf(stdout, "\t for some architectures and may be specified only if output-\n"); + (void) fprintf(stdout, "\t architecture is IEEE, UNIX or STD.\n\n"); + (void) fprintf(stdout, "\t Also, layout and other storage properties such as \n"); + (void) fprintf(stdout, "\t compression, external storage and extendible data-sets may be\n"); + (void) fprintf(stdout, "\t optionally specified. The layout and storage properties \n"); + (void) fprintf(stdout, "\t denote how raw data is to be organized on the disk. If these \n"); + (void) fprintf(stdout, "\t options are not specified the default is Contiguous layout \n"); + (void) fprintf(stdout, "\t and storage.\n\n"); + (void) fprintf(stdout, "\t The dataset can be organized in any of the following ways:\n"); + (void) fprintf(stdout, "\t 1. Contiguous.\n"); + (void) fprintf(stdout, "\t 2. Chunked.\n"); + (void) fprintf(stdout, "\t 3. External Storage File (has to be contiguous)\n"); + (void) fprintf(stdout, "\t 4. Extendible data sets (has to be chunked)\n"); + (void) fprintf(stdout, "\t 5. Compressed. (has to be chunked)\n"); + (void) fprintf(stdout, "\t 6. Compressed & Extendible (has to be chunked)\n\n"); + (void) fprintf(stdout, "\t If the user wants to store raw data in a non-HDF file then \n"); + (void) fprintf(stdout, "\t the external storage file option is to be used and the name \n"); + (void) fprintf(stdout, "\t of the file is to be specified. \n\n"); + (void) fprintf(stdout, "\t If the user wants the dimensions of the data-set to be\n"); + (void) fprintf(stdout, "\t unlimited, the extendible data set option can be chosen. \n\n"); + (void) fprintf(stdout, "\t The user may also specify the type of compression and the \n"); + (void) fprintf(stdout, "\t level to which the data set must be compresses by setting \n"); + (void) fprintf(stdout, "\t the compressed option.\n\n"); + (void) fprintf(stdout, "\t SYNOPSIS:\n"); + (void) fprintf(stdout, "\t h5import -h[elp], OR\n"); + (void) fprintf(stdout, "\t h5import -c[onfig] \ [ -c[config] ...] -o[utfile] \n\n"); - (void) fprintf(stderr, "\t -h[elp]:\n"); - (void) fprintf(stderr, "\t Prints this summary of usage, and exits.\n\n"); - (void) fprintf(stderr, "\t :\n"); - (void) fprintf(stderr, "\t Name of the Input file(s), containing a \n"); - (void) fprintf(stderr, "\t single n-dimensional floating point or integer array \n"); - (void) fprintf(stderr, "\t in either ASCII text, native floating point(32-bit \n"); - (void) fprintf(stderr, "\t or 64-bit) or native integer(8-bit or 16-bit or \n"); - (void) fprintf(stderr, "\t 32-bit or 64-bit). Data to be specified in the order\n"); - (void) fprintf(stderr, "\t of fastest changing dimensions first.\n\n"); - (void) fprintf(stderr, "\t -c[config] :\n"); - (void) fprintf(stderr, "\t Every input file should be associated with a \n"); - (void) fprintf(stderr, "\t configuration file and this is done by the -c option.\n"); - (void) fprintf(stderr, "\t is the name of the configuration file.\n"); - (void) fprintf(stderr, "\t (See Section \"CONFIGURATION FILE\")\n\n"); - (void) fprintf(stderr, "\t -o[utfile] :\n"); - (void) fprintf(stderr, "\t Name of the HDF 5 output file. Data from one or more \n"); - (void) fprintf(stderr, "\t input files are stored as one or more data sets in \n"); - (void) fprintf(stderr, "\t . The output file may be an existing file or \n"); - (void) fprintf(stderr, "\t it maybe new in which case it will be created.\n\n\n"); - (void) fprintf(stderr, "\t CONFIGURATION FILE:\n"); - (void) fprintf(stderr, "\t The configuration file is an ASCII text file and must be \n"); - (void) fprintf(stderr, "\t organized as \"CONFIG-KEYWORD VALUE\" pairs, one pair on each \n"); - (void) fprintf(stderr, "\t line.\n\n"); - (void) fprintf(stderr, "\t The configuration file may have the following keywords each \n"); - (void) fprintf(stderr, "\t followed by an acceptable value.\n\n"); - (void) fprintf(stderr, "\t Required KEYWORDS:\n"); - (void) fprintf(stderr, "\t PATH\n"); - (void) fprintf(stderr, "\t INPUT-CLASS\n"); - (void) fprintf(stderr, "\t INPUT-SIZE\n"); - (void) fprintf(stderr, "\t RANK\n"); - (void) fprintf(stderr, "\t DIMENSION-SIZES\n"); - (void) fprintf(stderr, "\t OUTPUT-CLASS\n"); - (void) fprintf(stderr, "\t OUTPUT-SIZE\n\n"); - (void) fprintf(stderr, "\t Optional KEYWORDS:\n"); - (void) fprintf(stderr, "\t OUTPUT-ARCHITECTURE\n"); - (void) fprintf(stderr, "\t OUTPUT-BYTE-ORDER\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES\n"); - (void) fprintf(stderr, "\t COMPRESSION-TYPE\n"); - (void) fprintf(stderr, "\t COMPRESSION-PARAM\n"); - (void) fprintf(stderr, "\t EXTERNAL-STORAGE\n"); - (void) fprintf(stderr, "\t MAXIMUM-DIMENSIONS\n\n\n"); - (void) fprintf(stderr, "\t Values for keywords:\n"); - (void) fprintf(stderr, "\t PATH:\n"); - (void) fprintf(stderr, "\t Strings separated by spaces to represent\n"); - (void) fprintf(stderr, "\t the path of the data-set. If the groups in\n"); - (void) fprintf(stderr, "\t the path do no exist, they will be created. \n"); - (void) fprintf(stderr, "\t For example,\n"); - (void) fprintf(stderr, "\t PATH grp1/grp2/dataset1\n"); - (void) fprintf(stderr, "\t PATH: keyword\n"); - (void) fprintf(stderr, "\t grp1: group under the root. If\n"); - (void) fprintf(stderr, "\t non-existent will be created.\n"); - (void) fprintf(stderr, "\t grp2: group under grp1. If \n"); - (void) fprintf(stderr, "\t non-existent will be created \n"); - (void) fprintf(stderr, "\t under grp1.\n"); - (void) fprintf(stderr, "\t dataset1: the name of the data-set \n"); - (void) fprintf(stderr, "\t to be created.\n\n"); - (void) fprintf(stderr, "\t INPUT-CLASS:\n"); - (void) fprintf(stderr, "\t String denoting the type of input data.\n"); - (void) fprintf(stderr, "\t (\"TEXTIN\", \"TEXTFP\", \"TEXTFPE\", \"FP\", \"IN\", \n"); - (void) fprintf(stderr, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n"); - (void) fprintf(stderr, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n"); - (void) fprintf(stderr, "\t file with signed integer data in ASCII form,\n"); - (void) fprintf(stderr, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n"); - (void) fprintf(stderr, "\t file with unsigned integer data in ASCII form,\n"); - (void) fprintf(stderr, "\t \"TEXTFP\" denotes an ASCII text file containing\n"); - (void) fprintf(stderr, "\t floating point data in the fixed notation\n"); - (void) fprintf(stderr, "\t (325.34),\n"); - (void) fprintf(stderr, "\t \"TEXTFPE\" denotes an ASCII text file containing\n"); - (void) fprintf(stderr, "\t floating point data in the scientific notation\n"); - (void) fprintf(stderr, "\t (3.2534E+02),\n"); - (void) fprintf(stderr, "\t \"FP\" denotes a floating point binary file,\n"); - (void) fprintf(stderr, "\t \"IN\" denotes a signed integer binary file,\n"); - (void) fprintf(stderr, "\t \"UIN\" denotes an unsigned integer binary file,\n"); - (void) fprintf(stderr, "\t & \"STR\" denotes an ASCII text file the \n"); - (void) fprintf(stderr, "\t contents of which should be stored as an 1-D \n"); - (void) fprintf(stderr, "\t array of strings.\n"); - (void) fprintf(stderr, "\t If INPUT-CLASS is \"STR\", then RANK, \n"); - (void) fprintf(stderr, "\t DIMENSION-SIZES, OUTPUT-CLASS, OUTPUT-SIZE, \n"); - (void) fprintf(stderr, "\t OUTPUT-ARCHITECTURE and OUTPUT-BYTE-ORDER \n"); - (void) fprintf(stderr, "\t will be ignored.\n\n\n"); - (void) fprintf(stderr, "\t INPUT-SIZE:\n"); - (void) fprintf(stderr, "\t Integer denoting the size of the input data \n"); - (void) fprintf(stderr, "\t (8, 16, 32, 64). \n\n"); - (void) fprintf(stderr, "\t For floating point,\n"); - (void) fprintf(stderr, "\t INPUT-SIZE can be 32 or 64.\n"); - (void) fprintf(stderr, "\t For integers (signed and unsigned)\n"); - (void) fprintf(stderr, "\t INPUT-SIZE can be 8, 16, 32 or 64.\n\n"); - (void) fprintf(stderr, "\t RANK:\n"); - (void) fprintf(stderr, "\t Integer denoting the number of dimensions.\n\n"); - (void) fprintf(stderr, "\t DIMENSION-SIZES:\n"); - (void) fprintf(stderr, "\t Integers separated by spaces to denote the \n"); - (void) fprintf(stderr, "\t dimension sizes for the no. of dimensions \n"); - (void) fprintf(stderr, "\t determined by rank.\n\n"); - (void) fprintf(stderr, "\t OUTPUT-CLASS:\n"); - (void) fprintf(stderr, "\t String dentoting data type of the dataset to \n"); - (void) fprintf(stderr, "\t be written (\"IN\",\"FP\", \"UIN\")\n\n"); - (void) fprintf(stderr, "\t OUTPUT-SIZE:\n"); - (void) fprintf(stderr, "\t Integer denoting the size of the data in the \n"); - (void) fprintf(stderr, "\t output dataset to be written.\n"); - (void) fprintf(stderr, "\t If OUTPUT-CLASS is \"FP\", OUTPUT-SIZE can be \n"); - (void) fprintf(stderr, "\t 32 or 64.\n"); - (void) fprintf(stderr, "\t If OUTPUT-CLASS is \"IN\" or \"UIN\", OUTPUT-SIZE\n"); - (void) fprintf(stderr, "\t can be 8, 16, 32 or 64.\n\n"); - (void) fprintf(stderr, "\t OUTPUT-ARCHITECTURE:\n"); - (void) fprintf(stderr, "\t STRING denoting the type of output \n"); - (void) fprintf(stderr, "\t architecture. Can accept the following values\n"); - (void) fprintf(stderr, "\t STD\n"); - (void) fprintf(stderr, "\t IEEE\n"); - (void) fprintf(stderr, "\t INTEL\n"); - (void) fprintf(stderr, "\t CRAY\n"); - (void) fprintf(stderr, "\t MIPS\n"); - (void) fprintf(stderr, "\t ALPHA\n"); - (void) fprintf(stderr, "\t NATIVE (default)\n"); - (void) fprintf(stderr, "\t UNIX\n\n"); - (void) fprintf(stderr, "\t OUTPUT-BYTE-ORDER:\n"); - (void) fprintf(stderr, "\t String denoting the output-byte-order. Ignored\n"); - (void) fprintf(stderr, "\t if the OUTPUT-ARCHITECTURE is not specified or\n"); - (void) fprintf(stderr, "\t if it is IEEE, UNIX or STD. Can accept the \n"); - (void) fprintf(stderr, "\t following values.\n"); - (void) fprintf(stderr, "\t BE (default)\n"); - (void) fprintf(stderr, "\t LE\n\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES:\n"); - (void) fprintf(stderr, "\t Integers separated by spaces to denote the \n"); - (void) fprintf(stderr, "\t dimension sizes of the chunk for the no. of \n"); - (void) fprintf(stderr, "\t dimensions determined by rank. Required field\n"); - (void) fprintf(stderr, "\t to denote that the dataset will be stored with\n"); - (void) fprintf(stderr, "\t chunked storage. If this field is absent the\n"); - (void) fprintf(stderr, "\t dataset will be stored with contiguous storage.\n\n"); - (void) fprintf(stderr, "\t COMPRESSION-TYPE:\n"); - (void) fprintf(stderr, "\t String denoting the type of compression to be\n"); - (void) fprintf(stderr, "\t used with the chunked storage. Requires the\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n"); - (void) fprintf(stderr, "\t currently supported compression method is GZIP. \n"); - (void) fprintf(stderr, "\t Will accept the following value\n"); - (void) fprintf(stderr, "\t GZIP\n\n"); - (void) fprintf(stderr, "\t COMPRESSION-PARAM:\n"); - (void) fprintf(stderr, "\t Integer used to denote compression level and \n"); - (void) fprintf(stderr, "\t this option is to be always specified when \n"); - (void) fprintf(stderr, "\t the COMPRESSION-TYPE option is specified. The\n"); - (void) fprintf(stderr, "\t values are applicable only to GZIP \n"); - (void) fprintf(stderr, "\t compression.\n"); - (void) fprintf(stderr, "\t Value 1-9: The level of Compression. \n"); - (void) fprintf(stderr, "\t 1 will result in the fastest \n"); - (void) fprintf(stderr, "\t compression while 9 will result in \n"); - (void) fprintf(stderr, "\t the best compression ratio. The default\n"); - (void) fprintf(stderr, "\t level of compression is 6.\n\n"); - (void) fprintf(stderr, "\t EXTERNAL-STORAGE:\n"); - (void) fprintf(stderr, "\t String to denote the name of the non-HDF5 file \n"); - (void) fprintf(stderr, "\t to store data to. Cannot be used if CHUNKED-\n"); - (void) fprintf(stderr, "\t DIMENSIONS or COMPRESSION-TYPE or EXTENDIBLE-\n"); - (void) fprintf(stderr, "\t DATASET is specified.\n"); - (void) fprintf(stderr, "\t Value : the name of the \n"); - (void) fprintf(stderr, "\t external file as a string to be used.\n\n"); - (void) fprintf(stderr, "\t MAXIMUM-DIMENSIONS:\n"); - (void) fprintf(stderr, "\t Integers separated by spaces to denote the \n"); - (void) fprintf(stderr, "\t maximum dimension sizes of all the \n"); - (void) fprintf(stderr, "\t dimensions determined by rank. Requires the\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n"); - (void) fprintf(stderr, "\t -1 for any dimension implies UNLIMITED \n"); - (void) fprintf(stderr, "\t DIMENSION size for that particular dimension.\n\n"); - (void) fprintf(stderr, "\t EXAMPLES:\n"); - (void) fprintf(stderr, "\t 1. Configuration File may look like:\n\n"); - (void) fprintf(stderr, "\t PATH work h5 pkamat First-set\n"); - (void) fprintf(stderr, "\t INPUT-CLASS TEXTFP\n"); - (void) fprintf(stderr, "\t RANK 3\n"); - (void) fprintf(stderr, "\t DIMENSION-SIZES 5 2 4\n"); - (void) fprintf(stderr, "\t OUTPUT-CLASS FP\n"); - (void) fprintf(stderr, "\t OUTPUT-SIZE 64\n"); - (void) fprintf(stderr, "\t OUTPUT-ARCHITECTURE IEEE\n"); - (void) fprintf(stderr, "\t OUTPUT-BYTE-ORDER LE\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n"); - (void) fprintf(stderr, "\t The above configuration will accept a floating point array \n"); - (void) fprintf(stderr, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n"); - (void) fprintf(stderr, "\t specified and will save it in a chunked data-set (of pattern \n"); - (void) fprintf(stderr, "\t 2 X 2 X 2) of 64-bit floating point in the little-endian order \n"); - (void) fprintf(stderr, "\t and IEEE architecture. The dataset will be stored at\n"); - (void) fprintf(stderr, "\t \"/work/h5/pkamat/First-set\"\n\n"); - (void) fprintf(stderr, "\t 2. Another configuration could be:\n\n"); - (void) fprintf(stderr, "\t PATH Second-set\n"); - (void) fprintf(stderr, "\t INPUT-CLASS IN \n"); - (void) fprintf(stderr, "\t RANK 5\n"); - (void) fprintf(stderr, "\t DIMENSION-SIZES 6 3 5 2 4\n"); - (void) fprintf(stderr, "\t OUTPUT-CLASS IN\n"); - (void) fprintf(stderr, "\t OUTPUT-SIZE 32\n"); - (void) fprintf(stderr, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n"); - (void) fprintf(stderr, "\t EXTENDIBLE-DATASET 1 3 \n"); - (void) fprintf(stderr, "\t COMPRESSION-TYPE GZIP\n"); - (void) fprintf(stderr, "\t COMPRESSION-PARAM 7\n\n\n"); - (void) fprintf(stderr, "\t The above configuration will accept an integer array \n"); - (void) fprintf(stderr, "\t (6 X 3 X 5 x 2 x 4) in a binary file with the rank and \n"); - (void) fprintf(stderr, "\t dimension sizes specified and will save it in a chunked data-set\n"); - (void) fprintf(stderr, "\t (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in \n"); - (void) fprintf(stderr, "\t native format (as output-architecure is not specified). The \n"); - (void) fprintf(stderr, "\t first and the third dimension will be defined as unlimited. The \n"); - (void) fprintf(stderr, "\t data-set will be compressed using GZIP and a compression level \n"); - (void) fprintf(stderr, "\t of 7.\n"); - (void) fprintf(stderr, "\t The dataset will be stored at \"/Second-set\"\n\n"); + (void) fprintf(stdout, "\t -h[elp]:\n"); + (void) fprintf(stdout, "\t Prints this summary of usage, and exits.\n\n"); + (void) fprintf(stdout, "\t :\n"); + (void) fprintf(stdout, "\t Name of the Input file(s), containing a \n"); + (void) fprintf(stdout, "\t single n-dimensional floating point or integer array \n"); + (void) fprintf(stdout, "\t in either ASCII text, native floating point(32-bit \n"); + (void) fprintf(stdout, "\t or 64-bit) or native integer(8-bit or 16-bit or \n"); + (void) fprintf(stdout, "\t 32-bit or 64-bit). Data to be specified in the order\n"); + (void) fprintf(stdout, "\t of fastest changing dimensions first.\n\n"); + (void) fprintf(stdout, "\t -c[config] :\n"); + (void) fprintf(stdout, "\t Every input file should be associated with a \n"); + (void) fprintf(stdout, "\t configuration file and this is done by the -c option.\n"); + (void) fprintf(stdout, "\t is the name of the configuration file.\n"); + (void) fprintf(stdout, "\t (See Section \"CONFIGURATION FILE\")\n\n"); + (void) fprintf(stdout, "\t -o[utfile] :\n"); + (void) fprintf(stdout, "\t Name of the HDF 5 output file. Data from one or more \n"); + (void) fprintf(stdout, "\t input files are stored as one or more data sets in \n"); + (void) fprintf(stdout, "\t . The output file may be an existing file or \n"); + (void) fprintf(stdout, "\t it maybe new in which case it will be created.\n\n\n"); + (void) fprintf(stdout, "\t CONFIGURATION FILE:\n"); + (void) fprintf(stdout, "\t The configuration file is an ASCII text file and must be \n"); + (void) fprintf(stdout, "\t organized as \"CONFIG-KEYWORD VALUE\" pairs, one pair on each \n"); + (void) fprintf(stdout, "\t line.\n\n"); + (void) fprintf(stdout, "\t The configuration file may have the following keywords each \n"); + (void) fprintf(stdout, "\t followed by an acceptable value.\n\n"); + (void) fprintf(stdout, "\t Required KEYWORDS:\n"); + (void) fprintf(stdout, "\t PATH\n"); + (void) fprintf(stdout, "\t INPUT-CLASS\n"); + (void) fprintf(stdout, "\t INPUT-SIZE\n"); + (void) fprintf(stdout, "\t RANK\n"); + (void) fprintf(stdout, "\t DIMENSION-SIZES\n"); + (void) fprintf(stdout, "\t OUTPUT-CLASS\n"); + (void) fprintf(stdout, "\t OUTPUT-SIZE\n\n"); + (void) fprintf(stdout, "\t Optional KEYWORDS:\n"); + (void) fprintf(stdout, "\t OUTPUT-ARCHITECTURE\n"); + (void) fprintf(stdout, "\t OUTPUT-BYTE-ORDER\n"); + (void) fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES\n"); + (void) fprintf(stdout, "\t COMPRESSION-TYPE\n"); + (void) fprintf(stdout, "\t COMPRESSION-PARAM\n"); + (void) fprintf(stdout, "\t EXTERNAL-STORAGE\n"); + (void) fprintf(stdout, "\t MAXIMUM-DIMENSIONS\n\n\n"); + (void) fprintf(stdout, "\t Values for keywords:\n"); + (void) fprintf(stdout, "\t PATH:\n"); + (void) fprintf(stdout, "\t Strings separated by spaces to represent\n"); + (void) fprintf(stdout, "\t the path of the data-set. If the groups in\n"); + (void) fprintf(stdout, "\t the path do no exist, they will be created. \n"); + (void) fprintf(stdout, "\t For example,\n"); + (void) fprintf(stdout, "\t PATH grp1/grp2/dataset1\n"); + (void) fprintf(stdout, "\t PATH: keyword\n"); + (void) fprintf(stdout, "\t grp1: group under the root. If\n"); + (void) fprintf(stdout, "\t non-existent will be created.\n"); + (void) fprintf(stdout, "\t grp2: group under grp1. If \n"); + (void) fprintf(stdout, "\t non-existent will be created \n"); + (void) fprintf(stdout, "\t under grp1.\n"); + (void) fprintf(stdout, "\t dataset1: the name of the data-set \n"); + (void) fprintf(stdout, "\t to be created.\n\n"); + (void) fprintf(stdout, "\t INPUT-CLASS:\n"); + (void) fprintf(stdout, "\t String denoting the type of input data.\n"); + (void) fprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"TEXTFPE\", \"FP\", \"IN\", \n"); + (void) fprintf(stdout, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n"); + (void) fprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n"); + (void) fprintf(stdout, "\t file with signed integer data in ASCII form,\n"); + (void) fprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n"); + (void) fprintf(stdout, "\t file with unsigned integer data in ASCII form,\n"); + (void) fprintf(stdout, "\t \"TEXTFP\" denotes an ASCII text file containing\n"); + (void) fprintf(stdout, "\t floating point data in the fixed notation\n"); + (void) fprintf(stdout, "\t (325.34),\n"); + (void) fprintf(stdout, "\t \"TEXTFPE\" denotes an ASCII text file containing\n"); + (void) fprintf(stdout, "\t floating point data in the scientific notation\n"); + (void) fprintf(stdout, "\t (3.2534E+02),\n"); + (void) fprintf(stdout, "\t \"FP\" denotes a floating point binary file,\n"); + (void) fprintf(stdout, "\t \"IN\" denotes a signed integer binary file,\n"); + (void) fprintf(stdout, "\t \"UIN\" denotes an unsigned integer binary file,\n"); + (void) fprintf(stdout, "\t & \"STR\" denotes an ASCII text file the \n"); + (void) fprintf(stdout, "\t contents of which should be stored as an 1-D \n"); + (void) fprintf(stdout, "\t array of strings.\n"); + (void) fprintf(stdout, "\t If INPUT-CLASS is \"STR\", then RANK, \n"); + (void) fprintf(stdout, "\t DIMENSION-SIZES, OUTPUT-CLASS, OUTPUT-SIZE, \n"); + (void) fprintf(stdout, "\t OUTPUT-ARCHITECTURE and OUTPUT-BYTE-ORDER \n"); + (void) fprintf(stdout, "\t will be ignored.\n\n\n"); + (void) fprintf(stdout, "\t INPUT-SIZE:\n"); + (void) fprintf(stdout, "\t Integer denoting the size of the input data \n"); + (void) fprintf(stdout, "\t (8, 16, 32, 64). \n\n"); + (void) fprintf(stdout, "\t For floating point,\n"); + (void) fprintf(stdout, "\t INPUT-SIZE can be 32 or 64.\n"); + (void) fprintf(stdout, "\t For integers (signed and unsigned)\n"); + (void) fprintf(stdout, "\t INPUT-SIZE can be 8, 16, 32 or 64.\n\n"); + (void) fprintf(stdout, "\t RANK:\n"); + (void) fprintf(stdout, "\t Integer denoting the number of dimensions.\n\n"); + (void) fprintf(stdout, "\t DIMENSION-SIZES:\n"); + (void) fprintf(stdout, "\t Integers separated by spaces to denote the \n"); + (void) fprintf(stdout, "\t dimension sizes for the no. of dimensions \n"); + (void) fprintf(stdout, "\t determined by rank.\n\n"); + (void) fprintf(stdout, "\t OUTPUT-CLASS:\n"); + (void) fprintf(stdout, "\t String dentoting data type of the dataset to \n"); + (void) fprintf(stdout, "\t be written (\"IN\",\"FP\", \"UIN\")\n\n"); + (void) fprintf(stdout, "\t OUTPUT-SIZE:\n"); + (void) fprintf(stdout, "\t Integer denoting the size of the data in the \n"); + (void) fprintf(stdout, "\t output dataset to be written.\n"); + (void) fprintf(stdout, "\t If OUTPUT-CLASS is \"FP\", OUTPUT-SIZE can be \n"); + (void) fprintf(stdout, "\t 32 or 64.\n"); + (void) fprintf(stdout, "\t If OUTPUT-CLASS is \"IN\" or \"UIN\", OUTPUT-SIZE\n"); + (void) fprintf(stdout, "\t can be 8, 16, 32 or 64.\n\n"); + (void) fprintf(stdout, "\t OUTPUT-ARCHITECTURE:\n"); + (void) fprintf(stdout, "\t STRING denoting the type of output \n"); + (void) fprintf(stdout, "\t architecture. Can accept the following values\n"); + (void) fprintf(stdout, "\t STD\n"); + (void) fprintf(stdout, "\t IEEE\n"); + (void) fprintf(stdout, "\t INTEL\n"); + (void) fprintf(stdout, "\t CRAY\n"); + (void) fprintf(stdout, "\t MIPS\n"); + (void) fprintf(stdout, "\t ALPHA\n"); + (void) fprintf(stdout, "\t NATIVE (default)\n"); + (void) fprintf(stdout, "\t UNIX\n\n"); + (void) fprintf(stdout, "\t OUTPUT-BYTE-ORDER:\n"); + (void) fprintf(stdout, "\t String denoting the output-byte-order. Ignored\n"); + (void) fprintf(stdout, "\t if the OUTPUT-ARCHITECTURE is not specified or\n"); + (void) fprintf(stdout, "\t if it is IEEE, UNIX or STD. Can accept the \n"); + (void) fprintf(stdout, "\t following values.\n"); + (void) fprintf(stdout, "\t BE (default)\n"); + (void) fprintf(stdout, "\t LE\n\n"); + (void) fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES:\n"); + (void) fprintf(stdout, "\t Integers separated by spaces to denote the \n"); + (void) fprintf(stdout, "\t dimension sizes of the chunk for the no. of \n"); + (void) fprintf(stdout, "\t dimensions determined by rank. Required field\n"); + (void) fprintf(stdout, "\t to denote that the dataset will be stored with\n"); + (void) fprintf(stdout, "\t chunked storage. If this field is absent the\n"); + (void) fprintf(stdout, "\t dataset will be stored with contiguous storage.\n\n"); + (void) fprintf(stdout, "\t COMPRESSION-TYPE:\n"); + (void) fprintf(stdout, "\t String denoting the type of compression to be\n"); + (void) fprintf(stdout, "\t used with the chunked storage. Requires the\n"); + (void) fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n"); + (void) fprintf(stdout, "\t currently supported compression method is GZIP. \n"); + (void) fprintf(stdout, "\t Will accept the following value\n"); + (void) fprintf(stdout, "\t GZIP\n\n"); + (void) fprintf(stdout, "\t COMPRESSION-PARAM:\n"); + (void) fprintf(stdout, "\t Integer used to denote compression level and \n"); + (void) fprintf(stdout, "\t this option is to be always specified when \n"); + (void) fprintf(stdout, "\t the COMPRESSION-TYPE option is specified. The\n"); + (void) fprintf(stdout, "\t values are applicable only to GZIP \n"); + (void) fprintf(stdout, "\t compression.\n"); + (void) fprintf(stdout, "\t Value 1-9: The level of Compression. \n"); + (void) fprintf(stdout, "\t 1 will result in the fastest \n"); + (void) fprintf(stdout, "\t compression while 9 will result in \n"); + (void) fprintf(stdout, "\t the best compression ratio. The default\n"); + (void) fprintf(stdout, "\t level of compression is 6.\n\n"); + (void) fprintf(stdout, "\t EXTERNAL-STORAGE:\n"); + (void) fprintf(stdout, "\t String to denote the name of the non-HDF5 file \n"); + (void) fprintf(stdout, "\t to store data to. Cannot be used if CHUNKED-\n"); + (void) fprintf(stdout, "\t DIMENSIONS or COMPRESSION-TYPE or EXTENDIBLE-\n"); + (void) fprintf(stdout, "\t DATASET is specified.\n"); + (void) fprintf(stdout, "\t Value : the name of the \n"); + (void) fprintf(stdout, "\t external file as a string to be used.\n\n"); + (void) fprintf(stdout, "\t MAXIMUM-DIMENSIONS:\n"); + (void) fprintf(stdout, "\t Integers separated by spaces to denote the \n"); + (void) fprintf(stdout, "\t maximum dimension sizes of all the \n"); + (void) fprintf(stdout, "\t dimensions determined by rank. Requires the\n"); + (void) fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n"); + (void) fprintf(stdout, "\t -1 for any dimension implies UNLIMITED \n"); + (void) fprintf(stdout, "\t DIMENSION size for that particular dimension.\n\n"); + (void) fprintf(stdout, "\t EXAMPLES:\n"); + (void) fprintf(stdout, "\t 1. Configuration File may look like:\n\n"); + (void) fprintf(stdout, "\t PATH work h5 pkamat First-set\n"); + (void) fprintf(stdout, "\t INPUT-CLASS TEXTFP\n"); + (void) fprintf(stdout, "\t RANK 3\n"); + (void) fprintf(stdout, "\t DIMENSION-SIZES 5 2 4\n"); + (void) fprintf(stdout, "\t OUTPUT-CLASS FP\n"); + (void) fprintf(stdout, "\t OUTPUT-SIZE 64\n"); + (void) fprintf(stdout, "\t OUTPUT-ARCHITECTURE IEEE\n"); + (void) fprintf(stdout, "\t OUTPUT-BYTE-ORDER LE\n"); + (void) fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n"); + (void) fprintf(stdout, "\t The above configuration will accept a floating point array \n"); + (void) fprintf(stdout, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n"); + (void) fprintf(stdout, "\t specified and will save it in a chunked data-set (of pattern \n"); + (void) fprintf(stdout, "\t 2 X 2 X 2) of 64-bit floating point in the little-endian order \n"); + (void) fprintf(stdout, "\t and IEEE architecture. The dataset will be stored at\n"); + (void) fprintf(stdout, "\t \"/work/h5/pkamat/First-set\"\n\n"); + (void) fprintf(stdout, "\t 2. Another configuration could be:\n\n"); + (void) fprintf(stdout, "\t PATH Second-set\n"); + (void) fprintf(stdout, "\t INPUT-CLASS IN \n"); + (void) fprintf(stdout, "\t RANK 5\n"); + (void) fprintf(stdout, "\t DIMENSION-SIZES 6 3 5 2 4\n"); + (void) fprintf(stdout, "\t OUTPUT-CLASS IN\n"); + (void) fprintf(stdout, "\t OUTPUT-SIZE 32\n"); + (void) fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n"); + (void) fprintf(stdout, "\t EXTENDIBLE-DATASET 1 3 \n"); + (void) fprintf(stdout, "\t COMPRESSION-TYPE GZIP\n"); + (void) fprintf(stdout, "\t COMPRESSION-PARAM 7\n\n\n"); + (void) fprintf(stdout, "\t The above configuration will accept an integer array \n"); + (void) fprintf(stdout, "\t (6 X 3 X 5 x 2 x 4) in a binary file with the rank and \n"); + (void) fprintf(stdout, "\t dimension sizes specified and will save it in a chunked data-set\n"); + (void) fprintf(stdout, "\t (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in \n"); + (void) fprintf(stdout, "\t native format (as output-architecure is not specified). The \n"); + (void) fprintf(stdout, "\t first and the third dimension will be defined as unlimited. The \n"); + (void) fprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n"); + (void) fprintf(stdout, "\t of 7.\n"); + (void) fprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n"); return; } @@ -2655,8 +2655,8 @@ help(char *name) void usage(char *name) { - (void) fprintf(stderr, "\nUsage:\t%s -h[elp], OR\n", name); - (void) fprintf(stderr, "\t%s -c[onfig] \ + (void) fprintf(stdout, "\nUsage:\t%s -h[elp], OR\n", name); + (void) fprintf(stdout, "\t%s -c[onfig] \ [ -c[config] ...] -o[utfile] \n\n", name); return; }