Conversation
| EXPECT_NEAR(axom_rule.weight(j), | ||
| mfem_rule.IntPoint(j).weight, | ||
| axom::numeric_limits<double>::epsilon()); | ||
| 10 * axom::numeric_limits<double>::epsilon()); |
There was a problem hiding this comment.
Relaxes tolerance for intel:
axom/src/axom/primal/tests/primal_integral.cpp:647: Failure
The difference between axom_rule.weight(j) and mfem_rule.IntPoint(j).weight is 2.3001349089279977e-16, which exceeds axom::numeric_limits<double>::epsilon(), where
axom_rule.weight(j) evaluates to 0.00016824607436628127,
mfem_rule.IntPoint(j).weight evaluates to 0.00016824607436651128, and
axom::numeric_limits<double>::epsilon() evaluates to 2.2204460492503131e-16.
There was a problem hiding this comment.
Thanks @bmhan12 -- I have a similar fix in one of my PRs for other compilers with -march=native
Essentially:
+ // MFEM and Axom both generate Gauss-Legendre rules, but in builds that enable
+ // `-march=native` we can see ULP-level differences in the computed nodes/weights
+ // even though the rules are equivalent for integration purposes.
+ const double fp_tol = 8 * axom::numeric_limits<double>::epsilon();
- const double fp_tol = axom::numeric_limits<double>::epsilon();
| "__comment__":"# Order matters - if ~python spec is built last this removes view of python", | ||
| "toss_4_x86_64_ib": | ||
| [ "~python+devtools+hdf5~mfem+c2c+adiak+caliper %intel_25", | ||
| [ "+python+devtools+hdf5+mfem+c2c+adiak+caliper %%intel_25 ^mfem cxxflags=-fp-speculation=safe %intel_25", |
There was a problem hiding this comment.
Thanks @bmhan12 -- can you please explain the double percent and repeat intel_25 at the end of this line?
%%intel_25 ... %intel_25
Presumably, something to do w/ compiler mixing (?)
There was a problem hiding this comment.
Presumably, something to do w/ compiler mixing (?)
Yes, to give spack a stronger suggestion/preference to use the same compilers:
Documentation: https://spack.readthedocs.io/en/latest/spec_syntax.html#dependency-propagation
Original Issue Description: spack/spack#49696
You can also apparently do this for variants as well:
https://spack.readthedocs.io/en/latest/spec_syntax.html#variant-propagation-to-dependencies
| EXPECT_NEAR(axom_rule.weight(j), | ||
| mfem_rule.IntPoint(j).weight, | ||
| axom::numeric_limits<double>::epsilon()); | ||
| 10 * axom::numeric_limits<double>::epsilon()); |
There was a problem hiding this comment.
Thanks @bmhan12 -- I have a similar fix in one of my PRs for other compilers with -march=native
Essentially:
+ // MFEM and Axom both generate Gauss-Legendre rules, but in builds that enable
+ // `-march=native` we can see ULP-level differences in the computed nodes/weights
+ // even though the rules are equivalent for integration purposes.
+ const double fp_tol = 8 * axom::numeric_limits<double>::epsilon();
- const double fp_tol = axom::numeric_limits<double>::epsilon();
This PR:
-fp-model=preciseflag to address correctness issue (notably this unit test):axom/src/axom/core/tests/numerics_determinants.hpp
Line 200 in be2a0b4