-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
intel-oneapi-mkl: change logic for gfortran compatibility #44242
Conversation
@rscohn2 thank you for opening this PR. Sorry for the late reply, but I'm out of office until Wednesday. I'll have a look when I'm back. |
@rscohn2 I see that there are still un-resolved conversations with @alalazo. Should I test this PR now or when they are resolved? (I would prefer the latter.) From our discussion in #43673 I think a variant might indeed be better for users, since the default behavior will stay the same and not break pure C/C++ projects. However, I don't think there is a way to make C/C++ projects relying in |
@alalazo: This is a binary package that does not require compilation. MKL put the C & Fortran support in the same library so we have to know whether to provide libmkl_gf or libmkl_intel. Some packages query spack for the libraries and some packages use cmake to know the mkl library names. If intel-oneapi-mkl returns libmkl_gf and another package uses cmake and links with libmkl_intel, there will be undefined behavior. cmake uses libmkl_intel unless a packages enables fortran and configures gfortran. Until recently, we did not support gfortran in the spack package, so it always supported C (gcc/intel/oneapi) and ifx/ifort. I don't think spack has enough information to decide which library is needed so I would like to have an explicit variant like gfortran so the user can decide and be sure they are getting what they want. |
Modeling of the runtime can be improved, but it will take me a bit to get to it
@RMeli: If it looks ok, can you approve? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rscohn2, LGTM.
But as I said before, it would be good to add some sort of user-facing warning when using intel-oneapi-mkl
with gcc
, pointing to the possibility to enable this variant.
Thanks for the reminder. |
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
Using fortran-rt check from @alalazo, I added a warning if +gfortran is not used. |
Thank you, I'll test it right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could confirm that with ~gfortran
the old behavior appears, and +gfortran
fixes my issue.
I did not see any warning/message though.
As a test, I made blaspp depend on fortran:
and then did:
It does not emit a warning:
If I emit the warning for |
Thanks for double checking. Let's just remove the warning then? |
I removed the warning, can you approve 1 more time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Sorry, I disabled auto-merge by mistake. I already re-enabled it. |
Use a variant to request gfortran compatibility instead of toolchain.
See discussion in #43673
@RMeli: Can you test your example. I testing:
spack install dla-future ^intel-oneapi-mkl