E3SM-Project / EKAT

Tools and libraries for writing Kokkos-enabled HPC C++ in E3SM ecosystem
Other
15 stars 7 forks source link

Do not make EKAT enable FPEs during initialize_ekat_session #247

Open bartgol opened 2 years ago

bartgol commented 2 years ago

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:

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 commented 2 years ago

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

bartgol commented 2 years ago

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 commented 2 years ago

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

bartgol commented 2 years ago

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.