diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-10-25 20:38:28 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-10-25 20:38:28 (GMT) |
commit | 9d94440384d20ab09297b8c451dfbda051ed6b17 (patch) | |
tree | 83c66c31c30c19b0935e3f70d90cacbe027d3bd1 | |
parent | ea1047de515e12e651e65c1b88c40b1c713f0b06 (diff) | |
download | hdf5-9d94440384d20ab09297b8c451dfbda051ed6b17.zip hdf5-9d94440384d20ab09297b8c451dfbda051ed6b17.tar.gz hdf5-9d94440384d20ab09297b8c451dfbda051ed6b17.tar.bz2 |
[svn-r12815]
1) added a new parameter to the h5diff function diff_array that contains
the beginning position of the hyperslab, so that the total position in
the array is printed correctly when reading by hyperslabs.
2) added a new test to h5diff that reads and diffs by hyperslabs. The
test reads a 1GB dataset, from which a 1KB hyperslab was written with
differences .
3) added the generation of 2 files to the generator program to test the
h5diff hyperslab read.
4) changed the h5diff binary pre-generated file names to be more
descriptive (e.g, instead of file1.h5, made it h5diff_basic1.h5)
5) changed the name of the h5repack options text file to info.h5repack
85 files changed, 2650 insertions, 1464 deletions
@@ -1236,14 +1236,16 @@ ./tools/testfiles/tall-2A.h5.xml #test files for h5diff -./tools/testfiles/file1.h5 -./tools/testfiles/file2.h5 -./tools/testfiles/file3.h5 -./tools/testfiles/file4.h5 -./tools/testfiles/file5.h5 -./tools/testfiles/file6.h5 -./tools/testfiles/file7.h5 -./tools/testfiles/file8.h5 +./tools/testfiles/h5diff_dtypes.h5 +./tools/testfiles/h5diff_dset1.h5 +./tools/testfiles/h5diff_hyper1.h5 +./tools/testfiles/h5diff_basic1.h5 +./tools/testfiles/h5diff_dset2.h5 +./tools/testfiles/h5diff_attr1.h5 +./tools/testfiles/h5diff_hyper2.h5 +./tools/testfiles/h5diff_basic2.h5 +./tools/testfiles/h5diff_attr2.h5 +./tools/testfiles/h5diff_types.h5 ./tools/testfiles/h5diff_10.txt ./tools/testfiles/h5diff_11.txt ./tools/testfiles/h5diff_12.txt @@ -1306,6 +1308,9 @@ ./tools/testfiles/h5diff_70.txt ./tools/testfiles/h5diff_80.txt ./tools/testfiles/h5diff_90.txt +./tools/testfiles/h5diff_100.txt +./tools/testfiles/info.h5repack + #test files for h5repack ./tools/testfiles/test0.h5 @@ -1321,7 +1326,6 @@ ./tools/testfiles/test_szip.h5 ./tools/testfiles/test_nbit.h5 ./tools/testfiles/test_scaleoffset.h5 -./tools/testfiles/h5repack_info.txt # jam utility and tests ./tools/h5jam/h5jam.c diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 9ac4d56..7133005 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -285,7 +285,7 @@ int check_f_input( const char *str ) */ void usage(void) { - printf("Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] \n"); + printf("usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] \n"); printf("\n"); printf("file1 File name of the first HDF5 file\n"); printf("file2 File name of the second HDF5 file\n"); diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 1f78b68..e283043 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -20,7 +20,7 @@ /*------------------------------------------------------------------------- * Program: h5diffgentest * - * Purpose: generate files for h5diff testting + * Purpose: generate files for h5diff testing * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -29,17 +29,19 @@ *------------------------------------------------------------------------- */ - +#define FILE1 "h5diff_basic1.h5" +#define FILE2 "h5diff_basic2.h5" +#define FILE3 "h5diff_types.h5" +#define FILE4 "h5diff_dtypes.h5" +#define FILE5 "h5diff_attr1.h5" +#define FILE6 "h5diff_attr2.h5" +#define FILE7 "h5diff_dset1.h5" +#define FILE8 "h5diff_dset2.h5" +#define FILE9 "h5diff_hyper1.h5" +#define FILE10 "h5diff_hyper2.h5" #define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */ #define STR_SIZE 3 -#define FILE1 "file1.h5" -#define FILE2 "file2.h5" -#define FILE3 "file3.h5" -#define FILE4 "file4.h5" -#define FILE5 "file5.h5" -#define FILE6 "file6.h5" -#define FILE7 "file7.h5" -#define FILE8 "file8.h5" +#define GBLL ((unsigned long_long) 1024 * 1024 *1024 ) #define MY_LINKCLASS 187 @@ -63,77 +65,119 @@ const H5L_class_t UD_link_class[1] = {{ /*------------------------------------------------------------------------- - * Function: write_attr + * prototypes + *------------------------------------------------------------------------- + */ + +/* tests called in main() */ +static int test_basic(const char *fname1,const char *fname2); +static int test_types(const char *fname); +static int test_datatypes(const char *fname); +static int test_attributes(const char *fname,int make_diffs); +static int test_datasets(const char *fname,int make_diffs); +static int test_hyperslab(char *fname,int make_diffs); +/* called by test_attributes() and test_datasets() */ +static void write_attr_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); +static void write_dset_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); +static void gen_datareg(hid_t fid,int make_diffs); +/* utilities */ +static int write_attr(hid_t loc_id,int rank,hsize_t *dims,const char *name,hid_t tid,void *buf); +static int write_dset(hid_t loc_id,int rank,hsize_t *dims,const char *name,hid_t tid,void *buf); + + +/*------------------------------------------------------------------------- + * Function: main * - * Purpose: utility function to write an attribute in LOC_ID + * Purpose: main program * *------------------------------------------------------------------------- */ -static -int write_attr(hid_t loc_id, - int rank, - hsize_t *dims, - const char *attr_name, - hid_t tid, - void *buf) -{ - hid_t aid; - hid_t sid; - herr_t status; - /* Create a buf space */ - sid = H5Screate_simple(rank,dims,NULL); +int main(void) +{ + test_basic (FILE1,FILE2); + test_types (FILE3); + test_datatypes(FILE4); - /* Create the attribute */ - aid = H5Acreate(loc_id,attr_name,tid,sid,H5P_DEFAULT); + /* generate 2 files, the second call creates a similar file with differences */ + test_attributes(FILE5,0); + test_attributes(FILE6,1); - /* Write the buf */ - if ( buf ) - status = H5Awrite(aid,tid,buf); + /* generate 2 files, the second call creates a similar file with differences */ + test_datasets(FILE7,0); + test_datasets(FILE8,1); - /* Close */ - status = H5Aclose(aid); - status = H5Sclose(sid); - return status; + /* generate 2 files, the second call creates a similar file with differences */ + test_hyperslab(FILE9,0); + test_hyperslab(FILE10,1); + return 0; } /*------------------------------------------------------------------------- - * Function: write_dset + * Function: test_basic * - * Purpose: utility function to create and write a dataset in LOC_ID + * Purpose: basic tests * *------------------------------------------------------------------------- */ + static -int write_dset( hid_t loc_id, - int rank, - hsize_t *dims, - const char *dset_name, - hid_t tid, - void *buf ) +int test_basic(const char *fname1, + const char *fname2) { - hid_t did; - hid_t sid; + + hid_t fid1, fid2; + hid_t gid1, gid2, gid3; herr_t status; + hsize_t dims[2] = { 3,2 }; - /* Create a buf space */ - sid = H5Screate_simple(rank,dims,NULL); + /* Test */ + double data1[3][2] = {{1,1},{1,1},{1,1}}; + double data2[3][2] = {{1,1.1},{1.01,1.001},{1.0001,1}}; + double data3[3][2] = {{100,110},{100,100},{100,100}}; + double data4[3][2] = {{110,100},{90,80},{140,200}}; + int data5[3][2] = {{100,100},{100,100},{100,100}}; + int data6[3][2] = {{101,102},{103,104},{150,200}}; + unsigned long_long data7[3][2] = {{100,100},{100,100},{100,100}}; + unsigned long_long data8[3][2] = {{101,102},{103,104},{150,200}}; - /* Create a dataset */ - did = H5Dcreate(loc_id,dset_name,tid,sid,H5P_DEFAULT); +/*------------------------------------------------------------------------- + * Create two files + *------------------------------------------------------------------------- + */ - /* Write the buf */ - if ( buf ) - status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf); + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - /* Close */ - status = H5Dclose(did); - status = H5Sclose(sid); + /* Create groups */ + gid1 = H5Gcreate(fid1, "g1", 0); + gid2 = H5Gcreate(fid2, "g1", 0); + gid3 = H5Gcreate(fid2, "g2", 0); - return status; -} + write_dset(gid1,2,dims,"dset1",H5T_NATIVE_DOUBLE,data1); + write_dset(gid2,2,dims,"dset2",H5T_NATIVE_DOUBLE,data2); + write_dset(gid1,2,dims,"dset3",H5T_NATIVE_DOUBLE,data3); + write_dset(gid2,2,dims,"dset4",H5T_NATIVE_DOUBLE,data4); + write_dset(gid2,2,dims,"dset1",H5T_NATIVE_DOUBLE,data2); + /* relative (int) */ + write_dset(gid1,2,dims,"dset5",H5T_NATIVE_INT,data5); + write_dset(gid1,2,dims,"dset6",H5T_NATIVE_INT,data6); + /* relative (unsigned long_long) */ + write_dset(gid1,2,dims,"dset7",H5T_NATIVE_ULLONG,data7); + write_dset(gid1,2,dims,"dset8",H5T_NATIVE_ULLONG,data8); +/*------------------------------------------------------------------------- + * Close + *------------------------------------------------------------------------- + */ + status = H5Gclose(gid1); + status = H5Gclose(gid2); + status = H5Gclose(gid3); + status = H5Fclose(fid1); + status = H5Fclose(fid2); + return status; +} /* @@ -141,902 +185,463 @@ int write_dset( hid_t loc_id, # # Common usage # ############################################################################## - # 1.0 - -h - -# 1.1 - file1.h5 file2.h5 g1/dset1 g1/dset2 - -# 1.2 - file1.h5 file2.h5 -n 2 g1/dset1 g1/dset2 - -# 1.3 - file1.h5 file2.h5 -d 5 g1/dset3 g1/dset4 - -# 1.4 - file1.h5 file2.h5 -p 0.05 g1/dset3 g1/dset4 - -# 1.5 - file1.h5 file2.h5 -r g1/dset1 g1/dset2 - -# 1.6 - file1.h5 file2.h5 - -# ############################################################################## -# # basic types -# ############################################################################## - -# 2.0 - file3.h5 file3.h5 dset group - -# 2.1 - file3.h5 file3.h5 dset link +TOOLTEST h5diff_10.txt -h -# 2.2 - file3.h5 file3.h5 dset type - -# 2.3 - file3.h5 file3.h5 group group - -# 2.4 - file3.h5 file3.h5 type type - -# 2.5 - file3.h5 file3.h5 link link - - -# ############################################################################## -# # Dimensions -# ############################################################################## - -# 4.0 - file5.h5 file5.h5 dset1 dset2 - -# 4.1 - file5.h5 file5.h5 dset3 dset4 - -# 4.2 - file5.h5 file5.h5 dset5 dset6 - - -# ############################################################################## -# # Dataset types -# ############################################################################## - -# 5.0 - file6.h5 file6.h5 dset0a dset0b - -# 5.1 - file6.h5 file6.h5 dset1a dset1b - -# 5.2 - file6.h5 file6.h5 dset2a dset2b - -# 5.3 - file6.h5 file6.h5 dset3a dset4b - -# 5.4 - file6.h5 file6.h5 dset4a dset4b - -# 5.5 - file6.h5 file6.h5 dset5a dset5b - -# 5.6 - file6.h5 file6.h5 dset6a dset6b - -# 5.7 - file6.h5 file6.h5 dset7a dset7b - -# 5.8 - file6.h5 file6.h5 dset8a dset8b - -# ############################################################################## -# # Error messages -# ############################################################################## - - -# 6.0: Check if the command line number of arguments is less than 3 - h5diff_test1.h5 - -# 6.1: Check for invalid options - h5diff_test1.h5 h5diff_test2.h5 -x - -# ############################################################################## -# # -d -# ############################################################################## - -# 6.2: no value - file1.h5 file2.h5 -d g1/dset3 g1/dset4 - -# 6.3: negative value - file1.h5 file2.h5 -d -4 g1/dset3 g1/dset4 - -# 6.4: zero - file1.h5 file2.h5 -d 0 g1/dset3 g1/dset4 - -# 6.5: non number - file1.h5 file2.h5 -d u g1/dset3 g1/dset4 - -# 6.6: hexadecimal - file1.h5 file2.h5 -d 0x1 g1/dset3 g1/dset4 - -# 6.7: string - file1.h5 file2.h5 -d "1" g1/dset3 g1/dset4 - -# 6.8: repeated option - file1.h5 file2.h5 -d 1 -d 2 g1/dset3 g1/dset4 - -# 6.9: number larger than biggest difference - file1.h5 file2.h5 -d 200 g1/dset3 g1/dset4 - -# 6.10: number smaller than smallest difference - file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4 - - -# ############################################################################## -# # -p -# ############################################################################## +# 1.1 normal mode +TOOLTEST h5diff_11.txt file1.h5 file2.h5 +# 1.2 normal mode with objects +TOOLTEST h5diff_12.txt file1.h5 file2.h5 g1/dset1 g1/dset2 -# 6.11: no value - file1.h5 file2.h5 -p g1/dset3 g1/dset4 +# 1.3 report mode +TOOLTEST h5diff_13.txt file1.h5 file2.h5 -r -# 6.12: negative value - file1.h5 file2.h5 -p -4 g1/dset3 g1/dset4 +# 1.4 report mode with objects +TOOLTEST h5diff_14.txt file1.h5 file2.h5 -r g1/dset1 g1/dset2 -# 6.13: zero - file1.h5 file2.h5 -p 0 g1/dset3 g1/dset4 +# 1.5 with -d +TOOLTEST h5diff_15.txt file1.h5 file2.h5 -r -d 5 g1/dset3 g1/dset4 -# 6.14: non number - file1.h5 file2.h5 -p u g1/dset3 g1/dset4 +# 1.6 with -p +TOOLTEST h5diff_16.txt file1.h5 file2.h5 -r -p 0.05 g1/dset3 g1/dset4 -# 6.15: hexadecimal - file1.h5 file2.h5 -p 0x1 g1/dset3 g1/dset4 +# 1.7 verbose mode +TOOLTEST h5diff_17.txt file1.h5 file2.h5 -v -# 6.16: string - file1.h5 file2.h5 -p "0.21" g1/dset3 g1/dset4 +# 1.8 quiet mode +TOOLTEST h5diff_18.txt file1.h5 file2.h5 -q -# 6.17: repeated option - file1.h5 file2.h5 -p 0.21 -p 0.22 g1/dset3 g1/dset4 +# 1.9.1 with -p (int) +TOOLTEST h5diff_191.txt file1.h5 file1.h5 -v -p 0.02 g1/dset5 g1/dset6 -# 6.18: number larger than biggest difference - file1.h5 file2.h5 -p 2 g1/dset3 g1/dset4 - -# 6.19: number smaller than smallest difference - file1.h5 file2.h5 -p 0.005 g1/dset3 g1/dset4 - - - -# ############################################################################## -# # -n -# ############################################################################## - - -# 6.20: no value - file1.h5 file2.h5 -n g1/dset3 g1/dset4 - -# 6.21: negative value - file1.h5 file2.h5 -n -4 g1/dset3 g1/dset4 - -# 6.22: zero - file1.h5 file2.h5 -n 0 g1/dset3 g1/dset4 - -# 6.23: non number - file1.h5 file2.h5 -n u g1/dset3 g1/dset4 - -# 6.24: hexadecimal - file1.h5 file2.h5 -n 0x1 g1/dset3 g1/dset4 - -# 6.25: string - file1.h5 file2.h5 -n "2" g1/dset3 g1/dset4 - -# 6.26: repeated option - file1.h5 file2.h5 -n 2 -n 3 g1/dset3 g1/dset4 - -# 6.27: number larger than biggest difference - file1.h5 file2.h5 -n 200 g1/dset3 g1/dset4 - -# 6.28: number smaller than smallest difference - file1.h5 file2.h5 -n 1 g1/dset3 g1/dset4 - -# ############################################################################## -# # non valid files -# ############################################################################## - - file1.h6 file2.h6 +# 1.9.2 with -p (unsigned long_long) +TOOLTEST h5diff_192.txt file1.h5 file1.h5 -v -p 0.02 g1/dset7 g1/dset8 */ - /*------------------------------------------------------------------------- - * Function: gen_datareg - * - * Purpose: generate a dataset region and its reference + * Function: test_types * - * Date: April 19, 2006 + * Purpose: Compare different HDF5 types (H5G_obj_t): + * H5G_DATASET, H5G_TYPE, H5G_GROUP, H5G_LINK, H5G_UDLINK * *------------------------------------------------------------------------- */ - static -void gen_datareg(hid_t fid, - int make_diffs /* flag to modify data buffers */) +int test_types(const char *fname) { - /* data dataset */ - hid_t did1; /* dataset ID */ - hid_t sid1; /* dataspace ID */ - hsize_t dims1[2] = {10,10};/* dimensions */ - int *buf; /* dataset buffer */ - /* reference dataset */ - hid_t did2; /* dataset ID */ - hid_t sid2; /* dataspace ID */ - hsize_t dims2[] = {2}; /* 2 references */ - hdset_reg_ref_t *rbuf; /* buffer for write the references */ - hsize_t start[10]; /* starting location of hyperslab */ - hsize_t count[10]; /* element count of hyperslab */ - hsize_t coord[5][2]; /* coordinates for point selection */ - herr_t status; - int i; - - /* allocate the buffer for write the references */ - rbuf=calloc(2,sizeof(hdset_reg_ref_t)); - - /* allocate the buffer for write the data dataset */ - buf=malloc(10*10*sizeof(int)); - - for (i=0; i<10*10; i++) - { - buf[i]=i; - } - /* create the data dataset */ - sid1 = H5Screate_simple(2,dims1,NULL); - did1 = H5Dcreate(fid,"dsetref",H5T_NATIVE_INT,sid1,H5P_DEFAULT); - status = H5Dwrite(did1,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf); - - /* create the reference dataset */ - sid2 = H5Screate_simple(1,dims2,NULL); - did2 = H5Dcreate(fid,"refreg",H5T_STD_REF_DSETREG,sid2,H5P_DEFAULT); - - /* create the references */ - /* select hyperslab for first reference */ - - start[0]=2; start[1]=2; - count[0]=6; count[1]=6; - if (make_diffs) + hid_t fid1; + hid_t gid1; + hid_t gid2; + hid_t tid1; + hid_t tid2; + herr_t status; + hsize_t dims[1]={1}; + typedef struct s1_t { - start[0]=0; start[1]=0; - count[0]=3; count[1]=3; - } - - status = H5Sselect_hyperslab(sid1,H5S_SELECT_SET,start,NULL,count,NULL); - H5Sget_select_npoints(sid1); - - /* store first dataset region */ - status = H5Rcreate(&rbuf[0],fid,"dsetref",H5R_DATASET_REGION,sid1); - - /* select sequence of five points for second reference */ - coord[0][0]=6; coord[0][1]=9; - coord[1][0]=2; coord[1][1]=2; - coord[2][0]=8; coord[2][1]=4; - coord[3][0]=1; coord[3][1]=6; - coord[4][0]=2; coord[4][1]=8; - if (make_diffs) + int a; + float b; + } s1_t; + typedef struct s2_t { - coord[1][0]=3; coord[1][1]=3; - coord[3][0]=2; coord[3][1]=5; - coord[4][0]=1; coord[4][1]=7; - } - H5Sselect_elements(sid1,H5S_SELECT_SET,5,(const hsize_t **)coord); - H5Sget_select_npoints(sid1); - - /* store second dataset region */ - H5Rcreate(&rbuf[1],fid,"dsetref",H5R_DATASET_REGION,sid1); - - /* write */ - status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf); - - /* close, free memory buffers */ - status = H5Dclose(did1); - status = H5Sclose(sid1); - status = H5Dclose(did2); - status = H5Sclose(sid2); - free(rbuf); - free(buf); - -} + int a; + } s2_t; /*------------------------------------------------------------------------- - * Function: write_dset_in - * - * Purpose: write datasets in LOC_ID - * + * Create one file *------------------------------------------------------------------------- */ -static -void write_dset_in(hid_t loc_id, - const char* dset_name, /* for saving reference to dataset*/ - hid_t fid, - int make_diffs /* flag to modify data buffers */) -{ - /* Compound datatype */ - typedef struct s_t - { - char a; - double b; - } s_t; - - typedef enum - { - RED, - GREEN - } e_t; - - hid_t did; - hid_t sid; - hid_t tid; - hid_t dcpl; - herr_t status; - int val, i, j, k, n; - float f; - int fillvalue=2; - - /* create 1D attributes with dimension [2], 2 elements */ - hsize_t dims[1]={2}; - char buf1[2][STR_SIZE]= {"ab","de"}; /* string */ - char buf2[2]= {1,2}; /* bitfield, opaque */ - s_t buf3[2]= {{1,2},{3,4}}; /* compound */ - hobj_ref_t buf4[2]; /* reference */ - e_t buf45[2]= {RED,GREEN}; /* enum */ - hvl_t buf5[2]; /* vlen */ - hsize_t dimarray[1]={3}; /* array dimension */ - int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */ - int buf7[2]= {1,2}; /* integer */ - float buf8[2]= {1,2}; /* float */ - - /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2]={3,2}; - char buf12[6][STR_SIZE]= {"ab","cd","ef","gh","ij","kl"}; /* string */ - char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ - s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ - hobj_ref_t buf42[3][2]; /* reference */ - hvl_t buf52[3][2]; /* vlen */ - int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */ - int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */ - float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */ - - /* create 3D attributes with dimension [4][3][2], 24 elements */ - hsize_t dims3[3]={4,3,2}; - char buf13[24][STR_SIZE]= {"ab","cd","ef","gh","ij","kl","mn","pq", - "rs","tu","vw","xz","AB","CD","EF","GH", - "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ - char buf23[4][3][2]; /* bitfield, opaque */ - s_t buf33[4][3][2]; /* compound */ - hobj_ref_t buf43[4][3][2]; /* reference */ - hvl_t buf53[4][3][2]; /* vlen */ - int buf63[24][3]; /* array */ - int buf73[4][3][2]; /* integer */ - float buf83[4][3][2]; /* float */ - + fid1 = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- - * 1D + * H5G_DATASET *------------------------------------------------------------------------- */ + write_dset(fid1,1,dims,"dset",H5T_NATIVE_INT,0); /*------------------------------------------------------------------------- - * H5T_STRING + * H5G_GROUP *------------------------------------------------------------------------- */ - - - if (make_diffs) - { - for (i=0; i<2; i++) - for (j=0; j<2; j++) - { - buf1[i][j]='z'; - } - } - - - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,STR_SIZE); - write_dset(loc_id,1,dims,"string",tid,buf1); - status = H5Tclose(tid); + gid1 = H5Gcreate(fid1, "g1", 0); + status = H5Gclose(gid1); + gid2 = H5Gcreate(fid1, "g2", 0); + status = H5Gclose(gid2); /*------------------------------------------------------------------------- - * H5T_BITFIELD + * H5G_TYPE *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<2; i++) - buf2[i]=buf2[1]=0; - } - - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,1,dims,"bitfield",tid,buf2); - status = H5Tclose(tid); + /* create and commit datatype 1 */ + tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)); + H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT); + H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_FLOAT); + H5Tcommit(fid1, "t1", tid1); + H5Tclose(tid1); + /* create and commit datatype 2 */ + tid2 = H5Tcreate (H5T_COMPOUND, sizeof(s2_t)); + H5Tinsert(tid2, "a", HOFFSET(s2_t, a), H5T_NATIVE_INT); + H5Tcommit(fid1, "t2", tid2); + H5Tclose(tid2); /*------------------------------------------------------------------------- - * H5T_OPAQUE + * H5G_LINK *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<2; i++) - { - buf3[i].a=0; buf3[i].b=0; - } - } - - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,1,dims,"opaque",tid,buf2); - status = H5Tclose(tid); + status = H5Glink(fid1, H5L_TYPE_SOFT, "g1", "l1"); + status = H5Glink(fid1, H5L_TYPE_SOFT, "g2", "l2"); /*------------------------------------------------------------------------- - * H5T_COMPOUND + * H5G_UDLINK *------------------------------------------------------------------------- */ - - - if (make_diffs) - { - for (i=0; i<2; i++) - { - buf45[i]=GREEN; - } - } - - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,1,dims,"compound",tid,buf3); - status = H5Tclose(tid); + H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); + H5Lregister(UD_link_class); + H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- - * H5T_REFERENCE (H5R_OBJECT object reference) + * Close *------------------------------------------------------------------------- */ - /* Create references to dataset */ - if (dset_name) - { - status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1); - status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1); - write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4); - } + status = H5Fclose(fid1); + return status; +} -/*------------------------------------------------------------------------- - * H5T_REFERENCE (H5R_DATASET_REGION dataset region reference) - *------------------------------------------------------------------------- - */ - gen_datareg(fid,make_diffs); +/* -/*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,1,dims,"enum",tid,buf45); - status = H5Tclose(tid); +# ############################################################################## +# # not comparable types +# ############################################################################## -/*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ +# 2.0 +TOOLTEST h5diff_20.txt file3.h5 file3.h5 -v dset g1 - /* Allocate and initialize VL dataset to write */ +# 2.1 +TOOLTEST h5diff_21.txt file3.h5 file3.h5 -v dset l1 - buf5[0].len = 1; - buf5[0].p = malloc( 1 * sizeof(int)); - ((int *)buf5[0].p)[0]=1; - buf5[1].len = 2; - buf5[1].p = malloc( 2 * sizeof(int)); - ((int *)buf5[1].p)[0]=2; - ((int *)buf5[1].p)[1]=3; +# 2.2 +TOOLTEST h5diff_22.txt file3.h5 file3.h5 -v dset t1 - if (make_diffs) - { - ((int *)buf5[0].p)[0]=0; - ((int *)buf5[1].p)[0]=0; - ((int *)buf5[1].p)[1]=0; - } +# ############################################################################## +# # compare groups, types, links (no differences and differences) +# ############################################################################## - sid = H5Screate_simple(1,dims,NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate(loc_id,"vlen",tid,sid,H5P_DEFAULT); - status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf5); - assert(status>=0); - status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf5); - assert(status>=0); - status = H5Dclose(did); - status = H5Tclose(tid); - status = H5Sclose(sid); +# 2.3 +TOOLTEST h5diff_23.txt file3.h5 file3.h5 -v g1 g1 -/*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ +# 2.4 +TOOLTEST h5diff_24.txt file3.h5 file3.h5 -v t1 t1 - if (make_diffs) - { - for (i=0; i<2; i++) - for (j=0; j<3; j++) - { - buf6[i][j]=0; - } - } +# 2.5 +TOOLTEST h5diff_25.txt file3.h5 file3.h5 -v l1 l1 - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,1,dims,"array",tid,buf6); - status = H5Tclose(tid); +# 2.6 +TOOLTEST h5diff_26.txt file3.h5 file3.h5 -v g1 g2 + +# 2.7 +TOOLTEST h5diff_27.txt file3.h5 file3.h5 -v t1 t2 + +# 2.8 +TOOLTEST h5diff_28.txt file3.h5 file3.h5 -v l1 l2 +*/ /*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT + * Function: test_datatypes + * + * Purpose: test dataset datatypes + * *------------------------------------------------------------------------- */ +static +int test_datatypes(const char *fname) +{ - if (make_diffs) - { - for (i=0; i<2; i++) - { - buf7[i]=0; - buf8[i]=0; - } - } + hid_t fid1; + hsize_t dims[2]={3,2}; + herr_t status; + char buf1a[3][2] = {{1,1},{1,1},{1,1}}; + char buf1b[3][2] = {{1,1},{3,4},{5,6}}; + short buf2a[3][2] = {{1,1},{1,1},{1,1}}; + short buf2b[3][2] = {{1,1},{3,4},{5,6}}; + int buf3a[3][2] = {{1,1},{1,1},{1,1}}; + int buf3b[3][2] = {{1,1},{3,4},{5,6}}; + long buf4a[3][2] = {{1,1},{1,1},{1,1}}; + long buf4b[3][2] = {{1,1},{3,4},{5,6}}; + float buf5a[3][2] = {{1,1},{1,1},{1,1}}; + float buf5b[3][2] = {{1,1},{3,4},{5,6}}; + double buf6a[3][2] = {{1,1},{1,1},{1,1}}; + double buf6b[3][2] = {{1,1},{3,4},{5,6}}; - write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); - write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); + /*unsigned/signed test + signed char -128 to 127 + unsigned char 0 to 255 + */ + char buf7a[3][2] = {{-1,-128},{-1,-1},{-1,-1}}; + unsigned char buf7b[3][2] = {{1,128},{1,1},{1,1}}; + /* long_long test */ + long_long buf8a[3][2] = {{1,1},{1,1},{1,1}}; + long_long buf8b[3][2] = {{1,1},{3,4},{5,6}}; + unsigned long_long buf9a[3][2] = {{1,1},{1,1},{1,1}}; + unsigned long_long buf9b[3][2] = {{1,1},{3,4},{5,6}}; + + unsigned int buf10a[3][2] = {{UIMAX,1},{1,1},{1,1}}; + unsigned int buf10b[3][2] = {{UIMAX-1,1},{3,4},{5,6}}; -/*------------------------------------------------------------------------- - * 2D - *------------------------------------------------------------------------- - */ /*------------------------------------------------------------------------- - * H5T_STRING + * Create a file *------------------------------------------------------------------------- */ - - if (make_diffs) - { - memset(buf12, 'z', sizeof buf12); - } - - - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,STR_SIZE); - write_dset(loc_id,2,dims2,"string2D",tid,buf12); - status = H5Tclose(tid); + fid1 = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- - * H5T_BITFIELD + * Check for different storage order. Give a warning if they are different *------------------------------------------------------------------------- */ - - if (make_diffs) - { - memset(buf22,0,sizeof buf22); - } - - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22); - status = H5Tclose(tid); + write_dset(fid1,2,dims,"dset0a",H5T_STD_I16LE,buf2a); + write_dset(fid1,2,dims,"dset0b",H5T_STD_I32LE,buf3b); /*------------------------------------------------------------------------- - * H5T_OPAQUE + * Check H5T_NATIVE_CHAR *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,2,dims2,"opaque2D",tid,buf22); - status = H5Tclose(tid); + write_dset(fid1,2,dims,"dset1a",H5T_NATIVE_CHAR,buf1a); + write_dset(fid1,2,dims,"dset1b",H5T_NATIVE_CHAR,buf1b); /*------------------------------------------------------------------------- - * H5T_COMPOUND + * Check H5T_NATIVE_SHORT *------------------------------------------------------------------------- */ - - if (make_diffs) - { - memset(buf32,0,sizeof buf32); - } - - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,2,dims2,"compound2D",tid,buf32); - status = H5Tclose(tid); + write_dset(fid1,2,dims,"dset2a",H5T_NATIVE_SHORT,buf2a); + write_dset(fid1,2,dims,"dset2b",H5T_NATIVE_SHORT,buf2b); /*------------------------------------------------------------------------- - * H5T_REFERENCE (H5R_OBJECT object reference) + * Check H5T_NATIVE_INT *------------------------------------------------------------------------- */ - /* Create references to dataset */ - if (dset_name) - { - for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) { - status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1); - } - } - write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); - } + write_dset(fid1,2,dims,"dset3a",H5T_NATIVE_INT,buf3a); + write_dset(fid1,2,dims,"dset3b",H5T_NATIVE_INT,buf3b); /*------------------------------------------------------------------------- - * H5T_ENUM + * Check H5T_NATIVE_LONG *------------------------------------------------------------------------- */ - - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,2,dims2,"enum2D",tid,0); - status = H5Tclose(tid); + write_dset(fid1,2,dims,"dset4a",H5T_NATIVE_LONG,buf4a); + write_dset(fid1,2,dims,"dset4b",H5T_NATIVE_LONG,buf4b); /*------------------------------------------------------------------------- - * H5T_VLEN + * Check H5T_NATIVE_FLOAT *------------------------------------------------------------------------- */ - -/* Allocate and initialize VL dataset to write */ - n=0; - for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) { - int l; - buf52[i][j].p = malloc((i + 1) * sizeof(int)); - buf52[i][j].len = i + 1; - for (l = 0; l < i + 1; l++) - if (make_diffs)((int *)buf52[i][j].p)[l] = 0; - else ((int *)buf52[i][j].p)[l] = n++; - } - } - - sid = H5Screate_simple(2,dims2,NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate(loc_id,"vlen2D",tid,sid,H5P_DEFAULT); - status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf52); - assert(status>=0); - status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf52); - assert(status>=0); - status = H5Dclose(did); - status = H5Tclose(tid); - status = H5Sclose(sid); + write_dset(fid1,2,dims,"dset5a",H5T_NATIVE_FLOAT,buf5a); + write_dset(fid1,2,dims,"dset5b",H5T_NATIVE_FLOAT,buf5b); /*------------------------------------------------------------------------- - * H5T_ARRAY + * Check H5T_NATIVE_DOUBLE *------------------------------------------------------------------------- */ - if (make_diffs) - { - memset(buf62,0,sizeof buf62); - } - - - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,2,dims2,"array2D",tid,buf62); - status = H5Tclose(tid); + write_dset(fid1,2,dims,"dset6a",H5T_NATIVE_DOUBLE,buf6a); + write_dset(fid1,2,dims,"dset6b",H5T_NATIVE_DOUBLE,buf6b); /*------------------------------------------------------------------------- - * H5T_INTEGER, write a fill value + * H5T_NATIVE_CHAR and H5T_NATIVE_UCHAR *------------------------------------------------------------------------- */ - - if (make_diffs) - { - memset(buf72,0,sizeof buf72); - memset(buf82,0,sizeof buf82); - } - - - dcpl = H5Pcreate(H5P_DATASET_CREATE); - status = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue); - sid = H5Screate_simple(2,dims2,NULL); - did = H5Dcreate(loc_id,"integer2D",H5T_NATIVE_INT,sid,dcpl); - status = H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf72); - status = H5Pclose(dcpl); - status = H5Dclose(did); - status = H5Sclose(sid); + write_dset(fid1,2,dims,"dset7a",H5T_NATIVE_CHAR,buf7a); + write_dset(fid1,2,dims,"dset7b",H5T_NATIVE_UCHAR,buf7b); /*------------------------------------------------------------------------- - * H5T_FLOAT + * H5T_NATIVE_LLONG *------------------------------------------------------------------------- */ - write_dset(loc_id,2,dims2,"float2D",H5T_NATIVE_FLOAT,buf82); - + write_dset(fid1,2,dims,"dset8a",H5T_NATIVE_LLONG,buf8a); + write_dset(fid1,2,dims,"dset8b",H5T_NATIVE_LLONG,buf8b); /*------------------------------------------------------------------------- - * 3D + * H5T_NATIVE_ULLONG *------------------------------------------------------------------------- */ + write_dset(fid1,2,dims,"dset9a",H5T_NATIVE_ULLONG,buf9a); + write_dset(fid1,2,dims,"dset9b",H5T_NATIVE_ULLONG,buf9b); + /*------------------------------------------------------------------------- - * H5T_STRING + * H5T_NATIVE_INT *------------------------------------------------------------------------- */ - if (make_diffs) - { - memset(buf13,'z',sizeof buf13); - } + write_dset(fid1,2,dims,"dset10a",H5T_NATIVE_UINT,buf10a); + write_dset(fid1,2,dims,"dset10b",H5T_NATIVE_UINT,buf10b); - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,STR_SIZE); - write_dset(loc_id,3,dims3,"string3D",tid,buf13); - status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5T_BITFIELD + * Close *------------------------------------------------------------------------- */ + status = H5Fclose(fid1); + return status; +} +/* +# ############################################################################## +# # Dataset datatypes +# ############################################################################## - n=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) { - if (make_diffs) buf23[i][j][k]=0; - else buf23[i][j][k]=n++; - } - } - } +# 5.0 +TOOLTEST h5diff_50.txt file4.h5 file4.h5 -v dset0a dset0b +# 5.1 +TOOLTEST h5diff_51.txt file4.h5 file4.h5 -v dset1a dset1b - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23); - status = H5Tclose(tid); +# 5.2 +TOOLTEST h5diff_52.txt file4.h5 file4.h5 -v dset2a dset2b -/*------------------------------------------------------------------------- - * H5T_OPAQUE - *------------------------------------------------------------------------- - */ - tid = H5Tcreate(H5T_OPAQUE, 1); - status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,3,dims3,"opaque3D",tid,buf23); - status = H5Tclose(tid); +# 5.3 +TOOLTEST h5diff_53.txt file4.h5 file4.h5 -v dset3a dset4b -/*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ +# 5.4 +TOOLTEST h5diff_54.txt file4.h5 file4.h5 -v dset4a dset4b - n=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) { - if (make_diffs) { - buf33[i][j][k].a=0; - buf33[i][j][k].b=0; - } - else { - buf33[i][j][k].a=n++; - buf33[i][j][k].b=n++; - } - } - } - } +# 5.5 +TOOLTEST h5diff_55.txt file4.h5 file4.h5 -v dset5a dset5b +# 5.6 +TOOLTEST h5diff_56.txt file4.h5 file4.h5 -v dset6a dset6b - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); - H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); - H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,3,dims3,"compound3D",tid,buf33); - status = H5Tclose(tid); +# 5.7 +TOOLTEST h5diff_57.txt file4.h5 file4.h5 -v dset7a dset7b -/*------------------------------------------------------------------------- - * H5T_REFERENCE (H5R_OBJECT object reference) - *------------------------------------------------------------------------- - */ - /* Create references to dataset */ - if (dset_name) - { - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) - status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1); - } - } - write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); - } +# 5.8 (region reference) +TOOLTEST h5diff_58.txt file7.h5 file8.h5 -v refreg +*/ /*------------------------------------------------------------------------- - * H5T_ENUM + * Function: test_attributes + * + * Purpose: test attributes + * *------------------------------------------------------------------------- */ +static +int test_attributes(const char *file, + int make_diffs /* flag to modify data buffers */) +{ + hid_t fid; + hid_t did; + hid_t gid; + hid_t root_id; + hid_t sid; + hsize_t dims[1]={2}; + herr_t status; - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); - H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,3,dims3,"enum3D",tid,0); - status = H5Tclose(tid); + /* Create a file */ + if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) + return -1; + + /* Create a 1D dataset */ + sid = H5Screate_simple(1,dims,NULL); + did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT); + status = H5Sclose(sid); + assert(status>=0); + + /* Create groups */ + gid = H5Gcreate(fid,"g1",0); + root_id = H5Gopen(fid, "/"); /*------------------------------------------------------------------------- - * H5T_VLEN + * write a series of attributes on the dataset, group, and root group *------------------------------------------------------------------------- */ - /* Allocate and initialize VL dataset to write */ - n=0; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) { - int l; - buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); - buf53[i][j][k].len = i + 1; - for (l = 0; l < i + 1; l++) - if (make_diffs)((int *)buf53[i][j][k].p)[l] = 0; - else ((int *)buf53[i][j][k].p)[l] = n++; - } - } - } + write_attr_in(did,"dset",fid,make_diffs); + write_attr_in(gid,NULL,0,make_diffs); + write_attr_in(root_id,NULL,0,make_diffs); - sid = H5Screate_simple(3,dims3,NULL); - tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate(loc_id,"vlen3D",tid,sid,H5P_DEFAULT); - status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf53); + + /* Close */ + status = H5Dclose(did); assert(status>=0); - status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf53); + status = H5Gclose(gid); assert(status>=0); - status = H5Dclose(did); - status = H5Tclose(tid); - status = H5Sclose(sid); + status = H5Gclose(root_id); + assert(status>=0); + + /* Close file */ + status = H5Fclose(fid); + assert(status>=0); + return status; +} + /*------------------------------------------------------------------------- - * H5T_ARRAY + * Function: test_datasets + * + * Purpose: Check all HDF5 classes + * H5T_INTEGER, H5T_FLOAT + * H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_COMPOUND, H5T_REFERENCE, + * H5T_ENUM, H5T_VLEN, H5T_ARRAY + * *------------------------------------------------------------------------- */ +static +int test_datasets(const char *file, + int make_diffs /* flag to modify data buffers */) +{ + hid_t fid; + hid_t did; + hid_t gid; + hid_t sid; + hsize_t dims[1]={2}; + herr_t status; + int buf[2]={1,2}; - - n=1; - for (i = 0; i < 24; i++) { - for (j = 0; j < (int)dimarray[0]; j++) { - if (make_diffs) buf63[i][j]=0; - else buf63[i][j]=n++; - } + if (make_diffs) + { + memset(buf,0,sizeof buf); } - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,3,dims3,"array3D",tid,buf63); - status = H5Tclose(tid); + /* Create a file */ + if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) + return -1; + + /* Create a 1D dataset */ + sid = H5Screate_simple(1,dims,NULL); + did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT); + status = H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf); + status = H5Sclose(sid); + assert(status>=0); + + /* Create a group */ + gid = H5Gcreate(fid,"g1",0); /*------------------------------------------------------------------------- - * H5T_INTEGER and H5T_FLOAT + * write a series of datasets on the group *------------------------------------------------------------------------- */ - n=1; f=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) { - if (make_diffs) { - buf73[i][j][k]=0; - buf83[i][j][k]=0; - } - else { - buf73[i][j][k]=n++; - buf83[i][j][k]=f++; - } - } - } - } - write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); - write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); -} + write_dset_in(gid,"/dset",fid,make_diffs); + /* Close */ + status = H5Dclose(did); + assert(status>=0); + status = H5Gclose(gid); + assert(status>=0); + /* Close file */ + status = H5Fclose(fid); + assert(status>=0); + return status; +} /*------------------------------------------------------------------------- * Function: write_attr_in @@ -1859,8 +1464,6 @@ position bitfield3D of </g1> bitfield3D of </g1> difference [ 3 2 1 ] 48 0 48 */ - - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); @@ -2044,446 +1647,872 @@ etc write_attr(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); } + + /*------------------------------------------------------------------------- - * Function: test_dsetall + * Function: write_dset_in * - * Purpose: Check all HDF5 classes - * H5T_INTEGER, H5T_FLOAT - * H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_COMPOUND, H5T_REFERENCE, - * H5T_ENUM, H5T_VLEN, H5T_ARRAY + * Purpose: write datasets in LOC_ID * *------------------------------------------------------------------------- */ static -int test_dsetall(const char *file, - int make_diffs /* flag to modify data buffers */) +void write_dset_in(hid_t loc_id, + const char* dset_name, /* for saving reference to dataset*/ + hid_t fid, + int make_diffs /* flag to modify data buffers */) { - hid_t fid; + /* Compound datatype */ + typedef struct s_t + { + char a; + double b; + } s_t; + + typedef enum + { + RED, + GREEN + } e_t; + hid_t did; - hid_t gid; hid_t sid; - hsize_t dims[1]={2}; + hid_t tid; + hid_t dcpl; herr_t status; - int buf[2]={1,2}; + int val, i, j, k, n; + float f; + int fillvalue=2; + + /* create 1D attributes with dimension [2], 2 elements */ + hsize_t dims[1]={2}; + char buf1[2][STR_SIZE]= {"ab","de"}; /* string */ + char buf2[2]= {1,2}; /* bitfield, opaque */ + s_t buf3[2]= {{1,2},{3,4}}; /* compound */ + hobj_ref_t buf4[2]; /* reference */ + e_t buf45[2]= {RED,GREEN}; /* enum */ + hvl_t buf5[2]; /* vlen */ + hsize_t dimarray[1]={3}; /* array dimension */ + int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */ + int buf7[2]= {1,2}; /* integer */ + float buf8[2]= {1,2}; /* float */ + + /* create 2D attributes with dimension [3][2], 6 elements */ + hsize_t dims2[2]={3,2}; + char buf12[6][STR_SIZE]= {"ab","cd","ef","gh","ij","kl"}; /* string */ + char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ + s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ + hobj_ref_t buf42[3][2]; /* reference */ + hvl_t buf52[3][2]; /* vlen */ + int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */ + int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */ + float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */ + + /* create 3D attributes with dimension [4][3][2], 24 elements */ + hsize_t dims3[3]={4,3,2}; + char buf13[24][STR_SIZE]= {"ab","cd","ef","gh","ij","kl","mn","pq", + "rs","tu","vw","xz","AB","CD","EF","GH", + "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ + char buf23[4][3][2]; /* bitfield, opaque */ + s_t buf33[4][3][2]; /* compound */ + hobj_ref_t buf43[4][3][2]; /* reference */ + hvl_t buf53[4][3][2]; /* vlen */ + int buf63[24][3]; /* array */ + int buf73[4][3][2]; /* integer */ + float buf83[4][3][2]; /* float */ + + +/*------------------------------------------------------------------------- + * 1D + *------------------------------------------------------------------------- + */ + +/*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + if (make_diffs) { - memset(buf,0,sizeof buf); + for (i=0; i<2; i++) + for (j=0; j<2; j++) + { + buf1[i][j]='z'; + } } - /* Create a file */ - if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) - return -1; - - /* Create a 1D dataset */ - sid = H5Screate_simple(1,dims,NULL); - did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT); - status = H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf); - status = H5Sclose(sid); - assert(status>=0); - /* Create a group */ - gid = H5Gcreate(fid,"g1",0); + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid,STR_SIZE); + write_dset(loc_id,1,dims,"string",tid,buf1); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * write a series of datasets on the group + * H5T_BITFIELD *------------------------------------------------------------------------- */ - write_dset_in(gid,"/dset",fid,make_diffs); - - /* Close */ - status = H5Dclose(did); - assert(status>=0); - status = H5Gclose(gid); - assert(status>=0); + if (make_diffs) + { + for (i=0; i<2; i++) + buf2[i]=buf2[1]=0; + } - /* Close file */ - status = H5Fclose(fid); - assert(status>=0); - return status; -} + tid = H5Tcopy(H5T_STD_B8LE); + write_dset(loc_id,1,dims,"bitfield",tid,buf2); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Function: test_basic - * - * Purpose: Basic review tests - * + * H5T_OPAQUE *------------------------------------------------------------------------- */ -static -int test_basic(const char *file1, - const char *file2) -{ - hid_t fid1, fid2; - hid_t gid1, gid2, gid3; - herr_t status; - hsize_t dims[2] = { 3,2 }; + if (make_diffs) + { + for (i=0; i<2; i++) + { + buf3[i].a=0; buf3[i].b=0; + } + } - /* Test */ - double data1[3][2] = {{1,1},{1,1},{1,1}}; - double data2[3][2] = {{1,1.1},{1.01,1.001},{1.0001,1}}; - double data3[3][2] = {{100,110},{100,100},{100,100}}; - double data4[3][2] = {{110,100},{90,80},{140,200}}; - int data5[3][2] = {{100,100},{100,100},{100,100}}; - int data6[3][2] = {{101,102},{103,104},{150,200}}; - unsigned long_long data7[3][2] = {{100,100},{100,100},{100,100}}; - unsigned long_long data8[3][2] = {{101,102},{103,104},{150,200}}; + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_dset(loc_id,1,dims,"opaque",tid,buf2); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Create two files + * H5T_COMPOUND *------------------------------------------------------------------------- */ - fid1 = H5Fcreate (file1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - fid2 = H5Fcreate (file2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - /* Create groups */ - gid1 = H5Gcreate(fid1, "g1", 0); - gid2 = H5Gcreate(fid2, "g1", 0); - gid3 = H5Gcreate(fid2, "g2", 0); + if (make_diffs) + { + for (i=0; i<2; i++) + { + buf45[i]=GREEN; + } + } - write_dset(gid1,2,dims,"dset1",H5T_NATIVE_DOUBLE,data1); - write_dset(gid2,2,dims,"dset2",H5T_NATIVE_DOUBLE,data2); - write_dset(gid1,2,dims,"dset3",H5T_NATIVE_DOUBLE,data3); - write_dset(gid2,2,dims,"dset4",H5T_NATIVE_DOUBLE,data4); - write_dset(gid2,2,dims,"dset1",H5T_NATIVE_DOUBLE,data2); + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_dset(loc_id,1,dims,"compound",tid,buf3); + status = H5Tclose(tid); - /* relative (int) */ - write_dset(gid1,2,dims,"dset5",H5T_NATIVE_INT,data5); - write_dset(gid1,2,dims,"dset6",H5T_NATIVE_INT,data6); - /* relative (unsigned long_long) */ - write_dset(gid1,2,dims,"dset7",H5T_NATIVE_ULLONG,data7); - write_dset(gid1,2,dims,"dset8",H5T_NATIVE_ULLONG,data8); +/*------------------------------------------------------------------------- + * H5T_REFERENCE (H5R_OBJECT object reference) + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if (dset_name) + { + status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1); + status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1); + write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4); + } /*------------------------------------------------------------------------- - * Close + * H5T_REFERENCE (H5R_DATASET_REGION dataset region reference) *------------------------------------------------------------------------- */ - status = H5Gclose(gid1); - status = H5Gclose(gid2); - status = H5Gclose(gid3); - status = H5Fclose(fid1); - status = H5Fclose(fid2); - return status; -} + + gen_datareg(fid,make_diffs); /*------------------------------------------------------------------------- - * Function: test_basic - * - * Purpose: Compare different HDF5 types (H5G_obj_t): - * H5G_DATASET, H5G_TYPE, H5G_GROUP, H5G_LINK, H5G_UDLINK - * + * H5T_ENUM *------------------------------------------------------------------------- */ -static -int test_types(const char *file1, - const char UNUSED *file2) -{ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_dset(loc_id,1,dims,"enum",tid,buf45); + status = H5Tclose(tid); - hid_t fid1; - hid_t gid1; - hid_t gid2; - hid_t tid1; - hid_t tid2; - herr_t status; - hsize_t dims[1]={1}; - typedef struct s1_t - { - int a; - float b; - } s1_t; - typedef struct s2_t +/*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ + + /* Allocate and initialize VL dataset to write */ + + buf5[0].len = 1; + buf5[0].p = malloc( 1 * sizeof(int)); + ((int *)buf5[0].p)[0]=1; + buf5[1].len = 2; + buf5[1].p = malloc( 2 * sizeof(int)); + ((int *)buf5[1].p)[0]=2; + ((int *)buf5[1].p)[1]=3; + + if (make_diffs) { - int a; - } s2_t; + ((int *)buf5[0].p)[0]=0; + ((int *)buf5[1].p)[0]=0; + ((int *)buf5[1].p)[1]=0; + } + + sid = H5Screate_simple(1,dims,NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + did = H5Dcreate(loc_id,"vlen",tid,sid,H5P_DEFAULT); + status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf5); + assert(status>=0); + status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf5); + assert(status>=0); + status = H5Dclose(did); + status = H5Tclose(tid); + status = H5Sclose(sid); /*------------------------------------------------------------------------- - * Create one file + * H5T_ARRAY *------------------------------------------------------------------------- */ - fid1 = H5Fcreate (file1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if (make_diffs) + { + for (i=0; i<2; i++) + for (j=0; j<3; j++) + { + buf6[i][j]=0; + } + } + + tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); + write_dset(loc_id,1,dims,"array",tid,buf6); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5G_DATASET + * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - write_dset(fid1,1,dims,"dset",H5T_NATIVE_INT,0); + + if (make_diffs) + { + for (i=0; i<2; i++) + { + buf7[i]=0; + buf8[i]=0; + } + } + + write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); + write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); + /*------------------------------------------------------------------------- - * H5G_GROUP + * 2D *------------------------------------------------------------------------- */ - gid1 = H5Gcreate(fid1, "g1", 0); - status = H5Gclose(gid1); - gid2 = H5Gcreate(fid1, "g2", 0); - status = H5Gclose(gid2); /*------------------------------------------------------------------------- - * H5G_TYPE + * H5T_STRING *------------------------------------------------------------------------- */ - /* create and commit datatype 1 */ - tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)); - H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT); - H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_FLOAT); - H5Tcommit(fid1, "t1", tid1); - H5Tclose(tid1); - /* create and commit datatype 2 */ - tid2 = H5Tcreate (H5T_COMPOUND, sizeof(s2_t)); - H5Tinsert(tid2, "a", HOFFSET(s2_t, a), H5T_NATIVE_INT); - H5Tcommit(fid1, "t2", tid2); - H5Tclose(tid2); + if (make_diffs) + { + memset(buf12, 'z', sizeof buf12); + } + + + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid,STR_SIZE); + write_dset(loc_id,2,dims2,"string2D",tid,buf12); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5G_LINK + * H5T_BITFIELD *------------------------------------------------------------------------- */ - status = H5Glink(fid1, H5L_TYPE_SOFT, "g1", "l1"); - status = H5Glink(fid1, H5L_TYPE_SOFT, "g2", "l2"); + + if (make_diffs) + { + memset(buf22,0,sizeof buf22); + } + + tid = H5Tcopy(H5T_STD_B8LE); + write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5G_UDLINK + * H5T_OPAQUE *------------------------------------------------------------------------- */ - H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); - H5Lregister(UD_link_class); - H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT); + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_dset(loc_id,2,dims2,"opaque2D",tid,buf22); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Close + * H5T_COMPOUND *------------------------------------------------------------------------- */ - status = H5Fclose(fid1); - return status; -} + + if (make_diffs) + { + memset(buf32,0,sizeof buf32); + } + + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_dset(loc_id,2,dims2,"compound2D",tid,buf32); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Function: test_native - * - * Purpose: test datasets datatypes - * + * H5T_REFERENCE (H5R_OBJECT object reference) *------------------------------------------------------------------------- */ -static -int test_native(const char *file1, - const char UNUSED *file2) -{ + /* Create references to dataset */ + if (dset_name) + { + for (i = 0; i < 3; i++) { + for (j = 0; j < 2; j++) { + status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1); + } + } + write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); + } - hid_t fid1; - hsize_t dims[2]={3,2}; - herr_t status; - char buf1a[3][2] = {{1,1},{1,1},{1,1}}; - char buf1b[3][2] = {{1,1},{3,4},{5,6}}; - short buf2a[3][2] = {{1,1},{1,1},{1,1}}; - short buf2b[3][2] = {{1,1},{3,4},{5,6}}; - int buf3a[3][2] = {{1,1},{1,1},{1,1}}; - int buf3b[3][2] = {{1,1},{3,4},{5,6}}; - long buf4a[3][2] = {{1,1},{1,1},{1,1}}; - long buf4b[3][2] = {{1,1},{3,4},{5,6}}; - float buf5a[3][2] = {{1,1},{1,1},{1,1}}; - float buf5b[3][2] = {{1,1},{3,4},{5,6}}; - double buf6a[3][2] = {{1,1},{1,1},{1,1}}; - double buf6b[3][2] = {{1,1},{3,4},{5,6}}; +/*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ - /*unsigned/signed test - signed char -128 to 127 - unsigned char 0 to 255 - */ - char buf7a[3][2] = {{-1,-128},{-1,-1},{-1,-1}}; - unsigned char buf7b[3][2] = {{1,128},{1,1},{1,1}}; + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_dset(loc_id,2,dims2,"enum2D",tid,0); + status = H5Tclose(tid); - /* long_long test */ - long_long buf8a[3][2] = {{1,1},{1,1},{1,1}}; - long_long buf8b[3][2] = {{1,1},{3,4},{5,6}}; - unsigned long_long buf9a[3][2] = {{1,1},{1,1},{1,1}}; - unsigned long_long buf9b[3][2] = {{1,1},{3,4},{5,6}}; +/*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ - unsigned int buf10a[3][2] = {{UIMAX,1},{1,1},{1,1}}; - unsigned int buf10b[3][2] = {{UIMAX-1,1},{3,4},{5,6}}; +/* Allocate and initialize VL dataset to write */ + n=0; + for (i = 0; i < 3; i++) { + for (j = 0; j < 2; j++) { + int l; + buf52[i][j].p = malloc((i + 1) * sizeof(int)); + buf52[i][j].len = i + 1; + for (l = 0; l < i + 1; l++) + if (make_diffs)((int *)buf52[i][j].p)[l] = 0; + else ((int *)buf52[i][j].p)[l] = n++; + } + } + sid = H5Screate_simple(2,dims2,NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + did = H5Dcreate(loc_id,"vlen2D",tid,sid,H5P_DEFAULT); + status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf52); + assert(status>=0); + status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf52); + assert(status>=0); + status = H5Dclose(did); + status = H5Tclose(tid); + status = H5Sclose(sid); /*------------------------------------------------------------------------- - * Create a file + * H5T_ARRAY *------------------------------------------------------------------------- */ - fid1 = H5Fcreate (file1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if (make_diffs) + { + memset(buf62,0,sizeof buf62); + } + + + tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); + write_dset(loc_id,2,dims2,"array2D",tid,buf62); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Check for different storage order. Give a warning if they are different + * H5T_INTEGER, write a fill value *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset0a",H5T_STD_I16LE,buf2a); - write_dset(fid1,2,dims,"dset0b",H5T_STD_I32LE,buf3b); + + if (make_diffs) + { + memset(buf72,0,sizeof buf72); + memset(buf82,0,sizeof buf82); + } + + + dcpl = H5Pcreate(H5P_DATASET_CREATE); + status = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue); + sid = H5Screate_simple(2,dims2,NULL); + did = H5Dcreate(loc_id,"integer2D",H5T_NATIVE_INT,sid,dcpl); + status = H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf72); + status = H5Pclose(dcpl); + status = H5Dclose(did); + status = H5Sclose(sid); /*------------------------------------------------------------------------- - * Check H5T_NATIVE_CHAR + * H5T_FLOAT *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset1a",H5T_NATIVE_CHAR,buf1a); - write_dset(fid1,2,dims,"dset1b",H5T_NATIVE_CHAR,buf1b); + + write_dset(loc_id,2,dims2,"float2D",H5T_NATIVE_FLOAT,buf82); + /*------------------------------------------------------------------------- - * Check H5T_NATIVE_SHORT + * 3D *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset2a",H5T_NATIVE_SHORT,buf2a); - write_dset(fid1,2,dims,"dset2b",H5T_NATIVE_SHORT,buf2b); /*------------------------------------------------------------------------- - * Check H5T_NATIVE_INT + * H5T_STRING *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset3a",H5T_NATIVE_INT,buf3a); - write_dset(fid1,2,dims,"dset3b",H5T_NATIVE_INT,buf3b); + + if (make_diffs) + { + memset(buf13,'z',sizeof buf13); + } + + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid,STR_SIZE); + write_dset(loc_id,3,dims3,"string3D",tid,buf13); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Check H5T_NATIVE_LONG + * H5T_BITFIELD *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset4a",H5T_NATIVE_LONG,buf4a); - write_dset(fid1,2,dims,"dset4b",H5T_NATIVE_LONG,buf4b); + + + n=1; + for (i = 0; i < 4; i++) { + for (j = 0; j < 3; j++) { + for (k = 0; k < 2; k++) { + if (make_diffs) buf23[i][j][k]=0; + else buf23[i][j][k]=n++; + } + } + } + + + tid = H5Tcopy(H5T_STD_B8LE); + write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Check H5T_NATIVE_FLOAT + * H5T_OPAQUE *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset5a",H5T_NATIVE_FLOAT,buf5a); - write_dset(fid1,2,dims,"dset5b",H5T_NATIVE_FLOAT,buf5b); + tid = H5Tcreate(H5T_OPAQUE, 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_dset(loc_id,3,dims3,"opaque3D",tid,buf23); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Check H5T_NATIVE_DOUBLE + * H5T_COMPOUND *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset6a",H5T_NATIVE_DOUBLE,buf6a); - write_dset(fid1,2,dims,"dset6b",H5T_NATIVE_DOUBLE,buf6b); + n=1; + for (i = 0; i < 4; i++) { + for (j = 0; j < 3; j++) { + for (k = 0; k < 2; k++) { + if (make_diffs) { + buf33[i][j][k].a=0; + buf33[i][j][k].b=0; + } + else { + buf33[i][j][k].a=n++; + buf33[i][j][k].b=n++; + } + } + } + } + + + tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_dset(loc_id,3,dims3,"compound3D",tid,buf33); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5T_NATIVE_CHAR and H5T_NATIVE_UCHAR + * H5T_REFERENCE (H5R_OBJECT object reference) *------------------------------------------------------------------------- */ - - write_dset(fid1,2,dims,"dset7a",H5T_NATIVE_CHAR,buf7a); - write_dset(fid1,2,dims,"dset7b",H5T_NATIVE_UCHAR,buf7b); + /* Create references to dataset */ + if (dset_name) + { + for (i = 0; i < 4; i++) { + for (j = 0; j < 3; j++) { + for (k = 0; k < 2; k++) + status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1); + } + } + write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); + } /*------------------------------------------------------------------------- - * H5T_NATIVE_LLONG + * H5T_ENUM *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset8a",H5T_NATIVE_LLONG,buf8a); - write_dset(fid1,2,dims,"dset8b",H5T_NATIVE_LLONG,buf8b); + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_dset(loc_id,3,dims3,"enum3D",tid,0); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5T_NATIVE_ULLONG + * H5T_VLEN *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset9a",H5T_NATIVE_ULLONG,buf9a); - write_dset(fid1,2,dims,"dset9b",H5T_NATIVE_ULLONG,buf9b); + /* Allocate and initialize VL dataset to write */ + n=0; + for (i = 0; i < 4; i++) { + for (j = 0; j < 3; j++) { + for (k = 0; k < 2; k++) { + int l; + buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); + buf53[i][j][k].len = i + 1; + for (l = 0; l < i + 1; l++) + if (make_diffs)((int *)buf53[i][j][k].p)[l] = 0; + else ((int *)buf53[i][j][k].p)[l] = n++; + } + } + } + + sid = H5Screate_simple(3,dims3,NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + did = H5Dcreate(loc_id,"vlen3D",tid,sid,H5P_DEFAULT); + status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf53); + assert(status>=0); + status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf53); + assert(status>=0); + status = H5Dclose(did); + status = H5Tclose(tid); + status = H5Sclose(sid); /*------------------------------------------------------------------------- - * H5T_NATIVE_INT + * H5T_ARRAY *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset10a",H5T_NATIVE_UINT,buf10a); - write_dset(fid1,2,dims,"dset10b",H5T_NATIVE_UINT,buf10b); + n=1; + for (i = 0; i < 24; i++) { + for (j = 0; j < (int)dimarray[0]; j++) { + if (make_diffs) buf63[i][j]=0; + else buf63[i][j]=n++; + } + } + + tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); + write_dset(loc_id,3,dims3,"array3D",tid,buf63); + status = H5Tclose(tid); /*------------------------------------------------------------------------- - * Close + * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - status = H5Fclose(fid1); - return status; + n=1; f=1; + for (i = 0; i < 4; i++) { + for (j = 0; j < 3; j++) { + for (k = 0; k < 2; k++) { + if (make_diffs) { + buf73[i][j][k]=0; + buf83[i][j][k]=0; + } + else { + buf73[i][j][k]=n++; + buf83[i][j][k]=f++; + } + } + } + } + write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); + write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); } /*------------------------------------------------------------------------- - * Function: test_attr + * Function: gen_datareg * - * Purpose: test attributes + * Purpose: generate a dataset region and its reference + * + * Date: April 19, 2006 * *------------------------------------------------------------------------- */ + static -int test_attr(const char *file, - int make_diffs /* flag to modify data buffers */) +void gen_datareg(hid_t fid, + int make_diffs /* flag to modify data buffers */) { - hid_t fid; - hid_t did; - hid_t gid; - hid_t root_id; - hid_t sid; - hsize_t dims[1]={2}; - herr_t status; + /* data dataset */ + hid_t did1; /* dataset ID */ + hid_t sid1; /* dataspace ID */ + hsize_t dims1[2] = {10,10};/* dimensions */ + int *buf; /* dataset buffer */ + /* reference dataset */ + hid_t did2; /* dataset ID */ + hid_t sid2; /* dataspace ID */ + hsize_t dims2[] = {2}; /* 2 references */ + hdset_reg_ref_t *rbuf; /* buffer for write the references */ + hsize_t start[10]; /* starting location of hyperslab */ + hsize_t count[10]; /* element count of hyperslab */ + hsize_t coord[5][2]; /* coordinates for point selection */ + herr_t status; + int i; - /* Create a file */ - if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) - return -1; + /* allocate the buffer for write the references */ + rbuf=calloc(2,sizeof(hdset_reg_ref_t)); - /* Create a 1D dataset */ - sid = H5Screate_simple(1,dims,NULL); - did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT); - status = H5Sclose(sid); - assert(status>=0); + /* allocate the buffer for write the data dataset */ + buf=malloc(10*10*sizeof(int)); + + for (i=0; i<10*10; i++) + { + buf[i]=i; + } + + /* create the data dataset */ + sid1 = H5Screate_simple(2,dims1,NULL); + did1 = H5Dcreate(fid,"dsetref",H5T_NATIVE_INT,sid1,H5P_DEFAULT); + status = H5Dwrite(did1,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf); + + /* create the reference dataset */ + sid2 = H5Screate_simple(1,dims2,NULL); + did2 = H5Dcreate(fid,"refreg",H5T_STD_REF_DSETREG,sid2,H5P_DEFAULT); + + /* create the references */ + /* select hyperslab for first reference */ + + start[0]=2; start[1]=2; + count[0]=6; count[1]=6; + if (make_diffs) + { + start[0]=0; start[1]=0; + count[0]=3; count[1]=3; + } + + status = H5Sselect_hyperslab(sid1,H5S_SELECT_SET,start,NULL,count,NULL); + H5Sget_select_npoints(sid1); + + /* store first dataset region */ + status = H5Rcreate(&rbuf[0],fid,"dsetref",H5R_DATASET_REGION,sid1); + + /* select sequence of five points for second reference */ + coord[0][0]=6; coord[0][1]=9; + coord[1][0]=2; coord[1][1]=2; + coord[2][0]=8; coord[2][1]=4; + coord[3][0]=1; coord[3][1]=6; + coord[4][0]=2; coord[4][1]=8; + if (make_diffs) + { + coord[1][0]=3; coord[1][1]=3; + coord[3][0]=2; coord[3][1]=5; + coord[4][0]=1; coord[4][1]=7; + } + H5Sselect_elements(sid1,H5S_SELECT_SET,5,(const hsize_t **)coord); + H5Sget_select_npoints(sid1); + + /* store second dataset region */ + H5Rcreate(&rbuf[1],fid,"dsetref",H5R_DATASET_REGION,sid1); + + /* write */ + status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf); + + /* close, free memory buffers */ + status = H5Dclose(did1); + status = H5Sclose(sid1); + status = H5Dclose(did2); + status = H5Sclose(sid2); + free(rbuf); + free(buf); + +} - /* Create groups */ - gid = H5Gcreate(fid,"g1",0); - root_id = H5Gopen(fid, "/"); /*------------------------------------------------------------------------- - * write a series of attributes on the dataset, group, and root group + * Function: test_hyperslab + * + * Purpose: test diff by hyperslabs. create a dataset with 1GB dimensions + * by iterating trough 1KB hyperslabs + * *------------------------------------------------------------------------- */ +static +int test_hyperslab(char *fname, + int make_diffs /* flag to modify data buffers */) +{ + hid_t did; + hid_t fid; + hid_t f_sid; + hid_t m_sid; + hid_t tid; + hid_t dcpl; + hsize_t dims[1]={GBLL}; /* dataset dimensions */ + hsize_t hs_size[1]={GBLL/(1024*1024)}; /* hyperslab dimensions */ + hsize_t chunk_dims[1]={GBLL/1024}; /* chunk dimensions */ + hsize_t hs_start[1]; + size_t size; + size_t nelmts=(size_t)GBLL/(1024*1024); /* elements in each hyperslab */ + char fillvalue=-1; + char *buf=NULL; + int i, j, s; + char c; + + /* create */ + fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) + goto out; + if (H5Pset_fill_value(dcpl, H5T_NATIVE_CHAR, &fillvalue)<0) + goto out; + if(H5Pset_chunk(dcpl, 1, chunk_dims)<0) + goto out; + if ((f_sid = H5Screate_simple(1,dims,NULL))<0) + goto out; + if ((did = H5Dcreate(fid,"big",H5T_NATIVE_CHAR,f_sid,dcpl))<0) + goto out; + if ((m_sid = H5Screate_simple(1, hs_size, hs_size))<0) + goto out; + if ((tid = H5Dget_type(did))<0) + goto out; + if ((size = H5Tget_size(tid))<=0) + goto out; + + /* create a evenly divided buffer from 0 to 127 */ + buf=(char *) HDmalloc((unsigned)(nelmts*size)); + s = 1024*1024 / 127; + for (i=0, j=0, c=0; i<1024*1024; j++, i++) + { + if ( j==s) + { + c++; + j=0; + }; - write_attr_in(did,"dset",fid,make_diffs); - write_attr_in(gid,NULL,0,make_diffs); - write_attr_in(root_id,NULL,0,make_diffs); + /* set the hyperslab values */ + HDmemset(buf, c, nelmts); + /* make a different hyperslab at this position */ + if (make_diffs && i==512*512) + { + HDmemset(buf, 0, nelmts); + } + + hs_start[0] = i * GBLL/(1024*1024); + if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL)<0) + goto out; - /* Close */ - status = H5Dclose(did); - assert(status>=0); - status = H5Gclose(gid); - assert(status>=0); - status = H5Gclose(root_id); - assert(status>=0); + /* write only one hyperslab */ + if ( i==512*512) + { + if (H5Dwrite (did,H5T_NATIVE_CHAR,m_sid,f_sid,H5P_DEFAULT,buf)<0) + goto out; + } + + } + free(buf); + buf=NULL; + + /* close */ + if(H5Sclose(f_sid)<0) + goto out; + if(H5Sclose(m_sid)<0) + goto out; + if(H5Pclose(dcpl)<0) + goto out; + if(H5Dclose(did)<0) + goto out; + H5Fclose(fid); + + return 0; + +out: + H5E_BEGIN_TRY { + H5Pclose(dcpl); + H5Sclose(f_sid); + H5Sclose(m_sid); + H5Dclose(did); + H5Fclose(fid); + } H5E_END_TRY; + return -1; - /* Close file */ - status = H5Fclose(fid); - assert(status>=0); - return status; } /*------------------------------------------------------------------------- - * Function: main + * Function: write_attr * - * Purpose: main program + * Purpose: utility function to write an attribute in LOC_ID * *------------------------------------------------------------------------- */ +static +int write_attr(hid_t loc_id, + int rank, + hsize_t *dims, + const char *name, + hid_t tid, + void *buf) +{ + hid_t aid; + hid_t sid; + herr_t status; + + /* Create a buf space */ + sid = H5Screate_simple(rank,dims,NULL); -int main(int UNUSED argc, const UNUSED char *argv[]) + /* Create the attribute */ + aid = H5Acreate(loc_id,name,tid,sid,H5P_DEFAULT); + + /* Write the buf */ + if ( buf ) + status = H5Awrite(aid,tid,buf); + + /* Close */ + status = H5Aclose(aid); + status = H5Sclose(sid); + return status; +} + +/*------------------------------------------------------------------------- + * Function: write_dset + * + * Purpose: utility function to create and write a dataset in LOC_ID + * + *------------------------------------------------------------------------- + */ +static +int write_dset( hid_t loc_id, + int rank, + hsize_t *dims, + const char *name, + hid_t tid, + void *buf ) { + hid_t did; + hid_t sid; + herr_t status; - test_basic (FILE1,FILE2); - test_types (FILE3,NULL); - test_native(FILE4,NULL); + /* Create a buf space */ + sid = H5Screate_simple(rank,dims,NULL); - /* generate 2 files with attribute differences */ - test_attr(FILE5,0); - test_attr(FILE6,1); + /* Create a dataset */ + did = H5Dcreate(loc_id,name,tid,sid,H5P_DEFAULT); - /* generate 2 files with all datatype differences */ - test_dsetall(FILE7,0); - test_dsetall(FILE8,1); - return 0; + /* Write the buf */ + if ( buf ) + status = H5Dwrite(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf); + + /* Close */ + status = H5Dclose(did); + status = H5Sclose(sid); + + return status; } diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 044206a..697de8d 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -22,6 +22,23 @@ # Pedro Vicente Nunes, 10/25/2005 # Added test #9 + +############################################################################### +## test file names +############################################################################### + +FILE1=h5diff_basic1.h5 +FILE2=h5diff_basic2.h5 +FILE3=h5diff_types.h5 +FILE4=h5diff_dtypes.h5 +FILE5=h5diff_attr1.h5 +FILE6=h5diff_attr2.h5 +FILE7=h5diff_dset1.h5 +FILE8=h5diff_dset2.h5 +FILE9=h5diff_hyper1.h5 +FILE10=h5diff_hyper2.h5 + + H5DIFF=h5diff # The tool name H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary @@ -240,47 +257,47 @@ SKIP() { ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## -# ############################################################################## +# ############################################################################ # # Common usage -# ############################################################################## +# ############################################################################ # 1.0 TOOLTEST h5diff_10.txt -h # 1.1 normal mode -TOOLTEST h5diff_11.txt file1.h5 file2.h5 +TOOLTEST h5diff_11.txt $FILE1 $FILE2 # 1.2 normal mode with objects -TOOLTEST h5diff_12.txt file1.h5 file2.h5 g1/dset1 g1/dset2 +TOOLTEST h5diff_12.txt $FILE1 $FILE2 g1/dset1 g1/dset2 # 1.3 report mode -TOOLTEST h5diff_13.txt file1.h5 file2.h5 -r +TOOLTEST h5diff_13.txt $FILE1 $FILE2 -r # 1.4 report mode with objects -TOOLTEST h5diff_14.txt file1.h5 file2.h5 -r g1/dset1 g1/dset2 +TOOLTEST h5diff_14.txt $FILE1 $FILE2 -r g1/dset1 g1/dset2 # 1.5 with -d -TOOLTEST h5diff_15.txt file1.h5 file2.h5 -r -d 5 g1/dset3 g1/dset4 +TOOLTEST h5diff_15.txt $FILE1 $FILE2 -r -d 5 g1/dset3 g1/dset4 # 1.6 with -p -TOOLTEST h5diff_16.txt file1.h5 file2.h5 -r -p 0.05 g1/dset3 g1/dset4 +TOOLTEST h5diff_16.txt $FILE1 $FILE2 -r -p 0.05 g1/dset3 g1/dset4 # 1.7 verbose mode -TOOLTEST h5diff_17.txt file1.h5 file2.h5 -v +TOOLTEST h5diff_17.txt $FILE1 $FILE2 -v # 1.8 quiet mode -TOOLTEST h5diff_18.txt file1.h5 file2.h5 -q +TOOLTEST h5diff_18.txt $FILE1 $FILE2 -q # 1.9.1 with -p (int) -TOOLTEST h5diff_191.txt file1.h5 file1.h5 -v -p 0.02 g1/dset5 g1/dset6 +TOOLTEST h5diff_191.txt $FILE1 $FILE1 -v -p 0.02 g1/dset5 g1/dset6 # 1.9.2 with -p (unsigned long_long) -TOOLTEST h5diff_192.txt file1.h5 file1.h5 -v -p 0.02 g1/dset7 g1/dset8 +TOOLTEST h5diff_192.txt $FILE1 $FILE1 -v -p 0.02 g1/dset7 g1/dset8 # ############################################################################## @@ -288,68 +305,68 @@ TOOLTEST h5diff_192.txt file1.h5 file1.h5 -v -p 0.02 g1/dset7 g1/dset8 # ############################################################################## # 2.0 -TOOLTEST h5diff_20.txt file3.h5 file3.h5 -v dset g1 +TOOLTEST h5diff_20.txt $FILE3 $FILE3 -v dset g1 # 2.1 -TOOLTEST h5diff_21.txt file3.h5 file3.h5 -v dset l1 +TOOLTEST h5diff_21.txt $FILE3 $FILE3 -v dset l1 # 2.2 -TOOLTEST h5diff_22.txt file3.h5 file3.h5 -v dset t1 +TOOLTEST h5diff_22.txt $FILE3 $FILE3 -v dset t1 # ############################################################################## # # compare groups, types, links (no differences and differences) # ############################################################################## # 2.3 -TOOLTEST h5diff_23.txt file3.h5 file3.h5 -v g1 g1 +TOOLTEST h5diff_23.txt $FILE3 $FILE3 -v g1 g1 # 2.4 -TOOLTEST h5diff_24.txt file3.h5 file3.h5 -v t1 t1 +TOOLTEST h5diff_24.txt $FILE3 $FILE3 -v t1 t1 # 2.5 -TOOLTEST h5diff_25.txt file3.h5 file3.h5 -v l1 l1 +TOOLTEST h5diff_25.txt $FILE3 $FILE3 -v l1 l1 # 2.6 -TOOLTEST h5diff_26.txt file3.h5 file3.h5 -v g1 g2 +TOOLTEST h5diff_26.txt $FILE3 $FILE3 -v g1 g2 # 2.7 -TOOLTEST h5diff_27.txt file3.h5 file3.h5 -v t1 t2 +TOOLTEST h5diff_27.txt $FILE3 $FILE3 -v t1 t2 # 2.8 -TOOLTEST h5diff_28.txt file3.h5 file3.h5 -v l1 l2 +TOOLTEST h5diff_28.txt $FILE3 $FILE3 -v l1 l2 # ############################################################################## -# # Dataset types +# # Dataset datatypes # ############################################################################## # 5.0 -TOOLTEST h5diff_50.txt file4.h5 file4.h5 -v dset0a dset0b +TOOLTEST h5diff_50.txt $FILE4 $FILE4 -v dset0a dset0b # 5.1 -TOOLTEST h5diff_51.txt file4.h5 file4.h5 -v dset1a dset1b +TOOLTEST h5diff_51.txt $FILE4 $FILE4 -v dset1a dset1b # 5.2 -TOOLTEST h5diff_52.txt file4.h5 file4.h5 -v dset2a dset2b +TOOLTEST h5diff_52.txt $FILE4 $FILE4 -v dset2a dset2b # 5.3 -TOOLTEST h5diff_53.txt file4.h5 file4.h5 -v dset3a dset4b +TOOLTEST h5diff_53.txt $FILE4 $FILE4 -v dset3a dset4b # 5.4 -TOOLTEST h5diff_54.txt file4.h5 file4.h5 -v dset4a dset4b +TOOLTEST h5diff_54.txt $FILE4 $FILE4 -v dset4a dset4b # 5.5 -TOOLTEST h5diff_55.txt file4.h5 file4.h5 -v dset5a dset5b +TOOLTEST h5diff_55.txt $FILE4 $FILE4 -v dset5a dset5b # 5.6 -TOOLTEST h5diff_56.txt file4.h5 file4.h5 -v dset6a dset6b +TOOLTEST h5diff_56.txt $FILE4 $FILE4 -v dset6a dset6b # 5.7 -TOOLTEST h5diff_57.txt file4.h5 file4.h5 -v dset7a dset7b +TOOLTEST h5diff_57.txt $FILE4 $FILE4 -v dset7a dset7b # 5.8 (region reference) -TOOLTEST h5diff_58.txt file7.h5 file8.h5 -v refreg +TOOLTEST h5diff_58.txt $FILE7 $FILE8 -v refreg # ############################################################################## # # Error messages @@ -357,41 +374,41 @@ TOOLTEST h5diff_58.txt file7.h5 file8.h5 -v refreg # 6.0: Check if the command line number of arguments is less than 3 -TOOLTEST h5diff_600.txt file1.h5 +TOOLTEST h5diff_600.txt $FILE1 # 6.1: Check for invalid options -TOOLTEST h5diff_601.txt file1.h5 file2.h5 -x +TOOLTEST h5diff_601.txt $FILE1 $FILE2 -x # ############################################################################## # # -d # ############################################################################## # 6.2: no value -TOOLTEST h5diff_602.txt file1.h5 file2.h5 -d g1/dset3 g1/dset4 +TOOLTEST h5diff_602.txt $FILE1 $FILE2 -d g1/dset3 g1/dset4 # 6.3: negative value -TOOLTEST h5diff_603.txt file1.h5 file2.h5 -d -4 g1/dset3 g1/dset4 +TOOLTEST h5diff_603.txt $FILE1 $FILE2 -d -4 g1/dset3 g1/dset4 # 6.4: zero -TOOLTEST h5diff_604.txt file1.h5 file2.h5 -d 0 g1/dset3 g1/dset4 +TOOLTEST h5diff_604.txt $FILE1 $FILE2 -d 0 g1/dset3 g1/dset4 # 6.5: non number -TOOLTEST h5diff_605.txt file1.h5 file2.h5 -d u g1/dset3 g1/dset4 +TOOLTEST h5diff_605.txt $FILE1 $FILE2 -d u g1/dset3 g1/dset4 # 6.6: hexadecimal -TOOLTEST h5diff_606.txt file1.h5 file2.h5 -d 0x1 g1/dset3 g1/dset4 +TOOLTEST h5diff_606.txt $FILE1 $FILE2 -d 0x1 g1/dset3 g1/dset4 # 6.7: string -TOOLTEST h5diff_607.txt file1.h5 file2.h5 -d "1" g1/dset3 g1/dset4 +TOOLTEST h5diff_607.txt $FILE1 $FILE2 -d "1" g1/dset3 g1/dset4 # 6.8: repeated option -TOOLTEST h5diff_608.txt file1.h5 file2.h5 -d 1 -d 2 g1/dset3 g1/dset4 +TOOLTEST h5diff_608.txt $FILE1 $FILE2 -d 1 -d 2 g1/dset3 g1/dset4 # 6.9: number larger than biggest difference -TOOLTEST h5diff_609.txt file1.h5 file2.h5 -d 200 g1/dset3 g1/dset4 +TOOLTEST h5diff_609.txt $FILE1 $FILE2 -d 200 g1/dset3 g1/dset4 # 6.10: number smaller than smallest difference -TOOLTEST h5diff_610.txt file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4 +TOOLTEST h5diff_610.txt $FILE1 $FILE2 -d 1 g1/dset3 g1/dset4 # ############################################################################## @@ -400,31 +417,31 @@ TOOLTEST h5diff_610.txt file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4 # 6.11: no value -TOOLTEST h5diff_611.txt file1.h5 file2.h5 -r -p g1/dset3 g1/dset4 +TOOLTEST h5diff_611.txt $FILE1 $FILE2 -r -p g1/dset3 g1/dset4 # 6.12: negative value -TOOLTEST h5diff_612.txt file1.h5 file2.h5 -p -4 g1/dset3 g1/dset4 +TOOLTEST h5diff_612.txt $FILE1 $FILE2 -p -4 g1/dset3 g1/dset4 # 6.13: zero -TOOLTEST h5diff_613.txt file1.h5 file2.h5 -p 0 g1/dset3 g1/dset4 +TOOLTEST h5diff_613.txt $FILE1 $FILE2 -p 0 g1/dset3 g1/dset4 # 6.14: non number -TOOLTEST h5diff_614.txt file1.h5 file2.h5 -p u g1/dset3 g1/dset4 +TOOLTEST h5diff_614.txt $FILE1 $FILE2 -p u g1/dset3 g1/dset4 # 6.15: hexadecimal -TOOLTEST h5diff_615.txt file1.h5 file2.h5 -p 0x1 g1/dset3 g1/dset4 +TOOLTEST h5diff_615.txt $FILE1 $FILE2 -p 0x1 g1/dset3 g1/dset4 # 6.16: string -TOOLTEST h5diff_616.txt file1.h5 file2.h5 -p "0.21" g1/dset3 g1/dset4 +TOOLTEST h5diff_616.txt $FILE1 $FILE2 -p "0.21" g1/dset3 g1/dset4 # 6.17: repeated option -TOOLTEST h5diff_617.txt file1.h5 file2.h5 -p 0.21 -p 0.22 g1/dset3 g1/dset4 +TOOLTEST h5diff_617.txt $FILE1 $FILE2 -p 0.21 -p 0.22 g1/dset3 g1/dset4 # 6.18: number larger than biggest difference -TOOLTEST h5diff_618.txt file1.h5 file2.h5 -p 2 g1/dset3 g1/dset4 +TOOLTEST h5diff_618.txt $FILE1 $FILE2 -p 2 g1/dset3 g1/dset4 # 6.19: number smaller than smallest difference -TOOLTEST h5diff_619.txt file1.h5 file2.h5 -p 0.005 g1/dset3 g1/dset4 +TOOLTEST h5diff_619.txt $FILE1 $FILE2 -p 0.005 g1/dset3 g1/dset4 @@ -434,31 +451,31 @@ TOOLTEST h5diff_619.txt file1.h5 file2.h5 -p 0.005 g1/dset3 g1/dset4 # 6.20: no value -TOOLTEST h5diff_620.txt file1.h5 file2.h5 -n g1/dset3 g1/dset4 +TOOLTEST h5diff_620.txt $FILE1 $FILE2 -n g1/dset3 g1/dset4 # 6.21: negative value -TOOLTEST h5diff_621.txt file1.h5 file2.h5 -n -4 g1/dset3 g1/dset4 +TOOLTEST h5diff_621.txt $FILE1 $FILE2 -n -4 g1/dset3 g1/dset4 # 6.22: zero -TOOLTEST h5diff_622.txt file1.h5 file2.h5 -n 0 g1/dset3 g1/dset4 +TOOLTEST h5diff_622.txt $FILE1 $FILE2 -n 0 g1/dset3 g1/dset4 # 6.23: non number -TOOLTEST h5diff_623.txt file1.h5 file2.h5 -n u g1/dset3 g1/dset4 +TOOLTEST h5diff_623.txt $FILE1 $FILE2 -n u g1/dset3 g1/dset4 # 6.24: hexadecimal -TOOLTEST h5diff_624.txt file1.h5 file2.h5 -n 0x1 g1/dset3 g1/dset4 +TOOLTEST h5diff_624.txt $FILE1 $FILE2 -n 0x1 g1/dset3 g1/dset4 # 6.25: string -TOOLTEST h5diff_625.txt file1.h5 file2.h5 -n "2" g1/dset3 g1/dset4 +TOOLTEST h5diff_625.txt $FILE1 $FILE2 -n "2" g1/dset3 g1/dset4 # 6.26: repeated option -TOOLTEST h5diff_626.txt file1.h5 file2.h5 -n 2 -n 3 g1/dset3 g1/dset4 +TOOLTEST h5diff_626.txt $FILE1 $FILE2 -n 2 -n 3 g1/dset3 g1/dset4 # 6.27: number larger than biggest difference -TOOLTEST h5diff_627.txt file1.h5 file2.h5 -n 200 g1/dset3 g1/dset4 +TOOLTEST h5diff_627.txt $FILE1 $FILE2 -n 200 g1/dset3 g1/dset4 # 6.28: number smaller than smallest difference -TOOLTEST h5diff_628.txt file1.h5 file2.h5 -n 1 g1/dset3 g1/dset4 +TOOLTEST h5diff_628.txt $FILE1 $FILE2 -n 1 g1/dset3 g1/dset4 # ############################################################################## # 6.29 non valid files @@ -470,17 +487,21 @@ TOOLTEST h5diff_629.txt file1.h6 file2.h6 # 7. attributes # ############################################################################## -TOOLTEST h5diff_70.txt file5.h5 file6.h5 -v +TOOLTEST h5diff_70.txt $FILE5 $FILE6 -v # ############################################################################## # 8. all dataset datatypes # ############################################################################## -TOOLTEST h5diff_80.txt file7.h5 file8.h5 -v +TOOLTEST h5diff_80.txt $FILE7 $FILE8 -v # 9. compare a file with itself -TOOLTEST h5diff_90.txt file1.h5 file1.h5 +TOOLTEST h5diff_90.txt $FILE1 $FILE1 + +# 10. read by hyperslab, print indexes + +TOOLTEST h5diff_100.txt $FILE9 $FILE10 -v # ############################################################################## # # END diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 5769783..ca0fa2e 100755 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -30,6 +30,9 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary H5DETECTSZIP=testh5repack_detect_szip # The tool name H5DETECTSZIP_BIN=`pwd`/$H5DETECTSZIP # The path of the tool binary + +INFO_FILE=../testfiles/info.h5repack + nerrors=0 verbose=yes @@ -366,7 +369,7 @@ else fi #file -arg="test4.h5 -e ../testfiles/h5repack_info.txt" +arg="test4.h5 -e $INFO_FILE" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 7320a63..ab873ae 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -115,6 +115,7 @@ hsize_t diff_match( hid_t file1_id, hsize_t diff_array( void *_mem1, void *_mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *dims, diff_opt_t *options, @@ -161,28 +162,7 @@ const char* get_sign(H5T_sign_t sign); void print_dims( int r, hsize_t *d ); int print_objname(diff_opt_t *options, hsize_t nfound); -hsize_t diff_native_uchar(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); - - -hsize_t diff_char(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + hsize_t diff_datum(void *_mem1, void *_mem2, @@ -201,136 +181,148 @@ hsize_t diff_datum(void *_mem1, hsize_t diff_float(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_double(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_schar(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_uchar(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_short(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_ushort(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_int(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_uint(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_long(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_ulong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_llong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); hsize_t diff_ullong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 9929b05..30aa852 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -17,7 +17,6 @@ #include "ph5diff.h" #include "H5private.h" - /*------------------------------------------------------------------------- * printf formatting *------------------------------------------------------------------------- @@ -43,26 +42,45 @@ #define ULLI_FORMAT_P "%-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"d %-14f\n" #define SPACES " " - +/*------------------------------------------------------------------------- + * -p relative error formula + *------------------------------------------------------------------------- + */ #define PER(A,B) { per = -1; \ if (A!=0) \ per = (float)fabs(1-( (float)B / (float)A )); \ } - -/* local functions */ +/*------------------------------------------------------------------------- + * local prototypes + *------------------------------------------------------------------------- + */ static void close_obj(H5G_obj_t obj_type, hid_t obj_id); -static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, - hid_t region1_id, hid_t region2_id, diff_opt_t *options); +static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id,hid_t region1_id, hid_t region2_id, diff_opt_t *options); static hbool_t is_zero(const void *_mem, size_t size); static int ull2float(unsigned long_long ull_value, float *f_value); +static hsize_t character_compare(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); +static hsize_t character_compare_opt(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); + +#ifdef NOT_YET +#define EPSILON .0000001 +static hbool_t equal_float(float value, float expected); +#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n" +#endif + + +/*------------------------------------------------------------------------- + * + * Local functions + * + *------------------------------------------------------------------------- + */ /*------------------------------------------------------------------------- * Function: print_data * - * Purpose: print data only in report or verbose modes, - * and do not print in quiet mode + * Purpose: print data only in report or verbose modes, and do not print in quiet mode *------------------------------------------------------------------------- */ static @@ -148,6 +166,7 @@ void print_pos( int *ph, /* print header */ hsize_t diff_array( void *_mem1, void *_mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *dims, diff_opt_t *options, @@ -211,33 +230,33 @@ hsize_t diff_array( void *_mem1, case H5T_FLOAT: if (H5Tequal(m_type, H5T_NATIVE_FLOAT)) - nfound=diff_float(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_float(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_DOUBLE)) - nfound=diff_double(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_double(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); break; case H5T_INTEGER: if (H5Tequal(m_type, H5T_NATIVE_SCHAR)) - nfound=diff_schar(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_schar(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_UCHAR)) - nfound=diff_uchar(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_uchar(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_SHORT)) - nfound=diff_short(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_short(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_USHORT)) - nfound=diff_ushort(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_ushort(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_INT)) - nfound=diff_int(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_int(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_UINT)) - nfound=diff_uint(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_uint(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_LONG)) - nfound=diff_long(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_long(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_ULONG)) - nfound=diff_ulong(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_ulong(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_LLONG)) - nfound=diff_llong(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_llong(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); else if (H5Tequal(m_type, H5T_NATIVE_ULLONG)) - nfound=diff_ullong(mem1,mem2,nelmts,rank,acc,pos,options,name1,name2,&ph); + nfound=diff_ullong(mem1,mem2,nelmts,hyper_start,rank,acc,pos,options,name1,name2,&ph); break; @@ -417,7 +436,7 @@ hsize_t diff_datum(void *_mem1, /* check for NULL pointer for string */ if(s!=NULL) for (u=0; u<size && (s[u] || pad!=H5T_STR_NULLTERM); u++) - nfound+=diff_char( + nfound+=character_compare( mem1 + u, mem2 + u, /* offset */ i, /* index position */ @@ -440,7 +459,7 @@ hsize_t diff_datum(void *_mem1, { /* byte-by-byte comparison */ for (u=0; u<type_size; u++) - nfound+=diff_native_uchar( + nfound+=character_compare_opt( mem1 + u, mem2 + u, /* offset */ i, /* index position */ @@ -463,7 +482,7 @@ hsize_t diff_datum(void *_mem1, /* byte-by-byte comparison */ for (u=0; u<type_size; u++) - nfound+=diff_native_uchar( + nfound+=character_compare_opt( mem1 + u, mem2 + u, /* offset */ i, /* index position */ @@ -513,7 +532,7 @@ hsize_t diff_datum(void *_mem1, else { for (u=0; u<type_size; u++) - nfound+=diff_native_uchar( + nfound+=character_compare_opt( mem1 + u, mem2 + u, /* offset */ i, /* index position */ @@ -1619,47 +1638,6 @@ hsize_t diff_datum(void *_mem1, } -/*------------------------------------------------------------------------- - * Function: diff_char - * - * Purpose: do a byte-by-byte comparison and print in char format - * - * Return: number of differences found - * - *------------------------------------------------------------------------- - */ - -hsize_t diff_char(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) -{ - hsize_t nfound=0; /* differences found */ - unsigned char temp1_uchar; - unsigned char temp2_uchar; - - memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - - if (temp1_uchar != temp2_uchar) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); - parallel_print(SPACES); - parallel_print(C_FORMAT,temp1_uchar,temp2_uchar); - } - nfound++; - } - - return nfound; -} @@ -1965,7 +1943,51 @@ hsize_t diff_region(hid_t obj1_id, /*------------------------------------------------------------------------- - * Function: diff_native_uchar + * Function: character_compare + * + * Purpose: do a byte-by-byte comparison and print in char format + * + * Return: number of differences found + * + *------------------------------------------------------------------------- + */ + +static +hsize_t character_compare(unsigned char *mem1, + unsigned char *mem2, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph) +{ + hsize_t nfound=0; /* differences found */ + unsigned char temp1_uchar; + unsigned char temp2_uchar; + + memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); + memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); + + if (temp1_uchar != temp2_uchar) + { + if ( print_data(options) ) + { + print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + parallel_print(SPACES); + parallel_print(C_FORMAT,temp1_uchar,temp2_uchar); + } + nfound++; + } + + return nfound; +} + + +/*------------------------------------------------------------------------- + * Function: character_compare_opt * * Purpose: do a byte-by-byte comparison and print in numerical format * @@ -1974,7 +1996,7 @@ hsize_t diff_region(hid_t obj1_id, *------------------------------------------------------------------------- */ -hsize_t diff_native_uchar(unsigned char *mem1, +hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t i, int rank, @@ -2071,6 +2093,7 @@ hsize_t diff_native_uchar(unsigned char *mem1, hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2099,7 +2122,7 @@ hsize_t diff_float(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT,temp1_float,temp2_float,fabs(temp1_float-temp2_float)); } @@ -2121,11 +2144,25 @@ hsize_t diff_float(unsigned char *mem1, memcpy(&temp2_float, mem2, sizeof(float)); PER(temp1_float,temp2_float); + +#ifdef NOT_YET + if (per==-1) /* not comparable */ + { + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P_NOTCOMP,temp1_float,temp2_float, + fabs(temp1_float-temp2_float)); + options->not_cmp=1; + } + + else +#endif + if ( per > options->percent ) { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P,temp1_float,temp2_float, fabs(temp1_float-temp2_float), @@ -2150,11 +2187,25 @@ hsize_t diff_float(unsigned char *mem1, memcpy(&temp2_float, mem2, sizeof(float)); PER(temp1_float,temp2_float); + +#ifdef NOT_YET + if (per==-1) /* not comparable */ + { + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P_NOTCOMP,temp1_float,temp2_float, + fabs(temp1_float-temp2_float)); + options->not_cmp=1; + } + + else +#endif + if ( per > options->percent && fabs(temp1_float-temp2_float) > options->delta ) { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P,temp1_float,temp2_float, fabs(temp1_float-temp2_float), @@ -2180,7 +2231,7 @@ hsize_t diff_float(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT,temp1_float,temp2_float,fabs(temp1_float-temp2_float)); } @@ -2212,6 +2263,7 @@ hsize_t diff_float(unsigned char *mem1, hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2241,7 +2293,7 @@ hsize_t diff_double(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT,temp1_double,temp2_double,fabs(temp1_double-temp2_double)); } @@ -2268,7 +2320,7 @@ hsize_t diff_double(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P,temp1_double,temp2_double, fabs(temp1_double-temp2_double), @@ -2297,7 +2349,7 @@ hsize_t diff_double(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P,temp1_double,temp2_double, fabs(temp1_double-temp2_double), @@ -2323,7 +2375,7 @@ hsize_t diff_double(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(F_FORMAT,temp1_double,temp2_double,fabs(temp1_double-temp2_double)); } @@ -2353,6 +2405,7 @@ hsize_t diff_double(unsigned char *mem1, hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2382,7 +2435,7 @@ hsize_t diff_schar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_char,temp2_char,abs(temp1_char-temp2_char)); } @@ -2409,7 +2462,7 @@ hsize_t diff_schar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_char,temp2_char, abs(temp1_char-temp2_char), @@ -2438,7 +2491,7 @@ hsize_t diff_schar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_char,temp2_char, abs(temp1_char-temp2_char), @@ -2465,7 +2518,7 @@ hsize_t diff_schar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_char,temp2_char,abs(temp1_char-temp2_char)); } @@ -2497,6 +2550,7 @@ hsize_t diff_schar(unsigned char *mem1, hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2526,7 +2580,7 @@ hsize_t diff_uchar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,abs(temp1_uchar-temp2_uchar)); } @@ -2554,7 +2608,7 @@ hsize_t diff_uchar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar, abs(temp1_uchar-temp2_uchar), @@ -2583,7 +2637,7 @@ hsize_t diff_uchar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar, abs(temp1_uchar-temp2_uchar), @@ -2610,7 +2664,7 @@ hsize_t diff_uchar(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,abs(temp1_uchar-temp2_uchar)); } @@ -2640,6 +2694,7 @@ hsize_t diff_uchar(unsigned char *mem1, hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2669,7 +2724,7 @@ hsize_t diff_short(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_short,temp2_short,abs(temp1_short-temp2_short)); } @@ -2697,7 +2752,7 @@ hsize_t diff_short(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_short,temp2_short, abs(temp1_short-temp2_short), @@ -2728,7 +2783,7 @@ hsize_t diff_short(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_short,temp2_short, abs(temp1_short-temp2_short), @@ -2755,7 +2810,7 @@ hsize_t diff_short(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_short,temp2_short,abs(temp1_short-temp2_short)); } @@ -2786,6 +2841,7 @@ hsize_t diff_short(unsigned char *mem1, hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2814,7 +2870,7 @@ hsize_t diff_ushort(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_ushort,temp2_ushort,abs(temp1_ushort-temp2_ushort)); } @@ -2842,7 +2898,7 @@ hsize_t diff_ushort(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_ushort,temp2_ushort, abs(temp1_ushort-temp2_ushort), @@ -2873,7 +2929,7 @@ hsize_t diff_ushort(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_ushort,temp2_ushort, abs(temp1_ushort-temp2_ushort), @@ -2900,7 +2956,7 @@ hsize_t diff_ushort(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_ushort,temp2_ushort,abs(temp1_ushort-temp2_ushort)); } @@ -2932,6 +2988,7 @@ hsize_t diff_ushort(unsigned char *mem1, hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -2960,7 +3017,7 @@ hsize_t diff_int(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_int,temp2_int,abs(temp1_int-temp2_int)); } @@ -2988,7 +3045,7 @@ hsize_t diff_int(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_int,temp2_int, abs(temp1_int-temp2_int), @@ -3019,7 +3076,7 @@ hsize_t diff_int(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_int,temp2_int, abs(temp1_int-temp2_int), @@ -3046,7 +3103,7 @@ hsize_t diff_int(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_int,temp2_int,abs(temp1_int-temp2_int)); } @@ -3078,6 +3135,7 @@ hsize_t diff_int(unsigned char *mem1, hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -3106,7 +3164,7 @@ hsize_t diff_uint(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_uint,temp2_uint,abs(temp1_uint-temp2_uint)); } @@ -3134,7 +3192,7 @@ hsize_t diff_uint(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_uint,temp2_uint, abs(temp1_uint-temp2_uint), @@ -3165,7 +3223,7 @@ hsize_t diff_uint(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P,temp1_uint,temp2_uint, abs(temp1_uint-temp2_uint), @@ -3192,7 +3250,7 @@ hsize_t diff_uint(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(I_FORMAT,temp1_uint,temp2_uint,abs(temp1_uint-temp2_uint)); } @@ -3224,6 +3282,7 @@ hsize_t diff_uint(unsigned char *mem1, hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -3255,7 +3314,7 @@ hsize_t diff_long(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT,temp1_long,temp2_long,labs(temp1_long-temp2_long)); } @@ -3283,7 +3342,7 @@ hsize_t diff_long(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P,temp1_long,temp2_long, labs(temp1_long-temp2_long), @@ -3314,7 +3373,7 @@ hsize_t diff_long(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P,temp1_long,temp2_long, labs(temp1_long-temp2_long), @@ -3341,7 +3400,7 @@ hsize_t diff_long(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT,temp1_long,temp2_long,labs(temp1_long-temp2_long)); } @@ -3374,6 +3433,7 @@ hsize_t diff_long(unsigned char *mem1, hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -3406,7 +3466,7 @@ hsize_t diff_ulong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT,temp1_ulong,temp2_ulong,labs(temp1_ulong-temp2_ulong)); } @@ -3436,7 +3496,7 @@ hsize_t diff_ulong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P,temp1_ulong,temp2_ulong, labs(temp1_ulong-temp2_ulong), @@ -3467,7 +3527,7 @@ hsize_t diff_ulong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P,temp1_ulong,temp2_ulong, labs(temp1_ulong-temp2_ulong), @@ -3494,7 +3554,7 @@ hsize_t diff_ulong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LI_FORMAT,temp1_ulong,temp2_ulong,labs(temp1_ulong-temp2_ulong)); } @@ -3526,6 +3586,7 @@ hsize_t diff_ulong(unsigned char *mem1, hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -3554,7 +3615,7 @@ hsize_t diff_llong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT,temp1_llong,temp2_llong, (long_long)labs((long)(temp1_llong-temp2_llong))); @@ -3583,7 +3644,7 @@ hsize_t diff_llong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT_P,temp1_llong,temp2_llong, (long_long)labs((long)(temp1_llong-temp2_llong)), @@ -3614,7 +3675,7 @@ hsize_t diff_llong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT_P,temp1_llong,temp2_llong, (long_long)labs((long)(temp1_llong-temp2_llong)), @@ -3641,7 +3702,7 @@ hsize_t diff_llong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT,temp1_llong,temp2_llong, (long_long)labs((long)(temp1_llong-temp2_llong))); @@ -3675,6 +3736,7 @@ hsize_t diff_llong(unsigned char *mem1, hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, + hsize_t hyper_start, int rank, hsize_t *acc, hsize_t *pos, @@ -3703,7 +3765,7 @@ hsize_t diff_ullong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT,temp1_ullong,temp2_ullong, (unsigned long_long)labs((long)(temp1_ullong-temp2_ullong))); @@ -3734,7 +3796,7 @@ hsize_t diff_ullong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong, (unsigned long_long)labs((long)(temp1_ullong-temp2_ullong)), @@ -3767,7 +3829,7 @@ hsize_t diff_ullong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,1,i,acc,pos,rank,obj1,obj2); + print_pos(ph,1,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong, (unsigned long_long)labs((long)(temp1_ullong-temp2_ullong)), @@ -3794,7 +3856,7 @@ hsize_t diff_ullong(unsigned char *mem1, { if ( print_data(options) ) { - print_pos(ph,0,i,acc,pos,rank,obj1,obj2); + print_pos(ph,0,hyper_start+i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT,temp1_ullong,temp2_ullong, (unsigned long_long)labs((long)(temp1_ullong-temp2_ullong))); @@ -3864,3 +3926,33 @@ error: return -1; } + + +/*------------------------------------------------------------------------- + * Function: equal_float + * + * Purpose: use a relative error formula to deal with floating point + * uncertainty + * + * Programmer: pvn + * October 24, 2006 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +#ifdef NOT_YET +static +hbool_t equal_float(float value, float expected) +{ + if ( fabs( (value-expected) / expected) < EPSILON) + return TRUE; + else + return FALSE; + +} +#endif + + + diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 785b345..1961ed8 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -203,6 +203,7 @@ int diff_attr(hid_t loc1_id, nfound = diff_array(buf1, buf2, nelmts1, + 0, rank1, dims1, options, @@ -224,6 +225,7 @@ int diff_attr(hid_t loc1_id, nfound = diff_array(buf1, buf2, nelmts1, + 0, rank1, dims1, options, @@ -240,6 +242,7 @@ int diff_attr(hid_t loc1_id, nfound = diff_array(buf1, buf2, nelmts1, + 0, rank1, dims1, options, @@ -257,6 +260,7 @@ int diff_attr(hid_t loc1_id, nfound = diff_array(buf1, buf2, nelmts1, + 0, rank1, dims1, options, diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 630b408..02a415a 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -395,7 +395,7 @@ hsize_t diff_datasetid( hid_t did1, */ need = (size_t)(nelmts1*m_size1); /* bytes needed */ - if ( need < H5TOOLS_MALLOCSIZE ) + if ( need < H5TOOLS_MALLOCSIZE) { buf1 = HDmalloc(need); buf2 = HDmalloc(need); @@ -412,6 +412,7 @@ hsize_t diff_datasetid( hid_t did1, nfound = diff_array(buf1, buf2, nelmts1, + 0, rank1, dims1, options, @@ -501,18 +502,20 @@ hsize_t diff_datasetid( hid_t did1, if ( H5Dread(did2,m_tid2,sm_space,sid2,H5P_DEFAULT,sm_buf2) < 0 ) goto error; - /* array diff */ - nfound = diff_array(sm_buf1, - sm_buf2, - hs_nelmts, - rank1, - dims1, - options, - name1, - name2, - m_tid1, - did1, - did2); + /* get array differences. in the case of hyperslab read, increment the number of differences + found in each hyperslab and pass the position at the beggining for printing */ + nfound += diff_array(sm_buf1, + sm_buf2, + hs_nelmts, + elmtno, + rank1, + dims1, + options, + name1, + name2, + m_tid1, + did1, + did2); /* reclaim any VL memory, if necessary */ if(vl_data) diff --git a/tools/testfiles/file4.h5 b/tools/testfiles/file4.h5 Binary files differdeleted file mode 100644 index d28ddeb..0000000 --- a/tools/testfiles/file4.h5 +++ /dev/null diff --git a/tools/testfiles/file7.h5 b/tools/testfiles/file7.h5 Binary files differdeleted file mode 100644 index 69714b1..0000000 --- a/tools/testfiles/file7.h5 +++ /dev/null diff --git a/tools/testfiles/file8.h5 b/tools/testfiles/file8.h5 Binary files differdeleted file mode 100644 index b6fbcb9..0000000 --- a/tools/testfiles/file8.h5 +++ /dev/null diff --git a/tools/testfiles/h5diff_10.txt b/tools/testfiles/h5diff_10.txt index 223e3fa..d606468 100644 --- a/tools/testfiles/h5diff_10.txt +++ b/tools/testfiles/h5diff_10.txt @@ -1,7 +1,7 @@ ############################# Expected output for 'h5diff -h' ############################# -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_100.txt b/tools/testfiles/h5diff_100.txt new file mode 100644 index 0000000..8415956 --- /dev/null +++ b/tools/testfiles/h5diff_100.txt @@ -0,0 +1,1038 @@ +############################# +Expected output for 'h5diff h5diff_hyper1.h5 h5diff_hyper2.h5 -v' +############################# + +file1 file2 +--------------------------------------- + x x /big + +Dataset: </big> and </big> +position big big difference +------------------------------------------------------------ +[ 268435456 ] 31 0 31 +[ 268435457 ] 31 0 31 +[ 268435458 ] 31 0 31 +[ 268435459 ] 31 0 31 +[ 268435460 ] 31 0 31 +[ 268435461 ] 31 0 31 +[ 268435462 ] 31 0 31 +[ 268435463 ] 31 0 31 +[ 268435464 ] 31 0 31 +[ 268435465 ] 31 0 31 +[ 268435466 ] 31 0 31 +[ 268435467 ] 31 0 31 +[ 268435468 ] 31 0 31 +[ 268435469 ] 31 0 31 +[ 268435470 ] 31 0 31 +[ 268435471 ] 31 0 31 +[ 268435472 ] 31 0 31 +[ 268435473 ] 31 0 31 +[ 268435474 ] 31 0 31 +[ 268435475 ] 31 0 31 +[ 268435476 ] 31 0 31 +[ 268435477 ] 31 0 31 +[ 268435478 ] 31 0 31 +[ 268435479 ] 31 0 31 +[ 268435480 ] 31 0 31 +[ 268435481 ] 31 0 31 +[ 268435482 ] 31 0 31 +[ 268435483 ] 31 0 31 +[ 268435484 ] 31 0 31 +[ 268435485 ] 31 0 31 +[ 268435486 ] 31 0 31 +[ 268435487 ] 31 0 31 +[ 268435488 ] 31 0 31 +[ 268435489 ] 31 0 31 +[ 268435490 ] 31 0 31 +[ 268435491 ] 31 0 31 +[ 268435492 ] 31 0 31 +[ 268435493 ] 31 0 31 +[ 268435494 ] 31 0 31 +[ 268435495 ] 31 0 31 +[ 268435496 ] 31 0 31 +[ 268435497 ] 31 0 31 +[ 268435498 ] 31 0 31 +[ 268435499 ] 31 0 31 +[ 268435500 ] 31 0 31 +[ 268435501 ] 31 0 31 +[ 268435502 ] 31 0 31 +[ 268435503 ] 31 0 31 +[ 268435504 ] 31 0 31 +[ 268435505 ] 31 0 31 +[ 268435506 ] 31 0 31 +[ 268435507 ] 31 0 31 +[ 268435508 ] 31 0 31 +[ 268435509 ] 31 0 31 +[ 268435510 ] 31 0 31 +[ 268435511 ] 31 0 31 +[ 268435512 ] 31 0 31 +[ 268435513 ] 31 0 31 +[ 268435514 ] 31 0 31 +[ 268435515 ] 31 0 31 +[ 268435516 ] 31 0 31 +[ 268435517 ] 31 0 31 +[ 268435518 ] 31 0 31 +[ 268435519 ] 31 0 31 +[ 268435520 ] 31 0 31 +[ 268435521 ] 31 0 31 +[ 268435522 ] 31 0 31 +[ 268435523 ] 31 0 31 +[ 268435524 ] 31 0 31 +[ 268435525 ] 31 0 31 +[ 268435526 ] 31 0 31 +[ 268435527 ] 31 0 31 +[ 268435528 ] 31 0 31 +[ 268435529 ] 31 0 31 +[ 268435530 ] 31 0 31 +[ 268435531 ] 31 0 31 +[ 268435532 ] 31 0 31 +[ 268435533 ] 31 0 31 +[ 268435534 ] 31 0 31 +[ 268435535 ] 31 0 31 +[ 268435536 ] 31 0 31 +[ 268435537 ] 31 0 31 +[ 268435538 ] 31 0 31 +[ 268435539 ] 31 0 31 +[ 268435540 ] 31 0 31 +[ 268435541 ] 31 0 31 +[ 268435542 ] 31 0 31 +[ 268435543 ] 31 0 31 +[ 268435544 ] 31 0 31 +[ 268435545 ] 31 0 31 +[ 268435546 ] 31 0 31 +[ 268435547 ] 31 0 31 +[ 268435548 ] 31 0 31 +[ 268435549 ] 31 0 31 +[ 268435550 ] 31 0 31 +[ 268435551 ] 31 0 31 +[ 268435552 ] 31 0 31 +[ 268435553 ] 31 0 31 +[ 268435554 ] 31 0 31 +[ 268435555 ] 31 0 31 +[ 268435556 ] 31 0 31 +[ 268435557 ] 31 0 31 +[ 268435558 ] 31 0 31 +[ 268435559 ] 31 0 31 +[ 268435560 ] 31 0 31 +[ 268435561 ] 31 0 31 +[ 268435562 ] 31 0 31 +[ 268435563 ] 31 0 31 +[ 268435564 ] 31 0 31 +[ 268435565 ] 31 0 31 +[ 268435566 ] 31 0 31 +[ 268435567 ] 31 0 31 +[ 268435568 ] 31 0 31 +[ 268435569 ] 31 0 31 +[ 268435570 ] 31 0 31 +[ 268435571 ] 31 0 31 +[ 268435572 ] 31 0 31 +[ 268435573 ] 31 0 31 +[ 268435574 ] 31 0 31 +[ 268435575 ] 31 0 31 +[ 268435576 ] 31 0 31 +[ 268435577 ] 31 0 31 +[ 268435578 ] 31 0 31 +[ 268435579 ] 31 0 31 +[ 268435580 ] 31 0 31 +[ 268435581 ] 31 0 31 +[ 268435582 ] 31 0 31 +[ 268435583 ] 31 0 31 +[ 268435584 ] 31 0 31 +[ 268435585 ] 31 0 31 +[ 268435586 ] 31 0 31 +[ 268435587 ] 31 0 31 +[ 268435588 ] 31 0 31 +[ 268435589 ] 31 0 31 +[ 268435590 ] 31 0 31 +[ 268435591 ] 31 0 31 +[ 268435592 ] 31 0 31 +[ 268435593 ] 31 0 31 +[ 268435594 ] 31 0 31 +[ 268435595 ] 31 0 31 +[ 268435596 ] 31 0 31 +[ 268435597 ] 31 0 31 +[ 268435598 ] 31 0 31 +[ 268435599 ] 31 0 31 +[ 268435600 ] 31 0 31 +[ 268435601 ] 31 0 31 +[ 268435602 ] 31 0 31 +[ 268435603 ] 31 0 31 +[ 268435604 ] 31 0 31 +[ 268435605 ] 31 0 31 +[ 268435606 ] 31 0 31 +[ 268435607 ] 31 0 31 +[ 268435608 ] 31 0 31 +[ 268435609 ] 31 0 31 +[ 268435610 ] 31 0 31 +[ 268435611 ] 31 0 31 +[ 268435612 ] 31 0 31 +[ 268435613 ] 31 0 31 +[ 268435614 ] 31 0 31 +[ 268435615 ] 31 0 31 +[ 268435616 ] 31 0 31 +[ 268435617 ] 31 0 31 +[ 268435618 ] 31 0 31 +[ 268435619 ] 31 0 31 +[ 268435620 ] 31 0 31 +[ 268435621 ] 31 0 31 +[ 268435622 ] 31 0 31 +[ 268435623 ] 31 0 31 +[ 268435624 ] 31 0 31 +[ 268435625 ] 31 0 31 +[ 268435626 ] 31 0 31 +[ 268435627 ] 31 0 31 +[ 268435628 ] 31 0 31 +[ 268435629 ] 31 0 31 +[ 268435630 ] 31 0 31 +[ 268435631 ] 31 0 31 +[ 268435632 ] 31 0 31 +[ 268435633 ] 31 0 31 +[ 268435634 ] 31 0 31 +[ 268435635 ] 31 0 31 +[ 268435636 ] 31 0 31 +[ 268435637 ] 31 0 31 +[ 268435638 ] 31 0 31 +[ 268435639 ] 31 0 31 +[ 268435640 ] 31 0 31 +[ 268435641 ] 31 0 31 +[ 268435642 ] 31 0 31 +[ 268435643 ] 31 0 31 +[ 268435644 ] 31 0 31 +[ 268435645 ] 31 0 31 +[ 268435646 ] 31 0 31 +[ 268435647 ] 31 0 31 +[ 268435648 ] 31 0 31 +[ 268435649 ] 31 0 31 +[ 268435650 ] 31 0 31 +[ 268435651 ] 31 0 31 +[ 268435652 ] 31 0 31 +[ 268435653 ] 31 0 31 +[ 268435654 ] 31 0 31 +[ 268435655 ] 31 0 31 +[ 268435656 ] 31 0 31 +[ 268435657 ] 31 0 31 +[ 268435658 ] 31 0 31 +[ 268435659 ] 31 0 31 +[ 268435660 ] 31 0 31 +[ 268435661 ] 31 0 31 +[ 268435662 ] 31 0 31 +[ 268435663 ] 31 0 31 +[ 268435664 ] 31 0 31 +[ 268435665 ] 31 0 31 +[ 268435666 ] 31 0 31 +[ 268435667 ] 31 0 31 +[ 268435668 ] 31 0 31 +[ 268435669 ] 31 0 31 +[ 268435670 ] 31 0 31 +[ 268435671 ] 31 0 31 +[ 268435672 ] 31 0 31 +[ 268435673 ] 31 0 31 +[ 268435674 ] 31 0 31 +[ 268435675 ] 31 0 31 +[ 268435676 ] 31 0 31 +[ 268435677 ] 31 0 31 +[ 268435678 ] 31 0 31 +[ 268435679 ] 31 0 31 +[ 268435680 ] 31 0 31 +[ 268435681 ] 31 0 31 +[ 268435682 ] 31 0 31 +[ 268435683 ] 31 0 31 +[ 268435684 ] 31 0 31 +[ 268435685 ] 31 0 31 +[ 268435686 ] 31 0 31 +[ 268435687 ] 31 0 31 +[ 268435688 ] 31 0 31 +[ 268435689 ] 31 0 31 +[ 268435690 ] 31 0 31 +[ 268435691 ] 31 0 31 +[ 268435692 ] 31 0 31 +[ 268435693 ] 31 0 31 +[ 268435694 ] 31 0 31 +[ 268435695 ] 31 0 31 +[ 268435696 ] 31 0 31 +[ 268435697 ] 31 0 31 +[ 268435698 ] 31 0 31 +[ 268435699 ] 31 0 31 +[ 268435700 ] 31 0 31 +[ 268435701 ] 31 0 31 +[ 268435702 ] 31 0 31 +[ 268435703 ] 31 0 31 +[ 268435704 ] 31 0 31 +[ 268435705 ] 31 0 31 +[ 268435706 ] 31 0 31 +[ 268435707 ] 31 0 31 +[ 268435708 ] 31 0 31 +[ 268435709 ] 31 0 31 +[ 268435710 ] 31 0 31 +[ 268435711 ] 31 0 31 +[ 268435712 ] 31 0 31 +[ 268435713 ] 31 0 31 +[ 268435714 ] 31 0 31 +[ 268435715 ] 31 0 31 +[ 268435716 ] 31 0 31 +[ 268435717 ] 31 0 31 +[ 268435718 ] 31 0 31 +[ 268435719 ] 31 0 31 +[ 268435720 ] 31 0 31 +[ 268435721 ] 31 0 31 +[ 268435722 ] 31 0 31 +[ 268435723 ] 31 0 31 +[ 268435724 ] 31 0 31 +[ 268435725 ] 31 0 31 +[ 268435726 ] 31 0 31 +[ 268435727 ] 31 0 31 +[ 268435728 ] 31 0 31 +[ 268435729 ] 31 0 31 +[ 268435730 ] 31 0 31 +[ 268435731 ] 31 0 31 +[ 268435732 ] 31 0 31 +[ 268435733 ] 31 0 31 +[ 268435734 ] 31 0 31 +[ 268435735 ] 31 0 31 +[ 268435736 ] 31 0 31 +[ 268435737 ] 31 0 31 +[ 268435738 ] 31 0 31 +[ 268435739 ] 31 0 31 +[ 268435740 ] 31 0 31 +[ 268435741 ] 31 0 31 +[ 268435742 ] 31 0 31 +[ 268435743 ] 31 0 31 +[ 268435744 ] 31 0 31 +[ 268435745 ] 31 0 31 +[ 268435746 ] 31 0 31 +[ 268435747 ] 31 0 31 +[ 268435748 ] 31 0 31 +[ 268435749 ] 31 0 31 +[ 268435750 ] 31 0 31 +[ 268435751 ] 31 0 31 +[ 268435752 ] 31 0 31 +[ 268435753 ] 31 0 31 +[ 268435754 ] 31 0 31 +[ 268435755 ] 31 0 31 +[ 268435756 ] 31 0 31 +[ 268435757 ] 31 0 31 +[ 268435758 ] 31 0 31 +[ 268435759 ] 31 0 31 +[ 268435760 ] 31 0 31 +[ 268435761 ] 31 0 31 +[ 268435762 ] 31 0 31 +[ 268435763 ] 31 0 31 +[ 268435764 ] 31 0 31 +[ 268435765 ] 31 0 31 +[ 268435766 ] 31 0 31 +[ 268435767 ] 31 0 31 +[ 268435768 ] 31 0 31 +[ 268435769 ] 31 0 31 +[ 268435770 ] 31 0 31 +[ 268435771 ] 31 0 31 +[ 268435772 ] 31 0 31 +[ 268435773 ] 31 0 31 +[ 268435774 ] 31 0 31 +[ 268435775 ] 31 0 31 +[ 268435776 ] 31 0 31 +[ 268435777 ] 31 0 31 +[ 268435778 ] 31 0 31 +[ 268435779 ] 31 0 31 +[ 268435780 ] 31 0 31 +[ 268435781 ] 31 0 31 +[ 268435782 ] 31 0 31 +[ 268435783 ] 31 0 31 +[ 268435784 ] 31 0 31 +[ 268435785 ] 31 0 31 +[ 268435786 ] 31 0 31 +[ 268435787 ] 31 0 31 +[ 268435788 ] 31 0 31 +[ 268435789 ] 31 0 31 +[ 268435790 ] 31 0 31 +[ 268435791 ] 31 0 31 +[ 268435792 ] 31 0 31 +[ 268435793 ] 31 0 31 +[ 268435794 ] 31 0 31 +[ 268435795 ] 31 0 31 +[ 268435796 ] 31 0 31 +[ 268435797 ] 31 0 31 +[ 268435798 ] 31 0 31 +[ 268435799 ] 31 0 31 +[ 268435800 ] 31 0 31 +[ 268435801 ] 31 0 31 +[ 268435802 ] 31 0 31 +[ 268435803 ] 31 0 31 +[ 268435804 ] 31 0 31 +[ 268435805 ] 31 0 31 +[ 268435806 ] 31 0 31 +[ 268435807 ] 31 0 31 +[ 268435808 ] 31 0 31 +[ 268435809 ] 31 0 31 +[ 268435810 ] 31 0 31 +[ 268435811 ] 31 0 31 +[ 268435812 ] 31 0 31 +[ 268435813 ] 31 0 31 +[ 268435814 ] 31 0 31 +[ 268435815 ] 31 0 31 +[ 268435816 ] 31 0 31 +[ 268435817 ] 31 0 31 +[ 268435818 ] 31 0 31 +[ 268435819 ] 31 0 31 +[ 268435820 ] 31 0 31 +[ 268435821 ] 31 0 31 +[ 268435822 ] 31 0 31 +[ 268435823 ] 31 0 31 +[ 268435824 ] 31 0 31 +[ 268435825 ] 31 0 31 +[ 268435826 ] 31 0 31 +[ 268435827 ] 31 0 31 +[ 268435828 ] 31 0 31 +[ 268435829 ] 31 0 31 +[ 268435830 ] 31 0 31 +[ 268435831 ] 31 0 31 +[ 268435832 ] 31 0 31 +[ 268435833 ] 31 0 31 +[ 268435834 ] 31 0 31 +[ 268435835 ] 31 0 31 +[ 268435836 ] 31 0 31 +[ 268435837 ] 31 0 31 +[ 268435838 ] 31 0 31 +[ 268435839 ] 31 0 31 +[ 268435840 ] 31 0 31 +[ 268435841 ] 31 0 31 +[ 268435842 ] 31 0 31 +[ 268435843 ] 31 0 31 +[ 268435844 ] 31 0 31 +[ 268435845 ] 31 0 31 +[ 268435846 ] 31 0 31 +[ 268435847 ] 31 0 31 +[ 268435848 ] 31 0 31 +[ 268435849 ] 31 0 31 +[ 268435850 ] 31 0 31 +[ 268435851 ] 31 0 31 +[ 268435852 ] 31 0 31 +[ 268435853 ] 31 0 31 +[ 268435854 ] 31 0 31 +[ 268435855 ] 31 0 31 +[ 268435856 ] 31 0 31 +[ 268435857 ] 31 0 31 +[ 268435858 ] 31 0 31 +[ 268435859 ] 31 0 31 +[ 268435860 ] 31 0 31 +[ 268435861 ] 31 0 31 +[ 268435862 ] 31 0 31 +[ 268435863 ] 31 0 31 +[ 268435864 ] 31 0 31 +[ 268435865 ] 31 0 31 +[ 268435866 ] 31 0 31 +[ 268435867 ] 31 0 31 +[ 268435868 ] 31 0 31 +[ 268435869 ] 31 0 31 +[ 268435870 ] 31 0 31 +[ 268435871 ] 31 0 31 +[ 268435872 ] 31 0 31 +[ 268435873 ] 31 0 31 +[ 268435874 ] 31 0 31 +[ 268435875 ] 31 0 31 +[ 268435876 ] 31 0 31 +[ 268435877 ] 31 0 31 +[ 268435878 ] 31 0 31 +[ 268435879 ] 31 0 31 +[ 268435880 ] 31 0 31 +[ 268435881 ] 31 0 31 +[ 268435882 ] 31 0 31 +[ 268435883 ] 31 0 31 +[ 268435884 ] 31 0 31 +[ 268435885 ] 31 0 31 +[ 268435886 ] 31 0 31 +[ 268435887 ] 31 0 31 +[ 268435888 ] 31 0 31 +[ 268435889 ] 31 0 31 +[ 268435890 ] 31 0 31 +[ 268435891 ] 31 0 31 +[ 268435892 ] 31 0 31 +[ 268435893 ] 31 0 31 +[ 268435894 ] 31 0 31 +[ 268435895 ] 31 0 31 +[ 268435896 ] 31 0 31 +[ 268435897 ] 31 0 31 +[ 268435898 ] 31 0 31 +[ 268435899 ] 31 0 31 +[ 268435900 ] 31 0 31 +[ 268435901 ] 31 0 31 +[ 268435902 ] 31 0 31 +[ 268435903 ] 31 0 31 +[ 268435904 ] 31 0 31 +[ 268435905 ] 31 0 31 +[ 268435906 ] 31 0 31 +[ 268435907 ] 31 0 31 +[ 268435908 ] 31 0 31 +[ 268435909 ] 31 0 31 +[ 268435910 ] 31 0 31 +[ 268435911 ] 31 0 31 +[ 268435912 ] 31 0 31 +[ 268435913 ] 31 0 31 +[ 268435914 ] 31 0 31 +[ 268435915 ] 31 0 31 +[ 268435916 ] 31 0 31 +[ 268435917 ] 31 0 31 +[ 268435918 ] 31 0 31 +[ 268435919 ] 31 0 31 +[ 268435920 ] 31 0 31 +[ 268435921 ] 31 0 31 +[ 268435922 ] 31 0 31 +[ 268435923 ] 31 0 31 +[ 268435924 ] 31 0 31 +[ 268435925 ] 31 0 31 +[ 268435926 ] 31 0 31 +[ 268435927 ] 31 0 31 +[ 268435928 ] 31 0 31 +[ 268435929 ] 31 0 31 +[ 268435930 ] 31 0 31 +[ 268435931 ] 31 0 31 +[ 268435932 ] 31 0 31 +[ 268435933 ] 31 0 31 +[ 268435934 ] 31 0 31 +[ 268435935 ] 31 0 31 +[ 268435936 ] 31 0 31 +[ 268435937 ] 31 0 31 +[ 268435938 ] 31 0 31 +[ 268435939 ] 31 0 31 +[ 268435940 ] 31 0 31 +[ 268435941 ] 31 0 31 +[ 268435942 ] 31 0 31 +[ 268435943 ] 31 0 31 +[ 268435944 ] 31 0 31 +[ 268435945 ] 31 0 31 +[ 268435946 ] 31 0 31 +[ 268435947 ] 31 0 31 +[ 268435948 ] 31 0 31 +[ 268435949 ] 31 0 31 +[ 268435950 ] 31 0 31 +[ 268435951 ] 31 0 31 +[ 268435952 ] 31 0 31 +[ 268435953 ] 31 0 31 +[ 268435954 ] 31 0 31 +[ 268435955 ] 31 0 31 +[ 268435956 ] 31 0 31 +[ 268435957 ] 31 0 31 +[ 268435958 ] 31 0 31 +[ 268435959 ] 31 0 31 +[ 268435960 ] 31 0 31 +[ 268435961 ] 31 0 31 +[ 268435962 ] 31 0 31 +[ 268435963 ] 31 0 31 +[ 268435964 ] 31 0 31 +[ 268435965 ] 31 0 31 +[ 268435966 ] 31 0 31 +[ 268435967 ] 31 0 31 +[ 268435968 ] 31 0 31 +[ 268435969 ] 31 0 31 +[ 268435970 ] 31 0 31 +[ 268435971 ] 31 0 31 +[ 268435972 ] 31 0 31 +[ 268435973 ] 31 0 31 +[ 268435974 ] 31 0 31 +[ 268435975 ] 31 0 31 +[ 268435976 ] 31 0 31 +[ 268435977 ] 31 0 31 +[ 268435978 ] 31 0 31 +[ 268435979 ] 31 0 31 +[ 268435980 ] 31 0 31 +[ 268435981 ] 31 0 31 +[ 268435982 ] 31 0 31 +[ 268435983 ] 31 0 31 +[ 268435984 ] 31 0 31 +[ 268435985 ] 31 0 31 +[ 268435986 ] 31 0 31 +[ 268435987 ] 31 0 31 +[ 268435988 ] 31 0 31 +[ 268435989 ] 31 0 31 +[ 268435990 ] 31 0 31 +[ 268435991 ] 31 0 31 +[ 268435992 ] 31 0 31 +[ 268435993 ] 31 0 31 +[ 268435994 ] 31 0 31 +[ 268435995 ] 31 0 31 +[ 268435996 ] 31 0 31 +[ 268435997 ] 31 0 31 +[ 268435998 ] 31 0 31 +[ 268435999 ] 31 0 31 +[ 268436000 ] 31 0 31 +[ 268436001 ] 31 0 31 +[ 268436002 ] 31 0 31 +[ 268436003 ] 31 0 31 +[ 268436004 ] 31 0 31 +[ 268436005 ] 31 0 31 +[ 268436006 ] 31 0 31 +[ 268436007 ] 31 0 31 +[ 268436008 ] 31 0 31 +[ 268436009 ] 31 0 31 +[ 268436010 ] 31 0 31 +[ 268436011 ] 31 0 31 +[ 268436012 ] 31 0 31 +[ 268436013 ] 31 0 31 +[ 268436014 ] 31 0 31 +[ 268436015 ] 31 0 31 +[ 268436016 ] 31 0 31 +[ 268436017 ] 31 0 31 +[ 268436018 ] 31 0 31 +[ 268436019 ] 31 0 31 +[ 268436020 ] 31 0 31 +[ 268436021 ] 31 0 31 +[ 268436022 ] 31 0 31 +[ 268436023 ] 31 0 31 +[ 268436024 ] 31 0 31 +[ 268436025 ] 31 0 31 +[ 268436026 ] 31 0 31 +[ 268436027 ] 31 0 31 +[ 268436028 ] 31 0 31 +[ 268436029 ] 31 0 31 +[ 268436030 ] 31 0 31 +[ 268436031 ] 31 0 31 +[ 268436032 ] 31 0 31 +[ 268436033 ] 31 0 31 +[ 268436034 ] 31 0 31 +[ 268436035 ] 31 0 31 +[ 268436036 ] 31 0 31 +[ 268436037 ] 31 0 31 +[ 268436038 ] 31 0 31 +[ 268436039 ] 31 0 31 +[ 268436040 ] 31 0 31 +[ 268436041 ] 31 0 31 +[ 268436042 ] 31 0 31 +[ 268436043 ] 31 0 31 +[ 268436044 ] 31 0 31 +[ 268436045 ] 31 0 31 +[ 268436046 ] 31 0 31 +[ 268436047 ] 31 0 31 +[ 268436048 ] 31 0 31 +[ 268436049 ] 31 0 31 +[ 268436050 ] 31 0 31 +[ 268436051 ] 31 0 31 +[ 268436052 ] 31 0 31 +[ 268436053 ] 31 0 31 +[ 268436054 ] 31 0 31 +[ 268436055 ] 31 0 31 +[ 268436056 ] 31 0 31 +[ 268436057 ] 31 0 31 +[ 268436058 ] 31 0 31 +[ 268436059 ] 31 0 31 +[ 268436060 ] 31 0 31 +[ 268436061 ] 31 0 31 +[ 268436062 ] 31 0 31 +[ 268436063 ] 31 0 31 +[ 268436064 ] 31 0 31 +[ 268436065 ] 31 0 31 +[ 268436066 ] 31 0 31 +[ 268436067 ] 31 0 31 +[ 268436068 ] 31 0 31 +[ 268436069 ] 31 0 31 +[ 268436070 ] 31 0 31 +[ 268436071 ] 31 0 31 +[ 268436072 ] 31 0 31 +[ 268436073 ] 31 0 31 +[ 268436074 ] 31 0 31 +[ 268436075 ] 31 0 31 +[ 268436076 ] 31 0 31 +[ 268436077 ] 31 0 31 +[ 268436078 ] 31 0 31 +[ 268436079 ] 31 0 31 +[ 268436080 ] 31 0 31 +[ 268436081 ] 31 0 31 +[ 268436082 ] 31 0 31 +[ 268436083 ] 31 0 31 +[ 268436084 ] 31 0 31 +[ 268436085 ] 31 0 31 +[ 268436086 ] 31 0 31 +[ 268436087 ] 31 0 31 +[ 268436088 ] 31 0 31 +[ 268436089 ] 31 0 31 +[ 268436090 ] 31 0 31 +[ 268436091 ] 31 0 31 +[ 268436092 ] 31 0 31 +[ 268436093 ] 31 0 31 +[ 268436094 ] 31 0 31 +[ 268436095 ] 31 0 31 +[ 268436096 ] 31 0 31 +[ 268436097 ] 31 0 31 +[ 268436098 ] 31 0 31 +[ 268436099 ] 31 0 31 +[ 268436100 ] 31 0 31 +[ 268436101 ] 31 0 31 +[ 268436102 ] 31 0 31 +[ 268436103 ] 31 0 31 +[ 268436104 ] 31 0 31 +[ 268436105 ] 31 0 31 +[ 268436106 ] 31 0 31 +[ 268436107 ] 31 0 31 +[ 268436108 ] 31 0 31 +[ 268436109 ] 31 0 31 +[ 268436110 ] 31 0 31 +[ 268436111 ] 31 0 31 +[ 268436112 ] 31 0 31 +[ 268436113 ] 31 0 31 +[ 268436114 ] 31 0 31 +[ 268436115 ] 31 0 31 +[ 268436116 ] 31 0 31 +[ 268436117 ] 31 0 31 +[ 268436118 ] 31 0 31 +[ 268436119 ] 31 0 31 +[ 268436120 ] 31 0 31 +[ 268436121 ] 31 0 31 +[ 268436122 ] 31 0 31 +[ 268436123 ] 31 0 31 +[ 268436124 ] 31 0 31 +[ 268436125 ] 31 0 31 +[ 268436126 ] 31 0 31 +[ 268436127 ] 31 0 31 +[ 268436128 ] 31 0 31 +[ 268436129 ] 31 0 31 +[ 268436130 ] 31 0 31 +[ 268436131 ] 31 0 31 +[ 268436132 ] 31 0 31 +[ 268436133 ] 31 0 31 +[ 268436134 ] 31 0 31 +[ 268436135 ] 31 0 31 +[ 268436136 ] 31 0 31 +[ 268436137 ] 31 0 31 +[ 268436138 ] 31 0 31 +[ 268436139 ] 31 0 31 +[ 268436140 ] 31 0 31 +[ 268436141 ] 31 0 31 +[ 268436142 ] 31 0 31 +[ 268436143 ] 31 0 31 +[ 268436144 ] 31 0 31 +[ 268436145 ] 31 0 31 +[ 268436146 ] 31 0 31 +[ 268436147 ] 31 0 31 +[ 268436148 ] 31 0 31 +[ 268436149 ] 31 0 31 +[ 268436150 ] 31 0 31 +[ 268436151 ] 31 0 31 +[ 268436152 ] 31 0 31 +[ 268436153 ] 31 0 31 +[ 268436154 ] 31 0 31 +[ 268436155 ] 31 0 31 +[ 268436156 ] 31 0 31 +[ 268436157 ] 31 0 31 +[ 268436158 ] 31 0 31 +[ 268436159 ] 31 0 31 +[ 268436160 ] 31 0 31 +[ 268436161 ] 31 0 31 +[ 268436162 ] 31 0 31 +[ 268436163 ] 31 0 31 +[ 268436164 ] 31 0 31 +[ 268436165 ] 31 0 31 +[ 268436166 ] 31 0 31 +[ 268436167 ] 31 0 31 +[ 268436168 ] 31 0 31 +[ 268436169 ] 31 0 31 +[ 268436170 ] 31 0 31 +[ 268436171 ] 31 0 31 +[ 268436172 ] 31 0 31 +[ 268436173 ] 31 0 31 +[ 268436174 ] 31 0 31 +[ 268436175 ] 31 0 31 +[ 268436176 ] 31 0 31 +[ 268436177 ] 31 0 31 +[ 268436178 ] 31 0 31 +[ 268436179 ] 31 0 31 +[ 268436180 ] 31 0 31 +[ 268436181 ] 31 0 31 +[ 268436182 ] 31 0 31 +[ 268436183 ] 31 0 31 +[ 268436184 ] 31 0 31 +[ 268436185 ] 31 0 31 +[ 268436186 ] 31 0 31 +[ 268436187 ] 31 0 31 +[ 268436188 ] 31 0 31 +[ 268436189 ] 31 0 31 +[ 268436190 ] 31 0 31 +[ 268436191 ] 31 0 31 +[ 268436192 ] 31 0 31 +[ 268436193 ] 31 0 31 +[ 268436194 ] 31 0 31 +[ 268436195 ] 31 0 31 +[ 268436196 ] 31 0 31 +[ 268436197 ] 31 0 31 +[ 268436198 ] 31 0 31 +[ 268436199 ] 31 0 31 +[ 268436200 ] 31 0 31 +[ 268436201 ] 31 0 31 +[ 268436202 ] 31 0 31 +[ 268436203 ] 31 0 31 +[ 268436204 ] 31 0 31 +[ 268436205 ] 31 0 31 +[ 268436206 ] 31 0 31 +[ 268436207 ] 31 0 31 +[ 268436208 ] 31 0 31 +[ 268436209 ] 31 0 31 +[ 268436210 ] 31 0 31 +[ 268436211 ] 31 0 31 +[ 268436212 ] 31 0 31 +[ 268436213 ] 31 0 31 +[ 268436214 ] 31 0 31 +[ 268436215 ] 31 0 31 +[ 268436216 ] 31 0 31 +[ 268436217 ] 31 0 31 +[ 268436218 ] 31 0 31 +[ 268436219 ] 31 0 31 +[ 268436220 ] 31 0 31 +[ 268436221 ] 31 0 31 +[ 268436222 ] 31 0 31 +[ 268436223 ] 31 0 31 +[ 268436224 ] 31 0 31 +[ 268436225 ] 31 0 31 +[ 268436226 ] 31 0 31 +[ 268436227 ] 31 0 31 +[ 268436228 ] 31 0 31 +[ 268436229 ] 31 0 31 +[ 268436230 ] 31 0 31 +[ 268436231 ] 31 0 31 +[ 268436232 ] 31 0 31 +[ 268436233 ] 31 0 31 +[ 268436234 ] 31 0 31 +[ 268436235 ] 31 0 31 +[ 268436236 ] 31 0 31 +[ 268436237 ] 31 0 31 +[ 268436238 ] 31 0 31 +[ 268436239 ] 31 0 31 +[ 268436240 ] 31 0 31 +[ 268436241 ] 31 0 31 +[ 268436242 ] 31 0 31 +[ 268436243 ] 31 0 31 +[ 268436244 ] 31 0 31 +[ 268436245 ] 31 0 31 +[ 268436246 ] 31 0 31 +[ 268436247 ] 31 0 31 +[ 268436248 ] 31 0 31 +[ 268436249 ] 31 0 31 +[ 268436250 ] 31 0 31 +[ 268436251 ] 31 0 31 +[ 268436252 ] 31 0 31 +[ 268436253 ] 31 0 31 +[ 268436254 ] 31 0 31 +[ 268436255 ] 31 0 31 +[ 268436256 ] 31 0 31 +[ 268436257 ] 31 0 31 +[ 268436258 ] 31 0 31 +[ 268436259 ] 31 0 31 +[ 268436260 ] 31 0 31 +[ 268436261 ] 31 0 31 +[ 268436262 ] 31 0 31 +[ 268436263 ] 31 0 31 +[ 268436264 ] 31 0 31 +[ 268436265 ] 31 0 31 +[ 268436266 ] 31 0 31 +[ 268436267 ] 31 0 31 +[ 268436268 ] 31 0 31 +[ 268436269 ] 31 0 31 +[ 268436270 ] 31 0 31 +[ 268436271 ] 31 0 31 +[ 268436272 ] 31 0 31 +[ 268436273 ] 31 0 31 +[ 268436274 ] 31 0 31 +[ 268436275 ] 31 0 31 +[ 268436276 ] 31 0 31 +[ 268436277 ] 31 0 31 +[ 268436278 ] 31 0 31 +[ 268436279 ] 31 0 31 +[ 268436280 ] 31 0 31 +[ 268436281 ] 31 0 31 +[ 268436282 ] 31 0 31 +[ 268436283 ] 31 0 31 +[ 268436284 ] 31 0 31 +[ 268436285 ] 31 0 31 +[ 268436286 ] 31 0 31 +[ 268436287 ] 31 0 31 +[ 268436288 ] 31 0 31 +[ 268436289 ] 31 0 31 +[ 268436290 ] 31 0 31 +[ 268436291 ] 31 0 31 +[ 268436292 ] 31 0 31 +[ 268436293 ] 31 0 31 +[ 268436294 ] 31 0 31 +[ 268436295 ] 31 0 31 +[ 268436296 ] 31 0 31 +[ 268436297 ] 31 0 31 +[ 268436298 ] 31 0 31 +[ 268436299 ] 31 0 31 +[ 268436300 ] 31 0 31 +[ 268436301 ] 31 0 31 +[ 268436302 ] 31 0 31 +[ 268436303 ] 31 0 31 +[ 268436304 ] 31 0 31 +[ 268436305 ] 31 0 31 +[ 268436306 ] 31 0 31 +[ 268436307 ] 31 0 31 +[ 268436308 ] 31 0 31 +[ 268436309 ] 31 0 31 +[ 268436310 ] 31 0 31 +[ 268436311 ] 31 0 31 +[ 268436312 ] 31 0 31 +[ 268436313 ] 31 0 31 +[ 268436314 ] 31 0 31 +[ 268436315 ] 31 0 31 +[ 268436316 ] 31 0 31 +[ 268436317 ] 31 0 31 +[ 268436318 ] 31 0 31 +[ 268436319 ] 31 0 31 +[ 268436320 ] 31 0 31 +[ 268436321 ] 31 0 31 +[ 268436322 ] 31 0 31 +[ 268436323 ] 31 0 31 +[ 268436324 ] 31 0 31 +[ 268436325 ] 31 0 31 +[ 268436326 ] 31 0 31 +[ 268436327 ] 31 0 31 +[ 268436328 ] 31 0 31 +[ 268436329 ] 31 0 31 +[ 268436330 ] 31 0 31 +[ 268436331 ] 31 0 31 +[ 268436332 ] 31 0 31 +[ 268436333 ] 31 0 31 +[ 268436334 ] 31 0 31 +[ 268436335 ] 31 0 31 +[ 268436336 ] 31 0 31 +[ 268436337 ] 31 0 31 +[ 268436338 ] 31 0 31 +[ 268436339 ] 31 0 31 +[ 268436340 ] 31 0 31 +[ 268436341 ] 31 0 31 +[ 268436342 ] 31 0 31 +[ 268436343 ] 31 0 31 +[ 268436344 ] 31 0 31 +[ 268436345 ] 31 0 31 +[ 268436346 ] 31 0 31 +[ 268436347 ] 31 0 31 +[ 268436348 ] 31 0 31 +[ 268436349 ] 31 0 31 +[ 268436350 ] 31 0 31 +[ 268436351 ] 31 0 31 +[ 268436352 ] 31 0 31 +[ 268436353 ] 31 0 31 +[ 268436354 ] 31 0 31 +[ 268436355 ] 31 0 31 +[ 268436356 ] 31 0 31 +[ 268436357 ] 31 0 31 +[ 268436358 ] 31 0 31 +[ 268436359 ] 31 0 31 +[ 268436360 ] 31 0 31 +[ 268436361 ] 31 0 31 +[ 268436362 ] 31 0 31 +[ 268436363 ] 31 0 31 +[ 268436364 ] 31 0 31 +[ 268436365 ] 31 0 31 +[ 268436366 ] 31 0 31 +[ 268436367 ] 31 0 31 +[ 268436368 ] 31 0 31 +[ 268436369 ] 31 0 31 +[ 268436370 ] 31 0 31 +[ 268436371 ] 31 0 31 +[ 268436372 ] 31 0 31 +[ 268436373 ] 31 0 31 +[ 268436374 ] 31 0 31 +[ 268436375 ] 31 0 31 +[ 268436376 ] 31 0 31 +[ 268436377 ] 31 0 31 +[ 268436378 ] 31 0 31 +[ 268436379 ] 31 0 31 +[ 268436380 ] 31 0 31 +[ 268436381 ] 31 0 31 +[ 268436382 ] 31 0 31 +[ 268436383 ] 31 0 31 +[ 268436384 ] 31 0 31 +[ 268436385 ] 31 0 31 +[ 268436386 ] 31 0 31 +[ 268436387 ] 31 0 31 +[ 268436388 ] 31 0 31 +[ 268436389 ] 31 0 31 +[ 268436390 ] 31 0 31 +[ 268436391 ] 31 0 31 +[ 268436392 ] 31 0 31 +[ 268436393 ] 31 0 31 +[ 268436394 ] 31 0 31 +[ 268436395 ] 31 0 31 +[ 268436396 ] 31 0 31 +[ 268436397 ] 31 0 31 +[ 268436398 ] 31 0 31 +[ 268436399 ] 31 0 31 +[ 268436400 ] 31 0 31 +[ 268436401 ] 31 0 31 +[ 268436402 ] 31 0 31 +[ 268436403 ] 31 0 31 +[ 268436404 ] 31 0 31 +[ 268436405 ] 31 0 31 +[ 268436406 ] 31 0 31 +[ 268436407 ] 31 0 31 +[ 268436408 ] 31 0 31 +[ 268436409 ] 31 0 31 +[ 268436410 ] 31 0 31 +[ 268436411 ] 31 0 31 +[ 268436412 ] 31 0 31 +[ 268436413 ] 31 0 31 +[ 268436414 ] 31 0 31 +[ 268436415 ] 31 0 31 +[ 268436416 ] 31 0 31 +[ 268436417 ] 31 0 31 +[ 268436418 ] 31 0 31 +[ 268436419 ] 31 0 31 +[ 268436420 ] 31 0 31 +[ 268436421 ] 31 0 31 +[ 268436422 ] 31 0 31 +[ 268436423 ] 31 0 31 +[ 268436424 ] 31 0 31 +[ 268436425 ] 31 0 31 +[ 268436426 ] 31 0 31 +[ 268436427 ] 31 0 31 +[ 268436428 ] 31 0 31 +[ 268436429 ] 31 0 31 +[ 268436430 ] 31 0 31 +[ 268436431 ] 31 0 31 +[ 268436432 ] 31 0 31 +[ 268436433 ] 31 0 31 +[ 268436434 ] 31 0 31 +[ 268436435 ] 31 0 31 +[ 268436436 ] 31 0 31 +[ 268436437 ] 31 0 31 +[ 268436438 ] 31 0 31 +[ 268436439 ] 31 0 31 +[ 268436440 ] 31 0 31 +[ 268436441 ] 31 0 31 +[ 268436442 ] 31 0 31 +[ 268436443 ] 31 0 31 +[ 268436444 ] 31 0 31 +[ 268436445 ] 31 0 31 +[ 268436446 ] 31 0 31 +[ 268436447 ] 31 0 31 +[ 268436448 ] 31 0 31 +[ 268436449 ] 31 0 31 +[ 268436450 ] 31 0 31 +[ 268436451 ] 31 0 31 +[ 268436452 ] 31 0 31 +[ 268436453 ] 31 0 31 +[ 268436454 ] 31 0 31 +[ 268436455 ] 31 0 31 +[ 268436456 ] 31 0 31 +[ 268436457 ] 31 0 31 +[ 268436458 ] 31 0 31 +[ 268436459 ] 31 0 31 +[ 268436460 ] 31 0 31 +[ 268436461 ] 31 0 31 +[ 268436462 ] 31 0 31 +[ 268436463 ] 31 0 31 +[ 268436464 ] 31 0 31 +[ 268436465 ] 31 0 31 +[ 268436466 ] 31 0 31 +[ 268436467 ] 31 0 31 +[ 268436468 ] 31 0 31 +[ 268436469 ] 31 0 31 +[ 268436470 ] 31 0 31 +[ 268436471 ] 31 0 31 +[ 268436472 ] 31 0 31 +[ 268436473 ] 31 0 31 +[ 268436474 ] 31 0 31 +[ 268436475 ] 31 0 31 +[ 268436476 ] 31 0 31 +[ 268436477 ] 31 0 31 +[ 268436478 ] 31 0 31 +[ 268436479 ] 31 0 31 +1024 differences found +Group: </> and </> +0 differences found diff --git a/tools/testfiles/h5diff_11.txt b/tools/testfiles/h5diff_11.txt index 056e486..c1fa079 100644 --- a/tools/testfiles/h5diff_11.txt +++ b/tools/testfiles/h5diff_11.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5' ############################# Dataset: </g1/dset1> and </g1/dset1> 4 differences found diff --git a/tools/testfiles/h5diff_12.txt b/tools/testfiles/h5diff_12.txt index d4605b2..8527642 100644 --- a/tools/testfiles/h5diff_12.txt +++ b/tools/testfiles/h5diff_12.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 g1/dset1 g1/dset2' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2' ############################# Dataset: </g1/dset1> and </g1/dset2> 4 differences found diff --git a/tools/testfiles/h5diff_13.txt b/tools/testfiles/h5diff_13.txt index 53f44c1..2c269e7 100644 --- a/tools/testfiles/h5diff_13.txt +++ b/tools/testfiles/h5diff_13.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -r' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -r' ############################# Dataset: </g1/dset1> and </g1/dset1> position dset1 dset1 difference diff --git a/tools/testfiles/h5diff_14.txt b/tools/testfiles/h5diff_14.txt index 15e4dee..98a4c81 100644 --- a/tools/testfiles/h5diff_14.txt +++ b/tools/testfiles/h5diff_14.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -r g1/dset1 g1/dset2' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -r g1/dset1 g1/dset2' ############################# Dataset: </g1/dset1> and </g1/dset2> position dset1 dset2 difference diff --git a/tools/testfiles/h5diff_15.txt b/tools/testfiles/h5diff_15.txt index 47789c4..7f47408 100644 --- a/tools/testfiles/h5diff_15.txt +++ b/tools/testfiles/h5diff_15.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -r -d 5 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -r -d 5 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> position dset3 dset4 difference diff --git a/tools/testfiles/h5diff_16.txt b/tools/testfiles/h5diff_16.txt index 5bff6fb..7e1ed34 100644 --- a/tools/testfiles/h5diff_16.txt +++ b/tools/testfiles/h5diff_16.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -r -p 0.05 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -r -p 0.05 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> position dset3 dset4 difference relative diff --git a/tools/testfiles/h5diff_17.txt b/tools/testfiles/h5diff_17.txt index 5445e97..ada1c0a 100644 --- a/tools/testfiles/h5diff_17.txt +++ b/tools/testfiles/h5diff_17.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -v' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -v' ############################# file1 file2 diff --git a/tools/testfiles/h5diff_18.txt b/tools/testfiles/h5diff_18.txt index 6e914e4..a37b889 100644 --- a/tools/testfiles/h5diff_18.txt +++ b/tools/testfiles/h5diff_18.txt @@ -1,3 +1,3 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -q' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -q' ############################# diff --git a/tools/testfiles/h5diff_191.txt b/tools/testfiles/h5diff_191.txt index cc349dc..25b298e 100644 --- a/tools/testfiles/h5diff_191.txt +++ b/tools/testfiles/h5diff_191.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file1.h5 -v -p 0.02 g1/dset5 g1/dset6' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset5 g1/dset6' ############################# Dataset: </g1/dset5> and </g1/dset6> position dset5 dset6 difference relative diff --git a/tools/testfiles/h5diff_192.txt b/tools/testfiles/h5diff_192.txt index 9e44bd0..5108d1b 100644 --- a/tools/testfiles/h5diff_192.txt +++ b/tools/testfiles/h5diff_192.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file1.h5 -v -p 0.02 g1/dset7 g1/dset8' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset7 g1/dset8' ############################# Dataset: </g1/dset7> and </g1/dset8> position dset7 dset8 difference relative diff --git a/tools/testfiles/h5diff_20.txt b/tools/testfiles/h5diff_20.txt index fbc5774..e4c1676 100644 --- a/tools/testfiles/h5diff_20.txt +++ b/tools/testfiles/h5diff_20.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v dset g1' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v dset g1' ############################# Comparison not possible: </dset> is of type H5G_DATASET and </g1> is of type H5G_GROUP -------------------------------- diff --git a/tools/testfiles/h5diff_21.txt b/tools/testfiles/h5diff_21.txt index a6bb3c8..0a41f0e 100644 --- a/tools/testfiles/h5diff_21.txt +++ b/tools/testfiles/h5diff_21.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v dset l1' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v dset l1' ############################# Comparison not possible: </dset> is of type H5G_DATASET and </l1> is of type H5G_LINK -------------------------------- diff --git a/tools/testfiles/h5diff_22.txt b/tools/testfiles/h5diff_22.txt index 3fea287..a585ed2 100644 --- a/tools/testfiles/h5diff_22.txt +++ b/tools/testfiles/h5diff_22.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v dset t1' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v dset t1' ############################# Comparison not possible: </dset> is of type H5G_DATASET and </t1> is of type H5G_TYPE -------------------------------- diff --git a/tools/testfiles/h5diff_23.txt b/tools/testfiles/h5diff_23.txt index 684b8fd..be9b688 100644 --- a/tools/testfiles/h5diff_23.txt +++ b/tools/testfiles/h5diff_23.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v g1 g1' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v g1 g1' ############################# Group: </g1> and </g1> 0 differences found diff --git a/tools/testfiles/h5diff_24.txt b/tools/testfiles/h5diff_24.txt index 228d2a0..9cb2d4d 100644 --- a/tools/testfiles/h5diff_24.txt +++ b/tools/testfiles/h5diff_24.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v t1 t1' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v t1 t1' ############################# Datatype: </t1> and </t1> 0 differences found diff --git a/tools/testfiles/h5diff_25.txt b/tools/testfiles/h5diff_25.txt index a2e31a3..9320620 100644 --- a/tools/testfiles/h5diff_25.txt +++ b/tools/testfiles/h5diff_25.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v l1 l1' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v l1 l1' ############################# Soft Link: </l1> and </l1> 0 differences found diff --git a/tools/testfiles/h5diff_26.txt b/tools/testfiles/h5diff_26.txt index 318f057..43a5557 100644 --- a/tools/testfiles/h5diff_26.txt +++ b/tools/testfiles/h5diff_26.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v g1 g2' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v g1 g2' ############################# Group: </g1> and </g2> 1 differences found diff --git a/tools/testfiles/h5diff_27.txt b/tools/testfiles/h5diff_27.txt index 8243396..ff9e9f2 100644 --- a/tools/testfiles/h5diff_27.txt +++ b/tools/testfiles/h5diff_27.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v t1 t2' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v t1 t2' ############################# Datatype: </t1> and </t2> 1 differences found diff --git a/tools/testfiles/h5diff_28.txt b/tools/testfiles/h5diff_28.txt index e662b52..da426d3 100644 --- a/tools/testfiles/h5diff_28.txt +++ b/tools/testfiles/h5diff_28.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file3.h5 file3.h5 -v l1 l2' +Expected output for 'h5diff h5diff_types.h5 h5diff_types.h5 -v l1 l2' ############################# Soft Link: </l1> and </l2> 1 differences found diff --git a/tools/testfiles/h5diff_50.txt b/tools/testfiles/h5diff_50.txt index 045f795..ccbffbe 100644 --- a/tools/testfiles/h5diff_50.txt +++ b/tools/testfiles/h5diff_50.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset0a dset0b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset0a dset0b' ############################# Dataset: </dset0a> and </dset0b> warning: different storage datatype diff --git a/tools/testfiles/h5diff_51.txt b/tools/testfiles/h5diff_51.txt index d63f7da..91a125f 100644 --- a/tools/testfiles/h5diff_51.txt +++ b/tools/testfiles/h5diff_51.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset1a dset1b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset1a dset1b' ############################# Dataset: </dset1a> and </dset1b> position dset1a dset1b difference diff --git a/tools/testfiles/h5diff_52.txt b/tools/testfiles/h5diff_52.txt index 2742164..490b407 100644 --- a/tools/testfiles/h5diff_52.txt +++ b/tools/testfiles/h5diff_52.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset2a dset2b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset2a dset2b' ############################# Dataset: </dset2a> and </dset2b> position dset2a dset2b difference diff --git a/tools/testfiles/h5diff_53.txt b/tools/testfiles/h5diff_53.txt index 814ae9a..454c35c 100644 --- a/tools/testfiles/h5diff_53.txt +++ b/tools/testfiles/h5diff_53.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset3a dset4b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset3a dset4b' ############################# Dataset: </dset3a> and </dset4b> position dset3a dset4b difference diff --git a/tools/testfiles/h5diff_54.txt b/tools/testfiles/h5diff_54.txt index 65074cf..1f1a375 100644 --- a/tools/testfiles/h5diff_54.txt +++ b/tools/testfiles/h5diff_54.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset4a dset4b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset4a dset4b' ############################# Dataset: </dset4a> and </dset4b> position dset4a dset4b difference diff --git a/tools/testfiles/h5diff_55.txt b/tools/testfiles/h5diff_55.txt index ba97356..dd9b2e2 100644 --- a/tools/testfiles/h5diff_55.txt +++ b/tools/testfiles/h5diff_55.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset5a dset5b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset5a dset5b' ############################# Dataset: </dset5a> and </dset5b> position dset5a dset5b difference diff --git a/tools/testfiles/h5diff_56.txt b/tools/testfiles/h5diff_56.txt index 1a00da1..9834418 100644 --- a/tools/testfiles/h5diff_56.txt +++ b/tools/testfiles/h5diff_56.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset6a dset6b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset6a dset6b' ############################# Dataset: </dset6a> and </dset6b> position dset6a dset6b difference diff --git a/tools/testfiles/h5diff_57.txt b/tools/testfiles/h5diff_57.txt index 0fd7843..6b67914 100644 --- a/tools/testfiles/h5diff_57.txt +++ b/tools/testfiles/h5diff_57.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file4.h5 file4.h5 -v dset7a dset7b' +Expected output for 'h5diff h5diff_dtypes.h5 h5diff_dtypes.h5 -v dset7a dset7b' ############################# Dataset: </dset7a> and </dset7b> warning: different storage datatype diff --git a/tools/testfiles/h5diff_58.txt b/tools/testfiles/h5diff_58.txt index 2ef832a..0e42013 100644 --- a/tools/testfiles/h5diff_58.txt +++ b/tools/testfiles/h5diff_58.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file7.h5 file8.h5 -v refreg' +Expected output for 'h5diff h5diff_dset1.h5 h5diff_dset2.h5 -v refreg' ############################# Dataset: </refreg> and </refreg> -Referenced dataset 5888 5888 +Referenced dataset 5904 5904 ------------------------------------------------------------ Region blocks block #0 (2,2)-(7,7) (0,0)-(2,2) diff --git a/tools/testfiles/h5diff_600.txt b/tools/testfiles/h5diff_600.txt index 709ef79..dd8b0a7 100644 --- a/tools/testfiles/h5diff_600.txt +++ b/tools/testfiles/h5diff_600.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5' +Expected output for 'h5diff h5diff_basic1.h5' ############################# Number of arguments is only 2 -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_601.txt b/tools/testfiles/h5diff_601.txt index 5054cce..fb24f59 100644 --- a/tools/testfiles/h5diff_601.txt +++ b/tools/testfiles/h5diff_601.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -x' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -x' ############################# -x is an invalid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_602.txt b/tools/testfiles/h5diff_602.txt index 372b72f..fc41985 100644 --- a/tools/testfiles/h5diff_602.txt +++ b/tools/testfiles/h5diff_602.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d g1/dset3 g1/dset4' ############################# <-d g1/dset3> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_603.txt b/tools/testfiles/h5diff_603.txt index 17d2ee7..a271c90 100644 --- a/tools/testfiles/h5diff_603.txt +++ b/tools/testfiles/h5diff_603.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d -4 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d -4 g1/dset3 g1/dset4' ############################# Not a valid -d option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_604.txt b/tools/testfiles/h5diff_604.txt index 403ea84..9962a8e 100644 --- a/tools/testfiles/h5diff_604.txt +++ b/tools/testfiles/h5diff_604.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d 0 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d 0 g1/dset3 g1/dset4' ############################# <-d 0> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_605.txt b/tools/testfiles/h5diff_605.txt index 6f6965a..d59a88b 100644 --- a/tools/testfiles/h5diff_605.txt +++ b/tools/testfiles/h5diff_605.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d u g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d u g1/dset3 g1/dset4' ############################# <-d u> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_606.txt b/tools/testfiles/h5diff_606.txt index d4497d5..aa5a967 100644 --- a/tools/testfiles/h5diff_606.txt +++ b/tools/testfiles/h5diff_606.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d 0x1 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d 0x1 g1/dset3 g1/dset4' ############################# <-d 0x1> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_607.txt b/tools/testfiles/h5diff_607.txt index fa296f7..13c604c 100644 --- a/tools/testfiles/h5diff_607.txt +++ b/tools/testfiles/h5diff_607.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d 1 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 6 differences found diff --git a/tools/testfiles/h5diff_608.txt b/tools/testfiles/h5diff_608.txt index 073322f..bbcbe28 100644 --- a/tools/testfiles/h5diff_608.txt +++ b/tools/testfiles/h5diff_608.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d 1 -d 2 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d 1 -d 2 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 6 differences found diff --git a/tools/testfiles/h5diff_609.txt b/tools/testfiles/h5diff_609.txt index 279122f..a0ccdd5 100644 --- a/tools/testfiles/h5diff_609.txt +++ b/tools/testfiles/h5diff_609.txt @@ -1,3 +1,3 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d 200 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d 200 g1/dset3 g1/dset4' ############################# diff --git a/tools/testfiles/h5diff_610.txt b/tools/testfiles/h5diff_610.txt index fa296f7..13c604c 100644 --- a/tools/testfiles/h5diff_610.txt +++ b/tools/testfiles/h5diff_610.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -d 1 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 6 differences found diff --git a/tools/testfiles/h5diff_611.txt b/tools/testfiles/h5diff_611.txt index 5d9710f..e52dadb 100644 --- a/tools/testfiles/h5diff_611.txt +++ b/tools/testfiles/h5diff_611.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -r -p g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -r -p g1/dset3 g1/dset4' ############################# <-p g1/dset3> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_612.txt b/tools/testfiles/h5diff_612.txt index 21fc94e..e08f365 100644 --- a/tools/testfiles/h5diff_612.txt +++ b/tools/testfiles/h5diff_612.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p -4 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p -4 g1/dset3 g1/dset4' ############################# Not a valid -p option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_613.txt b/tools/testfiles/h5diff_613.txt index 7e6a228..1aaa7a3 100644 --- a/tools/testfiles/h5diff_613.txt +++ b/tools/testfiles/h5diff_613.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p 0 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p 0 g1/dset3 g1/dset4' ############################# <-p 0> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_614.txt b/tools/testfiles/h5diff_614.txt index 1be05ff..67198cd 100644 --- a/tools/testfiles/h5diff_614.txt +++ b/tools/testfiles/h5diff_614.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p u g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p u g1/dset3 g1/dset4' ############################# <-p u> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_615.txt b/tools/testfiles/h5diff_615.txt index 9e85b76..f36420b 100644 --- a/tools/testfiles/h5diff_615.txt +++ b/tools/testfiles/h5diff_615.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p 0x1 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p 0x1 g1/dset3 g1/dset4' ############################# <-p 0x1> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_616.txt b/tools/testfiles/h5diff_616.txt index 0f71910..ce9ac47 100644 --- a/tools/testfiles/h5diff_616.txt +++ b/tools/testfiles/h5diff_616.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p 0.21 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p 0.21 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 2 differences found diff --git a/tools/testfiles/h5diff_617.txt b/tools/testfiles/h5diff_617.txt index ef74c72..016450a 100644 --- a/tools/testfiles/h5diff_617.txt +++ b/tools/testfiles/h5diff_617.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p 0.21 -p 0.22 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p 0.21 -p 0.22 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 2 differences found diff --git a/tools/testfiles/h5diff_618.txt b/tools/testfiles/h5diff_618.txt index 78d3ca2..a847a51 100644 --- a/tools/testfiles/h5diff_618.txt +++ b/tools/testfiles/h5diff_618.txt @@ -1,3 +1,3 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p 2 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p 2 g1/dset3 g1/dset4' ############################# diff --git a/tools/testfiles/h5diff_619.txt b/tools/testfiles/h5diff_619.txt index 18d1efb..f4de362 100644 --- a/tools/testfiles/h5diff_619.txt +++ b/tools/testfiles/h5diff_619.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p 0.005 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -p 0.005 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 6 differences found diff --git a/tools/testfiles/h5diff_620.txt b/tools/testfiles/h5diff_620.txt index a470c6c..4588139 100644 --- a/tools/testfiles/h5diff_620.txt +++ b/tools/testfiles/h5diff_620.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n g1/dset3 g1/dset4' ############################# <-n g1/dset3> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_621.txt b/tools/testfiles/h5diff_621.txt index e4c0e05..9e41bac 100644 --- a/tools/testfiles/h5diff_621.txt +++ b/tools/testfiles/h5diff_621.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n -4 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n -4 g1/dset3 g1/dset4' ############################# Not a valid -n option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_622.txt b/tools/testfiles/h5diff_622.txt index 0f6c12d..9e02352 100644 --- a/tools/testfiles/h5diff_622.txt +++ b/tools/testfiles/h5diff_622.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n 0 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n 0 g1/dset3 g1/dset4' ############################# <-n 0> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_623.txt b/tools/testfiles/h5diff_623.txt index ea7b892..2a82cf5 100644 --- a/tools/testfiles/h5diff_623.txt +++ b/tools/testfiles/h5diff_623.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n u g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n u g1/dset3 g1/dset4' ############################# <-n u> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_624.txt b/tools/testfiles/h5diff_624.txt index f23c33c..d6b3fd2 100644 --- a/tools/testfiles/h5diff_624.txt +++ b/tools/testfiles/h5diff_624.txt @@ -1,8 +1,8 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n 0x1 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n 0x1 g1/dset3 g1/dset4' ############################# <-n 0x1> is not a valid option -Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] +usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file diff --git a/tools/testfiles/h5diff_625.txt b/tools/testfiles/h5diff_625.txt index 74477c8..bf5bc08 100644 --- a/tools/testfiles/h5diff_625.txt +++ b/tools/testfiles/h5diff_625.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n 2 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n 2 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 2 differences found diff --git a/tools/testfiles/h5diff_626.txt b/tools/testfiles/h5diff_626.txt index 85eb7dc..19acaba 100644 --- a/tools/testfiles/h5diff_626.txt +++ b/tools/testfiles/h5diff_626.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n 2 -n 3 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n 2 -n 3 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 3 differences found diff --git a/tools/testfiles/h5diff_627.txt b/tools/testfiles/h5diff_627.txt index 999bbc3..00a686b 100644 --- a/tools/testfiles/h5diff_627.txt +++ b/tools/testfiles/h5diff_627.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n 200 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n 200 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 6 differences found diff --git a/tools/testfiles/h5diff_628.txt b/tools/testfiles/h5diff_628.txt index 604df64..643fcf4 100644 --- a/tools/testfiles/h5diff_628.txt +++ b/tools/testfiles/h5diff_628.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -n 1 g1/dset3 g1/dset4' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic2.h5 -n 1 g1/dset3 g1/dset4' ############################# Dataset: </g1/dset3> and </g1/dset4> 1 differences found diff --git a/tools/testfiles/h5diff_70.txt b/tools/testfiles/h5diff_70.txt index 534ff1a..5242f1d 100644 --- a/tools/testfiles/h5diff_70.txt +++ b/tools/testfiles/h5diff_70.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file5.h5 file6.h5 -v' +Expected output for 'h5diff h5diff_attr1.h5 h5diff_attr2.h5 -v' ############################# file1 file2 diff --git a/tools/testfiles/h5diff_80.txt b/tools/testfiles/h5diff_80.txt index d856c73..9d87639 100644 --- a/tools/testfiles/h5diff_80.txt +++ b/tools/testfiles/h5diff_80.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file7.h5 file8.h5 -v' +Expected output for 'h5diff h5diff_dset1.h5 h5diff_dset2.h5 -v' ############################# file1 file2 @@ -715,7 +715,7 @@ position vlen3D vlen3D difference [ 3 2 1 ] 59 0 59 59 differences found Dataset: </refreg> and </refreg> -Referenced dataset 5888 5888 +Referenced dataset 5904 5904 ------------------------------------------------------------ Region blocks block #0 (2,2)-(7,7) (0,0)-(2,2) diff --git a/tools/testfiles/h5diff_90.txt b/tools/testfiles/h5diff_90.txt index 000a23d..9702df7 100644 --- a/tools/testfiles/h5diff_90.txt +++ b/tools/testfiles/h5diff_90.txt @@ -1,3 +1,3 @@ ############################# -Expected output for 'h5diff file1.h5 file1.h5' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5' ############################# diff --git a/tools/testfiles/file5.h5 b/tools/testfiles/h5diff_attr1.h5 Binary files differindex 252dbad..35dd598 100644 --- a/tools/testfiles/file5.h5 +++ b/tools/testfiles/h5diff_attr1.h5 diff --git a/tools/testfiles/file6.h5 b/tools/testfiles/h5diff_attr2.h5 Binary files differindex 2ba5158..42d1786 100644 --- a/tools/testfiles/file6.h5 +++ b/tools/testfiles/h5diff_attr2.h5 diff --git a/tools/testfiles/file1.h5 b/tools/testfiles/h5diff_basic1.h5 Binary files differindex 98d45fc..7282220 100644 --- a/tools/testfiles/file1.h5 +++ b/tools/testfiles/h5diff_basic1.h5 diff --git a/tools/testfiles/file2.h5 b/tools/testfiles/h5diff_basic2.h5 Binary files differindex 277abd7..8f65bfe 100644 --- a/tools/testfiles/file2.h5 +++ b/tools/testfiles/h5diff_basic2.h5 diff --git a/tools/testfiles/h5diff_dset1.h5 b/tools/testfiles/h5diff_dset1.h5 Binary files differnew file mode 100644 index 0000000..441dabd --- /dev/null +++ b/tools/testfiles/h5diff_dset1.h5 diff --git a/tools/testfiles/h5diff_dset2.h5 b/tools/testfiles/h5diff_dset2.h5 Binary files differnew file mode 100644 index 0000000..bc92333 --- /dev/null +++ b/tools/testfiles/h5diff_dset2.h5 diff --git a/tools/testfiles/h5diff_dtypes.h5 b/tools/testfiles/h5diff_dtypes.h5 Binary files differnew file mode 100644 index 0000000..fb4d993 --- /dev/null +++ b/tools/testfiles/h5diff_dtypes.h5 diff --git a/tools/testfiles/h5diff_hyper1.h5 b/tools/testfiles/h5diff_hyper1.h5 Binary files differnew file mode 100644 index 0000000..bfcb56a --- /dev/null +++ b/tools/testfiles/h5diff_hyper1.h5 diff --git a/tools/testfiles/h5diff_hyper2.h5 b/tools/testfiles/h5diff_hyper2.h5 Binary files differnew file mode 100644 index 0000000..ae76aa5 --- /dev/null +++ b/tools/testfiles/h5diff_hyper2.h5 diff --git a/tools/testfiles/file3.h5 b/tools/testfiles/h5diff_types.h5 Binary files differindex 9124568..af1427c 100644 --- a/tools/testfiles/file3.h5 +++ b/tools/testfiles/h5diff_types.h5 diff --git a/tools/testfiles/h5repack_info.txt b/tools/testfiles/info.h5repack index 216948d..216948d 100644 --- a/tools/testfiles/h5repack_info.txt +++ b/tools/testfiles/info.h5repack |