diff options
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff_array.c | 180 |
1 files changed, 91 insertions, 89 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)); } |