From 6bc41c8b209fd0cc9cc3d088eb425ddbcf681a53 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Tue, 19 Feb 2008 14:12:10 -0500 Subject: [svn-r14613] 971 (B2) h5import bug on Windows w/binary datasets. CLOSED. fread in windows needs a binary file to be open with "rb" instead of "r" otherwise it terminates execution if an end of file character is found on the input file. Besides that the binary file generated needs to be open with "wb" , otherwise an end of line character is read twice. DONE NOW for 1.8, already done previously for 1.6 renamed the h5import test files to have the extensions text input files = .txt binary input files = .bin configuration files = .conf hdf5 files = .h5 besides that in very test the files have the same name except extension. For example TOOLTEST txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 The convention for the test name is for example, for "txtin16" "txt" for text then "in16" means integer 16 size Tested: linux, solaris --- tools/h5import/h5import.c | 55 ++++- tools/h5import/h5importtest.c | 439 ++++++++++++++++++++------------- tools/h5import/h5importtestutil.sh | 55 +++-- tools/h5import/testfiles/binfp64.conf | 13 + tools/h5import/testfiles/binfp64.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binin16.conf | 12 + tools/h5import/testfiles/binin16.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binin32.conf | 12 + tools/h5import/testfiles/binin32.h5 | Bin 0 -> 9472 bytes tools/h5import/testfiles/binin8.conf | 16 ++ tools/h5import/testfiles/binin8.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binin8w.conf | 9 + tools/h5import/testfiles/binin8w.h5 | Bin 0 -> 2852 bytes tools/h5import/testfiles/binuin16.conf | 12 + tools/h5import/testfiles/binuin16.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binuin32.conf | 12 + tools/h5import/testfiles/binuin32.h5 | Bin 0 -> 6384 bytes tools/h5import/testfiles/conbfp64 | 13 - tools/h5import/testfiles/conbin16 | 12 - tools/h5import/testfiles/conbin32 | 12 - tools/h5import/testfiles/conbin8 | 16 -- tools/h5import/testfiles/conbuin16 | 12 - tools/h5import/testfiles/conbuin32 | 12 - tools/h5import/testfiles/fp1 | 9 - tools/h5import/testfiles/fp2 | 19 -- tools/h5import/testfiles/in1 | 15 -- tools/h5import/testfiles/test1.h5 | Bin 4192 -> 0 bytes tools/h5import/testfiles/test10.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/test11.h5 | Bin 9472 -> 0 bytes tools/h5import/testfiles/test12.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/test13.h5 | Bin 6384 -> 0 bytes tools/h5import/testfiles/test2.h5 | Bin 9784 -> 0 bytes tools/h5import/testfiles/test3.h5 | Bin 9784 -> 0 bytes tools/h5import/testfiles/test4.h5 | Bin 6240 -> 0 bytes tools/h5import/testfiles/test5.h5 | Bin 10240 -> 0 bytes tools/h5import/testfiles/test6.h5 | Bin 4192 -> 0 bytes tools/h5import/testfiles/test7.h5 | Bin 9784 -> 0 bytes tools/h5import/testfiles/test8.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/test9.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/teststr.h5 | Bin 10240 -> 0 bytes tools/h5import/testfiles/textfp32 | 10 - tools/h5import/testfiles/textfp64 | 13 - tools/h5import/testfiles/textin16 | 12 - tools/h5import/testfiles/textin32 | 11 - tools/h5import/testfiles/textin8 | 16 -- tools/h5import/testfiles/textstr | 6 - tools/h5import/testfiles/textuin16 | 12 - tools/h5import/testfiles/textuin32 | 11 - tools/h5import/testfiles/txtfp32.conf | 10 + tools/h5import/testfiles/txtfp32.h5 | Bin 0 -> 4192 bytes tools/h5import/testfiles/txtfp32.txt | 9 + tools/h5import/testfiles/txtfp64.conf | 13 + tools/h5import/testfiles/txtfp64.h5 | Bin 0 -> 9784 bytes tools/h5import/testfiles/txtfp64.txt | 19 ++ tools/h5import/testfiles/txtin16.conf | 12 + tools/h5import/testfiles/txtin16.h5 | Bin 0 -> 9784 bytes tools/h5import/testfiles/txtin16.txt | 15 ++ tools/h5import/testfiles/txtin32.conf | 11 + tools/h5import/testfiles/txtin32.h5 | Bin 0 -> 4192 bytes tools/h5import/testfiles/txtin32.txt | 15 ++ tools/h5import/testfiles/txtin8.conf | 16 ++ tools/h5import/testfiles/txtin8.h5 | Bin 0 -> 9784 bytes tools/h5import/testfiles/txtstr | 2 - tools/h5import/testfiles/txtstr.conf | 6 + tools/h5import/testfiles/txtstr.h5 | Bin 0 -> 10240 bytes tools/h5import/testfiles/txtstr.txt | 2 + tools/h5import/testfiles/txtuin16.conf | 12 + tools/h5import/testfiles/txtuin16.h5 | Bin 0 -> 10240 bytes tools/h5import/testfiles/txtuin32.conf | 11 + tools/h5import/testfiles/txtuin32.h5 | Bin 0 -> 6240 bytes tools/h5import/testfiles/txtuin32.txt | 15 ++ 71 files changed, 610 insertions(+), 404 deletions(-) create mode 100755 tools/h5import/testfiles/binfp64.conf create mode 100644 tools/h5import/testfiles/binfp64.h5 create mode 100755 tools/h5import/testfiles/binin16.conf create mode 100644 tools/h5import/testfiles/binin16.h5 create mode 100755 tools/h5import/testfiles/binin32.conf create mode 100644 tools/h5import/testfiles/binin32.h5 create mode 100755 tools/h5import/testfiles/binin8.conf create mode 100644 tools/h5import/testfiles/binin8.h5 create mode 100644 tools/h5import/testfiles/binin8w.conf create mode 100644 tools/h5import/testfiles/binin8w.h5 create mode 100755 tools/h5import/testfiles/binuin16.conf create mode 100644 tools/h5import/testfiles/binuin16.h5 create mode 100755 tools/h5import/testfiles/binuin32.conf create mode 100644 tools/h5import/testfiles/binuin32.h5 delete mode 100755 tools/h5import/testfiles/conbfp64 delete mode 100755 tools/h5import/testfiles/conbin16 delete mode 100755 tools/h5import/testfiles/conbin32 delete mode 100755 tools/h5import/testfiles/conbin8 delete mode 100755 tools/h5import/testfiles/conbuin16 delete mode 100755 tools/h5import/testfiles/conbuin32 delete mode 100755 tools/h5import/testfiles/fp1 delete mode 100755 tools/h5import/testfiles/fp2 delete mode 100755 tools/h5import/testfiles/in1 delete mode 100644 tools/h5import/testfiles/test1.h5 delete mode 100644 tools/h5import/testfiles/test10.h5 delete mode 100644 tools/h5import/testfiles/test11.h5 delete mode 100644 tools/h5import/testfiles/test12.h5 delete mode 100644 tools/h5import/testfiles/test13.h5 delete mode 100644 tools/h5import/testfiles/test2.h5 delete mode 100644 tools/h5import/testfiles/test3.h5 delete mode 100644 tools/h5import/testfiles/test4.h5 delete mode 100644 tools/h5import/testfiles/test5.h5 delete mode 100644 tools/h5import/testfiles/test6.h5 delete mode 100644 tools/h5import/testfiles/test7.h5 delete mode 100644 tools/h5import/testfiles/test8.h5 delete mode 100644 tools/h5import/testfiles/test9.h5 delete mode 100644 tools/h5import/testfiles/teststr.h5 delete mode 100755 tools/h5import/testfiles/textfp32 delete mode 100755 tools/h5import/testfiles/textfp64 delete mode 100755 tools/h5import/testfiles/textin16 delete mode 100755 tools/h5import/testfiles/textin32 delete mode 100755 tools/h5import/testfiles/textin8 delete mode 100644 tools/h5import/testfiles/textstr delete mode 100755 tools/h5import/testfiles/textuin16 delete mode 100755 tools/h5import/testfiles/textuin32 create mode 100755 tools/h5import/testfiles/txtfp32.conf create mode 100644 tools/h5import/testfiles/txtfp32.h5 create mode 100755 tools/h5import/testfiles/txtfp32.txt create mode 100755 tools/h5import/testfiles/txtfp64.conf create mode 100644 tools/h5import/testfiles/txtfp64.h5 create mode 100755 tools/h5import/testfiles/txtfp64.txt create mode 100755 tools/h5import/testfiles/txtin16.conf create mode 100644 tools/h5import/testfiles/txtin16.h5 create mode 100644 tools/h5import/testfiles/txtin16.txt create mode 100755 tools/h5import/testfiles/txtin32.conf create mode 100644 tools/h5import/testfiles/txtin32.h5 create mode 100644 tools/h5import/testfiles/txtin32.txt create mode 100755 tools/h5import/testfiles/txtin8.conf create mode 100644 tools/h5import/testfiles/txtin8.h5 delete mode 100644 tools/h5import/testfiles/txtstr create mode 100644 tools/h5import/testfiles/txtstr.conf create mode 100644 tools/h5import/testfiles/txtstr.h5 create mode 100644 tools/h5import/testfiles/txtstr.txt create mode 100755 tools/h5import/testfiles/txtuin16.conf create mode 100644 tools/h5import/testfiles/txtuin16.h5 create mode 100755 tools/h5import/testfiles/txtuin32.conf create mode 100644 tools/h5import/testfiles/txtuin32.h5 create mode 100755 tools/h5import/testfiles/txtuin32.txt diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index f8f518b..d1b15bb 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -45,10 +45,6 @@ int main(int argc, char *argv[]) (void)HDsetvbuf(stderr, (char *) NULL, _IOLBF, 0); (void)HDsetvbuf(stdout, (char *) NULL, _IOLBF, 0); -#if defined __MWERKS__ - argc = ccommand(&argv); -#endif - if ( argv[1] && (strcmp("-V",argv[1])==0) ) { print_version("h5import"); @@ -275,7 +271,7 @@ gtoken(char *s) * Programmer: pkmat * * Modifications: pvn - * 7/23/2007. Added support for STR type + * 7/23/2007. Added support for STR type, extra parameter FILE_ID * *------------------------------------------------------------------------- */ @@ -293,12 +289,53 @@ processDataFile(char *infile, struct Input *in, FILE **strm, hid_t file_id) const char *err10 = "Unrecognized input class type.\n"; const char *err11 = "Error in reading string data.\n"; - if ((*strm = fopen(infile, "r")) == NULL) + /*------------------------------------------------------------------------- + * special case for opening binary classes in WIN32 + * "FP" denotes a floating point binary file, + * "IN" denotes a signed integer binary file, + * "UIN" denotes an unsigned integer binary file, + *------------------------------------------------------------------------- + */ + if ( in->inputClass == 4 /* "IN" */ || + in->inputClass == 3 /* "FP" */ || + in->inputClass == 7 /* "UIN" */ + + ) + { + +#ifdef WIN32 + + if ((*strm = fopen(infile, "rb")) == NULL) + { + (void) fprintf(stderr, err1, infile); + return(-1); + } +#else + + if ((*strm = fopen(infile, "r")) == NULL) + { + (void) fprintf(stderr, err1, infile); + return(-1); + } + +#endif + + } + /*------------------------------------------------------------------------- + * if the input class is not binary, just use "r" + *------------------------------------------------------------------------- + */ + else { - (void) fprintf(stderr, err1, infile); - return(-1); + if ((*strm = fopen(infile, "r")) == NULL) + { + (void) fprintf(stderr, err1, infile); + return(-1); + } } + + switch(in->inputClass) { case 0: /* TEXTIN */ @@ -372,7 +409,7 @@ readIntegerData(FILE **strm, struct Input *in) H5DT_INT8 *in08; H5DT_INT16 *in16, temp; H5DT_INT32 *in32; -#ifndef _WIN32 +#ifndef WIN32 H5DT_INT64 *in64; char buffer[256]; #endif diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c index 2a8c827..9272632 100755 --- a/tools/h5import/h5importtest.c +++ b/tools/h5import/h5importtest.c @@ -21,271 +21,378 @@ * h5importtest * * Description: - * This program creates files that can be + * This program creates that can be * used to test the h5import program. * */ -/* - * Define names for test files - */ int main(void) { - int nrow = 3, ncol = 4, npln = 5; - int i, j, k; - FILE *sp; - + int nrow = 3, ncol = 4, npln = 5; + int i, j, k; + FILE *sp; + float b32r3[5][3][4]; float row4[3], col4[4], pln4[5]; float rowo4 = (float)11.0e0, colo4 = (float)21.0e0, plno4 = (float)51.0e0; float rowi4 = (float)1.0e0, coli4 = (float)2.0e0, plni4 = (float)5.0e0; - - int b32i3[5][3][4]; - int row4i[3], col4i[4], pln4i[5]; - int rowo4i = (int)11 , colo4i = (int)21 , plno4i = (int)51 ; - int rowi4i = (int)1 , coli4i = (int)2 , plni4i = (int)5 ; - -#ifndef _WIN32 - long_long b64i2[3][4], b64i3[5][3][4]; - long_long row4i64[3], col4i64[4], pln4i64[5]; - long_long rowo4i64 = (long_long)11 , colo4i64 = (long_long)21 , plno4i64 = (long_long)51 ; - long_long rowi4i64 = (long_long)1 , coli4i64 = (long_long)2 , plni4i64 = (long_long)5 ; + + int b32i3[5][3][4]; + int row4i[3], col4i[4], pln4i[5]; + int rowo4i = (int)11 , colo4i = (int)21 , plno4i = (int)51 ; + int rowi4i = (int)1 , coli4i = (int)2 , plni4i = (int)5 ; + +#ifndef WIN32 + long_long b64i2[3][4], b64i3[5][3][4]; + long_long row4i64[3], col4i64[4], pln4i64[5]; + long_long rowo4i64 = (long_long)11 , colo4i64 = (long_long)21 , plno4i64 = (long_long)51 ; + long_long rowi4i64 = (long_long)1 , coli4i64 = (long_long)2 , plni4i64 = (long_long)5 ; #endif - + short b16i3[5][3][4]; short row4i16[3], col4i16[4], pln4i16[5]; short rowo4i16 = (short)11 , colo4i16 = (short)21 , plno4i16 = (short)51 ; short rowi4i16 = (short)1 , coli4i16 = (short)2 , plni4i16 = (short)5 ; - - char b8i3[5][3][4]; - char row4i8[3], col4i8[4], pln4i8[5]; - char rowo4i8 = (char)11 , colo4i8 = (char)21 , plno4i8 = (char)51 ; - char rowi4i8 = (char)1 , coli4i8 = (char)2 , plni4i8 = (char)5 ; - - double b64r3[5][3][4]; - double row8[3], col8[4], pln8[5]; - double rowo8 = 11.0e0, colo8 = 21.0e0, plno8 = 51.0e0; - double rowi8 = 1.0e0, coli8 = 2.0e0, plni8 = 5.0e0; - - + + char b8i3[5][3][4]; + char row4i8[3], col4i8[4], pln4i8[5]; + char rowo4i8 = (char)11 , colo4i8 = (char)21 , plno4i8 = (char)51 ; + char rowi4i8 = (char)1 , coli4i8 = (char)2 , plni4i8 = (char)5 ; + + double b64r3[5][3][4]; + double row8[3], col8[4], pln8[5]; + double rowo8 = 11.0e0, colo8 = 21.0e0, plno8 = 51.0e0; + double rowi8 = 1.0e0, coli8 = 2.0e0, plni8 = 5.0e0; + + /* - * initialize the row, column, and plane vectors - * - * row values start at 11 and increment by 1 => 11, 12, 13 - * column values start at 21 and increment by 2 => 21, 23, 25, 27 - * plane values start at 51 and increment by 5 => 51, 56, 61, 66, 71 - */ - - + * initialize the row, column, and plane vectors + * + * row values start at 11 and increment by 1 => 11, 12, 13 + * column values start at 21 and increment by 2 => 21, 23, 25, 27 + * plane values start at 51 and increment by 5 => 51, 56, 61, 66, 71 + */ + + /* - * build array elements - rank 2 - * - * element value = sum of row value and col values - */ - + * build array elements - rank 2 + * + * element value = sum of row value and col values + */ + row4[0] = rowo4; col4[0] = colo4; pln4[0] = plno4; - + row8[0] = rowo8; col8[0] = colo8; pln8[0] = plno8; - + row4i[0] = rowo4i; col4i[0] = colo4i; pln4i[0] = plno4i; - -#ifndef _WIN32 + +#ifndef WIN32 row4i64[0] = rowo4i64; col4i64[0] = colo4i64; pln4i64[0] = plno4i64; #endif - + row4i16[0] = rowo4i16; col4i16[0] = colo4i16; pln4i16[0] = plno4i16; - + row4i8[0] = rowo4i8; col4i8[0] = colo4i8; pln4i8[0] = plno4i8; - + for (i = 1; i < nrow; i++) { row4[i] = row4[i - 1] + rowi4; row8[i] = row8[i - 1] + rowi8; row4i[i] = row4i[i - 1] + rowi4i; -#ifndef _WIN32 - row4i64[i] = row4i64[i - 1] + rowi4i64; +#ifndef WIN32 + row4i64[i] = row4i64[i - 1] + rowi4i64; #endif - row4i16[i] = row4i16[i - 1] + rowi4i16; - row4i8[i] = row4i8[i - 1] + rowi4i8; + row4i16[i] = row4i16[i - 1] + rowi4i16; + row4i8[i] = row4i8[i - 1] + rowi4i8; } for (j = 1; j < ncol; j++) { - col4[j] = col4[j - 1] + coli4; - col8[j] = col8[j - 1] + coli8; - col4i[j] = col4i[j - 1] + coli4i; -#ifndef _WIN32 - col4i64[j] = col4i64[j - 1] + coli4i64; + col4[j] = col4[j - 1] + coli4; + col8[j] = col8[j - 1] + coli8; + col4i[j] = col4i[j - 1] + coli4i; +#ifndef WIN32 + col4i64[j] = col4i64[j - 1] + coli4i64; #endif - col4i16[j] = col4i16[j - 1] + coli4i16; - col4i8[j] = col4i8[j - 1] + coli4i8; + col4i16[j] = col4i16[j - 1] + coli4i16; + col4i8[j] = col4i8[j - 1] + coli4i8; } for (k = 1; k < npln; k++) { - pln4[k] = pln4[k - 1] + plni4; - pln8[k] = pln8[k - 1] + plni8; - pln4i[k] = pln4i[k - 1] + plni4i; -#ifndef _WIN32 - pln4i64[k] = pln4i64[k - 1] + plni4i64; + pln4[k] = pln4[k - 1] + plni4; + pln8[k] = pln8[k - 1] + plni8; + pln4i[k] = pln4i[k - 1] + plni4i; +#ifndef WIN32 + pln4i64[k] = pln4i64[k - 1] + plni4i64; #endif - pln4i16[k] = pln4i16[k - 1] + plni4i16; - pln4i8[k] = pln4i8[k - 1] + plni4i8; - } - - for (i = 0; i < nrow; i++) - { - for (j = 0; j < ncol; j++) - { -#ifndef _WIN32 - b64i2[i][j] = row4i64[i] + col4i64[j]; + pln4i16[k] = pln4i16[k - 1] + plni4i16; + pln4i8[k] = pln4i8[k - 1] + plni4i8; + } + + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + { +#ifndef WIN32 + b64i2[i][j] = row4i64[i] + col4i64[j]; #endif - } - } + } + } /* - * build array elements - rank 3 - * - * element value = sum of row value, col, and plane values - */ - + * build array elements - rank 3 + * + * element value = sum of row value, col, and plane values + */ + for (i = 0; i < nrow; i++) - { - for (j = 0; j < ncol; j++) + { + for (j = 0; j < ncol; j++) + { + for (k = 0; k < npln; k++) { - for (k = 0; k < npln; k++) - { - b32r3[k][i][j] = row4[i] + col4[j] + pln4[k]; - b64r3[k][i][j] = row8[i] + col8[j] + pln8[k]; - b32i3[k][i][j] = row4i[i] + col4i[j] + pln4i[k]; -#ifndef _WIN32 - b64i3[k][i][j] = row4i64[i] + col4i64[j] + pln4i64[k]; + b32r3[k][i][j] = row4[i] + col4[j] + pln4[k]; + b64r3[k][i][j] = row8[i] + col8[j] + pln8[k]; + b32i3[k][i][j] = row4i[i] + col4i[j] + pln4i[k]; +#ifndef WIN32 + b64i3[k][i][j] = row4i64[i] + col4i64[j] + pln4i64[k]; #endif - b16i3[k][i][j] = row4i16[i] + col4i16[j] + pln4i16[k]; - b8i3[k][i][j] = row4i8[i] + col4i8[j] + pln4i8[k]; - } + b16i3[k][i][j] = row4i16[i] + col4i16[j] + pln4i16[k]; + b8i3[k][i][j] = row4i8[i] + col4i8[j] + pln4i8[k]; } - } + } + } - /* - * binary 32-bit file - rank 2 & 3 - */ + #ifndef UNICOS - sp = fopen("txtin16", "w"); - for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) + + /*------------------------------------------------------------------------- + * TOOLTEST txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 + *------------------------------------------------------------------------- + */ + + + sp = fopen("txtin16.txt", "w"); + for (k = 0; k < npln; k++) + { + for (i = 0; i < nrow; i++) { - for (j = 0; j < ncol; j++) - (void) fprintf(sp, "%10u", b16i3[k][i][j]); - (void) fprintf(sp, "\n"); + for (j = 0; j < ncol; j++) + (void) fprintf(sp, "%10u", b16i3[k][i][j]); + (void) fprintf(sp, "\n"); } + } (void) fclose(sp); - sp = fopen("txtin32", "w"); - for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) + /*------------------------------------------------------------------------- + * TOOLTEST txtin32.txt -c $srcdir/testfiles/textin32.conf -o textin32.h5 + *------------------------------------------------------------------------- + */ + + sp = fopen("txtin32.txt", "w"); + for (k = 0; k < npln; k++) + { + for (i = 0; i < nrow; i++) { - for (j = 0; j < ncol; j++) - (void) fprintf(sp, "%10d", b32i3[k][i][j]); - (void) fprintf(sp, "\n"); + for (j = 0; j < ncol; j++) + (void) fprintf(sp, "%10d", b32i3[k][i][j]); + (void) fprintf(sp, "\n"); } - (void) fclose(sp); + } + (void) fclose(sp); + + /*------------------------------------------------------------------------- + * TOOLTEST binin32.bin -c $srcdir/testfiles/binin32.conf -o binin32.h5 + *------------------------------------------------------------------------- + */ - sp = fopen("bin32", "w"); +#ifdef WIN32 + sp = fopen("binin32.bin", "wb"); +#else + sp = fopen("binin32.bin", "w"); +#endif for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b32i3[k][i][j], sizeof(int), 1, sp); + { + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + { + (void) fwrite((char *) &b32i3[k][i][j], sizeof(int), 1, sp); + } + } + } (void) fclose(sp); + /*------------------------------------------------------------------------- + * TOOLTEST binuin32.bin -c $srcdir/testfiles/binuin32.conf -o binuin32.h5 + *------------------------------------------------------------------------- + */ - sp = fopen("buin32", "w"); +#ifdef WIN32 + sp = fopen("binuin32.bin", "wb"); +#else + sp = fopen("binuin32.bin", "w"); +#endif for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b32i3[k][i][j], sizeof(unsigned int), 1, sp); + { + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + { + (void) fwrite((char *) &b32i3[k][i][j], sizeof(unsigned int), 1, sp); + } + } + } (void) fclose(sp); -#ifndef _WIN32 - sp = fopen("bin64-2", "w"); - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b64i2[i][j], sizeof(long_long), 1, sp); - (void) fclose(sp); -#endif - sp = fopen("bfp32", "w"); + + /*------------------------------------------------------------------------- + * TOOLTEST binin16.bin -c $srcdir/testfiles/binin16.conf -o binin16.h5 + *------------------------------------------------------------------------- + */ + +#ifdef WIN32 + sp = fopen("binin16.bin", "wb"); +#else + sp = fopen("binin16.bin", "w"); +#endif for (k = 0; k < npln; k++) + { for (i = 0; i < nrow; i++) + { for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b32r3[k][i][j], - sizeof(float), 1, sp); + { + (void) fwrite((char *) &b16i3[k][i][j], sizeof(short), 1, sp); + } + } + } (void) fclose(sp); - sp = fopen("bin16", "w"); - for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b16i3[k][i][j], sizeof(short), 1, - sp); + /*------------------------------------------------------------------------- + * TOOLTEST binuin16.bin -c $srcdir/testfiles/binuin16.conf -o binuin16.h5 + *------------------------------------------------------------------------- + */ +#ifdef WIN32 + sp = fopen("binuin16.bin", "wb"); +#else + sp = fopen("binuin16.bin", "w"); +#endif + for (k = 0; k < npln; k++) + { + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + { + (void) fwrite((char *) &b16i3[k][i][j], sizeof(unsigned short), 1, sp); + } + } + } (void) fclose(sp); - sp = fopen("buin16", "w"); - for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b16i3[k][i][j], sizeof(unsigned short), 1, - sp); - (void) fclose(sp); -#ifndef _WIN32 - sp = fopen("bin64-3", "w"); - for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b64i3[k][i][j], sizeof(long_long), 1, - sp); - (void) fclose(sp); -#endif + /*------------------------------------------------------------------------- + * TOOLTEST binin8.bin -c $srcdir/testfiles/binin8.conf -o binin8.h5 + *------------------------------------------------------------------------- + */ - sp = fopen("bin8", "w"); +#ifdef WIN32 + sp = fopen("binin8.bin", "wb"); +#else + sp = fopen("binin8.bin", "w"); +#endif for (k = 0; k < npln; k++) - for (i = 0; i < nrow; i++) - for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b8i3[k][i][j], sizeof(char), 1, - sp); + { + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + { + (void) fwrite((char *) &b8i3[k][i][j], sizeof(char), 1, sp); + } + } + } (void) fclose(sp); -#endif +#endif /* UNICOS */ - /* - * binary 64-bit file - rank 2 & 3 - */ - sp = fopen("bfp64", "w"); + + + /*------------------------------------------------------------------------- + * TOOLTEST binfp64.bin -c $srcdir/testfiles/binfp64.conf -o binfp64.h5 + *------------------------------------------------------------------------- + */ + + /* + * binary 64-bit file - rank 2 & 3 + */ + +#ifdef WIN32 + sp = fopen("binfp64.bin", "wb"); +#else + sp = fopen("binfp64.bin", "w"); +#endif for (k = 0; k < npln; k++) + { for (i = 0; i < nrow; i++) + { for (j = 0; j < ncol; j++) - (void) fwrite((char *) &b64r3[k][i][j], - sizeof(double), 1, sp); + { + (void) fwrite((char *) &b64r3[k][i][j], sizeof(double), 1, sp); + } + } + } (void) fclose(sp); + + + + /*------------------------------------------------------------------------- + * TOOLTEST binin8w.bin -c $srcdir/testfiles/binin8w.conf -o binin8w.h5 + *------------------------------------------------------------------------- + */ + + { + /* test CR+LF (13,10) and EOF (26) in windows */ + char bin8w[4] = {13,10,26,0}; + +#ifdef WIN32 + sp = fopen("binin8w.bin", "wb"); +#else + sp = fopen("binin8w.bin", "w"); +#endif + for (i = 0; i < 4; i++) + { + char c = bin8w[i]; + if ( fwrite( &c, sizeof(char), 1, sp) != 1 ) + printf("error writing file\n"); + } + fclose(sp); + + + } + + + + + return (0); } diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh index 0687871..ff7dc35 100755 --- a/tools/h5import/h5importtestutil.sh +++ b/tools/h5import/h5importtestutil.sh @@ -60,49 +60,72 @@ cp $srcdir/testfiles/*.h5 tmp_testfiles/ $RUNSERIAL ./h5importtest TESTING "ASCII I32 rank 3 - Output BE " ; -TOOLTEST txtin32 -c $srcdir/testfiles/textin32 -o test1.h5 +#TOOLTEST txtin32 -c $srcdir/testfiles/textin32 -o test1.h5 +TOOLTEST $srcdir/testfiles/txtin16.txt -c $srcdir/testfiles/txtin32.conf -o txtin32.h5 TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" -TOOLTEST txtin16 -c $srcdir/testfiles/textin16 -o test2.h5 +#TOOLTEST txtin16 -c $srcdir/testfiles/textin16 -o test2.h5 +TOOLTEST $srcdir/testfiles/txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 + TESTING "ASCII I8 - rank 3 - Output I16 LE-Chunked+Extended+Compressed " -TOOLTEST txtin16 -c $srcdir/testfiles/textin8 -o test3.h5 +#TOOLTEST txtin16 -c $srcdir/testfiles/textin8 -o test3.h5 +TOOLTEST $srcdir/testfiles/txtin16.txt -c $srcdir/testfiles/txtin8.conf -o txtin8.h5 TESTING "ASCII UI32 - rank 3 - Output BE" -TOOLTEST $srcdir/testfiles/in1 -c $srcdir/testfiles/textuin32 -o test4.h5 +#TOOLTEST $srcdir/testfiles/in1 -c $srcdir/testfiles/textuin32 -o test4.h5 +TOOLTEST $srcdir/testfiles/txtuin32.txt -c $srcdir/testfiles/txtuin32.conf -o txtuin32.h5 TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " -TOOLTEST $srcdir/testfiles/in1 -c $srcdir/testfiles/textuin16 -o test5.h5 +#TOOLTEST $srcdir/testfiles/in1 -c $srcdir/testfiles/textuin16 -o test5.h5 +TOOLTEST $srcdir/testfiles/txtuin32.txt -c $srcdir/testfiles/txtuin16.conf -o txtuin16.h5 TESTING "ASCII F32 - rank 3 - Output LE " -TOOLTEST $srcdir/testfiles/fp1 -c $srcdir/testfiles/textfp32 -o test6.h5 +#TOOLTEST $srcdir/testfiles/fp1 -c $srcdir/testfiles/textfp32 -o test6.h5 +TOOLTEST $srcdir/testfiles/txtfp32.txt -c $srcdir/testfiles/txtfp32.conf -o txtfp32.h5 + TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " -TOOLTEST $srcdir/testfiles/fp2 -c $srcdir/testfiles/textfp64 -o test7.h5 +#TOOLTEST $srcdir/testfiles/fp2 -c $srcdir/testfiles/textfp64 -o test7.h5 +TOOLTEST $srcdir/testfiles/txtfp64.txt -c $srcdir/testfiles/txtfp64.conf -o txtfp64.h5 TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " -TOOLTEST bfp64 -c $srcdir/testfiles/conbfp64 -o test8.h5 +#TOOLTEST bfp64 -c $srcdir/testfiles/conbfp64 -o test8.h5 +TOOLTEST binfp64.bin -c $srcdir/testfiles/binfp64.conf -o binfp64.h5 + TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " -TOOLTEST bin16 -c $srcdir/testfiles/conbin16 -o test9.h5 +#TOOLTEST bin16 -c $srcdir/testfiles/conbin16 -o test9.h5 +TOOLTEST binin16.bin -c $srcdir/testfiles/binin16.conf -o binin16.h5 + TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " -TOOLTEST bin8 -c $srcdir/testfiles/conbin8 -o test10.h5 +#TOOLTEST bin8 -c $srcdir/testfiles/conbin8 -o test10.h5 +TOOLTEST binin8.bin -c $srcdir/testfiles/binin8.conf -o binin8.h5 + TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " -TOOLTEST bin32 -c $srcdir/testfiles/conbin32 -o test11.h5 +#TOOLTEST bin32 -c $srcdir/testfiles/conbin32 -o test11.h5 +TOOLTEST binin32.bin -c $srcdir/testfiles/binin32.conf -o binin32.h5 + TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " -TOOLTEST buin16 -c $srcdir/testfiles/conbuin16 -o test12.h5 +#TOOLTEST buin16 -c $srcdir/testfiles/conbuin16 -o test12.h5 +TOOLTEST binuin16.bin -c $srcdir/testfiles/binuin16.conf -o binuin16.h5 TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " -TOOLTEST buin32 -c $srcdir/testfiles/conbuin32 -o test13.h5 +#TOOLTEST buin32 -c $srcdir/testfiles/conbuin32 -o test13.h5 +TOOLTEST binuin32.bin -c $srcdir/testfiles/binuin32.conf -o binuin32.h5 + TESTING "STR" -TOOLTEST $srcdir/testfiles/txtstr -c $srcdir/testfiles/textstr -o teststr.h5 +TOOLTEST $srcdir/testfiles/txtstr.txt -c $srcdir/testfiles/txtstr.conf -o txtstr.h5 + +TESTING "BINARY I8 CR LF EOF" +TOOLTEST binin8w.bin -c $srcdir/testfiles/binin8w.conf -o binin8w.h5 + -rm -f tx* b* *.dat -rm -f test*.h5 +rm -f *.txt *.bin *.h5 rm -rf tmp_testfiles else echo "** h5import or h5importtest not available ***" diff --git a/tools/h5import/testfiles/binfp64.conf b/tools/h5import/testfiles/binfp64.conf new file mode 100755 index 0000000..6b4c361 --- /dev/null +++ b/tools/h5import/testfiles/binfp64.conf @@ -0,0 +1,13 @@ +PATH /fp/bin/64-bit +INPUT-CLASS FP +INPUT-SIZE 64 +RANK 3 +DIMENSION-SIZES 5 3 4 +OUTPUT-ARCHITECTURE IEEE +OUTPUT-BYTE-ORDER LE +CHUNKED-DIMENSION-SIZES 2 2 2 +COMPRESSION-PARAM 8 +MAXIMUM-DIMENSIONS -1 6 7 + + + diff --git a/tools/h5import/testfiles/binfp64.h5 b/tools/h5import/testfiles/binfp64.h5 new file mode 100644 index 0000000..80e3a8a Binary files /dev/null and b/tools/h5import/testfiles/binfp64.h5 differ diff --git a/tools/h5import/testfiles/binin16.conf b/tools/h5import/testfiles/binin16.conf new file mode 100755 index 0000000..06869cb --- /dev/null +++ b/tools/h5import/testfiles/binin16.conf @@ -0,0 +1,12 @@ +PATH /int/bin/16-bit +INPUT-CLASS IN +INPUT-SIZE 16 +RANK 3 +DIMENSION-SIZES 2 3 4 +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 8 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER LE + + + diff --git a/tools/h5import/testfiles/binin16.h5 b/tools/h5import/testfiles/binin16.h5 new file mode 100644 index 0000000..0825bbc Binary files /dev/null and b/tools/h5import/testfiles/binin16.h5 differ diff --git a/tools/h5import/testfiles/binin32.conf b/tools/h5import/testfiles/binin32.conf new file mode 100755 index 0000000..11996ef --- /dev/null +++ b/tools/h5import/testfiles/binin32.conf @@ -0,0 +1,12 @@ +PATH /int/bin/32-bit +INPUT-CLASS IN +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 5 3 4 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER BE +CHUNKED-DIMENSION-SIZES 1 2 1 + + + + diff --git a/tools/h5import/testfiles/binin32.h5 b/tools/h5import/testfiles/binin32.h5 new file mode 100644 index 0000000..fd8faa9 Binary files /dev/null and b/tools/h5import/testfiles/binin32.h5 differ diff --git a/tools/h5import/testfiles/binin8.conf b/tools/h5import/testfiles/binin8.conf new file mode 100755 index 0000000..1edd80a --- /dev/null +++ b/tools/h5import/testfiles/binin8.conf @@ -0,0 +1,16 @@ +PATH /int/bin/8-bit +INPUT-CLASS IN +INPUT-SIZE 8 +OUTPUT-CLASS IN +OUTPUT-SIZE 16 +RANK 3 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER LE +DIMENSION-SIZES 5 3 4 +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 -1 +COMPRESSION-PARAM 3 + + + + diff --git a/tools/h5import/testfiles/binin8.h5 b/tools/h5import/testfiles/binin8.h5 new file mode 100644 index 0000000..a1d1a37 Binary files /dev/null and b/tools/h5import/testfiles/binin8.h5 differ diff --git a/tools/h5import/testfiles/binin8w.conf b/tools/h5import/testfiles/binin8w.conf new file mode 100644 index 0000000..fccb4ac --- /dev/null +++ b/tools/h5import/testfiles/binin8w.conf @@ -0,0 +1,9 @@ + +INPUT-CLASS IN +INPUT-SIZE 8 +RANK 1 +DIMENSION-SIZES 4 +OUTPUT-BYTE-ORDER LE +OUTPUT-CLASS IN +OUTPUT-SIZE 8 +OUTPUT-ARCHITECTURE STD diff --git a/tools/h5import/testfiles/binin8w.h5 b/tools/h5import/testfiles/binin8w.h5 new file mode 100644 index 0000000..64acaed Binary files /dev/null and b/tools/h5import/testfiles/binin8w.h5 differ diff --git a/tools/h5import/testfiles/binuin16.conf b/tools/h5import/testfiles/binuin16.conf new file mode 100755 index 0000000..a4603df --- /dev/null +++ b/tools/h5import/testfiles/binuin16.conf @@ -0,0 +1,12 @@ +PATH /int/buin/16-bit +INPUT-CLASS UIN +INPUT-SIZE 16 +RANK 3 +DIMENSION-SIZES 2 3 4 +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 8 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER BE + + + diff --git a/tools/h5import/testfiles/binuin16.h5 b/tools/h5import/testfiles/binuin16.h5 new file mode 100644 index 0000000..c486c89 Binary files /dev/null and b/tools/h5import/testfiles/binuin16.h5 differ diff --git a/tools/h5import/testfiles/binuin32.conf b/tools/h5import/testfiles/binuin32.conf new file mode 100755 index 0000000..a649e97 --- /dev/null +++ b/tools/h5import/testfiles/binuin32.conf @@ -0,0 +1,12 @@ +PATH /int/buin/32-bit +INPUT-CLASS UIN +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 5 3 4 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER LE + + + + + diff --git a/tools/h5import/testfiles/binuin32.h5 b/tools/h5import/testfiles/binuin32.h5 new file mode 100644 index 0000000..41699d7 Binary files /dev/null and b/tools/h5import/testfiles/binuin32.h5 differ diff --git a/tools/h5import/testfiles/conbfp64 b/tools/h5import/testfiles/conbfp64 deleted file mode 100755 index 6b4c361..0000000 --- a/tools/h5import/testfiles/conbfp64 +++ /dev/null @@ -1,13 +0,0 @@ -PATH /fp/bin/64-bit -INPUT-CLASS FP -INPUT-SIZE 64 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER LE -CHUNKED-DIMENSION-SIZES 2 2 2 -COMPRESSION-PARAM 8 -MAXIMUM-DIMENSIONS -1 6 7 - - - diff --git a/tools/h5import/testfiles/conbin16 b/tools/h5import/testfiles/conbin16 deleted file mode 100755 index 06869cb..0000000 --- a/tools/h5import/testfiles/conbin16 +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/bin/16-bit -INPUT-CLASS IN -INPUT-SIZE 16 -RANK 3 -DIMENSION-SIZES 2 3 4 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 8 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE - - - diff --git a/tools/h5import/testfiles/conbin32 b/tools/h5import/testfiles/conbin32 deleted file mode 100755 index 11996ef..0000000 --- a/tools/h5import/testfiles/conbin32 +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/bin/32-bit -INPUT-CLASS IN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE -CHUNKED-DIMENSION-SIZES 1 2 1 - - - - diff --git a/tools/h5import/testfiles/conbin8 b/tools/h5import/testfiles/conbin8 deleted file mode 100755 index 1edd80a..0000000 --- a/tools/h5import/testfiles/conbin8 +++ /dev/null @@ -1,16 +0,0 @@ -PATH /int/bin/8-bit -INPUT-CLASS IN -INPUT-SIZE 8 -OUTPUT-CLASS IN -OUTPUT-SIZE 16 -RANK 3 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE -DIMENSION-SIZES 5 3 4 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 -1 -COMPRESSION-PARAM 3 - - - - diff --git a/tools/h5import/testfiles/conbuin16 b/tools/h5import/testfiles/conbuin16 deleted file mode 100755 index a4603df..0000000 --- a/tools/h5import/testfiles/conbuin16 +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/buin/16-bit -INPUT-CLASS UIN -INPUT-SIZE 16 -RANK 3 -DIMENSION-SIZES 2 3 4 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 8 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE - - - diff --git a/tools/h5import/testfiles/conbuin32 b/tools/h5import/testfiles/conbuin32 deleted file mode 100755 index a649e97..0000000 --- a/tools/h5import/testfiles/conbuin32 +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/buin/32-bit -INPUT-CLASS UIN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE - - - - - diff --git a/tools/h5import/testfiles/fp1 b/tools/h5import/testfiles/fp1 deleted file mode 100755 index 142c94f..0000000 --- a/tools/h5import/testfiles/fp1 +++ /dev/null @@ -1,9 +0,0 @@ -12.3 14.2 15.56 -26.782 27.22 28.44 -29.33 20.11 11.45 -22.31 23.3332 24.343 - -16.134 19.34 0.17 -4.5 8.9 91.8 -34.7 0.32 0.076 -22.2 88.31 77.83 \ No newline at end of file diff --git a/tools/h5import/testfiles/fp2 b/tools/h5import/testfiles/fp2 deleted file mode 100755 index 6c83dc3..0000000 --- a/tools/h5import/testfiles/fp2 +++ /dev/null @@ -1,19 +0,0 @@ -12.3 14.2 15.56 -26.782 27.22 28.44 -29.33 20.11 11.45 -22.31 23.3332 24.343 - -16.134 19.34 0.17 -4.5 8.9 91.8 -34.7 0.32 0.076 -22.2 88.31 77.83 - -216.134 139.34 101.17 -24.5 82.9 291.8 -334.7 0.232 10.076 -222.2 88.31 77.83 - -122.3 114.2 125.56 -226.782 27.222 128.44 -341.7 30.132 0.1076 -4.51 181.9 911.8 diff --git a/tools/h5import/testfiles/in1 b/tools/h5import/testfiles/in1 deleted file mode 100755 index 0688e9b..0000000 --- a/tools/h5import/testfiles/in1 +++ /dev/null @@ -1,15 +0,0 @@ - 83 85 87 89 - 84 86 88 90 - 85 87 89 91 - 88 90 92 94 - 89 91 93 95 - 90 92 94 96 - 93 95 97 99 - 94 96 98 100 - 95 97 99 101 - 98 100 102 104 - 99 101 103 105 - 100 102 104 106 - 103 105 107 109 - 104 106 108 110 - 105 107 109 111 diff --git a/tools/h5import/testfiles/test1.h5 b/tools/h5import/testfiles/test1.h5 deleted file mode 100644 index 350333c..0000000 Binary files a/tools/h5import/testfiles/test1.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test10.h5 b/tools/h5import/testfiles/test10.h5 deleted file mode 100644 index a1d1a37..0000000 Binary files a/tools/h5import/testfiles/test10.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test11.h5 b/tools/h5import/testfiles/test11.h5 deleted file mode 100644 index fd8faa9..0000000 Binary files a/tools/h5import/testfiles/test11.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test12.h5 b/tools/h5import/testfiles/test12.h5 deleted file mode 100644 index c486c89..0000000 Binary files a/tools/h5import/testfiles/test12.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test13.h5 b/tools/h5import/testfiles/test13.h5 deleted file mode 100644 index 41699d7..0000000 Binary files a/tools/h5import/testfiles/test13.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test2.h5 b/tools/h5import/testfiles/test2.h5 deleted file mode 100644 index dc6c1ea..0000000 Binary files a/tools/h5import/testfiles/test2.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test3.h5 b/tools/h5import/testfiles/test3.h5 deleted file mode 100644 index 42e7727..0000000 Binary files a/tools/h5import/testfiles/test3.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test4.h5 b/tools/h5import/testfiles/test4.h5 deleted file mode 100644 index 1a4dda5..0000000 Binary files a/tools/h5import/testfiles/test4.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test5.h5 b/tools/h5import/testfiles/test5.h5 deleted file mode 100644 index 9ee166a..0000000 Binary files a/tools/h5import/testfiles/test5.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test6.h5 b/tools/h5import/testfiles/test6.h5 deleted file mode 100644 index f74e003..0000000 Binary files a/tools/h5import/testfiles/test6.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test7.h5 b/tools/h5import/testfiles/test7.h5 deleted file mode 100644 index b6ba4f5..0000000 Binary files a/tools/h5import/testfiles/test7.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test8.h5 b/tools/h5import/testfiles/test8.h5 deleted file mode 100644 index 80e3a8a..0000000 Binary files a/tools/h5import/testfiles/test8.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test9.h5 b/tools/h5import/testfiles/test9.h5 deleted file mode 100644 index 0825bbc..0000000 Binary files a/tools/h5import/testfiles/test9.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/teststr.h5 b/tools/h5import/testfiles/teststr.h5 deleted file mode 100644 index ceb0810..0000000 Binary files a/tools/h5import/testfiles/teststr.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/textfp32 b/tools/h5import/testfiles/textfp32 deleted file mode 100755 index 9696a7f..0000000 --- a/tools/h5import/testfiles/textfp32 +++ /dev/null @@ -1,10 +0,0 @@ -PATH /fp/32-bit -INPUT-CLASS TEXTFP -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER LE - - - diff --git a/tools/h5import/testfiles/textfp64 b/tools/h5import/testfiles/textfp64 deleted file mode 100755 index fbab6a6..0000000 --- a/tools/h5import/testfiles/textfp64 +++ /dev/null @@ -1,13 +0,0 @@ -PATH /fp/64-bit -INPUT-CLASS TEXTFP -INPUT-SIZE 64 -RANK 3 -DIMENSION-SIZES 4 4 3 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER BE -CHUNKED-DIMENSION-SIZES 2 2 2 -COMPRESSION-PARAM 8 -MAXIMUM-DIMENSIONS -1 6 7 - - - diff --git a/tools/h5import/testfiles/textin16 b/tools/h5import/testfiles/textin16 deleted file mode 100755 index d2d11c3..0000000 --- a/tools/h5import/testfiles/textin16 +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/16-bit -INPUT-CLASS TEXTIN -INPUT-SIZE 16 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-BYTE-ORDER LE -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 8 -OUTPUT-ARCHITECTURE STD - - - diff --git a/tools/h5import/testfiles/textin32 b/tools/h5import/testfiles/textin32 deleted file mode 100755 index ca4802a..0000000 --- a/tools/h5import/testfiles/textin32 +++ /dev/null @@ -1,11 +0,0 @@ -PATH /int/32-bit -INPUT-CLASS TEXTIN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE - - - - diff --git a/tools/h5import/testfiles/textin8 b/tools/h5import/testfiles/textin8 deleted file mode 100755 index 4405338..0000000 --- a/tools/h5import/testfiles/textin8 +++ /dev/null @@ -1,16 +0,0 @@ -PATH /int/8-bit -INPUT-CLASS TEXTIN -INPUT-SIZE 8 -OUTPUT-CLASS IN -OUTPUT-SIZE 8 -OUTPUT-BYTE-ORDER LE -OUTPUT-ARCHITECTURE STD -RANK 3 -DIMENSION-SIZES 2 4 3 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 -1 -COMPRESSION-PARAM 3 - - - - diff --git a/tools/h5import/testfiles/textstr b/tools/h5import/testfiles/textstr deleted file mode 100644 index 85079e0..0000000 --- a/tools/h5import/testfiles/textstr +++ /dev/null @@ -1,6 +0,0 @@ -PATH /mytext/data -INPUT-CLASS STR - - - - diff --git a/tools/h5import/testfiles/textuin16 b/tools/h5import/testfiles/textuin16 deleted file mode 100755 index 753e6e8..0000000 --- a/tools/h5import/testfiles/textuin16 +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/uint/16-bit -INPUT-CLASS TEXTUIN -INPUT-SIZE 16 -RANK 2 -DIMENSION-SIZES 4 3 -COMPRESSION-PARAM 2 -CHUNKED-DIMENSION-SIZES 2 2 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE - - - diff --git a/tools/h5import/testfiles/textuin32 b/tools/h5import/testfiles/textuin32 deleted file mode 100755 index d61e1a1..0000000 --- a/tools/h5import/testfiles/textuin32 +++ /dev/null @@ -1,11 +0,0 @@ -PATH /int/uint/32-bit -INPUT-CLASS TEXTUIN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE - - - - diff --git a/tools/h5import/testfiles/txtfp32.conf b/tools/h5import/testfiles/txtfp32.conf new file mode 100755 index 0000000..9696a7f --- /dev/null +++ b/tools/h5import/testfiles/txtfp32.conf @@ -0,0 +1,10 @@ +PATH /fp/32-bit +INPUT-CLASS TEXTFP +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-ARCHITECTURE IEEE +OUTPUT-BYTE-ORDER LE + + + diff --git a/tools/h5import/testfiles/txtfp32.h5 b/tools/h5import/testfiles/txtfp32.h5 new file mode 100644 index 0000000..f74e003 Binary files /dev/null and b/tools/h5import/testfiles/txtfp32.h5 differ diff --git a/tools/h5import/testfiles/txtfp32.txt b/tools/h5import/testfiles/txtfp32.txt new file mode 100755 index 0000000..142c94f --- /dev/null +++ b/tools/h5import/testfiles/txtfp32.txt @@ -0,0 +1,9 @@ +12.3 14.2 15.56 +26.782 27.22 28.44 +29.33 20.11 11.45 +22.31 23.3332 24.343 + +16.134 19.34 0.17 +4.5 8.9 91.8 +34.7 0.32 0.076 +22.2 88.31 77.83 \ No newline at end of file diff --git a/tools/h5import/testfiles/txtfp64.conf b/tools/h5import/testfiles/txtfp64.conf new file mode 100755 index 0000000..fbab6a6 --- /dev/null +++ b/tools/h5import/testfiles/txtfp64.conf @@ -0,0 +1,13 @@ +PATH /fp/64-bit +INPUT-CLASS TEXTFP +INPUT-SIZE 64 +RANK 3 +DIMENSION-SIZES 4 4 3 +OUTPUT-ARCHITECTURE IEEE +OUTPUT-BYTE-ORDER BE +CHUNKED-DIMENSION-SIZES 2 2 2 +COMPRESSION-PARAM 8 +MAXIMUM-DIMENSIONS -1 6 7 + + + diff --git a/tools/h5import/testfiles/txtfp64.h5 b/tools/h5import/testfiles/txtfp64.h5 new file mode 100644 index 0000000..b6ba4f5 Binary files /dev/null and b/tools/h5import/testfiles/txtfp64.h5 differ diff --git a/tools/h5import/testfiles/txtfp64.txt b/tools/h5import/testfiles/txtfp64.txt new file mode 100755 index 0000000..6c83dc3 --- /dev/null +++ b/tools/h5import/testfiles/txtfp64.txt @@ -0,0 +1,19 @@ +12.3 14.2 15.56 +26.782 27.22 28.44 +29.33 20.11 11.45 +22.31 23.3332 24.343 + +16.134 19.34 0.17 +4.5 8.9 91.8 +34.7 0.32 0.076 +22.2 88.31 77.83 + +216.134 139.34 101.17 +24.5 82.9 291.8 +334.7 0.232 10.076 +222.2 88.31 77.83 + +122.3 114.2 125.56 +226.782 27.222 128.44 +341.7 30.132 0.1076 +4.51 181.9 911.8 diff --git a/tools/h5import/testfiles/txtin16.conf b/tools/h5import/testfiles/txtin16.conf new file mode 100755 index 0000000..d2d11c3 --- /dev/null +++ b/tools/h5import/testfiles/txtin16.conf @@ -0,0 +1,12 @@ +PATH /int/16-bit +INPUT-CLASS TEXTIN +INPUT-SIZE 16 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-BYTE-ORDER LE +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 8 +OUTPUT-ARCHITECTURE STD + + + diff --git a/tools/h5import/testfiles/txtin16.h5 b/tools/h5import/testfiles/txtin16.h5 new file mode 100644 index 0000000..dc6c1ea Binary files /dev/null and b/tools/h5import/testfiles/txtin16.h5 differ diff --git a/tools/h5import/testfiles/txtin16.txt b/tools/h5import/testfiles/txtin16.txt new file mode 100644 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtin16.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 diff --git a/tools/h5import/testfiles/txtin32.conf b/tools/h5import/testfiles/txtin32.conf new file mode 100755 index 0000000..ca4802a --- /dev/null +++ b/tools/h5import/testfiles/txtin32.conf @@ -0,0 +1,11 @@ +PATH /int/32-bit +INPUT-CLASS TEXTIN +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER BE + + + + diff --git a/tools/h5import/testfiles/txtin32.h5 b/tools/h5import/testfiles/txtin32.h5 new file mode 100644 index 0000000..350333c Binary files /dev/null and b/tools/h5import/testfiles/txtin32.h5 differ diff --git a/tools/h5import/testfiles/txtin32.txt b/tools/h5import/testfiles/txtin32.txt new file mode 100644 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtin32.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 diff --git a/tools/h5import/testfiles/txtin8.conf b/tools/h5import/testfiles/txtin8.conf new file mode 100755 index 0000000..4405338 --- /dev/null +++ b/tools/h5import/testfiles/txtin8.conf @@ -0,0 +1,16 @@ +PATH /int/8-bit +INPUT-CLASS TEXTIN +INPUT-SIZE 8 +OUTPUT-CLASS IN +OUTPUT-SIZE 8 +OUTPUT-BYTE-ORDER LE +OUTPUT-ARCHITECTURE STD +RANK 3 +DIMENSION-SIZES 2 4 3 +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 -1 +COMPRESSION-PARAM 3 + + + + diff --git a/tools/h5import/testfiles/txtin8.h5 b/tools/h5import/testfiles/txtin8.h5 new file mode 100644 index 0000000..42e7727 Binary files /dev/null and b/tools/h5import/testfiles/txtin8.h5 differ diff --git a/tools/h5import/testfiles/txtstr b/tools/h5import/testfiles/txtstr deleted file mode 100644 index 25be0a6..0000000 --- a/tools/h5import/testfiles/txtstr +++ /dev/null @@ -1,2 +0,0 @@ - hello world - hello world again diff --git a/tools/h5import/testfiles/txtstr.conf b/tools/h5import/testfiles/txtstr.conf new file mode 100644 index 0000000..85079e0 --- /dev/null +++ b/tools/h5import/testfiles/txtstr.conf @@ -0,0 +1,6 @@ +PATH /mytext/data +INPUT-CLASS STR + + + + diff --git a/tools/h5import/testfiles/txtstr.h5 b/tools/h5import/testfiles/txtstr.h5 new file mode 100644 index 0000000..ceb0810 Binary files /dev/null and b/tools/h5import/testfiles/txtstr.h5 differ diff --git a/tools/h5import/testfiles/txtstr.txt b/tools/h5import/testfiles/txtstr.txt new file mode 100644 index 0000000..25be0a6 --- /dev/null +++ b/tools/h5import/testfiles/txtstr.txt @@ -0,0 +1,2 @@ + hello world + hello world again diff --git a/tools/h5import/testfiles/txtuin16.conf b/tools/h5import/testfiles/txtuin16.conf new file mode 100755 index 0000000..753e6e8 --- /dev/null +++ b/tools/h5import/testfiles/txtuin16.conf @@ -0,0 +1,12 @@ +PATH /int/uint/16-bit +INPUT-CLASS TEXTUIN +INPUT-SIZE 16 +RANK 2 +DIMENSION-SIZES 4 3 +COMPRESSION-PARAM 2 +CHUNKED-DIMENSION-SIZES 2 2 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER LE + + + diff --git a/tools/h5import/testfiles/txtuin16.h5 b/tools/h5import/testfiles/txtuin16.h5 new file mode 100644 index 0000000..9ee166a Binary files /dev/null and b/tools/h5import/testfiles/txtuin16.h5 differ diff --git a/tools/h5import/testfiles/txtuin32.conf b/tools/h5import/testfiles/txtuin32.conf new file mode 100755 index 0000000..d61e1a1 --- /dev/null +++ b/tools/h5import/testfiles/txtuin32.conf @@ -0,0 +1,11 @@ +PATH /int/uint/32-bit +INPUT-CLASS TEXTUIN +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER BE + + + + diff --git a/tools/h5import/testfiles/txtuin32.h5 b/tools/h5import/testfiles/txtuin32.h5 new file mode 100644 index 0000000..1a4dda5 Binary files /dev/null and b/tools/h5import/testfiles/txtuin32.h5 differ diff --git a/tools/h5import/testfiles/txtuin32.txt b/tools/h5import/testfiles/txtuin32.txt new file mode 100755 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtuin32.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 -- cgit v0.12