Compare commits

...

16 Commits

Author SHA1 Message Date
Wouter Deconinck
29554e8446 intel-oneapi-mpi: strip @ from IMPI_OFFICIALVERSION 2024-11-18 14:09:02 -06:00
Wouter Deconinck
d92cea0a07 intel-oneapi-mpi: external detection support 2024-07-27 08:23:56 -05:00
AcriusWinter
057b415074 pinentry: old to new test API (#45011)
* pinentry: New API
* move code around
* added back version check
* Complete check_version refactor
* Honor original handling of guis (i.e., don't try if not there)

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-26 14:07:06 -06:00
Manuela Kuhn
3180b28d76 py-mne: add v1.7.1 (#45400)
* py-mne: add v1.7.1
* fix style
2024-07-26 12:04:58 -07:00
Walter de Jong
b47c31509d apptainer: add v1.3.2, v1.3.3 (#45398)
* upgrade apptainer: security fix
  apptainer 1.3.1 has a high severity security issue: CVE-2024-3727
  Upgrade to 1.3.2 or preferably 1.3.3
* added comment for 1.3.1

---------

Co-authored-by: Walter de Jong <walter.dejong@surf.nl>
2024-07-26 08:51:30 -07:00
Sreenivasa Murthy Kolam
f99a5ef2e7 Fix build failure when kokkos +rocm is enabled. (#44459)
* fix kokkos +rocm build failure

* address review comments

* address review comments . revert the previous changes

* address review comments. Add rocthrust for 4.3 version onwards
2024-07-26 06:44:06 -07:00
Wouter Deconinck
690bcf5d47 intel-oneapi-compilers: update description with current compilers (#45348)
* intel-oneapi-compilers: update description with current compilers

* Update var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py

Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>

* intel-oneapi-compilers: break docstring line

---------

Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>
2024-07-26 07:20:21 -06:00
AcriusWinter
1e6bef079d kokkos: new test API (#45010)
* kokkos: new test API
* kokkos: added import llnl.util.lang as lang because earlier versions couldn't be installed without it

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-07-25 18:39:24 -07:00
AcriusWinter
564155fd1a povray: new test API (#45174)
* povray: new test API
* capture output and test name change
* povray: add v3.7.0.10, deprecate 3.7.0.8

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-25 17:51:34 -07:00
AcriusWinter
f371b6f06c umpire: old to new test API and refactor (#44957)
* umpire: old to new test format
* umpire: old to new test method and refactor
* indentation
* black reformat
* last minute syntax
* docstring and checks
* black format
* change test name
* method call correction
* Resolve problem with stand-alone tests (or examples) not loading library (Fixes #44960)

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-25 17:47:44 -07:00
Howard Pritchard
0f9434fca4 openmpi: add v5.0.4 and v5.0.5 (#45305)
* Open MPI: add release 5.0.4
* OpenMPI: add release 5.0.5
   needed quick turnaround owing to
   https://github.com/open-mpi/ompi/issues/12693

---------

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2024-07-25 15:14:37 -07:00
Martin Diehl
235831a035 damask 3.0.0 and 3.0.0-beta2 (#45405) 2024-07-25 14:03:09 -07:00
Teague Sterling
4240748cea wasi-sdk-prebuilt: new package (#45394)
* wasi-sdk-prebuilt: new package
* move url_for_version to be first method

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-25 12:56:35 -07:00
John W. Parent
934e34fbd6 CMake package: add versions 3.30.0 and 3.30.1 (#45418) 2024-07-25 10:39:56 -06:00
Adam J. Stewart
ea42d18506 libgcrypt: add patch for avx512 support (#45432) 2024-07-25 15:57:18 +02:00
Andrew W Elble
2b763ff2db py-tensorflow: alter gcc conflict, fix build (#45330) 2024-07-25 08:22:48 +02:00
18 changed files with 275 additions and 133 deletions

View File

@@ -36,7 +36,10 @@ class Apptainer(SingularityBase):
)
version("main", branch="main")
version("1.3.1", sha256="6956c689c4a8f148789c5c34b33c15ad8f3460b4cee3f48022119fd872eacee9")
version("1.3.3", sha256="94a274ab4898cdb131f4e3867c4e15f7e16bc2823303d2afcbafee0242f0838d")
version("1.3.2", sha256="483910727e1a15843b93d9f2db1fc87e27804de9c74da13cc32cd4bd0d35e079")
# version "1.3.1" has security vulnerability CVE-2024-3727
# see also https://github.com/advisories/GHSA-6wvf-f2vw-3425
version("1.2.5", sha256="606b67ef97683e1420401718687d258b1034fdf2edae72eeacd0828dffbfc2c2")
version("1.1.9", sha256="c615777539154288542cf393d3fd44c04ccb3260bc6330dc324d4e4ebe902bfa")
version("1.1.7", sha256="e6d3956a26c3965703402e17f153ba07f59bf710068806462b314d2d04e825e7")

View File

@@ -29,6 +29,8 @@ class Cmake(Package):
license("BSD-3-Clause")
version("master", branch="master")
version("3.30.1", sha256="df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1")
version("3.30.0", sha256="157e5be6055c154c34f580795fe5832f260246506d32954a971300ed7899f579")
version("3.29.6", sha256="1391313003b83d48e2ab115a8b525a557f78d8c1544618b48d1d90184a10f0af")
version("3.29.5", sha256="dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e")
version("3.29.4", sha256="b1b48d7100bdff0b46e8c8f6a3c86476dbe872c8df39c42b8d104298b3d56a2c")

View File

@@ -17,6 +17,10 @@ class DamaskGrid(CMakePackage):
license("AGPL-3.0-or-later")
version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f")
version(
"3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a"
)
version(
"3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c"
)
@@ -39,8 +43,9 @@ class DamaskGrid(CMakePackage):
depends_on("c", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("petsc@3.20.3:3.21", when="@3.0.0-beta")
depends_on("petsc@3.20.2:3.21", when="@3.0.0-alpha8")
depends_on("petsc@3.21", when="@3.0.0-beta2:")
depends_on("petsc@3.20.3:3.20", when="@3.0.0-beta")
depends_on("petsc@3.20.2:3.20", when="@3.0.0-alpha8")
depends_on("petsc@3.17.1:3.18", when="@3.0.0-alpha7")
depends_on("petsc@3.16.5:3.16", when="@3.0.0-alpha6")
depends_on("petsc@3.14.0:3.14,3.15.1:3.16", when="@3.0.0-alpha5")

View File

@@ -17,6 +17,10 @@ class DamaskMesh(CMakePackage):
license("AGPL-3.0-or-later")
version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f")
version(
"3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a"
)
version(
"3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c"
)
@@ -39,8 +43,9 @@ class DamaskMesh(CMakePackage):
depends_on("c", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("petsc@3.20.3:3.21", when="@3.0.0-beta")
depends_on("petsc@3.20.2:3.21", when="@3.0.0-alpha8")
depends_on("petsc@3.21", when="@3.0.0-beta2:")
depends_on("petsc@3.20.3:3.20", when="@3.0.0-beta")
depends_on("petsc@3.20.2:3.20", when="@3.0.0-alpha8")
depends_on("petsc@3.17.1:3.18", when="@3.0.0-alpha7")
depends_on("petsc@3.16.5:3.16", when="@3.0.0-alpha6")
depends_on("petsc@3.14.0:3.14,3.15.1:3.16", when="@3.0.0-alpha5")

View File

@@ -28,6 +28,8 @@ class Damask(BundlePackage):
maintainers("MarDiehl")
version("3.0.0")
version("3.0.0-beta2")
version("3.0.0-beta")
version("3.0.0-alpha8")
version("3.0.0-alpha7")
@@ -35,6 +37,14 @@ class Damask(BundlePackage):
version("3.0.0-alpha5")
version("3.0.0-alpha4")
depends_on("damask-grid@3.0.0", when="@3.0.0", type="run")
depends_on("damask-mesh@3.0.0", when="@3.0.0", type="run")
depends_on("py-damask@3.0.0", when="@3.0.0", type="run")
depends_on("damask-grid@3.0.0-beta2", when="@3.0.0-beta2", type="run")
depends_on("damask-mesh@3.0.0-beta2", when="@3.0.0-beta2", type="run")
depends_on("py-damask@3.0.0-beta2", when="@3.0.0-beta2", type="run")
depends_on("damask-grid@3.0.0-beta", when="@3.0.0-beta", type="run")
depends_on("damask-mesh@3.0.0-beta", when="@3.0.0-beta", type="run")
depends_on("py-damask@3.0.0-beta", when="@3.0.0-beta", type="run")

View File

@@ -234,7 +234,8 @@
@IntelOneApiPackage.update_description
class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage):
"""Intel oneAPI Compilers. Includes: icc, icpc, ifort, icx, icpx, and ifx."""
"""Intel oneAPI Compilers. Includes: icx, icpx, ifx, and ifort.
Releases before 2024.0 include icc/icpc"""
maintainers("rscohn2")

View File

@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
from spack.package import *
@@ -137,6 +139,16 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
provides("mpi@:3.1")
conflicts("+generic-names +classic-names")
executables = [r"^mpiicpx$"]
version_regex = r"Intel\(R\) MPI Library (\S+)"
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("-v", output=str, error=str)
match = re.search(cls.version_regex, output)
# strip @ from unsubstituted @IMPI_OFFICIALVERSION@
return match.group(1).strip("@") if match else None
@property
def mpiexec(self):
return self.component_prefix.bin.mpiexec

View File

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
from llnl.util import lang, tty
import llnl.util.lang as lang
from spack.package import *
@@ -202,6 +202,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
variant(dev, default=dflt, description=desc)
conflicts("+cuda", when="+rocm", msg="CUDA and ROCm are not compatible in Kokkos.")
depends_on("intel-oneapi-dpl", when="+sycl")
depends_on("rocthrust", when="@4.3: +rocm")
for opt, (dflt, desc) in options_variants.items():
variant(opt, default=dflt, description=desc, when=("+cuda" if "cuda" in opt else None))
@@ -354,6 +355,7 @@ def cmake_args(self):
if "+rocm" in self.spec:
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
options.append(self.define("Kokkos_ENABLE_ROCTHRUST", True))
elif "+wrapper" in self.spec:
options.append(
self.define("CMAKE_CXX_COMPILER", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
@@ -378,20 +380,6 @@ def cmake_args(self):
test_script_relative_path = join_path("scripts", "spack_test")
# TODO: Replace this method and its 'get' use for cmake path with
# join_path(self.spec['cmake'].prefix.bin, 'cmake') once stand-alone
# tests can access build dependencies through self.spec['cmake'].
def cmake_bin(self, set=True):
"""(Hack) Set/get cmake dependency path."""
filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
if set:
with open(filepath, "w") as out_file:
cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
out_file.write("{0}\n".format(cmake_bin))
elif os.path.isfile(filepath):
with open(filepath, "r") as in_file:
return in_file.read().strip()
@run_after("install")
def setup_build_tests(self):
# Skip if unsupported version
@@ -410,41 +398,19 @@ def setup_build_tests(self):
]
cmake(*cmake_args)
self.cache_extra_test_sources(cmake_out_path)
self.cmake_bin(set=True)
def build_tests(self, cmake_path):
"""Build test."""
cmake_bin = self.cmake_bin(set=False)
if not cmake_bin:
tty.msg("Skipping kokkos test: cmake_bin_path.txt not found")
return
cmake_args = [cmake_path, "-DEXECUTABLE_OUTPUT_PATH=" + cmake_path]
if not self.run_test(cmake_bin, options=cmake_args, purpose="Generate the Makefile"):
tty.warn("Skipping kokkos test: failed to generate Makefile")
return
if not self.run_test("make", purpose="Build test software"):
tty.warn("Skipping kokkos test: failed to build test")
def run_tests(self, cmake_path):
"""Run test."""
if not self.run_test(
"make", options=[cmake_path, "test"], purpose="Checking ability to execute."
):
tty.warn("Failed to run kokkos test")
def test(self):
# Skip if unsupported version
def test_run(self):
"""Test if kokkos builds and runs"""
cmake_path = join_path(
self.test_suite.current_test_cache_dir, self.test_script_relative_path, "out"
)
if not os.path.exists(cmake_path):
tty.warn("Skipping smoke tests: {0} is missing".format(cmake_path))
return
raise SkipTest(f"{cmake_path} is missing")
self.build_tests(cmake_path)
self.run_tests(cmake_path)
cmake = self.spec["cmake"].command
cmake(cmake_path, "-DEXECUTABLE_OUTPUT_PATH=" + cmake_path)
make = which("make")
make()
make(cmake_path, "test")

View File

@@ -0,0 +1,33 @@
From b42116d6067a5233f72e5598032d4b396bb8eaac Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Thu, 4 Jul 2024 11:17:03 +0900
Subject: [PATCH] cipher:blake2: Fix for use_avx512.
* cipher/blake2.c (blake2s_init_ctx): Conditional with USE_AVX512.
--
GnuPG-bug-id: 7184
Reported-by: Aaron Howland
Fixing-commit: 909daa700e4b45d75469df298ee564b8fc2f4b72
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
---
cipher/blake2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cipher/blake2.c b/cipher/blake2.c
index 451e71f6..1a04fbd8 100644
--- a/cipher/blake2.c
+++ b/cipher/blake2.c
@@ -830,7 +830,7 @@ static gcry_err_code_t blake2s_init_ctx(void *ctx, unsigned int flags,
#ifdef USE_AVX
c->use_avx = !!(features & HWF_INTEL_AVX);
#endif
-#ifdef USE_AVX
+#ifdef USE_AVX512
c->use_avx512 = !!(features & HWF_INTEL_AVX512);
#endif
--
2.30.2

View File

@@ -56,6 +56,9 @@ def flag_handler(self, name, flags):
# https://dev.gnupg.org/T6442
patch("rndgetentropy_no_getrandom.patch", when="@=1.10.2 platform=darwin")
# https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=b42116d6067a5233f72e5598032d4b396bb8eaac
patch("conditional_avx512.patch", when="@1.11.0")
def check(self):
# Without this hack, `make check` fails on macOS when SIP is enabled
# https://bugs.gnupg.org/gnupg/issue2056

View File

@@ -44,10 +44,16 @@ class Openmpi(AutotoolsPackage, CudaPackage):
# Current
version(
"5.0.3", sha256="990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b"
) # libmpi.so.40.40.3
"5.0.5", sha256="6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776"
) # libmpi.so.40.40.5
# Still supported
version(
"5.0.4", sha256="64526852cdd88b2d30e022087c16ab3e03806c451b10cd691d5c1ac887d8ef9d"
) # libmpi.so.40.40.4
version(
"5.0.3", sha256="990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b"
) # libmpi.so.40.40.3
version(
"5.0.2", sha256="ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f"
) # libmpi.so.40.40.2

View File

@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
@@ -95,17 +94,24 @@ def configure_args(self):
args.append("--enable-pinentry-" + gui)
else:
args.append("--disable-pinentry-" + gui)
return args
def test(self):
kwargs = {
"exe": self.prefix.bin.pinentry,
"options": ["--version"],
"expected": [str(self.version)],
}
self.run_test(**kwargs)
def check_version(self, exe_name):
"""Version check"""
exe = which(join_path(self.prefix.bin, exe_name))
out = exe("--version", output=str.split, error=str.split)
assert str(self.version) in out
def test_pinentry(self):
"""Confirm pinentry version"""
self.check_version("pinentry")
def test_guis(self):
"""Check gui versions"""
for gui in self.supported_guis:
if "gui=" + gui in self.spec:
kwargs["exe"] = self.prefix.bin.pinentry + "-" + gui
self.run_test(**kwargs)
if f"gui={gui}" not in self.spec:
continue
exe_name = f"pinentry-{gui}"
with test_part(self, f"test_guis_{gui}", purpose=f"Check {exe_name} version"):
self.check_version(exe_name)

View File

@@ -23,16 +23,19 @@ class Povray(AutotoolsPackage):
realistic reflections, shading, perspective and other effects.
"""
# Add a proper url for your package's homepage here.
homepage = "http://povray.org/download/"
url = "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz"
git = "https://github.com/POV-Ray/povray.git"
# maintainers('payerle' )
license("AGPL-3.0-or-later")
version("3.7.0.8", sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4")
version("3.7.0.10", sha256="7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff")
# The following version no longer builds
version(
"3.7.0.8",
sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4",
deprecated=True,
)
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
@@ -105,8 +108,8 @@ def configure_args(self):
# We generate a generic using process owner and fqdn of build host.
fqdn = socket.getfqdn()
uname = getpass.getuser()
compiled_by = "Installed by spack <{0}@{1}>".format(uname, fqdn)
extra_args.append("COMPILED_BY={0}".format(compiled_by))
compiled_by = f"Installed by spack <{uname}@{fqdn}>"
extra_args.append(f"COMPILED_BY={compiled_by}")
extra_args.append("--disable-silent-rules") # Verbose make output
extra_args += self.enable_or_disable("debug")
@@ -115,32 +118,32 @@ def configure_args(self):
extra_args += self.enable_or_disable("static")
if "+boost" in self.spec:
extra_args.append("--with-boost={0}".format(self.spec["boost"].prefix))
extra_args.append(f"--with-boost={self.spec['boost'].prefix}")
else:
extra_args.append("--without-boost")
if "+jpeg" in self.spec:
extra_args.append("--with-libjpeg={0}".format(self.spec["jpeg"].prefix))
extra_args.append(f"--with-libjpeg={self.spec['jpeg'].prefix}")
else:
extra_args.append("--without-libjpeg")
if "+libpng" in self.spec:
extra_args.append("--with-libpng={0}".format(self.spec["libpng"].prefix))
extra_args.append(f"--with-libpng={self.spec['libpng'].prefix}")
else:
extra_args.append("--without-libpng")
if "+libtiff" in self.spec:
extra_args.append("--with-libtiff={0}".format(self.spec["libtiff"].prefix))
extra_args.append(f"--with-libtiff={self.spec['libtiff'].prefix}")
else:
extra_args.append("--without-libtiff")
if "+mkl" in self.spec:
extra_args.append("--with-libmkl={0}".format(self.spec["mkl"].prefix))
extra_args.append(f"--with-libmkl={self.spec['mkl'].prefix}")
else:
extra_args.append("--without-libmkl")
if "+openexr" in self.spec:
extra_args.append("--with-openexr={0}".format(self.spec["openexr"].prefix))
extra_args.append(f"--with-openexr={self.spec['openexr'].prefix}")
else:
extra_args.append("--without-openexr")
@@ -151,12 +154,11 @@ def configure_args(self):
return extra_args
def test(self):
def test_render_sample(self):
"""Render sample file"""
povs = find(self.prefix.share, "biscuit.pov")[0]
copy(povs, ".")
self.run_test(
"povray",
options=["biscuit.pov"],
purpose="test: render sample file",
expected=["POV-Ray finished"],
)
exe = which("povray")
out = exe("biscuit.pov", output=str.split, error=str.split)
expected = "POV-Ray finished"
assert expected in out

View File

@@ -17,6 +17,10 @@ class PyDamask(PythonPackage):
license("AGPL-3.0-or-later")
version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f")
version(
"3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a"
)
version(
"3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c"
)

View File

@@ -17,6 +17,7 @@ class PyMne(PythonPackage):
license("BSD-3-Clause")
version("1.7.1", sha256="a87bbc998b792532d2c87add8b0f7bbf28a4d8cf5db1bdfb6d6e260791754498")
version("1.6.1", sha256="e4f5683d01cef675eddad788bdb6b44cc015dff0fb1ddfca3c4105edfb757ef8")
version("1.4.2", sha256="dd2bf35a90d951bef15ff3a651045b0373eff26018a821667109c727d55c7d63")
version("1.4.0", sha256="7834f5b79c2c9885ca601bbddd8db3c2b2f37c34443fc0caf0447751f6c37a2a")
@@ -30,10 +31,10 @@ class PyMne(PythonPackage):
variant("full", default=False, when="@:0.23", description="Enable full functionality.")
variant("hdf5", default=False, when="@1:", description="Enable hdf5 functionality.")
depends_on("python@3.9:", when="@1.7:", type=("build", "run"))
depends_on("python@3.8:", when="@1.4:", type=("build", "run"))
depends_on("py-setuptools@45:", when="@1.4:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm@6.2:", when="@1.4:", type="build")
depends_on("py-hatchling", when="@1.7:", type="build")
depends_on("py-hatch-vcs", when="@1.7:", type="build")
# requirements_base.txt with versions specified in README.rst (marked with *)
depends_on("py-numpy@1.21.2:", when="@1.6.1:", type=("build", "run"))
@@ -55,16 +56,20 @@ class PyMne(PythonPackage):
depends_on("py-decorator", when="@1:", type=("build", "run"))
depends_on("py-packaging", when="@1:", type=("build", "run"))
depends_on("py-jinja2", when="@1:", type=("build", "run"))
depends_on(
"py-importlib-resources@5.10.2:", when="@1.6.1: ^python@:3.9", type=("build", "run")
)
depends_on("py-importlib-resources@5.10.2:", when="@1.4: ^python@:3.8", type=("build", "run"))
depends_on("py-lazy-loader@0.3:", when="@1.6.1:", type=("build", "run"))
with when("+hdf5"):
depends_on("py-h5io", type=("build", "run"))
depends_on("py-pymatreader", type=("build", "run"))
# Historical dependencies
depends_on("py-setuptools@45:", when="@1.4:1.6", type="build")
depends_on("py-setuptools", when="@:1.6", type="build")
depends_on("py-setuptools-scm@6.2:", when="@1.4:1.6", type="build")
depends_on(
"py-importlib-resources@5.10.2:", when="@1.4:1.6 ^python@:3.9", type=("build", "run")
)
with when("+full"):
# requirements.txt with versions specified in README.rst (marked with *)
depends_on("py-matplotlib@3.0.3:", type=("build", "run")) # *

View File

@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os
import sys
import tempfile
@@ -381,7 +382,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# https://www.tensorflow.org/install/source#tested_build_configurations
# https://github.com/tensorflow/tensorflow/issues/70199
conflicts("%gcc", when="@2.17:")
# (-mavx512fp16 exists in gcc@12:)
conflicts("%gcc@:11", when="@2.17:")
conflicts("%gcc@:9.3.0", when="@2.9:")
conflicts("%gcc@:7.3.0")
@@ -709,6 +711,14 @@ def configure(self, spec, prefix):
def post_configure_fixes(self):
spec = self.spec
if spec.satisfies("@2.17:"):
filter_file(
"patchelf",
spec["patchelf"].prefix.bin.patchelf,
"tensorflow/tools/pip_package/build_pip_package.py",
string=True,
)
# make sure xla is actually turned off
if spec.satisfies("~xla"):
filter_file(
@@ -849,14 +859,27 @@ def build(self, spec, prefix):
bazel(*args)
build_pip_package = Executable("bazel-bin/tensorflow/tools/pip_package/build_pip_package")
buildpath = join_path(self.stage.source_path, "spack-build")
build_pip_package("--src", buildpath)
if self.spec.satisfies("@:2.16"):
build_pip_package = Executable(
"bazel-bin/tensorflow/tools/pip_package/build_pip_package"
)
buildpath = join_path(self.stage.source_path, "spack-build")
build_pip_package("--src", buildpath)
def install(self, spec, prefix):
tmp_path = env["TEST_TMPDIR"]
buildpath = join_path(self.stage.source_path, "spack-build")
with working_dir(buildpath):
args = std_pip_args + ["--prefix=" + prefix, "."]
pip(*args)
if self.spec.satisfies("@2.17:"):
buildpath = join_path(
self.stage.source_path, "bazel-bin/tensorflow/tools/pip_package/wheel_house/"
)
with working_dir(buildpath):
wheel = glob.glob("*.whl")[0]
args = std_pip_args + ["--prefix=" + prefix, wheel]
pip(*args)
else:
buildpath = join_path(self.stage.source_path, "spack-build")
with working_dir(buildpath):
args = std_pip_args + ["--prefix=" + prefix, "."]
pip(*args)
remove_linked_tree(tmp_path)

View File

@@ -6,8 +6,6 @@
import os
import socket
import llnl.util.tty as tty
from spack.package import *
from .blt import llnl_link_helpers
@@ -462,37 +460,57 @@ def initconfig_package_entries(self):
def cmake_args(self):
return []
def test(self):
def setup_run_environment(self, env):
for library in ["lib", "lib64"]:
lib_path = join_path(self.prefix, library)
if os.path.exists(lib_path):
env.append_path("LD_LIBRARY_PATH", lib_path)
def run_example(self, exe, expected):
"""Perform stand-alone checks on the installed package."""
if self.spec.satisfies("@:1") or not os.path.isdir(self.prefix.bin):
tty.info("Skipping: checks not installed in bin for v{0}".format(self.version))
return
# Run a subset of examples PROVIDED installed
# tutorials with readily checkable outputs.
checks = {
"malloc": ["99 should be 99"],
"recipe_dynamic_pool_heuristic": ["in the pool", "releas"],
"recipe_no_introspection": ["has allocated", "used"],
"strategy_example": ["Available allocators", "HOST"],
"tut_copy": ["Copied source data"],
"tut_introspection": ["Allocator used is HOST", "size of the allocation"],
"tut_memset": ["Set data from HOST"],
"tut_move": ["Moved source data", "HOST"],
"tut_reallocate": ["Reallocated data"],
"vector_allocator": [""],
}
exe_run = which(join_path(self.prefix.bin, exe))
if exe_run is None:
raise SkipTest(f"{exe} is not installed for version {self.version}")
out = exe_run(output=str.split, error=str.split)
check_outputs(expected, out)
for exe in checks:
expected = checks[exe]
reason = "test: checking output from {0}".format(exe)
self.run_test(
exe,
[],
expected,
0,
installed=False,
purpose=reason,
skip_missing=True,
work_dir=self.prefix.bin,
)
def test_malloc(self):
"""Run Malloc"""
self.run_example("malloc", ["99 should be 99"])
def test_recipe_dynamic_pool_heuristic(self):
"""Multiple use allocator test"""
self.run_example("recipe_dynamic_pool_heuristic", ["in the pool", "releas"])
def test_recipe_no_introspection(self):
"""Test without introspection"""
self.run_example("recipe_no_introspection", ["has allocated", "used"])
def test_strategy_example(self):
"""Memory allocation strategy test"""
self.run_example("strategy_example", ["Available allocators", "HOST"])
def test_tut_copy(self):
"""Copy data test"""
self.run_example("tut_copy", ["Copied source data"])
def test_tut_introspection(self):
"""Keep track of pointer allocation test"""
self.run_example("tut_introspection", ["Allocator used is HOST", "size of the allocation"])
def test_tut_memset(self):
"""Set entire block of memory to one value test"""
self.run_example("tut_memset", ["Set data from HOST"])
def test_tut_move(self):
"""Move memory test"""
self.run_example("tut_move", ["Moved source data", "HOST"])
def test_tut_reallocate(self):
"""Reallocate memory test"""
self.run_example("tut_reallocate", ["Reallocated data"])
def test_vector_allocator(self):
"""Allocate vector memory test"""
self.run_example("vector_allocator", [""])

View File

@@ -0,0 +1,38 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class WasiSdkPrebuilt(Package):
"""
A group of standard API specifications for software compiled to the W3C WebAssembly standard
"""
homepage = "https://wasi.dev/"
url = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz"
maintainers("teaguesterling")
license("APACHE-2.0", checked_by="teaguesterling")
version("22.0", sha256="fa46b8f1b5170b0fecc0daf467c39f44a6d326b80ced383ec4586a50bc38d7b8")
version("21.0", sha256="f2fe0723b337c484556b19d64c0f6c6044827014bfcd403d00951c65a86cfa26")
version("20.0", sha256="7030139d495a19fbeccb9449150c2b1531e15d8fb74419872a719a7580aad0f9")
version("19.0", sha256="d900abc826eec1955b9afd250e7cc2496338abbf6c440d86a313c06e42083fa1")
version("17.0", sha256="8778a476af7898a51db9b78395687cc9c8b69702850da77a763711e832614dac")
version("16.0", sha256="10df3418485e60b9283c1132102f8d3ca34b4fbe8c4649e30282ee84fe42d788")
version("15.0", sha256="9b1f2c900a034a44e59b74843cd79b4f189342598e554029367ef0a2ac286703")
version("14.0", sha256="8c8ebb7f71dcccbb8b1ab384499a53913b0b6d1b7b3281c3d70165e0f002e821")
provides("wasi-sdk")
def url_for_version(self, version):
base = "https://github.com/WebAssembly/wasi-sdk/releases/download"
major = version.up_to(1)
full = version.up_to(2)
return f"{base}/wasi-sdk-{major}/wasi-sdk-{full}-linux.tar.gz"
def install(self, spec, prefix):
install_tree("share/wasi-sysroot", prefix)