diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-01-29 20:15:00 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-01-29 20:15:00 (GMT) |
commit | 1eb6a4512ba275681b075e96c7be92511a6b8b2b (patch) | |
tree | ed24eae2eedcb34bcaa8eeda49beaae9e8833d4a /tools | |
parent | 661cf6b79be0053050c52958f680f933e90f7cf7 (diff) | |
parent | 30ca0cdc9a0b1f7fc1521007c65d9baeb69c9a23 (diff) | |
download | hdf5-1eb6a4512ba275681b075e96c7be92511a6b8b2b.zip hdf5-1eb6a4512ba275681b075e96c7be92511a6b8b2b.tar.gz hdf5-1eb6a4512ba275681b075e96c7be92511a6b8b2b.tar.bz2 |
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '30ca0cdc9a0b1f7fc1521007c65d9baeb69c9a23':
fix bad function cast warning
initialization discards const warning
testpar/t_2Gio.c: Fix a typo that I think was introduced by a previous warnings PR. An array element was assigned to itself---shape[2]Â =Â shape[2];---instead of being assigned to chunk[2].
Reduce casts of HDcalloc()/HDmalloc() that -Wc++-compat required.
Reduce differences between my -Werror branch and `develop`:
fix unused function warning
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff_array.c | 180 | ||||
-rw-r--r-- | tools/src/h5import/h5import.c | 2 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_main.c | 12 | ||||
-rw-r--r-- | tools/test/perform/pio_engine.c | 14 | ||||
-rw-r--r-- | tools/test/perform/sio_engine.c | 5 |
5 files changed, 112 insertions, 101 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 6450745..a2e0d21 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -155,7 +155,7 @@ static void print_char_pos(int *ph, int pp, hsize_t curr_pos, size_t u, hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, const char *obj1, const char *obj2); static void h5diff_print_char(char ch); -static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, +static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t idx, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, hid_t container1_id, hid_t container2_id, /*where the reference came from*/ @@ -410,9 +410,11 @@ hsize_t diff_array(void *_mem1, void *_mem2, hsize_t nelmts, hsize_t hyper_start * Dereference the object and compare the type (basic object type). *------------------------------------------------------------------------- */ -static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, int rank, - hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, - hid_t container1_id, hid_t container2_id, +static hsize_t +diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t idx, int rank, + hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, + const char *obj1, const char *obj2, + hid_t container1_id, hid_t container2_id, int *ph, /*print header */ mcomp_t *members) /*compound members */ { @@ -472,7 +474,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, offset = members->offsets[j]; memb_type = members->ids[j]; - nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, index, + nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, idx, rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members->m[j]); } } @@ -576,11 +578,11 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (size1 != size2) if (print_data(opts)) for (u = size; u < sizex; u++) - character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph); + character_compare(s + u, sx + u, idx, u, rank, dims, acc, pos, opts, obj1, obj2, ph); } else for (u = 0; u < size; u++) - nfound += character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph); + nfound += character_compare(s + u, sx + u, idx, u, rank, dims, acc, pos, opts, obj1, obj2, ph); } /* end check for NULL pointer for string */ } break; @@ -593,7 +595,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, H5TOOLS_DEBUG("diff_datum H5T_BITFIELD"); /* byte-by-byte comparison */ for (u = 0; u < type_size; u++) - nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph); + nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph); break; /*------------------------------------------------------------------------- @@ -604,7 +606,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, H5TOOLS_DEBUG("diff_datum H5T_OPAQUE"); /* byte-by-byte comparison */ for (u = 0; u < type_size; u++) - nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph); + nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph); break; /*------------------------------------------------------------------------- @@ -645,7 +647,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, */ nfound += 1; if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(S_FORMAT, enum_name1, enum_name2); } @@ -655,14 +657,14 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (HDstrcmp(enum_name1, enum_name2) != 0) { nfound = 1; if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(S_FORMAT, enum_name1, enum_name2); } } else { for (u = 0; u < type_size; u++) - nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph); + nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph); } } /* enable error reporting */ @@ -692,7 +694,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, for (u = 0, nelmts = 1; u < (unsigned) ndims; u++) nelmts *= adims[u]; for (u = 0; u < nelmts; u++) { - nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, index, + nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, idx, rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members); } H5Tclose(memb_type); @@ -1102,7 +1104,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, nelmts = ((hvl_t *)((void *)mem1))->len; for (j = 0; j < nelmts; j++) - nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, index, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */ + nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, idx, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */ rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members); H5Tclose(memb_type); @@ -1132,7 +1134,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (ABS(temp1_char-temp2_char) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } @@ -1145,7 +1147,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } @@ -1153,7 +1155,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); } @@ -1166,7 +1168,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } @@ -1174,7 +1176,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && ABS(temp1_char - temp2_char) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); } @@ -1183,7 +1185,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_char != temp2_char) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } @@ -1208,7 +1210,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } @@ -1221,7 +1223,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } @@ -1229,7 +1231,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } @@ -1242,7 +1244,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } @@ -1250,7 +1252,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && PDIFF(temp1_uchar, temp2_uchar) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } @@ -1259,7 +1261,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_uchar != temp2_uchar) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } @@ -1284,7 +1286,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (ABS(temp1_short - temp2_short) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } @@ -1297,7 +1299,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } @@ -1305,7 +1307,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); } @@ -1318,7 +1320,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } @@ -1326,7 +1328,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && ABS(temp1_short - temp2_short) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); } @@ -1335,7 +1337,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_short != temp2_short) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } @@ -1360,7 +1362,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } @@ -1373,7 +1375,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } @@ -1381,7 +1383,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); } @@ -1394,7 +1396,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } @@ -1402,7 +1404,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && PDIFF(temp1_ushort, temp2_ushort) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); } @@ -1411,7 +1413,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_ushort != temp2_ushort) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } @@ -1436,7 +1438,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (ABS(temp1_int-temp2_int) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } @@ -1449,7 +1451,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } @@ -1457,7 +1459,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); } @@ -1470,7 +1472,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } @@ -1478,7 +1480,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && ABS(temp1_int - temp2_int) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); } @@ -1487,7 +1489,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_int != temp2_int) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } @@ -1512,7 +1514,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (PDIFF(temp1_uint, temp2_uint) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } @@ -1525,7 +1527,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } @@ -1533,7 +1535,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); } @@ -1546,7 +1548,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } @@ -1554,7 +1556,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && PDIFF(temp1_uint,temp2_uint) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); } @@ -1563,7 +1565,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_uint != temp2_uint) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } @@ -1588,7 +1590,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (ABS(temp1_long-temp2_long) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } @@ -1601,7 +1603,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } @@ -1609,7 +1611,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); } @@ -1622,7 +1624,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } @@ -1630,7 +1632,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && ABS(temp1_long-temp2_long) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); } @@ -1639,7 +1641,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_long != temp2_long) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } @@ -1664,7 +1666,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (opts->d && !opts->p) { if (PDIFF(temp1_ulong, temp2_ulong) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } @@ -1677,7 +1679,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } @@ -1685,7 +1687,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); } @@ -1698,7 +1700,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } @@ -1706,7 +1708,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && PDIFF(temp1_ulong,temp2_ulong) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); } @@ -1715,7 +1717,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (temp1_ulong != temp2_ulong) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } @@ -1766,7 +1768,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (!isnan1 && !isnan2) { if (ABS(temp1_float-temp2_float) > (float) opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1776,7 +1778,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1803,7 +1805,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1811,7 +1813,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && (double) ABS(temp1_float - temp2_float) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); @@ -1822,7 +1824,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1849,7 +1851,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1857,7 +1859,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); @@ -1868,7 +1870,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1881,7 +1883,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, */ else if (equal_float(temp1_float, temp2_float, opts) == FALSE) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } @@ -1924,7 +1926,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (!isnan1 && !isnan2) { if (ABS(temp1_double-temp2_double) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -1934,7 +1936,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -1961,7 +1963,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -1969,7 +1971,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } @@ -1979,7 +1981,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2006,7 +2008,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2015,7 +2017,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } @@ -2025,7 +2027,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2038,7 +2040,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, */ else if (equal_double(temp1_double, temp2_double, opts) == FALSE) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2085,7 +2087,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (!isnan1 && !isnan2) { if (ABS(temp1_double-temp2_double) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2095,7 +2097,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2122,7 +2124,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2130,7 +2132,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } @@ -2140,7 +2142,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2167,7 +2169,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, if (not_comparable && !both_zero) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2175,7 +2177,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, } else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) { if (print_data(opts)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } @@ -2185,7 +2187,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } @@ -2198,7 +2200,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, */ else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) { if (print_data(opts)) { - print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); + print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index fc4d431..b11fe7f 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -1431,7 +1431,7 @@ static int processConfigurationFile(char *infile, struct Input *in) /* Initialize machine endian */ volatile uint32_t ibyte=0x01234567; /* 0 for big endian, 1 for little endian. */ - if ((*((uint8_t*)(&ibyte))) == 0x67) { + if ((*((volatile uint8_t*)(&ibyte))) == 0x67) { if ((kindex = OutputByteOrderStrToInt("LE")) == -1) { (void) HDfprintf(stderr, "%s", err11e); return (-1); diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index c0c8a2a..16899a3 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -412,7 +412,7 @@ set_sort_order(const char *form) static int parse_command_line(int argc, const char **argv, pack_opt_t* options) { - int opt; + int bound, opt; int ret_value = 0; /* parse command line options */ @@ -492,19 +492,21 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) break; case 'j': - options->low_bound = (H5F_libver_t)HDatoi(opt_arg); - if (options->low_bound < H5F_LIBVER_EARLIEST || options->low_bound > H5F_LIBVER_LATEST) { + bound = HDatoi(opt_arg); + if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) { error_msg("in parsing low bound\n"); goto done; } + options->low_bound = bound; break; case 'k': - options->high_bound = (H5F_libver_t)HDatoi(opt_arg); - if (options->high_bound < H5F_LIBVER_EARLIEST || options->high_bound > H5F_LIBVER_LATEST) { + bound = HDatoi(opt_arg); + if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) { error_msg("in parsing high bound\n"); goto done; } + options->high_bound = bound; break; case 'c': diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c index 3863550..cdd698e 100644 --- a/tools/test/perform/pio_engine.c +++ b/tools/test/perform/pio_engine.c @@ -129,6 +129,7 @@ static herr_t do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags); static herr_t do_fclose(iotype iot, file_descr *fd); static void do_cleanupfile(iotype iot, char *fname); +static off_t sqrto(off_t); /* * Function: do_pio @@ -199,7 +200,7 @@ do_pio(parameters param) bsize = buf_size; /* Actual buffer size */ } else { - snbytes = (off_t)sqrt((double)nbytes); /* General dataset size */ + snbytes = sqrto(nbytes); /* General dataset size */ bsize = buf_size * blk_size; /* Actual buffer size */ } @@ -596,7 +597,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* nbytes is always the number of bytes per dataset (1D or 2D). If the dataspace is 2D, snbytes is the size of a side of the dataset square. */ - snbytes = (off_t)sqrt((double)nbytes); + snbytes = sqrto(nbytes); /* Contiguous Pattern: */ if (!parms->interleaved) { @@ -1489,6 +1490,13 @@ done: return ret_code; } +static off_t +sqrto(off_t x) +{ + double root_x = sqrt((double)x); + return (off_t)root_x; +} + /* * Function: do_read * Purpose: read the required amount of data from the file. @@ -1581,7 +1589,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* nbytes is always the number of bytes per dataset (1D or 2D). If the dataspace is 2D, snbytes is the size of a side of the 'dataset square'. */ - snbytes = (off_t)sqrt((double)nbytes); + snbytes = sqrto(nbytes); bsize = buf_size * blk_size; diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index 69409bb..9ea94cb 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -1268,8 +1268,7 @@ done: * 'temp' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +H5_GCC_DIAG_OFF(format-nonliteral) static void do_cleanupfile(iotype iot, char *filename) { @@ -1331,5 +1330,5 @@ do_cleanupfile(iotype iot, char *filename) } } } -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) |