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

Add default compiler flags for Cray #47

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

ioanhadade
Copy link
Contributor

Add compiler flags -ram -emf -hflex_mp=conservative -Othread1 -hfp1 -hadd_paren to prevent random SIGFPEs

Copy link
Contributor

@awnawab awnawab left a comment

Choose a reason for hiding this comment

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

Thanks a lot @ioanhadade for filing this fix 🙏 just a small nitpicky comment that would help clarify what some of these flags are for.

@@ -16,6 +16,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
set(checkbounds_flags "-Rb")
set(fpe_flags "-Ktrap=fp")
set(initsnan_flags "-ei")
set(general_flags "-ram -emf -hflex_mp=conservative -Othread1 -hfp1 -hadd_paren" )
Copy link
Contributor

Choose a reason for hiding this comment

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

At the time I was suggesting a quick fix, but I think we can split up these flags into more descriptive categories. So possibly something like this:

set(threading_flags "-hflex_mp=conservative -Othread1")
set(fpmodel_flags "-hfp1 -hadd_paren")
set(baseline_flags "-ram -emf")

Copy link
Contributor

@awnawab awnawab left a comment

Choose a reason for hiding this comment

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

Thanks a lot @ioanhadade for addressing the comment 🙏 one optional nitpick is to remove the setting of general_flags which no longer exist, but I can also mop this up in a future PR.

@ioanhadade
Copy link
Contributor Author

Thanks a lot @ioanhadade for addressing the comment 🙏 one optional nitpick is to remove the setting of general_flags which no longer exist, but I can also mop this up in a future PR.

I can do it now. One sec.

@awnawab awnawab merged commit 3e60dd0 into ecmwf-ifs:develop-1.3 Dec 18, 2024
11 of 12 checks passed
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.

2 participants