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

Do not make EKAT enable FPEs during initialize_ekat_session #247

Open
bartgol opened this issue Aug 26, 2022 · 4 comments
Open

Do not make EKAT enable FPEs during initialize_ekat_session #247

bartgol opened this issue Aug 26, 2022 · 4 comments
Assignees
Labels

Comments

@bartgol
Copy link
Contributor

bartgol commented Aug 26, 2022

I marked it as a bug, but it's more like a conceptual change. EKAT should not take care of enabling any FPEs when the ekat session is started. There are issues for downstream apps, in some cases:

  • Case 1: the downstream app wants different FPEs: it has to disable all fpes, and enable the desired ones.
  • Case 2: the downstream app does not want fpes, but needs to disable FPEs set by an even more upstream app.

Proposal: remove "default" fpes from ekat. We can still have them in the ekat_test_session minilib, but not in the main ekat library. The cmake option EKAT_ENABLE_FPE is then simply enabling the "FPE machinery", which allows one to call ekat::enable_fpes(mask) and the likes.

@jeff-cohere
Copy link
Contributor

Is this urgent? Let me know if you want to chat about it.

@bartgol
Copy link
Contributor Author

bartgol commented Aug 26, 2022

No, as I said in Case 1, host apps can still circumvent this by disabling fpes after ekat's session is inited. I could do it in 5 min, but then have to test downstream apps, so I am just logging this here. I tagged you cause you did some work on FPEs, and thought this might affected you.

@jeff-cohere
Copy link
Contributor

One or the other of us will do it when we get a chance. 😄

@bartgol
Copy link
Contributor Author

bartgol commented Aug 26, 2022

Turns out this is more urgent than I thought. Unfortunately, when running with OpenMP, the mask set by ekat at init time is inherited by all threads (I assume during kokkos init), and when we later try to call ekat::disable_all_fpes(), we only disable them on thread 0.

I'll ge this taken care of right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants