Git Product home page Git Product logo

Comments (3)

ChristosT avatar ChristosT commented on June 13, 2024

I stumbled upon this recently.
When it comes to t_conduit_node_compare here are my findings:

  • It happens only on float types.
  • -fp-model=precise does not help
  • One solution is to modify how the " Leaf Difference Test " modifies the array elements and set more that 1 bytes.
From 694f70f9960682a298fe451fbbf061f24e176d92 Mon Sep 17 00:00:00 2001
From: Christos Tsolakis <[email protected]>
Date: Fri, 15 Dec 2023 00:46:58 +0000
Subject: [PATCH] t_conduit_node_compare: Apply memset to full size of element

fixes comparison failure with Intel compilers
---
 src/tests/conduit/t_conduit_node_compare.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/conduit/t_conduit_node_compare.cpp b/src/tests/conduit/t_conduit_node_compare.cpp
index d60a136d..8de2624c 100644
--- a/src/tests/conduit/t_conduit_node_compare.cpp
+++ b/src/tests/conduit/t_conduit_node_compare.cpp
@@ -137,8 +137,8 @@ TEST(conduit_node_compare, compare_leaf_numeric)

             { // Leaf Difference Test //
                 Node info;
-                memset(o.element_ptr(0), 1, 1);
-                memset(o.element_ptr(4), 1, 1);
+                memset(o.element_ptr(0), 1, o.dtype().element_bytes());
+                memset(o.element_ptr(4), 1, o.dtype().element_bytes());
                 EXPECT_TRUE(diff_nodes(n, o, info));

                 Node &info_diff = info["value"];
-- 
2.27.0

tested using intel compiler 2023.0.0 (icc (ICC) 2021.8.0 20221119)

from conduit.

cyrush avatar cyrush commented on June 13, 2024

Thanks @ChristosT and @BradWhitlock.

I was able to replicate with Brad's build script on a LLNL system.

Looking at the details -- it's clear the floating point tests are ill-posed.

Setting the first byte of the floating point numbers effectively gives us another "zero", which may diff clean.

Setting the full bytes is a good remedy, thanks @ChristosT for suggesting that solution.

I'll get a PR in to resolve this.

from conduit.

BradWhitlock avatar BradWhitlock commented on June 13, 2024

Thanks @cyrush!

from conduit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.