diff options
-rw-r--r-- | MANIFEST | 20 | ||||
-rwxr-xr-x | tools/h5import/h5import.c | 29 | ||||
-rwxr-xr-x | tools/h5import/h5importtest.c | 5 | ||||
-rwxr-xr-x | tools/h5import/h5importtestutil.sh | 19 | ||||
-rw-r--r-- | tools/h5import/testfiles/in64.txt | 2 | ||||
-rw-r--r-- | tools/h5import/testfiles/test15.h5 | bin | 0 -> 2064 bytes | |||
-rwxr-xr-x | tools/h5import/testfiles/textfp32.conf (renamed from tools/h5import/testfiles/textfp32) | 0 | ||||
-rwxr-xr-x | tools/h5import/testfiles/textfp64.conf (renamed from tools/h5import/testfiles/textfp64) | 0 | ||||
-rwxr-xr-x | tools/h5import/testfiles/textin16.conf (renamed from tools/h5import/testfiles/textin16) | 0 | ||||
-rwxr-xr-x | tools/h5import/testfiles/textin32.conf (renamed from tools/h5import/testfiles/textin32) | 0 | ||||
-rwxr-xr-x | tools/h5import/testfiles/textin8.conf (renamed from tools/h5import/testfiles/textin8) | 0 | ||||
-rw-r--r-- | tools/h5import/testfiles/textpfe.conf | 11 | ||||
-rwxr-xr-x | tools/h5import/testfiles/textuin16.conf (renamed from tools/h5import/testfiles/textuin16) | 0 | ||||
-rwxr-xr-x | tools/h5import/testfiles/textuin32.conf (renamed from tools/h5import/testfiles/textuin32) | 0 |
14 files changed, 64 insertions, 22 deletions
@@ -927,13 +927,13 @@ ./tools/h5import/testfiles/fp1 ./tools/h5import/testfiles/fp2 ./tools/h5import/testfiles/in1 -./tools/h5import/testfiles/textfp32 -./tools/h5import/testfiles/textfp64 -./tools/h5import/testfiles/textin16 -./tools/h5import/testfiles/textin32 -./tools/h5import/testfiles/textin8 -./tools/h5import/testfiles/textuin16 -./tools/h5import/testfiles/textuin32 +./tools/h5import/testfiles/textfp32.conf +./tools/h5import/testfiles/textfp64.conf +./tools/h5import/testfiles/textin16.conf +./tools/h5import/testfiles/textin32.conf +./tools/h5import/testfiles/textin8.conf +./tools/h5import/testfiles/textuin16.conf +./tools/h5import/testfiles/textuin32.conf ./tools/h5import/testfiles/test1.h5 ./tools/h5import/testfiles/test2.h5 ./tools/h5import/testfiles/test3.h5 @@ -948,8 +948,12 @@ ./tools/h5import/testfiles/test12.h5 ./tools/h5import/testfiles/test13.h5 ./tools/h5import/testfiles/teststr.h5 -./tools/h5import/testfiles/txtstr +./tools/h5import/testfiles/test15.h5 +./tools/h5import/testfiles/teststr.h5 ./tools/h5import/testfiles/textstr +./tools/h5import/testfiles/textpfe.conf +./tools/h5import/testfiles/in64.txt + diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 2d19d95..4b24223 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -719,7 +719,19 @@ readFloatData(FILE **strm, struct Input *in) fp32 = (H5DT_FLOAT32 *) in->data; break; + /* same as TEXTFP */ case 2: /*TEXTFPE */ + + for (i = 0; i < len; i++, fp32++) + { + if (fscanf(*strm, "%f", fp32) != 1) + { + (void) fprintf(stderr, err1); + return (-1); + } + } + + fp32 = (H5DT_FLOAT32 *) in->data; break; case 3: /* FP */ @@ -756,7 +768,19 @@ readFloatData(FILE **strm, struct Input *in) fp64 = (H5DT_FLOAT64 *) in->data; break; + /* same as TEXTFP */ case 2: /*TEXTFPE */ + + for (i = 0; i < len; i++, fp64++) + { + if (fscanf(*strm, "%lf", fp64) != 1) + { + (void) fprintf(stderr, err1); + return (-1); + } + } + + fp64 = (H5DT_FLOAT64 *) in->data; break; case 3: /* FP */ @@ -2678,7 +2702,7 @@ help(char *name) (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 (\"TEXTIN\", \"TEXTFP\", \"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"); @@ -2687,9 +2711,6 @@ help(char *name) (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"); diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c index 7a6bbff..3c82e81 100755 --- a/tools/h5import/h5importtest.c +++ b/tools/h5import/h5importtest.c @@ -29,6 +29,7 @@ * Define names for test files */ + int main(void) { @@ -172,7 +173,7 @@ main(void) #ifndef UNICOS - sp = fopen("txtin16", "w"); + sp = fopen("in16.txt", "w"); for (k = 0; k < npln; k++) for (i = 0; i < nrow; i++) { @@ -182,7 +183,7 @@ main(void) } (void) fclose(sp); - sp = fopen("txtin32", "w"); + sp = fopen("in32.txt", "w"); for (k = 0; k < npln; k++) for (i = 0; i < nrow; i++) { diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh index 0687871..4f5a7bb 100755 --- a/tools/h5import/h5importtestutil.sh +++ b/tools/h5import/h5importtestutil.sh @@ -60,25 +60,25 @@ 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 in32.txt -c $srcdir/testfiles/textin32.conf -o test1.h5 TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" -TOOLTEST txtin16 -c $srcdir/testfiles/textin16 -o test2.h5 +TOOLTEST in16.txt -c $srcdir/testfiles/textin16.conf -o test2.h5 TESTING "ASCII I8 - rank 3 - Output I16 LE-Chunked+Extended+Compressed " -TOOLTEST txtin16 -c $srcdir/testfiles/textin8 -o test3.h5 +TOOLTEST in16.txt -c $srcdir/testfiles/textin8.conf -o test3.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.conf -o test4.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.conf -o test5.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.conf -o test6.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.conf -o test7.h5 TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " TOOLTEST bfp64 -c $srcdir/testfiles/conbfp64 -o test8.h5 @@ -101,7 +101,10 @@ TOOLTEST buin32 -c $srcdir/testfiles/conbuin32 -o test13.h5 TESTING "STR" TOOLTEST $srcdir/testfiles/txtstr -c $srcdir/testfiles/textstr -o teststr.h5 -rm -f tx* b* *.dat +TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " +TOOLTEST $srcdir/testfiles/in64.txt -c $srcdir/testfiles/textpfe.conf -o test15.h5 + +rm -f tx* b* *.dat *.txt rm -f test*.h5 rm -rf tmp_testfiles else diff --git a/tools/h5import/testfiles/in64.txt b/tools/h5import/testfiles/in64.txt new file mode 100644 index 0000000..f6dd7f4 --- /dev/null +++ b/tools/h5import/testfiles/in64.txt @@ -0,0 +1,2 @@ +6.02E+24 +3.14159265E+00 diff --git a/tools/h5import/testfiles/test15.h5 b/tools/h5import/testfiles/test15.h5 Binary files differnew file mode 100644 index 0000000..73a157c --- /dev/null +++ b/tools/h5import/testfiles/test15.h5 diff --git a/tools/h5import/testfiles/textfp32 b/tools/h5import/testfiles/textfp32.conf index 9696a7f..9696a7f 100755 --- a/tools/h5import/testfiles/textfp32 +++ b/tools/h5import/testfiles/textfp32.conf diff --git a/tools/h5import/testfiles/textfp64 b/tools/h5import/testfiles/textfp64.conf index fbab6a6..fbab6a6 100755 --- a/tools/h5import/testfiles/textfp64 +++ b/tools/h5import/testfiles/textfp64.conf diff --git a/tools/h5import/testfiles/textin16 b/tools/h5import/testfiles/textin16.conf index d2d11c3..d2d11c3 100755 --- a/tools/h5import/testfiles/textin16 +++ b/tools/h5import/testfiles/textin16.conf diff --git a/tools/h5import/testfiles/textin32 b/tools/h5import/testfiles/textin32.conf index ca4802a..ca4802a 100755 --- a/tools/h5import/testfiles/textin32 +++ b/tools/h5import/testfiles/textin32.conf diff --git a/tools/h5import/testfiles/textin8 b/tools/h5import/testfiles/textin8.conf index 4405338..4405338 100755 --- a/tools/h5import/testfiles/textin8 +++ b/tools/h5import/testfiles/textin8.conf diff --git a/tools/h5import/testfiles/textpfe.conf b/tools/h5import/testfiles/textpfe.conf new file mode 100644 index 0000000..69fd8c8 --- /dev/null +++ b/tools/h5import/testfiles/textpfe.conf @@ -0,0 +1,11 @@ +PATH /test +INPUT-CLASS TEXTFPE +INPUT-SIZE 64 +RANK 1 +DIMENSION-SIZES 2 +OUTPUT-CLASS FP +OUTPUT-SIZE 64 + + + + diff --git a/tools/h5import/testfiles/textuin16 b/tools/h5import/testfiles/textuin16.conf index 753e6e8..753e6e8 100755 --- a/tools/h5import/testfiles/textuin16 +++ b/tools/h5import/testfiles/textuin16.conf diff --git a/tools/h5import/testfiles/textuin32 b/tools/h5import/testfiles/textuin32.conf index d61e1a1..d61e1a1 100755 --- a/tools/h5import/testfiles/textuin32 +++ b/tools/h5import/testfiles/textuin32.conf |