diff options
author | Paolo <142514942+paolotricerri@users.noreply.github.com> | 2024-10-31 21:51:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 14:51:47 -0700 |
commit | e35bc1f82d826513896e92dc429c885dbdb44856 (patch) | |
tree | 416315febac1a73cf5d350b5685d1f27ffe84518 /var | |
parent | 0de1ddcbe84db8fb996ee0be94ebce03c82fba03 (diff) | |
download | spack-e35bc1f82d826513896e92dc429c885dbdb44856.tar.gz spack-e35bc1f82d826513896e92dc429c885dbdb44856.tar.bz2 spack-e35bc1f82d826513896e92dc429c885dbdb44856.tar.xz spack-e35bc1f82d826513896e92dc429c885dbdb44856.zip |
acfl, armpl-cc: add v24.10 (#47167)
* Introduce support for ArmPL and ACfL 24.10
This patch introduces the possibility of installing armpl-gcc
and acfl 24.10 through spack. It also addressed one issue observed
after PR https://github.com/spack/spack/pull/46594
* Fix Github action issues.
- Remove default URL
- Reinstate default OS for ACfL to RHEL.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/acfl/package.py | 50 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/armpl-gcc/package.py | 28 |
2 files changed, 60 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py index b1e30fd767..4df0644898 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/package.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os from spack.package import * @@ -24,9 +25,7 @@ _os_map = { "ubuntu22.04": "Ubuntu-22.04", "debian12": "Ubuntu-22.04", "sles15": "SLES-15", - "centos7": "RHEL-7", "centos8": "RHEL-8", - "rhel7": "RHEL-7", "rhel8": "RHEL-8", "rhel9": "RHEL-9", "rocky8": "RHEL-8", @@ -36,6 +35,36 @@ _os_map = { } _versions = { + "24.10": { + "RHEL-8": ( + "7c685c5393345baff573dc53ea3bb84e6293f9e51808e168ececcf51efb45813", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_RHEL-8_aarch64.tar", + ), + "RHEL-9": ( + "52767ec236098aec410b1d9899c4ba2c3dc2bcc3c2b500dbf2f4b7b3cfacf16d", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_RHEL-9_aarch64.tar", + ), + "SLES-15": ( + "ab118af1150931d59e7ec89f9c235a89bf604700ace53f549d3898677e7e76a4", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_SLES-15_aarch64.tar", + ), + "Ubuntu-20.04": ( + "defe9b8bd31d28aba1c8b8026295b6e277f221d1e387b16d8d86f4dea9b75c27", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_Ubuntu-20.04_aarch64.tar", + ), + "Ubuntu-22.04": ( + "10c0fad1ff3628f505ada90359c68b046676a4c6cab1131d76ae0429d3694415", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_Ubuntu-22.04_aarch64.tar", + ), + "AmazonLinux-2": ( + "8abd35c455adb94812aaa55853f72ac55e142940e775e985eeedbbbe17902d8f", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_AmazonLinux-2_aarch64.tar", + ), + "AmazonLinux-2023": ( + "6b1cf34240af15ae9a7c767d7f484f2fa79c4633571b613e3d65e20b8d3ba65a", + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_AmazonLinux-2023_aarch64.tar", + ), + }, "24.04": { "RHEL-7": ( "064c3ecfd71cba3d8bf639448e899388f58eb7faef4b38f3c1aace625ace8b1e", @@ -209,10 +238,13 @@ _versions = { def get_os(ver): spack_os = spack.platforms.host().default_os - if ver.startswith("22."): + if ver.startswith("22"): return _os_map_before_23.get(spack_os, "") - else: - return _os_map.get(spack_os, "RHEL-7") + if ver.startswith("23") or ver == "24.04": + return {**_os_map, "centos7": "RHEL-7", "rhel7": "RHEL-7"}.get(spack_os, "RHEL-7") + if ver == "24.10": + return _os_map.get(spack_os, "RHEL-8") + return "RHEL-8" def get_armpl_version_to_3(spec): @@ -234,6 +266,11 @@ def get_armpl_prefix(spec): return join_path(spec.prefix, f"armpl-{ver}_{os}_arm-linux-compiler") +def get_gcc_prefix(spec): + dirlist = next(os.walk(spec.prefix))[1] + return join_path(spec.prefix, next(dir for dir in dirlist if dir.startswith("gcc"))) + + def get_acfl_prefix(spec): os = get_os(spec.version.string) if spec.version.string.startswith("22."): @@ -260,7 +297,6 @@ class Acfl(Package, CompilerPackage): """ homepage = "https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Linux" - url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_Ubuntu-22.04_aarch64.tar" maintainers("paolotricerri") @@ -402,6 +438,7 @@ class Acfl(Package, CompilerPackage): def check_install(self): arm_dir = get_acfl_prefix(self.spec) armpl_dir = get_armpl_prefix(self.spec) + gcc_dir = get_gcc_prefix(self.spec) suffix = get_armpl_suffix(self.spec) armpl_example_dir = join_path(armpl_dir, f"examples{suffix}") # run example makefile @@ -411,6 +448,7 @@ class Acfl(Package, CompilerPackage): "CC=" + self.cc, "F90=" + self.fortran, "CPATH=" + join_path(arm_dir, "include"), + "COMPILER_PATH=" + gcc_dir, "ARMPL_DIR=" + armpl_dir, ) # clean up diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py index b6dffafb85..25f187781e 100644 --- a/var/spack/repos/builtin/packages/armpl-gcc/package.py +++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py @@ -54,6 +54,11 @@ _os_pkg_map = { } _versions = { + "24.10": { + "deb": ("2be772d41c0e8646e24c4f57e188e96f2dd8934966ae560c74fa905cbde5e1bc"), + "macOS": ("04e794409867e6042ed0f487bbaf47cc6edd527dc6ddad67160f1dba83906969"), + "rpm": ("055d4b3c63d990942d453a8720d029be7e604646218ffc3262321683f51f23aa"), + }, "24.04": { "deb": ("a323074cd08af82f4d79988cc66088b18e47dea4b93323b1b8a0f994f769f2f0"), "macOS": ("228bf3a2c25dbd45c2f89c78f455ee3c7dfb25e121c20d2765138b5174e688dc"), @@ -261,7 +266,8 @@ def get_os_or_pkg_manager(ver): return _os_pkg_map.get(platform.default_os, "rpm") -def get_package_url_before_24(base_url, version): +def get_package_url_before_24(version): + base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries" armpl_version = version.split("_")[0] armpl_version_dashed = armpl_version.replace(".", "-") compiler_version = version.split("_", 1)[1] @@ -270,7 +276,7 @@ def get_package_url_before_24(base_url, version): if armpl_version.startswith("23.06"): return ( f"{base_url}/{armpl_version_dashed}/" - + f"armpl_{armpl_version}_{compiler_version}.dmg" + f"armpl_{armpl_version}_{compiler_version}.dmg" ) else: filename = f"arm-performance-libraries_{armpl_version}_macOS.dmg" @@ -286,9 +292,11 @@ def get_package_url_before_24(base_url, version): return f"{base_url}/{armpl_version_dashed}/{os_short}/{filename}" -def get_package_url_from_24(base, version): +def get_package_url_from_24(version): + base_url = ( + "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version" + ) pkg_system = get_os_or_pkg_manager(version) - os = "macOS" if pkg_system == "macOS" else "linux" extension = "tgz" if pkg_system == "macOS" else "tar" @@ -298,17 +306,15 @@ def get_package_url_from_24(base, version): full_name_library = f"{full_name_library}_gcc" file_name = f"{full_name_library}.{extension}" - vn = version.replace(".", "-") - url_parts = f"{base}/{vn}/{os}/{file_name}" + url_parts = f"{base_url}_{version}/{file_name}" return url_parts def get_package_url(version): - base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries" if version[:2] >= "24": - return get_package_url_from_24(base_url, version) + return get_package_url_from_24(version) else: - return get_package_url_before_24(base_url, version) + return get_package_url_before_24(version) def get_armpl_prefix(spec): @@ -335,8 +341,6 @@ class ArmplGcc(Package): high-performance computing applications on Arm processors.""" homepage = "https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries" - url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/24-04/linux/arm-performance-libraries_24.04_deb_gcc.tar" - maintainers("paolotricerri") for ver, packages in _versions.items(): @@ -434,7 +438,7 @@ class ArmplGcc(Package): exe = Executable( f"./arm-performance-libraries_{armpl_version}_" - + f"{get_os_or_pkg_manager(armpl_version)}.sh" + f"{get_os_or_pkg_manager(armpl_version)}.sh" ) exe("--accept", "--force", "--install-to", prefix) |