summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorKimmy Mu <kmu@hdfgroup.org>2020-01-23 02:59:49 (GMT)
committerKimmy Mu <kmu@hdfgroup.org>2020-01-23 02:59:49 (GMT)
commitd7414053638316081f11fad78474b2c3cde336c5 (patch)
treeccdc3f52b06fbaa0804e22f77f19c80e22996f36 /testpar
parent720ba8624aefd5b10783629ab59cb91708c4fcde (diff)
parent9afaf94bef740f89958a1a8aae369d5f607845f4 (diff)
downloadhdf5-d7414053638316081f11fad78474b2c3cde336c5.zip
hdf5-d7414053638316081f11fad78474b2c3cde336c5.tar.gz
hdf5-d7414053638316081f11fad78474b2c3cde336c5.tar.bz2
Merge pull request #2295 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/float to develop
* commit '9afaf94bef740f89958a1a8aae369d5f607845f4': not use hdf5 private header fix float type cmp warning fix float type cmp warning
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_mdset.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index a0b3253..ee868ee 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -13,6 +13,7 @@
#include "testphdf5.h"
#include "H5Dprivate.h"
+#include "H5private.h"
#define DIM 2
#define SIZE 32
@@ -332,7 +333,7 @@ void compact_dataset(void)
/* Verify data value */
for(i = 0; i < size; i++)
for(j = 0; j < size; j++)
- if(inme[(i * size) + j] != outme[(i * size) + j])
+ if(!H5_DBL_ABS_EQUAL(inme[(i * size) + j], outme[(i * size) + j]))
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
HDprintf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[(i * size) + j], inme[(i * size) + j]);
@@ -2477,7 +2478,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read data with expected data */
for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- if (data_read[j] != data[j]){
+ if (!H5_DBL_ABS_EQUAL(data_read[j], data[j])){
HDfprintf(stdout,
"%0d:%s: Reading datasets value failed in "
"Dataset %d, at position %d: expect %f, got %f.\n",
@@ -2540,7 +2541,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
VRFY((err >= 0), "H5Aread failed.\n");
/* compare read attribute data with expected data */
for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- if (att_read[j] != att[j]){
+ if (!H5_DBL_ABS_EQUAL(att_read[j], att[j])){
HDfprintf(stdout,
"%0d:%s: Mismatched attribute data read in Dataset %d, at position %d: expect %f, got %f.\n",
mpi_rank, fcn_name, i, j, att[j], att_read[j]);
@@ -2592,7 +2593,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
VRFY((err >= 0), "H5Aread failed.\n");
/* compare read attribute data with expected data */
for ( j = 0; j < LARGE_ATTR_SIZE; j++ )
- if (lg_att_read[j] != lg_att[j]){
+ if (!H5_DBL_ABS_EQUAL(lg_att_read[j], lg_att[j])){
HDfprintf(stdout,
"%0d:%s: Mismatched large attribute data read in Dataset %d, at position %d: expect %f, got %f.\n",
mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);