mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
[svn-r8297] Purpose:
bug fix Description: the synntax of the input of h5repack conatined double quotes and spaces, which were causing problems on the parsing in AIX paralell Solution: replaced the spaces by = that is, instead of -f "GZIP 6" we have now -f GZIP=6 Platforms tested: linux solaris AIX paralell Misc. update:
This commit is contained in:
parent
9a04849fdb
commit
6705762081
@ -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
|
||||
*
|
||||
|
@ -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*/
|
||||
|
@ -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."
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -1 +1 @@
|
||||
-l "dset1:CHUNK 20x20" -f "dset1,dset2:SZIP 8"
|
||||
-l dset1:CHUNK=20x20 -f dset1,dset2:SZIP=8
|
||||
|
Loading…
x
Reference in New Issue
Block a user