intel-oneapi-compilers 2023.2.3: added new version to dpcpp package (#41680)
* add new cpp compiler version * empty ftn for 2023.2.3 * OLD ftn in 2023.2.3 version * tolerate missing fortran compiler --------- Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>
This commit is contained in:
parent
0dc3fc2d21
commit
330a9a7c9a
@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from spack.build_environment import dso_suffix
|
from spack.build_environment import dso_suffix
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
@ -29,6 +31,13 @@
|
|||||||
"sha256": "57faf854b8388547ee4ef2db387a9f6f3b4d0cebd67b765cf5e844a0a970d1f9",
|
"sha256": "57faf854b8388547ee4ef2db387a9f6f3b4d0cebd67b765cf5e844a0a970d1f9",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"version": "2023.2.3",
|
||||||
|
"cpp": {
|
||||||
|
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d85fbeee-44ec-480a-ba2f-13831bac75f7/l_dpcpp-cpp-compiler_p_2023.2.3.12_offline.sh",
|
||||||
|
"sha256": "b80119a3e54306b85198e907589b00b11c072f107ac39c1686a1996f76466b26",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "2023.2.1",
|
"version": "2023.2.1",
|
||||||
"cpp": {
|
"cpp": {
|
||||||
@ -196,6 +205,7 @@ class IntelOneapiCompilers(IntelOneApiPackage):
|
|||||||
|
|
||||||
for v in versions:
|
for v in versions:
|
||||||
version(v["version"], expand=False, **v["cpp"])
|
version(v["version"], expand=False, **v["cpp"])
|
||||||
|
if "ftn" in v:
|
||||||
resource(
|
resource(
|
||||||
name="fortran-installer",
|
name="fortran-installer",
|
||||||
placement="fortran-installer",
|
placement="fortran-installer",
|
||||||
@ -255,7 +265,9 @@ def install(self, spec, prefix):
|
|||||||
super().install(spec, prefix)
|
super().install(spec, prefix)
|
||||||
|
|
||||||
# install fortran
|
# install fortran
|
||||||
self.install_component(find("fortran-installer", "*")[0])
|
ftn = find("fortran-installer", "*")
|
||||||
|
if ftn:
|
||||||
|
self.install_component(ftn[0])
|
||||||
|
|
||||||
# Some installers have a bug and do not return an error code when failing
|
# Some installers have a bug and do not return an error code when failing
|
||||||
if not is_exe(self._llvm_bin.ifx):
|
if not is_exe(self._llvm_bin.ifx):
|
||||||
@ -289,6 +301,10 @@ def inject_rpaths(self):
|
|||||||
|
|
||||||
def write_config_file(self, flags, path, compilers):
|
def write_config_file(self, flags, path, compilers):
|
||||||
for compiler in compilers:
|
for compiler in compilers:
|
||||||
|
# Tolerate missing compilers.
|
||||||
|
# Initially, we installed icx/ifx/icc/ifort into a single prefix.
|
||||||
|
# Starting in 2024, there is no icc. 2023.2.3 does not have an ifx.
|
||||||
|
if os.path.exists(compiler):
|
||||||
p = path.join(compiler + ".cfg")
|
p = path.join(compiler + ".cfg")
|
||||||
with open(p, "w") as f:
|
with open(p, "w") as f:
|
||||||
f.write(" ".join(flags))
|
f.write(" ".join(flags))
|
||||||
@ -329,11 +345,7 @@ def extend_config_flags(self):
|
|||||||
self.write_config_file(common_flags + llvm_flags, self._llvm_bin, ["icx", "icpx"])
|
self.write_config_file(common_flags + llvm_flags, self._llvm_bin, ["icx", "icpx"])
|
||||||
self.write_config_file(common_flags + classic_flags, self._llvm_bin, ["ifx"])
|
self.write_config_file(common_flags + classic_flags, self._llvm_bin, ["ifx"])
|
||||||
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["ifort"])
|
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["ifort"])
|
||||||
# 2023 is the last release that includes icc
|
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["icc", "icpc"])
|
||||||
if self.spec.satisfies("@:2023"):
|
|
||||||
self.write_config_file(
|
|
||||||
common_flags + classic_flags, self._classic_bin, ["icc", "icpc"]
|
|
||||||
)
|
|
||||||
|
|
||||||
def _ld_library_path(self):
|
def _ld_library_path(self):
|
||||||
# Returns an iterable of directories that might contain shared runtime libraries
|
# Returns an iterable of directories that might contain shared runtime libraries
|
||||||
|
Loading…
Reference in New Issue
Block a user