Skip to content

Add back +mfem to intel spec#1839

Merged
bmhan12 merged 5 commits intodevelopfrom
bugfix/han12/intel_spec
Apr 7, 2026
Merged

Add back +mfem to intel spec#1839
bmhan12 merged 5 commits intodevelopfrom
bugfix/han12/intel_spec

Conversation

@bmhan12
Copy link
Copy Markdown
Contributor

@bmhan12 bmhan12 commented Apr 6, 2026

This PR:

@bmhan12 bmhan12 added the TPL Issues related to Axom's third party libraries label Apr 6, 2026
EXPECT_NEAR(axom_rule.weight(j),
mfem_rule.IntPoint(j).weight,
axom::numeric_limits<double>::epsilon());
10 * axom::numeric_limits<double>::epsilon());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

See: https://github.com/llnl/axom/pull/1827/changes#diff-15ab7dd082a03dde95f0da64662e222a6ab7fa156756a3f1fc5752f2cf4dff8aR763-R766

Copy link
Copy Markdown
Member

@kennyweiss kennyweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bmhan12 !

"__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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

See: https://github.com/llnl/axom/pull/1827/changes#diff-15ab7dd082a03dde95f0da64662e222a6ab7fa156756a3f1fc5752f2cf4dff8aR763-R766

@bmhan12 bmhan12 merged commit 73b0dc1 into develop Apr 7, 2026
15 checks passed
@bmhan12 bmhan12 deleted the bugfix/han12/intel_spec branch April 7, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TPL Issues related to Axom's third party libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-enable +mfem for intel@2025.02.0 compiler

3 participants