diff options
-rw-r--r-- | tools/h5repack/h5repack.c | 4 | ||||
-rw-r--r-- | tools/h5repack/h5repack.h | 5 | ||||
-rw-r--r-- | tools/h5repack/h5repack.sh | 26 | ||||
-rw-r--r-- | tools/h5repack/h5repack_parse.c | 22 | ||||
-rw-r--r-- | tools/h5repack/testh5repack_dset.c | 4 | ||||
-rw-r--r-- | tools/h5repack/testh5repack_main.c | 30 | ||||
-rw-r--r-- | tools/testfiles/h5repack_info.txt | 2 |
7 files changed, 43 insertions, 50 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 3863846..afd8efa 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -118,8 +118,8 @@ int h5repack_end (pack_opt_t *options) /*------------------------------------------------------------------------- * Function: h5repack_addfilter * - * Purpose: add a compression -t option to table - * Example: -t "*:GZIP 6" , STR = "*:GZIP 6" + * Purpose: add a compression -f option to table + * Example: -f "dset:GZIP=6" * * Return: 0, ok, -1, fail * diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h index 5abaf13..6ace654 100644 --- a/tools/h5repack/h5repack.h +++ b/tools/h5repack/h5repack.h @@ -21,11 +21,6 @@ #include "h5diff.h" #include "h5tools.h" - -#if 0 -#define H5_REPACK_DEBUG -#endif - #define H5FOPENERROR "unable to open file" #define PFORMAT "%-7s %-7s %-7s\n" /*chunk info, compression info, name*/ diff --git a/tools/h5repack/h5repack.sh b/tools/h5repack/h5repack.sh index df55359..bac641a 100644 --- a/tools/h5repack/h5repack.sh +++ b/tools/h5repack/h5repack.sh @@ -106,30 +106,30 @@ DIFFTEST() # TOOLTEST -i test4.h5 -o test4.out.h5 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "GZIP 1" +TOOLTEST -i test4.h5 -o test4.out.h5 -f GZIP=1 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "SZIP 8" +TOOLTEST -i test4.h5 -o test4.out.h5 -f SZIP=8 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "SHUF" +TOOLTEST -i test4.h5 -o test4.out.h5 -f SHUF DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "FLET" +TOOLTEST -i test4.h5 -o test4.out.h5 -f FLET DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "dset1:SHUF" -f "dset1,dset2:GZIP 6" +TOOLTEST -i test4.h5 -o test4.out.h5 -f dset1:SHUF -f dset1,dset2:GZIP=6 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -l "dset1:CHUNK 20x10" -f "dset1,dset2:SZIP 8" +TOOLTEST -i test4.h5 -o test4.out.h5 -l dset1:CHUNK=20x10 -f dset1,dset2:SZIP=8 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -l "CHUNK 20x10" +TOOLTEST -i test4.h5 -o test4.out.h5 -l CHUNK=20x10 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -l "COMPA" +TOOLTEST -i test4.h5 -o test4.out.h5 -l COMPA DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -l "CONTI" +TOOLTEST -i test4.h5 -o test4.out.h5 -l CONTI DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "GZIP 1" -m 1024 +TOOLTEST -i test4.h5 -o test4.out.h5 -f GZIP=1 -m 1024 DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -f "NONE" -DIFFTEST test4.h5 test4.out.h5 -TOOLTEST -i test4.h5 -o test4.out.h5 -e "h5repack_info.txt" +TOOLTEST -i test4.h5 -o test4.out.h5 -f NONE DIFFTEST test4.h5 test4.out.h5 +#TOOLTEST -i test4.h5 -o test4.out.h5 -e h5repack_info.txt +#DIFFTEST test4.h5 test4.out.h5 if test $nerrors -eq 0 ; then echo "All $H5REPACK tests passed." diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index 0f1e0d2..204adf3 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -18,6 +18,9 @@ #include <ctype.h> #include "h5repack.h" +#if 0 +#define PARSE_DEBUG +#endif /*------------------------------------------------------------------------- * Function: parse_filter @@ -34,7 +37,7 @@ * NONE, to remove the filter * * Examples: - * "GZIP 6" + * "GZIP=6" * "A,B:NONE" * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu @@ -60,6 +63,10 @@ obj_list_t* parse_filter(const char *str, obj_list_t* obj_list=NULL; unsigned pixels_per_block; +#if defined(PARSE_DEBUG) + fprintf(stderr,"%s\n",str); +#endif + /* initialize compression info */ memset(filt,0,sizeof(filter_info_t)); @@ -120,9 +127,9 @@ obj_list_t* parse_filter(const char *str, { c = str[i]; scomp[k]=c; - if ( c==' ' || i==len-1) + if ( c=='=' || i==len-1) { - if ( c==' ') { /*one more parameter */ + if ( c=='=') { /*one more parameter */ scomp[k]='\0'; /*cut space */ /* here we could have 1, 2 or 3 digits */ @@ -292,7 +299,7 @@ const char* get_sfilter(H5Z_filter_t filtn) * COMPA, to apply compact layout * * Example: - * "AA,B,CDE:CHUNK 10X10" + * "AA,B,CDE:CHUNK=10X10" * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -300,9 +307,6 @@ const char* get_sfilter(H5Z_filter_t filtn) * *------------------------------------------------------------------------- */ - - - obj_list_t* parse_layout(const char *str, int *n_objs, pack_info_t *pack, /* info about layout needed */ @@ -412,10 +416,6 @@ obj_list_t* parse_layout(const char *str, c = str[i]; sdim[k]=c; k++; /*increment sdim index */ - -#if defined PARSE_DEBUG - printf (" i=%d c=%c ",i, c); -#endif if (!isdigit(c) && c!='x' && c!='N' && c!='O' && c!='N' && c!='E'){ if (obj_list) free(obj_list); diff --git a/tools/h5repack/testh5repack_dset.c b/tools/h5repack/testh5repack_dset.c index d74c214..4d04da1 100644 --- a/tools/h5repack/testh5repack_dset.c +++ b/tools/h5repack/testh5repack_dset.c @@ -243,9 +243,7 @@ void write_dset_in(hid_t loc_id, /* Dataset region reference ( H5R_DATASET_REGION ) */ make_dset_reg_ref(loc_id); -#if defined(H5_REPACK_DEBUG) - read_dset_reg_ref(loc_id); -#endif + /*------------------------------------------------------------------------- * H5T_ENUM diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c index d5cca6e..1e97a66 100644 --- a/tools/h5repack/testh5repack_main.c +++ b/tools/h5repack/testh5repack_main.c @@ -255,9 +255,9 @@ test_filter_deflate(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("dset1:GZIP 9",&pack_options)<0) + if (h5repack_addfilter("dset1:GZIP=9",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -275,9 +275,9 @@ test_filter_deflate(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("GZIP 9",&pack_options)<0) + if (h5repack_addfilter("GZIP=9",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -339,9 +339,9 @@ test_filter_szip(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("dset2:SZIP 8",&pack_options)<0) + if (h5repack_addfilter("dset2:SZIP=8",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("dset2:CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -359,7 +359,7 @@ test_filter_szip(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("SZIP 8",&pack_options)<0) + if (h5repack_addfilter("SZIP=8",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -425,7 +425,7 @@ test_filter_shuffle(void) TEST_ERROR; if (h5repack_addfilter("dset1:SHUF",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -445,7 +445,7 @@ test_filter_shuffle(void) TEST_ERROR; if (h5repack_addfilter("SHUF",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -508,7 +508,7 @@ test_filter_checksum(void) TEST_ERROR; if (h5repack_addfilter("dset1:FLET",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -528,7 +528,7 @@ test_filter_checksum(void) TEST_ERROR; if (h5repack_addfilter("FLET",&pack_options)<0) TEST_ERROR; - if (h5repack_addlayout("CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -589,7 +589,7 @@ test_layout_chunked(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -607,7 +607,7 @@ test_layout_chunked(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addlayout("CHUNK 20x10",&pack_options)<0) + if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -813,9 +813,9 @@ test_filterqueue(void) #endif if (h5repack_addfilter("dset1:SHUF",&pack_options)<0) TEST_ERROR; - if (h5repack_addfilter("dset1:SZIP 8",&pack_options)<0) + if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0) TEST_ERROR; - if (h5repack_addfilter("dset1:GZIP 1",&pack_options)<0) + if (h5repack_addfilter("dset1:GZIP=1",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; diff --git a/tools/testfiles/h5repack_info.txt b/tools/testfiles/h5repack_info.txt index 4d6eef1..20ed2f8 100644 --- a/tools/testfiles/h5repack_info.txt +++ b/tools/testfiles/h5repack_info.txt @@ -1 +1 @@ --l "dset1:CHUNK 20x20" -f "dset1,dset2:SZIP 8" +-l dset1:CHUNK=20x20 -f dset1,dset2:SZIP=8 |