Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better icx flags and (indirectly) force -qopenmp w/ icx >= 24.x #17

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

nmnobre
Copy link
Member

@nmnobre nmnobre commented Dec 17, 2024

Tested with ic(p)x 2022.1.0, 2024.2.1 and 2025.0.0.
The two most recent, 2024.2.1 and 2025.0.0, now compile libMesh cleanly.
The oldest, 2022.1.0, produces a warning regarding fast fp math which is well documented over the web, e.g. assimp/assimp#4450 or https://stackoverflow.com/questions/73534181/fast-floating-point-model-broken-on-next-generation-intel-compiler. I chose neither to silence the warning (so the user knows the compiler is broken), nor to switch to precise math (so the user doesn't lose performance) - the (now informed) user can then choose to silence the warning themselves, switch to a different compiler, or simply live with the consequences...

Cheers,
-N

@jwpeterson
Copy link
Member

@roystgnr any issues with merging this one? There is at least one request for updated Intel compiler support to make it into the 1.8.x release branch.

@nmnobre nmnobre changed the title Better icx flags and (indirectly) force -qopenmp w/ icx > 24.x Better icx flags and (indirectly) force -qopenmp w/ icx >= 24.x Dec 20, 2024
@roystgnr
Copy link
Member

This actually looks like a terrifying source of Heisenbugs to me. Turn on IEEE-compliant FP in dbg mode, but leave it off in other modes? dbg is supposed to produce the same results as opt, only slower; otherwise in a sense we won't actually have a way to debug opt-mode failures.

My preference would be "the compiler does what the IEEE says unless the computer passes a flag to tell it otherwise", but I have enough bad memories of false positives from icpc from long enough ago that I wouldn't complain about "the user picked Intel and should know better by now, so it's on their head" instead; I just want the same behavior regardless of debugging-vs-optimization levels.

Of course, if beggars can be choosers, what I'd love is a way to control this stuff from configure regardless of compiler. clang and gcc also have their own "--max-power" configure flags that foolish adventurous users might want to experiment with.

@roystgnr
Copy link
Member

Thanks! I'm good to merge this when you are, then. And sorry for not catching up on my notifications earlier.

@nmnobre
Copy link
Member Author

nmnobre commented Dec 24, 2024

dbg is supposed to produce the same results as opt, only slower; otherwise in a sense we won't actually have a way to debug opt-mode failures.

Agreed and reverted.

My preference would be "the compiler does what the IEEE says unless the computer passes a flag to tell it otherwise"

Yeah, I understand and agree, but not with Intel's compilers (as you said, "the user picked Intel and should know better by now"), see the table here.

Of course, if beggars can be choosers, what I'd love is a way to control this stuff from configure regardless of compiler.

Users can always set their own flags (with higher priority), right? So we're good there?

I'm good to merge this when you are, then.

I'm good, and you're the boss! :)
Happy Roy, happy Nuno. xD

@roystgnr roystgnr merged commit 91cdcdc into libMesh:master Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants