Skip to content

Commit

Permalink
Merge pull request #450 from climbfuji/feature/steps_towards_unified_…
Browse files Browse the repository at this point in the history
…env_with_oneapi

Updates towards compiling full unified environment with Intel oneAPI compilers (icx, icpx, ifort)
  • Loading branch information
climbfuji authored Jul 11, 2024
2 parents 0605595 + 0135960 commit f6fc8ec
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/spack/env/cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ case "$command" in
# Edge case for Intel's oneAPI compilers when using the legacy classic compilers:
# Pass flags to disable deprecation warnings to vcheck mode, since the warnings
# to stderr confuse tools that parse the output of compiler version checks.
case ${SPACK_CXXFLAGS} in
case ${SPACK_CFLAGS} in
*"-diag-disable=10441"* )
vcheck_flags="-diag-disable=10441"
;;
Expand Down Expand Up @@ -273,9 +273,9 @@ case "$command" in
# Edge case for Intel's oneAPI compilers when using the legacy classic compilers:
# Pass flags to disable deprecation warnings to vcheck mode, since the warnings
# to stderr confuse tools that parse the output of compiler version checks.
case ${SPACK_CXXFLAGS} in
*"-diag-disable=10441"* )
vcheck_flags="-diag-disable=10441"
case ${SPACK_FFLAGS} in
*"-diag-disable=10448"* )
vcheck_flags="-diag-disable=10448"
;;
esac
command="$SPACK_FC"
Expand Down
1 change: 1 addition & 0 deletions var/spack/repos/builtin/packages/fckit/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def cmake_args(self):

if (
self.spec.satisfies("%intel")
or self.spec.satisfies("%oneapi")
or self.spec.satisfies("%gcc")
or self.spec.satisfies("%nvhpc")
):
Expand Down
11 changes: 11 additions & 0 deletions var/spack/repos/builtin/packages/qt/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Qt(Package):

license("LGPL-3.0-only")

version("5.15.14", sha256="fdd3a4f197d2c800ee0085c721f4bef60951cbda9e9c46e525d1412f74264ed7")
version("5.15.13", sha256="9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca")
version("5.15.12", sha256="93f2c0889ee2e9cdf30c170d353c3f829de5f29ba21c119167dee5995e48ccce")
version("5.15.11", sha256="7426b1eaab52ed169ce53804bdd05dfe364f761468f888a0f15a308dc1dc2951")
version("5.15.10", sha256="b545cb83c60934adc9a6bbd27e2af79e5013de77d46f5b9f5bb2a3c762bf55ca")
Expand Down Expand Up @@ -259,6 +261,11 @@ def determine_version(cls, exe):
# https://doc.qt.io/qt-5.14/supported-platforms.html
conflicts("%gcc@:4", when="@5.14:")

# Compiling with oneAPI compilers icx, icpx requires patching
# This has only been tested for 5.15.14 so far
conflicts("%oneapi", when="@:5.15.13")
patch("qt51514-oneapi.patch", when="@5.15.14: %oneapi")

# Non-macOS dependencies and special macOS constraints
if MACOS_VERSION is None:
with when("+gui"):
Expand Down Expand Up @@ -288,6 +295,10 @@ def determine_version(cls, exe):
# Mapping for compilers/systems in the QT 'mkspecs'
compiler_mapping = {
"intel": ("icc",),
# This only works because we apply patch "qt51514-oneapi.patch"
# above that replaces calls to "icc" with calls to "icx" in
# qtbase/mkspecs/*
"oneapi": ("icc",),
"apple-clang": ("clang-libc++", "clang"),
"clang": ("clang-libc++", "clang"),
"aocc": ("clang-libc++", "clang"),
Expand Down
31 changes: 31 additions & 0 deletions var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- a/qtbase/mkspecs/common/icc-base-unix.conf 2024-05-07 23:17:16.000000000 -0600
+++ b/qtbase/mkspecs/common/icc-base-unix.conf 2024-07-10 21:32:47.808327220 -0600
@@ -16,7 +16,7 @@
QMAKE_CFLAGS_OPTIMIZE = -O2
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os

-QMAKE_CC = icc
+QMAKE_CC = icx
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
@@ -61,7 +61,7 @@
QMAKE_CFLAGS_SHANI += -msha
QMAKE_CFLAGS_VAES += -mvaes

-QMAKE_CXX = icpc
+QMAKE_CXX = icpx
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_APP = $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
@@ -92,8 +92,8 @@
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden

-QMAKE_LINK = icpc
-QMAKE_LINK_SHLIB = icpc
+QMAKE_LINK = icpx
+QMAKE_LINK_SHLIB = icpx
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =

0 comments on commit f6fc8ec

Please sign in to comment.