From d45280369f06f24bf7425610b039be726c2766ae Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Mon, 20 Dec 2021 17:06:32 -0500 Subject: Intel oneAPI packages: add 2022.1.1 release (#28096) Co-authored-by: Egorov, Andrey --- lib/spack/spack/compilers/oneapi.py | 10 ++++++++++ lib/spack/spack/test/compilers/detection.py | 5 +++++ 2 files changed, 15 insertions(+) (limited to 'lib') diff --git a/lib/spack/spack/compilers/oneapi.py b/lib/spack/spack/compilers/oneapi.py index a28259c02c..bf5c7767e9 100644 --- a/lib/spack/spack/compilers/oneapi.py +++ b/lib/spack/spack/compilers/oneapi.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from os.path import dirname + from spack.compiler import Compiler @@ -105,3 +107,11 @@ class Oneapi(Compiler): @property def stdcxx_libs(self): return ('-cxxlib', ) + + def setup_custom_environment(self, pkg, env): + # workaround bug in icpx driver where it requires sycl-post-link is on the PATH + # It is located in the same directory as the driver. Error message: + # clang++: error: unable to execute command: + # Executable "sycl-post-link" doesn't exist! + if self.cxx: + env.prepend_path('PATH', dirname(self.cxx)) diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py index 8bc3285d43..6eaced6b6d 100644 --- a/lib/spack/spack/test/compilers/detection.py +++ b/lib/spack/spack/test/compilers/detection.py @@ -204,6 +204,11 @@ def test_intel_version_detection(version_str, expected_version): 'Copyright (C) 1985-2021 Intel Corporation. All rights reserved.', '2021.4.0' ), + ( # IFX + 'ifx (IFORT) 2022.0.0 20211123\n' + 'Copyright (C) 1985-2021 Intel Corporation. All rights reserved.', + '2022.0.0' + ), ]) def test_oneapi_version_detection(version_str, expected_version): version = spack.compilers.oneapi.Oneapi.extract_version_from_output( -- cgit v1.2.3-60-g2f50