summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-03-01 20:07:44 (GMT)
committerGitHub <noreply@github.com>2021-03-01 20:07:44 (GMT)
commit498a6de93576a2d386d3b5ba1818355dce7ae8a4 (patch)
treed80178e4bb38015110329102be28e770eadce446 /tools
parent7c507003c7585837dace9bbbec9fde7a80802dbf (diff)
downloadhdf5-498a6de93576a2d386d3b5ba1818355dce7ae8a4.zip
hdf5-498a6de93576a2d386d3b5ba1818355dce7ae8a4.tar.gz
hdf5-498a6de93576a2d386d3b5ba1818355dce7ae8a4.tar.bz2
1 12 merge java copyright header changes (#391)
* OESS-98 fix tools test for plugins * sync fork * Merge of changes from dev * Move problem option to bottom of the list until fixed * HDFFV-11106 - fix parsing optional args * HDFFV-11106 add note * grammer fix * Whitespace after clang formatting * Undo format version 11 changes * Update check to working version * Merge workflow and minor changes from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge serval small changes from dev * fix typo * Minor non-space formatting changes * GH #386 copyright corrections for java folder * revert because logic requires false return
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff_array.c96
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/lib/h5tools_str.c2
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/src/h5diff/h5diff_common.c36
-rw-r--r--tools/src/h5import/h5import.c4
-rw-r--r--tools/src/h5ls/h5ls.c2
-rw-r--r--tools/src/h5repack/h5repack_copy.c8
-rw-r--r--tools/src/h5repack/h5repack_verify.c6
-rw-r--r--tools/src/misc/h5debug.c4
-rw-r--r--tools/src/misc/h5repart.c2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt12
-rw-r--r--tools/test/h5dump/CMakeTests.cmake8
-rw-r--r--tools/test/h5dump/h5dumpgentest.c52
-rw-r--r--tools/test/h5dump/testh5dump.sh.in6
-rw-r--r--tools/testfiles/tldouble.ddl11
25 files changed, 285 insertions, 80 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index d9616e1..f97ef50 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -472,9 +472,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
size_t size = 0;
hbool_t iszero1;
hbool_t iszero2;
- hsize_t nfound = 0; /* differences found */
- double per;
- hbool_t both_zero;
+ hsize_t nfound = 0; /* differences found */
diff_err_t ret_value = opts->err_stat;
H5TOOLS_START_DEBUG("ph:%d elemtno:%d - errstat:%d", opts->print_header, elemtno, opts->err_stat);
@@ -3364,48 +3362,66 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u)
hsize_t curr_pos = idx;
parallel_print("[ ");
- H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", i, opts->hs_nelmts, opts->err_stat);
+ H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", idx, opts->hs_nelmts,
+ opts->err_stat);
if (opts->sset[0] != NULL) {
/* Subsetting is used - calculate total position */
- hsize_t elmnt_cnt = 1;
- hsize_t dim_cnt = 0; /* previous dim size */
- hsize_t str_cnt = 0; /* previous dim stride */
- hsize_t curr_idx = idx; /* calculated running position */
- hsize_t str_idx = 0;
- hsize_t blk_idx = 0;
- hsize_t cnt_idx = 0;
- hsize_t hs_idx = 0;
- j = opts->rank - 1;
+ hsize_t prev_dim_size = 0; /* previous dim size */
+ hsize_t prev_str = 0; /* previouw stride idx*/
+ hsize_t str_cnt = 0; /* stride multiplier*/
+ hsize_t curr_idx = 0; /* calculated running position */
+ hsize_t str_idx = 0;
+ hsize_t blk_idx = 0;
+ hsize_t cnt_idx = 0;
+ hsize_t dim_size = 0; /* current dim size */
+ hsize_t elmnt_cnt = 1;
+ hsize_t next_idx = idx;
+ hsize_t data_idx = 0;
+ j = opts->rank - 1;
+ H5TOOLS_DEBUG("...begin:%ld=> opts->rank:%ld (idx:%ld)", j, opts->rank, idx);
do {
- cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - count:%ld", j,
- curr_pos, curr_idx, cnt_idx);
- blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - block:%ld", j,
- curr_pos, curr_idx, blk_idx);
- hs_idx = cnt_idx * blk_idx; /* hyperslab area value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - hs:%ld", j, curr_pos,
- curr_idx, hs_idx);
- str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - stride:%ld", j,
- curr_pos, curr_idx, str_idx);
- elmnt_cnt *= opts->dims[j]; /* Total number of elements in dimension */
- H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld", j, elmnt_cnt);
- if (str_idx > blk_idx)
- curr_idx += dim_cnt * (str_idx - blk_idx); /* */
- else if (curr_idx >= hs_idx)
- curr_idx += dim_cnt * str_cnt;
- H5TOOLS_DEBUG("... sset loop:%d with idx:%ld (curr_idx:%ld) - stride:%ld", j, idx,
- curr_idx, str_idx);
- dim_cnt = elmnt_cnt; /* */
- if (str_idx > blk_idx)
- str_cnt = str_idx - blk_idx; /* */
- else
- str_cnt = str_idx; /* */
- H5TOOLS_DEBUG("... sset loop:%d with dim_cnt:%ld - str_cnt:%ld", j, dim_cnt, str_cnt);
+ curr_idx = next_idx; /* New current data position */
+ cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */
+ blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */
+ str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */
+ H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - c:%ld b:%ld s:%ld", j,
+ curr_pos, curr_idx, cnt_idx, blk_idx, str_idx);
+ dim_size = opts->dims[j]; /* Current dimension size */
+ // elmnt_cnt *= dim_size; /* Total number of elements in dimension */
+ H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld - (prev_dim_size:%ld - dim_size:%ld) "
+ "- str_cnt:%ld",
+ j, elmnt_cnt, prev_dim_size, dim_size, str_cnt);
+ data_idx = elmnt_cnt * dim_size;
+ H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (data_idx:%ld)", j, curr_pos, data_idx);
+ for (i = 0; i < cnt_idx; i++) {
+ H5TOOLS_DEBUG("... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld (curr_idx:%ld - "
+ "data_idx:%ld)",
+ i, cnt_idx, str_cnt, curr_idx, data_idx);
+ if (curr_idx >= data_idx) {
+ /* get to next block */
+ data_idx += str_idx * dim_size;
+ /* get next block */
+ str_cnt++;
+ H5TOOLS_DEBUG(
+ "... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld - data_idx:%ld", i,
+ cnt_idx, str_cnt, data_idx);
+ }
+ H5TOOLS_DEBUG("... ... end data loop:%d with dim_cnt:%ld - str_cnt:%ld - "
+ "(curr_idx:%ld - data_idx:%ld)",
+ i, dim_size, str_cnt, curr_idx, data_idx);
+ }
+ next_idx += dim_size * str_cnt; // + prev_dim_size;
+ H5TOOLS_DEBUG("... sset loop:%d with curr_idx:%ld (next_idx:%ld)", j, curr_idx, next_idx);
+ str_cnt = 0;
+ prev_str = str_idx;
+ prev_dim_size = dim_size;
+ H5TOOLS_DEBUG("... end sset loop:%d with prev_dim_size:%ld (curr_idx:%ld - data_idx:%ld) "
+ "- str_cnt:%ld",
+ j, prev_dim_size, curr_idx, data_idx, str_cnt);
+ elmnt_cnt *= dim_size; /* Total number of elements in dimension */
j--;
- } while (curr_idx >= elmnt_cnt && j >= 0);
+ } while (next_idx >= elmnt_cnt && j >= 0);
curr_pos = curr_idx; /* New current position */
H5TOOLS_DEBUG("pos loop:%d,%d with elmnt_cnt:%ld - curr_pos:%ld", i, j, elmnt_cnt, curr_pos);
} /* if (opts->sset[0] != NULL) */
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index f6566d9..3b78491 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1778,7 +1778,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
} break;
case H5T_ARRAY: {
int k, ndims;
- hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts;
+ hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts = 0;
hid_t memb = H5I_INVALID_HID;
H5TOOLS_DEBUG("H5T_ARRAY");
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index dd3ae67..212b13e 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -705,7 +705,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
long double templdouble;
HDmemcpy(&templdouble, vp, sizeof(long double));
- h5tools_str_append(str, OPT(info->fmt_double, "%Lf"), templdouble);
+ h5tools_str_append(str, "%Lg", templdouble);
#endif
}
break;
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 708fb2c..b33d908 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -196,7 +196,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
/* long command line option */
int i;
const char ch = '=';
- char * arg = &argv[opt_ind][2];
+ char * arg = HDstrdup(&argv[opt_ind][2]);
size_t arg_len = 0;
opt_arg = strchr(&argv[opt_ind][2], ch);
@@ -208,8 +208,6 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
arg[arg_len] = 0;
for (i = 0; l_opts && l_opts[i].name; i++) {
- size_t len = HDstrlen(l_opts[i].name);
-
if (HDstrcmp(arg, l_opts[i].name) == 0) {
/* we've found a matching long command line flag */
opt_opt = l_opts[i].shortval;
@@ -253,6 +251,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
opt_ind++;
sp = 1;
+
+ HDfree(arg);
}
else {
register char *cp; /* pointer into current token */
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index b51950e..99cd653 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -76,7 +76,6 @@ check_options(diff_opt_t *opts)
}
}
-#if TRILABS_227
/*-------------------------------------------------------------------------
* Function: parse_hsize_list
*
@@ -192,7 +191,6 @@ parse_subset_params(const char *dset)
return s;
}
-#endif
/*-------------------------------------------------------------------------
* Function: parse_command_line
@@ -480,11 +478,9 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
* TRILABS_227 is complete except for an issue with printing indices
* the following calls will enable subsetting
*/
-#if TRILABS_227
opts->sset[0] = parse_subset_params(*objname1);
opts->sset[1] = parse_subset_params(*objname2);
-#endif
H5TOOLS_ENDDEBUG("");
}
@@ -822,19 +818,27 @@ usage(void)
/*
* TRILABS_227 is complete except for an issue with printing indices
* the following will be needed for subsetting
+ */
PRINTVALSTREAM(rawoutstream, " Subsetting options:\n");
- PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the fcompact form of subsetting, as
- follows:\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n");
- PRINTVALSTREAM(rawoutstream, " It is not required to use all parameters, but until the last parameter
- value used,\n"); PRINTVALSTREAM(rawoutstream, " all of the semicolons (;) are required, even when a
- parameter value is not specified. Example:\n"); PRINTVALSTREAM(rawoutstream, " obj1
- /foo/mydataset[START;;COUNT;BLOCK]\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n");
- PRINTVALSTREAM(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1
- in\n"); PRINTVALSTREAM(rawoutstream, " each dimension. START is optional and will default to 0 in each
- dimension.\n"); PRINTVALSTREAM(rawoutstream, " Each of START, STRIDE, COUNT, and BLOCK must be a
- comma-separated list of integers with\n"); PRINTVALSTREAM(rawoutstream, " one integer for each dimension
- of the dataset.\n"); PRINTVALSTREAM(rawoutstream, "\n");
- */
+ PRINTVALSTREAM(rawoutstream,
+ " Subsetting is available by using the fcompact form of subsetting, as follows:\n");
+ PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n");
+ PRINTVALSTREAM(rawoutstream,
+ " It is not required to use all parameters, but until the last parameter value used,\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " all of the semicolons (;) are required, even when a parameter value is not specified. Example:\n");
+ PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;;COUNT;BLOCK]\n");
+ PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n");
+ PRINTVALSTREAM(rawoutstream,
+ " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n");
+ PRINTVALSTREAM(rawoutstream,
+ " each dimension. START is optional and will default to 0 in each dimension.\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with\n");
+ PRINTVALSTREAM(rawoutstream, " one integer for each dimension of the dataset.\n");
+ PRINTVALSTREAM(rawoutstream, "\n");
PRINTVALSTREAM(rawoutstream, " Exit code:\n");
PRINTVALSTREAM(rawoutstream, " 0 if no differences, 1 if differences found, 2 if error\n");
PRINTVALSTREAM(rawoutstream, "\n");
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index e3f4384..471af51 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp)
token = HDstrtok(temp, delimiter);
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, err1);
+ (void)HDfprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -2546,7 +2546,7 @@ parsePathInfo(struct path_info *path, char *temp)
if (token == NULL)
break;
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, err1);
+ (void)HDfprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index b29ed72..06c90d0 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -2648,7 +2648,7 @@ int
main(int argc, const char *argv[])
{
hid_t file_id = H5I_INVALID_HID;
- char * fname = NULL, *oname = NULL, *x;
+ char * fname = NULL, *oname = NULL, *x = NULL;
const char * s = NULL;
char * rest;
int argno;
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 20d277d..0aef710 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -357,14 +357,14 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
done:
H5E_BEGIN_TRY
{
- H5Pclose(fcpl_in);
- H5Pclose(gcpl_in);
H5Pclose(fcpl);
+ H5Pclose(options->fout_fapl);
+ options->fout_fapl = H5P_DEFAULT;
+ H5Pclose(gcpl_in);
H5Gclose(grp_in);
- H5Fclose(fidin);
+ H5Pclose(fcpl_in);
H5Fclose(fidout);
H5Fclose(fidin);
- H5Fclose(fidout);
}
H5E_END_TRY;
if (travt)
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index cc5501d..0542d03 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -378,9 +378,11 @@ h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t
*-------------------------------------------------------------------------
*/
/* Open the files */
- if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, TRUE, NULL, 0)) < 0)
+ if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl,
+ (fname1_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0)
H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR);
- if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, TRUE, NULL, 0)) < 0)
+ if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl,
+ (fname2_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0)
H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR);
/*-------------------------------------------------------------------------
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index 2426a11..8962a76 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -246,8 +246,8 @@ main(int argc, char *argv[])
haddr_t extra[10];
uint8_t sig[H5F_SIGNATURE_LEN];
size_t u;
- H5E_auto2_t func;
- void * edata;
+ H5E_auto2_t func = NULL;
+ void * edata = NULL;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t status = SUCCEED;
int exit_value = 0;
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index 77b40a1..a75f6d8 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -97,7 +97,7 @@ static off_t
get_size(const char *progname, int *argno, int argc, char *argv[])
{
off_t retval = -1;
- char *suffix;
+ char *suffix = NULL;
if (isdigit((int)(argv[*argno][2]))) {
retval = HDstrtol(argv[*argno] + 2, &suffix, 10);
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index b5ff01a..3631db7 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -143,6 +143,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index f52d8cc..8a4ce6d 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -143,6 +143,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 84111b3..d4c7336 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index d915d36..3123587 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index 1ef8cdf..ce2d887 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index 881362e..61fd036 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index ba39a99..dc8655d 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index 70421fc..f20ffbe 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index 0d74268..f73d202 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index cb8b8b4..903b738 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 0d8563e..f54da76 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -127,7 +127,7 @@
${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl
${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl
${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl
- #${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl
${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl
${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl
${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl
@@ -293,7 +293,7 @@
${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5
${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5
${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5
- #${HDF5_TOOLS_DIR}/testfiles/tldouble.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble.h5
${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5
${HDF5_TOOLS_DIR}/testfiles/tloop.h5
${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5
@@ -1085,7 +1085,7 @@
ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5)
# test for long double (some systems do not have long double)
- #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
+# ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
# test for vms
ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
@@ -1170,7 +1170,7 @@
ADD_H5_TEST (err_attr_dspace 1 err_attr_dspace.h5)
# test to verify HDFFV-9407: long double full precision
- ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lf t128bit_float.h5)
+# ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lg t128bit_float.h5)
##############################################################################
### P L U G I N T E S T S
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 2746f70..fed3a56 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -115,6 +115,7 @@
#define FILE85 "tgrpnullspace.h5"
#define FILE86 "err_attr_dspace.h5"
#define FILE87 "tintsnodata.h5"
+#define FILE88 "tldouble_scalar.h5"
/*-------------------------------------------------------------------------
* prototypes
@@ -6333,6 +6334,57 @@ error:
}
/*-------------------------------------------------------------------------
+ * Function: gent_ldouble_scalar
+ *
+ * Purpose: make file with a long double scalar dataset
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+gent_ldouble_scalar(void)
+{
+ hid_t fid;
+ hid_t did;
+ hid_t tid;
+ hid_t sid;
+ hsize_t dims[1] = {6};
+ long double buf[6] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
+
+ if ((fid = H5Fcreate(FILE88, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
+ goto error;
+
+ if ((tid = H5Tarray_create(H5T_NATIVE_LDOUBLE, 1, dims)) < 0)
+ goto error;
+
+ if (H5Tget_size(tid) == 0)
+ goto error;
+
+ if ((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto error;
+
+ if (H5Sclose(sid) < 0)
+ goto error;
+ if (H5Tclose(tid) < 0)
+ goto error;
+ if (H5Dclose(did) < 0)
+ goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ return 0;
+
+error:
+ HDprintf("error !\n");
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
* Function: gent_binary
*
* Purpose: Generate a file to be used in the binary output test
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 2c4f2da..8f478b0 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -142,7 +142,7 @@ $SRC_H5DUMP_TESTFILES/thyperslab.h5
$SRC_H5DUMP_TESTFILES/tintsattrs.h5
$SRC_H5DUMP_TESTFILES/tints4dims.h5
$SRC_H5DUMP_TESTFILES/tlarge_objname.h5
-#$SRC_H5DUMP_TESTFILES/tldouble.h5
+$SRC_H5DUMP_TESTFILES/tldouble.h5
$SRC_H5DUMP_TESTFILES/tlonglinks.h5
$SRC_H5DUMP_TESTFILES/tloop.h5
$SRC_H5DUMP_TESTFILES/tmulti-b.h5
@@ -287,7 +287,7 @@ $SRC_H5DUMP_TESTFILES/tints4dimsCountEq.ddl
$SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl
$SRC_H5DUMP_TESTFILES/tintsattrs.ddl
$SRC_H5DUMP_TESTFILES/tlarge_objname.ddl
-#$SRC_H5DUMP_TESTFILES/tldouble.ddl
+$SRC_H5DUMP_TESTFILES/tldouble.ddl
$SRC_H5DUMP_TESTFILES/tlonglinks.ddl
$SRC_H5DUMP_TESTFILES/tloop-1.ddl
$SRC_H5DUMP_TESTFILES/tmulti.ddl
@@ -1443,7 +1443,7 @@ TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
# test to verify HDFFV-9407: long double full precision
-GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+#GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/testfiles/tldouble.ddl b/tools/testfiles/tldouble.ddl
new file mode 100644
index 0000000..c032ef3
--- /dev/null
+++ b/tools/testfiles/tldouble.ddl
@@ -0,0 +1,11 @@
+HDF5 "tldouble.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_NATIVE_LDOUBLE
+ DATASPACE SIMPLE { ( 3 ) / ( 3 ) }
+ DATA {
+ (0): 1, 2, 3
+ }
+ }
+}
+}