diff options
Diffstat (limited to 'tools')
33 files changed, 2299 insertions, 61 deletions
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c index 8fc7144..e696b1b 100644 --- a/tools/h5copy/h5copygentest.c +++ b/tools/h5copy/h5copygentest.c @@ -240,10 +240,10 @@ static void gent_named_vl(hid_t loc_id) /* allocate and initialize VL dataset to write */ buf[0].len = 1; - buf[0].p = malloc( 1 * sizeof(int)); + buf[0].p = HDmalloc( 1 * sizeof(int)); ((int *)buf[0].p)[0]=1; buf[1].len = 2; - buf[1].p = malloc( 2 * sizeof(int)); + buf[1].p = HDmalloc( 2 * sizeof(int)); ((int *)buf[1].p)[0]=2; ((int *)buf[1].p)[1]=3; @@ -286,16 +286,16 @@ static void gent_nested_vl(hid_t loc_id) /* allocate and initialize VL dataset to write */ buf[0].len = 1; - buf[0].p = malloc( 1 * sizeof(hvl_t)); + buf[0].p = HDmalloc( 1 * sizeof(hvl_t)); tvl = (hvl_t *)buf[0].p; - tvl->p = malloc( 1 * sizeof(int) ); + tvl->p = HDmalloc( 1 * sizeof(int) ); tvl->len = 1; ((int *)tvl->p)[0]=1; buf[1].len = 1; - buf[1].p = malloc( 1 * sizeof(hvl_t)); + buf[1].p = HDmalloc( 1 * sizeof(hvl_t)); tvl = (hvl_t *)buf[1].p; - tvl->p = malloc( 2 * sizeof(int) ); + tvl->p = HDmalloc( 2 * sizeof(int) ); tvl->len = 2; ((int *)tvl->p)[0]=2; ((int *)tvl->p)[1]=3; diff --git a/tools/h5copy/testh5copy.sh.in b/tools/h5copy/testh5copy.sh.in index bec3bfc..77c64c4 100644 --- a/tools/h5copy/testh5copy.sh.in +++ b/tools/h5copy/testh5copy.sh.in @@ -67,6 +67,8 @@ H5DIFF_BIN=`pwd`/../h5diff/$H5DIFF # The path of the h5diff tool binary H5LS=h5ls # The h5ls tool name H5LS_ARGS=-Svr # Arguments to the h5ls tool H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary + +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -121,6 +123,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a "SKIP" message SKIP() { @@ -578,6 +593,8 @@ COPY_REFERENCES COPY_EXT_LINKS TEST_MISC +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index cf46e74..59cab0d 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -174,7 +174,7 @@ void parse_command_line(int argc, options->exclude_path = 1; /* create linked list of excluding objects */ - if( (exclude_node = (struct exclude_path_list*) malloc(sizeof(struct exclude_path_list))) == NULL) + if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) { printf("Error: lack of memory!\n"); h5diff_exit(EXIT_FAILURE); diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 517f496..a31f423 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -4576,7 +4576,7 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a for(i=0; i<SDIM_DSET; i++) { wdata[i].i1 = i; - wdata[i].vl.p = malloc((i+1)*sizeof(cmpd2_t)); + wdata[i].vl.p = HDmalloc((i+1)*sizeof(cmpd2_t)); wdata[i].vl.len = i+1; for(j=0; j<(i+1); j++) { @@ -4701,7 +4701,7 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch for(j=0; j < SDIM_CMPD_ARRAY; j++) { wdata[i].cmpd2[j].i2 = j*10; - wdata[i].cmpd2[j].vl.p = malloc((j+1)*sizeof(cmpd3_t)); + wdata[i].cmpd2[j].vl.p = HDmalloc((j+1)*sizeof(cmpd3_t)); wdata[i].cmpd2[j].vl.len = j+1; for(k=0; k<(j+1); k++) { @@ -4845,7 +4845,7 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch { /* compound 1 data */ wdata[i].i1 = i; - wdata[i].vl.p = malloc((i+1)*sizeof(cmpd2_t)); + wdata[i].vl.p = HDmalloc((i+1)*sizeof(cmpd2_t)); wdata[i].vl.len = i+1; for(j=0; j<(i+1); j++) { @@ -5557,10 +5557,10 @@ void write_attr_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = malloc( 1 * sizeof(int)); + buf5[0].p = HDmalloc( 1 * sizeof(int)); ((int *)buf5[0].p)[0]=1; buf5[1].len = 2; - buf5[1].p = malloc( 2 * sizeof(int)); + buf5[1].p = HDmalloc( 2 * sizeof(int)); ((int *)buf5[1].p)[0]=2; ((int *)buf5[1].p)[1]=3; @@ -5844,7 +5844,7 @@ void write_attr_in(hid_t loc_id, n=0; for (i = 0; i < 3; i++) { for (j = 0; j < 2; j++) { - buf52[i][j].p = malloc((i + 1) * sizeof(int)); + buf52[i][j].p = HDmalloc((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; @@ -6260,7 +6260,7 @@ void write_attr_in(hid_t loc_id, for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 2; k++) { - buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); + buf53[i][j][k].p = HDmalloc((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; @@ -6591,10 +6591,10 @@ void write_dset_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = malloc( 1 * sizeof(int)); + buf5[0].p = HDmalloc( 1 * sizeof(int)); ((int *)buf5[0].p)[0]=1; buf5[1].len = 2; - buf5[1].p = malloc( 2 * sizeof(int)); + buf5[1].p = HDmalloc( 2 * sizeof(int)); ((int *)buf5[1].p)[0]=2; ((int *)buf5[1].p)[1]=3; @@ -6804,7 +6804,7 @@ void write_dset_in(hid_t loc_id, { for(j = 0; j < 2; j++) { - buf52[i][j].p = malloc((i + 1) * sizeof(int)); + buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); buf52[i][j].len = i + 1; for(l = 0; l < i + 1; l++) { @@ -7017,7 +7017,7 @@ void write_dset_in(hid_t loc_id, { for(k = 0; k < 2; k++) { - buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); + buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); buf53[i][j][k].len = i + 1; for(l = 0; l < i + 1; l++) { diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in index 3455287..549da49 100644 --- a/tools/h5diff/testh5diff.sh.in +++ b/tools/h5diff/testh5diff.sh.in @@ -38,6 +38,7 @@ EXIT_FAILURE=1 H5DIFF=h5diff # The tool name H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -336,6 +337,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Parse option # -p run ph5diff tests # -h print help page @@ -1096,6 +1110,9 @@ TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_ # # END # ############################################################################## +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake index c88495d..6edc9e4 100644 --- a/tools/h5dump/CMakeTests.cmake +++ b/tools/h5dump/CMakeTests.cmake @@ -57,6 +57,8 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintarray.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdints.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl @@ -202,6 +204,8 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintarray.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdints.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 @@ -809,6 +813,10 @@ tchunked.out.err tcmpdattrintsize.out tcmpdattrintsize.out.err + tcmpdintarray.out + tcmpdintarray.out.err + tcmpdints.out + tcmpdints.out.err tcmpdintsize.out tcmpdintsize.out.err tcomp-1.out @@ -1058,6 +1066,8 @@ # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) # test for compound signed/unsigned datasets + ADD_H5_TEST (tcmpdintarray 0 --enable-error-stack tcmpdintarray.h5) + ADD_H5_TEST (tcmpdints 0 --enable-error-stack tcmpdints.h5) ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5) # test for signed/unsigned scalar datasets ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 76426c2..f3a78fc 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -106,6 +106,8 @@ #define FILE73 "tscalarintsize.h5" #define FILE74 "tscalarattrintsize.h5" #define FILE75 "tscalarstring.h5" +#define FILE76 "tcmpdintarray.h5" +#define FILE77 "tcmpdints.h5" /*------------------------------------------------------------------------- * prototypes @@ -332,6 +334,30 @@ typedef struct s1_t { #define F73_YDIM64 64 #define F73_DUMMYDBL "DummyDBL" +/* "FILE76 and FILE77 */ +/* Name of dataset to create in datafile */ +#define F76_DATASETNAME "CompoundIntArray" +#define F76_LENGTH 4 +#define F76_RANK 1 +#define F76_ARRAY_RANK 1 +#define F76_DATASETU08 "DU08BITS" +#define F76_DATASETS08 "DS08BITS" +#define F76_DIM8 8 +#define F76_DATASETU16 "DU16BITS" +#define F76_DATASETS16 "DS16BITS" +#define F76_DIM16 16 +#define F76_DATASETU32 "DU32BITS" +#define F76_DATASETS32 "DS32BITS" +#define F76_DIM32 32 +#define F76_DATASETU64 "DU64BITS" +#define F76_DATASETS64 "DS64BITS" +#define F76_DIM64 64 +#define F76_DUMMYDBL "DummyDBL" +/* Name of dataset to create in datafile */ +#define F77_DATASETNAME1 "CompoundInts" +#define F77_DATASETNAME2 "CompoundRInts" +#define F77_LENGTH 64 + static void gent_group(void) { @@ -8665,6 +8691,479 @@ gent_string_scalars(void) H5Fclose(fid); } +static void gent_compound_int_array(void) { + hid_t fid, dataset, space; + hsize_t dims[1]; + uint8_t valu8bits; + uint16_t valu16bits; + uint32_t valu32bits; + uint64_t valu64bits; + int8_t val8bits; + int16_t val16bits; + int32_t val32bits; + int64_t val64bits; + hsize_t array_dim8[]={F76_DIM8}; /* Array dimensions */ + hsize_t array_dim16[]={F76_DIM16}; /* Array dimensions */ + hsize_t array_dim32[]={F76_DIM32}; /* Array dimensions */ + hsize_t array_dim64[]={F76_DIM64}; /* Array dimensions */ + hid_t arrayu8_tid; /* Array datatype handle */ + hid_t arrayu16_tid; /* Array datatype handle */ + hid_t arrayu32_tid; /* Array datatype handle */ + hid_t arrayu64_tid; /* Array datatype handle */ + hid_t array8_tid; /* Array datatype handle */ + hid_t array16_tid; /* Array datatype handle */ + hid_t array32_tid; /* Array datatype handle */ + hid_t array64_tid; /* Array datatype handle */ + hid_t arraydbl_tid; /* Array datatype handle */ + /* Structure and array for compound types */ + typedef struct Cmpd1Struct { + uint8_t dsetu8[F76_DIM8]; + uint16_t dsetu16[F76_DIM16]; + uint32_t dsetu32[F76_DIM32]; + uint64_t dsetu64[F76_DIM64]; + int8_t dset8[F76_DIM8]; + int16_t dset16[F76_DIM16]; + int32_t dset32[F76_DIM32]; + int64_t dset64[F76_DIM64]; + double dsetdbl[F76_DIM8]; + } Cmpd1Struct; + Cmpd1Struct Cmpd1[F76_LENGTH]; + + hid_t Cmpd1Structid; /* File datatype identifier */ + herr_t status; /* Error checking variable */ + hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */ + + int m, n, o; /* Array init loop vars */ + + /* Initialize the data in the arrays/datastructure */ + for (m = 0; m < F76_LENGTH; m++) { + + /* Array of 8 bits unsigned int */ + dims[0] = F76_DIM8; + + valu8bits = (uint8_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu8[n] = valu8bits; + valu8bits <<= 1; + } + + /* Array of 16 bits unsigned int */ + dims[0] = F76_DIM16; + + valu16bits = (uint16_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu16[n] = valu16bits; + valu16bits <<= 1; + } + + /* Array of 32 bits unsigned int */ + dims[0] = F76_DIM32; + + valu32bits = (uint32_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu32[n] = valu32bits; + valu32bits <<= 1; + } + + /* Array of 64 bits unsigned int */ + dims[0] = F76_DIM64; + + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu64[n] = valu64bits; + valu64bits <<= 1; + } + + /* Array of 8 bits signed int */ + dims[0] = F76_DIM8; + + val8bits = (int8_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset8[n] = val8bits; + val8bits <<= 1; + } + + /* Array of 16 bits signed int */ + dims[0] = F76_DIM16; + + val16bits = (int16_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset16[n] = val16bits; + val16bits <<= 1; + } + + /* Array of 32 bits signed int */ + dims[0] = F76_DIM32; + + val32bits = (int32_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset32[n] = val32bits; + val32bits <<= 1; + } + + /* Array of 64 bits signed int */ + dims[0] = F76_DIM64; + + val64bits = (int64_t) ~0L; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset64[n] = val64bits; + val64bits <<= 1; + } + + /* Double Dummy set for failure tests */ + dims[0] = F76_DIM8; + + for(n = 0; n < dims[0]; n++) + Cmpd1[m].dsetdbl[n] = 0.0001 + n; + } + + /* Create the array data type for the 8 bits signed int array */ + array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F76_ARRAY_RANK, array_dim8); + HDassert(array8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F76_ARRAY_RANK, array_dim16); + HDassert(array16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F76_ARRAY_RANK, array_dim32); + HDassert(array32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F76_ARRAY_RANK, array_dim64); + HDassert(array64_tid >= 0); + + /* Create the array data type for the 8 bits signed int array */ + arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F76_ARRAY_RANK, array_dim8); + HDassert(arrayu8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F76_ARRAY_RANK, array_dim16); + HDassert(arrayu16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F76_ARRAY_RANK, array_dim32); + HDassert(arrayu32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F76_ARRAY_RANK, array_dim64); + HDassert(arrayu64_tid >= 0); + + /* Create the array data type for the 32 bits double array */ + arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F76_ARRAY_RANK, array_dim8); + HDassert(arraydbl_tid >= 0); + + /* Create the dataspace */ + space = H5Screate_simple(F76_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the file */ + fid = H5Fcreate(FILE76, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid >= 0); + + /* Create the memory data type */ + Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); + HDassert(Cmpd1Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), arrayu8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), arrayu16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), arrayu32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), arrayu64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), array8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), array16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), array32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), array64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), arraydbl_tid); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F76_DATASETNAME, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Cmpd1Structid); + HDassert(status >= 0); + + status = H5Tclose(arrayu8_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu16_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu32_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu64_tid); + HDassert(status >= 0); + + status = H5Tclose(array8_tid); + HDassert(status >= 0); + + status = H5Tclose(array16_tid); + HDassert(status >= 0); + + status = H5Tclose(array32_tid); + HDassert(status >= 0); + + status = H5Tclose(array64_tid); + HDassert(status >= 0); + + status = H5Tclose(arraydbl_tid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Dclose(dataset); + HDassert(status >= 0); + + status = H5Fclose(fid); + HDassert(status >= 0); +} + +static void gent_compound_ints(void) { + hid_t fid, dataset, space; + hsize_t dims[1]; + uint8_t valu8bits = (uint8_t) ~0u; /* all 1s */ + uint16_t valu16bits = (uint16_t) ~0u; /* all 1s */ + uint32_t valu32bits = (uint32_t) ~0u; /* all 1s */ + uint64_t valu64bits = (uint64_t) ~0Lu; /* all 1s */ + int8_t val8bits = (int8_t) ~0; /* all 1s */ + int16_t val16bits = (int16_t) ~0; /* all 1s */ + int32_t val32bits = (int32_t) ~0; /* all 1s */ + int64_t val64bits = (int64_t) ~0L; /* all 1s */ + /* Structure and array for compound types */ + typedef struct Cmpd1Struct { + uint8_t dsetu8; + uint16_t dsetu16; + uint32_t dsetu32; + uint64_t dsetu64; + int8_t dset8; + int16_t dset16; + int32_t dset32; + int64_t dset64; + double dsetdbl; + } Cmpd1Struct; + Cmpd1Struct Cmpd1[F77_LENGTH]; + + typedef struct Cmpd2Struct { + uint64_t dsetu64; + uint32_t dsetu32; + uint16_t dsetu16; + uint8_t dsetu8; + int64_t dset64; + int32_t dset32; + int16_t dset16; + int8_t dset8; + double dsetdbl; + } Cmpd2Struct; + Cmpd2Struct Cmpd2[F77_LENGTH]; + + hid_t Cmpd1Structid; /* File datatype identifier */ + hid_t Cmpd2Structid; /* File datatype identifier */ + herr_t status; /* Error checking variable */ + hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */ + + int m; /* Array init loop vars */ + + /* Initialize the data in the arrays/datastructure */ + for (m = 0; m < F77_LENGTH; m++) { + + /* Array of 8 bits unsigned int */ + if((m % F76_DIM8) == 0) + valu8bits = (uint8_t) ~0u; /* all 1s */ + Cmpd1[m].dsetu8 = valu8bits; + Cmpd2[m].dsetu8 = valu8bits; + valu8bits <<= 1; + + /* Array of 16 bits unsigned int */ + if((m % F76_DIM16) == 0) + valu16bits = (uint16_t) ~0u; /* all 1s */ + Cmpd1[m].dsetu16 = valu16bits; + Cmpd2[m].dsetu16 = valu16bits; + valu16bits <<= 1; + + /* Array of 32 bits unsigned int */ + if((m % F76_DIM32) == 0) + valu32bits = (uint32_t) ~0u; /* all 1s */ + Cmpd1[m].dsetu32 = valu32bits; + Cmpd2[m].dsetu32 = valu32bits; + valu32bits <<= 1; + + /* Array of 64 bits unsigned int */ + if((m % F76_DIM64) == 0) + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + Cmpd1[m].dsetu64 = valu64bits; + Cmpd2[m].dsetu64 = valu64bits; + valu64bits <<= 1; + + /* Array of 8 bits signed int */ + if((m % F76_DIM8) == 0) + val8bits = (int8_t) ~0; /* all 1s */ + Cmpd1[m].dset8 = val8bits; + Cmpd2[m].dset8 = val8bits; + val8bits <<= 1; + + /* Array of 16 bits signed int */ + if((m % F76_DIM16) == 0) + val16bits = (int16_t) ~0; /* all 1s */ + Cmpd1[m].dset16 = val16bits; + Cmpd2[m].dset16 = val16bits; + val16bits <<= 1; + + /* Array of 32 bits signed int */ + if((m % F76_DIM32) == 0) + val32bits = (int32_t) ~0; /* all 1s */ + Cmpd1[m].dset32 = val32bits; + Cmpd2[m].dset32 = val32bits; + val32bits <<= 1; + + /* Array of 64 bits signed int */ + if((m % F76_DIM64) == 0) + val64bits = (int64_t) ~0L; /* all 1s */ + Cmpd1[m].dset64 = val64bits; + Cmpd2[m].dset64 = val64bits; + val64bits <<= 1; + + /* Double Dummy set for failure tests */ + Cmpd1[m].dsetdbl = 0.0001 + m; + Cmpd2[m].dsetdbl = 0.0001 + m; + } + + /* Create the dataspace */ + space = H5Screate_simple(F76_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the file */ + fid = H5Fcreate(FILE77, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid >= 0); + + /* Create the memory data type */ + Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); + HDassert(Cmpd1Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), H5T_NATIVE_UCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), H5T_NATIVE_USHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), H5T_NATIVE_UINT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), H5T_NATIVE_ULONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), H5T_NATIVE_SCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), H5T_NATIVE_SHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), H5T_NATIVE_INT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), H5T_NATIVE_LONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), H5T_NATIVE_DOUBLE); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F77_DATASETNAME1, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Cmpd1Structid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Dclose(dataset); + HDassert(status >= 0); + + /* Create the dataspace */ + space = H5Screate_simple(F76_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the memory data type */ + Cmpd2Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd2Struct)); + HDassert(Cmpd2Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Cmpd2Structid, F76_DATASETU64, HOFFSET(Cmpd2Struct, dsetu64), H5T_NATIVE_ULONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETU32, HOFFSET(Cmpd2Struct, dsetu32), H5T_NATIVE_UINT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETU16, HOFFSET(Cmpd2Struct, dsetu16), H5T_NATIVE_USHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETU08, HOFFSET(Cmpd2Struct, dsetu8), H5T_NATIVE_UCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS64, HOFFSET(Cmpd2Struct, dset64), H5T_NATIVE_LONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS32, HOFFSET(Cmpd2Struct, dset32), H5T_NATIVE_INT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS16, HOFFSET(Cmpd2Struct, dset16), H5T_NATIVE_SHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS08, HOFFSET(Cmpd2Struct, dset8), H5T_NATIVE_SCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DUMMYDBL, HOFFSET(Cmpd2Struct, dsetdbl), H5T_NATIVE_DOUBLE); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F77_DATASETNAME2, Cmpd2Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Cmpd2Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd2); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Cmpd2Structid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Dclose(dataset); + HDassert(status >= 0); + + status = H5Fclose(fid); + HDassert(status >= 0); +} + /*------------------------------------------------------------------------- * Function: main * @@ -8751,6 +9250,8 @@ int main(void) gent_intscalars(); gent_attr_intscalars(); gent_string_scalars(); + gent_compound_int_array(); + gent_compound_ints(); return 0; } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 1a0f189..dc52469 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -30,7 +30,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary H5IMPORT=../h5import/h5import # The h5import tool name H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary - +RM='rm -rf' CMP='cmp' DIFF='diff -c' CP='cp' @@ -396,6 +396,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # @@ -1258,6 +1271,8 @@ TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5 # test for -o -y for dataset with attributes TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR # Report test results and exit if test $nerrors -eq 0 ; then diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in index def687b..0f6503d 100644 --- a/tools/h5dump/testh5dumppbits.sh.in +++ b/tools/h5dump/testh5dumppbits.sh.in @@ -38,7 +38,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary H5IMPORT=../h5import/h5import # The h5import tool name H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary - +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -189,6 +189,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # @@ -576,6 +589,8 @@ TOOLTEST tpbitsLongLengthExceeded.ddl --enable-error-stack -d /DS32BITS -M 26,7 # Incomplete pair of packed bits request. TOOLTEST tpbitsIncomplete.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR # Report test results and exit if test $nerrors -eq 0 ; then diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in index 6e4efd1..4dad9cd 100644 --- a/tools/h5dump/testh5dumpxml.sh.in +++ b/tools/h5dump/testh5dumpxml.sh.in @@ -26,6 +26,7 @@ H5_LONE_COLON="@H5_LONE_COLON@" DUMPER=h5dump # The tool name DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -217,6 +218,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # @@ -372,6 +386,8 @@ TOOLTEST torderattr4.h5.xml --xml -H --sort_by=creation_order --sort_order=desce # tests for floating point user defined printf format TOOLTEST tfpformat.h5.xml -u -m %.7f tfpformat.h5 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake index cb76204..96cca87 100644 --- a/tools/h5import/CMakeTests.cmake +++ b/tools/h5import/CMakeTests.cmake @@ -105,7 +105,7 @@ IF (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile}) IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test}) + SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest) ENDIF (NOT "${last_test}" STREQUAL "") ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( @@ -118,6 +118,7 @@ ${testfile}.out ${testfile}.out.err ) + SET_TESTS_PROPERTIES (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest) ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile}) SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects) @@ -167,6 +168,7 @@ d${testfile}.dff d${testfile}.dff.err ) + SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest) IF ("${ARGN}" STREQUAL "BINARY") ADD_TEST ( @@ -407,10 +409,25 @@ SET (last_test "H5IMPORT-clear-objects") ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>) + ADD_TEST ( + NAME H5IMPORT-h5importtest-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + binfp64.bin + binin8.bin + binin8w.bin + binin16.bin + binin32.bin + binuin16.bin + binuin32.bin + ) IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test}) + SET_TESTS_PROPERTIES (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5IMPORT-clear-objects") + + ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>) + SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS H5IMPORT-h5importtest-clear-objects) # ----- TESTING "ASCII I32 rank 3 - Output BE " ; ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5) diff --git a/tools/h5import/Makefile.am b/tools/h5import/Makefile.am index 167dbc9..6d18e25 100644 --- a/tools/h5import/Makefile.am +++ b/tools/h5import/Makefile.am @@ -40,4 +40,7 @@ h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) # All programs depend on the main hdf5 library and the tools library LDADD=$(LIBH5TOOLS) $(LIBHDF5) +# Temporary files from h5importtest +CHECK_CLEANFILES+=*.bin + include $(top_srcdir)/config/conclude.am diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index bfb777a..94910af 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -428,7 +428,9 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. # *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog + +# Temporary files from h5importtest +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.bin # Include src and tools/lib directories INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib diff --git a/tools/h5import/h5importtestutil.sh.in b/tools/h5import/h5importtestutil.sh.in index fd21dc1..e50ddac 100644 --- a/tools/h5import/h5importtestutil.sh.in +++ b/tools/h5import/h5importtestutil.sh.in @@ -25,6 +25,7 @@ TESTNAME=h5import EXIT_SUCCESS=0 EXIT_FAILURE=1 +RM='rm -rf' CP='cp' DIRNAME='dirname' LS='ls' @@ -147,6 +148,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + TESTING() { SPACES=" " echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' @@ -350,6 +364,9 @@ else nerrors="` expr $nerrors + 1 `"; fi +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + # # Check errors result if test $nerrors -eq 0 ; then diff --git a/tools/h5jam/Makefile.am b/tools/h5jam/Makefile.am index c6ccebf..62a5ba7 100644 --- a/tools/h5jam/Makefile.am +++ b/tools/h5jam/Makefile.am @@ -39,7 +39,7 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) # Temporary files. *.h5 are generated by jamgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 +CHECK_CLEANFILES+=*.h5 testfiles/h5jam-*-sav testfiles/h5unjam-*-sav DISTCLEANFILES=testh5jam.sh include $(top_srcdir)/config/conclude.am diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 7256d6e..c16c300 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -445,7 +445,8 @@ TRACE = perl $(top_srcdir)/bin/trace # Temporary files. *.h5 are generated by jamgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 testfiles/h5jam-*-sav \ + testfiles/h5unjam-*-sav # Include src and tools/lib directories INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib diff --git a/tools/h5jam/getub.c b/tools/h5jam/getub.c index d84f7f2..3aff2b4 100644 --- a/tools/h5jam/getub.c +++ b/tools/h5jam/getub.c @@ -165,7 +165,7 @@ main (int argc, const char *argv[]) if (res < (long)size) { if (buf) - free (buf); + HDfree (buf); HDclose (fd); exit (EXIT_FAILURE); } @@ -173,7 +173,7 @@ main (int argc, const char *argv[]) HDwrite (1, buf, (unsigned)size); if (buf) - free (buf); + HDfree (buf); HDclose (fd); return (EXIT_SUCCESS); } diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in index 86edbee..36f0657 100644 --- a/tools/h5jam/testh5jam.sh.in +++ b/tools/h5jam/testh5jam.sh.in @@ -34,6 +34,7 @@ UNJAM=h5unjam # Tool to test JAM_BIN="$RUNSERIAL "`pwd` # The path of the jam binary UNJAM_BIN=`pwd` # The path of the jam binary +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' AWK='awk' @@ -122,6 +123,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # @@ -497,10 +511,10 @@ TOOLTEST_OUTPUT() { # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect - rm -f $actual $actual_err + rm -f $actual $actual_sav $actual_err $actual_err_sav elif $CMP $expect $actual; then echo " PASSED" - rm -f $actual $actual_err + rm -f $actual $actual_sav $actual_err $actual_err_sav else echo "*FAILED*" echo " Expected result differs from actual result" @@ -675,7 +689,8 @@ UNJAMTEST taj3.h5 --delete tac3.h5 CHECKFILE $TESTDIR/tall.h5 tac3.h5 CLEANUP tac3.h5 taj3.h5 - +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/h5ls/testh5ls.sh.in b/tools/h5ls/testh5ls.sh.in index 1e3acc8..68b317c 100644 --- a/tools/h5ls/testh5ls.sh.in +++ b/tools/h5ls/testh5ls.sh.in @@ -24,6 +24,7 @@ EXIT_FAILURE=1 H5LS=h5ls # The tool name H5LS_BIN=`pwd`/$H5LS # The path of the tool binary +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -191,6 +192,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". TESTING() { @@ -409,6 +423,8 @@ fi # test for file with datasets that use Fixed Array chunk indices echo "***skip testing tdset_idx.h5" #TOOLTEST tdset_idx.ls 0 -w80 -d tdset_idx.h5 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am index 663e501..eae296d 100644 --- a/tools/h5repack/Makefile.am +++ b/tools/h5repack/Makefile.am @@ -72,7 +72,7 @@ endif # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 *.bin +CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 DISTCLEANFILES=h5repack.sh h5repack_plugin.sh include $(top_srcdir)/config/conclude.am diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index fc37649..9f0e6f1 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -481,7 +481,8 @@ TRACE = perl $(top_srcdir)/bin/trace # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin \ + testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 # Include src, test, and tools/lib directories INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 583b6ef..045aebf 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -42,6 +42,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary H5DUMP=../h5dump/h5dump # The h5dump tool name H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary +RM='rm -rf' GREP='grep' CP='cp' DIRNAME='dirname' @@ -161,6 +162,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a $* message left justified in a field of 70 characters # MESSAGE() { @@ -1088,6 +1102,9 @@ TOOLTEST HDFFV-7840 h5diff_attr1.h5 TOOLTEST_META meta_short h5repack_layout.h5 -M 8192 TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS diff --git a/tools/h5repack/h5repack_plugin.sh.in b/tools/h5repack/h5repack_plugin.sh.in index a45d1fe..df4b374 100644 --- a/tools/h5repack/h5repack_plugin.sh.in +++ b/tools/h5repack/h5repack_plugin.sh.in @@ -35,7 +35,7 @@ TEST_NAME=ud_plugin FROM_DIR=`pwd`/.libs PLUGIN_LIB="$FROM_DIR/libdynlibadd.*" PLUGIN_LIBDIR=testdir3 -RM="rm -rf" +RM='rm -rf' GREP='grep' CP='cp' @@ -118,6 +118,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a $* message left justified in a field of 70 characters # MESSAGE() { @@ -233,6 +246,10 @@ else exit_code=$EXIT_SUCCESS fi +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + # Clean up temporary files/directories and leave $RM $PLUGIN_LIBDIR + exit $exit_code diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index cc4e063..4b6a00b 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -3382,7 +3382,7 @@ int make_big(hid_t loc_id) goto out; /* initialize buffer to 0 */ - buf=(signed char *) calloc( nelmts, size); + buf=(signed char *) HDcalloc( nelmts, size); if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL) < 0) goto out; @@ -3863,10 +3863,10 @@ int write_dset_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = malloc( 1 * sizeof(int)); + buf5[0].p = HDmalloc( 1 * sizeof(int)); ((int *)buf5[0].p)[0]=1; buf5[1].len = 2; - buf5[1].p = malloc( 2 * sizeof(int)); + buf5[1].p = HDmalloc( 2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -3925,7 +3925,7 @@ int write_dset_in(hid_t loc_id, /* allocate and initialize array data to write */ size = ( TEST_BUFSIZE / sizeof(double) + 1 ) * sizeof(double); - dbuf = (double*)malloc( size ); + dbuf = (double*)HDmalloc( size ); if (NULL == dbuf) { printf ("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", (int) size / 1000000 ); @@ -4099,7 +4099,7 @@ int write_dset_in(hid_t loc_id, { int l; - buf52[i][j].p = malloc((i + 1) * sizeof(int)); + buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for(l = 0; l < i + 1; l++) { @@ -4320,7 +4320,7 @@ int write_dset_in(hid_t loc_id, { int l; - buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); + buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for(l = 0; l < i + 1; l++) { @@ -4450,8 +4450,8 @@ int make_dset_reg_ref(hid_t loc_id) int retval = -1; /* return value */ /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1); - dwbuf = (int *)malloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1); + dwbuf = (int *)HDmalloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2); /* Create dataspace for datasets */ if ((sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL)) < 0) @@ -4791,10 +4791,10 @@ int write_attr_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = malloc( 1 * sizeof(int)); + buf5[0].p = HDmalloc( 1 * sizeof(int)); ((int *)buf5[0].p)[0]=1; buf5[1].len = 2; - buf5[1].p = malloc(2 * sizeof(int)); + buf5[1].p = HDmalloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -5111,7 +5111,7 @@ int write_attr_in(hid_t loc_id, for (j = 0; j < 2; j++) { int l; - buf52[i][j].p = malloc((i + 1) * sizeof(int)); + buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) if (make_diffs)((int *)buf52[i][j].p)[l] = 0; @@ -5577,7 +5577,7 @@ int write_attr_in(hid_t loc_id, for (k = 0; k < 2; k++) { int l; - buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); + buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)i + 1; for (l = 0; l < i + 1; l++) if (make_diffs) @@ -6803,11 +6803,11 @@ static herr_t make_complex_attr_references(hid_t loc_id) * prepare vlen data */ vlen_objref_data[0].len = LEN0_VLEN_OBJREF; - vlen_objref_data[0].p = malloc (vlen_objref_data[0].len * sizeof(hobj_ref_t)); + vlen_objref_data[0].p = HDmalloc (vlen_objref_data[0].len * sizeof(hobj_ref_t)); vlen_objref_data[1].len = LEN1_VLEN_OBJREF; - vlen_objref_data[1].p = malloc (vlen_objref_data[1].len * sizeof(hobj_ref_t)); + vlen_objref_data[1].p = HDmalloc (vlen_objref_data[1].len * sizeof(hobj_ref_t)); vlen_objref_data[2].len = LEN2_VLEN_OBJREF; - vlen_objref_data[2].p = malloc (vlen_objref_data[2].len * sizeof(hobj_ref_t)); + vlen_objref_data[2].p = HDmalloc (vlen_objref_data[2].len * sizeof(hobj_ref_t)); /* * create obj references @@ -6872,7 +6872,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) * prepare vlen data */ vlen_regref_data[0].len = LEN0_VLEN_REGREF; - vlen_regref_data[0].p = malloc (vlen_regref_data[0].len * sizeof(hdset_reg_ref_t)); + vlen_regref_data[0].p = HDmalloc (vlen_regref_data[0].len * sizeof(hdset_reg_ref_t)); /* * create region reference diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index a5d7eef..e9fa0fa 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -823,7 +823,7 @@ freespace_stats(hid_t fid, iter_t *iter) } /* end for */ if(sect_info) - free(sect_info); + HDfree(sect_info); return 0; } /* end freespace_stats() */ @@ -1756,9 +1756,9 @@ main(int argc, const char *argv[]) iter.free_hdr = finfo.free.meta_size; } /* end else */ - iter.num_small_groups = (unsigned long *)calloc((size_t)sgroups_threshold, sizeof(unsigned long)); - iter.num_small_attrs = (unsigned long *)calloc((size_t)(sattrs_threshold+1), sizeof(unsigned long)); - iter.small_dset_dims = (unsigned long *)calloc((size_t)sdsets_threshold, sizeof(unsigned long)); + iter.num_small_groups = (unsigned long *)HDcalloc((size_t)sgroups_threshold, sizeof(unsigned long)); + iter.num_small_attrs = (unsigned long *)HDcalloc((size_t)(sattrs_threshold+1), sizeof(unsigned long)); + iter.small_dset_dims = (unsigned long *)HDcalloc((size_t)sdsets_threshold, sizeof(unsigned long)); if(iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) { error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n"); diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index 91b9c3d..85cc1d4 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -37,6 +37,7 @@ EXIT_FAILURE=1 STAT=h5stat # The tool name STAT_BIN=`pwd`/$STAT # The path of the tool binary +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -149,6 +150,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # @@ -298,6 +312,9 @@ TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5 TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5 # +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index 07f6bfd..ffd52e8 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -290,7 +290,7 @@ main (int argc, char *argv[]) if (argno<argc) usage (prog_name); /* Now the real work, split the file */ - buf = malloc (blk_size); + buf = HDmalloc (blk_size); while (src_offset<src_size) { /* Read a block. The amount to read is the minimum of: @@ -498,6 +498,6 @@ main (int argc, char *argv[]) } /* Free resources and return */ - free (buf); + HDfree (buf); return EXIT_SUCCESS; } diff --git a/tools/misc/talign.c b/tools/misc/talign.c index 017eb55..66318bf 100644 --- a/tools/misc/talign.c +++ b/tools/misc/talign.c @@ -126,7 +126,7 @@ int main(void) H5Dclose(set); /* Now open the set, and read it back in */ - data = (char *)malloc(H5Tget_size(fix)); + data = (char *)HDmalloc(H5Tget_size(fix)); if(!data) { perror("malloc() failed"); @@ -152,7 +152,7 @@ out: mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0), string5, (char *)(data + H5Tget_member_offset(fix, 0))); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); mname = H5Tget_member_name(fix, 1); @@ -163,7 +163,7 @@ out: (double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1]); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 2)); mname = H5Tget_member_name(fix, 2); @@ -173,7 +173,7 @@ out: (double)fnok[0], (double)fptr[0], (double)fnok[1], (double)fptr[1]); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); printf("\n" @@ -192,7 +192,7 @@ out: } if(data) - free(data); + HDfree(data); H5Sclose(spc); H5Tclose(cmp); H5Tclose(cmp1); diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in index 5ec1a28..85205a8 100644 --- a/tools/misc/testh5mkgrp.sh.in +++ b/tools/misc/testh5mkgrp.sh.in @@ -31,6 +31,7 @@ H5LS=h5ls # The h5ls tool name H5LS_ARGS=-vr # Arguments to the h5ls tool H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary +RM='rm -rf' CMP='cmp' DIFF='diff -c' CP='cp' @@ -111,6 +112,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". TESTING() @@ -299,6 +313,8 @@ RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/testfiles/tcmpdintarray.ddl b/tools/testfiles/tcmpdintarray.ddl new file mode 100644 index 0000000..ef21cd2 --- /dev/null +++ b/tools/testfiles/tcmpdintarray.ddl @@ -0,0 +1,64 @@ +HDF5 "tcmpdintarray.h5" { +GROUP "/" { + DATASET "CompoundIntArray" { + DATATYPE H5T_COMPOUND { + H5T_ARRAY { [8] H5T_STD_U8LE } "DU08BITS"; + H5T_ARRAY { [16] H5T_STD_U16LE } "DU16BITS"; + H5T_ARRAY { [32] H5T_STD_U32LE } "DU32BITS"; + H5T_ARRAY { [64] H5T_STD_U64LE } "DU64BITS"; + H5T_ARRAY { [8] H5T_STD_I8LE } "DS08BITS"; + H5T_ARRAY { [16] H5T_STD_I16LE } "DS16BITS"; + H5T_ARRAY { [32] H5T_STD_I32LE } "DS32BITS"; + H5T_ARRAY { [64] H5T_STD_I64LE } "DS64BITS"; + H5T_ARRAY { [8] H5T_IEEE_F64LE } "DummyDBL"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + }, + (1): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + }, + (2): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + }, + (3): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + } + } + } +} +} diff --git a/tools/testfiles/tcmpdintarray.h5 b/tools/testfiles/tcmpdintarray.h5 Binary files differnew file mode 100644 index 0000000..17798fe --- /dev/null +++ b/tools/testfiles/tcmpdintarray.h5 diff --git a/tools/testfiles/tcmpdints.ddl b/tools/testfiles/tcmpdints.ddl new file mode 100644 index 0000000..f2986f3 --- /dev/null +++ b/tools/testfiles/tcmpdints.ddl @@ -0,0 +1,1444 @@ +HDF5 "tcmpdints.h5" { +GROUP "/" { + DATASET "CompoundInts" { + DATATYPE H5T_COMPOUND { + H5T_STD_U8LE "DU08BITS"; + H5T_STD_U16LE "DU16BITS"; + H5T_STD_U32LE "DU32BITS"; + H5T_STD_U64LE "DU64BITS"; + H5T_STD_I8LE "DS08BITS"; + H5T_STD_I16LE "DS16BITS"; + H5T_STD_I32LE "DS32BITS"; + H5T_STD_I64LE "DS64BITS"; + H5T_IEEE_F64LE "DummyDBL"; + } + DATASPACE SIMPLE { ( 64 ) / ( 64 ) } + DATA { + (0): { + 255, + 65535, + 4294967295, + 18446744073709551615, + -1, + -1, + -1, + -1, + 0.0001 + }, + (1): { + 254, + 65534, + 4294967294, + 18446744073709551614, + -2, + -2, + -2, + -2, + 1.0001 + }, + (2): { + 252, + 65532, + 4294967292, + 18446744073709551612, + -4, + -4, + -4, + -4, + 2.0001 + }, + (3): { + 248, + 65528, + 4294967288, + 18446744073709551608, + -8, + -8, + -8, + -8, + 3.0001 + }, + (4): { + 240, + 65520, + 4294967280, + 18446744073709551600, + -16, + -16, + -16, + -16, + 4.0001 + }, + (5): { + 224, + 65504, + 4294967264, + 18446744073709551584, + -32, + -32, + -32, + -32, + 5.0001 + }, + (6): { + 192, + 65472, + 4294967232, + 18446744073709551552, + -64, + -64, + -64, + -64, + 6.0001 + }, + (7): { + 128, + 65408, + 4294967168, + 18446744073709551488, + -128, + -128, + -128, + -128, + 7.0001 + }, + (8): { + 255, + 65280, + 4294967040, + 18446744073709551360, + -1, + -256, + -256, + -256, + 8.0001 + }, + (9): { + 254, + 65024, + 4294966784, + 18446744073709551104, + -2, + -512, + -512, + -512, + 9.0001 + }, + (10): { + 252, + 64512, + 4294966272, + 18446744073709550592, + -4, + -1024, + -1024, + -1024, + 10.0001 + }, + (11): { + 248, + 63488, + 4294965248, + 18446744073709549568, + -8, + -2048, + -2048, + -2048, + 11.0001 + }, + (12): { + 240, + 61440, + 4294963200, + 18446744073709547520, + -16, + -4096, + -4096, + -4096, + 12.0001 + }, + (13): { + 224, + 57344, + 4294959104, + 18446744073709543424, + -32, + -8192, + -8192, + -8192, + 13.0001 + }, + (14): { + 192, + 49152, + 4294950912, + 18446744073709535232, + -64, + -16384, + -16384, + -16384, + 14.0001 + }, + (15): { + 128, + 32768, + 4294934528, + 18446744073709518848, + -128, + -32768, + -32768, + -32768, + 15.0001 + }, + (16): { + 255, + 65535, + 4294901760, + 18446744073709486080, + -1, + -1, + -65536, + -65536, + 16.0001 + }, + (17): { + 254, + 65534, + 4294836224, + 18446744073709420544, + -2, + -2, + -131072, + -131072, + 17.0001 + }, + (18): { + 252, + 65532, + 4294705152, + 18446744073709289472, + -4, + -4, + -262144, + -262144, + 18.0001 + }, + (19): { + 248, + 65528, + 4294443008, + 18446744073709027328, + -8, + -8, + -524288, + -524288, + 19.0001 + }, + (20): { + 240, + 65520, + 4293918720, + 18446744073708503040, + -16, + -16, + -1048576, + -1048576, + 20.0001 + }, + (21): { + 224, + 65504, + 4292870144, + 18446744073707454464, + -32, + -32, + -2097152, + -2097152, + 21.0001 + }, + (22): { + 192, + 65472, + 4290772992, + 18446744073705357312, + -64, + -64, + -4194304, + -4194304, + 22.0001 + }, + (23): { + 128, + 65408, + 4286578688, + 18446744073701163008, + -128, + -128, + -8388608, + -8388608, + 23.0001 + }, + (24): { + 255, + 65280, + 4278190080, + 18446744073692774400, + -1, + -256, + -16777216, + -16777216, + 24.0001 + }, + (25): { + 254, + 65024, + 4261412864, + 18446744073675997184, + -2, + -512, + -33554432, + -33554432, + 25.0001 + }, + (26): { + 252, + 64512, + 4227858432, + 18446744073642442752, + -4, + -1024, + -67108864, + -67108864, + 26.0001 + }, + (27): { + 248, + 63488, + 4160749568, + 18446744073575333888, + -8, + -2048, + -134217728, + -134217728, + 27.0001 + }, + (28): { + 240, + 61440, + 4026531840, + 18446744073441116160, + -16, + -4096, + -268435456, + -268435456, + 28.0001 + }, + (29): { + 224, + 57344, + 3758096384, + 18446744073172680704, + -32, + -8192, + -536870912, + -536870912, + 29.0001 + }, + (30): { + 192, + 49152, + 3221225472, + 18446744072635809792, + -64, + -16384, + -1073741824, + -1073741824, + 30.0001 + }, + (31): { + 128, + 32768, + 2147483648, + 18446744071562067968, + -128, + -32768, + -2147483648, + -2147483648, + 31.0001 + }, + (32): { + 255, + 65535, + 4294967295, + 18446744069414584320, + -1, + -1, + -1, + -4294967296, + 32.0001 + }, + (33): { + 254, + 65534, + 4294967294, + 18446744065119617024, + -2, + -2, + -2, + -8589934592, + 33.0001 + }, + (34): { + 252, + 65532, + 4294967292, + 18446744056529682432, + -4, + -4, + -4, + -17179869184, + 34.0001 + }, + (35): { + 248, + 65528, + 4294967288, + 18446744039349813248, + -8, + -8, + -8, + -34359738368, + 35.0001 + }, + (36): { + 240, + 65520, + 4294967280, + 18446744004990074880, + -16, + -16, + -16, + -68719476736, + 36.0001 + }, + (37): { + 224, + 65504, + 4294967264, + 18446743936270598144, + -32, + -32, + -32, + -137438953472, + 37.0001 + }, + (38): { + 192, + 65472, + 4294967232, + 18446743798831644672, + -64, + -64, + -64, + -274877906944, + 38.0001 + }, + (39): { + 128, + 65408, + 4294967168, + 18446743523953737728, + -128, + -128, + -128, + -549755813888, + 39.0001 + }, + (40): { + 255, + 65280, + 4294967040, + 18446742974197923840, + -1, + -256, + -256, + -1099511627776, + 40.0001 + }, + (41): { + 254, + 65024, + 4294966784, + 18446741874686296064, + -2, + -512, + -512, + -2199023255552, + 41.0001 + }, + (42): { + 252, + 64512, + 4294966272, + 18446739675663040512, + -4, + -1024, + -1024, + -4398046511104, + 42.0001 + }, + (43): { + 248, + 63488, + 4294965248, + 18446735277616529408, + -8, + -2048, + -2048, + -8796093022208, + 43.0001 + }, + (44): { + 240, + 61440, + 4294963200, + 18446726481523507200, + -16, + -4096, + -4096, + -17592186044416, + 44.0001 + }, + (45): { + 224, + 57344, + 4294959104, + 18446708889337462784, + -32, + -8192, + -8192, + -35184372088832, + 45.0001 + }, + (46): { + 192, + 49152, + 4294950912, + 18446673704965373952, + -64, + -16384, + -16384, + -70368744177664, + 46.0001 + }, + (47): { + 128, + 32768, + 4294934528, + 18446603336221196288, + -128, + -32768, + -32768, + -140737488355328, + 47.0001 + }, + (48): { + 255, + 65535, + 4294901760, + 18446462598732840960, + -1, + -1, + -65536, + -281474976710656, + 48.0001 + }, + (49): { + 254, + 65534, + 4294836224, + 18446181123756130304, + -2, + -2, + -131072, + -562949953421312, + 49.0001 + }, + (50): { + 252, + 65532, + 4294705152, + 18445618173802708992, + -4, + -4, + -262144, + -1125899906842624, + 50.0001 + }, + (51): { + 248, + 65528, + 4294443008, + 18444492273895866368, + -8, + -8, + -524288, + -2251799813685248, + 51.0001 + }, + (52): { + 240, + 65520, + 4293918720, + 18442240474082181120, + -16, + -16, + -1048576, + -4503599627370496, + 52.0001 + }, + (53): { + 224, + 65504, + 4292870144, + 18437736874454810624, + -32, + -32, + -2097152, + -9007199254740992, + 53.0001 + }, + (54): { + 192, + 65472, + 4290772992, + 18428729675200069632, + -64, + -64, + -4194304, + -18014398509481984, + 54.0001 + }, + (55): { + 128, + 65408, + 4286578688, + 18410715276690587648, + -128, + -128, + -8388608, + -36028797018963968, + 55.0001 + }, + (56): { + 255, + 65280, + 4278190080, + 18374686479671623680, + -1, + -256, + -16777216, + -72057594037927936, + 56.0001 + }, + (57): { + 254, + 65024, + 4261412864, + 18302628885633695744, + -2, + -512, + -33554432, + -144115188075855872, + 57.0001 + }, + (58): { + 252, + 64512, + 4227858432, + 18158513697557839872, + -4, + -1024, + -67108864, + -288230376151711744, + 58.0001 + }, + (59): { + 248, + 63488, + 4160749568, + 17870283321406128128, + -8, + -2048, + -134217728, + -576460752303423488, + 59.0001 + }, + (60): { + 240, + 61440, + 4026531840, + 17293822569102704640, + -16, + -4096, + -268435456, + -1152921504606846976, + 60.0001 + }, + (61): { + 224, + 57344, + 3758096384, + 16140901064495857664, + -32, + -8192, + -536870912, + -2305843009213693952, + 61.0001 + }, + (62): { + 192, + 49152, + 3221225472, + 13835058055282163712, + -64, + -16384, + -1073741824, + -4611686018427387904, + 62.0001 + }, + (63): { + 128, + 32768, + 2147483648, + 9223372036854775808, + -128, + -32768, + -2147483648, + -9223372036854775808, + 63.0001 + } + } + } + DATASET "CompoundRInts" { + DATATYPE H5T_COMPOUND { + H5T_STD_U64LE "DU64BITS"; + H5T_STD_U32LE "DU32BITS"; + H5T_STD_U16LE "DU16BITS"; + H5T_STD_U8LE "DU08BITS"; + H5T_STD_I64LE "DS64BITS"; + H5T_STD_I32LE "DS32BITS"; + H5T_STD_I16LE "DS16BITS"; + H5T_STD_I8LE "DS08BITS"; + H5T_IEEE_F64LE "DummyDBL"; + } + DATASPACE SIMPLE { ( 64 ) / ( 64 ) } + DATA { + (0): { + 18446744073709551615, + 4294967295, + 65535, + 255, + -1, + -1, + -1, + -1, + 0.0001 + }, + (1): { + 18446744073709551614, + 4294967294, + 65534, + 254, + -2, + -2, + -2, + -2, + 1.0001 + }, + (2): { + 18446744073709551612, + 4294967292, + 65532, + 252, + -4, + -4, + -4, + -4, + 2.0001 + }, + (3): { + 18446744073709551608, + 4294967288, + 65528, + 248, + -8, + -8, + -8, + -8, + 3.0001 + }, + (4): { + 18446744073709551600, + 4294967280, + 65520, + 240, + -16, + -16, + -16, + -16, + 4.0001 + }, + (5): { + 18446744073709551584, + 4294967264, + 65504, + 224, + -32, + -32, + -32, + -32, + 5.0001 + }, + (6): { + 18446744073709551552, + 4294967232, + 65472, + 192, + -64, + -64, + -64, + -64, + 6.0001 + }, + (7): { + 18446744073709551488, + 4294967168, + 65408, + 128, + -128, + -128, + -128, + -128, + 7.0001 + }, + (8): { + 18446744073709551360, + 4294967040, + 65280, + 255, + -256, + -256, + -256, + -1, + 8.0001 + }, + (9): { + 18446744073709551104, + 4294966784, + 65024, + 254, + -512, + -512, + -512, + -2, + 9.0001 + }, + (10): { + 18446744073709550592, + 4294966272, + 64512, + 252, + -1024, + -1024, + -1024, + -4, + 10.0001 + }, + (11): { + 18446744073709549568, + 4294965248, + 63488, + 248, + -2048, + -2048, + -2048, + -8, + 11.0001 + }, + (12): { + 18446744073709547520, + 4294963200, + 61440, + 240, + -4096, + -4096, + -4096, + -16, + 12.0001 + }, + (13): { + 18446744073709543424, + 4294959104, + 57344, + 224, + -8192, + -8192, + -8192, + -32, + 13.0001 + }, + (14): { + 18446744073709535232, + 4294950912, + 49152, + 192, + -16384, + -16384, + -16384, + -64, + 14.0001 + }, + (15): { + 18446744073709518848, + 4294934528, + 32768, + 128, + -32768, + -32768, + -32768, + -128, + 15.0001 + }, + (16): { + 18446744073709486080, + 4294901760, + 65535, + 255, + -65536, + -65536, + -1, + -1, + 16.0001 + }, + (17): { + 18446744073709420544, + 4294836224, + 65534, + 254, + -131072, + -131072, + -2, + -2, + 17.0001 + }, + (18): { + 18446744073709289472, + 4294705152, + 65532, + 252, + -262144, + -262144, + -4, + -4, + 18.0001 + }, + (19): { + 18446744073709027328, + 4294443008, + 65528, + 248, + -524288, + -524288, + -8, + -8, + 19.0001 + }, + (20): { + 18446744073708503040, + 4293918720, + 65520, + 240, + -1048576, + -1048576, + -16, + -16, + 20.0001 + }, + (21): { + 18446744073707454464, + 4292870144, + 65504, + 224, + -2097152, + -2097152, + -32, + -32, + 21.0001 + }, + (22): { + 18446744073705357312, + 4290772992, + 65472, + 192, + -4194304, + -4194304, + -64, + -64, + 22.0001 + }, + (23): { + 18446744073701163008, + 4286578688, + 65408, + 128, + -8388608, + -8388608, + -128, + -128, + 23.0001 + }, + (24): { + 18446744073692774400, + 4278190080, + 65280, + 255, + -16777216, + -16777216, + -256, + -1, + 24.0001 + }, + (25): { + 18446744073675997184, + 4261412864, + 65024, + 254, + -33554432, + -33554432, + -512, + -2, + 25.0001 + }, + (26): { + 18446744073642442752, + 4227858432, + 64512, + 252, + -67108864, + -67108864, + -1024, + -4, + 26.0001 + }, + (27): { + 18446744073575333888, + 4160749568, + 63488, + 248, + -134217728, + -134217728, + -2048, + -8, + 27.0001 + }, + (28): { + 18446744073441116160, + 4026531840, + 61440, + 240, + -268435456, + -268435456, + -4096, + -16, + 28.0001 + }, + (29): { + 18446744073172680704, + 3758096384, + 57344, + 224, + -536870912, + -536870912, + -8192, + -32, + 29.0001 + }, + (30): { + 18446744072635809792, + 3221225472, + 49152, + 192, + -1073741824, + -1073741824, + -16384, + -64, + 30.0001 + }, + (31): { + 18446744071562067968, + 2147483648, + 32768, + 128, + -2147483648, + -2147483648, + -32768, + -128, + 31.0001 + }, + (32): { + 18446744069414584320, + 4294967295, + 65535, + 255, + -4294967296, + -1, + -1, + -1, + 32.0001 + }, + (33): { + 18446744065119617024, + 4294967294, + 65534, + 254, + -8589934592, + -2, + -2, + -2, + 33.0001 + }, + (34): { + 18446744056529682432, + 4294967292, + 65532, + 252, + -17179869184, + -4, + -4, + -4, + 34.0001 + }, + (35): { + 18446744039349813248, + 4294967288, + 65528, + 248, + -34359738368, + -8, + -8, + -8, + 35.0001 + }, + (36): { + 18446744004990074880, + 4294967280, + 65520, + 240, + -68719476736, + -16, + -16, + -16, + 36.0001 + }, + (37): { + 18446743936270598144, + 4294967264, + 65504, + 224, + -137438953472, + -32, + -32, + -32, + 37.0001 + }, + (38): { + 18446743798831644672, + 4294967232, + 65472, + 192, + -274877906944, + -64, + -64, + -64, + 38.0001 + }, + (39): { + 18446743523953737728, + 4294967168, + 65408, + 128, + -549755813888, + -128, + -128, + -128, + 39.0001 + }, + (40): { + 18446742974197923840, + 4294967040, + 65280, + 255, + -1099511627776, + -256, + -256, + -1, + 40.0001 + }, + (41): { + 18446741874686296064, + 4294966784, + 65024, + 254, + -2199023255552, + -512, + -512, + -2, + 41.0001 + }, + (42): { + 18446739675663040512, + 4294966272, + 64512, + 252, + -4398046511104, + -1024, + -1024, + -4, + 42.0001 + }, + (43): { + 18446735277616529408, + 4294965248, + 63488, + 248, + -8796093022208, + -2048, + -2048, + -8, + 43.0001 + }, + (44): { + 18446726481523507200, + 4294963200, + 61440, + 240, + -17592186044416, + -4096, + -4096, + -16, + 44.0001 + }, + (45): { + 18446708889337462784, + 4294959104, + 57344, + 224, + -35184372088832, + -8192, + -8192, + -32, + 45.0001 + }, + (46): { + 18446673704965373952, + 4294950912, + 49152, + 192, + -70368744177664, + -16384, + -16384, + -64, + 46.0001 + }, + (47): { + 18446603336221196288, + 4294934528, + 32768, + 128, + -140737488355328, + -32768, + -32768, + -128, + 47.0001 + }, + (48): { + 18446462598732840960, + 4294901760, + 65535, + 255, + -281474976710656, + -65536, + -1, + -1, + 48.0001 + }, + (49): { + 18446181123756130304, + 4294836224, + 65534, + 254, + -562949953421312, + -131072, + -2, + -2, + 49.0001 + }, + (50): { + 18445618173802708992, + 4294705152, + 65532, + 252, + -1125899906842624, + -262144, + -4, + -4, + 50.0001 + }, + (51): { + 18444492273895866368, + 4294443008, + 65528, + 248, + -2251799813685248, + -524288, + -8, + -8, + 51.0001 + }, + (52): { + 18442240474082181120, + 4293918720, + 65520, + 240, + -4503599627370496, + -1048576, + -16, + -16, + 52.0001 + }, + (53): { + 18437736874454810624, + 4292870144, + 65504, + 224, + -9007199254740992, + -2097152, + -32, + -32, + 53.0001 + }, + (54): { + 18428729675200069632, + 4290772992, + 65472, + 192, + -18014398509481984, + -4194304, + -64, + -64, + 54.0001 + }, + (55): { + 18410715276690587648, + 4286578688, + 65408, + 128, + -36028797018963968, + -8388608, + -128, + -128, + 55.0001 + }, + (56): { + 18374686479671623680, + 4278190080, + 65280, + 255, + -72057594037927936, + -16777216, + -256, + -1, + 56.0001 + }, + (57): { + 18302628885633695744, + 4261412864, + 65024, + 254, + -144115188075855872, + -33554432, + -512, + -2, + 57.0001 + }, + (58): { + 18158513697557839872, + 4227858432, + 64512, + 252, + -288230376151711744, + -67108864, + -1024, + -4, + 58.0001 + }, + (59): { + 17870283321406128128, + 4160749568, + 63488, + 248, + -576460752303423488, + -134217728, + -2048, + -8, + 59.0001 + }, + (60): { + 17293822569102704640, + 4026531840, + 61440, + 240, + -1152921504606846976, + -268435456, + -4096, + -16, + 60.0001 + }, + (61): { + 16140901064495857664, + 3758096384, + 57344, + 224, + -2305843009213693952, + -536870912, + -8192, + -32, + 61.0001 + }, + (62): { + 13835058055282163712, + 3221225472, + 49152, + 192, + -4611686018427387904, + -1073741824, + -16384, + -64, + 62.0001 + }, + (63): { + 9223372036854775808, + 2147483648, + 32768, + 128, + -9223372036854775808, + -2147483648, + -32768, + -128, + 63.0001 + } + } + } +} +} diff --git a/tools/testfiles/tcmpdints.h5 b/tools/testfiles/tcmpdints.h5 Binary files differnew file mode 100644 index 0000000..d4af1c4 --- /dev/null +++ b/tools/testfiles/tcmpdints.h5 |