-
Notifications
You must be signed in to change notification settings - Fork 284
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
Score-P EB: Select the oneAPI compiler suite when enabled in the Intel compiler toolchain #3228
base: develop
Are you sure you want to change the base?
Conversation
858c1b0
to
9e5dc34
Compare
@geimer @cfeld @Flamefire please give this some eyes, thanks |
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.
When exactly does this need to be used? I.e. what is the effect of using "oneapi" over "intel"? If I understood you correctly the configure used by those projects will ignore $CC
/$CXX
and similar env variables, is this correct? What is used instead?
This would need to be clarified first especially for the hard failure for "to old" versions introduced here.
If I understand this correctly "intel-compilers" starting at some point include "oneAPI compilers" which differ in the naming (e.g. icx
instead of icc
). But they seemingly still include the old compilers (at least until 2024 releases), i.e. the module contains both. Is that correct?
If that is the case then we can use either one in this easyblock depending on the version, can't we?
Reason for the question is what we need to check here: Do we care about those new releases containing oneAPI compilers in general or only if oneAPI compilers were enabled to be used (by toolchain options)? I.e. what exactly is/is not supported by Score-P & Co?
I think we also need to revise the logic a bit: In the toolchain definition self.toolchain.options['oneapi']
defaults to None
but if set takes precedence over "oneapi_c_cxx" & "oneapi_fortran". This should be mirrored here.
Maybe it is better to use is_oneapi_cc = self.toolchain.COMPILER_CC != IntelIccIfort.COMPILER_CC
and similar for COMPILER_FC
to detect if oneAPI is in use
Also the error for "mixed Intel oneAPI and classic Fortran family" might be removed:
- Just enabling "oneapi" should be fine, especially "ifx and ifort are binary (.o/.obj) and module file (.mod) compatible."
- It should at least take
self.toolchain.options['oneapi']
into account (see above)
# Since intel-compilers 2022.2.0 it uses the icx/icpx compilers, AfS projects support them | ||
# since these version |
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.
The version is a detail which I don't think is relevant here. Also "AfS" is unknown at this point. Maybe:
# Since intel-compilers 2022.2.0 it uses the icx/icpx compilers, AfS projects support them | |
# since these version | |
# Intel oneAPI compilers (icx, icpx...) are supported since these versions: |
# AfS packages do not yet support oneAPI compilers | ||
raise EasyBuildError("Support to build with Intel oneAPI family started with " + | ||
f"{self.name} {oneapi_since.get(self.name, '0')} but not {self.version}") | ||
if not self.toolchain.options.get('oneapi_fortran', False): |
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.
This will fail in default scenarios: For "intel-compilers >= 2022.2.0" only oneapi_c_cxx
is enabled by default, but not oneapi_fortran
. I opened an issue asking for clarification/change
Score-P's build system is a bit complicated. To select a compiler during Our intention is to have a combination of compilers we're certain are working well together. Theoretically, one can set Support for the LLVM-based oneAPI compilers was introduced in Score-P version 8.0. If one uses
You're right that "intel-compilers" started to include newer LLVM-based compilers at some point. With this, both In theory, Score-P can handle both compilers variants, but only one per installation.
As mentioned before, mixing the compilers is not intended us, though it may still work if |
@Thyre Thanks for the explanation
As confirmed by Bert those "platform files" set/override the relevant CC/CXX/... variables. So that is basically the relevance of this flag in this context.
This sounds to me like what we should use. Especially as " So IMO the behavior currently used by EasyBuild (use new C/C++ compilers but old Fortran compiler by default) seems to match the best support, doesn't it? However if I understood correctly the configure will also set compiler flags based on that and hence might set unsupported flags. But when I look at e.g.
Agreed. We just have to be sure to get the conditions correct. See my suggestion to check
See above: Wouldn't it be possible and beneficial to mix the new C/C++ with the old iffort for best feature support?
But |
This would provide the best compiler instrumentation support for oneAPI releases prior 2024.0. From 2024.0 on, using But Score-P's configure option To configure a oneAPI/classic mix, one can either use Score-P's configure assumes that MPI (
On a no-cross-compile machine, configure uses all variables from With moderate changes to Score-P/Scalasca/OTF2/CUBE* one could prepend to
Having mixed oneAPI/classic EasyBuild defaults is IMO temporary (what was the reason in the first place?). For the Score-P EasyBlock, I'd suggest to stick with classic ( We are happy to assists users that really need a mixed version, to manually install such a version using |
It looks like it is planned by EB to switch also the Fortran compiler to oneAPI for 2024.0, see easybuilders/easybuild-framework#4455
That was my intention: Use the default compilers as set by EB in the configure via
I was thinking when using
Reason was that the Fortran compiler wasn't yet considered ready (by Intel). I agree with the rest |
While I cannot confirm that it works (or not), having We use a special check which fails when any output on # AFS_COMPILE_IFELSE_WERROR(input, [action-if-true], [action-if-false])
# -------------------------------------------------------------------------------
# Convenient wrapper of AC_COMPILE_IFELSE macro which sets ac_[]_AC_LANG_ABBREV[]_werror_flag
# so that the compilation fails if there is any output on stderr.
#
# The remaining behavior matches the one found in AC_COMPILE_IFELSE.
#
AC_DEFUN([AFS_COMPILE_IFELSE_WERROR],[
# Any non-null value works here
afs_compile_ifelse_werror_[]_AC_LANG_ABBREV[]_werror_flag_save=${ac_[]_AC_LANG_ABBREV[]_werror_flag}
ac_[]_AC_LANG_ABBREV[]_werror_flag=yes
# Now call AC_COMPILE_IFELSE like one would normally do
AC_COMPILE_IFELSE([$1], [$2], [$3])
ac_[]_AC_LANG_ABBREV[]_werror_flag=${afs_compile_ifelse_werror_[]_AC_LANG_ABBREV[]_werror_flag_save}
]) |
No description provided.